allow using brackets here: "__interrupt (1) __using (1)"
authorfrief <frief@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 7 Apr 2006 14:37:25 +0000 (14:37 +0000)
committerfrief <frief@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 7 Apr 2006 14:37:25 +0000 (14:37 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4089 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCC.y

index a5a0f32994af2952e10d8afc223b5baf109d6383..1cdbd6ca054bb45d6a6daedba44282095135a06a 100644 (file)
@@ -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