This is the mail archive of the insight@sourceware.org mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] print format does not match argument type


 
Roland Schwingel wrote:

> The TYPE_FIELD_TYPE macro returns a pointer to a struct type.
> Treating this as (unsigned) long is pretty correct on *nix style
> systems but not on windows. On 64bit windows a long is still 4 bytes
> long, so the downcasted value is simply wrong.

I think I've found the universal (well: almost!) coding:

Use format "%llx" and cast arg to (unsigned long long): This is C99 and
supported by MSVC, at least since 2005. Not OK for C89 :-(

I hope it helps.

Patrick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]