Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5867 closed Bugs (fixed)

The warning stack is not maintained

Reported by: Tsukasa Kusakabe <kusakabe@…> Owned by: Joel de Guzman
Milestone: To Be Determined Component: spirit
Version: Boost 1.48.0 Severity: Problem
Keywords: Cc:

Description

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

#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

  • boost/spirit/home/classic/core/composite/actions.hpp

     
    125125        ActionT actor;
    126126    };
    127127
     128#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
     129#pragma warning(pop)
     130#endif
     131
    128132BOOST_SPIRIT_CLASSIC_NAMESPACE_END
    129133
    130134}} // namespace BOOST_SPIRIT_CLASSIC_NS
  • boost/spirit/home/classic/core/composite/composite.hpp

     
    140140        boost::compressed_pair<left_embed_t, right_embed_t> subj;
    141141    };
    142142
     143#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
     144#pragma warning(pop)
     145#endif
     146
    143147BOOST_SPIRIT_CLASSIC_NAMESPACE_END
    144148
    145149}} // 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

Change History (4)

comment:1 by Joel de Guzman, 11 years ago

Resolution: fixed
Status: newclosed

comment:2 by Tsukasa Kusakabe <kusakabe@…>, 11 years ago

Resolution: fixed
Status: closedreopened

"boost/spirit/home/classic/core/composite/composite.hpp" is not corrected.

comment:3 by Joel de Guzman, 11 years ago

Resolution: fixed
Status: reopenedclosed

you mean actions.hpp, i think. ok fixed. pls. check.

comment:4 by Tsukasa Kusakabe <kusakabe@…>, 11 years ago

All were cured. Thank you.

Note: See TracTickets for help on using tickets.