public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/39088]  New: Warning about potential use of uninitialized variable
@ 2009-02-03 15:54 av1474 at comtv dot ru
  2009-02-04  0:09 ` [Bug c/39088] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: av1474 at comtv dot ru @ 2009-02-03 15:54 UTC (permalink / raw)
  To: gcc-bugs

Following emits a warning about potential use of uninitialized variable,
even though the variable initialization and it's use are guarded by the
same predicate.

int f (void);

int g (int a)
{
    int b;

    if (a) b = f ();
    asm volatile ("#");
    if (a) return b;
    return 1;
}

$ gcc -O -Wuninitialized -c repro.c                
repro.c: In function 'g':
repro.c:5: warning: 'b' may be used uninitialized in this function

This happens with gcc 4.3.0 and 4.3.1


-- 
           Summary: Warning about potential use of uninitialized variable
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: av1474 at comtv dot ru
 GCC build triplet: powerpc-unknown-linux-gnu
  GCC host triplet: powerpc-unknown-linux-gnu
GCC target triplet: powerpc-unknown-linux-gnu


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


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

* [Bug c/39088] Warning about potential use of uninitialized variable
  2009-02-03 15:54 [Bug c/39088] New: Warning about potential use of uninitialized variable av1474 at comtv dot ru
@ 2009-02-04  0:09 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-02-04  0:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-02-04 00:09 -------


*** This bug has been marked as a duplicate of 36550 ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2009-02-04  0:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-03 15:54 [Bug c/39088] New: Warning about potential use of uninitialized variable av1474 at comtv dot ru
2009-02-04  0:09 ` [Bug c/39088] " 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).