warning: operation on 'zero' may be undefined

Mathieu Malaterre mmalater@nycap.rr.com
Fri Oct 1 02:57:00 GMT 2004


Hello,

	I am trying gcc4, and turning -Wall reveal a strange warning:

int main()
{
   int zero = 125;
   zero = (++zero)%3;
}

g++ -Wall foo.cxx

foo.cxx: In function `int main()':
foo.cxx:4: warning: operation on 'zero' may be undefined


What does this mean ?

Thanks
Mathieu
$ g++ --version
g++ (GCC) 4.0.0 20040919 (experimental)



More information about the Gcc mailing list