summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"