;
struct_declarator
- : declarator
+ : declarator
| ':' constant_expr {
$$ = newSymbol (genSymName(NestLevel),NestLevel) ;
$$->bitVar = (int) floatFromVal(constExprValue($2,TRUE));
$1->hasVargs = IS_VARG($4);
$1->args = reverseVal($4) ;
+
/* 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 ')'
{
$$ = $1 ;
$$->next = $2 ;
+ DCL_TYPE($2)=GPOINTER;
}
| unqualified_pointer type_specifier_list pointer
{
| 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;
}