1 // RUN: %clang_cc1 -verify=okay -std=c11 -ffreestanding %s
2 // RUN: %clang_cc1 -verify -std=c17 -ffreestanding %s
3 // RUN: %clang_cc1 -verify -std=c2x -ffreestanding %s
6 * Remove ATOMIC_VAR_INIT v2
9 /* okay-no-diagnostics */
10 #include <stdatomic.h>
12 _Atomic
int a
= ATOMIC_VAR_INIT(0); /* #diag */
13 #if __STDC_VERSION__ <= 201710L
14 /* expected-warning@#diag {{macro 'ATOMIC_VAR_INIT' has been marked as deprecated}}
15 expected-note@stdatomic.h:* {{macro marked 'deprecated' here}}
18 /* expected-error@#diag {{use of undeclared identifier 'ATOMIC_VAR_INIT'}} */