www.digitalmars.com         C & C++   DMDScript  

c++.stl.port - warnings in STLport's vector

reply Laurentiu Pancescu <plaur crosswinds.net> writes:
I'm getting warning 12 (variable _TMP0 used before init) in
stl/_bvector.h, line 826 (there's just a typedef!!), with
optimizations turned on.  No warning is issued with optimizations set
to "none".

I'm using DMC 8.1d.  Is this a compiler bug, or a STLport
installation problem?


Laurentiu
Sep 21 2001
next sibling parent Jan Knepper <jan smartsoft.cc> writes:
As far as I know it has to do with compiler optimization.
I recall having the same problems with SGI STL at times.
For now I just turned off optimization as I could not isolate which
optimization flag really causes this warning.



Laurentiu Pancescu wrote:

 I'm getting warning 12 (variable _TMP0 used before init) in
 stl/_bvector.h, line 826 (there's just a typedef!!), with
 optimizations turned on.  No warning is issued with optimizations set
 to "none".

 I'm using DMC 8.1d.  Is this a compiler bug, or a STLport
 installation problem?

 Laurentiu

Sep 21 2001
prev sibling parent "Walter" <walter digitalmars.com> writes:
Laurentiu Pancescu wrote in message <9ofkeo$r27$1 digitaldaemon.com>...
I'm getting warning 12 (variable _TMP0 used before init) in
stl/_bvector.h, line 826 (there's just a typedef!!), with
optimizations turned on.  No warning is issued with optimizations set
to "none".

I'm using DMC 8.1d.  Is this a compiler bug, or a STLport
installation problem?

What I noticed in compiling SGI STL is that the STL uses empty struct's to transmit type information, rather than a value. These struct's have no members, and so are not initialized. I adjusted the compiler warning so that structs with no members don't produce the warning. The warning itself is benign, which is likely why you did not notice any actual runtime problems from it. -Walter
Oct 02 2001