[Boost-bugs] [Boost C++ Libraries] #8546: GCC 4.8 warns unused local typedef

Subject: [Boost-bugs] [Boost C++ Libraries] #8546: GCC 4.8 warns unused local typedef
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-05-04 04:58:21


#8546: GCC 4.8 warns unused local typedef
--------------------------------------------------+-------------------------
 Reporter: Wei-Chiu Chuang <weichiu@…> | Owner: jsiek
     Type: Patches | Status: new
Milestone: To Be Determined | Component: concept_check
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
--------------------------------------------------+-------------------------
 This is a similar issue to Ticket #7242, except this affects more than one
 component in addition to static_assert: gcc 4.8.0 warns unused local
 typedefs with -Wall option added
 and it pertains to boost/concept/detail/general.hpp,
 boost/lexical_cast.hpp, boost/algorithm/string/detail/finder.hpp

 {{{
 In file included from /scratch/chuangw/boost/boost-
 trunk/boost/mpl/aux_/integral_wrapper.hpp:22:0,
                  from /scratch/chuangw/boost/boost-
 trunk/boost/mpl/int.hpp:20,
                  from /scratch/chuangw/boost/boost-
 trunk/boost/mpl/lambda_fwd.hpp:23,
                  from /scratch/chuangw/boost/boost-
 trunk/boost/mpl/aux_/na_spec.hpp:18,
                  from /scratch/chuangw/boost/boost-
 trunk/boost/mpl/if.hpp:19,
                  from /scratch/chuangw/boost/boost-
 trunk/boost/lexical_cast.hpp:37,
                  from /scratch/chuangw/nightlybuild/mace-
 fullcontext/lib/Serializable.h:45,
                  from /scratch/chuangw/nightlybuild/mace-
 fullcontext/lib/CollectionSerializers.h:34,
                  from /scratch/chuangw/nightlybuild/mace-
 fullcontext/lib/mhash_map.h:57,
                  from /scratch/chuangw/nightlybuild/mace-
 fullcontext/lib/Accumulator.h:36,
                  from /scratch/chuangw/nightlybuild/mace-
 fullcontext/lib/Scheduler.cc:31:
 /scratch/chuangw/boost/boost-trunk/boost/concept_check.hpp: In function
 'void boost::function_requires(Model*)':
 /scratch/chuangw/boost/boost-trunk/boost/concept/detail/general.hpp:71:20:
 error: typedef 'boost_concept_check51' locally defined but not used
 [-Werror=unused-local-typedefs]
        BOOST_PP_CAT(boost_concept_check,__LINE__)
                     ^
 /scratch/chuangw/boost/boost-trunk/boost/preprocessor/cat.hpp:29:34: note:
 in definition of macro 'BOOST_PP_CAT_I'
  # define BOOST_PP_CAT_I(a, b) a ## b
                                   ^
 /scratch/chuangw/boost/boost-trunk/boost/concept/detail/general.hpp:71:7:
 note: in expansion of macro 'BOOST_PP_CAT'
        BOOST_PP_CAT(boost_concept_check,__LINE__)
        ^
 /scratch/chuangw/boost/boost-trunk/boost/concept/assert.hpp:44:5: note: in
 expansion of macro 'BOOST_CONCEPT_ASSERT_FN'
      BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens)
      ^
 /scratch/chuangw/boost/boost-trunk/boost/concept_check.hpp:51:7: note: in
 expansion of macro 'BOOST_CONCEPT_ASSERT'
        BOOST_CONCEPT_ASSERT((Model));
        ^

 }}}

 Suggested fix: add
 {{{
 __attribute__((unused))
 }}}
  if gcc version is >= 4.8.0

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