RE: [PATCH] print format does not match argument type
"Patrick Monnerat" <[email protected]> Tue, 10 Apr 2012 18:08:32 +0200
| Newsgroups | gmane.comp.debugging.insight |
|---|---|
| Message-ID | <AB5E58B87EB73C46A38073D8F459F113D9F886@dataspheresrv01> |
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