lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master ebed357 2/7: Don't try to disable GCC -Wusele


From: Greg Chicares
Subject: [lmi-commits] [lmi] master ebed357 2/7: Don't try to disable GCC -Wuseless-cast warning for clang
Date: Tue, 13 Nov 2018 12:21:36 -0500 (EST)

branch: master
commit ebed357aba568de406a9134a332554d02e70f148
Author: Vadim Zeitlin <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Don't try to disable GCC -Wuseless-cast warning for clang
    
    This just results in -Wunknown-warning-option.
---
 getopt.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/getopt.cpp b/getopt.cpp
index eeb94b4..a630fcd 100644
--- a/getopt.cpp
+++ b/getopt.cpp
@@ -730,7 +730,7 @@ GetOpt::operator()()
 
   {
     int c = *nextchar++;
-#if defined __GNUC__
+#if defined __GNUC__ && !defined __clang__
 #   pragma GCC diagnostic push
 #   pragma GCC diagnostic ignored "-Wuseless-cast"
 #endif // defined __GNUC__
@@ -740,7 +740,7 @@ GetOpt::operator()()
     // 'char* strchr(char const*, int);' prototype confuses g++, but
     // it's still a defect.
     char* temp = const_cast<char*>(std::strchr(noptstring.c_str(), c));
-#if defined __GNUC__
+#if defined __GNUC__ && !defined __clang__
 #   pragma GCC diagnostic pop
 #endif // defined __GNUC__
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]