#ifdef __GNUC__
/* For avoiding bswap on i386 */ #ifdef __KERNEL__ #include <linux/config.h> #endif
static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x) { #ifdef CONFIG_X86_BSWAP
[snip]
Apparently, the Linux 2.6 kernel headers were changed to use __attribute_const__ syntax instead of __attribute__((const)):
http://www.ussg.iu.edu/hypermail/linux/kernel/0401.2/0935.html
This is causing others grief as they try to compile various apps:
http://www.ussg.iu.edu/hypermail/linux/kernel/0402.2/1989.html
My question is this: will gcc be changed to support the __attribute_const__ (or similar kinds of) syntax or is the above described change incorrect syntax?
Here is the section of the manual discussing the __attribute__((attribute-list)) syntax:
http://gcc.gnu.org/onlinedocs/gcc-3.3.3/gcc/Attribute-Syntax.html#Attribute%20Syntax
Thanks in advance for your time. :)
Peace...
Tom