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 304A93858C56 for ; Tue, 26 Mar 2024 17:32:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 304A93858C56 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 304A93858C56 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711474376; cv=none; b=I7pc7tZFWo+k0ahbkJYaoRZhRF2Crotpug0+KmcnD7r8xOpIkfeU5Craa9Vy+ss916uvj24iKN1lVdGAxKhX8ZopogjGYH/G76F8x0a67ajVzt/oZ+p35N0wDYHPB3nM6B8wLJdVxcPS/SZZJiskkusKawDwf/wwt/XFuQIiTXk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711474376; c=relaxed/simple; bh=+uo6kseOlCxUG64PdBXzwKo9Kkl9jADbOKxrgzT8vf0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=KJecC8mw+ZKZ4ofzwMvZpizXmhUv18il0/qPpUek6Xe5d3hzuVMMmTBxIhpDOzFato+I4z5fsZPlld3u+KUvbYPcv59e9ubF7aVIPOGQiAGU7CH1FGZ3I2hMA2lM+v68gFk+ZsBbuURCYOtcWyTZnxvIUAS3RGGhIwLFeZ7LMhY= ARC-Authentication-Results: i=1; server2.sourceware.org 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 74E882F4; Tue, 26 Mar 2024 10:33:24 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.110.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 591273F64C; Tue, 26 Mar 2024 10:32:50 -0700 (PDT) From: Richard Sandiford To: Vaseeharan Vinayagamoorthy Mail-Followup-To: Vaseeharan Vinayagamoorthy ,"gcc-patches\@gcc.gnu.org" , richard.sandiford@arm.com Cc: "gcc-patches\@gcc.gnu.org" Subject: Re: [pushed] aarch64: Define out-of-class static constants References: Date: Tue, 26 Mar 2024 17:32:49 +0000 In-Reply-To: (Vaseeharan Vinayagamoorthy's message of "Mon, 18 Mar 2024 13:28:10 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-20.7 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Vaseeharan Vinayagamoorthy writes: > Hi Richard, > > I think this patch is breaking the build of aarch64-none-elf and aarch64-none-linux-gnu targets, when building with GCC 4.8. > This is not an issue when building with GCC 7.5. > > Kind regards, > Vasee Thanks. I pushed the attached patch to fix it. Richard --- GCC 4.8 complained about the use of const rather than constexpr for out-of-line static constexprs. gcc/ * config/aarch64/aarch64-feature-deps.h: Use constexpr for out-of-line statics. --- gcc/config/aarch64/aarch64-feature-deps.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/config/aarch64/aarch64-feature-deps.h b/gcc/config/aarch64/aarch64-feature-deps.h index 3641badb82f..79126db8825 100644 --- a/gcc/config/aarch64/aarch64-feature-deps.h +++ b/gcc/config/aarch64/aarch64-feature-deps.h @@ -71,9 +71,9 @@ template struct info; static constexpr auto enable = flag | get_enable REQUIRES; \ static constexpr auto explicit_on = enable | get_enable EXPLICIT_ON; \ }; \ - const aarch64_feature_flags info::flag; \ - const aarch64_feature_flags info::enable; \ - const aarch64_feature_flags info::explicit_on; \ + constexpr aarch64_feature_flags info::flag; \ + constexpr aarch64_feature_flags info::enable; \ + constexpr aarch64_feature_flags info::explicit_on; \ constexpr info IDENT () \ { \ return info (); \ -- 2.25.1