long long, C++ testsuite and -ansi -pedantic-errors

Geoff Keating geoffk@cygnus.com
Tue Jun 13 11:30:00 GMT 2000

Mike Stump <mrs@windriver.com> writes:

> > Date: Tue, 13 Jun 2000 04:00:54 +0200
> > From: Marc Espie <espie@quatramaran.ens.fr>

> > It might be that you are on opposing branches off the committee.  I
> > don't think gcc/g++ should be a battling ground for the committee.
> > If it's not part of the current standard, and if there is a
> > controversy, even amongst the committee members, about whether it
> > will be part of the next standard or not, then -ansi -pedantic
> > should warn.
> And if there is no controversy, or if the only controversy comes from
> ignorance?

Unless you have a genuine, final copy of the standard that includes a
feature, the feature is not in the standard.  It's not a matter of
opinions or debate, all you have to do is find a copy of the standard
and read it (and then, of course, debate endlessly what the standard
really means when there are parts that are unclear, but I don't think
this is one of those times).

I would suspect that including 'long long' in the library will often
cause the library to be no longer standards-conforming.  In that case
you'll want to take it out, at least when -ansi is specified.
Otherwise, I would suggest using __extension__ to suppress the error
or warning.  See for instance how glibc deals with 'long long' in its
C89-conformant mode.
- Geoffrey Keating <geoffk@cygnus.com>

More information about the Gcc mailing list