From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernd Schmidt To: Cc: , , Subject: RE: Is this a gcc bug? Date: Thu, 11 Jan 2001 06:06:00 -0000 Message-id: References: <20010111135306.428AB34D80@nile.gnat.com> X-SW-Source: 2001-01/msg00727.html On Thu, 11 Jan 2001 dewar@gnat.com wrote: > it seems like it would not be hard to implement a warning for the case where > a variable is incremented or decremented somewhere in a statement, and > referenced elsewhere (this is not all the difficult cases, but is a very > high fraction of them). This would also catch macros where this happens > less visibly. Already there. You just have to turn on warnings. $ ./cc1 bug.i -Wall main bug.i: In function `main': bug.i:8: warning: implicit declaration of function `printf' bug.i:8: warning: operation on `x' may be undefined bug.i:8: warning: operation on `x' may be undefined bug.i:8: warning: operation on `x' may be undefined Bernd