Opened 12 years ago

Closed 11 years ago

#4315 closed Patches (fixed)

gcc 4.4 Warning: inline ... declared as dllimport: attribute ignored

Reported by: viboes Owned by: viboes
Milestone: Boost 1.49.0 Component: thread
Version: Boost Development Trunk Severity: Cosmetic
Keywords: Cc: feiyunw@…, viboes

Description

The following warnings appears on gcc4.4 mingw:

gcc.compile.c++ ..\..\..\bin.v2\libs\thread\test\test_thread_id.test\gcc-mingw-4.4.0\debug\threading-multi\test_thread_id.o In file included from ..\..\../boost/thread/win32/thread_data.hpp:12,

from ..\..\../boost/thread/thread.hpp:15, from test_thread_id.cpp:5:

..\..\../boost/thread/win32/thread_heap_alloc.hpp:59: warning: inline function 'void* boost::detail::allocate_raw_heap_memory(unsigned int)' declared as dllimport: attribute ignored ..\..\../boost/thread/win32/thread_heap_alloc.hpp:69: warning: inline function 'void boost::detail::free_raw_heap_memory(void*)' declared as dllimport: attribute ignored

Can a inline function be declared as dllimport?

Attachments (1)

4315.patch (851 bytes ) - added by viboes 12 years ago.

Download all attachments as: .zip

Change History (7)

by viboes, 12 years ago

Attachment: 4315.patch added

comment:1 by viboes, 12 years ago

Type: Support RequestsPatches

comment:2 by feiyunw@…, 11 years ago

Cc: feiyunw@… added
Milestone: Boost 1.43.0Boost 1.48.0
Version: Boost 1.44.0Boost Development Trunk

Component thread is one of the two boost components which generates warnings when compiled in MinGW/MSYS with gcc-4.5.2:

     11 ./boost/thread/win32/thread_heap_alloc.hpp:59:40: warning: inline function 'void* boost::detail::allocate_raw_heap_memory(unsigned int)' declared as  dllimport: attribute ignored
     11 ./boost/thread/win32/thread_heap_alloc.hpp:69:39: warning: inline function 'void boost::detail::free_raw_heap_memory(void*)' declared as  dllimport: attribute ignored
     10 ./boost/thread/win32/shared_mutex.hpp:50:99: warning: dereferencing type-punned pointer will break strict-aliasing rules
     10 ./boost/thread/win32/shared_mutex.hpp:51:52: warning: dereferencing type-punned pointer will break strict-aliasing rules

The preceding numbers are the numbers of occurrence.
I am sorry that this one is not solved for more than one year.

in reply to:  2 comment:3 by anonymous, 11 years ago

Replying to feiyunw@…:

I am sorry that this one is not solved for more than one year.

Hi I'm new to boost and am writing a basic asio app as a learning exercise. Should I be worried about these warnings? do they represent genuine issues?

comment:4 by viboes, 11 years ago

Cc: viboes added
Milestone: Boost 1.48.0Boost 1.49.0
Owner: changed from Anthony Williams to viboes
Status: newassigned

Committed in trunk at revision: 75791

comment:5 by anonymous, 11 years ago

Is this issue fixed now?

comment:6 by viboes, 11 years ago

Resolution: fixed
Status: assignedclosed

Committed in release at #76291

Note: See TracTickets for help on using tickets.