|
|
|
|
|
by oshepherd
4121 days ago
|
|
Type punning by pointer is explicitly UB per the standard. Type punning by union is implementation defined behavior. Everyone fortunately defines it to Do The Right Thing (TM). The truly standard supported way to type pun is by memcpy float f = ...;
int x;
memcpy(&x, &f, sizeof x); |
|