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
+8 -2
View File
@@ -22,12 +22,18 @@
#include "CodeFragment.h"
#include <boost/algorithm/string.hpp>
#pragma warning(push)
#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif // defined(__GNUC__)
#include <boost/spirit/include/support_utree.hpp>
#pragma warning(pop)
#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif // defined(__GNUC__)
#include <libdevcore/CommonIO.h>
#include <libevmasm/Instruction.h>
#include "CompilerState.h"