Re: 0xdeadbeef vs 0xdeadbeefL

From: tom st denis (tomstdenis_at_yahoo.com)
Date: 07/07/04

  • Next message: Andrea Arcangeli: "Re: Unnecessary barrier in sync_page()?"
    Date:	Wed, 7 Jul 2004 11:41:50 -0700 (PDT)
    To: Gabriel Paubert <paubert@iram.es>
    
    

    --- Gabriel Paubert <paubert@iram.es> wrote:
    > > So I'd say it thinks that all of the constants are "int". In this
    > case
    > > 0xFF is greater than 127 [max for char] and 0xFFFFFFFFFFULL is
    > larger
    >
    > You are aware that this statement is plainly and simply wrong,
    > aren't you?

    That goes right up there with, um nope. The only reason why the
    compiler doesn't error about it is because it's not an error. Doesn't
    mean it's right.

    > On many platforms a "plain" char is unsigned. You can't write
    > portable
    > code without knowing this.

    Um, actually "char" like "int" and "long" in C99 is signed. So while
    you can write

    signed int x = -3;

    You don't have to. in fact if you "have" to then your compiler is
    broken. Now I know that GCC offers "unsigned chars" but that's an
    EXTENSION not part of the actual standard.

    You ought to distinguish "what my compiler does" with "what the
    standard actually says". If you want unsigned chars don't be lazy,
    just write "unsigned char".

    As for writing portable code, um, jacka#!, BitKeeper, you know, that
    thingy that hosts the Linux kernel? Yeah it uses LibTomCrypt. Why not
    goto http://libtomcrypt.org and find out who the author is. Oh yeah,
    that would be me. Why not email Wayne Scott [who has code in
    LibTomCrypt btw...] and ask him about it?

    Who elses uses LibTomCrypt? Oh yeah, Sony, Gracenote, IBM [um Joy
    Latten can chip in about that], Intel, various schools including
    Harvard, Stanford, MIT, BYU, ...

    I write code that builds on basically any box with GCC which includes
    regular PCs, Macs, Gameboys, PS2, Suns, etc, etc, etc. All without
    changes....

    Tom

                    
    __________________________________
    Do you Yahoo!?
    Take Yahoo! Mail with you! Get it on your mobile phone.
    http://mobile.yahoo.com/maildemo
    -
    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: Andrea Arcangeli: "Re: Unnecessary barrier in sync_page()?"

    Relevant Pages

    • Re: Vista security
      ... yeah. ... C being the only really "general" language I have. ... write a full C++ compiler, ... I am going to fork my code base, back track and see if I can get GCC ...
      (comp.lang.misc)
    • Re: help need in develop dll for use in pocket pc
      ... Yeah, you'll have to make some decisions. ... I think the Dinkumware library (w/ STL) is around $600. ... Intel has a compiler for eVC which is better than the one ...
      (microsoft.public.pocketpc.developer)
    • Re: assembly language and reverse engineering
      ... yeah, seems so. ... on 16 bit operands, simply ignored the upper ... my compiler sacrifices a little bit of performance being unsure what is ... I feel a little uncertain that the primary use for parallelism is ...
      (alt.lang.asm)
    • Re: 2004-2006 EXEblah 2 years uncracked
      ... It was someone commenting on a good product and ... Should I ask which commercial C compiler works best? ... Yeah, it also means I have integrity and a moral compass. ... recently offered work at ATI [they tried to poach me from my current ...
      (sci.crypt)
    • Re: 0xdeadbeef vs 0xdeadbeefL
      ... Yeah it uses LibTomCrypt. ... the Al Viro of sci.crypt has met the Al Viro of... ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)