[MLton] Port to HP-UX

Ville Laurikari ville@laurikari.net
Mon, 24 Apr 2006 19:21:16 +0300


--aVD9QWMuhilNxW9f
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Vesa Karvonen wrote:
> Quoting Ville Laurikari <ville@laurikari.net>:
> > gc.c: In function 'GC_display':
> > gc.c:343: warning: format '%u' expects type 'unsigned int', but argument 9 has type 'long int'
> > gc.c:343: warning: format '%d' expects type 'int', but argument 10 has type 'long int'
> > gc.c:349: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'long int'
> > gc.c:349: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'long int'
> >
> > It seems that on this platform, pointer arithmetic gives a result of
> > type 'long int' rather than 'int'.
>
> To format a 'ptrdiff_t' value, the 't' length modifier should be used:

A-ha!  I was unaware of this modifier.  I made a new version of the
patch (attached) which uses the 't' modifier.  The format string is
still split to multiple lines, I think it makes it a bit more
readable.

I'm still getting warnings like this:

gc.c:628: warning: dereferencing type-punned pointer will break strict-aliasing rules
gc.c:629: warning: dereferencing type-punned pointer will break strict-aliasing rules
gc.c:630: warning: dereferencing type-punned pointer will break strict-aliasing rules
gc.c:631: warning: dereferencing type-punned pointer will break strict-aliasing rules

I just noticed I don't get these on Linux.  The Makefile for runtime
uses -fno-strict-aliasing on certain files.  Should it be added for
gc.c on HP-UX?

-- 
http://www.iki.fi/vl/

--aVD9QWMuhilNxW9f
Content-Type: application/x-gunzip
Content-Disposition: attachment; filename="mlton-20051202-hpux.patch.gz"
Content-Transfer-Encoding: base64

H4sICDL5TEQAA21sdG9uLTIwMDUxMjAyLWhwdXgucGF0Y2gA7Vx7d9pIsv/b/hS95CThbfEw
2HicHYKxzV3bcABfZ3cyR0dGDWgsJFYSdnwz/u63qrv1FiBi79k9e8JkDHQ9uru6qvpXrbZV
bTolJYuUnrT7FSmVDPpUmmo6JQvdMY1SVZIOK1WpenCv2Jpd0rV7S7GeDxaaPTlYWtpCc7RH
WrYXeoS/tFScyZyqW+X2S6XSr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