if (!sym->type) {
sym->type = copyLinkChain($1);
sym->etype = getSpec(sym->type);
- /* make sure the type is complete and sane */
- checkTypeSanity(sym->etype, sym->name);
}
else
addDecl (sym,0,cloneSpec($1));
+ /* make sure the type is complete and sane */
+ checkTypeSanity(sym->etype, sym->name);
}
$$ = $2;
}
| jump_statement
| INLINEASM ';' {
ast *ex = newNode(INLINEASM,NULL,NULL);
- ex->values.inlineasm = Safe_alloc(strlen($1)+1);
+ ex->values.inlineasm = malloc(strlen($1)+1);
strcpy(ex->values.inlineasm,$1);
$$ = ex;
- }
+ }
;
labeled_statement
- : identifier ':' statement { $$ = createLabel($1,$3); }
+// : identifier ':' statement { $$ = createLabel($1,$3); }
+ : identifier ':' { $$ = createLabel($1,NULL); }
| CASE constant_expr ':' statement { $$ = createCase(STACK_PEEK(swStk),$2,$4); }
| DEFAULT ':' statement { $$ = createDefault(STACK_PEEK(swStk),$3); }
;