* src/SDCC.y: fixed bug #716242, exchanged pointer and function declarator in the...
[fw/sdcc] / src / SDCC.y
index a81e243e31054658c253d4ad8be28566e152e8a5..a5a0f32994af2952e10d8afc223b5baf109d6383 100644 (file)
@@ -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);