From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 49B88386F401 for ; Mon, 21 Dec 2020 14:49:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 49B88386F401 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F18E81FB; Mon, 21 Dec 2020 06:49:26 -0800 (PST) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.126]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6142F3F6CF; Mon, 21 Dec 2020 06:49:26 -0800 (PST) From: Richard Sandiford To: FX via Gcc Mail-Followup-To: FX via Gcc , FX , Iain Sandoe , richard.sandiford@arm.com Cc: FX , Iain Sandoe Subject: Re: C++11 code in the gcc 10 branch References: Date: Mon, 21 Dec 2020 14:49:24 +0000 In-Reply-To: (FX via Gcc's message of "Mon, 21 Dec 2020 15:34:51 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Dec 2020 14:49:28 -0000 FX via Gcc writes: > I=E2=80=99m trying to bootstrap a GCC 10 compiler on macOS with clang, an= d I am getting errors in stage 1, because there is C++11 code that is rejec= ted by clang (because the bootstrap involves compiling stage 1 with -std=3D= gnu++98, online on master (see top-level configure.ac). These errors are no= t seen, I believe, when GCC is the bootstrap compiler, because GCC will iss= ue a warning instead of an error (as clang does). > > One place with such issue is in aarch64-builtins.c, which contains a C++1= 1 constructor. I can fix it with this: > > diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/a= arch64-builtins.c > index cba596765..184e9095d 100644 > --- a/gcc/config/aarch64/aarch64-builtins.c > +++ b/gcc/config/aarch64/aarch64-builtins.c > @@ -1225,8 +1225,9 @@ aarch64_init_memtag_builtins (void) > =3D aarch64_general_add_builtin ("__builtin_aarch64_memtag_"#N, \ > T, AARCH64_MEMTAG_BUILTIN_##F); \ > aarch64_memtag_builtin_data[AARCH64_MEMTAG_BUILTIN_##F - \ > - AARCH64_MEMTAG_BUILTIN_START - 1] =3D \ > - {T, CODE_FOR_##I}; > + AARCH64_MEMTAG_BUILTIN_START - 1].ftype =3D= T; \ > + aarch64_memtag_builtin_data[AARCH64_MEMTAG_BUILTIN_##F - \ > + AARCH64_MEMTAG_BUILTIN_START - 1].icode =3D= CODE_FOR_##I; >=20=20 > fntype =3D build_function_type_list (ptr_type_node, ptr_type_node, > uint64_type_node, NULL); > > [=E2=80=A6stuff that Iain has already answered=E2=80=A6] > > I would welcome: > > 1. confirmation that the C++11 code in aarch64-builtins.c is indeed a bug= , and that a patch for it would be welcome Yeah, it's definitely a bug, thanks for catching it. The patch above is OK. Thanks, Richard