public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "davi.arnaut at oracle dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/34772] [4.4/4.5/4.6 Regression] self-initialisation does not silence uninitialised warnings (-Winit-self ignored)
Date: Mon, 27 Jun 2011 19:17:00 -0000 [thread overview]
Message-ID: <bug-34772-4-jQ4z8HVS71@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-34772-4@http.gcc.gnu.org/bugzilla/>
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.
prev parent reply other threads:[~2011-06-27 19:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 " 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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-34772-4-jQ4z8HVS71@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).