From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3F6173858CDA; Sun, 19 Feb 2023 20:23:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F6173858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676838225; bh=wsnAI4DdgpDt0hSTiMxPdbKZTtYHXiu9r6HceaxAtiE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=o7jN9Qsruq78zBFXeKHYlHNDDb4Dk9M0x201Z9G6NkDniex34N5fZ/rRvn7XliMAR 8/krPzUhK57kKPeKeFJHtrzUEHmuVlEbKj5JyvafQGnUztEwQM5U8m4JQCkBErgraA 10MzZ7FlGJ4u3QDUEYdXxSBhZ6rkvMKPO2Pu+9qo= From: "jg at jguk dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/107106] Incorrect use of uninitialized value warning on C++ Date: Sun, 19 Feb 2023 20:23:44 +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: jg at jguk dot 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: cc 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 Jonny Grant changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jg at jguk dot org --- Comment #2 from Jonny Grant --- I saw this and checked on latest trunk, just sharing as another test case. If I have -Wno-analyzer-use-of-uninitialized-value it keeps this one quiet :7:12: warning: use of uninitialized value '' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 7 | return str; #include std::string make_str(const char * str) { return str; }=