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

2012-02-11 Thread Eric Botcazou
> Probably for Convention C, we should convert Address to *void. > > So, for > >function Alloc (Size : size_t) return System.Address; >pragma Export (C, Alloc, "__gnat_malloc"); > > we probably should do this replacement and add the necessary > type conversions. That would seem to be how

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

2012-02-11 Thread Geert Bosch
On Feb 11, 2012, at 05:37, Eric Botcazou wrote: > 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 > Sys

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

2012-02-11 Thread Eric Botcazou
> 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 h

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

2012-02-10 Thread Duncan Sands
Hi Eric, Can you try to extract a testcase (assuming it's just a single case?). We shouldn't warn for layout-compatible types (but we may do so if for example struct nesting differs). It's more basic than that: for example, we map pointers on the C side to addresses (integers) on the Ada side.

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

2012-02-10 Thread Eric Botcazou
> Can you try to extract a testcase (assuming it's just a single case?). > We shouldn't > warn for layout-compatible types (but we may do so if for example struct > nesting differs). It's more basic than that: for example, we map pointers on the C side to addresses (integers) on the Ada side. --

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

2012-02-08 Thread Richard Guenther
On Tue, Feb 7, 2012 at 10:11 PM, Eric Botcazou wrote: > This breaks LTO bootstrap because of warnings for apparently incompatible > types > at the interface between C and Ada.  Given that it's very likely not possible > to fix them all, let's keep accepting them. > > Tested on i586-suse-linux, ap