public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12132] New: [3.4 regression] spurious "int ._0" in error message
@ 2003-09-02 13:52 reichelt at gcc dot gnu dot org
2003-09-02 17:01 ` [Bug c++/12132] " reichelt at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2003-09-02 13: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=12132
Summary: [3.4 regression] spurious "int ._0" in error message
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Keywords: diagnostic
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
Compiling the invalid code snippet
--------------------------------------------
inline template <int> void foo () {}
--------------------------------------------
with mainline, I get the following error message:
bug.cc:1: error: expected unqualified-id
bug.cc:1: error: ISO C++ forbids declaration of `type name' with no type
bug.cc:1: error: abstract declarator `int' used as declaration
bug.cc:1: error: explicit instantiation of non-template `int ._0'
bug.cc:1: error: expected `;'
which is bogus. The worst part is "int ._0" which is nowhere to be
seen in the code. The rest isn't very helpful either.
Previous versions of gcc just gave a simple
bug.cc:1: error: parse error before `<' token
which isn't very elaborate, but not as confusing as mainline's message.
Btw, 3.3 branch issues an ICE when compiling the following code
(one can use any name of a builtin instead of abort):
--------------------------------------------
inline template <int> void foo () {}
void abort ();
--------------------------------------------
The error message then is:
bug.cc:1: error: parse error before `<' token
bug.cc:3: internal compiler error: in lookup_template_function, at
cp/pt.c: 4002
Please submit a full bug report, [etc.]
But since this is an error-recovery problem which is fixed on mainline,
there's nothing more to do about the ICE.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/12132] [3.4 regression] spurious "int ._0" in error message
2003-09-02 13:52 [Bug c++/12132] New: [3.4 regression] spurious "int ._0" in error message reichelt at gcc dot gnu dot org
@ 2003-09-02 17:01 ` reichelt at gcc dot gnu dot org
2003-09-02 19:53 ` bangerth at dealii dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2003-09-02 17:01 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=12132
------- Additional Comments From reichelt at gcc dot gnu dot org 2003-09-02 17:01 -------
*** Bug 12135 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/12132] [3.4 regression] spurious "int ._0" in error message
2003-09-02 13:52 [Bug c++/12132] New: [3.4 regression] spurious "int ._0" in error message reichelt at gcc dot gnu dot org
2003-09-02 17:01 ` [Bug c++/12132] " reichelt at gcc dot gnu dot org
@ 2003-09-02 19:53 ` bangerth at dealii dot org
2003-09-02 20:56 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2003-09-02 19: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=12132
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-09-02 19:53:12
date| |
------- Additional Comments From bangerth at dealii dot org 2003-09-02 19:53 -------
Correct.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/12132] [3.4 regression] spurious "int ._0" in error message
2003-09-02 13:52 [Bug c++/12132] New: [3.4 regression] spurious "int ._0" in error message reichelt at gcc dot gnu dot org
2003-09-02 17:01 ` [Bug c++/12132] " reichelt at gcc dot gnu dot org
2003-09-02 19:53 ` bangerth at dealii dot org
@ 2003-09-02 20:56 ` pinskia at gcc dot gnu dot org
2003-09-07 5:03 ` [Bug c++/12132] [3.4 regression] spurious "int ._0" (or "int $_0) " pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-02 20:56 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=12132
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-02 20:56 -------
Related to bug 6259 and bug 9050.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/12132] [3.4 regression] spurious "int ._0" (or "int $_0) in error message
2003-09-02 13:52 [Bug c++/12132] New: [3.4 regression] spurious "int ._0" in error message reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2003-09-02 20:56 ` pinskia at gcc dot gnu dot org
@ 2003-09-07 5:03 ` pinskia at gcc dot gnu dot org
2003-12-20 20:34 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-07 5:03 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=12132
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2003-09-02 19:53:12 |2003-09-07 05:03:29
date| |
Summary|[3.4 regression] spurious |[3.4 regression] spurious
|"int ._0" in error message |"int ._0" (or "int $_0) in
| |error message
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-07 05:03 -------
On the mainline (20030907) on PPC Darwin, gcc gives a silightly different error
message:
pr12132.cc:2: error: expected unqualified-id
pr12132.cc:2: error: ISO C++ forbids declaration of `type name' with no type
pr12132.cc:2: error: abstract declarator `int' used as declaration
pr12132.cc:2: error: explicit instantiation of non-template `int $_0'
pr12132.cc:2: error: expected `;'
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/12132] [3.4 regression] spurious "int ._0" (or "int $_0) in error message
2003-09-02 13:52 [Bug c++/12132] New: [3.4 regression] spurious "int ._0" in error message reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2003-09-07 5:03 ` [Bug c++/12132] [3.4 regression] spurious "int ._0" (or "int $_0) " pinskia at gcc dot gnu dot org
@ 2003-12-20 20:34 ` pinskia at gcc dot gnu dot org
2004-01-04 23:14 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-20 20:34 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12132
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/12132] [3.4 regression] spurious "int ._0" (or "int $_0) in error message
2003-09-02 13:52 [Bug c++/12132] New: [3.4 regression] spurious "int ._0" in error message reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2003-12-20 20:34 ` pinskia at gcc dot gnu dot org
@ 2004-01-04 23:14 ` mmitchel at gcc dot gnu dot org
2004-01-05 21:07 ` cvs-commit at gcc dot gnu dot org
2004-01-05 21:08 ` mmitchel at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-01-04 23:14 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12132
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/12132] [3.4 regression] spurious "int ._0" (or "int $_0) in error message
2003-09-02 13:52 [Bug c++/12132] New: [3.4 regression] spurious "int ._0" in error message reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-01-04 23:14 ` mmitchel at gcc dot gnu dot org
@ 2004-01-05 21:07 ` cvs-commit at gcc dot gnu dot org
2004-01-05 21:08 ` mmitchel at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-05 21:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-01-05 21:07 -------
Subject: Bug 12132
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2004-01-05 21:07:22
Modified files:
gcc/cp : ChangeLog parser.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/template: error11.C
Log message:
PR c++/12132
* parser.c (cp_parser_explicit_instantiation): Improve error
recovery.
(cp_parser_require): Improve indication of the error location.
PR c++/12132
* g++.dg/template/error11.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3855&r2=1.3856
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.146&r2=1.147
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3337&r2=1.3338
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/error11.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12132
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/12132] [3.4 regression] spurious "int ._0" (or "int $_0) in error message
2003-09-02 13:52 [Bug c++/12132] New: [3.4 regression] spurious "int ._0" in error message reichelt at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-01-05 21:07 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-05 21:08 ` mmitchel at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-01-05 21:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-01-05 21:08 -------
Fixed in GCC 3.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12132
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-01-05 21:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-02 13:52 [Bug c++/12132] New: [3.4 regression] spurious "int ._0" in error message reichelt at gcc dot gnu dot org
2003-09-02 17:01 ` [Bug c++/12132] " reichelt at gcc dot gnu dot org
2003-09-02 19:53 ` bangerth at dealii dot org
2003-09-02 20:56 ` pinskia at gcc dot gnu dot org
2003-09-07 5:03 ` [Bug c++/12132] [3.4 regression] spurious "int ._0" (or "int $_0) " pinskia at gcc dot gnu dot org
2003-12-20 20:34 ` pinskia at gcc dot gnu dot org
2004-01-04 23:14 ` mmitchel at gcc dot gnu dot org
2004-01-05 21:07 ` cvs-commit at gcc dot gnu dot org
2004-01-05 21:08 ` 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).