Subject: Re: gcc-ansi -pedantic and long long on NetBSD
To: Chris G. Demetriou <cgd@alpha.bostic.com>
From: Alan Barrett <barrett@daisy.ee.und.ac.za>
List: current-users
Date: 10/30/1994 21:50:09
> > 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.)

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
ints.

> > 3. Give up the idea of using -pedantic in XFree86 (It may be hard if
> >    NetBSD is the only OS with this problem).

I would suggest using -pedantic, but ignoring complaints about
"long long" in system include files.

--apb (Alan Barrett)