Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.compilers > #2751
| Path | csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end |
|---|---|
| From | Hans-Peter Diettrich <DrDiettrich1@netscape.net> |
| Newsgroups | comp.compilers |
| Subject | Union C++ standard |
| Date | Thu, 25 Nov 2021 11:11:04 +0100 |
| Organization | Compilers Central |
| Lines | 12 |
| Sender | news@iecc.com |
| Approved | comp.compilers@iecc.com |
| Message-ID | <21-11-004@comp.compilers> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Info | gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="44177"; mail-complaints-to="abuse@iecc.com" |
| Keywords | C, standards |
| Posted-Date | 26 Nov 2021 12:31:56 EST |
| X-submission-address | compilers@iecc.com |
| X-moderator-address | compilers-request@iecc.com |
| X-FAQ-and-archives | http://compilers.iecc.com |
| Xref | csiph.com comp.compilers:2751 |
Show key headers only | View raw
Can somebody explain why the access to members of a union is "undefined" except for the most recently written member? What can be undefined in a union of data types of the same typesize end alignment? Any member written will result in a unique bit/byte pattern in memory, whose reading may not make sense in a different type but undoubtedly is well defined. DoDi [I think it's undefined in a standards sense. In any individual implementation the result is predictable, but it's not portable. -John]
Back to comp.compilers | Previous | Next — Next in thread | Find similar
Union C++ standard Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2021-11-25 11:11 +0100
Re: Union C++ standard Kaz Kylheku <480-992-1380@kylheku.com> - 2021-11-26 18:06 +0000
Re: Union C++ standard gah4 <gah4@u.washington.edu> - 2021-11-26 12:16 -0800
Re: Union C++ standard David Brown <david.brown@hesbynett.no> - 2021-11-27 16:59 +0100
Re: Union C++ standard Derek Jones <derek@NOSPAM-knosof.co.uk> - 2021-11-28 12:51 +0000
Re: Union C++ standard David Brown <david.brown@hesbynett.no> - 2021-11-28 19:00 +0100
Re: Union C++ standard Derek Jones <derek@NOSPAM-knosof.co.uk> - 2021-11-29 00:09 +0000
Re: Union C++ standard David Brown <david.brown@hesbynett.no> - 2021-11-29 21:00 +0100
Re: Union C++ standard Derek Jones <derek@NOSPAM-knosof.co.uk> - 2021-11-30 00:46 +0000
Re: Union C++ standard George Neuner <gneuner2@comcast.net> - 2021-11-30 17:18 -0500
Re: Union C++ standard terminology Derek Jones <derek@knosof.co.uk> - 2021-12-01 13:35 +0000
Re: Union C++ standard David Brown <david.brown@hesbynett.no> - 2021-11-30 23:24 +0100
Re: Union C++ standard Kaz Kylheku <480-992-1380@kylheku.com> - 2021-11-29 16:39 +0000
Re: Union C++ standard Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-11-29 14:32 -0800
csiph-web