From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27601 invoked by alias); 4 Feb 2004 15:52:08 -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 27576 invoked from network); 4 Feb 2004 15:52:07 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 4 Feb 2004 15:52:07 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id A6A5F2B92; Wed, 4 Feb 2004 10:52:09 -0500 (EST) Message-ID: <40211529.3020504@gnu.org> Date: Wed, 04 Feb 2004 15:52:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Test struct0 References: <40203797.8010607@gnu.org> <20040204004620.GA9431@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-02/txt/msg00074.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. I guess I misunderstood Jim's comments. http://sources.redhat.com/ml/gdb-patches/2004-01/msg00717.html > 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++. But are you sure? :-) If it's legal C++ then it, along with some other wierd-o edge cases should probably be added to a gdb.cp/struct0 test (someone with less rusty C++ than me can probably come up with a list). Trying to include it in structs.exp would just be too messy. Andrew