summaryrefslogtreecommitdiff
path: root/jsi.h
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2021-11-04 12:21:12 +0100
committerTor Andersson <tor.andersson@artifex.com>2021-11-05 12:59:02 +0100
commit90a63426ee93d9079a032740e519988e26d1949c (patch)
tree011cb5416db45d4d6af74f0fabbabbabc54741fc /jsi.h
parente7ba87678f2f1edcb9fcb0564fa7a140ae4fe6bc (diff)
Issue #152: Work around GCC compiler bug introduced in 2015.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103052 for details.
Diffstat (limited to 'jsi.h')
-rw-r--r--jsi.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/jsi.h b/jsi.h
index ecd922b..c9e17fd 100644
--- a/jsi.h
+++ b/jsi.h
@@ -13,6 +13,13 @@
#include <float.h>
#include <limits.h>
+/* NOTE: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103052 */
+#ifdef __GNUC__
+#if (__GNUC__ >= 6)
+#pragma GCC optimize ("no-ipa-pure-const")
+#endif
+#endif
+
/* Microsoft Visual C */
#ifdef _MSC_VER
#pragma warning(disable:4996) /* _CRT_SECURE_NO_WARNINGS */