summaryrefslogtreecommitdiff
path: root/test cases/frameworks/8 flex/parser.y
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-12-25 01:51:48 +0000
committerSam James <sam@gentoo.org>2024-12-25 02:18:07 +0000
commit61eac6a05a0fe99965cdb88163672aa9ab7f77e7 (patch)
treea8ea35d12302c7f6e63a72eca371ef138b2a1f40 /test cases/frameworks/8 flex/parser.y
parent0025805e303623386f1134b5f5f646bb40b00186 (diff)
downloadmeson-61eac6a05a0fe99965cdb88163672aa9ab7f77e7.tar.gz
test cases: fix '8 flex' with C23
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
Diffstat (limited to 'test cases/frameworks/8 flex/parser.y')
-rw-r--r--test cases/frameworks/8 flex/parser.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/test cases/frameworks/8 flex/parser.y b/test cases/frameworks/8 flex/parser.y
index 663f2f3cf..ba8004efd 100644
--- a/test cases/frameworks/8 flex/parser.y
+++ b/test cases/frameworks/8 flex/parser.y
@@ -1,6 +1,6 @@
%{
extern int yylex(void);
-extern int yyerror();
+extern int yyerror(char *s);
%}
%token BOOLEAN