This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [rfc] xfailed tests in gdb.c++/classes.exp
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb at sources dot redhat dot com
- Date: Thu, 27 Feb 2003 22:59:11 -0500
- Subject: Re: [rfc] xfailed tests in gdb.c++/classes.exp
- References: <200302280351.h1S3p6525237@duracef.shout.net>
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<Foo> 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