On Tue, 2009-10-27 at 19:28 -0400, James Bergstra wrote: > Sorry to bug you, but could you point me to a link that would explain > why you put both of those structures into the union?
[ I assume you meant to send this to the list; so I have replied there ] Here is an interesting (and very long) reference: http://www.coding-guidelines.com/cbook/cbook1_2.pdf The relevant section is 6.5.2.3, the discussion around sentences 1037, 1038 of the standard. Sentence 1037 introduces the union construct. Sentence 1038 is a definition for "common initial sequence", which is used in 1037. Of course, we all believe it works right without the union. But the presence of the union seems to guarantee that it works right (by the new standard; the old standard is apparently mute). I may be misreading this, and the union may not actually be necessary, but there is some confusion about this, if you search the web, including a couple of formal "defect reports" for the standard, regarding these sentences. -- G. Jungman
