1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-11 11:30:13 +00:00

Reduced exess errors on wrong initializations with curly braces.

This commit is contained in:
acqn 2020-08-27 08:02:05 +08:00 committed by Oliver Schmidt
parent 8b580e1191
commit c0a873e0c8

View File

@ -959,7 +959,16 @@ static void Primary (ExprDesc* E)
/* Illegal primary. Be sure to skip the token to avoid endless
** error loops.
*/
{
if (CurTok.Tok == TOK_LCURLY) {
/* Statement block */
NextToken ();
Error ("Expression expected");
hie0 (E);
if (CurTok.Tok == TOK_RCURLY) {
NextToken ();
}
break;
} else {
/* Let's see if this is a C99-style declaration */
DeclSpec Spec;
InitDeclSpec (&Spec);