Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
nemesisrobot
· 11y ago · 0 comments
Isn't the first example undefined behavior? I always thought you shouldn't assign data to a union using one member, then access the data using a different member.
Comments
[–]
skarap
11y ago
IIRC it was undefined behavior until C99. Then it became implementation-defined.