c++.stl.port - warnings in STLport's vector
- Laurentiu Pancescu (7/7) Sep 21 2001 I'm getting warning 12 (variable _TMP0 used before init) in
- Jan Knepper (5/12) Sep 21 2001 As far as I know it has to do with compiler optimization.
- Walter (8/14) Oct 02 2001 What I noticed in compiling SGI STL is that the STL uses empty struct's ...
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
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
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