1 // RUN: %clang_cc1 -fobjc-runtime=macosx-fragile -fsyntax-only -verify -Wno-objc-root-class %s
2 // RUN: %clang_cc1 -std=c89 -fobjc-runtime=macosx-fragile -fsyntax-only -verify -Wno-objc-root-class %s
5 #if __STDC_VERSION__ >= 201112L
7 #if !__has_feature(objc_c_static_assert)
11 #if !__has_extension(objc_c_static_assert)
17 _Static_assert(1, "");
18 _Static_assert(0, ""); // expected-error {{static assertion failed}}
20 _Static_assert(a, ""); // expected-error {{use of undeclared identifier 'a'}}
21 _Static_assert(sizeof(a), ""); // expected-error {{use of undeclared identifier 'a'}}
24 _Static_assert(1, "");
34 // _Static_assert is available before C11 as an extension, but -pedantic
36 #if __has_feature(objc_c_static_assert)
40 #if !__has_extension(objc_c_static_assert)
46 _Static_assert(1, "");
47 _Static_assert(0, ""); // expected-error {{static assertion failed}}
50 _Static_assert(1, "");