;
function_attributes
- : USING CONSTANT {
+ : USING constant_expr {
$$ = newLink(SPECIFIER) ;
- FUNC_REGBANK($$) = (int) floatFromVal($2);
+ FUNC_REGBANK($$) = (int) floatFromVal(constExprValue($2,TRUE));
}
| REENTRANT { $$ = newLink (SPECIFIER);
FUNC_ISREENT($$)=1;
Interrupt_storage
: INTERRUPT { $$ = INTNO_UNSPEC ; }
- | INTERRUPT CONSTANT
- { int intno = (int) floatFromVal($2);
+ | INTERRUPT constant_expr
+ { int intno = (int) floatFromVal(constExprValue($2,TRUE));
if ((intno >= 0) && (intno <= INTNO_MAX))
$$ = intno;
else
/* add this to the storage class specifier */
SPEC_ABSA($1) = 1; /* set the absolute addr flag */
/* now get the abs addr from value */
- SPEC_ADDR($1) = (int) floatFromVal(constExprValue($3,TRUE)) ;
+ SPEC_ADDR($1) = (unsigned) floatFromVal(constExprValue($3,TRUE)) ;
}
;
struct_declarator
: declarator
| ':' constant_expr {
- int bitsize;
+ unsigned int bitsize;
$$ = newSymbol (genSymName(NestLevel),NestLevel) ;
- bitsize= (int) floatFromVal(constExprValue($2,TRUE));
+ bitsize= (unsigned int) floatFromVal(constExprValue($2,TRUE));
if (bitsize > (port->s.int_size * 8)) {
bitsize = port->s.int_size * 8;
werror(E_BITFLD_SIZE, bitsize);
}
| declarator ':' constant_expr
{
- int bitsize;
- bitsize= (int) floatFromVal(constExprValue($3,TRUE));
+ unsigned int bitsize;
+ bitsize= (unsigned int) floatFromVal(constExprValue($3,TRUE));
if (bitsize > (port->s.int_size * 8)) {
bitsize = port->s.int_size * 8;
werror(E_BITFLD_SIZE, bitsize);
FUNC_HASVARARGS(p) = IS_VARG($4);
FUNC_ARGS(p) = reverseVal($4);
-
+
/* nest level was incremented to take care of the parms */
NestLevel-- ;
currBlockno--;
- p->next = $1;
- $$ = p;
+ if (!$1) {
+ /* ((void (code *) (void)) 0) () */
+ $1=newLink(DECLARATOR);
+ DCL_TYPE($1)=CPOINTER;
+ $$ = $1;
+ }
+ $1->next=p;
// remove the symbol args (if any)
cleanUpLevel(SymbolTab,NestLevel+1);