From 2381fa2011b92330d642490da3bf64929f4eed71 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sat, 6 May 2017 15:07:21 +0300 Subject: [PATCH] Suppress Intel compiler warnings about noinline+inline on the same function --- include/boost/stacktrace/safe_dump_to.hpp | 9 +++++++++ include/boost/stacktrace/stacktrace.hpp | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/include/boost/stacktrace/safe_dump_to.hpp b/include/boost/stacktrace/safe_dump_to.hpp index 7dbbd46..ab8f228 100644 --- a/include/boost/stacktrace/safe_dump_to.hpp +++ b/include/boost/stacktrace/safe_dump_to.hpp @@ -14,6 +14,11 @@ #include +#ifdef BOOST_INTEL +# pragma warning(push) +# pragma warning(disable:2196) // warning #2196: routine is both "inline" and "noinline" +#endif + /// @file safe_dump_to.hpp This header contains low-level async-signal-safe functions for dumping call stacks. Dumps are binary serialized arrays of `void*`, /// so you could read them by using 'od -tx8 -An stacktrace_dump_failename' Linux command or using boost::stacktrace::stacktrace::from_dump functions. @@ -182,6 +187,10 @@ BOOST_FORCEINLINE std::size_t safe_dump_to(std::size_t skip, std::size_t max_dep }} // namespace boost::stacktrace +#ifdef BOOST_INTEL +# pragma warning(pop) +#endif + #include #if !defined(BOOST_STACKTRACE_LINK) || defined(BOOST_STACKTRACE_INTERNAL_BUILD_LIBS) diff --git a/include/boost/stacktrace/stacktrace.hpp b/include/boost/stacktrace/stacktrace.hpp index b63e36b..84d850a 100644 --- a/include/boost/stacktrace/stacktrace.hpp +++ b/include/boost/stacktrace/stacktrace.hpp @@ -26,6 +26,11 @@ #include #include +#ifdef BOOST_INTEL +# pragma warning(push) +# pragma warning(disable:2196) // warning #2196: routine is both "inline" and "noinline" +#endif + /// @cond namespace boost { // Forward declaration @@ -402,4 +407,8 @@ typedef basic_stacktrace<> stacktrace; }} // namespace boost::stacktrace +#ifdef BOOST_INTEL +# pragma warning(pop) +#endif + #endif // BOOST_STACKTRACE_STACKTRACE_HPP