I’m compiling some code that uses crc.hpp. On windows (VS2003) it works fine. On Solaris 8 (Sun Studio 8), I get the following error. (offending code included below)

>> Assertion:  unhandled expression in abi2_mangler::entity_expression (../lnk/v2mangler.cc, line 1584)

    while processing /…/boost/crc.hpp at line 57.

 

If I delete lines 47-58, I get the same error on line 45. If I delete lines 41-59, I get the same error on line 39 which is a comment. A google search turns up a thread in sun’s forums dealing with a bug in the Forte 7 compiler. However, that only showed up when compiling with –g so I removed the –g from my compile line and still get the error. Has anyone else seen this?

 

 

36  // workaround is to make up a dummy function argument that encodes the template

37  // arguments.  Calls to such template functions need all their template

38  // arguments explicitly specified.  At least one compiler that needs this

39  // workaround also needs the default value for the dummy argument to be

40  // specified in the definition.

41  #if defined(__GNUC__) || !defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS)

42  #define BOOST_CRC_DUMMY_PARM_TYPE

43  #define BOOST_CRC_DUMMY_INIT

44  #define BOOST_ACRC_DUMMY_PARM_TYPE

45  #define BOOST_ACRC_DUMMY_INIT

46  #else

47  namespace boost { namespace detail {

48      template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly,

49       BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor,

50       bool ReflectIn, bool ReflectRem >

51      struct dummy_crc_argument  { };

52  } }

53  #define BOOST_CRC_DUMMY_PARM_TYPE   , detail::dummy_crc_argument<Bits, \

54   TruncPoly, InitRem, FinalXor, ReflectIn, ReflectRem> *p_

55  #define BOOST_CRC_DUMMY_INIT        BOOST_CRC_DUMMY_PARM_TYPE = 0

56  #define BOOST_CRC_DUMMY_PARM_TYPE

57  #define BOOST_ACRC_DUMMY_PARM_TYPE  , detail::dummy_crc_argument<Bits, \

58   TruncPoly, 0, 0, false, false> *p_

59  #endif

 

------------------------------

Trevor R.H. Clarke

tclarke at ball com

Ball Aerospace & Technologies Corp