This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/53924] New: unhelpful diagnostic in invalid declaration list
- From: "steven at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 11 Jul 2012 10:29:54 +0000
- Subject: [Bug c/53924] New: unhelpful diagnostic in invalid declaration list
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53924
Bug #: 53924
Summary: unhelpful diagnostic in invalid declaration list
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: steven@gcc.gnu.org
The C front end gives a really unhelpful error message for the most trivial
mistakes. This is one example:
$ cat t.c
typedef void *tree;
tree klass, tree cdecl, class_array_type;
$ ./cc1 -quiet t.c
t.c:2:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'cdecl'
tree klass, tree cdecl, class_array_type;
^
$
The parser should be able to recover from this error more gracefully.