throw std::bad_cast - cannot compile

Yotam Medini ymedini@iil.intel.com
Tue Jul 25 07:30:00 GMT 2000


iwsl010:90> g++ -v
Reading specs from /afs/iil/nike/data/tools/sys/gcc-2.95.2/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)
iwsl010:91> cat throw.cc
#include <typeinfo>
void dum() {
#if !defined(BE_GENTLE_TO_GCC)
  throw std::bad_cast;
#else
  std::bad_cast bc;
  throw bc;
#endif
}
iwsl010:92> g++ -c throw.cc
throw.cc: In function `void dum()':
throw.cc:4: parse error before `;'
iwsl010:93> g++ -c -DBE_GENTLE_TO_GCC throw.cc
iwsl010:94> 


More information about the Gcc-bugs mailing list