public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11789] New: rejects legal, multiple inheritance (inheriting from same class twice)
@ 2003-08-04 15:06 shuki_duv at yahoo dot com
  2003-08-04 19:43 ` [Bug c++/11789] " pinskia at physics dot uc dot edu
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: shuki_duv at yahoo dot com @ 2003-08-04 15:06 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11789

           Summary: rejects legal, multiple inheritance (inheriting from
                    same class twice)
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: shuki_duv at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org

struct Base {
  int b;
  
  Base(int b) : b(b) { }
};

struct Derived : public Base {
  Derived(int d) : Base(d) { }
};

struct Final : public Derived, public Base {
  Final(int f) : Derived(f), Base(f-1) { }
};

int main()
{
  Final f(5);
}

gcc reports this as ambigous, although the ambiguity arises only when trying to
refer to Final via Base.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/11789] rejects legal, multiple inheritance (inheriting from same class twice)
  2003-08-04 15:06 [Bug c++/11789] New: rejects legal, multiple inheritance (inheriting from same class twice) shuki_duv at yahoo dot com
@ 2003-08-04 19:43 ` pinskia at physics dot uc dot edu
  2003-08-04 23:21 ` reichelt at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-04 19:43 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11789


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2003-08-04 19:43:23
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-08-04 19:43 -------
I can confirm this on the mainline (20030804).  ICC 6.0 in strict mode (-Xc) accepted this.
GCC 2.95.3 also rejected this so this is not a regression.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/11789] rejects legal, multiple inheritance (inheriting from same class twice)
  2003-08-04 15:06 [Bug c++/11789] New: rejects legal, multiple inheritance (inheriting from same class twice) shuki_duv at yahoo dot com
  2003-08-04 19:43 ` [Bug c++/11789] " pinskia at physics dot uc dot edu
@ 2003-08-04 23:21 ` reichelt at gcc dot gnu dot org
  2003-08-05  2:26 ` pinskia at physics dot uc dot edu
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2003-08-04 23:21 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11789


reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
           Keywords|                            |monitored


------- Additional Comments From reichelt at gcc dot gnu dot org  2003-08-04 23:21 -------
With --enable-checking gcc even ICEs on mainline and the 3.3 branch.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/11789] rejects legal, multiple inheritance (inheriting from same class twice)
  2003-08-04 15:06 [Bug c++/11789] New: rejects legal, multiple inheritance (inheriting from same class twice) shuki_duv at yahoo dot com
  2003-08-04 19:43 ` [Bug c++/11789] " pinskia at physics dot uc dot edu
  2003-08-04 23:21 ` reichelt at gcc dot gnu dot org
@ 2003-08-05  2:26 ` pinskia at physics dot uc dot edu
  2003-08-11  2:49 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-05  2:26 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11789



------- Additional Comments From pinskia at physics dot uc dot edu  2003-08-05 02:26 -------
Related to bug 7886, most likely the same bug as the ICE is the same (for checking) and 
the error messages are the same (for nonchecking).


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/11789] rejects legal, multiple inheritance (inheriting from same class twice)
  2003-08-04 15:06 [Bug c++/11789] New: rejects legal, multiple inheritance (inheriting from same class twice) shuki_duv at yahoo dot com
                   ` (2 preceding siblings ...)
  2003-08-05  2:26 ` pinskia at physics dot uc dot edu
@ 2003-08-11  2:49 ` cvs-commit at gcc dot gnu dot org
  2003-08-11  2:59 ` mmitchel at gcc dot gnu dot org
  2003-08-11 10:50 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-08-11  2:49 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11789



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-08-11 02:49 -------
Subject: Bug 11789

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2003-08-11 02:49:44

Modified files:
	gcc/cp         : ChangeLog cp-tree.h init.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/inherit: multiple1.C 

Log message:
	PR c++/11789
	* cp-tree.h (get_vbase): Remove.
	(get_vbase_types): Remove.
	* init.c (expand_member_init): Correct logic for looking up base
	classes.
	
	PR c++/11789.C
	* g++.dg/inherit/multiple1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3594&r2=1.3595
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.899&r2=1.900
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/init.c.diff?cvsroot=gcc&r1=1.336&r2=1.337
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2964&r2=1.2965
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/inherit/multiple1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/11789] rejects legal, multiple inheritance (inheriting from same class twice)
  2003-08-04 15:06 [Bug c++/11789] New: rejects legal, multiple inheritance (inheriting from same class twice) shuki_duv at yahoo dot com
                   ` (3 preceding siblings ...)
  2003-08-11  2:49 ` cvs-commit at gcc dot gnu dot org
@ 2003-08-11  2:59 ` mmitchel at gcc dot gnu dot org
  2003-08-11 10:50 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-08-11  2:59 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11789


mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From mmitchel at gcc dot gnu dot org  2003-08-11 02:58 -------
Fixed in GCC 3.4.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/11789] rejects legal, multiple inheritance (inheriting from same class twice)
  2003-08-04 15:06 [Bug c++/11789] New: rejects legal, multiple inheritance (inheriting from same class twice) shuki_duv at yahoo dot com
                   ` (4 preceding siblings ...)
  2003-08-11  2:59 ` mmitchel at gcc dot gnu dot org
@ 2003-08-11 10:50 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-11 10:50 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11789


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |catherin at ca dot ibm dot
                   |                            |com


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-11 10:50 -------
*** Bug 7886 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-08-11 10:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-04 15:06 [Bug c++/11789] New: rejects legal, multiple inheritance (inheriting from same class twice) shuki_duv at yahoo dot com
2003-08-04 19:43 ` [Bug c++/11789] " pinskia at physics dot uc dot edu
2003-08-04 23:21 ` reichelt at gcc dot gnu dot org
2003-08-05  2:26 ` pinskia at physics dot uc dot edu
2003-08-11  2:49 ` cvs-commit at gcc dot gnu dot org
2003-08-11  2:59 ` mmitchel at gcc dot gnu dot org
2003-08-11 10:50 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).