This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
ISO C++ and C99 features
- To: gcc at gcc dot gnu dot org
- Subject: ISO C++ and C99 features
- From: Nathan Sidwell <nathan at codesourcery dot com>
- Date: Tue, 13 Jun 2000 11:46:46 +0100
- Organization: Codesourcery LLC
Hi,
[This stuff about long long, -ansi etc]
I think it'll get worse, in that users will ask for more c99
features to be available in C++. Note the number of bug reports
we get about rejecting some C inside an extern "C" scope. It would
be good if we could provide a mode where such an amalgamation is
available (without other extensions). With my user hat on, I
already use long long (and so -Wno-long-long), and use c99 vararg
macros (I live with the warning). And, as a user, I'd be very
surprised/annoyed if the next rev of C++ did not include most of C99.
I also like portable programs (so those features are autoconf'd), and
I like to be told when I'm straying from the standard (rather than
randomly wander into extension land).
Now, as a picky compiler head, I like sticking to the standard.
But standards are mutable things, we already track the DR's and
their likely resolution. I do think we should have a mode
which implements the current standard as she is wrote, which
we do have with -ansi -pedantic. Tracking the DRs is fine for that
mode, as they are committee documents, so reflect the consensus
across many compiler vendors and users.
We have a more permissive compiler with -fpermissive (which is the
right way to do it - reject by default so you know there's a problem).
Standards are set, in part, from existing practice -- so we'd better
create some! I'd like a more futuristic compiler with -fprescient
or -fxtal-ball. I suppose we could say all gnu extensions are our
proposal for the next standard, in which case I'm out of luck.
Pragmatically, I suggest we punt on this til after 3.0, and in the
meantime think about whether we call it -xc++2k or -xc++ -ffuturerama.
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org