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

Bug#504870: FTBFS with GCC 4.4: #elif used instead of #else



Package: koffice
Version: 1:1.6.3-7
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 koffice_1:1.6.3-7 on em64t by sbuild/amd64 0.53
...
>  g++ -DHAVE_CONFIG_H -I. -I.. -I/build/tbm/koffice-1.6.3/./kspread -I/build/tbm/koffice-1.6.3/./lib/kofficeui -I../lib/kofficeui -I/build/tbm/koffice-1.6.3/./lib/kofficecore -I../lib/kofficecore -I/build/tbm/koffice-1.6.3/./lib/store -I../lib/store -I/build/tbm/koffice-1.6.3/./lib/kwmf -I../lib/kwmf -I/build/tbm/koffice-1.6.3/./lib/kopalette -I../lib/kopalette -I/build/tbm/koffice-1.6.3/./lib/kotext -I../lib/kotext -I/build/tbm/koffice-1.6.3/./lib/interfaces -I/build/tbm/koffice-1.6.3/./kspread/tests -Idialogs -I/build/tbm/koffice-1.6.3/./interfaces -I/build/tbm/koffice-1.6.3/./kchart/kdchart -I/usr/include/kde -I/usr/share/qt3/include -I. -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -g -O2 -g -Wall -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DHAVE_KNEWSTUFF -c libkspreadcommon_la.all_cc.cc  -fPIC -DPIC -o .libs/libkspreadcommon_la.all_cc.o
> In file included from libkspreadcommon_la.all_cc.cc:2:
> /build/tbm/koffice-1.6.3/./kspread/digest.cc:53:6: error: #elif with no expression
> In file included from /usr/share/qt3/include/qdragobject.h:50,
>                  from /build/tbm/koffice-1.6.3/./kspread/kspread_sheet.h:26,

--- kspread/digest.cc~	2008-11-07 17:25:29.000000000 +0000
+++ kspread/digest.cc	2008-11-07 17:25:36.000000000 +0000
@@ -50,7 +50,7 @@
 
 #if  SIZEOF_INT == 4
 typedef unsigned int sal_uInt32;
-#elif
+#else
 typedef unsigned long sal_uInt32;
 #endif
 

-- 
Martin Michlmayr
http://www.cyrius.com/



Reply to: