[cfe-dev] confusing diagnostic for extra qualification on member

Chris Lattner clattner at apple.com
Mon Jan 31 20:55:33 PST 2011


On Jan 31, 2011, at 4:39 PM, Robert Reif wrote:

> For this code:
> 
> class MyClass {
> public:
> MyClass::MyClass();
> };
> 
> g++ gives:
> 
> test.cpp:3: error: extra qualification ‘MyClass::’ on member ‘MyClass’
> 
> and comeau gives:
> 
> "ComeauTest.c", line 3: error: qualified name is not allowed in member declaration
>       MyClass::MyClass();
> 
> but clang++ gives:
> 
> test.cpp:3:22: error: expected member name or ';' after declaration 
> specifiers
> MyClass::MyClass();
> ~~~~~~~~~~~~~~~~ ^
> 1 error generated.

Hi Robert,

Please file a bug in bugzilla, this is serious QoI issue.

-Chris



More information about the cfe-dev mailing list