lkml.org 
[lkml]   [1999]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Q: void* vs. unsigned long (fwd)
    Date
    From
    > > The 1st bullet indicates that rank is independant of representation and if
    > > you look at the definitions within <limits.h> (5.2.4.2.1) you'll see that
    > > signed char is at least 8 bits long
    > > short int is at least 16 bits long
    > > int is at least 16 bits long
    > > long is at least 32 bits long
    > > long long is at least 64 bits long
    > >
    >
    > That's not exactly the definitions I've learnt:

    the ones you've learned are wrong.

    > It should be assumed that:
    >
    > char *is* 8 bits
    > short int *is* 16 bits
    > int is the size of int nativly handled by your CPU: can be anything
    > long *is* 32 bits
    > long long *is* 64 bits

    Unfortunately, the standards say "at least xx bits long." This is
    sometimes rather inconvenient, but it is the state of things.
    --
    Kevin L. Mitchell <klmitch@mit.edu>
    ------------------------- -. .---- --.. ..- -..- --------------------------
    http://web.mit.edu/klmitch/www/ (PGP keys availiable from here)
    RSA AE87D37D/1024: DE EA 1E 99 3F 2B F9 23 A0 D8 05 E0 6F BA B9 D2
    DSS ED0DB34E/1024: D9BF 0E74 FDCB 43F5 C597 878F 9455 EC24 ED0D B34E
    DH 2A2C31D4/2048: 1A77 4BA5 9E32 14AE 87DA 9FEC 7106 FC62 2A2C 31D4


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

    \
     
     \ /
      Last update: 2005-03-22 13:50    [W:2.849 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site