pgsql: Add extern declarations for Bison global variables

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add extern declarations for Bison global variables
Date: 2024-07-25 07:32:13
Message-ID: E1sWsxR-0017Qh-2t@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)anarazel(dot)de>
Discussion: https://www.postgresql.org/message-id/flat/e0a62134-83da-4ba4-8cdb-ceb0111c95ce(at)eisentraut(dot)org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ab61c40bfa2ba1887fee304b2ef5306a14a7248c

Modified Files
--------------
contrib/cube/cubeparse.y | 4 ++++
contrib/seg/segparse.y | 4 ++++
src/backend/bootstrap/bootparse.y | 5 +++++
src/backend/replication/repl_gram.y | 5 +++++
src/backend/replication/syncrep_gram.y | 4 ++++
src/interfaces/ecpg/preproc/ecpg.header | 4 ++++
src/pl/plpgsql/src/pl_gram.y | 4 ++++
src/test/isolation/specparse.y | 3 +++
8 files changed, 33 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2024-07-25 08:49:55 pgsql: Fix -Wmissing-variable-declarations warnings for float.c special
Previous Message David Rowley 2024-07-25 03:03:44 pgsql: Add path column to pg_backend_memory_contexts view