[bitc-dev] C interfacing vs. portability

Philipp Klaus Krause pkk at spth.de
Thu Feb 26 13:32:16 EST 2009


Rick R schrieb:
> Would it be bad to rely on the C (Posix?) standard: <types.h> and the
> int32_t int64_t etc.

While the meaning of "int32_t", etc is defined by the C standard for
machines where they are available, the C standard does not require them
to be supported everywhere. A machine that does not have an efficient
way of operating with 32 bit quantities won't offer int32_t.
IMO these types are only useful for really low-level stuff that's
nonportable anyway. For portable code I use int_least32_t, int_fast32_t,
etc instead.

Philipp


More information about the bitc-dev mailing list