Skip to content

Commit 55fb759

Browse files
committed
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.
1 parent ab14a73 commit 55fb759

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

config/programs.m4

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ if test "$BISON"; then
2323
*** Bison version 1.875 or later is required, but this is $pgac_bison_version.])
2424
BISON=""
2525
fi
26+
# Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
27+
# of the now preferred %name-prefix "base_yy", but the latter
28+
# doesn't work with Bison 2.3 or less. So for now we silence the
29+
# deprecation warnings.
30+
if echo "$pgac_bison_version" | $AWK '{ if ([$]4 >= 3) exit 0; else exit 1;}'
31+
then
32+
BISONFLAGS="$BISONFLAGS -Wno-deprecated"
33+
fi
2634
fi
2735
2836
if test -z "$BISON"; then

configure

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7075,6 +7075,14 @@ $as_echo "$as_me: WARNING:
70757075
*** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
70767076
BISON=""
70777077
fi
7078+
# Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7079+
# of the now preferred %name-prefix "base_yy", but the latter
7080+
# doesn't work with Bison 2.3 or less. So for now we silence the
7081+
# deprecation warnings.
7082+
if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7083+
then
7084+
BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7085+
fi
70787086
fi
70797087

70807088
if test -z "$BISON"; then

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy