|
From: | Jeannot Langlois |
Subject: | Re: [PATCH] Fix variadic declaration of yyerror() and yylex() function prototypes |
Date: | Fri, 27 May 2005 07:27:42 -0400 |
User-agent: | Mozilla Thunderbird 0.8 (X11/20040913) |
Paul Eggert wrote:
Hi Paul, I have installed Bison-2.0a and patched my M4 macros in successfully. I have checked the testsuite and indeed, tests cases (now offset by two, as I guess two testcases have been added between 2.0 and 2.0a) #119 and #128 were NOT using bison option "-y" (and I couldn't find any of these testcases linking with "-ly"). So I have changed these testcase's yyerror() return value to "void".Jeannot Langlois <address@hidden> writes:Are there any mechanisms already in place to communicate the presence of this "-ly" option to the skeleton files? (Like any M4 macros already defined, or any symbol?).The -y option (not -ly -- that's for the linker) sets the yacc_flag variable in the C code. If that's not communicated to the templates via an M4 macro you can add something to do it.
Now I have added necessary code to propagate the presence of the "yacc_flag" option to the yacc.c and glr.c skeleton files. When I run the testsuite, now the following test cases do fail: 67, 71, 73, 74, 75, 81, 85, 87, 88, and 89 -- still for a similar reason: they use "%yacc" (which is the equivalent of bison option "-y" AFAIK), and therefore cause my M4 macros to generate a yyerror() declaration that use an "int" return value -- but of course, they still declare a "static void yyerror(...)" prototype in the prologue section.
Are these declarations another possible mistake by the test case writer? Shouldn't these test case use "static int yyerror(...)" since they assert "%yacc" ? (Should I change these test cases to use "void" too? Or maybe there's something I didn't get...?)
Thanks, -- *Jeannot Langlois* B. Sc. Computer Science / B. Sc. Informatique Software Developer / Programmeur-Analyste System/Network Administrator / Administrateur Système/Réseau ** LINUX_LOGO
[Prev in Thread] | Current Thread | [Next in Thread] |