summaryrefslogtreecommitdiff
path: root/vmac.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-07-05 18:08:05 -0400
committerJeffrey Walton <noloader@gmail.com>2019-07-05 18:08:05 -0400
commitd4b3e1535ad531229e57b0a65563275dca6f7eff (patch)
tree3935ecd8a27361c2f0c78d23d88e7bb4e94e56a5 /vmac.cpp
parent9c28cf222723ec56a97630d82424f6a6658e0e38 (diff)
downloadcryptopp-git-d4b3e1535ad531229e57b0a65563275dca6f7eff.tar.gz
Limit GCC workaround to 5.3 on PowerPC
GCC fixed the issue at GCC 5.3. Also see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31690
Diffstat (limited to 'vmac.cpp')
-rw-r--r--vmac.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/vmac.cpp b/vmac.cpp
index b27b5214..0455b321 100644
--- a/vmac.cpp
+++ b/vmac.cpp
@@ -46,13 +46,14 @@ const word64 mpoly = W64LIT(0x1fffffff1fffffff); /* Poly key mask */
#ifdef __BORLANDC__
#undef const
#endif
+
#if VMAC_BOOL_WORD128
-#ifdef __powerpc__
// workaround GCC Bug 31690: ICE with const __uint128_t and C++ front-end
-#define m126 ((word128(m62)<<64)|m64)
-#else
+# if defined(__powerpc__) && defined (CRYPTOPP_GCC_VERSION) && (CRYPTOPP_GCC_VERSION < 50300)
+# define m126 ((word128(m62)<<64)|m64)
+# else
const word128 m126 = (word128(m62)<<64)|m64; /* 126-bit mask */
-#endif
+# endif
#endif
ANONYMOUS_NAMESPACE_END