2012-10-21 09:10:01 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
|
|
|
|
void f1(void) {
|
|
|
|
int x = 0;
|
2012-10-22 03:56:13 +08:00
|
|
|
/* expected-error@+1 {{'#pragma fp_contract' should only appear at file scope or at the start of a compound expression}} */
|
|
|
|
#pragma STDC FP_CONTRACT ON
|
2012-10-21 09:10:01 +08:00
|
|
|
}
|
2012-11-04 13:08:08 +08:00
|
|
|
|
|
|
|
void f2(void) {
|
|
|
|
#pragma STDC FP_CONTRACT OFF
|
|
|
|
#pragma STDC FP_CONTRACT ON
|
|
|
|
}
|