|
From: Nicholas N. <nj...@cs...> - 2008-01-12 23:25:05
|
On Fri, 11 Jan 2008, Andy "Axel" Bakun wrote: >> I will check out the difference in ASM between the two situations to >> see if that can yield some more light on the situation. Constant vs >> variable initialisation would surely be a major "gotcha" in the C++ >> specs if this is indeed the case. > > According to objdump -d, gcc 4.1.2 20070925 produces the exact same > series of instructions for the following three constructs: > > bool done = (test > 3); > bool done(test > 3); > bool done; done = (test > 3); > > So that was a useless suggestion, at least for this compiler. Sorry for > the wild goose chase. If Valgrind is doing different things in the two cases then there must be some difference at the binary level. Could there be some static constructors involved that run at start-up, or something like that? Nick |