public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/50276] [C++0x] Wrong "used uninitialized in this function" warning Date: Tue, 03 Jan 2012 22:46:00 -0000 [thread overview] Message-ID: <bug-50276-4-wL08ghKIhj@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-50276-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50276 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code --- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-03 22:46:33 UTC --- If I consider Comment #1, and maybe I tweak it a bit like this: bool testfun(void*) { return true; } template<int i> bool test() { if (bool value = /* true */ testfun( []() { return 0; } )) return value; __builtin_abort(); return false; } int main() { test<0>(); } I see what looks like a full fledged miscompilation: testfun always returns true, thus test should simply return true! Jason, what do you think?
next prev parent reply other threads:[~2012-01-03 22:46 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-09-02 12:45 [Bug c++/50276] New: Wrong "used uninitialized in this function" warning [C++0x] bisqwit at iki dot fi 2011-09-02 13:05 ` [Bug c++/50276] " bisqwit at iki dot fi 2011-09-14 21:11 ` [Bug c++/50276] [C++0x] Wrong "used uninitialized in this function" warning paolo.carlini at oracle dot com 2012-01-03 22:46 ` paolo.carlini at oracle dot com [this message] 2012-01-03 23:02 ` paolo.carlini at oracle dot com 2012-01-03 23:16 ` bisqwit at iki dot fi 2013-03-05 17:42 ` jason at gcc dot gnu.org 2013-03-05 18:59 ` jason at gcc dot gnu.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-50276-4-wL08ghKIhj@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).