Oh, a couple bits of info:

size_t is an unsigned int if the size of a long is 32 bits (the case with
either -o32 or -n32). size_t is an unsigned long if the size of a long is 64
bits (the case with -64). (There isn't any integral (as opposed to floating
- long doubles) type larger than a size_t in a -64 bit compile, in other
words. On the other hand, there is a type larger than a size_t
available with a -n32 bit compile: long
long/__int64_t/__uint64_t/__long_long. Registers are 64 bits with -n32
compliations, as are some types like off_t.) On reading over the p5p
discussion earlier on this flag:

  #include <stdio.h>
  #include <stdlib.h>
  
  #define WRAP_CHECK(n) ((n) > (size_t) ~0 ? "not " : "")
  
  int main(void)
  {
    int      i = 42;
    unsigned u = 42;
    printf("%sok, %sok\n", WRAP_CHECK(i), WRAP_CHECK(u));
    return 0;
  }

The above test program, which had demonstrated a complier bug in the Borland
C++ 5.5.1 complier, returns "ok, ok" on a cc -n32 compile on a (n)32-
machine; ditto on a cc -n32 compile on a 64-bit machine; ditto for cc -64;
ditto for cc -32, for that matter. So that doesn't appear to be it.

      -Allen

-- 
Allen Smith                       http://cesario.rutgers.edu/easmith/
February 1, 2003                               Space Shuttle Columbia
Ad Astra Per Aspera                     To The Stars Through Asperity

Reply via email to