From 90a63426ee93d9079a032740e519988e26d1949c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 4 Nov 2021 12:21:12 +0100 Subject: [PATCH] Issue #152: Work around GCC compiler bug introduced in 2015. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103052 for details. --- jsi.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jsi.h b/jsi.h index ecd922b..c9e17fd 100644 --- a/jsi.h +++ b/jsi.h @@ -13,6 +13,13 @@ #include #include +/* 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 */