Article View: gnu.misc.discuss
Article #1867Re: Coding Standards are ignorant
From: Stan Ryckman
Date: Mon, 18 Mar 1996 20:29
Date: Mon, 18 Mar 1996 20:29
32 lines
1594 bytes
1594 bytes
In article <MIB.96Mar18105957@gnu.ai.mit.edu>, Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu> wrote: >In article <4ifq40$i87@sundog.tiac.net> stanr@tiac.net (Stan Ryckman) writes: [snip] > [re Posix.2] [snip] > Can't you safely do this with casting to the (possibly unsigned) long > type? e.g., > pid_t whatever; > ... > printf( "%lu\n", (unsigned long) whatever); > A pain, but hardly a "can't". > >You are not guaranteed that long is the widest integral type. At the risk of re-starting the ages-old "long long" debate, I can't find anything in the ANSI standard that permits this. I don't have a Posix standard. (All that's needed for printing whatever_t types would be confirmation that they are no larger than unsigned long. I think that allowing them to be larger would break ANSI even if "long long" were an allowed extension.) <now running to edge of ring and tagging experts to jump in> Cheers, Stan. -- Stan Ryckman (stanr@tiac.net) (Apologies for non-responses or late responses to some posts; .newsrc was trashed and I'm trying to get it back to where it was.)
Technical Details
Message-ID:
<4ikh3o$2kv@sundog.tiac.net>Path:
arc1-ca.pugleaf.net!sundog.tiac.net!stanrReferences:
<4gum82$14v4@info4.rus.uni-stuttgart.de> <MIB.96Mar16174948@gnu.ai.mit.edu> <4ifq40$i87@sundog.tiac.net> <MIB.96Mar18105957@gnu.ai.mit.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sundog.tiac.net!stanr From: stanr@tiac.net (Stan Ryckman) Newsgroups: gnu.misc.discuss,comp.std.c Subject: Re: Coding Standards are ignorant Date: 18 Mar 1996 20:29:44 GMT Organization: Amber & Sneakers Fan Club Message-ID: <4ikh3o$2kv@sundog.tiac.net> References: <4gum82$14v4@info4.rus.uni-stuttgart.de> <MIB.96Mar16174948@gnu.ai.mit.edu> <4ifq40$i87@sundog.tiac.net> <MIB.96Mar18105957@gnu.ai.mit.edu> NNTP-Posting-Host: sunspot.tiac.net