gcc3 vs 176.gcc

Joe Buck jbuck@synopsys.COM
Thu Jan 10 15:39:00 GMT 2002


I wrote:
> > Maybe this one should be a hard error if -fstrict-aliasing is enabled
> > and optimization is on, as bad code is so highly likely.  But there
> > is perhaps a philosophical problem with having a warning become an
> > error based on optimization level.

Joseph Myers writes:
> Making it an error is no good since we don't know that any particular
> function ever gets executed.  (You could compile it into a call to
> abort(), though.)

This is an odd way of looking at things.  Consider code that accesses
a private data member in C++ without permission.  Are you saying that
instead of producing an error, we should produce code that calls abort()
if the code is reached?  It's exactly the same sort of thing: the ISO
standard forbids the code in either case.



More information about the Gcc mailing list