Subject: [Boost-bugs] [Boost C++ Libraries] #5867: The warning stack is not maintained
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-09-05 11:40:30
#5867: The warning stack is not maintained
-------------------------------------------------------+--------------------
Reporter: Tsukasa Kusakabe <kusakabe@â¦> | Owner: djowel
Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
Version: Boost 1.48.0 | Severity: Problem
Keywords: |
-------------------------------------------------------+--------------------
=== Problem ===
When "#include" is executed for the following file, the warning stack is
destroyed.
The cause is to have forgotten to write "#pragma warning(pop)".
File list
* boost/spirit/home/classic/core/composite/composite.hpp
* boost/spirit/home/classic/core/composite/actions.hpp
=== Impact ===
When the VisualStudio user uses a specific header, a part of a necessary
warning is not displayed.
=== Reproduction code ===
{{{
#!cpp
#include <boost/config.hpp>
#pragma warning(error: 4193)
//boost/spirit/home/classic/core/composite/composite.hpp
#pragma warning(pop) // => warning C4193
#include <boost/spirit/home/classic/core/composite/composite.hpp>
#pragma warning(pop) // !!! There is not warning. !!!
//boost/spirit/home/classic/core/composite/actions.hpp
#pragma warning(pop) // => warning C4193
#include <boost/spirit/home/classic/core/composite/actions.hpp>
#pragma warning(pop) // !!! There is not warning. !!!
int main() {
return 0;
}
}}}
=== Patch ===
{{{
#!diff
Index: boost/spirit/home/classic/core/composite/actions.hpp
===================================================================
--- boost/spirit/home/classic/core/composite/actions.hpp (revision
74236)
+++ boost/spirit/home/classic/core/composite/actions.hpp (working
copy)
@@ -125,6 +125,10 @@
ActionT actor;
};
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(pop)
+#endif
+
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
}} // namespace BOOST_SPIRIT_CLASSIC_NS
Index: boost/spirit/home/classic/core/composite/composite.hpp
===================================================================
--- boost/spirit/home/classic/core/composite/composite.hpp (revision
74236)
+++ boost/spirit/home/classic/core/composite/composite.hpp (working
copy)
@@ -140,6 +140,10 @@
boost::compressed_pair<left_embed_t, right_embed_t> subj;
};
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(pop)
+#endif
+
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
}} // namespace BOOST_SPIRIT_CLASSIC_NS
}}}
=== Environment ===
* OS: Windows 7 Professional SP1
* Compiler:
{{{
Microsoft Visual Studio 2010
Version 10.0.30319.1 RTMRel
Microsoft .NET Framework
Version 4.0.30319 RTMRel
}}}
=== Comments ===
Division origin #5577
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5867> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC