Hi,

When using Mandrake 9.1 I ran into numerous warnings being produced by
gcc when compiling the snippet below with the following command line:
cc -I/usr/include/SDL -D_REENTRANT -Wall -pedantic-errors -Wno-long-long -g -O2 test.c 
 -L/usr/lib -lSDL -lpthread -lSDL_net -o test

#include "SDL_net.h"
 
int main(void)
{
        return 0;
}

Here are the errors produced:
In file included from /usr/include/linux/byteorder/little_endian.h:11,
                 from /usr/include/asm/byteorder.h:32,
                 from /usr/include/SDL/SDL_endian.h:60,
                 from /usr/include/SDL/SDL_net.h:29,
                 from test.c:1:
/usr/include/linux/byteorder/swab.h: In function `__fswab24':
/usr/include/linux/byteorder/swab.h:174: ISO C forbids braced-groups
within expressions
/usr/include/linux/byteorder/swab.h:174: ISO C forbids braced-groups
within expressions
/usr/include/linux/byteorder/swab.h: In function `__swab24p':
/usr/include/linux/byteorder/swab.h:178: ISO C forbids braced-groups
within expressions
/usr/include/linux/byteorder/swab.h:178: ISO C forbids braced-groups
within expressions
/usr/include/linux/byteorder/swab.h: In function `__swab24s':
/usr/include/linux/byteorder/swab.h:182: ISO C forbids braced-groups
within expressions
/usr/include/linux/byteorder/swab.h:182: ISO C forbids braced-groups
within expressions
/usr/include/linux/byteorder/swab.h: In function `__fswab64':
/usr/include/linux/byteorder/swab.h:204: ISO C forbids braced-groups
within expressions
/usr/include/linux/byteorder/swab.h:204: ISO C forbids braced-groups
within expressions
/usr/include/linux/byteorder/swab.h: In function `__swab64p':
/usr/include/linux/byteorder/swab.h:211: ISO C forbids braced-groups
within expressions
/usr/include/linux/byteorder/swab.h:211: ISO C forbids braced-groups
within expressions
/usr/include/linux/byteorder/swab.h: In function `__swab64s':
/usr/include/linux/byteorder/swab.h:215: ISO C forbids braced-groups
within expressions
/usr/include/linux/byteorder/swab.h:215: ISO C forbids braced-groups
within expressions

The problem arises because I like to compile all my programs with
-pedantic-errors to try and catch as much problems as possible. Unlike
other -Wall errors, it does not appear possible to just turn off forbids
braced-groups errors. I'm not in a position to test whether 9.2rc2 still
produces this behaviour so I'd like to ask someone who is to test
whether these errors are still produced (you will need the
libSDL_net1.2-devel package). If any one has a suggestion on how to hack
up swab.h to prevent this warning that will also be equally welcome.

-- 
Sitsofe | http://sucs.org/~sits/


Reply via email to