Subject: [Boost-bugs] [Boost C++ Libraries] #7220: gcc 4.6.2 warns about inline+dllimport functions
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-09 23:03:13
#7220: gcc 4.6.2 warns about inline+dllimport functions
------------------------------+---------------------------------------------
Reporter: anonymous | Owner: anthonyw
Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost 1.50.0 | Severity: Problem
Keywords: |
------------------------------+---------------------------------------------
In boost/thread/future.hpp, the functions make_error_code() and
make_error_condition() are declared as "inline BOOST_THREAD_DECL". In
MinGW GCC 4.6.2, this results in the functions declared as both inline and
as dllimport, which causes GCC to emit warnings. This bug is similar to
ticket #4315.
Test program:
{{{
#include <boost/thread.hpp>
int main()
{
return 0;
}
}}}
Compiled via:
g++ -o test.exe test.cpp -IC:/boost/include/boost-1_50 -LC:/boost/lib
-lboost_thread-mgw46-mt-1_50 -lboost_system-mg
w46-mt-1_50
Warnings:
In file included from C:/boost/include/boost-1_50/boost/thread.hpp:24:0,
from test.cpp:1:
C:/boost/include/boost-1_50/boost/thread/future.hpp:103:5: warning: inline
function 'boost::system::error_code
boost::system::make_error_code(boost::future_errc)' declared as
dllimport: attribute ignored [-Wattributes][[br]]
C:/boost/include/boost-1_50/boost/thread/future.hpp:112:5: warning: inline
function 'boost::system::error_condition
boost::system::make_error_condition(boost::future_errc)' declared as
dllimport: attribute ignored [-Wattributes]
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7220> 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