This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18724] New: missleading error message with undeclared template name
- From: "belz at kolumbus dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Nov 2004 18:13:59 -0000
- Subject: [Bug c++/18724] New: missleading error message with undeclared template name
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
std::list<int> foo();
$ g++ error.cpp
error.cpp:2: error: expected constructor, destructor, or type conversion before
'<' token
This is missleading as mostly the case is that 'list' is just not declared.
I guess the issue should be handled similar to the case that the declaration
would be in a function scope (when the error message is sane). However quick and
not so good fix is also possible directly to parser (I experimented a bit and
was able to have error message that is a bit clearer).
This particular error message have been after the new parser was introduced, the
old error message was even worse.
Mikael
--
Summary: missleading error message with undeclared template name
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: belz at kolumbus dot fi
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18724