This is the mail archive of the 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: Do not #define vector/pixel/bool #ifdef __APPLE_ALTIVEC__

I will commit this as obvious. Since the mainline compiler does _not_
define __APPLE_ALTIVEC__, this will not result in any change in behavior.
(By contrast, the apple-ppc-branch compiler, which supports Apple AltiVec
syntax, _will_ define __APPLE_ALTIVEC__).

2004-05-07  Ziemowit Laski <>

        * config/rs6000/altivec.h (vector, pixel, bool): Do not
        define as macros #ifdef __APPLE_ALTIVEC__.

Index: gcc/config/rs6000/altivec.h
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/altivec.h,v
retrieving revision 1.33
diff -u -3 -p -r1.33 altivec.h
--- gcc/config/rs6000/altivec.h 30 Apr 2004 09:59:01 -0000      1.33
+++ gcc/config/rs6000/altivec.h 8 May 2004 04:59:29 -0000
@@ -36,10 +36,17 @@
 #error Use the "-maltivec" flag to enable PowerPC AltiVec support

+/* If __APPLE_ALTIVEC__ is defined, the compiler supports 'vector',
+   'pixel' and 'bool' as context-sensitive AltiVec keywords (in
+   non-AltiVec contexts, they revert to their original meanings,
+   if any), so we do not need to define them as macros.  */
+#if !defined(__APPLE_ALTIVEC__)
 /* You are allowed to undef these for C++ compatibility.  */
 #define vector __vector
 #define pixel __pixel
 #define bool __bool

/* Condition register codes for AltiVec predicates. */

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