From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp001-out.apm-internet.net (smtp001-out.apm-internet.net [85.119.248.222]) by sourceware.org (Postfix) with ESMTPS id B0EFE3857C48 for ; Sun, 4 Jul 2021 20:03:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B0EFE3857C48 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=sandoe.co.uk Received: (qmail 49545 invoked from network); 4 Jul 2021 20:03:32 -0000 X-APM-Out-ID: 16254290124954 X-APM-Authkey: 257869/1(257869/1) 5 Received: from unknown (HELO ?192.168.1.214?) (81.138.1.83) by smtp001.apm-internet.net with SMTP; 4 Jul 2021 20:03:32 -0000 From: Iain Sandoe Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: [PATCH] X86: Provide a CTOR for stringop_algs [PR100246]. Message-Id: Date: Sun, 4 Jul 2021 21:03:31 +0100 To: GCC Patches X-Mailer: Apple Mail (2.3445.104.21) X-Spam-Status: No, score=-16.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_COUK, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham 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-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 20:03:35 -0000 Hi, Several older compilers fail to build modern GCC because of missing or incomplete C++11 support. (although the PR mentions clang, specifically, this has also been = reported for some GCC versions within the range that should be able to bootstrap GCC) There are several possible solutions proposed in the PR, this one seems the least invasive. The header is pulled into the gcov code that builds with C, so we have = to make the CTOR conditional on C++. tested on Darwin12 with xcode-6, bootstrapped on x86_64-darwin and = linux. OK for master / GCC-11? thanks Iain Signed-off-by: Iain Sandoe PR bootstrap/100246 - [11/12 Regression] GCC will not bootstrap with = clang 3.4/3.5 [xcode 5/6, Darwin 12/13] PR bootstrap/100246 gcc/ChangeLog: * config/i386/i386.h (struct stringop_algs): Define a CTOR for this type. --- gcc/config/i386/i386.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 6e0340a4b60..84151156999 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -73,6 +73,11 @@ struct stringop_algs { const enum stringop_alg unknown_size; const struct stringop_strategy { +#ifdef __cplusplus + stringop_strategy(int _max =3D -1, enum stringop_alg _alg =3D = libcall, + int _noalign =3D false) + : max (_max), alg (_alg), noalign (_noalign) {} +#endif const int max; const enum stringop_alg alg; int noalign; --=20 2.24.1