ref: 12da403dac1d4581566efa3a72e98b04dd828395
parent: 7ab5856146a046a2f8a2fedd19375a23be1690f2
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Jul 8 10:36:39 EDT 2014
Remove unneded gotos in fielddcl These gotos were added only to save some bytes in error handling. These patch removes them and make the code cleaner.
--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -289,17 +289,16 @@
{
Type *tp;
Symbol *sym;
- char *err;
switch (yytoken) {
case SCLASS:
- goto bad_storage;
+ error("storage class '%s' in struct/union field", yytext);
case IDEN: case TYPE: case TQUALIFIER:
tp = specifier(NULL);
case ';':
break;
default:
- goto dcl_expected;
+ error("declaration expected");
}
if (yytoken != ';') {
@@ -311,14 +310,6 @@
expect(';');
return;
-
-bad_storage:
- err = "storage class '%s' in struct/union field";
- goto error;
-dcl_expected:
- err = "declaration expected";
-error:
- error(err, yytext);
}
static Type *