Subject: [Boost-bugs] [Boost C++ Libraries] #9174: Incompatible declaration in interlocked.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-29 07:01:12
#9174: Incompatible declaration in interlocked.hpp
-------------------------------------------------+-------------------------
Reporter: anikin@⦠| Owner: anthonyw
Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost 1.54.0 | Severity: Problem
Keywords: interlocked |
_InterlockedCompareExchange |
_InterlockedExchangeAdd |
-------------------------------------------------+-------------------------
If I compile '''boost\detail\interlocked.hpp''' on MS '''Visual Studio
2010''' using '''Intel Compiler 14.0''' and my project also includes
msvc's '''<intrin.h>''', then I get a compiler error of incompatible
declarations, because <intrin.h> declares `_InterlockedCompareExchange`,
`_InterlockedExchange` and `_InterlockedExchangeAdd` without `__cdecl` but
interlocked.hpp declares them as `__cdecl`. The issue is solved by
stripping `__CLRCALL_PURE_OR_CDECL` from declarations of these three
functions. (And maybe better include the standard <intrin.h> when
compiling on MSVC even with Intel compiler)
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9174> 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:14 UTC