From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F25263858D1E; Fri, 30 Sep 2022 23:48:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F25263858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664581697; bh=gQsG3Q9eLQVPvsgD0BmEc2mOHGFCMab8PQAS8vw8Sbc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KL4bmGd0BOaJBpNVk/a7AJlIP/EZsC4CoV/EqoSCB0BzXvvZy8xNYGvrgdzUkddGj eCWLvr9lWlkKmbioYaCl2QLMmmWnyS/vvPPn9jPQDXnHDiKLTrQmM9cYbaAdzvRFr1 JfLXsv7scczlj9Ur9yLvTYsPwmXvDoG9mEXRPhyw= From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/107106] Incorrect use of uninitialized value warning Date: Fri, 30 Sep 2022 23:48:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status everconfirmed cf_reconfirmed_on blocked Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107106 David Malcolm changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2022-09-30 Blocks| |97110 --- Comment #1 from David Malcolm --- Thanks for filing this bug; confirmed. Note that the simpler: std::string square(int num) { return std::to_string(num); } also gives the warning. Note that I recommend *not* using -fanalyzer on C++ code for now; see track= er bug 97110. I'm guessing the issue is due to -fanalyzer failing to cope with exceptions and exception-handling (bug 97111). In the meantime, this is a = test case that we'll eventually want to get working, so keeping open. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97110 [Bug 97110] [meta-bug] tracker bug for supporting C++ in -fanalyzer=