AaronBallman wrote:

> > FWIW the GCC doc is 
> > https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstrict-aliasing_003dn
> >  It says for Level 3 "If optimization is enabled, it also runs in the back 
> > end, where it deals with multiple statement cases using flow-sensitive 
> > points-to information."
> > Do you know how it works? Any example?
> I do not now how it works -- didn't go poking there. Neither do I have 
> examples.

My understanding (which could be totally wrong) is that the logic for when to 
emit the level 3 diagnostics rests mostly in the optimizer passes. This is not 
something I think Clang should emulate as it creates a very poor user 
experience in practice (not just with strict aliasing diagnostics -- I don't 
think *any* diagnostics other than remarks should be emitted based on LLVM 
optimization decisions aside from the `error` and `warning` attributes which 
are special circumstances).

cfe-commits mailing list

Reply via email to