Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-03-10 07:59:22


I'm getting several problem with the crc review code, first the compile
time problems:

crc.hpp doesn't build with either VC6 or C++ Builder, I've attatched a
modified header file that fixes this, the changes are:

inconsistent use of class and struct (VC6)
use of integral constant expressions not supported by C++ Builder.
use of static constant data members changed to BOOST_STATIC_CONSTANT (for
VC6).

I also see the following compiler warnings from Borland:

[C++ Warning] CRC.HPP(92): W8055 Possible overflow in shift operation
[C++ Warning] CRC.HPP(95): W8055 Possible overflow in shift operation

And these do look justified to me ??

At run time, VC6 asserts over the following:

    // Simulate CRC-16
    crc_slow<16> crc_16( 0x8005, 0, 0, true, true );
    crc_16( data, data + data_len );
    assert( *crc_16 == 0xBB3D );

and from Borland over:

    // Simulate CRC-32
    crc_slow<32> crc_32( 0x04C11DB7, 0xFFFFFFFF, 0xFFFFFFFF, true, true );
    crc_32( data, data_len );
    assert( *crc_32 == 0xCBF43926 );

Looks like the warnings were justified after all?

That's all for now, more to come...

- John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk