Broken compilation with GCC 4.6

Bug #717667 reported by triceo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
High
Unassigned

Bug Description

Trunk cannot be compiled with GCC 4.6 (Fedora Rawhide). The problem is:

[ 63%] Building CXX object src/CMakeFiles/widelands_all.dir/economy/supply_list.cc.o
In file included from /home/triceo/Apps/widelands/src/economy/supply_list.cc:20:0:
/home/triceo/Apps/widelands/src/economy/supply_list.h:38:2: error: ‘size_t’ does not name a type
/home/triceo/Apps/widelands/src/economy/supply_list.h:39:35: error: declaration of ‘operator[]’ as non-function
/home/triceo/Apps/widelands/src/economy/supply_list.h:39:26: error: expected ‘;’ at end of member declaration
/home/triceo/Apps/widelands/src/economy/supply_list.h:39:35: error: expected ‘)’ before ‘const’
/home/triceo/Apps/widelands/src/economy/supply_list.h:40:29: error: declaration of ‘operator[]’ as non-function
/home/triceo/Apps/widelands/src/economy/supply_list.h:40:20: error: expected ‘;’ at end of member declaration
/home/triceo/Apps/widelands/src/economy/supply_list.h:40:29: error: expected ‘)’ before ‘const’
make[2]: *** [src/CMakeFiles/widelands_all.dir/economy/supply_list.cc.o] Error 1
make[1]: *** [src/CMakeFiles/widelands_all.dir/all] Error 2
make: *** [all] Error 2

GCC Version Info:

bash-4.1$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.6.0/lto-wrapper
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.6.0 20110205 (Red Hat 4.6.0-0.6) (GCC)

Related branches

Revision history for this message
Nicolai Hähnle (nha) wrote :

This simply looks like a missing include to me. Does including cstddef fix the problem?

Revision history for this message
triceo (lukas-petrovicky) wrote :

Yes, it does.

Revision history for this message
Nicolai Hähnle (nha) wrote :

Can you produce a patch? Which files are affected? Only supply_list.cc, or also others?

Changed in widelands:
importance: Undecided → High
milestone: none → build16-rc1
Revision history for this message
triceo (lukas-petrovicky) wrote :

Branch proposed for merging.

Nasenbaer (nasenbaer)
Changed in widelands:
status: New → Fix Committed
Revision history for this message
SirVer (sirver) wrote :

Released in build16-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.