[Bug c++/42133] undiagnosed uninitialized variable

2009-11-21 Thread kornelix at yahoo dot de


--- Comment #1 from kornelix at yahoo dot de  2009-11-21 16:21 ---
Sorry, -Wall will indeed trigger a diagnostic.
Please erase this report.
Mike


-- 

kornelix at yahoo dot de changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug c++/42133] New: undiagnosed uninitialized variable

2009-11-21 Thread kornelix at yahoo dot de
#include 

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