pr 22207: Spurious 'might be used uninitialized' warnings
Ian Lance Taylor
ian@airs.com
Tue Sep 6 22:58:00 GMT 2005
Brian Dessent <brian@dessent.net> writes:
> I hope it's not bad etiquette to ping a PR but I would greatly
> appreciate it if someone could take a quick look at PR 22207 which has
> gone for several months with no replies.
>
> The problem involves bogus "might be used uninitialized" warnings in STL
> headers, but only at -O2 and above. This makes building with "-Wall
> -Werror" impossible without having to disable some warnings.
>
> The problem occurs with gcc 3.4.4 and is a regression from 3.3.3, which
> worked fine. The PR includes a testcase that reproduces it under Cygwin
> but not Linux, so it very well may be something that is
> Cygwin-specific. If you need any further information please let me
> know.
I took a look at this PR. I don't see any immediate fix. The
exception handling code is introducing branches in which the values
are used without being initialized. Since this doesn't happen for
GNU/Linux, I would guess that this is related to the setjmp/longjmp
exceptions which are used on Cygwin. But I don't know for sure.
Since this test case works in the current sources, and since it is
only a warning which can be turned off using -Wno-uninitialized, I'm
not going to look at it further. Sorry.
Ian
More information about the Gcc
mailing list