public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42238]  New: Missing warning about uninitialized variable
@ 2009-12-01 11:46 ext at sidvind dot com
  2009-12-01 19:32 ` [Bug middle-end/42238] " pinskia at gcc dot gnu dot org
  2009-12-30 11:29 ` manu at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: ext at sidvind dot com @ 2009-12-01 11:46 UTC (permalink / raw)
  To: gcc-bugs

When compiling the following code I expect a warning about usage of
uninitialized variable.

int main(int argc, const char*[]){
        do {
                int a = a;
        } while(1);

        return 0;
}

Even when compiled with "-Wall -Winit-self" I get no warning. I have tried with
both g++-4.4.2 and g++-4.2.4 with the same result.

This is a simplification of the case I posted on the gcc-help list
(http://gcc.gnu.org/ml/gcc-help/2009-11/msg00250.html).


-- 
           Summary: Missing warning about uninitialized variable
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ext at sidvind dot com
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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


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

* [Bug middle-end/42238] Missing warning about uninitialized variable
  2009-12-01 11:46 [Bug c++/42238] New: Missing warning about uninitialized variable ext at sidvind dot com
@ 2009-12-01 19:32 ` pinskia at gcc dot gnu dot org
  2009-12-30 11:29 ` manu at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-12-01 19:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-12-01 19:31 -------
<bb 2>:
  # a_1 = PHI <a_2(D)(0), a_3(2)>
  a_3 = a_1;
  goto <bb 2>;


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |middle-end


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


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

* [Bug middle-end/42238] Missing warning about uninitialized variable
  2009-12-01 11:46 [Bug c++/42238] New: Missing warning about uninitialized variable ext at sidvind dot com
  2009-12-01 19:32 ` [Bug middle-end/42238] " pinskia at gcc dot gnu dot org
@ 2009-12-30 11:29 ` manu at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-12-30 11:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from manu at gcc dot gnu dot org  2009-12-30 11:29 -------
-Winit-self is broken in C++

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


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu dot org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2009-12-30 11:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-01 11:46 [Bug c++/42238] New: Missing warning about uninitialized variable ext at sidvind dot com
2009-12-01 19:32 ` [Bug middle-end/42238] " pinskia at gcc dot gnu dot org
2009-12-30 11:29 ` 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).