Re: 0xdeadbeef vs 0xdeadbeefL
viro_at_parcelfarce.linux.theplanet.co.uk
Date: 07/07/04
- Previous message: Wen-chien Jesse Sung: "Re: 2.6.7+BK bad: scheduling while atomic! (ALSA?)"
- In reply to: tom st denis: "Re: 0xdeadbeef vs 0xdeadbeefL"
- Next in thread: tom st denis: "Re: 0xdeadbeef vs 0xdeadbeefL"
- Reply: tom st denis: "Re: 0xdeadbeef vs 0xdeadbeefL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 7 Jul 2004 04:00:29 +0100 To: tom st denis <tomstdenis@yahoo.com>
On Tue, Jul 06, 2004 at 05:06:12PM -0700, tom st denis wrote:
> --- David Eger <eger@havoc.gtf.org> wrote:
> > Is there a reason to add the 'L' to such a 32-bit constant like this?
> > There doesn't seem a great rhyme to it in the headers...
>
> IIRC it should have the L [probably UL instead] since numerical
> constants are of type ``int'' by default.
>
> Normally this isn't a problem since int == long on most platforms that
> run Linux. However, by the standard 0xdeadbeef is not a valid unsigned
> long constant.
... and that would be your F for C101. Suggested remedial reading before
you take the test again: any textbook on C, section describing integer
constants; alternatively, you can look it up in any revision of C standard.
Pay attention to difference in the set of acceptable types for decimal
and heaxdecimal constants.
-
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/
- Previous message: Wen-chien Jesse Sung: "Re: 2.6.7+BK bad: scheduling while atomic! (ALSA?)"
- In reply to: tom st denis: "Re: 0xdeadbeef vs 0xdeadbeefL"
- Next in thread: tom st denis: "Re: 0xdeadbeef vs 0xdeadbeefL"
- Reply: tom st denis: "Re: 0xdeadbeef vs 0xdeadbeefL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|