Question about gcc-3.3.3 and __attribute__ usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi! I'm running gcc-3.3.3 on a Slackware 8-based Linux system running the 2.6.3 Linux kernel and glibc-2.3.2. I'm trying to build wine-20040213 and I'm having compile problems because the /usr/include/asm/byteorder.h header file uses an __attribute__ syntax which doesn't seem to be documented in the gcc manual:

#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




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux