Re: RFC: Support non-standard extension (call via casted function pointer)
Jeff Law writes: > I know someone (probably Andreas) with some work was able to get GCC > working with Ada. However, they didn't push to get all those changes > upstreamed. See PR48835. The Ada situation is even worse, it doesn't even try to cast the (wrongly declared) function to the correct type before calling it. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Re: RFC: Support non-standard extension (call via casted function pointer)
> See PR48835. The Ada situation is even worse, it doesn't even try to > cast the (wrongly declared) function to the correct type before calling > it. How could it, since it doesn't know the correct type of the function? The way out is to change the type of the function on the Ada side, as explained in: https://gcc.gnu.org/ml/gcc-patches/2012-02/msg00556.html so this is largely unrelated to the problem at stake in this thread. As for PR ada/48835, the incentive to bite the bullet was low until recently, but it turns out that the polymorphism pointer/address is also problematic for LTO on all architectures so we'll probably give it a try for GCC 7. -- Eric Botcazou
Re: RFC: Support non-standard extension (call via casted function pointer)
Eric Botcazou writes: >> See PR48835. The Ada situation is even worse, it doesn't even try to >> cast the (wrongly declared) function to the correct type before calling >> it. > > How could it, since it doesn't know the correct type of the function? What about the prototype in raise.h? Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Re: RFC: Support non-standard extension (call via casted function pointer)
> What about the prototype in raise.h? Yes, the C side knows the type, but not the Ada side, that's the problem. -- Eric Botcazou
Re: RFC: Support non-standard extension (call via casted function pointer)
Eric Botcazou writes: >> What about the prototype in raise.h? > > Yes, the C side knows the type, but not the Ada side, that's the problem. ??? Since they must agree they are the same. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."