From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E6CB3395205E; Tue, 13 Apr 2021 19:55:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6CB3395205E From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/90043] Turn on -Winit-self by default for -Wuninitialized Date: Tue, 13 Apr 2021 19:55:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 9.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: msebor at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: msebor at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2021 19:56:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D90043 Martin Sebor changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2019-09-29 00:00:00 |2021-4-13 Blocks| |24639 --- Comment #3 from Martin Sebor --- No progress in GCC 11 (my bad). I'll see if I can remember for GCC 12. Be= low is a C test case (in C++ the warning is included in -Wall). $ (set -x && cat pr90043.c && gcc -S -Wall -Wextra -Wpedantic pr90043.c && = gcc -S -Wall -Wextra -Wpedantic -Winit-self pr90043.c) + cat pr90043.c int f (void) { int i =3D i; return i; } + gcc -S -Wall -Wextra -Wpedantic pr90043.c + gcc -S -Wall -Wextra -Wpedantic -Winit-self pr90043.c pr90043.c: In function =E2=80=98f=E2=80=99: pr90043.c:3:7: warning: =E2=80=98i=E2=80=99 is used uninitialized [-Wuninit= ialized] 3 | int i =3D i; | ^ pr90043.c:3:7: note: =E2=80=98i=E2=80=99 was declared here 3 | int i =3D i; | ^ Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D24639 [Bug 24639] [meta-bug] bug to track all Wuninitialized issues=