Re: 0xdeadbeef vs 0xdeadbeefL

viro_at_parcelfarce.linux.theplanet.co.uk
Date: 07/07/04

  • Next message: viro_at_parcelfarce.linux.theplanet.co.uk: "Re: 0xdeadbeef vs 0xdeadbeefL"
    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/


  • Next message: viro_at_parcelfarce.linux.theplanet.co.uk: "Re: 0xdeadbeef vs 0xdeadbeefL"

    Relevant Pages

    • Re: WINE + NX (No eXecute) support for x86, 2.6.7-rc2-bk2
      ... if there is no standard, ... > If you don't care about binary compatability, ... At least some people out there seem to care about it. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: kernel header separation
      ... I don't have a copy of the new standard but I have ... While these may LOOK like identical statements, Linux is ... making a significantly stronger statement. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
      ... > If we are following the standard and trying to set up a timer, ... Yes, adding *LATCH to xtime in each timer interrupt, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: arch/xen is a bad idea
      ... > The other key area is that our top priority is to decrease the ... > number of files we need to modified from standard i386. ... and in parallel track a changing target ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: UDP recvmsg blocks after select(), 2.6 bug?
      ... If they do shrink at ... In fact, on Linux, ... What's relevant is what the standard ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)