tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] casting bug?


From: Felix Nawothnig
Subject: Re: [Tinycc-devel] casting bug?
Date: Tue, 12 Jul 2005 16:23:53 +0200
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)

Alexander Strasser wrote:
  This no-guarantee-about-sizes-in-C thing begins to hurt nowadays ;)

ANSI C89 guarantees quite some stuff about sizes:

At least 8 bit for chars, at least 16 bit for shorts and ints, and at least 32 bit for longs (and I guess ISO C99 adds at least 64 bit for long longs).

It also guarantees that sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long). (again I guess ISO C99 adds <= sizeof(long long))

And then there are the fixed size types in ISO C99 ofcourse...

Maybe it is really best to use special types like int_fast32_t
these times... (or role your own set of types to replace them
with the appropriate type depending on compiler and arch).

There is no such thing as a fast 32bit integer on sane (read: non x86-64) 64bit architectures.

Felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]