This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: type based aliasing again
- To: law at cygnus dot com
- Subject: Re: type based aliasing again
- From: Richard Stallman <rms at gnu dot org>
- Date: Thu, 16 Sep 1999 02:25:08 -0400
- CC: dje at watson dot ibm dot com, mark at codesourcery dot com, jbuck at synopsys dot com, mrs at wrs dot com, gcc at gcc dot gnu dot org
- References: <2320.937209389@upchuck.cygnus.com>
- Reply-to: rms at gnu dot org
> Changing the default to -fno-strict-aliasing would certainly solve the
> immediate problem.
I strongly feel this is the wrong approach.
It penalizes those programmers who write correct code to cater to
the programmers that do not write correct code.
Whether this is good or bad depends on how much penalty it causes for
the one group, and how painful a problem we cater to for the other.
Having programs run a little more slowly is a small problem, in most
cases, whereas having them not work at all or produce wrong results is
a serious problem.
The way you have stated the issue neglects this disparity, and
implicitly argues for an absolutist policy which disregards it. That
cannot possibly be right. We should not make GCC decisions that way.
When we consider at the severity of these two disadvantages, the
proposal to change the default comes out reasonable. But there
remains the other alternative that I proposed. It would cause no
significant slowdown in the execution of valid standard C programs.