public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dgay at intel-research dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/13025] New: incorrect "might be used uninitialized in this function" warning (no, not the usual problem) Date: Wed, 12 Nov 2003 17:26:00 -0000 [thread overview] Message-ID: <20031112172611.13025.dgay@intel-research.net> (raw) The attached file reports foo.c: In function `main': foo.c:19: warning: `result1' might be used uninitialized in this function when compiled with avr-gcc -Os -Wall -c foo.c gcc was built with ./configure --host=i686-pc-linux-gnu --enable-languages=c --target=avr --disable-nls The same problem shows up in gcc-ss-3_3-20031110 foo.c: char a; static inline char rcombine(char r1, char r2) { return r1 ? 0 : r2; } static inline char Mod1_xx(void) { int i; for (i = 0; i < 6; i++) a += i; return 1; } static inline char Mod1_StdControl_init(void) { char result1; char result2; result1 = rcombine(2, 1); result2 = Mod1_xx(); result1 = rcombine(result1, result2); return result1; } int main(void) { Mod1_StdControl_init(); return 0; } -- Summary: incorrect "might be used uninitialized in this function" warning (no, not the usual problem) Product: gcc Version: 3.3.2 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dgay at intel-research dot net CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: avr http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13025
next reply other threads:[~2003-11-12 17:26 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-11-12 17:26 dgay at intel-research dot net [this message] 2003-11-12 17:27 ` [Bug c/13025] " dgay at intel-research dot net 2003-11-12 17:44 ` mnewman at dragonnorth dot com 2003-11-12 18:06 ` [Bug optimization/13025] " pinskia at gcc dot gnu dot org 2003-11-20 7:33 ` sami dot kantoluoto at embedtronics dot fi 2003-11-25 17:13 ` eric at ecentral dot com 2003-12-19 14:43 ` pinskia at gcc dot gnu dot 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=20031112172611.13025.dgay@intel-research.net \ --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).