[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 06f81a9c 05/24: Refine warning pragmata
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 06f81a9c 05/24: Refine warning pragmata |
Date: |
Fri, 8 Jul 2022 07:11:25 -0400 (EDT) |
branch: master
commit 06f81a9c126a1580fc80dad36f2c4fe60b3a8152
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Refine warning pragmata
Applied warning pragmata to clang as well as to gcc, except for one
warning that clang lacks.
---
unwind.cpp | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/unwind.cpp b/unwind.cpp
index 6d26724e..20e85bf5 100644
--- a/unwind.cpp
+++ b/unwind.cpp
@@ -39,16 +39,18 @@ bool g_unwind = true;
#include <libunwind.h>
#include <typeinfo> // type_info
-# if defined LMI_GCC
+# if defined LMI_GCC || defined LMI_CLANG
# pragma GCC diagnostic push
// Calls to low-level C functions may as well use "0" for
// terseness instead of "nullptr".
# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
// Casting dlsym objects to function pointers is allowed
// only as a conditional extension.
-# pragma GCC diagnostic ignored "-Wconditionally-supported"
+# if defined LMI_GCC
+# pragma GCC diagnostic ignored "-Wconditionally-supported"
+# endif // defined LMI_GCC
# pragma GCC diagnostic ignored "-Wold-style-cast"
-# endif // defined LMI_GCC
+# endif // defined LMI_GCC || defined LMI_CLANG
// For reference, the ABI specifies this prototype:
// extern "C" void __cxa_throw
@@ -205,8 +207,8 @@ void __cxa_throw(void* thrown_exception, std::type_info*
tinfo, void (*dest)(voi
#endif // defined LMI_CLANG
}
-# if defined LMI_GCC
+# if defined LMI_GCC || defined LMI_CLANG
# pragma GCC diagnostic pop
-# endif // defined LMI_GCC
+# endif // defined LMI_GCC || defined LMI_CLANG
#endif // defined LMI_X86_64 && defined LMI_POSIX && defined __GLIBCXX__
- [lmi-commits] [lmi] master 55cc6938 01/24: Establish an initial blacklist of clang warnings, (continued)
- [lmi-commits] [lmi] master 55cc6938 01/24: Establish an initial blacklist of clang warnings, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 10a2b305 06/24: Remediate unreachable 'return' statements, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 8c4089d6 02/24: Label a section for target-specific warnings, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 5de37ebf 07/24: Don't avoid a diagnostic that no longer arises, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 7524301d 08/24: Improve concinnity, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master fb7c030b 10/24: Work around clang '-Wno-unreachable-code-return', Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master a5e06004 14/24: Enable another clang warning, except for cgicc, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master c21d8849 12/24: Explain why certain clang warnings will remain disabled, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master e5eeed14 20/24: Explain why two more clang warnings are disabled, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master f8fac8dd 24/24: Explain why several more clang warnings are disabled, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 06f81a9c 05/24: Refine warning pragmata,
Greg Chicares <=
- [lmi-commits] [lmi] master 32145870 03/24: Correct an inconsistency in a comment, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 5334fa49 04/24: Prefer 'nullptr' to '0', Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master e7ef946d 11/24: Disable a warning only for cgicc, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master e97c7ec6 17/24: Enable another clang warning, with one pragmatic exception, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master b5cee829 18/24: Explain why '-Wpadded' is disabled for clang, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 9a551769 22/24: Disable floating-point comparison warning, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master bb0434c3 09/24: Avoid clang warning on silliness, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 17c9b8e0 16/24: Enable another clang warning, except for cgicc, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 1be7d13d 23/24: Don't let clang warn about lawful comments, Greg Chicares, 2022/07/08
- [lmi-commits] [lmi] master 29fec503 13/24: Work around spurious clang "unused" warnings, Greg Chicares, 2022/07/08