Hi Yoann, > stdio.h:20: warning: ignoring pragma: system_header > stdlib.h:19: warning: ignoring pragma: system_header > string.h:22: warning: ignoring pragma: system_header > strings.h:22: warning: ignoring pragma: system_header > [...] > > This is on FreeBSD 4.10-RELEASE, gcc version 2.95.4 20020320
Indeed, #pragma GCC system_header is only supported starting with GCC 3.0. I'm applying this. It increases the autoconf version requirement from 2.59 to 2.60. Hope this does not cause problems to anyone. autoconf 2.60 was released more than two years ago. 2008-10-17 Bruno Haible <[EMAIL PROTECTED]> Avoid gcc warnings because of #pragma GCC system_header on older gcc. * m4/include_next.m4: Require autoconf >= 2.60. (gl_INCLUDE_NEXT): Use #pragma GCC system_header only for GCC 3.0 or newer. Reported by Yoann Vandoorselaere <[EMAIL PROTECTED]>. *** m4/include_next.m4.orig 2008-10-18 01:39:56.000000000 +0200 --- m4/include_next.m4 2008-10-18 01:39:50.000000000 +0200 *************** *** 1,4 **** ! # include_next.m4 serial 8 dnl Copyright (C) 2006-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, --- 1,4 ---- ! # include_next.m4 serial 9 dnl Copyright (C) 2006-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, *************** *** 6,11 **** --- 6,13 ---- dnl From Paul Eggert and Derek Price. + AC_PREREQ([2.60]) + dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. dnl dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to *************** *** 59,65 **** if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next if test -n "$GCC"; then ! PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' fi else INCLUDE_NEXT=include --- 61,70 ---- if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next if test -n "$GCC"; then ! dnl GCC 3.0 or newer supports #pragma GCC system_header. ! PRAGMA_SYSTEM_HEADER='#if __GNUC__ >= 3 ! #pragma GCC system_header ! #endif' fi else INCLUDE_NEXT=include