Added guards for unknown pragmas

Removed push/pop if there was no change to the warnings *in the same
file* for a given compiler. This assumes the imported boost headers use
a warning stack themselves.

The pragmas don't seem to be required anymore, but were not removed to
mantain compatibility with older versions of the boost library.

Compiled with
- clang version 6.0.1 (tags/RELEASE_601/final)
- gcc (GCC) 8.1.1 20180531
 against:
- libboost 1.67.0-5
This commit is contained in:
Augusto F. Hack
2018-08-05 19:21:33 -03:00
parent 20c65f9af1
commit 6c3b48ddfc
4 changed files with 21 additions and 18 deletions
+10 -4
View File
@@ -29,12 +29,18 @@
#include <tuple>
#include <memory>
#include <ostream>
#pragma warning(push)
#pragma GCC diagnostic push
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wredeclared-class-member"
#endif // defined(__clang__)
#include <boost/bimap.hpp>
#pragma warning(pop)
#pragma GCC diagnostic pop
#if defined(__clang__)
#pragma clang diagnostic pop
#endif // defined(__clang__)
#include <libdevcore/CommonIO.h>
#include <libdevcore/Exceptions.h>
#include <libevmasm/ExpressionClasses.h>