This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/44854] New: Improve diagnostic for missing member name or ';' in a struct
- From: "pzhao at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jul 2010 07:15:34 -0000
- Subject: [Bug c/44854] New: Improve diagnostic for missing member name or ';' in a struct
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Testcase:
struct foo { int };
gcc-4.6:
test.c:1:18: error: expected identifier or ?(? before ?}? token
test.c:1:18: error: expected specifier-qualifier-list at end of input
clang:
test.c:1:18: error: expected member name or ';' after declaration specifiers
struct foo { int };
~~~ ^
Clang knows what you mean and the diagnostic message is better.
--
Summary: Improve diagnostic for missing member name or ';' in a
struct
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pzhao at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44854