[Bug c/59755] BUG Increment Operator with Accessing Arrays

trippels at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 10 11:45:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59755

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

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

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
With -Wall one gets:
test.c: In function ‘main’:
test.c:12:14: warning: operation on ‘m’ may be undefined [-Wsequence-point]
  D = A[m][B[m++]];
              ^

Thus your testcase is invalid because of unsequenced modification
and access to m.


More information about the Gcc-bugs mailing list