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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
int main (void)
{
    int x = 0, y [++ x], z [++ x];
    __builtin_printf ("%d, %d, %d\n", sizeof x, sizeof y, sizeof z);
    return 0;
}

$ cc1 -Wsequence-point test.c
test.c:3:27: warning: operation on ‘x’ may be undefined [-Wsequence-point]
   int x = 0, y [++ x], z [++ x];
                           ^

I'll let someone else with more knowledge of the standard to decide if the
warning is correct or not.

Reply via email to