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