This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] xfailed tests in gdb.c++/classes.exp


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: ... }'.

Michael C


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]