why does this crash?

Amer M Mallah snare@jhu.edu
Tue Feb 10 20:58:00 GMT 1998


any feedback would be appreciated.

/* ----------------------------------------------------------------
   testbug.cc - Show bug which crashes assembler name limit, when
   using a string in a map while debugging switch is on.
   
   Compile with command 
   eg++ -g testbug.cc
   to show bug
   
   Compile with command
   eg++ -g -DNO_BUG testbug.cc
   or
   eg++ testbug.cc
   to have error free compile
   
   2/10/98 Peter N. Steinmetz & Arup Roy
   ---------------------------------------------------------------- */
#include <string>
#include <map>

/* crm sweep classifier */
class TestBug {
protected:
public:
  TestBug( );
  ~TestBug();
#if NO_BUG
  map<int, const char *> testmap;
#else
   map<int, string> testmap;
#endif
};

/* ---------------------------------------------------------------- */
/* TestBug - constructor */
TestBug::TestBug( )
{
}

  
/* ---------------------------------------------------------------- */
/* ~TestBug - Destructor */
TestBug::~TestBug()
{
}

/* ---------------------------------------------------------------- */
void
main()
{}




More information about the Gcc mailing list