summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Makefile4
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4eb7edc5..efa92361 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2009-11-28 Kaz Kylheku <kkylheku@gmail.com>
+ * Makefile (CFLAGS): If the compiler matches the pattern %g++,
+ then remove some C-front-end-specific warnings from CFLAGS,
+ which the g++ front end will complain about.
+
+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
diff --git a/Makefile b/Makefile
index e7043276..58cf57a3 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,10 @@ CFLAGS := -I. -I$(top_srcdir) $(LANG_FLAGS) $(DIAG_FLAGS) \
$(OPT_FLAGS) $(DBG_FLAGS) $(PLATFORM_FLAGS)
CFLAGS := $(filter-out $(REMOVE_FLAGS),$(CFLAGS))
+ifeq ($(patsubst %g++,y,$(CC)),y)
+CFLAGS := $(filter-out -Wmissing-prototypes -Wstrict-prototypes,$(CFLAGS))
+endif
+
OBJS := txr.o lex.yy.o y.tab.o match.o lib.o regex.o gc.o unwind.o stream.o
OBJS += hash.o utf8.o