[Boost-bugs] [Boost C++ Libraries] #7972: [Coroutine] warning with GCC

Subject: [Boost-bugs] [Boost C++ Libraries] #7972: [Coroutine] warning with GCC
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-04 06:30:42


#7972: [Coroutine] warning with GCC
-------------------------------------+--------------------------------------
 Reporter: faithandbrave@… | Owner: olli
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: coroutine
  Version: Boost 1.52.0 | Severity: Problem
 Keywords: |
-------------------------------------+--------------------------------------
 I am using GCC with -pedantic option. happen few warning.

 {{{
 #include <boost/coroutine/all.hpp>
 #include <boost/foreach.hpp>

 typedef boost::coroutines::coroutine<int()> coroutine;

 void f(coroutine::caller_type& caller)
 {
     caller(1);
     caller(2);
     caller(3);
 }

 int main()
 {
     coroutine coro(f);

     BOOST_FOREACH (int x, coro) {
         std::cout << x << std::endl;
     }
 }
 }}}
 {{{
 In file included from
 /Users/myuser/repository/GitHub/Boost/boost/coroutine/all.hpp:11:0,
                  from main.cpp:1:
 /Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp:118:47:
 warning: extra ';' [-pedantic]
 /Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp:665:47:
 warning: extra ';' [-pedantic]
 faithandbrave:cpp myuser$ sh build.sh
 In file included from
 /Users/myuser/repository/GitHub/Boost/boost/coroutine/all.hpp:11:0,
                  from main.cpp:1:
 /Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp:118:47:
 warning: extra ';' [-pedantic]
 /Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp:665:47:
 warning: extra ';' [-pedantic]
 faithandbrave:cpp myuser$ sh build.sh
 In file included from
 /Users/myuser/repository/GitHub/Boost/boost/coroutine/all.hpp:11:0,
                  from main.cpp:2:
 /Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp:118:47:
 warning: extra ';' [-pedantic]
 /Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp:665:47:
 warning: extra ';' [-pedantic]
 /Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp: In
 instantiation of 'typename
 boost::coroutines::coroutine<Signature>::iterator
 boost::coroutines::range_end(boost::coroutines::coroutine<Signature>&)
 [with Signature = int(); typename
 boost::coroutines::coroutine<Signature>::iterator =
 boost::coroutines::detail::coroutine_op<int(),
 boost::coroutines::coroutine<int()>, int, 0>::iterator]':
 /Users/myuser/repository/GitHub/Boost/boost/range/end.hpp:102:25:
 required from 'typename boost::range_iterator<C>::type
 boost::range_adl_barrier::end(T&) [with T =
 boost::coroutines::coroutine<int()>; typename
 boost::range_iterator<C>::type =
 boost::coroutines::detail::coroutine_op<int(),
 boost::coroutines::coroutine<int()>, int, 0>::iterator]'
 /Users/myuser/repository/GitHub/Boost/boost/foreach.hpp:714:102:
 required from 'boost::foreach_detail_::auto_any<typename
 boost::foreach_detail_::foreach_iterator<T, C>::type>
 boost::foreach_detail_::end(boost::foreach_detail_::auto_any_t,
 boost::foreach_detail_::type2type<T, C>*, mpl_::false_*) [with T =
 boost::coroutines::coroutine<int()>; C = mpl_::bool_<false>; typename
 boost::foreach_detail_::foreach_iterator<T, C>::type =
 boost::coroutines::detail::coroutine_op<int(),
 boost::coroutines::coroutine<int()>, int, 0>::iterator;
 boost::foreach_detail_::auto_any_t = const
 boost::foreach_detail_::auto_any_base&; mpl_::false_ =
 mpl_::bool_<false>]'
 main.cpp:18:5: required from here
 /Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp:1380:1:
 warning: unused parameter 'c' [-Wunused-parameter]
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7972>
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:11 UTC