[Mono-devel-list] (AMD64) Compiler Warnings (2)

Willibald Krenn Willibald.Krenn at gmx.at
Thu Dec 2 14:01:46 EST 2004


After looking at glib, it seems that gssize is like intptr_t and changes 
size between 32 and 64 bit code. I probably could use that as 
replacement and get rid of stdint.h..
But as glib docs just mention 'An unsigned 32-bit integer intended to 
represent sizes of data structures.' as description for gssize, I stuck 
to uintptr_t. Note, that I added a test for stdint.h to the configure.in 
script and based on the result a definition is generated in config.h..

Durig examination of the compiler warnings, I've also seen lots code 
that does printf("%x",<typesize changes between 32 and 64 bits..>). 
Therefore I added following definitions to my global header file

#define d_INT_PTR_T "d" or "ld"
#define d_INT_64    "lld" or "ld"
#define u_INT_PTR_T "u" or "lu"
#define u_INT_64    "llu" ...
#define x_INT_PTR_T "x" ...
#define x_INT_64    "llx" ...

and replaced the printf arguments where needed.

BTW: I only modified mini (plus surroundings), but did not introduce any 
changes to mint, mono-jni and other modules..

Unfortunately my patch already is 10.2 KB (compressed!) in size - so I 
would be glad if someone of the jit-hackers could comment on it. (Zoltan?)

P.S.: I've also fixed some cases where header files were not #included 
in c files and one case where the function prototype wasn't available in 
the header.
Hope you like it.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: intps.h
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041202/f862341b/attachment.h 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clean64_0212_mono.diff.gz
Type: application/x-gzip
Size: 10495 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041202/f862341b/attachment.gz 

More information about the Mono-devel-list mailing list