From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 Description of problem: When I use the -Wshadow option, some standard header files produce warnings. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. compile the file below #include <math.h> #include <string> #include <hash_map> Actual Results: [wtcorrea@neon17 wtcorrea]$ g++ -Wall -Wshadow -c x.cpp In file included from /usr/include/g++-3/string:6, from x.cpp:2: /usr/include/g++-3/std/bastring.h: In method `basic_string<charT, traits, Allocator> &basic_string<charT, traits, Allocator>::replace (charT *, charT *, InputIterator, InputIterator)': /usr/include/g++-3/std/bastring.h:442: warning: declaration of `j1' shadows global declaration In file included from /usr/include/g++-3/hash_map:31, from x.cpp:3: /usr/include/g++-3/stl_hashtable.h: In method `void hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>::_M_copy_from (const hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc> &)': /usr/include/g++-3/stl_hashtable.h:1017: warning: declaration of `__copy' shadows global declaration Expected Results: I would expect the standard headers to be warning free. Additional info: gcc-2.96-108.7.2
We are in fact warning free for these specific headers in gcc 3.2.