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 ')'
int i;
iCode *ic;
bitVect *rsave;
- sym_link *detype;
/* look for call */
for (ic = lic; ic; ic = ic->next)
if (bitVectBitValue (rsave, i))
emitcode ("push", "%s", mcs51_regWithIdx (i)->dname);
}
-
- detype = getSpec (operandType (IC_LEFT (ic)));
-
}
+
/*-----------------------------------------------------------------*/
/* unsaveRegisters - pop the pushed registers */
/*-----------------------------------------------------------------*/