[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/3] Omit no-longer-needed pragmas
From: |
Paul Eggert |
Subject: |
[PATCH 2/3] Omit no-longer-needed pragmas |
Date: |
Fri, 29 Dec 2023 19:23:00 -0800 |
* lib/anytostr.c, lib/poll.c, lib/regex.c:
Omit pragmas that should no longer be needed.
---
ChangeLog | 4 ++++
lib/anytostr.c | 7 -------
lib/poll.c | 5 -----
lib/regex.c | 4 ----
4 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fd92a5741b..41a85b3cf1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2023-12-29 Paul Eggert <eggert@cs.ucla.edu>
+ Omit no-longer-needed pragmas
+ * lib/anytostr.c, lib/poll.c, lib/regex.c:
+ Omit pragmas that should no longer be needed.
+
gnulib-common: suppress -Wtautological-constant-out-of-range-compare
* m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Pass
-Wno-tautological-constant-out-of-range-compare to clang, as it’s
diff --git a/lib/anytostr.c b/lib/anytostr.c
index 3b74789631..72c0998b0c 100644
--- a/lib/anytostr.c
+++ b/lib/anytostr.c
@@ -17,13 +17,6 @@
/* Written by Paul Eggert */
-/* Tell gcc not to warn about the (i < 0) test, below. */
-#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
-# pragma GCC diagnostic ignored "-Wtype-limits"
-#elif defined __clang__
-# pragma clang diagnostic ignored "-Wtautological-compare"
-#endif
-
#include <config.h>
#include "inttostr.h"
diff --git a/lib/poll.c b/lib/poll.c
index ec8d2c2b55..c140156157 100644
--- a/lib/poll.c
+++ b/lib/poll.c
@@ -18,11 +18,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
-/* Tell gcc not to warn about the (nfd < 0) tests, below. */
-#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
-# pragma GCC diagnostic ignored "-Wtype-limits"
-#endif
-
#include <config.h>
#include <alloca.h>
diff --git a/lib/regex.c b/lib/regex.c
index 3beb0deb98..f050ba8de4 100644
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -26,10 +26,6 @@
# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
# pragma GCC diagnostic ignored "-Wvla"
# endif
-# if __GNUC_PREREQ (4, 3)
-# pragma GCC diagnostic ignored "-Wold-style-definition"
-# pragma GCC diagnostic ignored "-Wtype-limits"
-# endif
#endif
/* Make sure no one compiles this code with a C++ compiler. */
--
2.40.1