[rs6000] Change x86 intrinsic compat headers to use #error

Message ID 9b827fd6-4027-d53a-6a7f-359019bf6d78@vnet.ibm.com
State New
Headers show
Series
  • [rs6000] Change x86 intrinsic compat headers to use #error
Related show

Commit Message

Peter Bergner Jan. 9, 2018, 10:09 p.m.
The following patch changes the x86 intrinsic compat headers to use #error
instead of #warning.  We do this for two reasons.  Firstly, we want the user
to really be sure they want/need to use the x86 intrinsic compat support
before doing so, because a warning is too easy to ignore.  Secondly, we don't
want configure time tests that check for whether x86 intrinsic support exists
and then use them if they do, to automatically enable usage of them.
The x86 intrinsic compat support should only be used when there is no other
option to the user (ie, no generic or ppc specific code exists).

Is this ok for trunk?

Peter

	* config/rs6000/x86intrin.h: Change #warning to #error. Update message.
	* config/rs6000/emmintrin.h: Likewise.
	* config/rs6000/mmintrin.h: Likewise.
	* config/rs6000/xmmintrin.h: Likewise.

Comments

Segher Boessenkool Jan. 10, 2018, 8:14 p.m. | #1
On Tue, Jan 09, 2018 at 04:09:25PM -0600, Peter Bergner wrote:
> The following patch changes the x86 intrinsic compat headers to use #error

> instead of #warning.  We do this for two reasons.  Firstly, we want the user

> to really be sure they want/need to use the x86 intrinsic compat support

> before doing so, because a warning is too easy to ignore.  Secondly, we don't

> want configure time tests that check for whether x86 intrinsic support exists

> and then use them if they do, to automatically enable usage of them.

> The x86 intrinsic compat support should only be used when there is no other

> option to the user (ie, no generic or ppc specific code exists).

> 

> Is this ok for trunk?


Okay, thanks!


Segher


> 	* config/rs6000/x86intrin.h: Change #warning to #error. Update message.

> 	* config/rs6000/emmintrin.h: Likewise.

> 	* config/rs6000/mmintrin.h: Likewise.

> 	* config/rs6000/xmmintrin.h: Likewise.
Peter Bergner Jan. 10, 2018, 8:23 p.m. | #2
On 1/10/18 2:14 PM, Segher Boessenkool wrote:
> On Tue, Jan 09, 2018 at 04:09:25PM -0600, Peter Bergner wrote:

>> The following patch changes the x86 intrinsic compat headers to use #error

>> instead of #warning.  We do this for two reasons.  Firstly, we want the user

>> to really be sure they want/need to use the x86 intrinsic compat support

>> before doing so, because a warning is too easy to ignore.  Secondly, we don't

>> want configure time tests that check for whether x86 intrinsic support exists

>> and then use them if they do, to automatically enable usage of them.

>> The x86 intrinsic compat support should only be used when there is no other

>> option to the user (ie, no generic or ppc specific code exists).

>>

>> Is this ok for trunk?

> 

> Okay, thanks!


Committed, thanks!

Peter

Patch

Index: gcc/config/rs6000/x86intrin.h
===================================================================
--- gcc/config/rs6000/x86intrin.h	(revision 256351)
+++ gcc/config/rs6000/x86intrin.h	(working copy)
@@ -29,7 +29,7 @@ 
    Note that much code that uses Intel intrinsics can be rewritten in
    standard C or GNU C extensions, which are more portable and better
    optimized across multiple targets.  */
-#warning "Please read comment above.  Use -DNO_WARN_X86_INTRINSICS to disable this warning."
+#error "Please read comment above.  Use -DNO_WARN_X86_INTRINSICS to disable this error."
 #endif
 
 #ifndef _X86INTRIN_H_INCLUDED
Index: gcc/config/rs6000/emmintrin.h
===================================================================
--- gcc/config/rs6000/emmintrin.h	(revision 256351)
+++ gcc/config/rs6000/emmintrin.h	(working copy)
@@ -53,7 +53,7 @@ 
    the PowerISA FPSCR / VSCR registers. We recommend applications
    replace direct access to the MXSCR with the more portable <fenv.h>
    Posix APIs. */
-#warning "Please read comment above.  Use -DNO_WARN_X86_INTRINSICS to disable this warning."
+#error "Please read comment above.  Use -DNO_WARN_X86_INTRINSICS to disable this error."
 #endif
 
 #ifndef EMMINTRIN_H_
Index: gcc/config/rs6000/mmintrin.h
===================================================================
--- gcc/config/rs6000/mmintrin.h	(revision 256351)
+++ gcc/config/rs6000/mmintrin.h	(working copy)
@@ -49,7 +49,7 @@ 
    C language 64-bit scalar operation or optimized to use the newer
    128-bit SSE/Altivec operations.  We recomend this for new
    applications.  */
-#warning "Please read comment above.  Use -DNO_WARN_X86_INTRINSICS to disable this warning."
+#error "Please read comment above.  Use -DNO_WARN_X86_INTRINSICS to disable this error."
 #endif
 
 #ifndef _MMINTRIN_H_INCLUDED
Index: gcc/config/rs6000/xmmintrin.h
===================================================================
--- gcc/config/rs6000/xmmintrin.h	(revision 256351)
+++ gcc/config/rs6000/xmmintrin.h	(working copy)
@@ -51,7 +51,7 @@ 
    the PowerISA FPSCR / VSCR registers. We recommend applications
    replace direct access to the MXSCR with the more portable <fenv.h>
    Posix APIs. */
-#warning "Please read comment above.  Use -DNO_WARN_X86_INTRINSICS to disable this warning."
+#error "Please read comment above.  Use -DNO_WARN_X86_INTRINSICS to disable this error."
 #endif
 
 #ifndef _XMMINTRIN_H_INCLUDED