summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorPeter Eisentraut2024-07-25 07:26:08 +0000
committerPeter Eisentraut2024-07-25 07:26:08 +0000
commitab61c40bfa2ba1887fee304b2ef5306a14a7248c (patch)
treede7d28e05d1b329a46e8c3f3776605c1fce75e29 /src/test
parent32d3ed8165f821f6994c95230a9a4b2ff0ce9f12 (diff)
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 <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/[email protected]
Diffstat (limited to 'src/test')
-rw-r--r--src/test/isolation/specparse.y3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/isolation/specparse.y b/src/test/isolation/specparse.y
index 0e8b166a53e..282a7504556 100644
--- a/src/test/isolation/specparse.y
+++ b/src/test/isolation/specparse.y
@@ -14,6 +14,9 @@
#include "isolationtester.h"
+/* silence -Wmissing-variable-declarations */
+extern int spec_yychar;
+extern int spec_yynerrs;
TestSpec parseresult; /* result of parsing is left here */