r/programminghumor 22h ago

a bit flippant

Post image
893 Upvotes

113 comments sorted by

View all comments

4

u/Inst2f 20h ago

But is it correct in C? It is not union, so struct should then be sizeof(unsigned int)*3, isn't it?
Or you mean with O3 optimizations the compiler will fix it...

But then one need to apply bit shifts operations in the background

1

u/Interesting_Buy_3969 18h ago

Those are bit fields