This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
confusing diagnostics
- To: gcc at gcc dot gnu dot org
- Subject: confusing diagnostics
- From: Ulrich Lauther <ulrich dot lauther at mchp dot siemens dot de>
- Date: Thu, 11 Jan 2001 14:52:02 +0100 (MET)
- Reply-To: Ulrich dot Lauther at mchp dot siemens dot de
This (syntactically wrong) code gives rather confusing error reports:
class foo {
int fudge;
public:
foo(int x) : fudge(x) {
}
virtual void do_something();
};
class bar : public foo {
public:
bar(int x) : foo(x) {
}
void do_something() {
}
};
int main() {
bar(0);
return 0;
}
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnulibc1/2.95.1/specs
gcc version 2.95.1 19990816 (release)
[ stuff deleted ]
/tmp/ccRtcD7X.o: In function `bar type_info function':
/tmp/ccRtcD7X.o(.gnu.linkonce.t.__tf3bar+0x10): undefined reference to `foo type_info function'
/tmp/ccRtcD7X.o(.gnu.linkonce.t.__tf3bar+0x1a): undefined reference to `foo type_info node'
/tmp/ccRtcD7X.o: In function `bar::bar(int)':
/tmp/ccRtcD7X.o(.bar::gnu.linkonce.t.(int)+0x14): undefined reference to `foo::foo(int)'
collect2: ld returned 1 exit status
--
-lauther
----------------------------------------------------------------------------
Ulrich Lauther ph: +49 89 636 48834 fx: ... 636 42284
Siemens CT SE 6 Internet: Ulrich.Lauther@mchp.siemens.de