Boost C++ Libraries: Ticket #5867: The warning stack is not maintained https://svn.boost.org/trac10/ticket/5867 <h3 class="section" id="Problem">Problem</h3> <p> When "#include" is executed for the following file, the warning stack is destroyed. The cause is to have forgotten to write "#pragma warning(pop)". </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></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="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="Patch">Patch</h3> <div class="wiki-code"> <div class="diff"> <ul class="entries"> <li class="entry"> <h2> <a>boost/spirit/home/classic/core/composite/actions.hpp</a> </h2> <table class="trac-diff inline" cellspacing="0"> <colgroup> <col class="lineno"/><col class="lineno"/><col class="content"/> </colgroup> <thead> <tr> <th title="File boost/spirit/home/classic/core/composite/actions.hpp (revision 74236)"> </th> <th title="File boost/spirit/home/classic/core/composite/actions.hpp (working copy)"> </th> <td> <em></em> &nbsp; </td> </tr> </thead> <tbody class="unmod"> <tr> <th>125</th><th>125</th><td class="l"><span>&nbsp; &nbsp; &nbsp; &nbsp; ActionT actor;</span></td> </tr> <tr> <th>126</th><th>126</th><td class="l"><span>&nbsp; &nbsp; };</span></td> </tr> <tr> <th>127</th><th>127</th><td class="l"><span></span></td> </tr> </tbody> <tbody class="add"> <tr class="first"> <th>&nbsp;</th><th>128</th><td class="r"><ins>#if BOOST_WORKAROUND(BOOST_MSVC, &gt;= 1400)</ins></td> </tr> <tr class=""> <th>&nbsp;</th><th>129</th><td class="r"><ins>#pragma warning(pop)</ins></td> </tr> <tr class=""> <th>&nbsp;</th><th>130</th><td class="r"><ins>#endif</ins></td> </tr> <tr class="last"> <th>&nbsp;</th><th>131</th><td class="r"><ins></ins></td> </tr> </tbody> <tbody class="unmod"> <tr> <th>128</th><th>132</th><td class="l"><span>BOOST_SPIRIT_CLASSIC_NAMESPACE_END</span></td> </tr> <tr> <th>129</th><th>133</th><td class="l"><span></span></td> </tr> <tr> <th>130</th><th>134</th><td class="l"><span>}} // namespace BOOST_SPIRIT_CLASSIC_NS</span></td> </tr> </tbody> </table> </li> <li class="entry"> <h2> <a>boost/spirit/home/classic/core/composite/composite.hpp</a> </h2> <table class="trac-diff inline" cellspacing="0"> <colgroup> <col class="lineno"/><col class="lineno"/><col class="content"/> </colgroup> <thead> <tr> <th title="File boost/spirit/home/classic/core/composite/composite.hpp (revision 74236)"> </th> <th title="File boost/spirit/home/classic/core/composite/composite.hpp (working copy)"> </th> <td> <em></em> &nbsp; </td> </tr> </thead> <tbody class="unmod"> <tr> <th>140</th><th>140</th><td class="l"><span>&nbsp; &nbsp; &nbsp; &nbsp; boost::compressed_pair&lt;left_embed_t, right_embed_t&gt; subj;</span></td> </tr> <tr> <th>141</th><th>141</th><td class="l"><span>&nbsp; &nbsp; };</span></td> </tr> <tr> <th>142</th><th>142</th><td class="l"><span></span></td> </tr> </tbody> <tbody class="add"> <tr class="first"> <th>&nbsp;</th><th>143</th><td class="r"><ins>#if BOOST_WORKAROUND(BOOST_MSVC, &gt;= 1400)</ins></td> </tr> <tr class=""> <th>&nbsp;</th><th>144</th><td class="r"><ins>#pragma warning(pop)</ins></td> </tr> <tr class=""> <th>&nbsp;</th><th>145</th><td class="r"><ins>#endif</ins></td> </tr> <tr class="last"> <th>&nbsp;</th><th>146</th><td class="r"><ins></ins></td> </tr> </tbody> <tbody class="unmod"> <tr> <th>143</th><th>147</th><td class="l"><span>BOOST_SPIRIT_CLASSIC_NAMESPACE_END</span></td> </tr> <tr> <th>144</th><th>148</th><td class="l"><span></span></td> </tr> <tr> <th>145</th><th>149</th><td class="l"><span>}} // namespace BOOST_SPIRIT_CLASSIC_NS</span></td> </tr> </tbody> </table> </li> </ul> </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><h3 class="section" id="Comments">Comments</h3> <p> Division origin <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5577" title="#5577: Bugs: The warning stack is not maintained (closed: invalid)">#5577</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5867 Trac 1.4.3 Joel de Guzman Thu, 08 Sep 2011 05:48:12 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5867#comment:1 https://svn.boost.org/trac10/ticket/5867#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">fixed</span> </li> </ul> Ticket Tsukasa Kusakabe <kusakabe@…> Thu, 08 Sep 2011 16:20:05 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/5867#comment:2 https://svn.boost.org/trac10/ticket/5867#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> "boost/spirit/home/classic/core/composite/composite.hpp" is not corrected. </p> Ticket Joel de Guzman Thu, 08 Sep 2011 23:46:42 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5867#comment:3 https://svn.boost.org/trac10/ticket/5867#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> you mean actions.hpp, i think. ok fixed. pls. check. </p> Ticket Tsukasa Kusakabe <kusakabe@…> Sat, 10 Sep 2011 08:09:39 GMT <link>https://svn.boost.org/trac10/ticket/5867#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5867#comment:4</guid> <description> <p> All were cured. Thank you. </p> </description> <category>Ticket</category> </item> </channel> </rss>