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
-2
View File
@@ -40,7 +40,6 @@
#include <libdevcore/vector_ref.h>
#if defined(__GNUC__)
#pragma warning(push)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif // defined(__GNUC__)
@@ -57,7 +56,6 @@
#include <boost/multiprecision/cpp_int.hpp>
#if defined(__GNUC__)
#pragma warning(pop)
#pragma GCC diagnostic pop
#endif // defined(__GNUC__)