This is the mail archive of the gdb-prs@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]

gdb/68: c++ access to ambiguous base should detect the ambiguity



>Number:         68
>Category:       gdb
>Synopsis:       c++ access to ambiguous base should detect the ambiguity
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 28 18:48:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     chastain@redhat.com
>Release:        GNU gdb 2001-06-24-cvs (MI_OUT)
>Organization:
>Environment:
native red hat linux 7
gcc gcc-3_0-branch 2001-06-23
>Description:
Suppose that B inherits from A, C inherits from A, and D inherits from B and C, all NON-virtually (this is not a diamond).
When the user references a member of A with "D.x" or "D::A.x", gdb should notice that there are two instances of A in D, and force the user to use syntax such as "D.B::x" or "D.C::x" to select one.
Instead, gdb just quietly picks one.  This can mislead the user into thinking that there is only one D::A.x.

gdb.log excerpt:

print g_D.A::x
$33 = 12
(gdb) XFAIL: gdb.c++/inherit.exp: print g_D.A::x (FIXME)

>How-To-Repeat:
build cvs gdb on native read hat linux 7
use a gcc 3.0 compiler
run test script gdb.c++/inherit.exp
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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