1// RUN: %clang_cc1 -fsyntax-only -verify -std=gnu++11 %s
2// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
3
4#if !defined(__STRICT_ANSI__)
5__float128 f;  // expected-error {{support for type '__float128' is not yet implemented}}
6// But this should work:
7template<typename> struct __is_floating_point_helper {};
8template<> struct __is_floating_point_helper<__float128> {};
9
10// FIXME: This could have a better diag.
11void g(int x, __float128 *y) {
12  x + *y;  // expected-error {{invalid operands to binary expression ('int' and '__float128')}}
13}
14
15#else
16__float128 f;  // expected-error {{unknown type name '__float128'}}
17template<typename> struct __is_floating_point_helper {};
18template<> struct __is_floating_point_helper<__float128> {};  // expected-error {{use of undeclared identifier '__float128'}}
19
20void g(int x, __float128 *y) {  // expected-error {{unknown type name '__float128'}}
21  x + *y;
22}
23
24#endif
25