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: Linux and aliasing?




On Sat, 5 Jun 1999, Toon Moene wrote:
> 
> Be careful to not run in circles here:  gcc generates "some" code that's
> allowed because the construct invokes `undefined behaviour'.  That
> doesn't make it "faulty" - just undefined.

Sure. But wouldn't it be nice if the undefined behaviour did what the
programmer obviously meant?

You can see it as a quality of implementation issue - you're _allowed_ to
do anything under the standard, and the ANSI C standard doesn't for
example _require_ that any compile generate efficient code - but a quality
of implementation obviously means that you want to not just say "the
standard doesn't say that you have to generate good code, so we don't
optimize".

A quality of implementation issue says that you'd want to not just do what
the standard requires, but that there are other issues that the standard
just leaves at the discretion of the compiler implementer.

> If you think so, bring it up in comp.std.c.  At least that's the
> ultimate criterium I use:  If I can explain an extension to the Fortran
> Standard coherently on comp.lang.fortran (where all the J3 members
> listen in), and no-one shoots it down in two weeks time, it might indeed
> have some value.
> 
> Success !

That's probably a good idea.

		Linus


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