Bug 1394505
| Summary: | Weird error with bool only on powerpc | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dennis Payne <dulsi> |
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 26 | CC: | davejohansen, jakub, jwakely, law, mpolacek |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-03-01 21:31:47 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'. If you build with -std=c++11 (or any other strict ISO mode) and include altivec.h, that is to be expected, altivec.h redefines bool and vector for the Altivec purposes, so if you want to use it in C++ code, you need to include altivec.h after all STL headers and if you want to use bool/vector the way it is used normally in C++, you need to #undef them afterwards. In -std=gnu++11 and other GNU modes GCC uses conditional preprocessor macros that act as the Altivec macros in certain contexts and as normal C++ bool/vector in other contexts. |
Description of problem: When building bt builder on power pc, fedora's build system is giving the following error: g++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mcpu=power8 -mtune=power8 -DSDL2LIB -D_REENTRANT -I/usr/include/SDL2 -Isrc/ --std=c++11 -DBTBUILDERDIR=/usr/share/btbuilder -c -o src/monster.o src/monster.C In file included from src/display.h:10:0, from src/monster.h:15, from src/monster.C:8: ssrc/psuedo3d.h:18:129: error: could not convert 'true' from 'bool' to '__vector(4) __bool int' virtual void loadImageOrAnimation(const char *file, SDL_Surface **img, MNG_Image **animation, bool imageWindow, bool physfs = true) = 0; ^~~~ It compile fine on x86 and arm. I've been told it can be fixed by using --std=gnu++11 instead of --std=c++11. I think this is probably an error in gcc. If I'm doing something wrong please let me know. How reproducible: Build the btbuilder source rpm on power pc platform.