[MLton-commit] r6270

Matthew Fluet fluet at mlton.org
Fri Dec 14 19:10:39 PST 2007


Portion of Jesper's patch to quell runtime compilation warnings
----------------------------------------------------------------------

U   mlton/trunk/runtime/Makefile
U   mlton/trunk/runtime/platform/freebsd.c

----------------------------------------------------------------------

Modified: mlton/trunk/runtime/Makefile
===================================================================
--- mlton/trunk/runtime/Makefile	2007-12-14 23:40:03 UTC (rev 6269)
+++ mlton/trunk/runtime/Makefile	2007-12-15 03:10:38 UTC (rev 6270)
@@ -114,9 +114,7 @@
 ifeq ($(findstring $(GCC_MAJOR_VERSION), 4),$(GCC_MAJOR_VERSION))
 WARNCFLAGS += -Wextra
 endif
-# -Wformat=2 implies -Wformat-nonliteral, which causes one spurious warning.
 WARNCFLAGS += -Wformat=2
-WARNCFLAGS += -Wno-format-nonliteral
 ifeq ($(findstring $(GCC_MAJOR_VERSION), 4),$(GCC_MAJOR_VERSION))
 WARNCFLAGS += -Wswitch-default -Wswitch-enum
 endif
@@ -310,30 +308,47 @@
 gc.o: gc.c $(GCCFILES) $(HFILES)
 	$(CC) $(OPTCFLAGS) $(GCOPTCFLAGS) $(OPTWARNCFLAGS) -c -o $@ $<
 
+## Needs -Wno-float-equal for Real<N>_equal, included via "c-chunk.h".
 bytecode/interpret-gdb.o: bytecode/interpret.c $(HFILES) $(BYTECODEHFILES)
 	$(CC) -I../include $(DEBUGCFLAGS) $(DEBUGWARNCFLAGS) -Wno-float-equal -c -o $@ $<
 
+## Needs -Wno-float-equal for Real<N>_equal, included via "c-chunk.h".
 bytecode/interpret.o: bytecode/interpret.c $(HFILES) $(BYTECODEHFILES)
 	$(CC) -I../include $(OPTCFLAGS) $(GCOPTCFLAGS) $(OPTWARNCFLAGS) -Wno-float-equal -c -o $@ $<
 
+
+## Needs -Wno-float-equal for Real<N>_equal;
+## needs -Wno-format-nonliteralfor Date_strfTime;
+## needs -Wno-redundant-decls for 'extern struct GC_state gcState'.
 basis-gdb.o: basis.c $(BASISCFILES) $(HFILES)
-	$(CC) -Ibasis -Ibasis/Word -Ibasis/Real $(DEBUGCFLAGS) $(DEBUGWARNCFLAGS) -Wno-redundant-decls -c -o $@ $<
+	$(CC) -Ibasis -Ibasis/Word -Ibasis/Real $(DEBUGCFLAGS) $(DEBUGWARNCFLAGS) -Wno-float-equal -Wno-format-nonliteral -Wno-redundant-decls -c -o $@ $<
+## Needs -Wno-float-equal for Real<N>_equal.
+basis/Real/Real-gdb.o: basis/Real/Real.c $(HFILES)
+	$(CC) $(OPTCFLAGS) $(OPTWARNCFLAGS) -Wno-float-equal -c -o $@ $<
+## Needs -Wno-format-nonliteralfor Date_strfTime.
+basis/System/Date-gdb.o: basis/System/Date.c $(HFILES)
+	$(CC) $(OPTCFLAGS) $(OPTWARNCFLAGS) -Wno-format-nonliteral -c -o $@ $<
 
-basis.o: basis.c $(BASISCFILES) $(HFILES)
-	$(CC) -Ibasis -Ibasis/Word -Ibasis/Real $(OPTCFLAGS) $(OPTWARNCFLAGS) -Wno-redundant-decls -c -o $@ $<
-
 %-gdb.o: %.c $(HFILES)
 	$(CC) $(DEBUGCFLAGS) $(DEBUGWARNCFLAGS) -c -o $@ $<
 
+
+## Needs -Wno-float-equal for Real<N>_equal;
+## needs -Wno-format-nonliteral for Date_strfTime;
+## needs -Wno-redundant-decls for 'extern struct GC_state gcState'.
+basis.o: basis.c $(BASISCFILES) $(HFILES)
+	$(CC) -Ibasis -Ibasis/Word -Ibasis/Real $(OPTCFLAGS) $(OPTWARNCFLAGS) -Wno-float-equal -Wno-format-nonliteral -Wno-redundant-decls -c -o $@ $<
+## Needs -Wno-float-equal for Real<N>_equal.
+basis/Real/Real.o: basis/Real/Real.c $(HFILES)
+	$(CC) $(OPTCFLAGS) $(OPTWARNCFLAGS) -Wno-float-equal -c -o $@ $<
+## Needs -Wno-format-nonliteralfor Date_strfTime.
+basis/System/Date.o: basis/System/Date.c $(HFILES)
+	$(CC) $(OPTCFLAGS) $(OPTWARNCFLAGS) -Wno-format-nonliteral -c -o $@ $<
+
 %.o: %.c $(HFILES)
 	$(CC) $(OPTCFLAGS) $(OPTWARNCFLAGS) -c -o $@ $<
 
-%-gdb.o: %.S
-	$(CC) $(DEBUGCFLAGS) -c -o $@ $<
 
-%.o: %.S
-	$(CC) $(OPTCFLAGS) -c -o $@ $<
-
 .PHONY: flags
 flags:
 	echo TARGET = $(TARGET)

Modified: mlton/trunk/runtime/platform/freebsd.c
===================================================================
--- mlton/trunk/runtime/platform/freebsd.c	2007-12-14 23:40:03 UTC (rev 6269)
+++ mlton/trunk/runtime/platform/freebsd.c	2007-12-15 03:10:38 UTC (rev 6270)
@@ -8,7 +8,7 @@
 #include "sysctl.c"
 #include "use-mmap.c"
 
-void GC_displayMem () {
+void GC_displayMem (void) {
         static char buffer[256];
 
         snprintf (buffer, cardof(buffer), "/bin/cat /proc/%d/map\n", (int)getpid ());




More information about the MLton-commit mailing list