News for hackers. Stuff that matters.
Re:Optimizing C++ Const Objects in LLVM by theseoafs on Sunday December 27, 2015 @01:20PM (#10798234)
Well, for one, unions have defined behavior in C, while passing pointers around and casting them randomly doesn't.

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.

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.