Bug#433572: asm/byteorder.h broken for gcc -ansi
Package: linux-libc-dev
Version: 2.6.21-6
Severity: normal
I have some software that compiles with the -ansi flag and includes
<asm/byteorder.h>. This was fine under 2.6.18, but now...
~$ echo >test.c "#include <asm/byteorder.h>"
~$ gcc -c -Wall -ansi test.c
In file included from /usr/include/asm/byteorder.h:7,
from test.c:1:
/usr/include/asm-i386/byteorder.h:24: error: expected '=', ',', ';', 'asm'
or '__attribute__' before '___arch__swab64'
In file included from /usr/include/linux/byteorder/little_endian.h:12,
from /usr/include/asm-i386/byteorder.h:53,
from /usr/include/asm/byteorder.h:7,
from test.c:1:
/usr/include/linux/byteorder/swab.h:159: error: expected '=', ',', ';',
/'asm' or '__attribute__' before '__fswab64'
/usr/include/linux/byteorder/swab.h:169: error: expected '=', ',', ';',
/'asm' or '__attribute__' before '__swab64p'
/usr/include/linux/byteorder/swab.h:173: error: expected ')' before '*'
/token
In file included from /usr/include/asm-i386/byteorder.h:53,
from /usr/include/asm/byteorder.h:7,
from test.c:1:
/usr/include/linux/byteorder/little_endian.h:43: error: expected '=', ',',
/';', 'asm' or '__attribute__' before '__cpu_to_le64p'
/usr/include/linux/byteorder/little_endian.h:47: error: expected '=', ',',
/';', 'asm' or '__attribute__' before '__le64_to_cpup'
/usr/include/linux/byteorder/little_endian.h:67: error: expected '=', ',',
/';', 'asm' or '__attribute__' before '__cpu_to_be64p'
/usr/include/linux/byteorder/little_endian.h:71: error: expected '=', ',',
/';', 'asm' or '__attribute__' before '__be64_to_cpup'
(Without -ansi, we get the expected result.)
~$ gcc -c -Wall test.c
~$
Reply to: