This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: module level flags
- From: dewar at gnat dot com (Robert Dewar)
- To: bkorb at pacbell dot net, dewar at gnat dot com
- Cc: gcc at gcc dot gnu dot org, zack at codesourcery dot com
- Date: Sun, 29 Sep 2002 13:16:46 -0400 (EDT)
- Subject: Re: module level flags
<<where 'stumble' is not of type 'mumble' must be deemed a
hard error. If it is both not a hard error and the compiler
is reserving the "right" (??) to render the resulting pointer
ineffective, then GCC is reserving the right to destroy
the workings of a program. This is wrong. I don't care
if the standard says otherwise.
>>
Surely if you take this attitude you should just turn off aliasing analysis.
Really we expect gcc to implement C by default, not C + "fixes" to the
standard that Bruce Korb thinks are obviously correct.
GCC is not "reserving the right to destroy the workings of a program",
since this program simply does not meet the semantics of C. Just because
you expect some program whose semantics is not defined by the standard
to do something, does not mean that a C compiler wlil agree with your
analysis.
There are lots of respects in which people write non-standard C and expect
it to work. This particular case seems to me to be one that should never
have been expected to work (i.e. I don't see any formal definition of C
that guarantees this program will work -- if I am wrong on this, please point out the document,
but do not expect me to be impressed by what some individual *thinks* the
language should be. That's not decisive :-)
Robert Dewar