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: PATCH: `__norestrict' type qualifier


>>>>> "Linus" == Linus Torvalds <torvalds@transmeta.com> writes:

    Linus> On Sat, 17 Jul 1999, Mark Mitchell wrote:
    >>  My recollection, although it's getting foggy at this point,
    >> was that we had come up with (gradually) a macro that allowed
    >> unsafe casts, must as your __norestrict qualifier would.  As I
    >> recall, this macro depended on the (documented) aspect of GCC's
    >> behavior whereby type-puns via a union are allowed.

    Linus> Right. So the macro was technically no better than the
    Linus> patch. But with the patch, the syntax is nicer (and you can
    Linus> have unrestricted variables - something the macro doesn't
    Linus> allow: instead of saying that a particular place plays
    Linus> games with the type system, you can say that a particular
    Linus> pointer has been played with).

That is indeed an advantage.  I wasn't so much dismissing the patch,
as trying to clarify where exactly it stood: what were it's benefits
and weaknesses.

I've not yet made up my mind.  However, since the thing expressed by
__norestrict is already expressible, I'm not particularly inclined to
add yet another extension.  Also, the syntax, while marginally more
pleasant is less likely to be implementable with other compilers; the
UNSAFE_CAST macro could probably be implemented (perhaps in a way
different than done with GCC) to work on a variety of systems.

Let's not try to decide this right away.  Let's think a little, get
2.95 out the door, and then think some more.

    Linus> Don't be so negative about the patch just because I was too
    Linus> eager and too un-politic in my initial postings.

I always judge patches on their merit, not in any way on who might
initially have advocated them.  If I am negative about this patch, you
may rest assured that the reasons you cite will not play a role.

Your apology, however, was very gracious.  Thank you.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


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