Re:Optimizing C++ Const Objects in LLVM
by MereInterest on Sunday December 27, 2015 @07:48PM
(#10799293)
Ah, got it. I am used to C++, where accessing the non-active member of the union is undefined behavior. Thank you.
I don't know if this is the best example. Generally you see unions in C to cover "tagged unions", I.e. Those things that would be subsumed by algebraic data types in other languages.