From: johanknol Date: Thu, 6 Sep 2001 15:26:53 +0000 (+0000) Subject: maybe a fix for bug #458744 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=6ca826f00e8df8ba0aed8e1e7d3be0216fb4e498;p=fw%2Fsdcc maybe a fix for bug #458744 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1231 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 25b0e5d2..1a567d9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-09-06 + + * src/SDCC.y: this could be a fix for bug #458744 + 2001-09-05 * src/SDCCglue.c (emitRegularMap): a fix for bug #458099/2 diff --git a/src/SDCC.y b/src/SDCC.y index 53cd3b5a..e9f509d3 100644 --- a/src/SDCC.y +++ b/src/SDCC.y @@ -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); }