CRC - error: shift count is too large
Hi, I'm attempting to get the Boost CRC to compile for a TI C6713 DSP. I'm using C6000 Code Gen Tools 6.1.6 which is based on EDG. STL implementation is from Dinkumware. When I include <boost/crc.hpp> I get the following errors: "C:/Program Files/boost_1_37_0/boost/crc.hpp", line 286: error: shift count is too large detected during instantiation of class "boost::detail::high_uint_t<Bits> [with Bits=64U]" at line 433 "C:/Program Files/boost_1_37_0/boost/crc.hpp", line 288: error: shift count is too large detected during instantiation of class "boost::detail::high_uint_t<Bits> [with Bits=64U]" at line 433 I'm new to Boost so I could use some help figuring this out. I looked at crc.hpp and high_uint_t appears to be a structure containing two uint_t types corresponding with the errors. In integer.hpp the uint_t struct does not evaluate long long. On this architecture a long is 48 bits and long long is 64 bits. I've only included the header so why is it trying to instantiate a 64 bit type? Thanks, Mike
My thanks to the guys at TI. They were able to track down the issue to a problem in <limits>. Below is the workaround they sent me. Here is the workaround. Edit <limits>. It is found in the \include directory of the compiler distribution. The changes take place within the specialization of the numeric_limits template for the types long and unsigned long. For example, the long specialization starts with these lines ... // CLASS numeric_limits<long> template<> class numeric_limits<long> : public _Num_int_base { // limits for type long Within each specialization there are instances of the expression "CHAR_BIT * sizeof(long)" or "CHAR_BIT * sizeof(unsigned long)". Replace each one with "40". The problem is on C6000 the type long is 40-bits wide, but stored in 64-bit wide chunks in memory. Those expression for computing the number of value bits in the type presume all the bits in storage are used for the value. Not the case for these types.
participants (1)
-
Mike Dalgity