Ticket #4053 (closed Bugs: duplicate)
signals2 build failure with "error: dereferencing pointer '<anonymous>' does break strict-aliasing..."
|Reported by:||Joe Steeve <js@…>||Owned by:||fcacciola|
An application using signals2 (attached sample code), fails to build on g++ (version 4.4.2-9, Debian squeeze) with the -O2 flag. It builds fine under -O0. The build fails with:
joe@lark:~/sandbox/test$ g++ -o boost-sig boost-sig.cxx -I/opt/hdb/include -Wall -Werror -O2 cc1plus: warnings being treated as errors /opt/hdb/include/boost/optional/optional.hpp: In function ‘int main()’: /opt/hdb/include/boost/optional/optional.hpp:315: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules /opt/hdb/include/boost/optional/optional.hpp:422: note: initialized from here /opt/hdb/include/boost/optional/optional.hpp:262: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules /opt/hdb/include/boost/optional/optional.hpp:262: note: initialized from here /opt/hdb/include/boost/optional/optional.hpp:268: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules /opt/hdb/include/boost/optional/optional.hpp:268: note: initialized from here
- Owner changed from fmhess to fcacciola
- Component changed from signals2 to optional