public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/36296]  New: wrong warning about potential uninitialized variable
@ 2008-05-22  7:28 zimmerma+gcc at loria dot fr
  2008-08-19  2:34 ` [Bug middle-end/36296] bogus uninitialized warning (loop representation, VRP missed-optimization) manu at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: zimmerma+gcc at loria dot fr @ 2008-05-22  7:28 UTC (permalink / raw)
  To: gcc-bugs

When compiling mpfr-2.3.1 with gcc-4.3, one gets the following warning
(among others):
{{{
lngamma.c: In function 'mpfr_lngamma_aux':
lngamma.c:160: warning: 'B' may be used uninitialized in this function
}}}
However, looking at the code shows that this variable cannot be used
uninitialized:
* a variable Bm is initialized to zero
* if Bm=0, B is initialized using an auxiliary function, and Bm is set to 2
  (this code is in a do { ... } while loop, thus is always executed)


-- 
           Summary: wrong warning about potential uninitialized variable
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zimmerma+gcc at loria dot fr
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

end of thread, other threads:[~2014-02-16 13:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-36296-4@http.gcc.gnu.org/bugzilla/>
2013-04-17  8:40 ` [Bug middle-end/36296] bogus uninitialized warning (loop representation, VRP missed-optimization) vincent-gcc at vinc17 dot net
2013-04-17  9:19 ` manu at gcc dot gnu.org
2013-04-17  9:32 ` manu at gcc dot gnu.org
2013-04-17  9:37 ` manu at gcc dot gnu.org
2013-04-17 11:17 ` vincent-gcc at vinc17 dot net
2013-04-17 12:25 ` vincent-gcc at vinc17 dot net
2013-11-20  0:55 ` law at redhat dot com
2014-02-16 13:13 ` jackie.rosen at hushmail dot com
2008-05-22  7:28 [Bug c/36296] New: wrong warning about potential uninitialized variable zimmerma+gcc at loria dot fr
2008-08-19  2:34 ` [Bug middle-end/36296] bogus uninitialized warning (loop representation, VRP missed-optimization) manu at gcc dot gnu dot org
2008-12-25  3:03 ` pinskia at gcc dot gnu dot org
2009-02-02 23:44 ` av1474 at comtv dot ru
2009-02-03  0:28 ` manu 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).