Hello
I put in some extra code in configure.ac to turn off strict aliasing warnings when boost::optional emits a lot of them. It tries to compile a short snippet using boost::optional with -Werror=strict-aliasing, and if it fails, it adds -Wno-strict-aliasing to CXXFLAGS. It might be a bit unsafe, because we won't see aliasing warnings from things other than boost::optional, but on the other hand the legitimate warnings that can highlight real problems won't be crowded out by those spurious warnings we can't fix
Relevant mail from the Boost mailing list. http://lists.boost.org/Archives/boost/2009/05/151577.php
And the relevant quote. "Precisely... a char* is explcitely allowed to alias any object, so, for Boost.Optional at least, the warning is clearly spurious."
Regards, Krzysztof