diff --git a/druntime/src/importc.h b/druntime/src/importc.h index 72d62d8e442e..97255ca7c12e 100644 --- a/druntime/src/importc.h +++ b/druntime/src/importc.h @@ -97,12 +97,17 @@ typedef unsigned long long __uint64_t; * __has_extension is a clang thing: * https://clang.llvm.org/docs/LanguageExtensions.html * ImportC no has extensions. + * + * >=gcc-14 prints a warning for each #undef. This breaks a lot of + * things like the testsuite which expects clean output. */ +#if __GNUC__ < 14 #undef __has_feature #define __has_feature(x) 0 #undef __has_extension #define __has_extension(x) 0 +#endif /************************************* * OS-specific macros