From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15266 invoked by alias); 4 Feb 2004 00:46:22 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 15245 invoked from network); 4 Feb 2004 00:46:21 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 4 Feb 2004 00:46:21 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1AoBBM-0002Vk-J1 for ; Tue, 03 Feb 2004 19:46:20 -0500 Date: Wed, 04 Feb 2004 00:46:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Test struct0 Message-ID: <20040204004620.GA9431@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <40203797.8010607@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40203797.8010607@gnu.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-02/txt/msg00059.txt.bz2 On Tue, Feb 03, 2004 at 07:06:47PM -0500, Andrew Cagney wrote: > Hello, > > This adds a test for: > > struct foo0 { }; > > to the structs.exp testcase (I'm assuming that this is legal ISO-C), it Nope. struct-or-union-specifier: struct-or-union identifier-opt { struct-declaration-list } struct-or-union identifier struct-or-union: struct union struct-declaration-list: struct-declaration struct-declaration-list struct-declaration struct-declaration: specifier-qualifier-list struct-declarator-list ; So there must be a minimum of one declarator and trailing semicolon inside the braces. GCC will warn about this if you ask it to - it's probably -ansi, or -std=c89 -ansi -pedantic. While it's not legal C, I believe that it is legal C++. > passes on PPC with stabs with: > > >(gdb) PASS: gdb.base/structs.exp: ptype foo1; structs-tc > >p/c fun0() > >$1 = {} > > Tt was intended for completness, however with a dwarf2 compiler: > > amd64$ gcc --version > gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-24) > > >(gdb) PASS: gdb.base/structs.exp: ptype foo1; structs-tc > >p/c fun0() > >$1 = > > I guess I should file a bug report and kfail it? If you want to add the test anyway and run it where it compiles, then yeah. I assume this runs afoul of the handling for declarations/opaque types. It would be nice to support it even if it's a GNU extension. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer