Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c++ Subject: Re: Don't be fooled by cpp.sh Date: Fri, 10 Jan 2020 21:12:57 -0800 Organization: A noiseless patient Spider Lines: 18 Message-ID: <86tv5237ae.fsf@linuxsc.com> References: <70391932-ccbc-4bc7-b693-881ab06eb6d3@googlegroups.com> <79fbc109-a9d8-47a2-a150-a74b09de4d75@googlegroups.com> <20191228210102.7a79a100573646105f604b46@cvine--nospam--.freeserve.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="a658bb27d1b88b897660621da5fe7a9e"; logging-data="25741"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vh8AG1qjfBtmfRHWUUczDsPgb4CM5g2A=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:IIEPxn6Thg6X2C5BktlhhaXpVGY= sha1:1kNq7jgkvZUX8Fa5gcW+iaRelmM= Xref: csiph.com comp.lang.c++:71274 James Kuyper writes: > Also, don't you find it a bit odd that what you consider to be > "the whole point of a union" has always had undefined behavior in > C++, and had undefined behavior in C all the way up until C2011? Note that James's opinion on when the behavior was defined in C doesn't match the C standard committee's opinion on when the behavior was defined in C. See for example DR 283 (dated 2002) http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_283.htm > It wasn't until C2011 that a footnote was added to the C standard > identifying that the behavior of "write as one type and read as > another" is to reinterpret the associated memory as having the > type of the lvalue used to read it. False. See N1256 if you don't believe me.