[MLton] commit r4899: Announcing merge of x86_64 branch revisions into trunk

Matthew Fluet fluet at cs.cornell.edu
Mon Dec 4 07:07:36 PST 2006


> I just compiled MLton on MinGW and ran bin/regression (*).  The main issue
> I noticed that there was a (presumably harmless) warning while compiling the
> runtime:
>
> gcc -std=gnu99 -I. -Iplatform  -O2 -fomit-frame-pointer -falign-loops=2 -falign-jumps=2 -falign-functions=5  -pedantic -Wall -W
> -Wformat=2 -Wno-format-nonliteral -Wuninitialized -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual
> -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
> -Wmissing-noreturn -Wmissing-format-attribute -Wpacked -Wredundant-decls -Wnested-externs -Wlong-long  -Wdisabled-optimization
> -Winline -c -o util.o util.c
> In file included from ./util.h:39,
>                 from util/assert.c:8,
>                 from util.c:8:
> ./util/read_write.h: In function `writeUintmaxU':
> ./util/read_write.h:64: warning: ISO C does not support the `I64' printf length modifier
> ./util/read_write.h: In function `writeUintmaxX':
> ./util/read_write.h:79: warning: ISO C does not support the `I64' printf length modifier
> ./util/read_write.h:81: warning: ISO C does not support the `I64' printf length modifier
> ./util/read_write.h:83: warning: ISO C does not support the `I64' printf length modifier
>
> As util.h seems to be included from almost everywhere, the above warning
> gets repeated many times.  The GCC version is "3.4.5 (mingw special)".

We ran into this issue previously, and had added a case to the runtime 
Makefile:

# GCC doesn't recognize the %I64 format specifier which means %ll on windows
ifeq ($(TARGET_OS), mingw)
WARNCFLAGS += -Wno-format -Wno-missing-format-attribute
endif

However, we were setting WARNCFLAGS after having built OPTWARNCFLAGS and 
DEBUGWARNCFLAGS.  This worked with the old 'lazy' make variables, but not 
with the 'strict' make variables.  I've checked in a change that sets the 
platform specific WARNCLFLAGS before assigning OPTWARNCFLAGS and 
DEBUGWARNSCFLAGS.  I believe that this should quell the warning.



More information about the MLton mailing list