[ub] [c++std-core-23844] Re: unions and undefined behavior

Gabriel Dos Reis gdr at cs.tamu.edu
Thu Jul 25 00:37:03 CEST 2013


Jeffrey Yasskin:

| P.S. I'd like to point out that the resolution of C's DR236 is very
| bad. The original issue presents an argument that the spec as written
| allows the active member to be changed using simple pointers. The
| committee resolution says that wasn't intended, but neither presents
| an argument that the existing spec actually doesn't allow it, nor
| changes the spec to express the intention. We shouldn't be citing a DR
| to explain how unions work in C11; we should be able to cite C11
| itself.

I think I have to disagree with that.  The DR exists because of how
union are specified in C.

-- Gaby



More information about the ub mailing list