This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: type based aliasing again



 Richard Stallman <rms@gnu.org> wrote:

>>    Like it or not, people will come to depend on this feature, 
>
>My proposal is not a feature.  When you call it a "feature", you're
>not considering the proposal I made.
>
>The argument about "people depending on this" is flawed
>in the idea that such dependency would be due to my proposal.
>It has already happened, and it is still happening.
>
>People already depend on the invalid code we are talking about.  It
>exists in various programs today.


Sorry but I couldn't refrain from joining the discussion.

You are substituting arguments here. People already depend on 
their invalid code being correctly compiled by gcc 2.7.2. Gcc 2.95 
breaks the code, there is nothing to depend on. With your proposal, 
people will come to depend on future versions of gcc fixing their code. 
(and this will encourage them to write invalid code again and again). 

>People may also be writing more such code even today.  With GCC 2.95,
>such code will always work as expected if -O0 is used, and that may
>even be true if -O1 is used.
>
>In GCC 2.95, when -fstrict-aliasing is used, some of these cases work
>as expected, and some will not.  With my proposal, that would still be
>the overall situation.  The only difference would be that a larger
>fraction of them would work as expected.


As was already mentioned here, with slight changes in gcc internals, 
invalid code will break, sooner or later, but inevitably. And all effort 
spent to implement your proposal will be in vain.

>This difference would reduce the pain caused today, but as regards the
>potential problems you are worried about, it would not change things
>much.


This is like amputating dog's tail piece by piece, because it's too painful
to chop it off at once.


As someone have said on this list, there is about four people on earth who
know gcc internals well enough. And I, as gcc user, would prefer this people 
to spend their time fixing bugs in gcc rather than invalid user code.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]