summaryrefslogtreecommitdiff
path: root/test cases/frameworks/8 flex/prog.c
AgeCommit message (Collapse)Author
2024-12-25test cases: fix '8 flex' with C23Sam James
With C23 (as upcoming GCC 15 will default to), `void yyerror()` is the same as `void yyerror(void)`, i.e. `yyerror` takes no arguments. Fix the prototype given we *do* call it with an error string: ``` pgen.p/parser.tab.c: In function ‘yyparse’: pgen.p/parser.tab.c:1104:7: error: too many arguments to function ‘yyerror’ 1104 | yyerror (YY_("syntax error")); | ^~~~~~~ ../test cases/frameworks/8 flex/parser.y:3:12: note: declared here 3 | extern int yyerror(); | ^~~~~~~ pgen.p/parser.tab.c:1215:3: error: too many arguments to function ‘yyerror’ 1215 | yyerror (YY_("memory exhausted")); | ^~~~~~~ ../test cases/frameworks/8 flex/parser.y:3:12: note: declared here 3 | extern int yyerror(); | ^~~~~~~ ``` Bug: https://bugs.gentoo.org/946625
2021-08-12Pass a test file to flex test.Jussi Pakkanen
2021-08-11Make the flex test case workAdrien Plazas
This adds the noyywrap option so flex doesn't wait for more input once we reached EOF. This also adds the nounput and noinput options to fix compilation warnings. We can now run the test as expected.
2018-02-21In test cases/frameworks/8 flex, ensure yyparse() is prototypedJon Turney
Old versions of bison (including the one shipped with macOS) do not prototype yyparse(), just in case you are using a K&R compiler...
2014-08-25Add flex+bison test case.Jussi Pakkanen