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: Another "ptype B" validity question


Michael Elizabeth Chastain <mec@shout.net> writes:


[...]

|   # gdb HEAD, gcc HEAD, binutils 2.13.1, stabs+
|   ptype class B
|   type = class B : public A {
|     public:
|       A;

[...]

| My questions are:
| 
| . What should gdb print for this ptype operation?
| 
| . If gdb does print the "A;" member, is that acceptable or not?
|   Note that this is a slightly different question!

I think the line 

    class B : public A 

saying that B inherits from A is self-explanatory and there is no need
to display A as a member-declaration -- it is not, and that is confusing.


[...]

|                       In this case, I think that most C++ programmers
| would understand the nature of the "A;" line,

Well, I find it very confusing -- it is too close to nested-type
declaration. 

-- Gaby


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