Boost C++ Libraries: Ticket #5577: The warning stack is not maintained https://svn.boost.org/trac10/ticket/5577 <h3 class="section" id="Problem">Problem</h3> <p> When "#include" is executed for the following file, the warning stack is destroyed. The cause forgets to write "#pragma warning(pop)" or is a misuse of "#pragma warning(default: warning-number-list)". </p> <p> File list </p> <ul><li>boost/spirit/home/classic/core/composite/composite.hpp </li><li>boost/spirit/home/classic/core/composite/actions.hpp </li><li>boost/archive/xml_wiarchive.hpp </li><li>boost/program_options/parsers.hpp </li><li>boost/program_options/variables_map.hpp </li><li>boost/test/utils/nullstream.hpp </li><li>boost/test/utils/iterator/ifstream_line_iterator.hpp </li></ul><h3 class="section" id="Impact">Impact</h3> <p> When the <a class="missing wiki">VisualStudio</a> user uses a specific header, a part of a necessary warning is not displayed. </p> <h3 class="section" id="Reproductioncode">Reproduction code</h3> <div class="wiki-code"><div class="code"><pre> <span class="cp">#include</span> <span class="cpf">&lt;boost/config.hpp&gt;</span><span class="cp"></span> <span class="cp">#pragma warning(error: 4193)</span> <span class="c1">//boost/spirit/home/classic/core/composite/composite.hpp</span> <span class="cp">#pragma warning(pop) </span><span class="c1">// =&gt; warning C4193</span> <span class="cp">#include</span> <span class="cpf">&lt;boost/spirit/home/classic/core/composite/composite.hpp&gt;</span><span class="cp"></span> <span class="cp">#pragma warning(pop) </span><span class="c1">// !!! There is not warning. !!!</span> <span class="c1">//boost/spirit/home/classic/core/composite/actions.hpp</span> <span class="cp">#pragma warning(pop) </span><span class="c1">// =&gt; warning C4193</span> <span class="cp">#include</span> <span class="cpf">&lt;boost/spirit/home/classic/core/composite/actions.hpp&gt;</span><span class="cp"></span> <span class="cp">#pragma warning(pop) </span><span class="c1">// !!! There is not warning. !!!</span> <span class="c1">//boost/archive/xml_wiarchive.hpp</span> <span class="cp">#pragma warning(pop) </span><span class="c1">// =&gt; warning C4193</span> <span class="cp">#include</span> <span class="cpf">&lt;boost/archive/xml_wiarchive.hpp&gt;</span><span class="cp"></span> <span class="cp">#pragma warning(pop) </span><span class="c1">// !!! There is not warning. !!!</span> <span class="cp">#pragma warning(pop) </span><span class="c1">// !!! There is not warning. !!!</span> <span class="c1">//boost/program_options/parsers.hpp</span> <span class="cp">#pragma warning(pop) </span><span class="c1">// =&gt; warning C4193</span> <span class="cp">#include</span> <span class="cpf">&lt;boost/program_options/parsers.hpp&gt;</span><span class="cp"></span> <span class="cp">#pragma warning(pop) </span><span class="c1">// !!! There is not warning. !!!</span> <span class="c1">//boost/program_options/variables_map.hpp</span> <span class="cp">#pragma warning(pop) </span><span class="c1">// =&gt; warning C4193</span> <span class="cp">#include</span> <span class="cpf">&lt;boost/program_options/variables_map.hpp&gt;</span><span class="cp"></span> <span class="cp">#pragma warning(pop) </span><span class="c1">// !!! There is not warning. !!!</span> <span class="c1">//boost/test/utils/nullstream.hpp</span> <span class="cp">#pragma warning(pop) </span><span class="c1">// =&gt; warning C4193</span> <span class="cp">#include</span> <span class="cpf">&lt;boost/test/utils/nullstream.hpp&gt;</span><span class="cp"></span> <span class="cp">#pragma warning(pop) </span><span class="c1">// !!! There is not warning. !!!</span> <span class="c1">//boost/test/utils/iterator/ifstream_line_iterator.hpp</span> <span class="cp">#pragma warning(pop) </span><span class="c1">// =&gt; warning C4193</span> <span class="cp">#include</span> <span class="cpf">&lt;boost/test/utils/iterator/ifstream_line_iterator.hpp&gt;</span><span class="cp"></span> <span class="cp">#pragma warning(pop) </span><span class="c1">// !!! There is not warning. !!!</span> <span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span> </pre></div></div><h3 class="section" id="Environment">Environment</h3> <ul><li>OS: Windows 7 Professional SP1 </li><li>Compiler: <pre class="wiki">Microsoft Visual Studio 2010 Version 10.0.30319.1 RTMRel Microsoft .NET Framework Version 4.0.30319 RTMRel </pre></li></ul> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5577 Trac 1.4.3 Tsukasa Kusakabe <kusakabe@…> Fri, 27 May 2011 21:38:04 GMT attachment set https://svn.boost.org/trac10/ticket/5577 https://svn.boost.org/trac10/ticket/5577 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">pragma_warning_stack_bug.patch</span> </li> </ul> <p> patch </p> Ticket Michel MORIN <mimomorin@…> Sat, 20 Aug 2011 07:09:05 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5577#comment:1 https://svn.boost.org/trac10/ticket/5577#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> Please make separate tickets for each library (i.e. spirit, serialization, program_options and test). Without this, there is almost no chance to draw authors' attention. </p> <p> Thanks. </p> Ticket Tsukasa Kusakabe <kusakabe@…> Mon, 05 Sep 2011 13:08:51 GMT <link>https://svn.boost.org/trac10/ticket/5577#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5577#comment:2</guid> <description> <p> separated ticket list: </p> <ul><li><a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5867" title="#5867: Bugs: The warning stack is not maintained (closed: fixed)">#5867</a> </li><li><a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5868" title="#5868: Bugs: The warning stack is not maintained (closed: fixed)">#5868</a> </li><li><a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5869" title="#5869: Bugs: The warning stack is not maintained (closed: fixed)">#5869</a> </li><li><a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5870" title="#5870: Bugs: The warning stack is not maintained (closed: fixed)">#5870</a> </li></ul> </description> <category>Ticket</category> </item> <item> <author>Michel Morin <mimomorin@…></author> <pubDate>Wed, 19 Oct 2011 16:54:20 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5577#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5577#comment:3</guid> <description> <p> Well, all the tickets were just closed as fixed :-) </p> <p> Thanks for reporting! </p> </description> <category>Ticket</category> </item> </channel> </rss>