#5870 closed Bugs (fixed)
The warning stack is not maintained
Reported by: | Owned by: | Gennadiy Rozental | |
---|---|---|---|
Milestone: | Boost 1.59.0 | Component: | test |
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 a misuse of "#pragma warning(default: warning-number-list)".
File list
- boost/test/utils/nullstream.hpp
- boost/test/utils/iterator/ifstream_line_iterator.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/test/utils/nullstream.hpp #pragma warning(pop) // => warning C4193 #include <boost/test/utils/nullstream.hpp> #pragma warning(pop) // !!! There is not warning. !!! //boost/test/utils/iterator/ifstream_line_iterator.hpp #pragma warning(pop) // => warning C4193 #include <boost/test/utils/iterator/ifstream_line_iterator.hpp> #pragma warning(pop) // !!! There is not warning. !!! int main() { return 0; }
Patch
-
boost/test/utils/iterator/ifstream_line_iterator.hpp
86 86 }; 87 87 88 88 #ifdef BOOST_MSVC 89 # pragma warning( default: 4355)89 # pragma warning(pop) 90 90 #endif 91 91 92 92 typedef basic_ifstream_line_iterator<char> ifstream_line_iterator; -
boost/test/utils/nullstream.hpp
85 85 }; 86 86 87 87 #ifdef BOOST_MSVC 88 # pragma warning( default: 4355)88 # pragma warning(pop) 89 89 #endif 90 90 91 91 typedef basic_onullstream<char> onullstream;
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 (2)
comment:1 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 7 years ago
Milestone: | To Be Determined → Boost 1.59.0 |
---|
Note:
See TracTickets
for help on using tickets.
(In [75037]) Added missing " # pragma warning(pop) " Fixes #5870