diff options
author | noloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2015-07-13 04:32:20 +0000 |
---|---|---|
committer | noloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2015-07-13 04:32:20 +0000 |
commit | 72b797a072722775a0fd75f7dfa1d3d2f5da0a42 (patch) | |
tree | d7b7332353279a999b680ea76612bedca8ee551c /misc.h | |
parent | 7a0cd59dc76a07ea9c392afc4e83e95467c7348d (diff) | |
download | cryptopp-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
Diffstat (limited to 'misc.h')
-rw-r--r-- | misc.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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" |