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


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


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