3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-10 19:27:06 +00:00

fix : type punning in test

This commit is contained in:
Nuno Lopes 2024-03-04 14:34:02 +00:00
parent 91886dafca
commit 57c20be6eb

View file

@ -103,7 +103,9 @@ static void bug_to_rational() {
static void bug_is_int() {
unsigned raw_val[2] = { 2147483648u, 1077720461u };
double val = *(double*)(raw_val);
double val;
static_assert(sizeof(raw_val) == sizeof(val));
memcpy(&val, raw_val, sizeof(val));
std::cout << val << "\n";
hwf_manager m;
hwf a;