Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #12922

Re: overflow problem?

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: overflow problem?
Date 2011-11-08 14:33 -0800
Organization None to speak of
Message-ID <lnvcqub5xe.fsf@nuthaus.mib.org> (permalink)
References <j9c9o3$fhi$1@speranza.aioe.org>

Show all headers | View raw


Greg <nospam@nospam.com> writes:
[...]
>         for(*++c= !(*++c = 1); (log(*c--) / log(2) < 9); *c-- += *c++ &
> ( *++c << 1 ), *c<<=1 ) ;
[...]

"*c-- += *c++" has undefined behavior; it modifies an object twice
between sequence points.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

overflow problem? Greg <nospam@nospam.com> - 2011-11-08 22:16 +0000
  Re: overflow problem? Keith Thompson <kst-u@mib.org> - 2011-11-08 14:33 -0800
  Re: overflow problem? James Kuyper <jameskuyper@verizon.net> - 2011-11-08 18:26 -0500
    Re: overflow problem? Nobody <nobody@nowhere.com> - 2011-11-09 09:05 +0000
      Re: overflow problem? James Kuyper <jameskuyper@verizon.net> - 2011-11-09 06:40 -0500
        Re: overflow problem? Greg <nospam@nospam.com> - 2011-11-09 20:01 +0000
          Re: overflow problem? Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-11-10 01:29 -0800

csiph-web