For this C++ example:

using namespace std;

ifstream  x;
ifstream  y();

int main(int argc, char** argv) {
  return 0;
}

current mainline g++ says this:

foo.cc:3: error: ‘ifstream’ does not name a type
foo.cc:4: error: ‘ifstream’ does not name a type

ifstream not only does not name a type, it is not defined at all in any way. 
Let's say that instead of leading the user into trying to figure out what is
wrong with ifstream.

foo.cc:3: error: ‘ifstream’ not defined


-- 
           Summary: C++ "does not name a type" error message can be
                    misleading
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ian at airs dot com


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

Reply via email to