Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!nx01.iad01.newshosting.com!newshosting.com!216.196.98.142.MISMATCH!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe14.iad.POSTED!00000000!not-for-mail Newsgroups: comp.std.c From: "Greg A. Woods" 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> <87hb6xgie8.fsf@araminta.anjou.terraraq.org.uk> 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: <87vcvcc75o.fsf@once.weird.com> Cancel-Lock: sha1:jf0BgnDZNXm61X+mXFATrwT59Xc= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 36 NNTP-Posting-Host: 24.67.98.78 X-Complaints-To: internet.abuse@sjrb.ca X-Trace: newsfe14.iad 1310192068 24.67.98.78 (Sat, 09 Jul 2011 06:14:28 UTC) NNTP-Posting-Date: Sat, 09 Jul 2011 06:14:28 UTC Date: Fri, 08 Jul 2011 23:14:27 -0700 Xref: x330-a1.tempe.blueboxinc.net comp.std.c:670 Richard Kettlewell writes: > "Greg A. Woods" writes: >> Keith Thompson writes: > >>> I suggest that, at least in this specific case, you're looking for >>> problems that are unlikely to exist in any real implementation. >> >> You mean like in some versions GNU/Linux, or more specifically, I think, >> some(all?) versions of glibc where PRId32 is "%ld" even on 32-bit >> systems with 32-bit ints and where int32_t is a "signed int"? At least >> as far as I can tell. (I don't generally use GNU/Linux, and I despise >> glibc for many other reasons than this :-)) > > Glibc on 32-bit Linux has int32_t = signed int and PRId32 = %d. I've seen dozens of examples in internet searches where PRId32 is "ld" on many kinds of GNU/Linux distributions. Even the manual page prid32(3) says so in representative examples that I've bothered to look at. (google's "lucky one" at the moment is this one ) Where did you find it to be just "d"? (I'm asuming you mean just "d", not really "%d" :-)) I couldn't quite work out whether int32_t was usually "signed int" or not though without getting a login on a representative machine to compile some test code on, but that's what I was assuming. -- Greg A. Woods RoboHack living on the edge http://www.robohack.ca/