Modify

Opened 5 years ago

Last modified 4 years ago

#8485 new Bugs

Compile error, same as #5431, but Windows Vista (64 bit)

Reported by: Martin.problemboost.Maurer@… Owned by: Peter Dimov
Milestone: To Be Determined Component: smart_ptr
Version: Boost 1.53.0 Severity: Problem
Keywords: Cc:

Description (last modified by viboes)

https://svn.boost.org/trac/boost/ticket/5431

#ifdef _MSC_VER
/* This is Microsoft Visual C compiler specific */
#endif //_MSC_VER

Same problem with 1.51.0 and 1.53.0

Attachments (0)

Change History (12)

comment:1 Changed 5 years ago by viboes

Owner: changed from Anthony Williams to viboes
Status: newassigned

I'm not sure using __MSV_VER would work. Note that it is working without this flag correctly on WINNT.

comment:2 Changed 5 years ago by Martin.problemboost.Maurer@…

Here the needed file to reproduce the error:

testmain.cpp

#include <intrin.h>

#include <boost/lexical_cast.hpp> #include <boost/program_options.hpp>

int main(int argc, char argv) {

printf("Hello\n");

}

I am compiling with VS2008 and 64 Bit C compiler with the following command line:

cl /openmp /favor:INTEL64 /O2 /Fetest.exe /F2097152 /TP /EHsc -I. -Id:\boost_1_53_0 testmain.cpp /link /LIBPATH:d:\boost_1_53_0\lib\x64\lib

This produces the following errors:

Microsoft (R) C/C++ Optimizing Compiler Version 15.00.21022.08 for x64 Copyright (C) Microsoft Corporation. All rights reserved.

testmain.cpp C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\memory(996) : error C2733: second C linkage of overloaded funct ion '_InterlockedCompareExchange_np' not allowed

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\memory(995) : see declaration of '_InterlockedCompareEx

change_np' d:\boost_1_53_0\boost/detail/interlocked.hpp(104) : error C2733: second C linkage of overloaded function '_InterlockedCompare ExchangePointer_np' not allowed

d:\boost_1_53_0\boost/detail/interlocked.hpp(104) : see declaration of '_InterlockedCompareExchangePointer_np'

When i remove the include for intrin.h it compiles and runs without problems.

comment:3 Changed 5 years ago by viboes

Do you have a patch?

comment:4 Changed 5 years ago by viboes

Description: modified (diff)

comment:5 Changed 5 years ago by viboes

Milestone: To Be DeterminedBoost 1.54.0

comment:6 Changed 5 years ago by viboes

Milestone: Boost 1.54.0To Be Determined

I don't reach to reproduce it with msvc 10. Do you have a patch I can test?

comment:7 Changed 4 years ago by viboes

Component: threadsmart_ptr

In case Peter know how to fix this.

Last edited 4 years ago by viboes (previous) (diff)

comment:8 Changed 4 years ago by viboes

Status: assignednew

comment:9 Changed 4 years ago by viboes

Owner: changed from viboes to Peter Dimov

comment:10 Changed 4 years ago by Peter Dimov

This is, I believe, the case in which

#include <intrin.h>
#include <utility>

int main() {}

fails. This was a problem with VC++ 8.0 but was supposed to be fixed in 9.0. There's not much we can do about this incompatibility, as it's outside our control.

comment:11 Changed 4 years ago by Peter Dimov

Owner: changed from Peter Dimov to Jürgen Hunold

Actually, this was fixed in VC++ 10.0, not in 9.0, and the code was correctly checking for >= 1600 (see revision [75396] and ticket #4678), but it was changed to check for 1500 in revision [80626].

comment:12 Changed 4 years ago by Peter Dimov

Owner: changed from Jürgen Hunold to Peter Dimov

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Peter Dimov.

Add Comment


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

 
Note: See TracTickets for help on using tickets.