summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritchyny <itchyny@cybozu.co.jp>2023-06-28 17:56:53 +0900
committerGitHub <noreply@github.com>2023-06-28 17:56:53 +0900
commit5dacc6b3a1d40cd9e86cc0059c990fc7c70a5831 (patch)
tree6aaeccc799045b35813a2d6dfe699bfc0f314945
parent82d56022309ad6bddb191d51b219f19604a96171 (diff)
Fix bison warnings on incompatibilities with POSIX Yacc (#2634)
-rw-r--r--Makefile.am8
-rw-r--r--src/parser.y2
2 files changed, 5 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 4ccde3a0..6729b954 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -44,10 +44,10 @@ BUILT_SOURCES = src/builtin.inc src/version.h
$(AM_V_LEX) echo "NOT building lexer.c!"
endif
-# Tell YACC (bison) autoconf macros that you want a header file created.
-# If the --warnings=all fails, you probably have an old version of bison
-# OSX ships an old bison, so update with homebrew or macports
-AM_YFLAGS = --warnings=all -d
+# Tell YACC (Bison) autoconf macros that you want a header file created.
+# If the --warnings=all fails, you probably have an old version of Bison
+# macOS ships an old Bison, so update with Homebrew or MacPorts.
+AM_YFLAGS = --warnings=all -Wno-yacc -d
### libjq
diff --git a/src/parser.y b/src/parser.y
index f04853f5..020e83f5 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -26,7 +26,7 @@ struct lexer_param;
}
%locations
-%error-verbose
+%define parse.error verbose
%define api.pure
%union {
jv literal;