From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7538 invoked by alias); 14 May 2009 13:09:19 -0000 Received: (qmail 7482 invoked by uid 48); 14 May 2009 13:09:01 -0000 Date: Thu, 14 May 2009 13:09:00 -0000 Subject: [Bug c++/40146] New: Unexplained "'' is used uninitialized in this function" warning X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "caolanm at redhat dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-05/txt/msg01228.txt.bz2 With some code (attached) using an anonymous namespace I get an unexplained "‘’ is used uninitialized in this function" with -Wall, with no indication of what is seen to be used uninitialized. Changing the namespace to a named one removes the error, as does removing part of the body of a used method. g++ (GCC) 4.4.0 20090506 (Red Hat 4.4.0-4) -DTEST1 names the namespace -DTEST2 comments out the body of the offending method "wiggling" the code makes it disappear/reappear, but difficult to know what the problem is so as to make the test-case a more reasonable size $ g++ -O2 -c -Wall foo.cxx foo.cxx: In function ‘bool demo()’: foo.cxx:4033: warning: ‘’ is used uninitialized in this function foo.cxx:4033: note: ‘’ was declared here $ g++ -DTEST1 -O2 -c -Wall foo.cxx $ g++ -DTEST2 -O2 -c -Wall foo.cxx Looks similar to bug #38908 but that one compiles without warnings here -- Summary: Unexplained "'' is used uninitialized in this function" warning Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: caolanm at redhat dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40146