In article <>,
Aaron W. Hsu <> wrote:
> I am hoping that the pedants from CLC can help! Basically, I am in a
> discussion elsewhere with someone who is claiming that C90 provides for
> no explicit means of getting an integer of *any* width at all. That is,
> that all integer types could be any size they want. I was always under
> the impression that the following where guarantees:
>
> char at least 8 bits
> short at least 16 bits
> long at least 32 bits
> int at least 16 bits
>
> Is this not the case?
I think you are correct.
Here's a text copy of a draft of C90:
http://flash-gordon.me.uk/ansi.c.txt
Look at section 2.2.4.2 (numerical limits)
>
> Also, another claim is that GCC in -pedantic mode does not allow bitfields
> on uint64_t types. Is this an actual restricton of C99 (not C90)? That is,
> can you only use, what are they called, natural types like long long?
> If that is the case, then does that mean that you cannot get a guaranteed
> width size for a structure using bit fields?
>
> I would appreciate some authoratative advice, as I do not have a copy
> of C90 or C99; relevant quotes from the standards would be great. I do
> not know whether I am misremembering things or if I am correct.
Not sure about that one. This page has links to the standard and its
drafts.
http://clc-wiki.net/wiki/The_C_Standard