Consider this code sample:

namespace N
{
 int foo;
}

int bar()
{
 return foo;
}


GCC, generates the following error:

tst.cc: In function ‘int bar()’:
tst.cc:8:10: error: ‘foo’ was not declared in this scope

It would be nice if it suggested that the user might mean N::foo.


-- 
           Summary: Suggest likely nested-name-specifiers for undeclared
                    identifiers.
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: aaw at gcc dot gnu dot org


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

Reply via email to