This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/2935: internal compiler error gcc
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/2935: internal compiler error gcc
- From: deepblur at REMOVE dot gmx dot net
- Date: 25 May 2001 08:12:53 -0000
- Reply-To: deepblur at REMOVE dot gmx dot net
>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: