This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Linux and aliasing?
From: mark@codesourcery.com
Date: Mon, 07 Jun 1999 08:05:31 -0700
We've had -fstrict-aliasing on in the tree for a long time, and had
very few bugs that we tracked down to the kind of thing you are
talking about. But, admittedly, we haven't yet had it on in a
general release, so it's a relatively small sample size.
True.
One issue which seems to not be mentioned explicitly, is that such a
change is typically not of the "flag day" variety, which turning it on
for the next release seems to imply.
Other compiler vendors seem to have done it in two stages:
1) Ok, the strict aliasing is there, but not a default optimization,
you have to enable it explicitly. But come next release it will be
on by default and thus you have ample time to fixup your code.
2) It's on by default in this new subsequent release, we warned you.
The time between two compiler releases is more than sufficient time
for both ends of the equation (the compiler and it's users) to work
out the issue.
Compiler vendors who have done this typically are often the default
compiler for a single system. For EGCS we know of at least 4 whole
systems (Linux and the 3 publicly available BSD variants) which use
gcc as the default compiler.
Later,
David S. Miller
davem@redhat.com