Launchpad has imported 9 comments from the remote bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16889.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://documentation.ubuntu.com/launchpad/user/reference/bugs/multi-project-bugs/about-multi-project-bugs/#bugs-in-external-trackers.

------------------------------------------------------------------------
On 2004-08-05T19:30:01+00:00 Dvv-v wrote:

Ambiguity is not detected in this code:

// start of code
class B {
public:
    B* p;
    B* f();
    virtual ~B();
};

class B1 : virtual public B {
};

class B2 : virtual public B {
};

class B3 : public B {
};

class BB : public B1, public B2, public B3 {
};

#include <iostream>

B*
B::f ()
{
    std::cout << this << std::endl;

    return this;
}

B::~B()
{
    std::cout << this << ".~B()" << std::endl;
}

int
main ()
{
    BB b;
    b.B1::f();
    b.B2::f();
    b.B3::f();
    b.f();
}
// end of code

2.95.3 correctly rejects this code.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/424838/comments/0

------------------------------------------------------------------------
On 2004-08-05T19:34:53+00:00 Pinskia wrote:

Confirmed.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/424838/comments/1

------------------------------------------------------------------------
On 2004-08-05T20:31:22+00:00 Bangerth wrote:

This is the obvious minimal example: 
---------------------------- 
struct B { 
    int f(); 
}; 
 
struct B1 : virtual B {}; 
struct B2 : B {}; 
struct BB : B1, B2 {}; 
 
int i = BB().f(); 
------------------------------------- 
 
g/x> ~/bin/gcc-3.4*/bin/c++ -c x.cc 
 
g/x> ~/bin/gcc-3.3/bin/c++ -c x.cc 
x.cc:9: error: request for member `f' is ambiguous 
x.cc:2: error: candidates are: int B::f() 
x.cc:2: error:                 int B::f() 
 
To my great surprise, the picture changes once one makes member function f() a  
member _variable_: 
--------------------------- 
struct B { 
    int i; 
}; 
 
struct B1 : virtual B {}; 
struct B2 : B {}; 
struct BB : B1, B2 {}; 
 
int i = BB().i; 
------------------------------------ 
 
In this case, gcc3.4 suddently does spit out an error message (though not a 
very 
enlightening) whereas 3.3 shows the same message as before: 
 
g/x> ~/bin/gcc-3.4*/bin/c++ -c x.cc 
x.cc:9: error: `B' is an ambiguous base of `BB' 
 
g/x> ~/bin/gcc-3.3/bin/c++ -c x.cc 
x.cc:9: error: request for member `i' is ambiguous 
x.cc:2: error: candidates are: int B::i 
x.cc:2: error:                 int B::i 
 
W. 

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/424838/comments/2

------------------------------------------------------------------------
On 2004-08-05T20:36:30+00:00 Pinskia wrote:

: Search converges between 2003-02-19-trunk (#187) and 2003-02-20-trunk
(#188).

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/424838/comments/3

------------------------------------------------------------------------
On 2004-08-05T20:48:57+00:00 Pinskia wrote:

Most likely caused by:
2003-02-20  Nathan Sidwell  <[email protected]>

        Change base class access representation. Share virtual base
        binfos.
        * cp/call.c (build_special_member_call): Remove binfo_for_vbase
        call.
        * cp/class.c (build_base_path): Likewise.
        ....


Reply at: 
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/424838/comments/4

------------------------------------------------------------------------
On 2004-08-24T16:06:37+00:00 Cvs-commit wrote:

Subject: Bug 16889

CVSROOT:        /cvs/gcc
Module name:    gcc
Changes by:     [email protected]      2004-08-24 16:06:22

Modified files:
        gcc/cp         : ChangeLog search.c 
        gcc/testsuite  : ChangeLog 
Added files:
        gcc/testsuite/g++.dg/lookup: ambig1.C ambig2.C 

Log message:
        cp:
        PR c++/16889
        * (is_subobject_of_p): Resurrect & optimize.
        (lookup_field_r): Use it.
        testsuite:
        PR c++/16889
        * g++.dg/lookup/ambig[12].C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4299&r2=1.4300
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/search.c.diff?cvsroot=gcc&r1=1.310&r2=1.311
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4181&r2=1.4182
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/ambig1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/ambig2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1


Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/424838/comments/5

------------------------------------------------------------------------
On 2004-08-24T16:18:47+00:00 Natoan wrote:

        PR c++/16889
        * (is_subobject_of_p): Resurrect & optimize.
        (lookup_field_r): Use it.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/424838/comments/6

------------------------------------------------------------------------
On 2004-08-24T16:34:24+00:00 Cvs-commit wrote:

Subject: Bug 16889

CVSROOT:        /cvs/gcc
Module name:    gcc
Branch:         gcc-3_4-branch
Changes by:     [email protected]      2004-08-24 16:34:15

Modified files:
        gcc/cp         : ChangeLog search.c 
        gcc/testsuite  : ChangeLog 
Added files:
        gcc/testsuite/g++.dg/lookup: ambig1.C ambig2.C 

Log message:
        cp:
        PR c++/16889
        * (is_subobject_of_p): Resurrect & optimize.
        (lookup_field_r): Use it.
        testsuite:
        PR c++/16889
        * g++.dg/lookup/ambig[12].C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.151&r2=1.3892.2.152
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/search.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.284.4.3&r2=1.284.4.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.258&r2=1.3389.2.259
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/ambig1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/ambig2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1


Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/424838/comments/7

------------------------------------------------------------------------
On 2004-09-24T14:05:05+00:00 Cvs-commit wrote:

Subject: Bug 16889

CVSROOT:        /cvs/gcc
Module name:    gcc
Changes by:     [email protected]      2004-09-24 14:04:59

Modified files:
        gcc/cp         : search.c ChangeLog 
        gcc/testsuite  : ChangeLog 
Added files:
        gcc/testsuite/g++.dg/lookup: ambig3.C 

Log message:
        cp:
        PR c++/16889
        * search.c (lookup_field_queue_p): Correct check for hidden base.
        
        * search.c (bfs_walk): Remove.
        (lookup_member): Use dfs_walk_real.
        (dfs_walk_real): Move and adjust documentation from bfs_walk.
        testsuite:
        PR c++/16889
        * g++.dg/lookup/ambig3.C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/search.c.diff?cvsroot=gcc&r1=1.321&r2=1.322
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4383&r2=1.4384
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4341&r2=1.4342
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/ambig3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1


Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/424838/comments/8

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/424838

Title:
  g++ fails on qualified name in multiple inheritance

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/424838/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to