From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7082 invoked by alias); 19 Apr 2004 13:55:34 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 7075 invoked from network); 19 Apr 2004 13:55:32 -0000 Received: from unknown (HELO s1.mailresponder.info) (81.2.143.10) by sources.redhat.com with SMTP; 19 Apr 2004 13:55:32 -0000 Received: from [192.168.4.70] (82.98.209.5) by s1.mailresponder.info with MERCUR Mailserver (v4.02.10 ODAtMjQzOS03MTc5) for ; Mon, 19 Apr 2004 15:54:01 +0200 Subject: Re: Anonymous union members problem From: Mathieu Fluhr To: Eljay Love-Jensen Cc: gcc-help@gcc.gnu.org In-Reply-To: <6.0.3.0.2.20040419081345.01d1b498@iplan-mn.corp.adobe.com> References: <1082380113.10142.9.camel@c-l-175> <6.0.3.0.2.20040419081345.01d1b498@iplan-mn.corp.adobe.com> Content-Type: text/plain Message-Id: <1082382881.606.14.camel@c-l-175> Mime-Version: 1.0 Date: Mon, 19 Apr 2004 13:55:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg00243.txt.bz2 Hello Eljay Thanks for answering so quiclkly. I still have some questions/remarks... > >Is this invalid C++ code ? > > Yes, this is invalid C++ code. > Humm... do you have any reference about that ? > >If yes is there a way to make it valid and compilable under Linux ? > > Take the typedef out of the anonymous struct. > --or-- > Name the anonymous struct so it is no longer anonymous. > > I favor the second. > I already thought about these 2 possibilities... but none of them is actually suitable: this anonymous struct is generated by a macro that take a type as parameter (aim of the typedef) which is particular to this structure. So any other idea ?