summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorPeter Eisentraut2025-01-15 14:35:08 +0000
committerPeter Eisentraut2025-01-15 14:35:08 +0000
commit6fdd5d9563439285df200f7282f0ca68152ef72d (patch)
tree7c88b3365ba3ee264c44cdc62f08da03860cbb78 /src/bin
parent630f9a43cece93cb4a5c243b30e34abce6a89514 (diff)
Drop warning-free support for Flex 2.5.35
This removes all the various workarounds for avoiding compiler warnings with Flex 2.5.35. Several recent patches have added additional warnings that would either need to be fixed along the lines of the existing workarounds, or we decide to no longer care about this, which we do here. Flex 2.5.35 is extremely outdated, and you can't even download it anymore from any of the Flex project sites, so it's nearly impossible to support. After this, using Flex 2.5.35 will still work, but the generated code will produce numerous compiler warnings. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/1a204ccd-7ae6-478c-a431-407b5c48ccc6@eisentraut.org
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/pgbench/exprscan.l9
-rw-r--r--src/bin/psql/Makefile1
-rw-r--r--src/bin/psql/meson.build2
-rw-r--r--src/bin/psql/psqlscanslash.l9
4 files changed, 1 insertions, 20 deletions
diff --git a/src/bin/pgbench/exprscan.l b/src/bin/pgbench/exprscan.l
index a1cd232248f..46f6ea05121 100644
--- a/src/bin/pgbench/exprscan.l
+++ b/src/bin/pgbench/exprscan.l
@@ -44,15 +44,6 @@ static const char *expr_command = NULL;
/* indicates whether last yylex() call read a newline */
static bool last_was_newline = false;
-/*
- * Work around a bug in flex 2.5.35: it emits a couple of functions that
- * it forgets to emit declarations for. Since we use -Wmissing-prototypes,
- * this would cause warnings. Providing our own declarations should be
- * harmless even when the bug gets fixed.
- */
-extern int expr_yyget_column(yyscan_t yyscanner);
-extern void expr_yyset_column(int column_no, yyscan_t yyscanner);
-
/* LCOV_EXCL_START */
%}
diff --git a/src/bin/psql/Makefile b/src/bin/psql/Makefile
index e9e4ade1d2e..5b1545d9948 100644
--- a/src/bin/psql/Makefile
+++ b/src/bin/psql/Makefile
@@ -60,7 +60,6 @@ sql_help.h: create_help.pl $(wildcard $(REFDOCDIR)/*.sgml)
psqlscanslash.c: FLEXFLAGS = -Cfe -p -p
psqlscanslash.c: FLEX_NO_BACKUP=yes
-psqlscanslash.c: FLEX_FIX_WARNING=yes
tab-complete.c: gen_tabcomplete.pl tab-complete.in.c
$(PERL) $^ --outfile $@
diff --git a/src/bin/psql/meson.build b/src/bin/psql/meson.build
index c2ef14ccead..f795ff28271 100644
--- a/src/bin/psql/meson.build
+++ b/src/bin/psql/meson.build
@@ -19,7 +19,7 @@ psql_sources = files(
psqlscanslash = custom_target('psqlscanslash',
input: 'psqlscanslash.l',
output: 'psqlscanslash.c',
- command: [flex_cmd, '--no-backup', '--fix-warnings', '--', '-Cfe', '-p', '-p'])
+ command: [flex_cmd, '--no-backup', '--', '-Cfe', '-p', '-p'])
generated_sources += psqlscanslash
psql_sources += psqlscanslash
diff --git a/src/bin/psql/psqlscanslash.l b/src/bin/psql/psqlscanslash.l
index f76b7722ac7..ae7602a61df 100644
--- a/src/bin/psql/psqlscanslash.l
+++ b/src/bin/psql/psqlscanslash.l
@@ -57,15 +57,6 @@ static void evaluate_backtick(PsqlScanState state);
#define ECHO psqlscan_emit(cur_state, yytext, yyleng)
-/*
- * Work around a bug in flex 2.5.35: it emits a couple of functions that
- * it forgets to emit declarations for. Since we use -Wmissing-prototypes,
- * this would cause warnings. Providing our own declarations should be
- * harmless even when the bug gets fixed.
- */
-extern int slash_yyget_column(yyscan_t yyscanner);
-extern void slash_yyset_column(int column_no, yyscan_t yyscanner);
-
/* LCOV_EXCL_START */
%}