[Vm-dev] why using asUnsignedLong in writeScavengeLog
nicolas.cellier.aka.nice at gmail.com
Tue Dec 25 22:06:25 UTC 2018
I wonder why to print (manager statSGCDeltaUsecs asUnsignedLong) rather
than just (manager statSGCDeltaUsecs) in
The compiler barks:
Avertissement C4477 'fprintf' : la chaîne de format '%lld' nécessite
un argument de type '__int64', mais l'argument variadique 5 est de type
'unsigned long' SqueakCogSpur
The former indeed truncates 64bits sqInt to 32 bit unsigned int but the
format PRIdSQINT expects a 64bits signed int... Doesn't the variadic
implementation stacks/unstacks the arguments, and isn't passing a longer or
a shorter type potentially problematic?
The later would just do the right thing in 64 bits, and I think in 32 bits
too. Or do I miss something? What was the intention?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev