[Bug c/63818] unexpected/incorrect behavior

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 11 16:48:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63818

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |mpolacek at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
You're invoking undefined behavior:

test.c:16:23: warning: operation on ‘i’ may be undefined [-Wsequence-point]
   testouter(++i, ++i, ++i); // 3 3 3 initially, then 3 2 1 when below line is
uncommented

http://c-faq.com/expr/seqpoints.html


More information about the Gcc-bugs mailing list