[MLton] [PATCH] Review this patch and try it on other platforms, please (Kill runtime warnings)

Jesper Louis Andersen jesper.louis.andersen at gmail.com
Sun Nov 25 16:39:57 PST 2007


The attached patch is a little something I toyed with over the
weekend. The goal was
to remove all warnings from the C runtime, so it compiles cleanly.

First, there was a missing prototype decl. inside the FreeBSD #ifdef.

Then, we throw -Wno-float-equal on Real.c in the runtime. I had preferred
a #pragma, but it looks like gcc can't do that :/

Another check handles gnu89-style inlines and quells warnings on libgmp.

While here hacking makefiles, add an 'etags' and 'ctags target (I just
saw it has a wrong
.PHONY decl. if I get a "commit it!" that will be fixed).

Finally, a POSIX ioctl() has a 'request' parameter which is an
unsigned long rather than a signed
long. There was a warning because FreeBSD is using the highest bit for
something in there, so one
can't just stuff it inside a signed long and hope for the best. This
fix leaks into the
basis library SML code and I would like some review on it, because I
don't really feel completely
at home in the MLton source code.

The code here probably needs more testing before it goes in, but this
is a start at least.

As for GCC version: FreeBSD 7 is gcc 4.2.1 + Patches. Would it be beneficial to
define a "least version" of gcc? I would think so, since we can then
clean up a lot of
stuff in the Makefiles. The only thing I am concerned about is the
various Linux distributions
that might still run a 3.x version of gcc.

J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freebsd-7-warning.patch
Type: text/x-patch
Size: 14178 bytes
Desc: not available
Url : http://mlton.org/pipermail/mlton/attachments/20071126/f502ecfc/freebsd-7-warning.bin


More information about the MLton mailing list