Re: 0xdeadbeef vs 0xdeadbeefL

From: tom st denis
Date: Wed Jul 07 2004 - 13:49:38 EST


--- viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
> Exercise:
> 1) what type does an integer constant 0xdeadbeef have on a platform
> with INT_MAX equal to 0x7fffffff and UINT_MAX equal to 0xffffffff?
> 2) when does the situation differ for integer constant 3735928559?
>
> Oh, and do read the part of C standard in question. Hint: extra
> restrictions
> are placed on decimal constants, not on the octals and hexadecimals.

That may be true but what does it hurt to imply the dimensions ahead of
time? You meant an unsigned long constant so add the UL suffix.

Tom



__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
-
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/