blob: 568c0a0a88ba9d11044ad32bfb4fbb4b7532b533 [file] [log] [blame]
Lang Hamesa930e712012-10-21 01:10:01 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3void f1(void) {
4 int x = 0;
Lang Hames720ae092012-10-21 19:56:13 +00005/* expected-error@+1 {{'#pragma fp_contract' should only appear at file scope or at the start of a compound expression}} */
6#pragma STDC FP_CONTRACT ON
Lang Hamesa930e712012-10-21 01:10:01 +00007}
Lang Hames080b01e2012-11-04 05:08:08 +00008
9void f2(void) {
10 #pragma STDC FP_CONTRACT OFF
11 #pragma STDC FP_CONTRACT ON
12}