Fix warning in treelang
Andreas Jaeger
aj@suse.de
Sun Jan 26 10:37:00 GMT 2003
It seems that nobody tested treelang after the -Werror change since it
fails now with:
stage1/xgcc -Bstage1/ -B/opt/gcc/3.4-devel/i686-pc-linux-gnu/bin/ -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wmissing-prototypes -Wmissing-declarations -fno-common -Werror -DHAVE_CONFIG_H -I. -Itreelang -I/cvs/gcc/gcc -I/cvs/gcc/gcc/treelang -I/cvs/gcc/gcc/config -I/cvs/gcc/gcc/../include /cvs/gcc/gcc/treelang/parse.c -o treelang/parse.o
/cvs/gcc/gcc/treelang/parse.y:202: warning: `yytoknum' defined but not used
make[2]: *** [treelang/parse.o] Error 1
I've committed the appended patch from Michael as obvious after
testing on i686-linux-gnu,
Andreas
2003-01-26 Michael Matz <matz@suse.de>
* Make-lang.in (treelang/parse.o-warn): Define as -Wno-error.
============================================================
Index: gcc/treelang/Make-lang.in
--- gcc/treelang/Make-lang.in 14 Jan 2003 08:03:58 -0000 1.11
+++ gcc/treelang/Make-lang.in 26 Jan 2003 09:15:47 -0000
@@ -65,6 +65,8 @@ TREE_EXES = tree1$(exeext)
#no -Wtraditional warnings, allow long long
treelang-warn = $(LOOSE_WARN) -pedantic -Wno-long-long -Wmissing-prototypes -Wmissing-declarations
+# bison emits some unused static arrays (yytoknum)
+treelang/parse.o-warn = -Wno-error
#
# Define the names for selecting treelang in LANGUAGES.
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
More information about the Gcc-patches
mailing list