This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc3 vs 176.gcc
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Hartmut Schirmer <hartmut dot schirmer at arcormail dot de>
- Cc: Dale Johannesen <dalej at apple dot com>, <dewar at gnat dot com>, <gcc at gcc dot gnu dot org>
- Date: Wed, 9 Jan 2002 19:04:44 +0000 (GMT)
- Subject: Re: gcc3 vs 176.gcc
On Wed, 9 Jan 2002, Hartmut Schirmer wrote:
> GCC should behave a little more predictable here.
Undefined behaviour often means it isn't reasonable to expect well-defined
or predictable semantics from an implementation.
We can (and should) have testcases in the testsuite that alias analysis
does work - that the compiler knows that one access does not conflict with
another. If we decide the override type-based alias analysis (with a
warning, of course) when accesses "obviously" conflict, we should add some
specific testcases where accesses "obviously" conflict, type-based alias
analysis says they don't, and the compiler is meant to ignore the
type-based alias analysis. Then we'll know if those testcases break in
future. But documenting specific cases of undefined code to work - or
indeed documenting certain optimisations to work and optimise out code
(and the Linux kernel has been known to rely on optimisations working in
some cases) - seems less desirable.
--
Joseph S. Myers
jsm28@cam.ac.uk