Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c    |    Meh, in C you gotta define EVERYTHING    |    243,242 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 242,912 of 243,242    |
|    David Brown to bart    |
|    Re: printf and time_t    |
|    08 Jan 26 17:13:21    |
      From: david.brown@hesbynett.no              On 07/01/2026 02:14, bart wrote:       > On 07/01/2026 00:44, James Kuyper wrote:       >> On 2026-01-06 13:05, Michael S wrote:       >       >>> in case of using %u to print 'unsigned long' on target with 32-bit       >>> longs, or like using %llu to print 'unsigned long' onĀ target with       >>> 64-bit longs, then beauty wins. Easily.       >>       >> You've got it backwards. "%u" is the correct specifier to use for       >> unsigned long on all platforms, whether unsigned long is 32, 36, or even       >> 48 bits.       >       > So not "%lu"?       >       >              "%lu" is, as you point out, the correct specifier for "unsigned long".              James made a mistake here - it's unusual for him, but we are all       fallible. That is why it is a good idea to enable whatever static       warnings you can get from a compiler, as long as they don't conflict       with your particular coding style. And that is why it is madness for       Michael to disable something as useful as printf format checking just       because he thinks "%lu" is "ugly".              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca