;
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
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);