hhinnant at apple.com
Thu Jan 19 10:25:47 PST 2012
On Jan 19, 2012, at 12:39 PM, John McCall wrote:
>> I'm willing to file a bug on this, but I wanted to get guidance here first.
> That is absolutely a bug that we should fix.
>> g++-4.2 refuses to compile the code that malfunctions, and thus never gets into this situation.
> Because it catches a reference to incomplete type? Rejecting this is not allowed.
The compiler is required to issue a diagnostic because the code is ill-formed (clang does issue a warning):
> The exception-declaration in a handler describes the type(s) of exceptions that can cause that handler to be entered. The exception-declaration shall not denote an incomplete type, an abstract class type, or an rvalue reference type. The exception-declaration shall not denote a pointer or reference to an incomplete type, other than void*, const void*, volatile void*, or const volatile void*.
More information about the cfe-dev