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

Bug#162612: libc6-dev: telling gcc to optimize causes C99 violations, thanks to endian.h



> $ gcc-3.2 -c -o twofish.o -O1 -g twofish.c
> twofish.c:214:1: warning: "BIG_ENDIAN" redefined
> In file included from /usr/include/bits/string2.h:52,
>                  from /usr/include/string.h:360,
>                  from /usr/include/memory.h:30,
>                  from twofish.c:156:
> /usr/include/endian.h:47:1: warning: this is the location of the previous
> definition

One thing I want to note is that if you need strict c99, then you should
add this to cflags: --std=c99 -D_ISOC99_SOURCE

The --std=c99 tells the compiler to be strictly c99 conforming, and the
_ISOC99_SOURCE tells glibc to also be such.

You should retest with that.

Second of all, BIG_ENDIAN is only defined if __USE_BSD is defined. It's
likely that somewhere, either _BSD_SOURCE or _GNU_SOURCE is defined.

I'm not sure this is a bug.

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
Deqo       - http://www.deqo.com/



Reply to: