summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Conway <mail@joeconway.com>2017-01-02 13:51:10 -0800
committerJoe Conway <mail@joeconway.com>2017-01-02 13:51:10 -0800
commitb12b1743b48a7b7753098be342754477e6129921 (patch)
treef7c73878fc06935051ac84cc544dd48f590cdfd1
parentce15751eed7ebdc44d6c1ce642606f5adfef0dc3 (diff)
downloadpostgresql-b12b1743b48a7b7753098be342754477e6129921.tar.gz
Silence Bison deprecation warnings
Bison >=3.0 issues warnings about %name-prefix="base_yy" instead of the now preferred %name-prefix "base_yy" but the latter doesn't work with Bison 2.3 or less. So for now we silence the deprecation warnings. Back-patch to 9.2 and 9.3 -- the newer branches already have this fix. Author: Peter Eisentraut Discussion: https://postgr.es/m/677.1483384145%40sss.pgh.pa.us
-rw-r--r--config/programs.m48
-rwxr-xr-xconfigure8
2 files changed, 16 insertions, 0 deletions
diff --git a/config/programs.m4 b/config/programs.m4
index c9f0740800..eb763b03a8 100644
--- a/config/programs.m4
+++ b/config/programs.m4
@@ -23,6 +23,14 @@ if test "$BISON"; then
*** Bison version 1.875 or later is required, but this is $pgac_bison_version.])
BISON=""
fi
+ # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
+ # of the now preferred %name-prefix "base_yy", but the latter
+ # doesn't work with Bison 2.3 or less. So for now we silence the
+ # deprecation warnings.
+ if echo "$pgac_bison_version" | $AWK '{ if ([$]4 >= 3) exit 0; else exit 1;}'
+ then
+ BISONFLAGS="$BISONFLAGS -Wno-deprecated"
+ fi
fi
if test -z "$BISON"; then
diff --git a/configure b/configure
index 2154ee19cb..2e5359d79f 100755
--- a/configure
+++ b/configure
@@ -7121,6 +7121,14 @@ $as_echo "$as_me: WARNING:
*** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
BISON=""
fi
+ # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
+ # of the now preferred %name-prefix "base_yy", but the latter
+ # doesn't work with Bison 2.3 or less. So for now we silence the
+ # deprecation warnings.
+ if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
+ then
+ BISONFLAGS="$BISONFLAGS -Wno-deprecated"
+ fi
fi
if test -z "$BISON"; then