X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCC.y;h=a5a0f32994af2952e10d8afc223b5baf109d6383;hb=e4686e809bb3f1922a4fe850adc00c503a72ad24;hp=6d8229feb5f4fb8e6531aa5a43bb167fcbf8e40b;hpb=edae25c7ae2b0749ca7d491b391b99967652a0fd;p=fw%2Fsdcc diff --git a/src/SDCC.y b/src/SDCC.y index 6d8229fe..a5a0f329 100644 --- a/src/SDCC.y +++ b/src/SDCC.y @@ -95,7 +95,7 @@ bool uselessDecl = TRUE; %token CASE DEFAULT IF ELSE SWITCH WHILE DO FOR GOTO CONTINUE BREAK RETURN %token NAKED JAVANATIVE OVERLAY %token INLINEASM -%token IFX ADDRESS_OF GET_VALUE_AT_ADDRESS SPIL UNSPIL GETHBIT +%token IFX ADDRESS_OF GET_VALUE_AT_ADDRESS SPIL UNSPIL GETHBIT GETABIT GETBYTE GETWORD %token BITWISEAND UNARYMINUS IPUSH IPOP PCALL ENDFUNCTION JUMPTABLE %token RRC RLC %token CAST CALL PARAM NULLOP BLOCK LABEL RECEIVE SEND ARRAYINIT @@ -597,7 +597,7 @@ type_specifier /* 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) = (int) floatFromVal(constExprValue($3,TRUE)) ; + SPEC_ADDR($1) = (unsigned) floatFromVal(constExprValue($3,TRUE)) ; } ; @@ -1373,12 +1373,17 @@ abstract_declarator2 FUNC_HASVARARGS(p) = IS_VARG($4); FUNC_ARGS(p) = reverseVal($4); - + /* nest level was incremented to take care of the parms */ NestLevel-- ; currBlockno--; - p->next = $1; - $$ = p; + if (!$1) { + /* ((void (code *) (void)) 0) () */ + $1=newLink(DECLARATOR); + DCL_TYPE($1)=CPOINTER; + $$ = $1; + } + $1->next=p; // remove the symbol args (if any) cleanUpLevel(SymbolTab,NestLevel+1);