------- 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