Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-56

[gcc -Wshadow] warning from <deque> and <vector>

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.1.2
    • 4.1.3
    • 23. Containers
    • None
    • gcc 2.95.2

    Description

      Compiling <deque> and <vector> with gcc 2.95.2 (this one was on IRIX but the OS probably doesn't matter) yields lots of warnings like the one below:

      gcc -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG -D_REENTRANT -D_RWSTD_USE_CONFIG -I/build/sebor/gcc-2.95.2-15d/include -I/build/sebor/dev/stdlib/include -I/build/sebor/dev/stdlib/examples/include -pedantic -nostdinc++ -fhonor-std -ftemplate-depth-32 -fsquangle -g -Wall -W -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align /build/sebor/dev/stdlib/examples/manual/trnsform.cpp
      /build/sebor/dev/stdlib/include/deque: In method `void std::deque<int,std::allocator<int> >::insert<const int *>(_rw::rw_debug_iter<std::deque<int,std::allocator<int> >,std::rw_deque_iter<int,int,int *,int &,std::allocator<int> >,std::_rw_deque_iter<int,int,int *,int &,std::allocator<int> > >, const int *, const int *)':
      /build/sebor/dev/stdlib/include/deque.cc:524: instantiated from `std::deque<int,std::allocator<int> >::_C_assign_range<const int *>(const int *, const int *, std::input_iterator_tag)'
      /build/sebor/dev/stdlib/include/deque:764: instantiated from here
      /build/sebor/dev/stdlib/include/deque:627: warning: declaration of `__it' shadows previous local

      Attachments

        Activity

          People

            sebor Martin Sebor
            sebor Martin Sebor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: