public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/7105: g++ 2.95.3 misses candidate function in virtual base of class template
@ 2002-09-14 14:16 nathan
  0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2002-09-14 14:16 UTC (permalink / raw)
  To: cludwig, gcc-bugs, gcc-prs, nobody

Synopsis: g++ 2.95.3 misses candidate function in virtual base of class template

State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Sat Sep 14 14:16:45 2002
State-Changed-Why:
    fixed in cvs

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7105


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

* c++/7105: g++ 2.95.3 misses candidate function in virtual base of class template
@ 2002-06-24  6:56 cludwig
  0 siblings, 0 replies; 2+ messages in thread
From: cludwig @ 2002-06-24  6:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7105
>Category:       c++
>Synopsis:       g++ 2.95.3 misses candidate function in virtual base of class template
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 24 06:36:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     lidiaadm@cdc.informatik.tu-darmstadt.de
>Release:        2.95.3 20010315 (SuSE)
>Organization:
>Environment:
SuSE Linux 7.3, kernel 2.4.10-4GB, i386
>Description:
g++ 2.95.3 / Linux / i386 fails to compile the attached 
file with the following error message:

  cludwig@cdcNT42:~/C++/gcc2/tmp> g++  -o bugtest bugtest.cc 
  bugtest.cc: In method `void B<int>::foo()':
  bugtest.cc:59:   instantiated from here
  bugtest.cc:54: no match for `B<int> & = A<int> &'
  bugtest.cc:20: candidates are: class B<int> & B<int>::operator =(const B<int> &)

I expect line 54 to expand to 
  *this = B<T>(a);
so there is only one user defined conversion involved. 
Therefore, the code is legal.

g++ 3.0.3 / Linux / i386 as well as 
g++ 2.95.2 / Solaris 8 / sparc compile the example without
error or warning.

The problem shows only if 
 * A is a class template and 
 * A is a *virtual* base class of B.

Best regards

Christoph Ludwig
>How-To-Repeat:
g++ -o bugtest bugtest.cc
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bugtest.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bugtest.cc"

I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnRlbXBsYXRlIDxjbGFz
cyBUPgpjbGFzcyBBIHsKcHVibGljOgogIEEoKTsKICBBKGNvbnN0IEE8VD4mIGEpOwogIEE8VD4m
IG9wZXJhdG9yPShjb25zdCBBPFQ+JiBhKTsKfTsKCnRlbXBsYXRlIDxjbGFzcyBUPgpjbGFzcyBC
IDogcHVibGljIHZpcnR1YWwgQTxUPiB7CnB1YmxpYzoKICBCKCk7CiAgQihjb25zdCBBPFQ+JiBh
KTsKCiAgdm9pZCBmb28oKTsKfTsKCgp0ZW1wbGF0ZSA8Y2xhc3MgVD4KQTxUPjo6QSgpIHsKICBj
b3V0IDw8ICJBPFQ+OjpBKClcbiI7Cn0KCnRlbXBsYXRlIDxjbGFzcyBUPgpBPFQ+OjpBKGNvbnN0
IEE8VD4mIGEpIHsKICBjb3V0IDw8ICJBPFQ+OjpBKGNvbnN0IEE8VD4mIGEpXG4iOwp9Cgp0ZW1w
bGF0ZSA8Y2xhc3MgVD4KQTxUPiYgQTxUPjo6b3BlcmF0b3I9KGNvbnN0IEE8VD4mIGEpIHsKICBj
b3V0IDw8ICJBJiBBPFQ+OjpvcGVyYXRvcj0oY29uc3QgQTxUPiYgYSlcbiI7CiAgcmV0dXJuICp0
aGlzOwp9CgoKdGVtcGxhdGUgPGNsYXNzIFQ+CkI8VD46OkIoKSA6IEE8VD4oKSB7CiAgY291dCA8
PCAiQjxUPjo6QigpXG4iOwp9Cgp0ZW1wbGF0ZSA8Y2xhc3MgVD4KQjxUPjo6Qihjb25zdCBBPFQ+
JiBhKSA6IEE8VD4oYSkgewogIGNvdXQgPDwgIkI8VD46OkIoY29uc3QgQTxUPiYgYSlcbiI7Cn0K
CnRlbXBsYXRlIDxjbGFzcyBUPgp2b2lkIEI8VD46OmZvbygpIHsKICBjb3V0IDw8ICJCPFQ+Ojpm
b28oKVxuIjsKICBBPFQ+IGE7CiAgKnRoaXMgPSBhOwp9CgppbnQgbWFpbigpIHsKICBCPGludD4g
YjsKICBiLmZvbygpOwp9Cgo=


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

end of thread, other threads:[~2002-09-14 21:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-14 14:16 c++/7105: g++ 2.95.3 misses candidate function in virtual base of class template nathan
  -- strict thread matches above, loose matches on Subject: below --
2002-06-24  6:56 cludwig

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).