This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.
On Sat, 6 Feb 1999 13:31:20 +0100, Marc Espie wrote: >On Fri, Feb 05, 1999 at 08:55:28PM -0500, Zack Weinberg wrote: >> If sizeof (long long) == sizeof (long) on openbsd-alpha, it should work >> anyway - i.e. %ld, %lld, and %qd should be interchangeable. What problems >> are you seeing? > >Warnings when using __attribute((format(printf,...)) > >> (Note this is a libc issue, not a compiler issue, unless your problem is >> with gcc's format checking.) > >Precisely... >I probably wasn't clear enough in my message, wasn't I ? It makes sense now. I can make a case for fixing gcc or for changing your definition of quad_t: - %qd is defined to print a 64 bit quantity, so if long is 64 bits, then we shouldn't warn when %qd is used to print something with base type long. - but long isn't 64 bits everywhere, so portable code must use int64_t and/or long long to get 64 bits reliably; therefore %qd and %lld should warn when given something with base type long. It really boils down to whether you think `long long' is an abomination or not. zw