Re:Learning that you can use unions in C for grouping things...
by rightbyte on Sunday August 01, 2021 @12:18PM
(#28027398)
I don't regard this as a "perverse" hack. If I ever do embedded memory mapped stuff in C11 this is way too tempting.
[ Parent
| on HN ]
Re:Learning that you can use unions in C for grouping things...
by midjji on Sunday August 01, 2021 @03:45PM
(#28029221)
You are practically guaranteed to invoke undefined behaviour if you do. Just use a map on a std::array of e.g. std::byte
Re:Learning that you can use unions in C for grouping things...
by dexterhaslem on Sunday August 01, 2021 @04:48PM
(#28029811)
they said C11 tho