Hello, The attached implementation/header issues a warning when
$ gcc-4.0 -c -o test_undefined.o test_undefined.cpp undefined_constructor.hpp:13: warning: inline function 'Base::Base()' used but never defined This does not happen with 3.x compilers. If you remove the #pragma interface, the warning disapears. It does also not happen if you write #pragma implementation "undefined_constructor.hpp" in the cpp file. It apears to be triggered when using a template class with a base class. I had similar warnings for a missing destructor. Peter Soetens
#pragma interface struct Base { }; template< class T> struct Sub : public Base { Sub() {} };
#pragma implementation #include "undefined_constructor.hpp" void foo() { Sub<double> sub; }