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