diff options
author | Peter Eisentraut | 2025-01-15 14:35:08 +0000 |
---|---|---|
committer | Peter Eisentraut | 2025-01-15 14:35:08 +0000 |
commit | 6fdd5d9563439285df200f7282f0ca68152ef72d (patch) | |
tree | 7c88b3365ba3ee264c44cdc62f08da03860cbb78 /src/backend/parser | |
parent | 630f9a43cece93cb4a5c243b30e34abce6a89514 (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/backend/parser')
-rw-r--r-- | src/backend/parser/Makefile | 1 | ||||
-rw-r--r-- | src/backend/parser/meson.build | 2 | ||||
-rw-r--r-- | src/backend/parser/scan.l | 9 |
3 files changed, 1 insertions, 11 deletions
diff --git a/src/backend/parser/Makefile b/src/backend/parser/Makefile index 3162a01f302..8c0fe28d63f 100644 --- a/src/backend/parser/Makefile +++ b/src/backend/parser/Makefile @@ -59,7 +59,6 @@ gram.c: BISON_CHECK_CMD = $(PERL) $(srcdir)/check_keywords.pl $< $(top_srcdir)/s scan.c: FLEXFLAGS = -CF -p -p scan.c: FLEX_NO_BACKUP=yes -scan.c: FLEX_FIX_WARNING=yes # Force these dependencies to be known even without dependency info built: diff --git a/src/backend/parser/meson.build b/src/backend/parser/meson.build index 4c3ca25dd49..874aa749aa6 100644 --- a/src/backend/parser/meson.build +++ b/src/backend/parser/meson.build @@ -30,7 +30,7 @@ parser_sources = files('parser.c') backend_scanner = custom_target('scan', input: 'scan.l', output: 'scan.c', - command: [flex_cmd, '--no-backup', '--fix-warnings', '--', '-CF', '-p', '-p'], + command: [flex_cmd, '--no-backup', '--', '-CF', '-p', '-p'], ) generated_sources += backend_scanner parser_sources += backend_scanner diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l index 8031a78b908..08990831fe8 100644 --- a/src/backend/parser/scan.l +++ b/src/backend/parser/scan.l @@ -130,15 +130,6 @@ static void addunicode(pg_wchar c, yyscan_t yyscanner); static void check_string_escape_warning(unsigned char ychar, core_yyscan_t yyscanner); static void check_escape_warning(core_yyscan_t yyscanner); -/* - * 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 core_yyget_column(yyscan_t yyscanner); -extern void core_yyset_column(int column_no, yyscan_t yyscanner); - %} %option reentrant |