Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed boost::flat_map/gcc 4.1.2 crash.
The boost::flat_map implementation makes calls to container_detail::force_copy(), which as far as GCC 4.1.2 is concerned breaks strict aliasing rules. GCC then outputs code which crashes in our Context class, which uses flat_map internally. This is "fixed" by disabling the strict-aliasing optimisations when we detect compilation with GCC 4.1.2. Although there may be some performance implications to this, it turns out that our OS X builds never enabled that optimisation, because there it does not default to on with -O2, and performance has always seemed OK. As one nice side effect of this, we have now removed the disabling of warnings for strict-aliasing problems, which were previously disabled across all compilers on Linux (to work around other problems in boost, and the -isystem flag in GCC 4.1.2). So we now do at least have more complete error checking in more recent compilers.
- Loading branch information