From 78789b2e9aee049280ccbb93b4840c300749f0f0 Mon Sep 17 00:00:00 2001 From: frief Date: Fri, 7 Apr 2006 14:37:25 +0000 Subject: [PATCH] allow using brackets here: "__interrupt (1) __using (1)" git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4089 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCC.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.30.2