diff options
| author | Sam James <sam@gentoo.org> | 2024-12-25 01:51:48 +0000 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2024-12-25 02:18:07 +0000 |
| commit | 61eac6a05a0fe99965cdb88163672aa9ab7f77e7 (patch) | |
| tree | a8ea35d12302c7f6e63a72eca371ef138b2a1f40 /test cases/frameworks/8 flex/parser.y | |
| parent | 0025805e303623386f1134b5f5f646bb40b00186 (diff) | |
| download | meson-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.y | 2 |
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 |
