diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2024-07-25 09:26:08 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2024-07-25 09:26:08 +0200 |
commit | ab61c40bfa2ba1887fee304b2ef5306a14a7248c (patch) | |
tree | de7d28e05d1b329a46e8c3f3776605c1fce75e29 /src/backend/bootstrap/bootparse.y | |
parent | 32d3ed8165f821f6994c95230a9a4b2ff0ce9f12 (diff) | |
download | postgresql-ab61c40bfa2ba1887fee304b2ef5306a14a7248c.tar.gz postgresql-ab61c40bfa2ba1887fee304b2ef5306a14a7248c.zip |
Add extern declarations for Bison global variables
This adds extern declarations for some global variables produced by
Bison that are not already declared in its generated header file.
This is a workaround to be able to add -Wmissing-variable-declarations
to the global set of warning options in the near future.
Another longer-term solution would be to convert these grammars to
"pure" parsers in Bison, to avoid global variables altogether. Note
that the core grammar is already pure, so this patch did not need to
touch it.
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://www.postgresql.org/message-id/flat/e0a62134-83da-4ba4-8cdb-ceb0111c95ce@eisentraut.org
Diffstat (limited to 'src/backend/bootstrap/bootparse.y')
-rw-r--r-- | src/backend/bootstrap/bootparse.y | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/bootstrap/bootparse.y b/src/backend/bootstrap/bootparse.y index 3c9c1da0216..58e0878dc8d 100644 --- a/src/backend/bootstrap/bootparse.y +++ b/src/backend/bootstrap/bootparse.y @@ -33,6 +33,11 @@ #include "utils/memutils.h" +/* silence -Wmissing-variable-declarations */ +extern int boot_yychar; +extern int boot_yynerrs; + + /* * Bison doesn't allocate anything that needs to live across parser calls, * so we can easily have it use palloc instead of malloc. This prevents |