http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48835

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org

--- Comment #9 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-06-13 
21:16:20 UTC ---
> - __gnat_malloc is defined in Ada to return Address (integer, so in d0), but
> it's called from a couple of places via fake "extern" declarations that 
> pretend
> it returns void* (pointer, so in a0).  The attached patch fixes the two call
> sites affected (in Interfaces.C.Strings and build_call_alloc_dealloc), as well
> as the internal fake prototype (init_gigi_decls).
> - Source code inspection showed that get_jmpbuf_address probably suffers from
> the same issue (mismatching decl and use via wrong intermediate fake 
> prototype)
> so I fixed that too.

I don't think that we want __gnat_malloc to return anything else than a pointer
in the GCC representation.  Its DECL node is DECL_IS_MALLOC and had better
mimic a canonical malloc as much as possible.

Andreas mentioned a compatibility trick in comment #6.  How is it implemented?

Reply via email to