function_attributes
: USING constant_expr {
$$ = newLink(SPECIFIER) ;
- FUNC_REGBANK($$) = (int) floatFromVal(constExprValue($2,TRUE));
+ FUNC_REGBANK($$) = (int) ulFromVal(constExprValue($2,TRUE));
}
| REENTRANT { $$ = newLink (SPECIFIER);
FUNC_ISREENT($$)=1;
$$ = mergeSpec($1,$2, "type_specifier declaration_specifiers");
}
| function_specifier { $$ = $1; }
- | function_specifier declaration_specifiers {
+ | function_specifier declaration_specifiers {
/* if the decl $2 is not a specifier */
/* find the spec and replace it */
if ( !IS_SPEC($2)) {
Interrupt_storage
: INTERRUPT { $$ = INTNO_UNSPEC ; }
| INTERRUPT constant_expr
- { int intno = (int) floatFromVal(constExprValue($2,TRUE));
+ { int intno = (int) ulFromVal(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) = (unsigned) floatFromVal(constExprValue($3,TRUE)) ;
+ SPEC_ADDR($1) = (unsigned int) ulFromVal(constExprValue($3,TRUE)) ;
}
;
| ':' constant_expr {
unsigned int bitsize;
$$ = newSymbol (genSymName(NestLevel),NestLevel) ;
- bitsize= (unsigned int) floatFromVal(constExprValue($2,TRUE));
+ bitsize = (unsigned int) ulFromVal(constExprValue($2,TRUE));
if (bitsize > (port->s.int_size * 8)) {
bitsize = port->s.int_size * 8;
werror(E_BITFLD_SIZE, bitsize);
| declarator ':' constant_expr
{
unsigned int bitsize;
- bitsize= (unsigned int) floatFromVal(constExprValue($3,TRUE));
+ bitsize = (unsigned int) ulFromVal(constExprValue($3,TRUE));
if (bitsize > (port->s.int_size * 8)) {
bitsize = port->s.int_size * 8;
werror(E_BITFLD_SIZE, bitsize);
{
werror(E_ENUM_NON_INTEGER);
SNPRINTF(lbuff, sizeof(lbuff),
- "%d",(int) floatFromVal(val));
+ "%d", (int) ulFromVal(val));
val = constVal(lbuff);
}
$$ = cenum = val ;
| {
if (cenum) {
SNPRINTF(lbuff, sizeof(lbuff),
- "%d",(int) floatFromVal(cenum)+1);
+ "%d", (int) ulFromVal(cenum)+1);
$$ = cenum = constVal(lbuff);
}
else {
- $$ = cenum = constVal("0");
+ $$ = cenum = constCharVal(0);
}
}
;
}
else
{
- if ((size = (int)floatFromVal(tval)) < 0)
+ if ((size = (int) ulFromVal(tval)) < 0)
{
werror(E_NEGATIVE_ARRAY_SIZE, $1->name);
size = 1;
}
| unqualified_pointer type_specifier_list pointer
{
- $$ = $1 ;
+ $$ = $1 ;
if (IS_SPEC($2) && DCL_TYPE($3) == UPOINTER) {
DCL_PTR_CONST($1) = SPEC_CONST($2);
DCL_PTR_VOLATILE($1) = SPEC_VOLATILE($2);
DCL_TYPE($3) = EEPPOINTER;
break;
default:
- // this could be just "constant"
+ // this could be just "constant"
// werror(W_PTR_TYPE_INVALID);
;
}
}
- else
+ else
werror (W_PTR_TYPE_INVALID);
$$->next = $3 ;
}
value *val ;
$$ = newLink (DECLARATOR);
DCL_TYPE($$) = ARRAY ;
- DCL_ELEM($$) = (int) floatFromVal(val = constExprValue($2,TRUE));
+ DCL_ELEM($$) = (int) ulFromVal(val = constExprValue($2,TRUE));
}
| abstract_declarator2 '[' ']' {
$$ = newLink (DECLARATOR);
value *val ;
$$ = newLink (DECLARATOR);
DCL_TYPE($$) = ARRAY ;
- DCL_ELEM($$) = (int) floatFromVal(val = constExprValue($3,TRUE));
+ DCL_ELEM($$) = (int) ulFromVal(val = constExprValue($3,TRUE));
$$->next = $1 ;
}
| '(' ')' { $$ = NULL;}