This is the mail archive of the
mailing list for the GCC project.
Re: PR 6212
- From: dewar at gnat dot com (Robert Dewar)
- To: kenner at vlsi1 dot ultra dot nyu dot edu, mark at codesourcery dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 8 May 2002 10:34:00 -0400 (EDT)
- Subject: Re: PR 6212
> The type of a pointer is -- in your average type system -- purely
> dependent on the type pointed to by the pointer. To say it points to
> one kind of type, but another kind of object, is to have substantially
> enrichened your type system in a way that is not clearly beneficial.
I think you mean something like "representation of a pointer and allowable
operations". Obviously the statement you gave is not true in any language
with name equivalence of types. For example in Ada
type A is access Integer;
type B is access Integer;
describe two quite different types (and indeed in Ada you cannot even
assign one to the other, since these might be separate storage pools).
Even if you force interconvertability
type A is access all Integer;
type B is access all Integer;
they are still quite different types.