C++ Logo

sg12

Advanced search

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

From: Gabriel Dos Reis <gdr_at_[hidden]>
Date: Wed, 24 Jul 2013 17:37:03 -0500
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

Received on 2013-07-25 00:37:20