integer and long max/min values

From: Jay Sern Liew (liew_at_jaysern.org)
Date: 11/21/03

  • Next message: Christopher Vance: "Re: integer and long max/min values"
    Date: Thu, 20 Nov 2003 22:39:05 -0600 (CST)
    To: freebsd-hackers@freebsd.org
    
    

    how do I find out the maximum (and minimum) value a long and int will hold
    in C? (before it overflows or underflows)

    if it's compiler-dependent, then does anyone know where I can find the GCC
    documentation for stuff like that?

    thanks.

    ________________________________________________________________________
    Jay Sern Liew
    jaysern@{acm,ieee}.org
    gpg --keyserver pgp.mit.edu --recv-keys 0xA115A33F

    pub 1024D/A115A33F 2003-01-02 Jay Sern Liew <liew@jaysern.org>
         Key fingerprint = B08E 2481 B4CE 284A C0DE E359 8646 7B7E A115 A33F
    sub 1024g/7504C197 2003-01-02 [expires: 2003-12-31]
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Christopher Vance: "Re: integer and long max/min values"

    Relevant Pages

    • Re: integer and long max/min values
      ... >how do I find out the maximum value a long and int will hold ... (before it overflows or underflows) ... >if it's compiler-dependent, then does anyone know where I can find the GCC ...
      (freebsd-hackers)
    • Re: how can I find out all the unused functions?
      ... > declared function is not called in the program. ... This is completely compiler-dependent. ... > int Nouse(); ... > int Nouse() ...
      (comp.lang.c)
    • Re: rand() / (RAND_MAX / N + 1)
      ... George Huber wrote: ... so the way I understand the problem is that (6 * rand()) is ... greater then an int therefore it overflows. ...
      (alt.comp.lang.learn.c-cpp)
    • Re: rand() / (RAND_MAX / N + 1)
      ... George Huber wrote: ... so the way I understand the problem is that (6 * rand()) is ... greater then an int therefore it overflows. ...
      (alt.comp.lang.learn.c-cpp)
    • "Re: rand() / (RAND_MAX / N + 1)"
      ... George Huber wrote: ... so the way I understand the problem is that (6 * rand()) is ... greater then an int therefore it overflows. ...
      (alt.comp.lang.learn.c-cpp)