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



> My comment is similar to Mark's comment.  Documentation, what can we
> document as working?  Can users rely upon it working?

You misunderstood.  I am not proposing a language extension.  I am
proposing trying to detect that the user is breaking the rules.  If
we catch him, we issue a warning and declare that there is aliasing.
If we don't catch him, the user may lose.  If the user wants to
be assured of winning, she must follow ANSI rules.

(The original idea started in a discussion with RMS, so I shouldn't say
"I" here, but then I am currently writing this, not him).

> Is it less confusing to a user to have the compiler predictably
> generate wrong code, or for it to almost always generate right code,
> even for bad code, except in really obscure and hard to understand
> cases?

In this case, most users don't even know the rule, so they can't predict
that the compiler will generate wrong code.

> Anway, more questions from me than answers...  Off hand though, if we
> can make the compiler generate `right' code in more cases, even if the
> users code is wrong, I think we should probably do it.

Good, we agree.



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