Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: Pedants, please help on integer types

Thread Tools

Re: Pedants, please help on integer types

Posts: n/a
In article <(E-Mail Removed)>,
Aaron W. Hsu <(E-Mail Removed)> 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:

Look at section (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
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Pedants, please help on integer types Keith Thompson C Programming 1 08-05-2012 09:56 PM
Standard integer types vs <stdint.h> types C Programming 163 01-28-2008 03:21 PM
CType(x,Integer) vs. Integer.Parse(x) =?Utf-8?B?Sm9l?= ASP .Net 7 02-07-2006 02:30 AM
please help... learn C++ please please please :) KK C++ 2 10-14-2003 02:08 PM
No Math.min(Integer, Integer)? =?ISO-8859-1?Q?Thomas_Gagn=E9?= Java 0 07-29-2003 07:46 PM