Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
JonChesterfield
· 3y ago · 0 comments
Is that still the case these days? I thought we lost that ability sometime around C99 (it's now UB to read from the inactive member), and you're now supposed to memcpy all over the place and hope the compiler elides it.
Comments
[–]
Denvercoder9
3y ago
That's only in C++, type punning through unions is still legal in C.