public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20644] New: bogus uninitialized warning on unused variable
@ 2005-03-25 23:39 sebor at roguewave dot com
  2005-03-26  0:43 ` [Bug middle-end/20644] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: sebor at roguewave dot com @ 2005-03-25 23:39 UTC (permalink / raw)
  To: gcc-bugs

The warning below is inappropriate since j can never be used in the function.

$ cat t.cpp && gcc -c -O -W t.cpp
int foo ()
{
    int i;
    int j;

    for ( ; ; ) {
        i = 0;
        if (0 == i)
            break;
    }

    if (1 == i)
        return j;

    return 0;
}

t.cpp: In function `int foo()':
t.cpp:4: warning: 'j' might be used uninitialized in this function

-- 
           Summary: bogus uninitialized warning on unused variable
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sebor at roguewave dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: all
  GCC host triplet: all
GCC target triplet: all


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20644


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-08-10 19:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-20644-1186@http.gcc.gnu.org/bugzilla/>
2005-11-02 19:52 ` [Bug middle-end/20644] bogus uninitialized warning on unused variable h dot b dot furuseth at usit dot uio dot no
2005-11-08 17:23 ` law at redhat dot com
2005-11-08 17:26 ` pinskia at gcc dot gnu dot org
2005-11-26  7:38 ` gdr at gcc dot gnu dot org
2007-08-20 14:18 ` manu at gcc dot gnu dot org
2007-08-22 17:38 ` manu at gcc dot gnu dot org
2007-08-23 14:17 ` manu at gcc dot gnu dot org
2008-08-10 18:48 ` manu at gcc dot gnu dot org
2008-08-10 19:50 ` manu at gcc dot gnu dot org
2005-03-25 23:39 [Bug c++/20644] New: " sebor at roguewave dot com
2005-03-26  0:43 ` [Bug middle-end/20644] " pinskia at gcc dot gnu dot org
2005-03-26  1:08 ` sebor at roguewave dot com
2005-03-26  1:14 ` pinskia at gcc dot gnu dot org

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).