Bug#219664: linux/compiler.h give warning with gcc -Wall
Package: linux-kernel-headers
Version: 2.5.999-test7-bk-8
Severity: normal
Dear Glibc maintainers,
Since a few days, the following program
---test.c--------
#include <signal.h>
-----------------
give:
$ gcc-2.95 -c -Wall test.c 2>&1
In file included from /usr/include/asm/sigcontext.h:4,
from /usr/include/bits/sigcontext.h:28,
from /usr/include/signal.h:326,
from test.c:1:
/usr/include/linux/compiler.h:17: warning: `__attribute_used__' redefined
/usr/include/sys/cdefs.h:195: warning: this is the location of the previous definition
Here the relevant code
/usr/include/linux/compiler.h:12
#if !defined(__KERNEL__)
/* Debian: Most of these are inappropriate for userspace. */
/* We don't define likely, unlikely, or barrier; they're namespace-intrusive
and should not be needed outside of __KERNEL__. */
# define __attribute_pure__
# define __attribute_used__
# define __deprecated
#else
and
/usr/include/sys/cdefs.h:188:
/* At some point during the gcc 3.1 development the `used' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
#if __GNUC_PREREQ (3,1)
# define __attribute_used__ __attribute__ ((__used__))
# define __attribute_noinline__ __attribute__ ((__noinline__))
#else
# define __attribute_used__ __attribute__ ((__unused__))
# define __attribute_noinline__ /* Ignore */
#endif
Cheers,
Bill.
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux pari 2.4.18-14smp #1 SMP Wed Sep 4 11:55:37 EDT 2002 i686
Locale: LANG=français, LC_CTYPE=français
-- no debconf information
Reply to: