This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Don't #error if including <altivec.h> without -maltivec


-maltivec just means "generate AltiVec instructions", so there
are some good uses for including the header file, but compiling
with -mno-altivec.  A (more accurate) warning is fine though.


Segher




2004-03-23 Segher Boessenkool <boessen@de.ibm.com>

* config/rs6000/altivec.h: Don't #error if -mno-altivec.



Index: gcc/config/rs6000/altivec.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/rs6000/altivec.h,v
retrieving revision 1.30
diff -c -3 -p -r1.30 altivec.h
*** gcc/config/rs6000/altivec.h	20 Mar 2004 02:56:51 -0000	1.30
--- gcc/config/rs6000/altivec.h	23 Mar 2004 08:03:34 -0000
***************
*** 33,39 ****
  #define _ALTIVEC_H 1

  #if !defined(__VEC__) || !defined(__ALTIVEC__)
! #error Use the "-maltivec" flag to enable PowerPC AltiVec support
  #endif

  /* You are allowed to undef these for C++ compatibility.  */
--- 33,39 ----
  #define _ALTIVEC_H 1

#if !defined(__VEC__) || !defined(__ALTIVEC__)
! #warning Use the "-maltivec" flag to enable use of the AltiVec instruction set
#endif


/* You are allowed to undef these for C++ compatibility. */



Attachment: patch-gcc-altivec-h-error
Description: Binary data



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]