maybe a fix for bug #458744
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 6 Sep 2001 15:26:53 +0000 (15:26 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 6 Sep 2001 15:26:53 +0000 (15:26 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1231 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCC.y

index 25b0e5d2d175f502f5be1649ee4b4f7b1686795b..1a567d9c57243b2161cd2e86a7f3e934b70e6068 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2001-09-06    <johan@FRIJA>
+
+       * src/SDCC.y: this could be a fix for bug #458744
+
 2001-09-05    <johan@FRIJA>
 
        * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2
index 53cd3b5a02f1d23de06fec5547685b12296ad6c6..e9f509d34369cf38dd88f3a22ed002db85b308f6 100644 (file)
@@ -1099,9 +1099,22 @@ abstract_declarator2
                                     }
    | '(' ')'                        { $$ = NULL;}
    | '(' parameter_type_list ')'    { $$ = NULL;}   
-   | abstract_declarator2 '(' ')'
-   | abstract_declarator2 '(' parameter_type_list ')'
-   ;
+   | abstract_declarator2 '(' ')' {
+     if (getenv("DONT_IGNORE_FUNCTION_SPECIFIERS")) {
+       // this was previously ignored (cvs < 1.37)
+       // but $1 must be a pointer that points to a function
+       sym_link *p=newLink();
+       DCL_TYPE(p) = FUNCTION;
+       $1->next=p;
+     }
+   }
+   | abstract_declarator2 '(' parameter_type_list ')' {
+     if (getenv("DONT_IGNORE_FUNCTION_SPECIFIERS")) {
+       // this was previously ignored (cvs < 1.37)
+       // this is nonsense, so let's just burp something
+       werror(E_TOO_FEW_PARMS);
+     }
+   }
 
 initializer
    : assignment_expr                { $$ = newiList(INIT_NODE,$1); }