This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: type based aliasing again
- To: artem at duma dot gov dot ru
- Subject: Re: type based aliasing again
- From: Richard Stallman <rms at gnu dot org>
- Date: Sun, 19 Sep 1999 14:53:07 -0600 (MDT)
- CC: gcc at gcc dot gnu dot org
- References: <00d501bf01b9$dc677b10$545a9090@uito-nt-server.duma.gov.ru>
- Reply-to: rms at gnu dot org
The very idea that compiler should make an educated guess and decide
which options to apply to my code gives me shudder.
No one has proposed this.
The software should
do what I say, no more and no less.
The issue here is with cases where it takes some interpretation to
decide what the code "says". There is more than one legitimate
interpretation, and the question is, should we make a certain effort
to choose the one that the code's author probably had in mind.
In my experience, the smarter software is, the closer it is to
becoming unusable.
I agree with you, for some questions--I think it is bad for software to
be written based on the assumption that it is smarter than the user
who is operating it, or to disbelieve that the user means what he says.
When the input has a clear meaning, software should obey it.
But the C language is such that not every program has a clearly
defined meaning. Using a little intelligence to figure out what
the code probably meant is not disobedience, it is a more careful
kind of obedience.