ref: 0e78d39ed924847e4e78662581c43ffdbe0d1ef4
parent: 047f9b79d1942d292ee3718858be7c6fb1002320
author: Roberto E. Vargas Caballero <[email protected]>
date: Wed Jul 22 04:58:12 EDT 2015
Fix declaration of structs, unions and enums Another specifiers are not allowed after a struct/unions/enums
--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -216,11 +216,13 @@
switch (yylval.token) {
case ENUM:
dcl = enumdcl;
- p = &type; break;
+ p = &type;
+ break;
case STRUCT:
case UNION:
dcl = structdcl;
- p = &type; break;
+ p = &type;
+ break;
case VOID:
case BOOL:
case CHAR:
@@ -231,7 +233,8 @@
break;
case SIGNED:
case UNSIGNED:
- p = &sign; break;
+ p = &sign;
+ break;
case LONG:
if (size == LONG) {
size = LLONG;
@@ -252,6 +255,7 @@
if (size || sign)
goto invalid_type;
tp = (*dcl)();
+ goto return_type;
} else {
next();
}