Subject: Re: gcc-ansi -pedantic and long long on NetBSD
To: Alan Barrett <firstname.lastname@example.org>
From: Chris G. Demetriou <email@example.com>
Date: 10/30/1994 15:09:48
> > > 1. Fix gcc so the -pedantic doesn't choke on long long anymore (I
> > > suppose that some ANSI version of C will support 64bit ints)
> > This is probably the solution. it's unclear that ANSI will support
> > 64bit ints in any reasonable fashion, though.
> ANSI C supports signed and unsigned flavours of char, short, int and long.
> ANSI C does not support "long long", and gcc -ansi -pedantic is right to
> warn about it.
> ANSI C requires chars to be at least 8 bits, shorts to be at least 16
> bits, ints to be at least 16 bits, and longs to be at least 32 bits. It
> permits these types to be larger than the minimum sizes. (Actually,
> ANSI/ISO 9899-1990 defines the minimum requirements in terms of ranges of
> representable values, rather than in terms of numbers of bits.)
i'm aware of all of these things.
> Apart from a possible desire to support broken code that assumes ints and
> longs are each 32 bits, I see no reason why a C implementation that
> desires to support 64-bit integers should not use 64-bit longs and 32-bit
And i'm aware of, and agree with this.
HOWEVER, the problem is that ANSI C give you no way of specifying
explicit-length data types.
file offsets are 64 bits. how do you specify that (using an integral
type) in ANSI C, without forcing 'long' to be 64 bits on 32-bit