This is the mail archive of the gcc-bugs@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]

[Bug target/78263] Compile failure with AltiVec library on PPC64le and -std=c++11 flag


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78263

--- Comment #5 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
There are two potential approaches:

(1) Add a warning, such as:

#if defined(__STRICT_ANSI__) && defined(__cplusplus) &&
!defined(__APPLE_ALTIVEC__)
#warning <altivec.h> requires GNU extensions; use -std=gnu++<nn>
#endif

(2) Avoid the #define of bool when strict-ANSI is used with C++:

#if !defined(__APPLE_ALTIVEC__) && (!defined(__STRICT_ANSI__) ||
!defined(__cplusplus))
#define vector __vector
#define pixel __pixel
#define bool __bool
#endif

Either way there could be fallout with building packages that are currently
working.  We would want to do a test build of a full distribution to gauge
problems before committing this.  Thus will defer to GCC 8.

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