From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24810 invoked by alias); 19 Apr 2004 14:28:51 -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 24780 invoked from network); 19 Apr 2004 14:28:51 -0000 Received: from unknown (HELO smtp-relay-7.sea.adobe.com) (192.150.22.7) by sources.redhat.com with SMTP; 19 Apr 2004 14:28:51 -0000 Received: from inner-relay-1.corp.adobe.com (inner-relay-1 [153.32.1.51]) by smtp-relay-7.sea.adobe.com (8.12.10/8.12.10) with ESMTP id i3JESmSP023817; Mon, 19 Apr 2004 07:28:48 -0700 (PDT) Received: from iplan-mn (iplan-mn.corp.adobe.com [130.248.25.5]) by inner-relay-1.corp.adobe.com (8.12.9/8.12.9) with ESMTP id i3JESh3k004632; Mon, 19 Apr 2004 07:28:43 -0700 (PDT) Received: from mn-eljayet.adobe.com (b-25-196.corp.adobe.com [130.248.25.196]) by iplan-mn.corp.adobe.com (iPlanet Messaging Server 5.2 Patch 1 (built Aug 19 2002)) with ESMTP id <0HWF00F519JVNO@iplan-mn.corp.adobe.com>; Mon, 19 Apr 2004 09:28:43 -0500 (CDT) Date: Mon, 19 Apr 2004 14:28:00 -0000 From: Eljay Love-Jensen Subject: Re: Anonymous union members problem In-reply-to: <1082382881.606.14.camel@c-l-175> X-Sender: eljay@iplan-mn.corp.adobe.com To: Mathieu Fluhr Cc: gcc-help@gcc.gnu.org Message-id: <6.0.3.0.2.20040419092054.01d08c00@iplan-mn.corp.adobe.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT References: <1082380113.10142.9.camel@c-l-175> <6.0.3.0.2.20040419081345.01d1b498@iplan-mn.corp.adobe.com> <1082382881.606.14.camel@c-l-175> X-SW-Source: 2004-04/txt/msg00244.txt.bz2 Hi Mathieu, >Humm... do you have any reference about that ? Try "g++ -pedantic -Wall -W foo.cpp". Anonymous structures and classes are not C++. (Anonymous unions are C++.) ISO 14882:1998 section 9.1 >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 ? Then your code is not C++, it's merely C++-ish. You'll need to use a compiler that is compatible with your source code's C++-ish variant. There may be a GCC flag that relaxes the rules and would allow your code to compile with GCC 3.3. I don't know of such a flag, off the top of my head. HTH, --Eljay