valgrind and "uninitialized" member values
The meat of this question is: does the C++ standard promise that otherwise uninitialized class members are initialized to zero when the constructor is called? I am under the impression that it does, and certainly gcc behaves that way (if I have a member int, and I don't refer to it in the constructor, it is always zero in the object).
However, I've noticed that if I subsequently access that member, valgrind calls this an error ("Conditional jump or move depends on uninitialised value(s)"). Does this indicate:
1) That I'm wrong, all class members must be explicitly initialized or else their value is undefined, and I have been relying on a non-standard compiler feature.
2) That valgrind is wrong, since the member was initialized to zero.
3) That the compiler which created the executable is wrong in implementation, because valgrind finds this "uninitialized" value, despite the fact its value is zero, which means it clearly was initialized.
I presume #2 but don't know enough about binary executables to say that it couldn't be #3, or to say if it is impossible for valgrind not to do this because of something about the nature of exe's and C++. Or something like that :D