changeset 8203:96f4287dd956

Suppress some gcc warnings in glibc header files.
author Bruno Haible <bruno@clisp.org>
date Mon, 19 Feb 2007 22:51:33 +0000
parents b0e0eba8a254
children 63e5b1645f35
files ChangeLog lib/stdlib_.h
diffstat 2 files changed, 24 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Feb 19 20:03:22 2007 +0000
+++ b/ChangeLog	Mon Feb 19 22:51:33 2007 +0000
@@ -1,3 +1,9 @@
+2007-02-19  Bruno Haible  <bruno@clisp.org>
+
+	* lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
+	warnings.
+	Reported by Paul Eggert.
+
 2007-02-19  Jim Meyering  <jim@meyering.net>
 
 	Don't use FD after a successful "fdopendir (fd)".
@@ -608,7 +614,8 @@
 
 	* m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
 	5.2.1 and earlier, whereby \055 was treated just like the range
-	delimiter '-'.  Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
+	delimiter '-'.
+	Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
 
 2007-02-08  Bruno Haible  <bruno@clisp.org>
 
--- a/lib/stdlib_.h	Mon Feb 19 20:03:22 2007 +0000
+++ b/lib/stdlib_.h	Mon Feb 19 22:51:33 2007 +0000
@@ -18,12 +18,28 @@
 
 #if defined __need_malloc_and_calloc
 /* Special invocation convention inside glibc header files.  */
+
+/* This #pragma avoids a warning with "gcc -Wall" on some glibc systems
+   on which <stdlib.h> has an inappropriate declaration, see
+   <http://sourceware.org/bugzilla/show_bug.cgi?id=1079>.  */
+#ifdef __GNUC__
+# pragma GCC system_header
+#endif
+
 #include @ABSOLUTE_STDLIB_H@
+
 #else
 /* Normal invocation convention.  */
 #ifndef _GL_STDLIB_H
 #define _GL_STDLIB_H
 
+/* This #pragma avoids a warning with "gcc -Wall" on some glibc systems
+   on which <stdlib.h> has an inappropriate declaration, see
+   <http://sourceware.org/bugzilla/show_bug.cgi?id=1079>.  */
+#ifdef __GNUC__
+# pragma GCC system_header
+#endif
+
 #include @ABSOLUTE_STDLIB_H@