struct BaseType {}; struct DerivedType : public BaseType { static int base_type; DerivedType() : basetype() {} }; /* typo1.cpp:4:19: error: initializer 'basetype' does not name a non-static data member or base class; did you mean the base class 'BaseType'? DerivedType() : basetype() {} ^~~~~~~~ BaseType typo1.cpp:2:22: note: base class 'BaseType' specified here struct DerivedType : public BaseType { ^~~~~~~~~~~~~~~ 1 error generated. */ namespace fiz { namespace bang { int foobar(); } } int test() { return bang::Foobar(); } /* typo2.cpp:5:10: error: use of undeclared identifier 'bang'; did you mean 'fiz::bang'? return bang::Foobar(); ^~~~ fiz::bang typo2.cpp:1:27: note: 'fiz::bang' declared here namespace fiz { namespace bang { ^ typo2.cpp:5:16: error: no member named 'Foobar' in namespace 'fiz::bang'; did you mean 'foobar'? return bang::Foobar(); ~~~~~~^~~~~~ foobar typo2.cpp:2:7: note: 'foobar' declared here int foobar(); ^ 2 errors generated. */
I think this is the same as http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52277 .
(In reply to comment #1) > I think this is the same as http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52277 . No, this is a bit more complex than a simple spell-checker. (Although the bang::foobar is probably easy to implement).
I for one would love to have this (and PR52277) but I cannot commit the amount of time/work needed to make this work. Pretty please, could someone implement it? Marek, Paolo, Google guys?
This is a rather unhelpful bug report. For anybody else wondering what the OP is actually saying: the commented-out errors in the original report show clang's output, and the request is that GCC should do something similar.