Index: gcc/genconditions.c --- gcc/genconditions.c.orig +++ gcc/genconditions.c @@ -58,7 +58,7 @@ write_header (void) /* It is necessary, but not entirely safe, to include the headers below\n\ in a generator program. As a defensive measure, don't do so when the\n\ table isn't going to have anything in it. */\n\ -#if GCC_VERSION >= 3001\n\ +#if GCC_VERSION >= 3001 && !defined(__clang_major__)\n\ \n\ /* Do not allow checking to confuse the issue. */\n\ #undef CHECKING_P\n\ @@ -170,7 +170,7 @@ struct c_test\n\ vary at run time. It works in 3.0.1 and later; 3.0 only when not\n\ optimizing. */\n\ \n\ -#if GCC_VERSION >= 3001\n\ +#if GCC_VERSION >= 3001 && !defined(__clang_major__)\n\ static const struct c_test insn_conditions[] = {\n"); traverse_c_tests (write_one_condition, 0); @@ -191,7 +191,7 @@ write_writer (void) " unsigned int i;\n" " const char *p;\n" " puts (\"(define_conditions [\");\n" - "#if GCC_VERSION >= 3001\n" + "#if GCC_VERSION >= 3001 && !defined(__clang_major__)\n" " for (i = 0; i < ARRAY_SIZE (insn_conditions); i++)\n" " {\n" " printf (\" (%d \\\"\", insn_conditions[i].value);\n"