blob: 779c59dfd4a096059a20a792bf8bb03111d31dc4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// RUN: %clang_cc1 -fsyntax-only -verify -std=gnu++11 %s
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
#if !defined(__STRICT_ANSI__)
__float128 f; // expected-error {{__float128 is not supported on this target}}
// But this should work:
template<typename> struct __is_floating_point_helper {};
template<> struct __is_floating_point_helper<__float128> {}; // expected-error {{__float128 is not supported on this target}}
// FIXME: This could have a better diag.
int g(int x, __float128 *y) { // expected-error {{__float128 is not supported on this target}}
return x + *y;
}
#else
__float128 f; // expected-error {{__float128 is not supported on this target}}
template<typename> struct __is_floating_point_helper {};
template<> struct __is_floating_point_helper<__float128> {}; // expected-error {{__float128 is not supported on this target}}
int g(int x, __float128 *y) { // expected-error {{__float128 is not supported on this target}}
return x + *y;
}
#endif
|