public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/2935: internal compiler error gcc
@ 2001-06-12 21:13 rodrigc
0 siblings, 0 replies; 2+ messages in thread
From: rodrigc @ 2001-06-12 21:13 UTC (permalink / raw)
To: deepblur, gcc-bugs, gcc-prs, nobody, rodrigc, nathan
Synopsis: internal compiler error gcc
State-Changed-From-To: feedback->closed
State-Changed-By: rodrigc
State-Changed-When: Tue Jun 12 21:13:11 2001
State-Changed-Why:
Reproducible test-case not supplied.
Preprocessed source code not supplied.
The following example from the report does not
compile under gcc 3.0:
#include <iostream>
using namespace std;
class debug {
debug (char *name)
{
};
dbgout (char *str)
{
cout << "[" << name << "]: " << str;
}
};
class a:public debug { };
class b:public debug { };
class c:public a, public b {
void foo () {
dbgout ("foo fighter");
}
};
a.cc: In member function `void c::foo()':
a.cc:26: request for member `dbgout' is ambiguous in multiple inheritance
lattice
a.cc:10: candidates are: int debug::dbgout(char*)
a.cc:10: int debug::dbgout(char*)
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2935&database=gcc
^ permalink raw reply [flat|nested] 2+ messages in thread
* c++/2935: internal compiler error gcc
@ 2001-05-25 1:16 deepblur
0 siblings, 0 replies; 2+ messages in thread
From: deepblur @ 2001-05-25 1:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 2935
>Category: c++
>Synopsis: internal compiler error gcc
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 25 01:16:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: gcc
>Release: unknown-1.0
>Organization:
>Environment:
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs
gcc version 2.95.3 20010315 (release)
on a RH7.0 system using kernel 2.4.4 (which doesnt matter, i suppose)
>Description:
say i have a debug class, every other class in my project implements it to
get sensible debugging. this class has a method dbgout(char *str)
which prints debuggee infos, for corresponding classes.
class debug {
debug(char *name) { ... };
dbgout(char *str) { cout << "["<< name << "]: "<<str; }
};
class a : public debug
{ ... };
class b : public debug
{ ... };
here the "internal compiler error" appears:
class c : public a, public b {
void foo() { dbgout("foo fighter"); }
}
this produces the error. because gcc cant decide, which dbgout() to use.
by replacing foo with
void foo() { a::dbgout("foobidoo"); }
it works.
aint the compiler smart enough to say something like: could not decide which symbol to use??
i hope the description is good enough for those sorts of things
>How-To-Repeat:
see above
>Fix:
see above
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-06-12 21:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-12 21:13 c++/2935: internal compiler error gcc rodrigc
-- strict thread matches above, loose matches on Subject: below --
2001-05-25 1:16 deepblur
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).