Make test more lenient for custom clang version strings
[llvm-project.git] / clang / test / C / C99 / n696.c
blob4499c6e42226b547568402f528d8b951513ff0fe
1 // RUN: %clang_cc1 -triple x86_64 -verify %s
3 /* WG14 N696: yes
4 * Standard pragmas - improved wording
6 * NB: this also covers N631 which changed these features into pragmas rather
7 * than macros.
8 */
10 // Verify that we do not expand macros in STDC pragmas. If we expanded them,
11 // this code would issue diagnostics.
12 #define ON 12
13 #pragma STDC FENV_ACCESS ON
14 #pragma STDC CX_LIMITED_RANGE ON
15 #pragma STDC FP_CONTRACT ON
17 // If we expanded macros, this code would not issue diagnostics.
18 #define BLERP OFF
19 #pragma STDC FENV_ACCESS BLERP // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}
20 #pragma STDC CX_LIMITED_RANGE BLERP // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}
21 #pragma STDC FP_CONTRACT BLERP // expected-warning {{expected 'ON' or 'OFF' or 'DEFAULT' in pragma}}