mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
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
This commit is contained in:
@ -11,6 +11,10 @@
|
||||
#include "utils/float.h"
|
||||
#include "varatt.h"
|
||||
|
||||
/* silence -Wmissing-variable-declarations */
|
||||
extern int cube_yychar;
|
||||
extern int cube_yynerrs;
|
||||
|
||||
/* All grammar constructs return strings */
|
||||
#define YYSTYPE char *
|
||||
|
||||
|
Reference in New Issue
Block a user