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]
Other format: [Raw text]

Re: gcc3 vs 176.gcc


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.


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