https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

--- Comment #13 from Jeffrey Walton <noloader at gmail dot com> ---
This issued caused Crypto++ to remove -Wall (and above) under GCC. Crypto++ is
C++ with lots of interfaces, and it performs a fair amount of intermediate
calculations used in an assert. It really needed the following to work as
expected:

// GCC diagnostcs available after GCC 4.2
(https://gcc.gnu.org/ml/gcc-help/2015-07/msg00063.html)
#define GCC_DIAGNOSTIC_AWARE ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__
>= 2)) || defined(__clang__))

#if GCC_DIAGNOSTIC_AWARE
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-value"
# pragma GCC diagnostic ignored "-Wunused-variable"
#endif

Crypto++ is fortunate in that its multi-compiler friendly and cross-platform.
It can use Clang, ICC, Comeau or, say MSVC with /W4. Other projects are not so
lucky. They include Asterisk (the PBX software package). Asterisk uses
trampolines, so it cannot compile under Clang. And it never supported MSVC.

Reply via email to