On 03/17/2016 03:35 PM, Jakub Jelinek wrote:
_Jv_AllocObject returns a pointer, and as the testcase below shows, we easily ICE if a wrong prototype is provided for it instead. There is already other diagnostics (e.g. when it is missing, or when it is overloaded function), so this ensures at least the return type is sane.
OK.
Wonder about all the other spots where the C++ FE relies on user prototypes for __cxa* etc. functions, perhaps some sanity checking will be needed too to avoid ICEs on invalid stuff.
I think the compiler generates internal declarations for all the __cxa* functions. We've run into issues with broken definitions of std::initializer_list, but we have sanity checks on that now.
Jason