CC crashes with signal 11
I have a problem with CC from SunStudio 11. It crashes while compiling with the following message
CC -I. -c Token.cpp
>> Signal 11:
while processing Token.cpp at line 5.
The OS is solaris 8 and I have installed patch 121017-10
Here is the source file
/* ANTLR Translator Generator
*/
#include "antlr/Token.hpp"
#include "antlr/String.hpp"
#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
namespace antlr { // this is line 5
#endif
ANTLR_API RefToken Token::badToken = RefToken(new Token(Token::INVALID_TYPE, "<no text>"));
Token::Token() : type(INVALID_TYPE)
{
}
Token::Token(int t) : type(t)
{
}
Token::Token(int t, const ANTLR_USE_NAMESPACE(std)string& txt)
: type(t)
{
setText(txt);
}
void Token::setText(const ANTLR_USE_NAMESPACE(std)string&)
{}
void Token::setType(int t)
{
type = t;
}
Token::~Token()
{}
ANTLR_API RefToken nullToken;
#ifndef NO_STATIC_CONSTS
const int Token::MIN_USER_TYPE;
const int Token::NULL_TREE_LOOKAHEAD;
const int Token::INVALID_TYPE;
const int Token::EOF_TYPE;
const int Token::SKIP;
#endif
#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
}
#endif
If I run a CC -E and a CC on the resulting file, the compiler crashes at the line
RefToken Token :: badToken = RefToken ( new Token ( Token :: INVALID_TYPE , "<no text>" ) ) ;

