Add extern declarations for Bison global variables
Peter Eisentraut <peter@eisentraut.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| contrib/cube/cubeparse.y | modified | +4 −0 |
| contrib/seg/segparse.y | modified | +4 −0 |
| src/backend/bootstrap/bootparse.y | modified | +5 −0 |
| src/backend/replication/repl_gram.y | modified | +5 −0 |
| src/backend/replication/syncrep_gram.y | modified | +4 −0 |
| src/interfaces/ecpg/preproc/ecpg.header | modified | +4 −0 |
| src/pl/plpgsql/src/pl_gram.y | modified | +4 −0 |
| src/test/isolation/specparse.y | modified | +3 −0 |
Discussion
- consider -Wmissing-variable-declarations 13 messages · 2024-05-09 → 2026-02-21