public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "giecrilj at stegny dot 2a.pl" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/49754] New: Let gcc warn about all uninitialized variables Date: Fri, 15 Jul 2011 06:17:00 -0000 [thread overview] Message-ID: <bug-49754-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49754 Summary: Let gcc warn about all uninitialized variables Product: gcc Version: 4.5.1 URL: https://bugzilla.novell.com/show_bug.cgi?id=705160#c1 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c AssignedTo: unassigned@gcc.gnu.org ReportedBy: giecrilj@stegny.2a.pl The compiler gcc currently warns about uninitialized scalar variables but not about compound variables. == Steps to Reproduce == 1. { cat>foo.c<<'/* EOF */' && gcc -Wall -pedantic-errors foo.c; } struct i { int x; }; struct i foo () { struct i x; return x; } int bar () { int y; return +y; } /* EOF */ == Actual Results == foo.c: In function ‘bar’: foo.c:3:21: warning: ‘y’ is used uninitialized in this function == Expected Results == foo.c: In function ‘foo’: foo.c:2:?: warning: ‘x’ is used uninitialized in this function foo.c: In function ‘bar’: foo.c:3:21: warning: ‘y’ is used uninitialized in this function
next reply other threads:[~2011-07-15 6:17 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-07-15 6:17 giecrilj at stegny dot 2a.pl [this message] 2011-07-15 8:38 ` [Bug c/49754] " redi at gcc dot gnu.org 2011-07-15 9:36 ` giecrilj at stegny dot 2a.pl 2011-07-15 9:57 ` redi at gcc dot gnu.org 2011-07-15 10:16 ` redi at gcc dot gnu.org 2011-07-15 11:01 ` giecrilj at stegny dot 2a.pl 2012-10-04 8:23 ` [Bug middle-end/49754] Wuninitialized does not work with structs/unions/arrays manu at gcc dot gnu.org 2020-06-23 21:03 ` 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-49754-4@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).