[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [csmith-dev] Unions with const and non const members
Not sure about C, but at least in C++ it's UB to write to one member, then read from another. But lots of code does it, so many compilers preserve the "expected" behavior here. If your compiler doesn't support that extension at all, you might have to tweak/configure csmith in some way (I don't know if it has a flag/feature/configuration for this extension) - but if it support it in the case of non-const members it seems pretty reasonable to me for it to support it for const members.