public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12762] New: [3.4 regression] Much worse error message when using a typedef with a template arg
@ 2003-10-24 15:51 bangerth at dealii dot org
2003-10-24 15:53 ` [Bug c++/12762] " bangerth at dealii dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: bangerth at dealii dot org @ 2003-10-24 15:51 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12762] [3.4 regression] Much worse error message when using a typedef with a template arg
2003-10-24 15:51 [Bug c++/12762] New: [3.4 regression] Much worse error message when using a typedef with a template arg bangerth at dealii dot org
@ 2003-10-24 15:53 ` bangerth at dealii dot org
2003-10-24 16:52 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bangerth at dealii dot org @ 2003-10-24 15:53 UTC (permalink / raw)
To: gcc-bugs
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
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12762] [3.4 regression] Much worse error message when using a typedef with a template arg
2003-10-24 15:51 [Bug c++/12762] New: [3.4 regression] Much worse error message when using a typedef with a template arg bangerth at dealii dot org
2003-10-24 15:53 ` [Bug c++/12762] " bangerth at dealii dot org
@ 2003-10-24 16:52 ` pinskia at gcc dot gnu dot org
2003-10-30 6:08 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-24 16:52 UTC (permalink / raw)
To: gcc-bugs
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
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-10-24 16:51:42
date| |
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-24 16:51 -------
Confirmed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12762] [3.4 regression] Much worse error message when using a typedef with a template arg
2003-10-24 15:51 [Bug c++/12762] New: [3.4 regression] Much worse error message when using a typedef with a template arg bangerth at dealii dot org
2003-10-24 15:53 ` [Bug c++/12762] " bangerth at dealii dot org
2003-10-24 16:52 ` pinskia at gcc dot gnu dot org
@ 2003-10-30 6:08 ` pinskia at gcc dot gnu dot org
2003-11-14 18:37 ` cvs-commit at gcc dot gnu dot org
2003-11-14 18:42 ` mmitchel at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-30 6:08 UTC (permalink / raw)
To: gcc-bugs
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
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-30 06:06 -------
Looks like this is related to PR 10771.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12762] [3.4 regression] Much worse error message when using a typedef with a template arg
2003-10-24 15:51 [Bug c++/12762] New: [3.4 regression] Much worse error message when using a typedef with a template arg bangerth at dealii dot org
` (2 preceding siblings ...)
2003-10-30 6:08 ` pinskia at gcc dot gnu dot org
@ 2003-11-14 18:37 ` cvs-commit at gcc dot gnu dot org
2003-11-14 18:42 ` mmitchel at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-11-14 18:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-11-14 18:37 -------
Subject: Bug 12762
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2003-11-14 18:37:40
Modified files:
gcc/cp : ChangeLog parser.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/template: error3.C
Log message:
PR c++/12762
* parser.c (cp_parser_enclosed_template_argument_list): New
function.
(cp_parser_template_id): Use it.
(cp_parser_simple_type_specifier): Recognize invalid template
syntax.
PR c++/12762
* g++.dg/template/error3.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3760&r2=1.3761
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.120&r2=1.121
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3193&r2=1.3194
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/error3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12762
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12762] [3.4 regression] Much worse error message when using a typedef with a template arg
2003-10-24 15:51 [Bug c++/12762] New: [3.4 regression] Much worse error message when using a typedef with a template arg bangerth at dealii dot org
` (3 preceding siblings ...)
2003-11-14 18:37 ` cvs-commit at gcc dot gnu dot org
@ 2003-11-14 18:42 ` mmitchel at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-11-14 18:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2003-11-14 18:42 -------
Fixed in GCC 3.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12762
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-11-14 18:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-24 15:51 [Bug c++/12762] New: [3.4 regression] Much worse error message when using a typedef with a template arg bangerth at dealii dot org
2003-10-24 15:53 ` [Bug c++/12762] " bangerth at dealii dot org
2003-10-24 16:52 ` pinskia at gcc dot gnu dot org
2003-10-30 6:08 ` pinskia at gcc dot gnu dot org
2003-11-14 18:37 ` cvs-commit at gcc dot gnu dot org
2003-11-14 18:42 ` mmitchel at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).