This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32190] New: bad diagnostic
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jun 2007 19:58:47 -0000
- Subject: [Bug c++/32190] New: bad diagnostic
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This code:
template<typename T> class foo{ };
int main() {
foo<int> i;
foo<foo<int> j;
int k;
int l;
foo<int> m;
return 0;
}
gets you:
~/ootbc/sim/sandbox$ g++ foo.cc
foo.cc: In function 'int main()':
foo.cc:8: error: template argument 1 is invalid
foo.cc:8: error: invalid type in declaration before ';' token
~/ootbc/sim/sandbox$ fg
The real problem is a missing ">" three lines earlier.
--
Summary: bad diagnostic
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32190