ref: 1ad6eb865750ec1c626341f349228919364cb552
parent: 6a98886da0c2c8b15616e2da8033c938a528c715
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Jul 3 12:52:02 EDT 2013
Remove unneeded goto in spec We can use in this case the direct call instead of the gotos.
--- a/decl.c
+++ b/decl.c
@@ -79,9 +79,9 @@
cp->c_unsigned = 1;
case SIGNED:
if (sign == yytoken)
- goto duplicated;
+ error("duplicated '%s'", yytext);
if (sign)
- goto signed_and_unsigned;
+ error("both 'signed' and 'unsigned' in declaration specifiers");
sign = yytoken;
break;
case VOID: case CHAR: case SHORT: case INT:
@@ -97,10 +97,6 @@
return n;
}
}
-duplicated:
- error("duplicated '%s'", yytext);
-signed_and_unsigned:
- error("both 'signed' and 'unsigned' in declaration specifiers");
}
static void
--
⑨