[PATCH v3 1/7] Assume support for #warning

Alejandro Colomar alx@kernel.org
Mon Nov 10 14:17:24 GMT 2025


This was supported by GCC 1.x, and is now standard since ISO C23.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
 argp/argp-help.c | 4 +---
 math/math.h      | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/argp/argp-help.c b/argp/argp-help.c
index 3fe3a244ce..2200aaf617 100644
--- a/argp/argp-help.c
+++ b/argp/argp-help.c
@@ -1825,9 +1825,7 @@ __argp_short_program_name (void)
   /* FIXME: What now? Miles suggests that it is better to use NULL,
      but currently the value is passed on directly to fputs_unlocked,
      so that requires more changes. */
-# if __GNUC__
-#  warning No reasonable value to return
-# endif /* __GNUC__ */
+# warning No reasonable value to return
   return "";
 # endif
 }
diff --git a/math/math.h b/math/math.h
index b0d99cff8e..b2799f98a6 100644
--- a/math/math.h
+++ b/math/math.h
@@ -26,7 +26,7 @@
 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
 #include <bits/libc-header-start.h>
 
-#if defined log && defined __GNUC__
+#if defined log
 # warning A macro called log was already defined when <math.h> was included.
 # warning This will cause compilation problems.
 #endif
-- 
2.51.0



More information about the Libc-alpha mailing list