On Wed, Dec 27, 2000 at 10:46:03AM -0500, Philip Newton wrote:
> So a native int could be 8 bits big? I think that's allowed according to
> ANSI.

ANSI/ISO C states:
  char <= short <= int <= long

  char  >=  8 bits
  short >= 16 bits
  int   >= 16 bits
  long  >= 32 bits

C99 adds "long long", which is >= long, and is at least 64 bits large.

I'd be in favor of defining Perl's "native int" type to be at least
32 bits long.  I would recommend against using the compiler's default
int type in all cases, as there are compilers which define int as 16
bits for backwards compatability reasons.  (As opposed to 16 bits being
the native word size of the architecture.)

                      - Damien

Reply via email to