public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/15880] New: No 'may be used uninitialize' warning for arrays.
@ 2004-06-08 19:33 bangerth at dealii dot org
  2004-06-08 19:39 ` [Bug tree-optimization/15880] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: bangerth at dealii dot org @ 2004-06-08 19:33 UTC (permalink / raw)
  To: gcc-bugs

While we get a 'may be used uninitialized' warning for this case: 
-------------  
struct X { int a; };  
  
int f() {  
  X x;  
  return x.a;  
}  
-------------  
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.cc -O2 -Wuninitialized  
x.cc: In function `int f()':  
x.cc:5: warning: 'x$a' is used uninitialized in this function  
  
we do not for this case: 
--------------- 
int f() { 
  int x[3]; 
  return x[0]; 
} 
--------------- 
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.cc -O2 -Wuninitialized 
 
Does this have a reason or is it a bug? I tend to think it is the latter. 
 
W.

-- 
           Summary: No 'may be used uninitialize' warning for arrays.
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug tree-optimization/15880] No 'may be used uninitialize' warning for arrays.
  2004-06-08 19:33 [Bug tree-optimization/15880] New: No 'may be used uninitialize' warning for arrays bangerth at dealii dot org
@ 2004-06-08 19:39 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-08 19:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-08 19:39 -------
Yes this is because array are not Scalared replaced yet.
And this is a dup of bug 10138.

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

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


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


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

end of thread, other threads:[~2004-06-08 19:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-08 19:33 [Bug tree-optimization/15880] New: No 'may be used uninitialize' warning for arrays bangerth at dealii dot org
2004-06-08 19:39 ` [Bug tree-optimization/15880] " 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).