https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88482

            Bug ID: 88482
           Summary: ICE when wrongly declaring __cxa_allocate_exception
           Product: gcc
           Version: 7.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rv at rasmusvillemoes dot dk
  Target Milestone: ---

This causes an ICE:

#include <string>

extern "C" void __cxa_allocate_exception(std::size_t size);

int f(int x)
{
        if (x > 27)
                throw 19;
        return x+3;
}

Changing to the correct "void*" works as expected. This is arguably a "Don't do
that then", but perhaps there's some simple way to turn the ICE into a more
explicit error, a la Werror=builtin-declaration-mismatch.

Reply via email to