struct_declarator
: declarator
- {
- // if this was a function declarator, remove the symbol args (if any)
- if (IS_FUNC($1->etype)) {
- cleanUpLevel(SymbolTab,NestLevel+1);
- }
- }
| ':' constant_expr {
$$ = newSymbol (genSymName(NestLevel),NestLevel) ;
$$->bitVar = (int) floatFromVal(constExprValue($2,TRUE));
/* nest level was incremented to take care of the parms */
NestLevel-- ;
currBlockno--;
+
+ // if this was a pointer to a function, remove the symbol args
+ // (if any)
+ if (IS_PTR($1->type) && IS_FUNC($1->etype)) {
+ cleanUpLevel(SymbolTab,NestLevel+1);
+ /* fprintf (stderr, "Removed parm symbols of %s in line %d\n",
+ $1->name, yylineno); */
+ }
+
$$ = $1;
}
| declarator2 '(' parameter_identifier_list ')'
| jump_statement
| INLINEASM ';' {
ast *ex = newNode(INLINEASM,NULL,NULL);
- ex->values.inlineasm = Safe_calloc(1,strlen($1)+1);
+ ex->values.inlineasm = malloc(strlen($1)+1);
strcpy(ex->values.inlineasm,$1);
$$ = ex;
}