This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/15879] New: Bad message "struct$member may be used uninitialized"
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jun 2004 19:29:08 -0000
- Subject: [Bug tree-optimization/15879] New: Bad message "struct$member may be used uninitialized"
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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