public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dpapavas at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/54554] New: Undetected use of uninitialized variable Date: Wed, 12 Sep 2012 09:16:00 -0000 [thread overview] Message-ID: <bug-54554-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54554 Bug #: 54554 Summary: Undetected use of uninitialized variable Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned@gcc.gnu.org ReportedBy: dpapavas@gmail.com Created attachment 28176 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28176 The output of the command line used to compile the snippet to stderr. When compiling the snippet below: ---8<------8<------8<------8<------8<------8<------8<------8<--- extern int printf (__const char *__restrict __format, ...); int main() { int j; for (j = 0 ; j < 10 ; j += 1) { int i; printf ("%d\n", i); i = 1; } return 0; } ---8<------8<------8<------8<------8<------8<------8<------8<--- GCC fails to detect the use of an uninitialized variable. The command line used to compile it is: gcc -v -save-temps -Wall -Wextra -O0 -g -ansi -pedantic foo.c Output to stderr has been attached. I won't attach the .i file as it simply seems to contain a copy of the source. Let me know if you need it. Bug 52523 seems to be related if not identical but I'm still submitting this as this is C code not C++.
next reply other threads:[~2012-09-12 9:16 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-09-12 9:16 dpapavas at gmail dot com [this message] 2012-09-12 9:47 ` [Bug c/54554] " rguenth at gcc dot gnu.org 2012-09-12 10:19 ` dpapavas at gmail dot com 2013-01-04 10:28 ` manu at gcc dot gnu.org 2013-01-04 12:41 ` dpapavas at gmail dot com 2013-01-04 12:50 ` manu at gcc dot gnu.org 2013-01-04 14:50 ` dpapavas at gmail dot com 2014-04-09 10:49 ` mpolacek at gcc dot gnu.org 2014-04-09 11:04 ` manu at gcc dot gnu.org 2014-04-10 7:12 ` dominik.muth at gmx dot de 2022-08-29 13:46 ` [Bug tree-optimization/54554] fails to warn for uninitialized var within loop always taken at -O0 rguenth 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-54554-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).