We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7735172 commit a1372cbCopy full SHA for a1372cb
clang/test/AST/ByteCode/builtin-bit-cast.cpp
@@ -102,6 +102,12 @@ namespace simple {
102
static_assert(check_round_trip<unsigned>((int)0x87654321));
103
static_assert(check_round_trip<unsigned>((int)0x0C05FEFE));
104
// static_assert(round_trip<float>((int)0x0C05FEFE));
105
+
106
107
+ /// This works in GCC and in the bytecode interpreter, but the current interpreter
108
+ /// diagnoses it.
109
+ static_assert(__builtin_bit_cast(intptr_t, nullptr) == 0); // ref-error {{not an integral constant expression}} \
110
+ // ref-note {{indeterminate value can only initialize an object}}
111
}
112
113
namespace bitint {
0 commit comments