STL errors building setup with gcc 3.4.4

Brian Dessent brian@dessent.net
Mon Jun 27 20:29:00 GMT 2005


Igor Pechtchanski wrote:

> /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/stl_vector.h:715: warning: '__result' might be used uninitialized in this function
> /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
> /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function

I see the same thing here.

It looks like this is one of those consequences of living on the "-Wall
-Werror" edge.  I poked around in gcc bugzilla and couldn't find
anything that applies directly to this but I did find some cases of
spurious "might be uninitialized" warnings which seem to have been
caused by the compiler deciding to inline a function that initializes
the variable but not being smart enough to realize that this inlined
code is actually initializing that variable, not trying to access it.

If you can reduce the offending parts down to a testcase that might be
helpful.  Otherwise for the time being the workarounds of one or more of
(use gcc 3.3, remove -Werror, specify -Wno-uninitialized) might be
easiest.

Brian



More information about the Cygwin-apps mailing list