This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Is this a gcc bug?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]