PATCH RFA: Build stages 2 and 3 with C++
Marc Glisse
marc.glisse@inria.fr
Mon Aug 1 10:05:00 GMT 2011
On Mon, 1 Aug 2011, Joseph S. Myers wrote:
> 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.)
I just checked, and indeed sunpro supports this extension as well in C.
> (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++?)
Great, I didn't know that. That's a much better solution.
--
Marc Glisse
More information about the Gcc
mailing list