summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2009-11-28 04:36:59 -0800
committerKaz Kylheku <kaz@kylheku.com>2009-11-28 04:36:59 -0800
commit0e7eec82341e06cd42f2084f776d8377cbcf0871 (patch)
tree8624dd0d2beb836aac49a08838df0c74c4c8e56e
parent1904b4bedefea15e43a6583255b6b2d2fd6fc69e (diff)
downloadtxr-0e7eec82341e06cd42f2084f776d8377cbcf0871.tar.gz
txr-0e7eec82341e06cd42f2084f776d8377cbcf0871.tar.bz2
txr-0e7eec82341e06cd42f2084f776d8377cbcf0871.zip
* Makefile (CFLAGS): add -Dlint to CFLAGS when compiling y.tab.o.
This suppresses some warnings from a byacc-generated parser, and gets rid of a useless static sccsid array. May help with Bison-generated parser also.
-rw-r--r--ChangeLog7
-rw-r--r--Makefile4
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d46e0dc2..4eb7edc5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2009-11-28 Kaz Kylheku <kkylheku@gmail.com>
+ * Makefile (CFLAGS): add -Dlint to CFLAGS when compiling y.tab.o.
+ This suppresses some warnings from a byacc-generated parser,
+ and gets rid of a useless static sccsid array. May help with
+ Bison-generated parser also.
+
+2009-11-28 Kaz Kylheku <kkylheku@gmail.com>
+
* parser.l: Use flex options to suppress generation of the
unused functons yyunput and yyinput, thus getting rid of
some compiler diagnostics.
diff --git a/Makefile b/Makefile
index 62bc835f..e7043276 100644
--- a/Makefile
+++ b/Makefile
@@ -50,6 +50,10 @@ lex.yy.c: parser.l
y.tab.c y.tab.h: parser.y
if $(YACC) -v -d $< ; then true ; else rm $@ ; false ; fi
+# Suppress useless sccs id array and unused label warning in byacc otuput.
+# Bison-generated parser also tests for this lint define.
+y.tab.o: CFLAGS += -Dlint
+
.PHONY: rebuild
rebuild: clean $(PROG)