public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.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 [thread overview] Message-ID: <bug-90043-4-0A7dSi5aXA@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-90043-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90043 Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2019-09-29 00:00:00 |2021-4-13 Blocks| |24639 --- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- No progress in GCC 11 (my bad). I'll see if I can remember for GCC 12. Below 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 = i; return i; } + gcc -S -Wall -Wextra -Wpedantic pr90043.c + gcc -S -Wall -Wextra -Wpedantic -Winit-self pr90043.c pr90043.c: In function ‘f’: pr90043.c:3:7: warning: ‘i’ is used uninitialized [-Wuninitialized] 3 | int i = i; | ^ pr90043.c:3:7: note: ‘i’ was declared here 3 | int i = i; | ^ Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639 [Bug 24639] [meta-bug] bug to track all Wuninitialized issues
next parent reply other threads:[~2021-04-13 19:55 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-90043-4@http.gcc.gnu.org/bugzilla/> 2021-04-13 19:55 ` msebor at gcc dot gnu.org [this message] 2021-04-13 21:27 ` pinskia at gcc dot gnu.org 2022-01-26 17:48 ` msebor 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-90043-4-0A7dSi5aXA@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).