public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20665] New: poor diagnostic
@ 2005-03-28 2:04 igodard at pacbell dot net
2005-03-28 2:07 ` [Bug c++/20665] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: igodard at pacbell dot net @ 2005-03-28 2:04 UTC (permalink / raw)
To: gcc-bugs
In:
template<typename T> class foo {}
enum A{b, c};
gets you:
~/ootbc/members/bin$ g++ foo.cc
foo.cc:2: error: template declaration of `enum A'
foo.cc:2: confused by earlier errors, bailing out
The actual error is a missing semicolon.
Ivan
--
Summary: poor diagnostic
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=20665
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/20665] poor diagnostic
2005-03-28 2:04 [Bug c++/20665] New: poor diagnostic igodard at pacbell dot net
@ 2005-03-28 2:07 ` pinskia at gcc dot gnu dot org
2005-03-28 15:06 ` [Bug c++/20665] poor diagnostic for missing semicolon at end of template struct declaration bangerth at dealii dot org
2005-06-27 1:58 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-28 2:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-28 02:07 -------
On the mainline I get:
t.cc:1: error: template declaration of 'enum'
t.cc:2: error: multiple types in one declaration
There might be a dup of this bug somewhere.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20665
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/20665] poor diagnostic for missing semicolon at end of template struct declaration
2005-03-28 2:04 [Bug c++/20665] New: poor diagnostic igodard at pacbell dot net
2005-03-28 2:07 ` [Bug c++/20665] " pinskia at gcc dot gnu dot org
@ 2005-03-28 15:06 ` bangerth at dealii dot org
2005-06-27 1:58 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: bangerth at dealii dot org @ 2005-03-28 15:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2005-03-28 15:06 -------
Yes, there are multiple PRs in the database about diagnostics when people
forget the semicolon at the end of a struct or class declaration. There are
also examples in these PRs that show why this case is so hard for the
parser to handle gracefully.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Summary|poor diagnostic |poor diagnostic for missing
| |semicolon at end of template
| |struct declaration
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20665
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/20665] poor diagnostic for missing semicolon at end of template struct declaration
2005-03-28 2:04 [Bug c++/20665] New: poor diagnostic igodard at pacbell dot net
2005-03-28 2:07 ` [Bug c++/20665] " pinskia at gcc dot gnu dot org
2005-03-28 15:06 ` [Bug c++/20665] poor diagnostic for missing semicolon at end of template struct declaration bangerth at dealii dot org
@ 2005-06-27 1:58 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-27 1:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-27 01:58 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-06-27 01:58:18
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20665
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-06-27 1:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-28 2:04 [Bug c++/20665] New: poor diagnostic igodard at pacbell dot net
2005-03-28 2:07 ` [Bug c++/20665] " pinskia at gcc dot gnu dot org
2005-03-28 15:06 ` [Bug c++/20665] poor diagnostic for missing semicolon at end of template struct declaration bangerth at dealii dot org
2005-06-27 1:58 ` pinskia 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).