public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "matthewc at cse dot unsw dot edu dot au" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/33665] New: Warning: `this.11' is used uninitialized in this function Date: Fri, 05 Oct 2007 09:52:00 -0000 [thread overview] Message-ID: <bug-33665-15187@http.gcc.gnu.org/bugzilla/> (raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1414 bytes --] Experienced with 4.1.1, 4.1.2 and 4.2.1. Below is the minimum test case that I can narrow it down to while being reproducible across these versions. $ g++ -O3 -Wall test.cpp -o test test.cpp: In function int main(): test.cpp:19: warning: this.11 is used uninitialized in this function test.cpp:19: note: this.11 was declared here ws004:/tmp$ --- struct base1 { int function() { return 1; } }; struct base2 : public base1 { double val1; double val2; }; struct myclass : public base2 { public: int x; myclass() { x = this->function(); } }; static myclass init_instance() { return myclass(); } struct test_harness { const myclass instance; test_harness() : instance(init_instance()) { } int result() { return instance.x; } }; int main(void) { test_harness x; return x.result(); } -- Summary: Warning: `this.11' is used uninitialized in this function Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: matthewc at cse dot unsw dot edu dot au GCC build triplet: i686-pc-linux GCC host triplet: i686-pc-linux GCC target triplet: i686-pc-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33665
next reply other threads:[~2007-10-05 9:52 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-10-05 9:52 matthewc at cse dot unsw dot edu dot au [this message] 2008-01-06 22:47 ` [Bug c++/33665] [4.1/4.2 regression] Bogus warning: `this.0' " reichelt at gcc dot gnu dot org 2008-07-04 22:19 ` [Bug c++/33665] [4.2 " jsm28 at gcc dot gnu dot org 2009-03-30 22:30 ` jsm28 at gcc dot gnu dot org
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-33665-15187@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: linkBe 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).