public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16663] New: Poor error recovery
@ 2004-07-21 23:07 igodard at pacbell dot net
2004-07-22 0:18 ` [Bug c++/16663] " bangerth at dealii dot org
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: igodard at pacbell dot net @ 2004-07-21 23:07 UTC (permalink / raw)
To: gcc-bugs
void Foo(misspelled a, char b, bool c, float f);
gets you
foo.cc:1: error: variable or field `Foo' declared void
foo.cc:1: error: `misspelled' was not declared in this scope
foo.cc:1: error: expected primary-expression before "char"
foo.cc:1: error: expected primary-expression before "bool"
foo.cc:1: error: expected primary-expression before "float"
foo.cc:1: error: initializer expression list treated as compound expression
--
Summary: Poor error recovery
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16663
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/16663] Poor error recovery
2004-07-21 23:07 [Bug c++/16663] New: Poor error recovery igodard at pacbell dot net
@ 2004-07-22 0:18 ` bangerth at dealii dot org
2004-07-22 0:31 ` pinskia at gcc dot gnu dot org
2004-07-22 0:36 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 6+ messages in thread
From: bangerth at dealii dot org @ 2004-07-22 0:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-07-22 00:18 -------
That's a duplicate of another bug, maybe even one of mine. I gotta run now, though,
so maybe someone else wants to dig for it.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16663
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/16663] Poor error recovery
2004-07-21 23:07 [Bug c++/16663] New: Poor error recovery igodard at pacbell dot net
2004-07-22 0:18 ` [Bug c++/16663] " bangerth at dealii dot org
@ 2004-07-22 0:31 ` pinskia at gcc dot gnu dot org
2004-07-22 0:36 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-22 0:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-22 00:31 -------
It is related to bug 16151.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16663
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/16663] Poor error recovery
2004-07-21 23:07 [Bug c++/16663] New: Poor error recovery igodard at pacbell dot net
2004-07-22 0:18 ` [Bug c++/16663] " bangerth at dealii dot org
2004-07-22 0:31 ` pinskia at gcc dot gnu dot org
@ 2004-07-22 0:36 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-22 0:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-22 00:36 -------
Confirmed.
Another related bug is PR 15786.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2004-07-22 00:36:41
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16663
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/16663] Poor error recovery
[not found] <bug-16663-6594@http.gcc.gnu.org/bugzilla/>
2008-08-04 19:22 ` manu at gcc dot gnu dot org
@ 2008-08-04 19:23 ` manu at gcc dot gnu dot org
1 sibling, 0 replies; 6+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-04 19:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from manu at gcc dot gnu dot org 2008-08-04 19:22 -------
Created an attachment (id=16015)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16015&action=view)
testcase
Testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16663
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/16663] Poor error recovery
[not found] <bug-16663-6594@http.gcc.gnu.org/bugzilla/>
@ 2008-08-04 19:22 ` manu at gcc dot gnu dot org
2008-08-04 19:23 ` manu at gcc dot gnu dot org
1 sibling, 0 replies; 6+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-04 19:22 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]
------- Comment #4 from manu at gcc dot gnu dot org 2008-08-04 19:21 -------
In GCC 4.4 we have:
pr16663.C:2: error: variable or field Foo declared void
pr16663.C:2: error: misspelled was not declared in this scope
pr16663.C:2: error: expected primary-expression before char
pr16663.C:2: error: expected primary-expression before bool
pr16663.C:2: error: expected primary-expression before float
This is not easy to fix since that statement can be a function declaration but
also a variable declaration and initialization. We try to parse tentatively the
first case, fail, then we parse the second case and see that 'void' is not
allowed and that 'misspelled' is not declared.
If we have
int Bar(misspelled a, char b, bool c, float f);
then we get the full list of error messages:
pr16663.C:4: error: misspelled was not declared in this scope
pr16663.C:4: error: expected primary-expression before char
pr16663.C:4: error: expected primary-expression before bool
pr16663.C:4: error: expected primary-expression before float
pr16663.C:4: error: initializer expression list treated as compound expression
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2005-07-23 05:28:50 |2008-08-04 19:21:19
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16663
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-08-04 19:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-21 23:07 [Bug c++/16663] New: Poor error recovery igodard at pacbell dot net
2004-07-22 0:18 ` [Bug c++/16663] " bangerth at dealii dot org
2004-07-22 0:31 ` pinskia at gcc dot gnu dot org
2004-07-22 0:36 ` pinskia at gcc dot gnu dot org
[not found] <bug-16663-6594@http.gcc.gnu.org/bugzilla/>
2008-08-04 19:22 ` manu at gcc dot gnu dot org
2008-08-04 19:23 ` manu 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).