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

Subject: [Boost-bugs] [Boost C++ Libraries] #7242: GCC 4.8 warns unused local typedef
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-17 13:53:01


#7242: GCC 4.8 warns unused local typedef
----------------------------------------------+-----------------------------
 Reporter: Kohei Takahashi <flast@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: static_assert
  Version: Boost Release Branch | Severity: Problem
 Keywords: |
----------------------------------------------+-----------------------------
 GCC 4.8 warns unused local typedef. see followings.

 {{{
 $ cat hoge.cpp
 #include <boost/static_assert.hpp>

 int main()
 {
     BOOST_STATIC_ASSERT(true);
 }
 $ g++-4.8.0 -Wall -Iboost-trunk hoge.cpp
 In file included from boost-trunk/boost/config.hpp:57:0,
                  from boost-trunk/boost/static_assert.hpp:17,
                  from hoge.cpp:1:
 hoge.cpp: In function 'int main()':
 boost-trunk/boost/static_assert.hpp:125:21: warning: typedef
 'boost_static_assert_typedef_5' locally defined but not used [-Wunused-
 local-typedefs]
           BOOST_JOIN(boost_static_assert_typedef_, __LINE__)
                      ^
 hoge.cpp:5:5: note: in expansion of macro 'BOOST_STATIC_ASSERT'
      BOOST_STATIC_ASSERT(true);
      ^
 }}}

 To suppress this warnings, append !__attribute!__((unused)).

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