Re: SPAM[RBL] Re: C99 types VS Linus types

Jamie Lokier (jamie@shareable.org)
Mon, 7 Jul 2003 00:08:23 +0100


Bernardo Innocenti wrote:
> On Sunday 06 July 2003 14:23, Philippe Elie wrote:
> > alpha user space .h define uint64_t as unsigned long,
> > include/asm-alpha/types.h defines it as unsigned long long.
>
> Why is that? Isn't uint64_t supposed to be _always_ a 64bit
> unsigned integer? Either the kernel or the user space might
> be doing the wrong thing...

uint64_t is always a 64-bit type, and in the case given the compiler
emits a warning but the code runs ok.

The problem is that "64-bit long" and "64-bit long long" are different
types with the same representation. Which means they are mostly
interchangeable, with occasional C weirdness.

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/