[Bug c++/42133] New: undiagnosed uninitialized variable
kornelix at yahoo dot de
gcc-bugzilla@gcc.gnu.org
Sat Nov 21 16:18:00 GMT 2009
#include <stdio.h>
int main(int argc, char *argv[])
{
int click;
click++;
printf("click is %d \n",click);
return 0;
}
compile and execute:
test $: g++ -o gccbug gccbug.cpp
test $: ./gccbug
click is 1
In this case click is set to zero. When I found this bug in
a more complex program click had been set to -1 initially.
--
Summary: undiagnosed uninitialized variable
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kornelix at yahoo dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42133
More information about the Gcc-bugs
mailing list