From patchwork Thu Apr 2 08:19:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Andre Vieira (lists)" X-Patchwork-Id: 1265485 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48tGFk2qwyz9sSJ for ; Thu, 2 Apr 2020 19:19:52 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 59805385E032; Thu, 2 Apr 2020 08:19:49 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 2DCF2385E02E for ; Thu, 2 Apr 2020 08:19:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2DCF2385E02E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andre.simoesdiasvieira@arm.com 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 C51F331B; Thu, 2 Apr 2020 01:19:46 -0700 (PDT) Received: from [10.57.20.208] (unknown [10.57.20.208]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5E9B03F68F; Thu, 2 Apr 2020 01:19:46 -0700 (PDT) To: "gcc-patches@gcc.gnu.org" From: "Andre Vieira (lists)" Subject: [PATCH][GCC][Arm]: Do not process rest of MVE header file after unsupported error Message-ID: <7b393889-60ed-a9e3-7940-85b98a3e89c2@arm.com> Date: Thu, 2 Apr 2020 09:19:44 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 Content-Language: en-US X-Spam-Status: No, score=-27.6 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, 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-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: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi, This patch makes sure the rest of the header file is not parsed if MVE is not supported.  The user should not be including this file if MVE is not supported, nevertheless making sure it doesn't parse the rest of the header file will save the user from a huge error output that would be rather useless. Is this OK for trunk? gcc/ChangeLog: 2020-04-02  Andre Vieira          * config/arm/arm_mve.h: Condition the header file on __ARM_FEATURE_MVE. diff --git a/gcc/config/arm/arm_mve.h b/gcc/config/arm/arm_mve.h index f1dcdc2153217e796c58526ba0e5be11be642234..1ce55bd2fc4f5c6a171ffe116d7fd9029e11a619 100644 --- a/gcc/config/arm/arm_mve.h +++ b/gcc/config/arm/arm_mve.h @@ -24,11 +24,9 @@ #if __ARM_BIG_ENDIAN #error "MVE intrinsics are not supported in Big-Endian mode." -#endif - -#if !__ARM_FEATURE_MVE +#elif !__ARM_FEATURE_MVE #error "MVE feature not supported" -#endif +#else #include #ifndef __cplusplus @@ -27554,4 +27552,5 @@ extern void *__ARM_undef; } #endif +#endif /* __ARM_FEATURE_MVE */ #endif /* _GCC_ARM_MVE_H. */