This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42238] New: Missing warning about uninitialized variable
- From: "ext at sidvind dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Dec 2009 11:46:31 -0000
- Subject: [Bug c++/42238] New: Missing warning about uninitialized variable
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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