This is the mail archive of the
mailing list for the GCC project.
Re: Some strict aliasing related fun
Raymond Sheh wrote:
> > Specifying -fsome-optimization without an n >= 0 level of -On is a
> > no-op. In other words, optimization must be enabled in order to do any
> > optimization.
I meant > 0 here, as -O0 means no optimization.
> This is all being tested on pretty much a standard Kubuntu 7.10 (Gutsy
> Gibbon) install using the distro's GCC packages ... perhaps is there
> some way of seeing what the defaults are set to? Is it possible that for
> some reason some optimisation level (below -O1, if there is such a
> thing) is enabled by default?
If you don't specify any -O the default is -O0, which is no
I don't know why you are able to also trigger a failure without
optimizations just by giving -fstrict-aliasing -fschedule-insns, but
it's kind of beside the point since combining source that violates the
aliasing rules with -fstrict-aliasing is just setting yourself up for
failure, regardless of the details.