1 // RUN: %clang_cc1 -std=c23 -fexperimental-new-constant-interpreter -verify=expected,both %s
2 // RUN: %clang_cc1 -std=c23 -verify=ref,both %s
4 typedef typeof(nullptr) nullptr_t
;
6 const _Bool inf1
= (1.0/0.0 == __builtin_inf());
7 constexpr _Bool inf2
= (1.0/0.0 == __builtin_inf()); // both-error {{must be initialized by a constant expression}} \
8 // both-note {{division by zero}}
9 constexpr _Bool inf3
= __builtin_inf() == __builtin_inf();
18 #define DECL_BUFFER(Ty, Name) alignas(Ty) unsigned char Name[sizeof(Ty)]
21 DECL_BUFFER(struct S
, buffer
);
22 ((struct S
*)buffer
)->c
= 'a';
23 return ((struct S
*)buffer
)->c
;
27 static_assert((nullptr_t
){} == 0);