From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13384 invoked by alias); 27 Oct 2009 23:49:43 -0000 Received: (qmail 13376 invoked by uid 22791); 27 Oct 2009 23:49:43 -0000 X-SWARE-Spam-Status: No, hits=-10.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: sourceware.org Received: from proofpoint2.lanl.gov (HELO proofpoint2.lanl.gov) (204.121.3.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Oct 2009 23:49:40 +0000 Received: from mailrelay2.lanl.gov (mailrelay2.lanl.gov [128.165.4.103]) by proofpoint2.lanl.gov (8.14.3/8.14.3) with ESMTP id n9RNncra009884 for ; Tue, 27 Oct 2009 17:49:38 -0600 Received: from alvie-mail.lanl.gov (alvie-mail.lanl.gov [128.165.4.110]) by mailrelay2.lanl.gov (Postfix) with ESMTP id 1C3A715CB46E for ; Tue, 27 Oct 2009 17:49:38 -0600 (MDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by alvie-mail.lanl.gov (Postfix) with ESMTP id 199A67D00A7 for ; Tue, 27 Oct 2009 17:49:38 -0600 (MDT) X-NIE-2-Virus-Scanner: amavisd-new at alvie-mail.lanl.gov Received: from [130.55.124.157] (manticore.lanl.gov [130.55.124.157]) by alvie-mail.lanl.gov (Postfix) with ESMTP id 078017D00A3 for ; Tue, 27 Oct 2009 17:49:38 -0600 (MDT) Subject: Re: containers tentative design summary From: Gerard Jungman To: gsl-discuss@sourceware.org In-Reply-To: <7f1eaee30910271628h70785125m68e47c7a7b5c25b7@mail.gmail.com> References: <1254708349.18519.4.camel@ForbiddenPlanet> <7f1eaee30910050750l738876b1p41e6bd8ae5aa6d16@mail.gmail.com> <1254783367.28192.98.camel@manticore.lanl.gov> <1256684949.19313.2.camel@manticore.lanl.gov> <7f1eaee30910271628h70785125m68e47c7a7b5c25b7@mail.gmail.com> Content-Type: text/plain Date: Tue, 27 Oct 2009 23:49:00 -0000 Message-Id: <1256687527.19313.16.camel@manticore.lanl.gov> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=1.12.8161:2.4.5,1.2.40,4.0.166 definitions=2009-10-27_13:2009-09-29,2009-10-27,2009-10-27 signatures=0 Mailing-List: contact gsl-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sourceware.org X-SW-Source: 2009-q4/txt/msg00028.txt.bz2 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