Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe08.iad.POSTED!00000000!not-for-mail Newsgroups: comp.std.c Subject: Re: PRI* considered harmful User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (berkeley-unix) References: <87mxgqhk3x.fsf@once.weird.com> <8762ndhnfs.fsf@once.weird.com> <87oc15g10i.fsf@once.weird.com> <87zkkpef5z.fsf@once.weird.com> <87r560c6pp.fsf@once.weird.com> <97rmoaFc7oU1@mid.dfncis.de> <97rom4Fqt5U1@mid.dfncis.de> From: "Greg A. Woods" X-Face: .}E4CW({2'v<\JefgY&(9#RJD?~_7.KTC$+RklqwlB/<)^)~X0i*J?m)SXpHA8'9FHn5Fz*eVTH5=_C>]XK#"dLOyD`#tbEh1_8v-hwwR{.X)+b-!\4mM] 1HqG#"@VSI$1MNvRk\4>qsCclW|Ns4V/2poz=gS-+~m8\%5eVq]a\3.>T>U/f8A Message-ID: <87ei1zc8qn.fsf@once.weird.com> Cancel-Lock: sha1:7aJfB+709o2MSN2RiOZz2bDCPsk= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 21 NNTP-Posting-Host: 24.67.98.78 X-Complaints-To: internet.abuse@sjrb.ca X-Trace: newsfe08.iad 1310255552 24.67.98.78 (Sat, 09 Jul 2011 23:52:32 UTC) NNTP-Posting-Date: Sat, 09 Jul 2011 23:52:32 UTC Date: Sat, 09 Jul 2011 16:52:32 -0700 Xref: x330-a1.tempe.blueboxinc.net comp.std.c:697 Keith Thompson writes: > > The proposal in the article that started this thread was to add > things like "%Si" to printf, something that could be done in a > backward-compatible manner. One problem with that proposal is that > it would require integer types with the same size and signedness to > be passed identically as variadic arguments, something the standard > doesn't currently require. Thanks! I hadn't considered the narrower-than-int issues and the default promotion rules yet, but I think those too can be hidden transparently within the INTPARAM() macro. I think I should probably do a proper implementation and test it more completely. -- Greg A. Woods RoboHack living on the edge http://www.robohack.ca/