This is the mail archive of the gcc-patches@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: Patch: New implementation of -Wstrict-aliasing


> 
> On Sat, Jan 20, 2007 at 08:43:06PM -0800, Ian Lance Taylor wrote:
> > I believe that this warning is an example of those which can not be
> > emitted from the frontends.
> 
> Could you give me a rough estimate of the amount of optimization
> required for this warning?  i.e. in a hypothetical world where we
> use SSA at -O0, how expensive would it be to do the necessary analysis?

Technically this warning already requires optimization to warn.  In fact
even at -O1, we don't warn.  Maybe what I am requesting is the obvious
aliasing violations, the ones which dereference a cast from an address,
be warned in the front-end and the rest warned in the middle-end.  This
is needed as the VIEW_CONVERT_EXPR optimization happens during gimplification
so by the time we get to this pass, the alasing violation is no longer
there.

Thanks,
Andrew Pinski


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