my_global.h:

Define cxa_pure_virtual to print error message and DBUG_ASSERT:
  calls to pure virtual methods should not go unnoticed.
This commit is contained in:
konstantin@mysql.com 2004-07-09 01:35:35 +04:00
parent 6c996daa91
commit 664329b565

View File

@ -213,7 +213,11 @@ C_MODE_END
/* Fix problem when linking c++ programs with gcc 3.x */ /* Fix problem when linking c++ programs with gcc 3.x */
#ifdef DEFINE_CXA_PURE_VIRTUAL #ifdef DEFINE_CXA_PURE_VIRTUAL
#define FIX_GCC_LINKING_PROBLEM extern "C" { int __cxa_pure_virtual() {return 0;} } #define FIX_GCC_LINKING_PROBLEM \
extern "C" { int __cxa_pure_virtual() {\
DBUG_ASSERT("Pure virtual method called." == "Aborted");\
return 0;\
} }
#else #else
#define FIX_GCC_LINKING_PROBLEM #define FIX_GCC_LINKING_PROBLEM
#endif #endif