This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFA: Build stages 2 and 3 with C++
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: gcc at gcc dot gnu dot org, Ian Lance Taylor <iant at google dot com>
- Date: Mon, 1 Aug 2011 09:53:40 +0000 (UTC)
- Subject: Re: PATCH RFA: Build stages 2 and 3 with C++
- References: <mcroc0u3ef5.fsf@coign.corp.google.com> <alpine.DEB.2.02.1108010008200.5578@laptop-mg.saclay.inria.fr> <CAFiYyc19_MoDj6rFnTeUezGf8eNVYFPpUyW8afM2jmMiFK-AUw@mail.gmail.com>
On Mon, 1 Aug 2011, Richard Guenther wrote:
> I think it's the only viable solution (use the full enum for a non-GCC stage1
> C++ compiler). We could help it somewhat by at least placing
> enum bitfields first/last in our bitfield groups.
Are GCC and other compilers declaring that they support the GNU C and C++
languages by defining __GNUC__ really the only compilers with this
extension? Feature tests for particular features are generally better
than testing for whether the compiler in use is GCC. (Using configure
tests for things in ansidecl.h does require checking where in the gcc and
src repositories those things are used, to make sure that the relevant
configure tests are used everywhere necessary.)
(Actually, C++03 appears to support enum bit-fields - it's only for C that
they are a GNU extension - so can't we just enable them unconditionally
when building as C++?)
--
Joseph S. Myers
joseph@codesourcery.com