public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "matt at use dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/40146] Unexplained "'<anonymous>' is used uninitialized in this function" warning
Date: Sun, 10 Jan 2010 22:01:00 -0000	[thread overview]
Message-ID: <20100110220116.11831.qmail@sourceware.org> (raw)
In-Reply-To: <bug-40146-8961@http.gcc.gnu.org/bugzilla/>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3139 bytes --]



------- 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


  parent reply	other threads:[~2010-01-10 22:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-14 13:09 [Bug c++/40146] New: " caolanm at redhat dot com
2009-05-14 13:09 ` [Bug c++/40146] " caolanm at redhat dot com
2009-05-14 14:32 ` pinskia at gcc dot gnu dot org
2009-08-25 13:54 ` bangerth at gmail dot com
2009-08-27 11:17 ` caolanm at redhat dot com
2009-08-27 11:20 ` caolanm at redhat dot com
2009-08-27 11:35 ` bangerth at gmail dot com
2009-09-10 17:44 ` shawn dot starr at rogers dot com
2009-09-10 18:15 ` pinskia at gcc dot gnu dot org
2009-09-10 18:19 ` pinskia at gcc dot gnu dot org
2009-10-16 11:06 ` gcc at abeckmann dot de
2009-10-16 13:11 ` gcc at abeckmann dot de
2010-01-10 22:01 ` matt at use dot net [this message]
2010-01-10 23:30 ` matt at use dot net
2010-01-11 18:39 ` manu at gcc dot gnu dot org
2010-07-13 14:37 ` caolanm at redhat dot com
2010-07-13 15:24 ` manu at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100110220116.11831.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).