[PATCH] Remove __warndecl

Siddhesh Poyarekar siddhesh@sourceware.org
Thu Nov 5 04:55:25 GMT 2020


The macro is not used anymore, so get rid of it.
---
 debug/warning-nop.c | 8 --------
 misc/sys/cdefs.h    | 3 ---
 2 files changed, 11 deletions(-)

diff --git a/debug/warning-nop.c b/debug/warning-nop.c
index 4ab7e182b7..544ea58e3c 100644
--- a/debug/warning-nop.c
+++ b/debug/warning-nop.c
@@ -43,17 +43,9 @@ nop (void)
 
 /* Don't insert any other #include's before this #undef!  */
 
-#undef __warndecl
-#define __warndecl(name, msg) \
-  extern void name (void) __attribute__ ((alias ("nop"))) attribute_hidden; \
-  link_warning (name, msg)
-
 #undef	__USE_FORTIFY_LEVEL
 #define __USE_FORTIFY_LEVEL 99
 
-/* Following here we need an #include for each public header file
-   that uses __warndecl.  */
-
 /* Define away to avoid warnings with compilers that do not have these
    builtins.  */
 #define __builtin___memcpy_chk(dest, src, len, bos) NULL
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 86906c2478..e94d09d7dd 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -128,13 +128,10 @@
 #define __bos0(ptr) __builtin_object_size (ptr, 0)
 
 #if __GNUC_PREREQ (4,3)
-# define __warndecl(name, msg) \
-  extern void name (void) __attribute__((__warning__ (msg)))
 # define __warnattr(msg) __attribute__((__warning__ (msg)))
 # define __errordecl(name, msg) \
   extern void name (void) __attribute__((__error__ (msg)))
 #else
-# define __warndecl(name, msg) extern void name (void)
 # define __warnattr(msg)
 # define __errordecl(name, msg) extern void name (void)
 #endif
-- 
2.26.2



More information about the Libc-alpha mailing list