[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: [Bug c++/21310] New: warning: '<anonymous>' may be used uninitialized in this function
From: "wanderer at rsu dot ru" <gcc-bugzilla () gcc ! gnu ! org>
Date: 2005-04-30 22:15:46
Message-ID: 20050430221544.21310.wanderer () rsu ! ru
[Download RAW message or body]
Current mainline GCC generate strage warnings with -O -Wuninitialized options
if compile testcase:
--8X---------------------------------
#include<map>
struct W {
static int g(int v) { return std::min(v,0); }
};
struct R {
R();
R(int v);
int m;
};
int main() {
std::map<int,R> e;
e[0] = R(W::g(0));
}
--X8------------------------------
Output:
test.cc: In function 'int main()':
test.cc:4: warning: '<anonymous>' may be used uninitialized in this function
test.cc:15: warning: 'v' may be used uninitialized in this function
GCC 4.0.0 compile with same options without warnings.
Vladimir
--
Summary: warning: '<anonymous>' may be used uninitialized in this
function
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: wanderer at rsu dot ru
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-unknown-freebsd5.3
GCC host triplet: i386-unknown-freebsd5.3
GCC target triplet: i386-unknown-freebsd5.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21310
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic