X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCC.y;fp=src%2FSDCC.y;h=1cdbd6ca054bb45d6a6daedba44282095135a06a;hb=78789b2e9aee049280ccbb93b4840c300749f0f0;hp=a5a0f32994af2952e10d8afc223b5baf109d6383;hpb=2923096bad87ec3b13c28fb684ee3a221951114d;p=fw%2Fsdcc diff --git a/src/SDCC.y b/src/SDCC.y index a5a0f329..1cdbd6ca 100644 --- a/src/SDCC.y +++ b/src/SDCC.y @@ -186,9 +186,9 @@ function_attribute ; 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; @@ -578,8 +578,8 @@ storage_class_specifier 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