|
From: Ferdinando A. <na...@am...> - 2009-11-27 11:57:16
|
On Fri, Nov 27, 2009 at 12:30 PM, Luigi Ballabio
<lui...@gm...> wrote:
>> using potentially uninitialized local variables smells like a genuine bug to me
>
> Yes--in your compiler's branch detection algorithm :)
>
> The variables above are all initialized one way or the other in a
> section of code that reads:
>
> if (init_ != true || constants_match != true || ...) {
> ... the variables are initialized to some values ...
> }
> else if (init_ == true && constants_match == true) {
> ... the variables are initialized to some other values ...
> }
mmm... it seems to me the condition you summarized as "..." might
really imply some other logic branch where variables are not
initialized.
Anyway I'm sure making the compiler happier would at least result in
more readable if-else code :-)
ciao -- Nando
|