Y
Hacker News
new
|
ask
|
show
|
jobs
by
nemesisrobot
3975 days ago
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.
1 comments
skarap
3975 days ago
IIRC it was undefined behavior until C99. Then it became implementation-defined.
link