[Boost-bugs] [Boost C++ Libraries] #8293: Unused Variable Warnings in Boost.Units due to BOOST_UNITS_STATIC_CONSTANT

Subject: [Boost-bugs] [Boost C++ Libraries] #8293: Unused Variable Warnings in Boost.Units due to BOOST_UNITS_STATIC_CONSTANT
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-03-15 15:45:12


#8293: Unused Variable Warnings in Boost.Units due to BOOST_UNITS_STATIC_CONSTANT
------------------------------+---------------------------------------------
 Reporter: ahundt | Owner: matthiasschabel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: units
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 In clang every globally declared unit using BOOST_UNITS_STATIC_CONSTANT
 produces an unused variable warning, resulting in hundreds of warnings.

 Compiler version:
 c++ --version
 Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
 Target: x86_64-apple-darwin12.2.0
 Thread model: posix

 Here is one sample:

                             ^
 /opt/local/include/boost/units/static_constant.hpp:27:24: note: expanded
 from macro 'BOOST_UNITS_STATIC_CONSTANT'
     static const type& name = name##_instance_t<true>::instance; \
                        ^
 In file included from redacted.cpp:18:
 In file included from redacted2.h:20:
 In file included from redacted3.h:25:
 In file included from /opt/local/include/boost/units/systems/si.hpp:24:
 /opt/local/include/boost/units/systems/si/acceleration.hpp:27:29: warning:
 unused variable 'metre_per_second_squared' [-Wunused-variable]
 BOOST_UNITS_STATIC_CONSTANT(metre_per_second_squared,acceleration);
                             ^

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