public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12827] New: [3.4 regression] Bad message for forgotten comma in argument list
@ 2003-10-29 15:55 bangerth at dealii dot org
2003-10-29 16:00 ` [Bug c++/12827] " bangerth at dealii dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: bangerth at dealii dot org @ 2003-10-29 15:55 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=12827
Summary: [3.4 regression] Bad message for forgotten comma in
argument list
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
It took me a while until I saw the real bug in something significantly
larger than the following, but this shows it as well:
-------------------
void f(int x
int y);
-------------------
Note the forgotten comma at the end of the first line. Now, with
present mainline we get this:
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc:1: error: variable or field `f' declared void
x.cc:1: error: expected primary-expression
I kept wondering what the first line wanted to tell me, since of course
I had declared f as void. The second line of the error message is
also not helpful, since the real but can only be detected on the
second line of the program, i.e. in x.cc:2.
On the other hand, previous versions of gcc were more clear about the
reason:
g/x> c++ -c x.cc
x.cc:2: parse error before `int'
So I rate this as a regression.
W.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12827] [3.4 regression] Bad message for forgotten comma in argument list
2003-10-29 15:55 [Bug c++/12827] New: [3.4 regression] Bad message for forgotten comma in argument list bangerth at dealii dot org
@ 2003-10-29 16:00 ` bangerth at dealii dot org
2003-10-29 16:29 ` 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-29 16:00 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=12827
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12827] [3.4 regression] Bad message for forgotten comma in argument list
2003-10-29 15:55 [Bug c++/12827] New: [3.4 regression] Bad message for forgotten comma in argument list bangerth at dealii dot org
2003-10-29 16:00 ` [Bug c++/12827] " bangerth at dealii dot org
@ 2003-10-29 16:29 ` pinskia at gcc dot gnu dot org
2003-10-29 17:40 ` 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-29 16:29 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=12827
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-29 16:28 -------
Very closely related to bug 12160.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12827] [3.4 regression] Bad message for forgotten comma in argument list
2003-10-29 15:55 [Bug c++/12827] New: [3.4 regression] Bad message for forgotten comma in argument list bangerth at dealii dot org
2003-10-29 16:00 ` [Bug c++/12827] " bangerth at dealii dot org
2003-10-29 16:29 ` pinskia at gcc dot gnu dot org
@ 2003-10-29 17:40 ` pinskia at gcc dot gnu dot org
2003-12-17 17:01 ` cvs-commit at gcc dot gnu dot org
2003-12-17 17:03 ` 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-29 17:40 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=12827
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-29 17:14:26
date| |
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12827] [3.4 regression] Bad message for forgotten comma in argument list
2003-10-29 15:55 [Bug c++/12827] New: [3.4 regression] Bad message for forgotten comma in argument list bangerth at dealii dot org
` (2 preceding siblings ...)
2003-10-29 17:40 ` pinskia at gcc dot gnu dot org
@ 2003-12-17 17:01 ` cvs-commit at gcc dot gnu dot org
2003-12-17 17:03 ` 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-12-17 17:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-12-17 16:58 -------
Subject: Bug 12827
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2003-12-17 16:58:15
Modified files:
gcc/cp : ChangeLog parser.c
gcc/testsuite : ChangeLog
gcc/testsuite/g++.dg/parse: error3.C
Added files:
gcc/testsuite/g++.dg/parse: error6.C error7.C
Log message:
PR c++/10603
PR c++/12827
* parser.c (cp_parser_error): Help c_parse_error print good
messages if the next token is a keyword.
(cp_parser_parameter_declaration_list): When resynchronizing after
a bad parameter declaration, stop if a comma is found.
(cp_parser_parameter_declaration): Avoid backtracking.
PR c++/10603
* g++.dg/parse/error6.C: New test.
PR c++/12827
* g++.dg/parse/error7.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3815&r2=1.3816
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.135&r2=1.136
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3275&r2=1.3276
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/error6.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/error7.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/error3.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12827
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12827] [3.4 regression] Bad message for forgotten comma in argument list
2003-10-29 15:55 [Bug c++/12827] New: [3.4 regression] Bad message for forgotten comma in argument list bangerth at dealii dot org
` (3 preceding siblings ...)
2003-12-17 17:01 ` cvs-commit at gcc dot gnu dot org
@ 2003-12-17 17:03 ` mmitchel at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-12-17 17:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2003-12-17 17:00 -------
Fixed in GCC 3.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12827
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-12-17 17:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-29 15:55 [Bug c++/12827] New: [3.4 regression] Bad message for forgotten comma in argument list bangerth at dealii dot org
2003-10-29 16:00 ` [Bug c++/12827] " bangerth at dealii dot org
2003-10-29 16:29 ` pinskia at gcc dot gnu dot org
2003-10-29 17:40 ` pinskia at gcc dot gnu dot org
2003-12-17 17:01 ` cvs-commit at gcc dot gnu dot org
2003-12-17 17:03 ` 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).