This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/52959] New: Missing typo suggestions


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52959

             Bug #: 52959
           Summary: Missing typo suggestions
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: xinliangli@gmail.com


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.

*/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]