I’m following the “Getting started” tutorial from the Boost website. I’m trying to build separatly-compiled libraries using the following commands:
./bootstrap.sh
and then
./b2
During the building, I’m getting a lot (like hundreds) of those warnings:
./boost/...whatever.hpp:linenumber: warning: dereferencing pointer ‘...’ does break strict-aliasing rules
I’d like to know if it is a problem on my side and if I can do something to get rid of these warnings?
Thanks.
(Boost 1.48, Ubuntu 10.04.3 LTS)
Cellperformance states that strict aliasing is:
This warning occurs when
-fno-strict-aliasingand optimizations (-O2or higher) are enabled because the compiler needs to be much more conservative when its accessing (possibly) aliased memory. This leads to less optimizations – the compiler can’t e.g. really be sure that elements doesn’t overlap (see example in article posted above).This is not a warning you should worry about – the Boost developers are probably aware of this and have good reasons to why this is ok.