This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: module level flags
- From: Joe Buck <Joe dot Buck at synopsys dot com>
- To: dewar at gnat dot com (Robert Dewar)
- Cc: Joe dot Buck at synopsys dot COM, bkorb at pacbell dot net, aoliva at redhat dot com,dewar at gnat dot com, gcc at gcc dot gnu dot org, zack at codesourcery dot com
- Date: Tue, 1 Oct 2002 14:14:37 -0700 (PDT)
- Subject: Re: module level flags
> <<It's not a matter of not wanting to learn the rules. It's a matter
> of dealing with massive amounts of legacy code written before the
> aliasing optimizations were devised. This is a change in the C
> language that is only a very few years old. Silently biting people
> isn't the way to do it.
> >>
This is incorrect: similar language is in the C89 standard (though someone
quoted you the version in C99). It's 13 years old.
> Neither is deoptimizing the code in a manner that results in
> not taking advantage of this feature of the standard.
>
> -fno-strict-aliasing is precicsely meant to deal with ":massive
> amounts of legacy code written before the aliasing o[ptimziations were devised".
> Why should you be reluctant to use it.
>
> Mind you, the code we are talking about here is not "massive amounts of legacy
> code written before ...", but jsut one program with an obvious bug
> that is easily fixed!
Can any folks from Red Hat or elsewhere comment on how many violations
they found when they first switched to compilers that implement
strict-aliasing by default?