This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/39729] C++ "does not name a type" error message can be misleading
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Apr 2009 18:24:40 -0000
- Subject: [Bug c++/39729] C++ "does not name a type" error message can be misleading
- References: <bug-39729-1313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2009-04-16 18:24 -------
First there are a couple of issues here:
1) accepts invalid code:
using namespace std;
2)
>foo.cc:3: error: ?ifstream? does not name a type
Yes that should change if ifstream is not defined at all but we still want to
give the error message we currently give for:
int ifstream;
ifstream x;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39729