summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2015-07-21 19:02:11 -0400
committerJeffrey Walton <noloader@gmail.com>2015-07-21 19:02:11 -0400
commit24418177080bb5e53243e5b1ded6bf9e54d271ab (patch)
tree1ada6e838e01db1f1843af9f4f85cfbb19879ac4 /misc.h
parent3c56063c3f6ce2206ed8ab78f78df5b28714573c (diff)
downloadcryptopp-git-24418177080bb5e53243e5b1ded6bf9e54d271ab.tar.gz
Improved comment for GCC_DIAGNOSTIC_AWARE
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/misc.h b/misc.h
index df04ce6d..cb1eb67f 100644
--- a/misc.h
+++ b/misc.h
@@ -44,6 +44,10 @@
// Used to supress some warnings in some header and implementation files.
// Some platforms, like CentOS and OpenBSD, use old compilers that don't understand -Wno-unknown-pragma.
+// These diagnostic blocks showed up somewhere between GCC 4.1 and 4.2, but 4.4 gets us semi-modern compilers.
+// It seems using diagnostic blocks to manage warnings is semi-broken for GCC. Just leave it in place because
+// GCC_DIAGNOSTIC_AWARE will help silence some warnings under GCC, and Clang responds to it as expected.
+// (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431).
#define GCC_DIAGNOSTIC_AWARE ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) || defined(__clang__))
// Used to manage function-level optimizations when working around compiler issues.