This is the mail archive of the
mailing list for the GCC project.
Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
> Well, while the effect of -fstrict-aliasing is hard to describe
> (TBAA _is_ a complex part of the standard), -fno-strict-aliasing
> rules are simple. All loads and stores alias each other if they
> cannot be proven not to alias by points-to analysis.
Yes, the rules are "simple", but are written in terms of OPTIMIZATIONS, not
of language concepts: you can't talk about "points-to-analysis" in a language
In other words, -fwrapv says that we are modifying the language semantics to
define signed overflows as wrapping and this will have effects on the
optimizer (so the language effect is primary), while -fno-strict-aliasing
says what the optimizer will do and hence how we're modifying the language
(meaning the optimizer effect is primary).
There's isn't that big a difference here, admittedly and I agree that it's
unfortunate that we do this for strict aliasing, but I doing it for -fwrapv
would be even worse for the above reason.