http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45381
--- Comment #13 from Iain Sandoe <iains at gcc dot gnu.org> 2011-02-09 12:35:57 UTC --- (In reply to comment #6) > (In reply to comment #5) > > I think altivec should disabled with "gcc version 4.0.1 (Apple Inc. build > > 5493)". Otherwise this pr could be closed as wontfix. > > I'd prefer it if you provided some amount of detail about *what* > fails with the patch attached to this PR, rather than just reporting > the bare fact of not working. Sorry ... I should have read the audit trail better. The fault is a very subtle header-ordering 'gotcha'... [At least on Darwin] One cannot include external headers after system.h because of the fact that system.h re-defines bool. ... the reason that comment #12 works (which is essentially the same thing as your attachment) is that <altivec.h> is included before system.h. I guess on ppc64-linux there is no difference in the size of bool - and I don't wish to re-open the debate about Darwin's way of doing it ('tis out of our control in any event). I still don't know if it's worth doing any more than below, for 4.6: Index: libcpp/lex.c =================================================================== --- libcpp/lex.c (revision 169914) +++ libcpp/lex.c (working copy) @@ -512,7 +513,7 @@ init_vectorized_lexer (void) search_line_fast = impl; } -#elif defined(__GNUC__) && defined(__ALTIVEC__) +#elif defined(__GNUC__) && (GCC_VERSION >= 4005) && defined(__ALTIVEC__) /* A vection of the fast scanner using AltiVec vectorized byte compares. */ /* ??? Unfortunately, attribute(target("altivec")) is not yet supported,