From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mengyan1223.wang (mengyan1223.wang [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 883423858D37 for ; Fri, 4 Mar 2022 06:29:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 883423858D37 Received: from localhost.localdomain (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@mengyan1223.wang) by mengyan1223.wang (Postfix) with ESMTPSA id 2BB0365F01; Fri, 4 Mar 2022 01:29:32 -0500 (EST) Message-ID: Subject: Re: C++ version for GCC development From: Xi Ruoyao To: Abdullah Siddiqui , Jonathan Wakely Cc: gcc-help Date: Fri, 04 Mar 2022 14:29:26 +0800 In-Reply-To: References: <649f3dd2-54f0-2258-61e5-1304a1140bbe@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3031.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2022 06:29:37 -0000 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 School of Aerospace Science and Technology, Xidian University