public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21310] New: warning: '<anonymous>' may be used uninitialized in this function
@ 2005-04-30 22:15 wanderer at rsu dot ru
2005-04-30 22:16 ` [Bug c++/21310] " wanderer at rsu dot ru
2005-04-30 23:38 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: wanderer at rsu dot ru @ 2005-04-30 22:15 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/21310] warning: '<anonymous>' may be used uninitialized in this function
2005-04-30 22:15 [Bug c++/21310] New: warning: '<anonymous>' may be used uninitialized in this function wanderer at rsu dot ru
@ 2005-04-30 22:16 ` wanderer at rsu dot ru
2005-04-30 23:38 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: wanderer at rsu dot ru @ 2005-04-30 22:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From wanderer at rsu dot ru 2005-04-30 22:16 -------
Created an attachment (id=8778)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8778&action=view)
.ii file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21310
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/21310] warning: '<anonymous>' may be used uninitialized in this function
2005-04-30 22:15 [Bug c++/21310] New: warning: '<anonymous>' may be used uninitialized in this function wanderer at rsu dot ru
2005-04-30 22:16 ` [Bug c++/21310] " wanderer at rsu dot ru
@ 2005-04-30 23:38 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-30 23:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-30 23:38 -------
*** This bug has been marked as a duplicate of 21124 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21310
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-30 23:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-30 22:15 [Bug c++/21310] New: warning: '<anonymous>' may be used uninitialized in this function wanderer at rsu dot ru
2005-04-30 22:16 ` [Bug c++/21310] " wanderer at rsu dot ru
2005-04-30 23:38 ` pinskia at gcc dot gnu dot org
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).