This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: middle-end/9152: Undefined virtual thunks


bangerth at dealii dot org wrote:
> 
> Synopsis: Undefined virtual thunks
> 
> State-Changed-From-To: open->feedback
> State-Changed-By: bangerth
> State-Changed-When: Sat Mar 15 03:42:57 2003
> State-Changed-Why:
>     Hm, I cannot reproduce this with 3.2, 3.2.2, or any newer
>     version of gcc. Can you possibly check and see whether this
>     behavior still persists on your system?
> 
>     Thanks
>       Wolfgang
> 
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9152

Hi,

Yes, I still have the problem with my 3.2 Mandrake installation. I have
re-attached the output from the compilation. Is there anything else I
can provide?

Cheers,

John Sturton
class CPureVirtualBase1 {
public:
  CPureVirtualBase1(void);
  virtual ~CPureVirtualBase1(void);
  virtual void Import(void)=0;
  virtual void Export(void) const =0;
}; // CPureVirtualBase1

#define DECLARE_CLASS(_className)\
{\
public:\
  _className(void);\
  virtual ~_className(void);\
  virtual void Import(void);\
  virtual void Export(void) const;\
};

class CBase2 : virtual public CPureVirtualBase1
DECLARE_CLASS(CBase2)

class CBase3 : virtual public CPureVirtualBase1, public CBase2
DECLARE_CLASS(CBase3)

class CBase4 : virtual public CPureVirtualBase1
DECLARE_CLASS(CBase4)

class CBase5 : public CBase4, public CBase3
DECLARE_CLASS(CBase5)


CPureVirtualBase1::CPureVirtualBase1(void)
{
} // CPureVirtualBase1::CPureVirtualBase1

CPureVirtualBase1::~CPureVirtualBase1(void)
{
} // CPureVirtualBase1::~CPureVirtualBase1

#define DEFINE_CLASS(_className) \
_className::_className(void) {}\
_className::~_className(void) {}\
void _className::Import(void) {}\
void _className::Export(void) const {}

DEFINE_CLASS(CBase2)
DEFINE_CLASS(CBase3)
DEFINE_CLASS(CBase4)
DEFINE_CLASS(CBase5)

int main(void)
{
  return 0;
} // main


pc-linux1[john]:/serv1-3/save/john/dev/14/gcc *14*> g++ gbug.cpp -v
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --enable-long-long --enable-__cxa_atexit --enable-languages=c,c++,ada,f77,objc,java --host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk)
 /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i586__ -D__tune_pentium__ gbug.cpp -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -quiet -dumpbase gbug.cpp -version -o /usr4/john/tmp/ccWkFMie.s
GNU CPP version 3.2 (Mandrake Linux 9.0 3.2-1mdk) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.2 (Mandrake Linux 9.0 3.2-1mdk) (i586-mandrake-linux-gnu)
        compiled by GNU C version 3.2 (Mandrake Linux 9.0 3.2-1mdk).
ignoring nonexistent directory "/usr/i586-mandrake-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

 /usr/include/c++/3.2
 /usr/include/c++/3.2/i586-mandrake-linux-gnu
 /usr/include/c++/3.2/backward
 /usr/local/include
 /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2/include
 /usr/include
End of search list.
 as -V -Qy -o /usr4/john/tmp/ccpgGezn.o /usr4/john/tmp/ccWkFMie.s
GNU assembler version 2.12.90.0.15 (i586-mandrake-linux-gnu) using BFD version 2.12.90.0.15 20020717
 /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2/../../../crt1.o /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2/../../../crti.o /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2/crtbegin.o -L/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2 -L/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2/../../.. /usr4/john/tmp/ccpgGezn.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2/crtend.o /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2/../../../crtn.o
/usr4/john/tmp/ccpgGezn.o(.gnu.linkonce.d._ZTC6CBase54_6CBase3+0x3c): undefined reference to `virtual thunk [v:0,-12] to CBase3::~CBase3 [in-charge]()'
/usr4/john/tmp/ccpgGezn.o(.gnu.linkonce.d._ZTC6CBase54_6CBase3+0x40): undefined reference to `virtual thunk [v:0,-12] to CBase3::~CBase3 [in-charge deleting]()'
/usr4/john/tmp/ccpgGezn.o(.gnu.linkonce.d._ZTC6CBase54_6CBase3+0x44): undefined reference to `virtual thunk [v:0,-16] to CBase3::Import()'
/usr4/john/tmp/ccpgGezn.o(.gnu.linkonce.d._ZTC6CBase54_6CBase3+0x48): undefined reference to `virtual thunk [v:0,-20] to CBase3::Export() const'
collect2: ld returned 1 exit status

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]