[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ///usr/include/stdlib.h:617: warning: '__malloc__' attribute ignored
From: |
Bruno Haible |
Subject: |
Re: ///usr/include/stdlib.h:617: warning: '__malloc__' attribute ignored |
Date: |
Tue, 20 Feb 2007 01:18:12 +0100 |
User-agent: |
KMail/1.5.4 |
Ben Pfaff wrote:
> Would it be possible to apply a similar fix to string_.h? Under
> mingw, I see the following warnings when compiling a file that
> just contains the single line "#include <string.h>":
>
> address@hidden:~/pspp/mingw/pspp/_mingw/gl(0)$ i586-mingw32msvc-gcc -c
> -I. -Drestrict= -Wmissing-prototypes include-string.c
> In file included from ./string.h:23,
> from include-string.c:1:
>
> ///usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/include/string.h:97:
> warning: no previous prototype for 'strcasecmp'
>
> ///usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/include/string.h:103:
> warning: no previous prototype for 'strncasecmp'
> address@hidden:~/pspp/mingw/pspp/_mingw/gl(0)$
Ok, I'm applying this.
2007-02-19 Bruno Haible <address@hidden>
* lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
warnings.
Reported by Ben Pfaff <address@hidden>.
*** lib/string_.h 17 Feb 2007 22:21:32 -0000 1.26
--- lib/string_.h 20 Feb 2007 00:09:04 -0000
***************
*** 19,24 ****
--- 19,30 ----
#ifndef _GL_STRING_H
#define _GL_STRING_H
+ /* This #pragma avoids a warning with "gcc -Wmissing-prototypes" on some
+ mingw systems. */
+ #ifdef __GNUC__
+ # pragma GCC system_header
+ #endif
+
#include @ABSOLUTE_STRING_H@