------- Comment #1 from rguenth at gcc dot gnu dot org  2006-04-20 12:04 -------
It's called -Wsequence-point, but it's not perfect.  See also PR18050.

int *v;
int i;
void f(int, int);
void foo(void)
{
  v[i] = i++;
  f(v[i], i++);
}

/space/rguenther/install/gcc-3.4.4/bin/gcc -Wsequence-point -c t.c
t.c: In function `foo':
t.c:6: warning: operation on `i' may be undefined
t.c:7: warning: operation on `i' may be undefined


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
           Keywords|                            |diagnostic
         Resolution|                            |INVALID


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

Reply via email to