summaryrefslogtreecommitdiff
path: root/src/backend/bootstrap/bootparse.y
diff options
context:
space:
mode:
authorPeter Eisentraut2024-08-02 07:59:35 +0000
committerPeter Eisentraut2024-08-02 08:25:11 +0000
commit9fb855fe1ae04a147bd4cdaa571a1c9de5f03682 (patch)
treea8c5711e613dc4fd8fdfbda489c7530cc8402070 /src/backend/bootstrap/bootparse.y
parent63bef4df975cd8b0a3fee1384a80c569043a6d72 (diff)
Include bison header files into implementation files
Before Bison 3.4, the generated parser implementation files run afoul of -Wmissing-variable-declarations (in spite of commit ab61c40bfa2) because declarations for yylval and possibly yylloc are missing. The generated header files contain an extern declaration, but the implementation files don't include the header files. Since Bison 3.4, the generated implementation files automatically include the generated header files, so then it works. To make this work with older Bison versions as well, include the generated header file from the .y file. (With older Bison versions, the generated implementation file contains effectively a copy of the header file pasted in, so including the header file is redundant. But we know this works anyway because the core grammar uses this arrangement already.) Discussion: https://www.postgresql.org/message-id/flat/[email protected]
Diffstat (limited to 'src/backend/bootstrap/bootparse.y')
-rw-r--r--src/backend/bootstrap/bootparse.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/bootstrap/bootparse.y b/src/backend/bootstrap/bootparse.y
index 58e0878dc8d..73a7592fb71 100644
--- a/src/backend/bootstrap/bootparse.y
+++ b/src/backend/bootstrap/bootparse.y
@@ -32,6 +32,7 @@
#include "nodes/makefuncs.h"
#include "utils/memutils.h"
+#include "bootparse.h"
/* silence -Wmissing-variable-declarations */
extern int boot_yychar;