[Boost-bugs] [Boost C++ Libraries] #3905: asio boost headers fail with g++-4.3.2 and -Wshadow -Werror

Subject: [Boost-bugs] [Boost C++ Libraries] #3905: asio boost headers fail with g++-4.3.2 and -Wshadow -Werror
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-02-06 18:21:47


#3905: asio boost headers fail with g++-4.3.2 and -Wshadow -Werror
------------------------------+---------------------------------------------
 Reporter: logicle@… | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: asio
  Version: Boost 1.42.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 All of my asio dependent code builds fine as long as I suppress gcc's
 warnings. One of the warning flags that causes a problem is -Wshadow. I
 think using the io_service_pool from the asio documentation's examples is
 sufficient to reproduce this problem. Just be sure to add -Werror and
 -Wshadow with a recent g++ and the build should fail in asio headers.

 {{{
 boost-1.42/include/boost/asio/detail/hash_map.hpp:150: error: declaration
 of 'end' shadows a member of 'this'
 boost-1.42/include/boost/asio/detail/service_base.hpp:37: error:
 declaration of 'io_service' shadows a member of 'this'
 boost-1.42/include/boost/asio/detail/reactor_op_queue.hpp:329: error:
 declaration of 'descriptor' shadows a member of 'this'
 boost-1.42/include/boost/asio/detail/epoll_reactor.hpp:655: error:
 declaration of 'interrupt' shadows a member of 'this'
 boost-1.42/include/boost/asio/basic_io_object.hpp:72: error: declaration
 of 'io_service' shadows a member of 'this'
 boost-1.42/include/boost/asio/detail/deadline_timer_service.hpp:151:
 error: declaration of 'boost::system::error_code ec' shadows a parameter
 boost-1.42/include/boost/asio/serial_port_service.hpp:88: error:
 declaration of 'io_service' shadows a member of 'this'
 boost-1.42/include/boost/asio/basic_streambuf.hpp:136: error: declaration
 of 'max_size' shadows a member of 'this'
 boost-1.42/include/boost/asio/detail/buffered_stream_storage.hpp:43:
 error: declaration of 'capacity' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/address_v6.hpp:68: error: declaration of
 'scope_id' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/basic_endpoint.hpp:95: error: declaration
 of 'protocol' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/basic_endpoint.hpp:190: error:
 declaration of 'size' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/basic_resolver_entry.hpp:55: error:
 declaration of 'service_name' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/basic_resolver_entry.hpp:55: error:
 declaration of 'host_name' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/basic_resolver_entry.hpp:55: error:
 declaration of 'endpoint' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/basic_resolver_query.hpp:52: error:
 declaration of 'service_name' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/basic_resolver_query.hpp:71: error:
 declaration of 'service_name' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/basic_resolver_query.hpp:88: error:
 declaration of 'service_name' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/basic_resolver_query.hpp:88: error:
 declaration of 'host_name' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/basic_resolver_query.hpp:107: error:
 declaration of 'service_name' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/basic_resolver_query.hpp:107: error:
 declaration of 'host_name' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/icmp.hpp:105: error: declaration of
 'family' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/icmp.hpp:105: error: declaration of
 'protocol' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/tcp.hpp:149: error: declaration of
 'family' shadows a member of 'this'
 boost-1.42/include/boost/asio/ip/udp.hpp:105: error: declaration of
 'family' shadows a member of 'this'
 boost-1.42/include/boost/asio/local/basic_endpoint.hpp:83: error:
 declaration of 'path' shadows a member of 'this'
 boost-1.42/include/boost/asio/local/basic_endpoint.hpp:90: error:
 declaration of 'path' shadows a member of 'this'
 boost-1.42/include/boost/asio/local/basic_endpoint.hpp:136: error:
 declaration of 'size' shadows a member of 'this'
 boost-1.42/include/boost/asio/local/basic_endpoint.hpp:216: error:
 declaration of 'path' shadows a member of 'this'
 boost-1.42/include/boost/asio/posix/stream_descriptor_service.hpp:103:
 error: declaration of 'io_service' shadows a member of 'this'
 boost-1.42/include/boost/asio/impl/read_until.ipp:379: error: declaration
 of 'boost::system::error_code ec' shadows a parameter
 boost-1.42/include/boost/asio/impl/read_until.ipp:711: error: declaration
 of 'boost::system::error_code ec' shadows a parameter
 boost-1.42/include/boost/asio/impl/read_until.ipp:880: error: declaration
 of 'boost::system::error_code ec' shadows a parameter
 boost-1.42/include/boost/asio/detail/strand_service.hpp:289: error:
 declaration of 'io_service' shadows a member of 'this'
 }}}

 and so on ...

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3905>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC