From: already5chosen@yahoo.com   
      
   On Sun, 11 Jan 2026 15:23:35 -0800   
   Keith Thompson wrote:   
      
   > Michael S writes:   
   > >   
   > > To be fair, it is not ideal.   
   > > The solution that I would prefer would be universal adaption of   
   > > Microsoft's size specifiers I32 and I64. They are not going to win   
   > > beauty competition, but in practice they are a lot more convenient   
   > > to use than standard macros and are equally good at carrying   
   > > programmer's intentions.   
   >   
   > The relative beauty of a feature that isn't available hardly seems   
   > relevant.   
   >   
   > The ideal solution is to write correct, and preferably portable,   
   > code in the first place. There are often good reasons to write   
   > non-portable code, but I suggest that fiding the correct format   
   > string to be ugly is not one of them.   
   >   
   > (Microsoft's documentation says that "I32" prefix applies to an   
   > argument of type __int32 or unsigned __int32. I don't know whether   
   > __int32 is compatible with int, with long, or neither, and I don't   
   > much care. I don't know what Microsoft guarantees about printf   
   > with incompatible types that happen to have the same size.)   
   >   
      
   Microsoft guarantees that __int32 is compatible with int32_t and that   
   'unsigned __int32' is compatible with uint32_t. The same goes for 64-bit   
   types.   
   That's sufficient for safe use of format specifier "%I32u" when   
   printing uint32_t variables.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|