This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12762] New: [3.4 regression] Much worse error message when using a typedef with a template arg
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Oct 2003 15:51:33 -0000
- Subject: [Bug c++/12762] New: [3.4 regression] Much worse error message when using a typedef with a template arg
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12762
Summary: [3.4 regression] Much worse error message when using a
typedef with a template arg
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bangerth at dealii dot org
CC: gcc-bugs at gcc dot gnu dot org,gdr at gcc dot gnu dot
org
This came out of PR 12507. Consider this code:
-------------------
template <typename> struct A { A() {}};
typedef A<int> Ac;
Ac<double> a;
-------------------
The fact the gcc3.3 accepts this is covered by PR 12507, but look
at the error message from 3.2.3 and present mainline:
g/x> /home/bangerth/bin/gcc-3.2.3/bin/c++ -c x.cc
x.cc:3: non-template type `Ac' used as a template
x.cc:3: ISO C++ forbids declaration of `a' with no type
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc:3: error: expected unqualified-id
x.cc:3: error: expected `,' or `;'
This is definitely a regression in quality of error reporting.
W.