|
From: Nicholas N. <nj...@cs...> - 2008-01-08 08:05:45
|
On Tue, 8 Jan 2008, Jonathan Marshall wrote: > After running valgrind on XBMC for Linux, we've hit a strange issue > with an assignment to a bool. To simplify, the code is of the form: > > bool done(test > 3); > > It is my understanding (and this may well be what is in error ;) that > this is essentially the same (ref > http://www.cplusplus.com/doc/tutorial/variables.html) as: > > bool done = (test > 3); > > However, code in the first form causes valgrind to declare that usage > of the variable done is use of an uninitialised variable, whereas code > in the second form yields no complaints. I don't know C++ well enough to comment. But, although Valgrind reports files/functions/line-numbers in its error messages, it actually works at the binary level, so if you can compare the assembly code for the two versions that might prove instructive. Nick |