[MLton] Port to HP-UX
Ville Laurikari
ville@laurikari.net
Tue, 25 Apr 2006 21:50:20 +0300
On Tue, Apr 25, 2006 at 11:26:10AM -0700, Stephen Weeks wrote:
> 1. Change our typedef for "pointer" to be void* instead of char*.
> 2. The other is to cast through a union.
>
> I tried (1) just to see how many problems it would cause. It was
> actually surprisingly easy -- I've appended the patch to the end of
> this message. (2) is awfully verbose, so if (1) is actually correct
> in terms of C aliasing rules, I'd prefer to go that way.
>
> Ville, could you try the patch and see if it makes your warnings go
> away?
Unfortunately, I'm still getting the same warnings with your patch
applied:
gcc -std=gnu99 -O2 -Wall -I. -Iplatform -D_FILE_OFFSET_BITS=64 -fomit-frame-pointer -c -o gc.o gc.c
gc.c: In function 'foreachGlobal':
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
--
http://www.iki.fi/vl/