diff mbox series

[Arm] : Do not process rest of MVE header file after unsupported error

Message ID 7b393889-60ed-a9e3-7940-85b98a3e89c2@arm.com
State New
Headers show
Series [Arm] : Do not process rest of MVE header file after unsupported error | expand

Commit Message

Andre Vieira (lists) April 2, 2020, 8:19 a.m. UTC
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  <andre.simoesdiasvieira@arm.com>

         * config/arm/arm_mve.h: Condition the header file on 
__ARM_FEATURE_MVE.

Comments

Kyrylo Tkachov April 2, 2020, 8:25 a.m. UTC | #1
> -----Original Message-----
> From: Andre Vieira (lists) <andre.simoesdiasvieira@arm.com>
> Sent: 02 April 2020 09:20
> To: gcc-patches@gcc.gnu.org
> Cc: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
> Subject: [PATCH][GCC][Arm]: Do not process rest of MVE header file after
> unsupported error
> 
> 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?

Ok.
Thanks,
Kyrill

> 
> gcc/ChangeLog:
> 2020-04-02  Andre Vieira  <andre.simoesdiasvieira@arm.com>
> 
>          * config/arm/arm_mve.h: Condition the header file on
> __ARM_FEATURE_MVE.
diff mbox series

Patch

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 <stdint.h>
 #ifndef  __cplusplus
@@ -27554,4 +27552,5 @@  extern void *__ARM_undef;
 }
 #endif
 
+#endif /* __ARM_FEATURE_MVE  */
 #endif /* _GCC_ARM_MVE_H.  */