[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Headers / float16.c
blob8d39bf957f4fe363511c2cc32a0420795b66d341
1 // RUN: %clang_cc1 -triple=aarch64-none-none -fsyntax-only -verify -std=c89 \
2 // RUN: -ffreestanding %s
3 // RUN: %clang_cc1 -triple=aarch64-none-none -fsyntax-only -verify \
4 // RUN: -std=c99 -ffreestanding %s
5 // RUN: %clang_cc1 -triple=aarch64-none-none -fsyntax-only -verify -std=c11 \
6 // RUN: -ffreestanding %s
7 // RUN: %clang_cc1 -triple=aarch64-none-none -fsyntax-only -verify \
8 // RUN: -std=c++11 -x c++ -ffreestanding %s
9 // expected-no-diagnostics
11 #define __STDC_WANT_IEC_60559_TYPES_EXT__
12 #include <float.h>
14 #ifndef FLT16_MIN_10_EXP
15 #error "Macro FLT16_MIN_10_EXP is missing."
16 #elif FLT16_MIN_10_EXP > -4
17 #error "Macro FLT16_MIN_10_EXP is invalid."
18 #endif
20 _Static_assert(FLT16_MIN_10_EXP == __FLT16_MIN_10_EXP__, "");
22 #ifndef FLT16_MIN_EXP
23 #error "Macro FLT16_MIN_EXP is missing."
24 #elif FLT16_MIN_EXP > -13
25 #error "Macro FLT16_MIN_EXP is invalid."
26 #endif
28 _Static_assert(FLT16_MIN_EXP == __FLT16_MIN_EXP__, "");
30 #ifndef FLT16_MAX_10_EXP
31 #error "Macro FLT16_MAX_10_EXP is missing."
32 #elif FLT16_MAX_10_EXP < 4
33 #error "Macro FLT16_MAX_10_EXP is invalid."
34 #endif
36 _Static_assert(FLT16_MAX_10_EXP == __FLT16_MAX_10_EXP__, "");
38 #ifndef FLT16_MAX_EXP
39 #error "Macro FLT16_MAX_EXP is missing."
40 #elif FLT16_MAX_EXP < 16
41 #error "Macro FLT16_MAX_EXP is invalid."
42 #endif
44 _Static_assert(FLT16_MAX_EXP == __FLT16_MAX_EXP__, "");
46 #ifndef FLT16_DECIMAL_DIG
47 #error "Macro FLT16_DECIMAL_DIG is missing."
48 #elif FLT16_DECIMAL_DIG < 5
49 #error "Macro FLT16_DECIMAL_DIG is invalid."
50 #endif
52 _Static_assert(FLT16_DECIMAL_DIG == __FLT16_DECIMAL_DIG__, "");
54 #ifndef FLT16_DIG
55 #error "Macro FLT16_DIG is missing."
56 #elif FLT16_DIG < 3
57 #error "Macro FLT16_DIG is invalid."
58 #endif
60 _Static_assert(FLT16_DIG == __FLT16_DIG__, "");
62 #ifndef FLT16_MANT_DIG
63 #error "Macro FLT16_MANT_DIG is missing."
64 #elif FLT16_MANT_DIG < 11
65 #error "Macro FLT16_MANT_DIG is invalid."
66 #endif
68 _Static_assert(FLT16_MANT_DIG == __FLT16_MANT_DIG__, "");