summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2015-07-13 04:32:20 +0000
committernoloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2015-07-13 04:32:20 +0000
commit72b797a072722775a0fd75f7dfa1d3d2f5da0a42 (patch)
treed7b7332353279a999b680ea76612bedca8ee551c
parent7a0cd59dc76a07ea9c392afc4e83e95467c7348d (diff)
downloadcryptopp-72b797a072722775a0fd75f7dfa1d3d2f5da0a42.tar.gz
Moved GCC_DIAGNOSTIC_AWARE and GCC_OPTIMIZE_AWARE into misc.h
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@580 57ff6487-cd31-0410-9ec3-f628ee90f5f0
-rw-r--r--config.h4
-rw-r--r--misc.h8
2 files changed, 8 insertions, 4 deletions
diff --git a/config.h b/config.h
index be719d8..7472ca0 100644
--- a/config.h
+++ b/config.h
@@ -457,8 +457,4 @@ NAMESPACE_END
#define CRYPTOPP_STATIC_TEMPLATE_CLASS CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS
#endif
-// Used to supress some warnings in some header and implmentation files.
-// GCC_DIAGNOSTIC_AWARE is used because some platforms, like OpenBSD, use old compilers.
-#define GCC_DIAGNOSTIC_AWARE (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) || defined(__clang__)
-
#endif
diff --git a/misc.h b/misc.h
index 2be9d83..9b25ee5 100644
--- a/misc.h
+++ b/misc.h
@@ -41,6 +41,14 @@
#include <byteswap.h>
#endif
+// Used to supress some warnings in some header and implmentation files.
+// Some platforms, like OpenBSD, use old compilers that don't understand -Wno-unknown-pragma.
+#define GCC_DIAGNOSTIC_AWARE ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) || defined(__clang__))
+
+// Used to manage function-level optimizations when working around compiler issues.
+// At -O3, GCC vectorizes and uses SSE instructions, even if alignment does not meet instruction requirements.
+#define GCC_OPTIMIZE_AWARE ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) || defined(__clang__))
+
#if GCC_DIAGNOSTIC_AWARE
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-value"