|
From: Andy \Axel\ B. <val...@th...> - 2008-01-11 08:34:56
|
On Thu, 2008-01-10 at 08:30 +1300, Jonathan Marshall wrote:
> Thanks for the replies,
>
> 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.
|