------- Comment #11 from matt at use dot net 2010-01-10 22:01 ------- I get this same problem when compiling scummvm (http://scummvm.org) on Ubuntu 9.10/amd64 using the default GCC 4.4.1:
g++ -O1 -finline-small-functions -finline-functions -Wp,-MMD,"engines/sci/.deps/console.d",-MQ,"engines/sci/console.o",-MP -Wall -Werror -g -ansi -W -Wno-unused-parameter -Wno-empty-body -pedantic -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder -fno-strict-aliasing -Wpointer-arith -Wcast-qual -Wcast-align -Wshadow -Wimplicit -Wnon-virtual-dtor -Wwrite-strings -fno-rtti -fno-exceptions -fcheck-new -Wuninitialized -DSCUMMVM_SVN_REVISION=\"47235\" -DHAVE_CONFIG_H -DUNIX -DDATA_PATH=\"/usr/local/share/scummvm\" -DPLUGIN_DIRECTORY=\"/usr/local/lib/scummvm\" -DSDL_BACKEND -DENABLE_SCUMM=STATIC_PLUGIN -DENABLE_SCUMM_7_8 -DENABLE_HE -DENABLE_AGI=STATIC_PLUGIN -DENABLE_AGOS=STATIC_PLUGIN -DENABLE_AGOS2 -DENABLE_CINE=STATIC_PLUGIN -DENABLE_CRUISE=STATIC_PLUGIN -DENABLE_DRACI=STATIC_PLUGIN -DENABLE_DRASCULA=STATIC_PLUGIN -DENABLE_GOB=STATIC_PLUGIN -DENABLE_GROOVIE=STATIC_PLUGIN -DENABLE_GROOVIE2 -DENABLE_KYRA=STATIC_PLUGIN -DENABLE_LOL -DENABLE_LURE=STATIC_PLUGIN -DENABLE_M4=STATIC_PLUGIN -DENABLE_MADE=STATIC_PLUGIN -DENABLE_MOHAWK=STATIC_PLUGIN -DENABLE_PARALLACTION=STATIC_PLUGIN -DENABLE_QUEEN=STATIC_PLUGIN -DENABLE_SAGA=STATIC_PLUGIN -DENABLE_IHNM -DENABLE_SAGA2 -DENABLE_SCI=STATIC_PLUGIN -DENABLE_SCI32 -DENABLE_SKY=STATIC_PLUGIN -DENABLE_SWORD1=STATIC_PLUGIN -DENABLE_SWORD2=STATIC_PLUGIN -DENABLE_TEENAGENT=STATIC_PLUGIN -DENABLE_TINSEL=STATIC_PLUGIN -DENABLE_TOUCHE=STATIC_PLUGIN -DENABLE_TUCKER=STATIC_PLUGIN -I. -I. -I./engines -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c engines/sci/console.cpp -o engines/sci/console.o cc1plus: warnings being treated as errors In file included from ./common/array.h:29, from ./common/fs.h:28, from ./engines/engine.h:30, from ./engines/sci/sci.h:29, from engines/sci/console.cpp:28: ./common/algorithm.h: In function void Common::sort(T, T, StrictWeakOrdering) [with T = Common::ListInternal::Iterator<Sci::ResourceId>, StrictWeakOrdering = Sci::ResourceIdLess]: ./common/algorithm.h:207: error: <anonymous> may be used uninitialized in this function ./common/algorithm.h:207: error: <anonymous> may be used uninitialized in this function ./common/algorithm.h:208: error: <anonymous> may be used uninitialized in this function ./common/algorithm.h:208: error: <anonymous> may be used uninitialized in this function ./common/algorithm.h:207: error: <anonymous> may be used uninitialized in this function ./common/algorithm.h:208: error: <anonymous> may be used uninitialized in this function The issue does not occur with gcc-4.3 or gcc-4.5.20091228. I noticed the issue when compiling with -O3, but reduced it to the above commandline. (Something undocumented must happen at -O1, because putting the individual options for -O1 on the commandline didn't reproduce the issue.) Pre-processed sources are attached. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40146