This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Linux and aliasing?
- To: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Subject: Re: Linux and aliasing?
- From: Linus Torvalds <torvalds at transmeta dot com>
- Date: Sat, 5 Jun 1999 18:46:37 -0700 (PDT)
- cc: Andi Kleen <ak at muc dot de>, law at cygnus dot com, Joe Buck <jbuck at Synopsys dot COM>, craig at jcb-sc dot com, mark at codesourcery dot com, davem at redhat dot com, chip at perlsupport dot com, egcs at egcs dot cygnus dot com
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