adding -Wextra -pendatic -fstrict-aliasing (#7)

This commit is contained in:
Hans Dembinski 2019-03-23 11:20:54 +01:00 committed by GitHub
parent bc4271d0ba
commit b9ebd19127
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View File

@ -12,15 +12,15 @@ path-constant THIS_PATH : . ;
# only works with clang because of -fsanitize-blacklist
variant histogram_ubasan : debug :
<cxxflags>"-fno-omit-frame-pointer -O0 -fno-inline -fsanitize=address,leak,undefined -fno-sanitize-recover=all -fsanitize-blacklist=$(THIS_PATH)/tools/blacklist.supp"
# correct linkflags don't work on travis, use workaround
<linkflags>"-fsanitize=address,leak,undefined"
# <linkflags>"-lasan -lubsan"
;
project
: requirements
<implicit-dependency>/boost//headers
<include>$(BOOST_ROOT)
<toolset>clang:<cxxflags>"-pedantic -Wextra -fstrict-aliasing"
<toolset>gcc:<cxxflags>"-pedantic -Wextra -fstrict-aliasing"
: default-build
<warnings>all
#<warnings-as-errors>on

View File

@ -4,12 +4,20 @@
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/config/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_CLANG, >= 1)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wlanguage-extension-token"
#endif
#include <boost/units/quantity.hpp>
#include <boost/units/systems/si/length.hpp>
#if BOOST_WORKAROUND(BOOST_CLANG, >= 1)
#pragma clang diagnostic pop
#endif
#include <boost/core/lightweight_test.hpp>
#include <boost/histogram.hpp>
#include <boost/histogram/axis/ostream.hpp>
#include <boost/histogram/ostream.hpp>
#include <boost/units/quantity.hpp>
#include <boost/units/systems/si/length.hpp>
#include <limits>
#include "is_close.hpp"