Closed lrosenman closed 5 years ago
I looked this up once (but I can't find the link at the moment). It's not my bug. Something in the Autotools (autoconf
? automake
?) system is wrongly specifying -Wyacc
--- I don't do it. I think this was fixed in their stuff, so you might try updating that stuff.
You could also try changing the line in src/Makefile.am
to:
AM_YFLAGS = -d -Wno-yacc
and hope that the -Wno-yacc
comes after the -Wyacc
so it'll turn it off. I can't test this myself since I don't get the warning on any machines I have access to. If it works, I can hack in the work-around.
I'm using the latest in FreeBSD ports (head). I'll play and get back to you.
that DOES fix it.
--- parser.c --- /bin/sh ../ylwrap parser.y y.tab.c parser.c y.tab.h
echo parser.c | sed -e s/cc$/hh/ -e s/cpp$/hpp/ -e s/cxx$/hxx/ -e s/c++$/h++/ -e s/c$/h/
y.output parser.output -- bison -y -d -Wno-yacc --- lexer.c ---
OK, I'll hack it in. (FYI: I don't specify the -y
either --- their stuff does that.)
The -y isn't from me :)
Also,
--- autocomplete.o --- autocomplete.c:381:39: warning: 'CPPFunction' is deprecated [-Wdeprecated-declarations] rl_attempted_completion_function = (CPPFunction*)attempt_completion; ^ /usr/local/include/readline/rltypedefs.h:38:47: note: 'CPPFunction' has been explicitly marked deprecated here typedef char **CPPFunction () attribute ((deprecated)); ^
One issue at a time. :)
:)
want a separate issue for the readline fun?
Sadly, the bison
that Apple ships with Xcode is ancient:
/bin/sh ../ylwrap parser.y y.tab.c parser.c y.tab.h `echo parser.c | sed -e s/cc$/hh/ -e s/cpp$/hpp/ -e s/cxx$/hxx/ -e s/c++$/h++/ -e s/c$/h/` y.output parser.output -- bison -y -d -Wno-yacc
/bin/sh ../ylwrap lexer.l lex.yy.c lexer.c -- flex
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bison: invalid option -- W
so this isn't a simple work-around. I could write stuff in configure.ac
to probe bison
to see if it accepts the -W
option, but that's more work. :(
I can patch it in the FreeBSD port.
Yeah, open a separate issue for readline; thanks.
Wait: patch what? (And how would that help the bison
that Apple ships with Xcode?)
I can patch the src/Makefile.am that the FreeBSD ports system uses to add -Wno-yacc to the AM_YFLAGS line to shut the warnings up.
And opened #5 for the readline issue.
It wouldn't help Xcode/bison... just make the FreeBSD build clean of warnings.
thusly:
[I] ➜ cat files/patch-src_Makefile.am --- src/Makefile.am.orig 2019-06-19 15:19:07 UTC +++ src/Makefile.am @@ -21,7 +21,7 @@ bin_PROGRAMS = cdecl
AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib -AM_YFLAGS = -d +AM_YFLAGS = -d -Wno-yacc LDADD = $(top_builddir)/lib/libgnu.a
BUILT_SOURCES = parser.c parser.h lexer.c
ler in ports/devel/cdecl at borg [I] ➜
Oh. Well, that's your call. I can try to do a work-around on my end, but it'll take a little while.
There's no pre-written autoconf macro for probing bison, so I'll have to write one myself (and I'm not that knowledgable about m4).
NBD either way.
Thanks for looking.
I have to get back to my day job. :/
Whenever, and I do too.
Slow work day. Try the bison-yacc-warning
branch. Be sure to start from scratch. After you pull the branch:
$ git clean -xdf
$ autoreconf -fiv
$ configure
seems to DTRT. Thanks!
Pushed to master
; will be part of the next release.
I don't know if you want to fix these, but I get this warning set on 6.4 on FreeBSD: