Project

General

Profile

Defect #3

Updated by Tony Ciavarella over 6 years ago

GCC 4.4.5, the ancient default GCC on Debian 6.x (Squeeze), (Squeeze) coughs this up when running the optimized pdu_factory test:
<pre>[FAIL]: Factory created a PDU for type 237 but its header.pdu_type was 237 (../../tests/pdu_factory/test.cpp:57)</pre>

The debug variant works fine on this compiler.

It seems that any assigned value above 127 for the PDU type causes this kind of strange error. I'm assuming the compiler is doing something to internally optimize the enum down to an 8 bit signed value (which fits the full range of defined values in source:src/disorder/siso/ref_010_enums.hpp). source:src/disorder/siso/siso_ref_10_enums.hpp).

Not sure how best to work around this problem. A quick check of GCC bug reports yielded nothing although this seems to work fine in later GCC versions...

Back