http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60894
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-04-22 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Marcel Loose from comment #0) > It seems as if the compiler thinks I'm forward declaring > another struct S inside the declaration of D::doIt(). Not inside the declaration, but at global scope. That's what happens if you use an elaborated-type-specifier such as "struct S" in a function declaration and the type has not been declared previously (meaning the "struct" keyword is not necessarily redundant in a function declaration). In this case name lookup in the parameter-declaration-clause should find D::S rather than introducing a new type.