From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30818 invoked by alias); 10 Feb 2012 19:29:13 -0000 Received: (qmail 30809 invoked by uid 22791); 10 Feb 2012 19:29:12 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 10 Feb 2012 19:28:59 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1AJSc87020344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 10 Feb 2012 14:28:38 -0500 Received: from host2.jankratochvil.net (ovpn-116-26.ams2.redhat.com [10.36.116.26]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1AJSYrm026091 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 10 Feb 2012 14:28:36 -0500 Date: Fri, 10 Feb 2012 19:29:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: [no-commit-intention] Naive unnamed fields for main_type [Re: [patch] Fix gdb-gdb.py for flds_bnds copy-pastes] Message-ID: <20120210192833.GA13846@host2.jankratochvil.net> References: <20120209092727.GA2664@host2.jankratochvil.net> <20120209093119.GA2722@host2.jankratochvil.net> <20120209151621.GB3474@adacore.com> <20120209153642.GA12261@host2.jankratochvil.net> <874nuyef9c.fsf@fleche.redhat.com> <20120210190102.GA9186@host2.jankratochvil.net> <87y5saa3zs.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Disposition: inline In-Reply-To: <87y5saa3zs.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00219.txt.bz2 On Fri, 10 Feb 2012 20:21:43 +0100, Tom Tromey wrote: > As to the original problem, anonymous unions are a GCC extension, now in > C11 -- but not in C99: > > barimba. echo 'struct { int a; struct { int b; }; } s;'|gcc --syntax-only -x c - -Wall -std=c99 -pedantic > :1:34: warning: ISO C99 doesn’t support unnamed structs/unions [-pedantic] > > So moving to C99 wouldn't help that. In GCC PR c/52182 Joseph S. Myers explained me my ISO C99 misread, that GCC is right with this error. Thanks, Jan