This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Standards compliant preprocessor arithmetic
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Cc: Geoff Keating <geoffk at geoffk dot org>, <gcc-patches at gcc dot gnu dot org>, Zack Weinberg <zack at codesourcery dot com>
- Date: Mon, 27 May 2002 18:50:15 +0100 (BST)
- Subject: Re: Standards compliant preprocessor arithmetic
On Mon, 27 May 2002, Neil Booth wrote:
> > > We could have the GNU versions of c89 and c94 use intmax_t.
> > > Does that sound OK?
> >
> > The test for long long support is -pedantic.
>
> I don't understand your point. Are you stating that this is what the
> test should be, or that it is what it is at the moment, or an opinion?
That the specification for what is controlled by what options says that
-pedantic warns, and -pedantic-errors gives errors for, long long, for C89
and C++ (subject to -Wno-long-long); it's not something by which c89 and
gnu89 should be distinguished.
> As I said in the mail you replied to, multiple types is not an option.
> So do I understand you to mean that this patch is the only solution?
> If so, I might as well apply this immediately.
That's the only solution consistent with (a) sane support for long long in
the preprocessor as an extension and (b) the principle that the
preprocessor only deals with a single signed type and a single unsigned
type.
--
Joseph S. Myers
jsm28@cam.ac.uk