23 lines · c
1// RUN: %clang_cc1 -triple x86_64 -verify %s2 3/* WG14 N696: yes4 * Standard pragmas - improved wording5 *6 * NB: this also covers N631 which changed these features into pragmas rather7 * than macros.8 */9 10// Verify that we do not expand macros in STDC pragmas. If we expanded them,11// this code would issue diagnostics.12#define ON 1213#pragma STDC FENV_ACCESS ON14#pragma STDC CX_LIMITED_RANGE ON15#pragma STDC FP_CONTRACT ON16 17// If we expanded macros, this code would not issue diagnostics.18#define BLERP OFF19#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}}22 23