C++ version for GCC development
Xi Ruoyao
xry111@mengyan1223.wang
Fri Mar 4 06:29:26 GMT 2022
On Thu, 2022-03-03 at 22:07 -0500, Abdullah Siddiqui via Gcc-help wrote:
> Hello Jonathan.
>
> Thank you for the detailed clarification.
>
> > At what point did the GCC developers give up C++98 and start using C++11?
>
>
> For GCC 11. This is stated at https://gcc.gnu.org/install/prerequisites.html
>
>
> Are you referring to these lines:
>
> ISO C++11 compiler
> > Necessary to bootstrap GCC.
>
> Versions of GCC prior to 11 also allow bootstrapping with an ISO C++98
> > compiler,.....
>
>
> I thought bootstrapping and compilation are two separate things. In this
> context, are bootstrapping and compilation the same i.e. GCC is a compiler
> and the ISO C++11 compiler is being used to compile GCC?
In theory, compiling GCC with --disable-bootstrap may have a *more*
strict restriction on host compiler than bootstrapping (--enable-
bootstrap is the default building a native compiler). It's because with
--disable-bootstrap the entire GCC will be built with the host compiler,
but with --enable-bootstrap only stage 1 is built with the host
compiler, and stage 2 is built with stage 1. In stage 1 some optional
features (Go or D compilers, etc) are not enabled.
But in practice I don't know. Maybe it's possible to build GCC 11 with
GCC 4.8 and --disable-bootstrap but I've not tried. I don't think it's
really rational to spend an hour testing this in 2022.
> The exceptions are some tests which have .c extensions but get
> > compiled as both C and C++, when we want to test that both language
> > front-ends pass the test.
>
>
> Are you referring to files in the testsuite folders
> (example: gcc/testsuite/g++.dg/lto/pr65302_1.C)?
Files in g++.dg are purely C++. Please note ".C" (with a capital
letter) is not same as ".c".
For example, gcc/testsuite/c-c++-common/pr100785.c is compiled as both C
and C++ during the testing process of GCC.
>
--
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University
More information about the Gcc-help
mailing list