public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/34772] [4.3/4.4/4.5/4.6/4.7 Regression] self-initialisation does not silence uninitialised warnings (-Winit-self ignored)
[not found] <bug-34772-4@http.gcc.gnu.org/bugzilla/>
@ 2011-05-09 17:49 ` jason at gcc dot gnu.org
2011-05-09 21:04 ` [Bug c++/34772] [4.3/4.4/4.5/4.6 " jason at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-09 17:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772
--- Comment #16 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-09 17:34:48 UTC ---
Author: jason
Date: Mon May 9 17:34:44 2011
New Revision: 173582
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173582
Log:
PR c++/34772
* decl.c (initialize_local_var): Use DECL_INITIAL for simple
initialization.
Added:
trunk/gcc/testsuite/c-c++-common/uninit-D-O0.c
- copied, changed from r173581, trunk/gcc/testsuite/gcc.dg/uninit-D-O0.c
trunk/gcc/testsuite/c-c++-common/uninit-D.c
- copied, changed from r173581, trunk/gcc/testsuite/gcc.dg/uninit-D.c
trunk/gcc/testsuite/c-c++-common/uninit-E-O0.c
- copied, changed from r173581, trunk/gcc/testsuite/gcc.dg/uninit-E-O0.c
trunk/gcc/testsuite/c-c++-common/uninit-E.c
- copied, changed from r173581, trunk/gcc/testsuite/gcc.dg/uninit-E.c
trunk/gcc/testsuite/c-c++-common/uninit-F-O0.c
- copied, changed from r173581, trunk/gcc/testsuite/gcc.dg/uninit-F-O0.c
trunk/gcc/testsuite/c-c++-common/uninit-F.c
- copied, changed from r173581, trunk/gcc/testsuite/gcc.dg/uninit-F.c
trunk/gcc/testsuite/c-c++-common/uninit-G-O0.c
- copied, changed from r173581, trunk/gcc/testsuite/gcc.dg/uninit-G-O0.c
trunk/gcc/testsuite/c-c++-common/uninit-G.c
- copied, changed from r173581, trunk/gcc/testsuite/gcc.dg/uninit-G.c
Removed:
trunk/gcc/testsuite/gcc.dg/uninit-D-O0.c
trunk/gcc/testsuite/gcc.dg/uninit-D.c
trunk/gcc/testsuite/gcc.dg/uninit-E-O0.c
trunk/gcc/testsuite/gcc.dg/uninit-E.c
trunk/gcc/testsuite/gcc.dg/uninit-F-O0.c
trunk/gcc/testsuite/gcc.dg/uninit-F.c
trunk/gcc/testsuite/gcc.dg/uninit-G-O0.c
trunk/gcc/testsuite/gcc.dg/uninit-G.c
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/34772] [4.3/4.4/4.5/4.6 Regression] self-initialisation does not silence uninitialised warnings (-Winit-self ignored)
[not found] <bug-34772-4@http.gcc.gnu.org/bugzilla/>
2011-05-09 17:49 ` [Bug c++/34772] [4.3/4.4/4.5/4.6/4.7 Regression] self-initialisation does not silence uninitialised warnings (-Winit-self ignored) jason at gcc dot gnu.org
@ 2011-05-09 21:04 ` jason at gcc dot gnu.org
2011-06-27 13:07 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-09 21:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
Known to work| |4.7.0
Summary|[4.3/4.4/4.5/4.6/4.7 |[4.3/4.4/4.5/4.6
|Regression] |Regression]
|self-initialisation does |self-initialisation does
|not silence uninitialised |not silence uninitialised
|warnings (-Winit-self |warnings (-Winit-self
|ignored) |ignored)
Known to fail| |
--- Comment #17 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-09 20:48:47 UTC ---
Fixed on trunk so far.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/34772] [4.3/4.4/4.5/4.6 Regression] self-initialisation does not silence uninitialised warnings (-Winit-self ignored)
[not found] <bug-34772-4@http.gcc.gnu.org/bugzilla/>
2011-05-09 17:49 ` [Bug c++/34772] [4.3/4.4/4.5/4.6/4.7 Regression] self-initialisation does not silence uninitialised warnings (-Winit-self ignored) jason at gcc dot gnu.org
2011-05-09 21:04 ` [Bug c++/34772] [4.3/4.4/4.5/4.6 " jason at gcc dot gnu.org
@ 2011-06-27 13:07 ` rguenth at gcc dot gnu.org
2011-06-27 16:43 ` [Bug c++/34772] [4.4/4.5/4.6 " manu at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-27 13:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.6 |4.4.7
--- Comment #18 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-27 12:12:54 UTC ---
4.3 branch is being closed, moving to 4.4.7 target.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/34772] [4.4/4.5/4.6 Regression] self-initialisation does not silence uninitialised warnings (-Winit-self ignored)
[not found] <bug-34772-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2011-06-27 13:07 ` rguenth at gcc dot gnu.org
@ 2011-06-27 16:43 ` manu at gcc dot gnu.org
2011-06-27 16:58 ` davi.arnaut at oracle dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu.org @ 2011-06-27 16:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #19 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-06-27 13:10:08 UTC ---
I think no one is going to backport this, specially because it produces new
warnings, and users wouldn't like that in a minor version. Let's close it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/34772] [4.4/4.5/4.6 Regression] self-initialisation does not silence uninitialised warnings (-Winit-self ignored)
[not found] <bug-34772-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2011-06-27 16:43 ` [Bug c++/34772] [4.4/4.5/4.6 " manu at gcc dot gnu.org
@ 2011-06-27 16:58 ` davi.arnaut at oracle dot com
2011-06-27 18:02 ` manu at gcc dot gnu.org
2011-06-27 19:17 ` davi.arnaut at oracle dot com
6 siblings, 0 replies; 7+ messages in thread
From: davi.arnaut at oracle dot com @ 2011-06-27 16:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772
--- Comment #20 from Davi Arnaut <davi.arnaut at oracle dot com> 2011-06-27 16:40:52 UTC ---
Actually, we would really like it. Currently, we have to disable it because
most of the warnings are bogus. New _valid_ warnings are welcome.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/34772] [4.4/4.5/4.6 Regression] self-initialisation does not silence uninitialised warnings (-Winit-self ignored)
[not found] <bug-34772-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2011-06-27 16:58 ` davi.arnaut at oracle dot com
@ 2011-06-27 18:02 ` manu at gcc dot gnu.org
2011-06-27 19:17 ` davi.arnaut at oracle dot com
6 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu.org @ 2011-06-27 18:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772
--- Comment #21 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-06-27 18:01:40 UTC ---
(In reply to comment #20)
> Actually, we would really like it. Currently, we have to disable it because
> most of the warnings are bogus. New _valid_ warnings are welcome.
If you think most -Winit-self warnings are bogus, this fix cannot help you.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/34772] [4.4/4.5/4.6 Regression] self-initialisation does not silence uninitialised warnings (-Winit-self ignored)
[not found] <bug-34772-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2011-06-27 18:02 ` manu at gcc dot gnu.org
@ 2011-06-27 19:17 ` davi.arnaut at oracle dot com
6 siblings, 0 replies; 7+ messages in thread
From: davi.arnaut at oracle dot com @ 2011-06-27 19:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772
--- Comment #22 from Davi Arnaut <davi.arnaut at oracle dot com> 2011-06-27 19:15:45 UTC ---
(In reply to comment #21)
>> Actually, we would really like it. Currently, we have to disable it because
>> most of the warnings are bogus. New _valid_ warnings are welcome.
>
> If you think most -Winit-self warnings are bogus, this fix cannot help you.
Sorry, I wasn't talking about -Winit-self warnings. I meant that most
uninitialised warnings in C++ are bogus [1]. Hence, we have to work around this
by actually initializing certain variables. By initializing the variable we
lose coverage by tools such as valgrind,. The self-initialization trick allow
us to avoid this problem.
Also, we even had a runtime "performance issue" associated with it in debug
builds. A large structure (containing floats, etc) needed to be partially
initialized to silence the warnings, but it caused a penalty since it was
located in a hot function (ended up slowing our test suite).
Anyway, point is, it would be nice to have this fixed in the early 4.x
branches.
1. I believe there is a bug report about this.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-06-27 19:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-34772-4@http.gcc.gnu.org/bugzilla/>
2011-05-09 17:49 ` [Bug c++/34772] [4.3/4.4/4.5/4.6/4.7 Regression] self-initialisation does not silence uninitialised warnings (-Winit-self ignored) jason at gcc dot gnu.org
2011-05-09 21:04 ` [Bug c++/34772] [4.3/4.4/4.5/4.6 " jason at gcc dot gnu.org
2011-06-27 13:07 ` rguenth at gcc dot gnu.org
2011-06-27 16:43 ` [Bug c++/34772] [4.4/4.5/4.6 " manu at gcc dot gnu.org
2011-06-27 16:58 ` davi.arnaut at oracle dot com
2011-06-27 18:02 ` manu at gcc dot gnu.org
2011-06-27 19:17 ` davi.arnaut at oracle dot com
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).