This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: type based aliasing again
- To: jbuck at synopsys dot com
- Subject: Re: type based aliasing again
- From: Richard Stallman <rms at gnu dot org>
- Date: Sat, 11 Sep 1999 03:24:09 -0400
- CC: mrs at wrs dot com, gcc at gcc dot gnu dot org, jbuck at synopsys dot com
- References: <199909100708.AAA00030@atrus.synopsys.com>
- Reply-to: rms at gnu dot org
While I have some sympathy for that point of view, the reason that
the type aliasing rules were added was to give scientific programmers
what they were asking for: C that runs about as fast as Fortran.
We should certainly make of these rules to generate faster code. But
while we do this, we can still look for ways to keep old code working
right--when we find ways to do this with little pain and little cost.
I don't want to break users' code when we can TELL what they mean,
and many examples seem to fall into that category. But where we
can't tell, we have to either exploit the ISO rules (e.g. -fstrict-alias)
or not (-fno-strict-alias).
When we can't easily tell "what was meant", I think we should take
advantage of the ISO rules, and carry out the optimizations that are
possible.
In the end, if your argument is carried too far, the only solution
would be to make -fno-strict-alias the default.
The whole point of this idea is that we don't try to carry the idea
too far--just a certain amount. What we need here is moderation; we
need to find the balance between the various goals that matter to the
users.