This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/15879] New: Bad message "struct$member may be used uninitialized"


This is actually a progression, since for this case 
------------- 
struct X { int a; }; 
 
int f() { 
  X x; 
  return x.a; 
} 
------------- 
we did not get a "may be uninitialize" warning before. We get now: 
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 
 
However, I believe that this should read that 'x.a', not 'x$a' may be 
used uninitialized, keeping with the member access operator convention 
of at least three languages supported by gcc. 
 
W.

-- 
           Summary: Bad message "struct$member may be used uninitialized"
           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=15879


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]