1 // RUN: %clang_cc1 -verify -Wno-vla %s
4 * Subsetting the standard
7 // If we claim to not support the feature then we expect diagnostics when
8 // using that feature. Otherwise, we expect no diagnostics.
9 #ifdef __STDC_NO_COMPLEX__
10 // PS4/PS5 set this to indicate no <complex.h> but still support the
15 // We do not have any other targets which do not support complex, so we
16 // don't expect to get into this block.
17 #error "it's unexpected that we don't support complex"
21 long double _Complex ldc
;
26 long double _Complex ldc
;
29 #ifdef __STDC_NO_VLA__
30 // We do not have any targets which do not support VLAs, so we don't expect
31 // to get into this block.
32 #error "it's unexpected that we don't support VLAs"
34 void func(int n
, int m
[n
]) {
39 void func(int n
, int m
[n
]) {
44 // NB: it's not possible to test for __STDC_NO_THREADS__ because that is
45 // specifically about whether <threads.h> exists and is supported, which is
46 // outside the control of the compiler. It does not cover use of thread_local.
48 #if defined(HAS_COMPLEX) && defined(HAS_VLA)
49 // If we support all these optional features, we don't expect any other
50 // diagnostics to have fired.
52 // expected-no-diagnostics