Modify

Ticket #7220 (closed Bugs: fixed)

Opened 20 months ago

Last modified 19 months ago

gcc 4.6.2 warns about inline+dllimport functions

Reported by: anonymous Owned by: viboes
Milestone: Boost 1.52.0 Component: thread
Version: Boost 1.50.0 Severity: Problem
Keywords: Cc:

Description

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]
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]

Attachments

Change History

comment:1 Changed 20 months ago by viboes

  • Owner changed from anthonyw to viboes
  • Status changed from new to assigned

comment:2 Changed 20 months ago by viboes

  • Milestone changed from To Be Determined to Boost 1.52.0

Committed in trunk revision 80041.

comment:3 Changed 19 months ago by viboes

  • Status changed from assigned to closed
  • Resolution set to fixed

Merged to release [80450]

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.