Index: include/clang/Basic/Features.def =================================================================== --- include/clang/Basic/Features.def +++ include/clang/Basic/Features.def @@ -248,6 +248,7 @@ EXTENSION(overloadable_unmarked, true) EXTENSION(pragma_clang_attribute_namespaces, true) EXTENSION(pragma_clang_attribute_external_declaration, true) +EXTENSION(gnu_asm, LangOpts.GNUAsm) #undef EXTENSION #undef FEATURE Index: test/Parser/asm.c =================================================================== --- test/Parser/asm.c +++ test/Parser/asm.c @@ -1,5 +1,9 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +#if !__has_extension(gnu_asm) +#error Extension 'gnu_asm' should be available by default +#endif + void f1() { // PR7673: Some versions of GCC support an empty clobbers section. asm ("ret" : : :); Index: test/Parser/no-gnu-inline-asm.c =================================================================== --- test/Parser/no-gnu-inline-asm.c +++ test/Parser/no-gnu-inline-asm.c @@ -1,5 +1,9 @@ // RUN: %clang_cc1 %s -triple i686-apple-darwin -verify -fsyntax-only -fno-gnu-inline-asm +#if __has_extension(gnu_asm) +#error Expected extension 'gnu_asm' to be disabled +#endif + asm ("INST r1, 0"); // expected-error {{GNU-style inline assembly is disabled}} void foo() __asm("__foo_func"); // AsmLabel is OK