public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/39936] New: -Wuninitialized false positive with unhelpful diagnostic
@ 2009-04-28 2:24 fang at csl dot cornell dot edu
2009-04-28 2:31 ` [Bug c++/39936] " fang at csl dot cornell dot edu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: fang at csl dot cornell dot edu @ 2009-04-28 2:24 UTC (permalink / raw)
To: gcc-bugs
g++-4.4 gives odd error about <anonymous> being uninitialized around a vector
resize().
// test case: tc_uninit.cc
#include <vector>
struct A {
double time;
size_t id;
A() { } // uninitialized
};
struct B {
typedef std::vector<A> array_type;
array_type array;
void
foo(void);
};
void
B::foo(void) {
array.resize(1);
}
% g++-4 -pipe -ansi -pedantic-errors -Wold-style-cast -Woverloaded-virtual -W
-Wextra -Wall -Wundef -Wshadow -Wno-unused-parameter -Wpointer-arith
-Wcast-qual -Wcast-align -Wconversion -Werror -std=c++0x -Wno-error=conversion
-g -O3 -Wno-long-long -c tc_uninit.cc -o tc_uninit.o
cc1plus: warnings being treated as errors
tc_uninit.cc: In member function 'void B::foo()':
tc_uninit.cc:21: error: '<anonymous>' is used uninitialized in this function
{standard input}:unknown:Undefined local symbol L__Znwm$stub
{standard input}:unknown:Undefined local symbol L__ZdlPv$stub
{standard input}:unknown:Undefined local symbol
L__ZSt20__throw_length_errorPKc$stub
Observations: while trying to reduce, when either member of A is removed, the
diagnostic ceases and successfully compiles.
Aside, is there a good way to suppress those unhelpful stdin diagnostics?
build/host: powerpc-apple-darwin8
--
Summary: -Wuninitialized false positive with unhelpful diagnostic
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fang at csl dot cornell dot edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39936
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/39936] -Wuninitialized false positive with unhelpful diagnostic
2009-04-28 2:24 [Bug c++/39936] New: -Wuninitialized false positive with unhelpful diagnostic fang at csl dot cornell dot edu
@ 2009-04-28 2:31 ` fang at csl dot cornell dot edu
2009-04-28 22:19 ` [Bug middle-end/39936] " pinskia at gcc dot gnu dot org
2009-11-19 12:22 ` manu at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: fang at csl dot cornell dot edu @ 2009-04-28 2:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from fang at csl dot cornell dot edu 2009-04-28 02:31 -------
Should probably compare with set of reports blocking PR 24639...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39936
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/39936] -Wuninitialized false positive with unhelpful diagnostic
2009-04-28 2:24 [Bug c++/39936] New: -Wuninitialized false positive with unhelpful diagnostic fang at csl dot cornell dot edu
2009-04-28 2:31 ` [Bug c++/39936] " fang at csl dot cornell dot edu
@ 2009-04-28 22:19 ` pinskia at gcc dot gnu dot org
2009-11-19 12:22 ` manu at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-28 22:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2009-04-28 22:19 -------
Works on the trunk.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |middle-end
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39936
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/39936] -Wuninitialized false positive with unhelpful diagnostic
2009-04-28 2:24 [Bug c++/39936] New: -Wuninitialized false positive with unhelpful diagnostic fang at csl dot cornell dot edu
2009-04-28 2:31 ` [Bug c++/39936] " fang at csl dot cornell dot edu
2009-04-28 22:19 ` [Bug middle-end/39936] " pinskia at gcc dot gnu dot org
@ 2009-11-19 12:22 ` manu at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-11-19 12:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from manu at gcc dot gnu dot org 2009-11-19 12:22 -------
The best we can do is to add this testcase to GCC 4.5 and close this as FIXED
in mainline. These kind of fixes are typically not easy to backport.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-11-19 12:22:23
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39936
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-19 12:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-28 2:24 [Bug c++/39936] New: -Wuninitialized false positive with unhelpful diagnostic fang at csl dot cornell dot edu
2009-04-28 2:31 ` [Bug c++/39936] " fang at csl dot cornell dot edu
2009-04-28 22:19 ` [Bug middle-end/39936] " pinskia at gcc dot gnu dot org
2009-11-19 12:22 ` manu 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).