Bug#504827: FTBFS with GCC 4.4: #elif used instead of #else
Package: openais
Version: 0.83-1
User: debian-gcc@lists.debian.org
Usertags: ftbfs-gcc-4.4
Tags: patch
Your package fails to build with the upcoming GCC 4.4. Version 4.4
has not been released yet but I'm building with a snapshot in order
to find errors and give people an advance warning.
GCC 4.4 will introduce better checks in the preprocessor. The problem
is pretty obvious: you're using a #elif without any condition when
you really want a #else.
You can reproduce this problem with gcc-snapshot from unstable.
> Automatic build of openais_0.83-1 on em64t by sbuild/amd64 0.53
...
> cc -O3 -Wall -fomit-frame-pointer -DOPENAIS_LINUX -I/build/tbm/openais-0.83/debian/build/build/include -fPIC -fPIC -c -o crypto.o crypto.c
> crypto.c:39:6: error: #elif with no expression
> make[2]: *** [crypto.o] Error 1
> make[2]: Leaving directory `/build/tbm/openais-0.83/debian/build/build/exec'
> make[1]: *** [all] Error 2
--- exec/crypto.c~ 2008-11-07 15:03:19.000000000 +0000
+++ exec/crypto.c 2008-11-07 15:03:35.000000000 +0000
@@ -36,7 +36,7 @@
#define ENDIAN_LITTLE
#elif _BYTE_ORDER == _BIG_ENDIAN
#define ENDIAN_BIG
-#elif
+#else
#warning "cannot detect byte order"
#endif
--
Martin Michlmayr
http://www.cyrius.com/
Reply to: