Re: 0xdeadbeef vs 0xdeadbeefL

From: Ray Lee
Date: Wed Jul 07 2004 - 01:13:53 EST


On Tue, 2004-07-06 at 22:58, Alexandre Oliva wrote:
> Are you sure? I've seen K&R C compilers for 32-bit platforms in which
> 0xdeadbeef had type *signed* int, as opposed to unsigned int.

K&R pre-ANSI (i.e., K&R first edition) allowed this. K&R second edition,
a.k.a. ANSI C clarifies this substantially, as per my previous two
messages on the topic.

> I thought the preference for an unsigned type in this case was
> introduced in ISO C90, but it might as well have been a bug in that
> compiler. Although I'm told other compilers display similar behavior.

File a bug.

Ray

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