[cfe-commits] [QUESTION] - funky declaration

Douglas Gregor dgregor at apple.com
Mon Jul 26 16:16:42 PDT 2010


On Jul 26, 2010, at 4:07 PM, John Thompson wrote:

> Could someone comment on bug 7035.  Is it a legitimate problem?:
>  
> namespace A {
>     void f();
> }
> extern void A::f();
> 
> clang -cc1 extqual.cpp
> extqual.cpp:4:16: error: out-of-line declaration of a member must be a
> definition
> extern void A::f();
>             ~~~^
> 
> This compiles in gcc.  It appears gcc allows a lot of things I wouldn't expect.

This seems to be a GCC extension. IIRC, Chandler was planning to downgrade this error to a warning.

	- Doug



More information about the cfe-commits mailing list