Possibly uninitialized variable in include/bits/istream.tcc basic_istream::ignore

Benjamin Kosnik bkoz@redhat.com
Thu Jun 10 17:20:00 GMT 2004


>I've been applying the patch below to fix an uninitialized variable 
>warning causing mainline bootstrap to fail.  I have not analyzed the 
>logic, so I have no idea what the correct fix is.  Perhaps the while 
>loops needs to be changed to a do-while loop?

I cannot reproduce this.

make WERROR="-Werror" WARN_FLAGS="-Wuninitialized" istream-inst.lo

Doesn't show any issue.

FWIW, I think the correct fix would be

int_type __c = __eof.

-benjamin



More information about the Libstdc++ mailing list