Confused about warnings in STLport
Hi,
I'm using C++5.7:
% CC -V
CC: Sun C++ 5.7 Patch 117830-08 2006/07/12
I'm trying to compile a rather big code base using increased warning level and turning warnings into errors.
I'm having trouble with STLport's fstream include file (using STLport that ships with the compiler):
/opt/tools/SunStudio10/SUNWspro/bin/CC -g -mt -KPIC -library=%none,stlport4 +w -errtags -erroff=notemsource,unknownpragma -xwe -c Config.cc
"/opt/tools/SunStudio10/SUNWspro/prod/include/CC/stlport4/stl/_fstream.h", line 566: Warning, hidef: std::ifstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
"Config.cc", line 253:Where, temwhilespec: While specializing "std::ifstream ".
"Config.cc", line 253:Where, temspecend: Specialized in non-template code.
Reading some earlier posts on this forum (e.g. http://forum.java.sun.com/thread.jspa?forumID=850&threadID=5070415), I was under the impression that the flag -xwe would suppress warnings coming from system headers (although the documentation about this option makes no mention of it).
Does this exclude STLport headers?
Also according to the above mentioned post, bug number 6197919 had been filed in order to get the appropriate behaviour when using -errwarn flag.
But I run into the same issue:
/opt/tools/SunStudio10/SUNWspro/bin/CC -g -mt -KPIC -library=%none,stlport4 -errtags -erroff=notemsource,unknownpragma -errwarn -c Config.cc
"/opt/tools/SunStudio10/SUNWspro/prod/include/CC/stlport4/stl/_fstream.h", line 566: Warning, hidef: std::ifstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
"Config.cc", line 253:Where, temwhilespec: While specializing "std::ifstream ".
"Config.cc", line 253:Where, temspecend: Specialized in non-template code.
I don't want to ignore the error tag "hidef" as I did find user code doing real mistakes with name hiding.
Hopefully I missed something...
Cheers,
Bertrand.

