From 686dea41fcef7f81fde4566749dc3014594f88e2 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 19 Feb 2007 22:51:33 +0000 Subject: [PATCH] Suppress some gcc warnings in glibc header files. --- ChangeLog | 9 ++++++++- lib/stdlib_.h | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2f3243697..e4630394f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-02-19 Bruno Haible + + * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc + warnings. + Reported by Paul Eggert. + 2007-02-19 Jim Meyering 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 . + delimiter '-'. + Reported by Joel E. Denny . 2007-02-08 Bruno Haible diff --git a/lib/stdlib_.h b/lib/stdlib_.h index a48f94cdf..15ca39d8c 100644 --- a/lib/stdlib_.h +++ b/lib/stdlib_.h @@ -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 has an inappropriate declaration, see + . */ +#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 has an inappropriate declaration, see + . */ +#ifdef __GNUC__ +# pragma GCC system_header +#endif + #include @ABSOLUTE_STDLIB_H@ -- 2.11.0