From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16433 invoked by alias); 28 Feb 2003 03:59:14 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 16426 invoked from network); 28 Feb 2003 03:59:14 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 28 Feb 2003 03:59:14 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18odZI-00057H-00 for ; Fri, 28 Feb 2003 00:00:24 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18obg0-0004H7-00 for ; Thu, 27 Feb 2003 22:59:12 -0500 Date: Fri, 28 Feb 2003 03:59:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Re: [rfc] xfailed tests in gdb.c++/classes.exp Message-ID: <20030228035911.GA16388@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com References: <200302280351.h1S3p6525237@duracef.shout.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200302280351.h1S3p6525237@duracef.shout.net> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-02/txt/msg00604.txt.bz2 On Thu, Feb 27, 2003 at 09:51:06PM -0600, Michael Elizabeth Chastain wrote: > dc> 1) GDB prints "class X { public: ... }" when the programmer originally > dc> wrote "struct X { ... }". > > I think this should be a PASS. > > dc> 2) GDB prints "class X { private: int x; ... }" when the programmer > dc> originally wrote "class X { int x; ... }". > > I think this should be a PASS. > > David C formulated this idea as: if the text can be fed back into a C++ > compiler and generate the same results, then it's okay. By and large I > agree with that. > > If you look in gnats, you will see users complaining that they can't > print their string variables (because C++ strings are implemented with > layers of templates and derived classes). They are complaining that > operator overloading doesn't work. They are complaining that they have > a std::vector and they can't even look inside the damn thing. > > They aren't complaining that they wrote 'struct X { ... }' but gdb > prints 'class X { public: ... }'. Sure. But I suspect 2) represents an actual bug. Fixing this is about three lines in c-typeprint.c. Should we or shouldn't we? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer