This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [Ada] Do not pass -Werror during linking


> is having Address be an integer useful any more?  Nowadays it should be
> possible to declare Address to be an access type with no associated storage
> pool.  Even nicer might be to have it be turned into void* when lowering to
> GCC types. After all, Address is really used much like void*; see how GNAT
> declares malloc for example.  Both of these possibilities would probably
> play better with GCC's middle end type system, which considers integers to
> be different to pointers.

The polymorphism pointer/address indeed proves to be problematic in certain 
circumstances (e.g. it breaks on m68k, see PR ada/48835).  My understanding is 
that using pointers in Ada is heavyweight, hence the choice of an integer for 
System.Address; and I'm reluctant to enter the type morphing business in gigi.

But we could investigate changing System.Memory to use an access type instead 
of System.Address.  It's a compiler unit so the impact should be limited, and 
at least this would solve the m68k problem.

-- 
Eric Botcazou


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