diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2021-09-10 06:48:02 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2021-09-11 08:26:10 +0200 |
commit | 5d9ccd5a87f7991c6f52d45e2b57ad0b03e76cf7 (patch) | |
tree | 88ac63f92f4d5d5519faf2d6321324a11aa355a1 /src/getargs.h | |
parent | ad9b8a069ffaba0e93504b3414be16ba06b035ff (diff) | |
download | bison-5d9ccd5a87f7991c6f52d45e2b57ad0b03e76cf7.tar.gz |
yacc: declare yyerror/yylex only when POSIXLY_CORRECT
The recent changes to comply with POSIX are breaking Automake's test
suite.
Reported by Kiyoshi Kanazawa.
<https://lists.gnu.org/r/bug-bison/2021-09/msg00005.html>
To limit the impact of POSIX changes, bind them to $POSIXLY_CORRECT.
Suggested by Karl Berry.
<https://lists.gnu.org/r/bug-bison/2021-09/msg00009.html>
The existing `maintainer-check-posix` Make target checks these
changes.
* src/getargs.h, src/getargs.c (set_yacc): New.
Use it.
* data/skeletons/bison.m4 (b4_posix_if): New.
* data/skeletons/yacc.c (b4_declare_yyerror_and_yylex): Use it.
* doc/bison.texi, tests/local.at: Adjust.
Diffstat (limited to 'src/getargs.h')
-rw-r--r-- | src/getargs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/getargs.h b/src/getargs.h index a26aec2f..836c1290 100644 --- a/src/getargs.h +++ b/src/getargs.h @@ -140,6 +140,7 @@ void getargs (int argc, char *argv[]); /* Used by parse-gram.y. */ void language_argmatch (char const *arg, int prio, location loc); void skeleton_arg (const char *arg, int prio, location loc); +void set_yacc (location loc); /** In the string \c s, replace all characters \c from by \c to. */ void tr (char *s, char from, char to); |