This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Is this a gcc bug?
- To: <dewar at gnat dot com>
- Subject: RE: Is this a gcc bug?
- From: Bernd Schmidt <bernds at redhat dot com>
- Date: Thu, 11 Jan 2001 14:06:21 +0000 (GMT)
- Cc: <dkorn at pixelpower dot com>, <gcc at gcc dot gnu dot org>, <uros at kss-loka dot si>
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