3 ms·
Only in C++. In C, it's Unspecified.
by OhMeadhbh 3y ago
Only in C++. In C, it's Unspecified.
- lifthrasiir 3y agoEven in C, incompatible object accesses are undefined, not unspecified. (`char` is a major exception.) Using `union` is explicitly allowed by ISO C for this use case; you need to use `memcpy` or `std::bit_cast` in C++ instead though.