aboutsummaryrefslogtreecommitdiffstats
path: root/liblll/CodeFragment.cpp
diff options
context:
space:
mode:
authorAugusto F. Hack <hack.augusto@gmail.com>2018-07-22 06:08:47 +0800
committerAugusto F. Hack <hack.augusto@gmail.com>2018-08-06 06:21:33 +0800
commit6c3b48ddfcfb0849e1083cea8d4fae4446511be1 (patch)
tree026b6acf54761cec4cc5573c9e3147e6270f1f63 /liblll/CodeFragment.cpp
parent20c65f9af1f42620db7b77543717a2b341771daf (diff)
downloaddexon-solidity-6c3b48ddfcfb0849e1083cea8d4fae4446511be1.tar.gz
dexon-solidity-6c3b48ddfcfb0849e1083cea8d4fae4446511be1.tar.zst
dexon-solidity-6c3b48ddfcfb0849e1083cea8d4fae4446511be1.zip
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
Diffstat (limited to 'liblll/CodeFragment.cpp')
-rw-r--r--liblll/CodeFragment.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp
index 3e82889a..0aef05a9 100644
--- a/liblll/CodeFragment.cpp
+++ b/liblll/CodeFragment.cpp
@@ -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"