aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/_Float128.c
blob: f0c3c6d555efef876437d9e0ba81c9e83cbccaab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// RUN: %clang_cc1 -verify %s
// RUN: %clang_cc1 -triple powerpc64-linux -verify %s
// RUN: %clang_cc1 -triple i686-windows-gnu -verify %s
// RUN: %clang_cc1 -triple x86_64-windows-gnu -verify %s
// RUN: %clang_cc1 -triple x86_64-windows-msvc -verify %s

#if defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__)
_Float128 f;
_Float128 tiny = __FLT128_EPSILON__;
int g(int x, _Float128 *y) {
  return x + *y;
}

// expected-no-diagnostics
#else
_Float128 f;  // expected-error {{__float128 is not supported on this target}}
float tiny = __FLT128_EPSILON__; // expected-error{{use of undeclared identifier}}
int g(int x, _Float128 *y) {  // expected-error {{__float128 is not supported on this target}}
  return x + *y;
}

#endif  // defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__)