Opened 7 years ago

Closed 7 years ago

#11833 closed Bugs (fixed)

Boost usage of __int128 when compiled with clang-cl

Reported by: Yaron Keren <yaron.keren@…> Owned by: John Maddock
Milestone: To Be Determined Component: config
Version: Boost 1.59.0 Severity: Problem
Keywords: Cc:

Description

Boost compiled with clang-cl targetting MSVC toolchain should not probably use int128 as the support functions umodti3 and friends, usually available from libgcc are not available from the MSVC libs leading to error LNK2019: unresolved external symbol umodti3.

This may be solved either by using compiler-rt along with the MSVC libs or by not defining BOOST_HAS_INT128 in clang.hpp:

#if defined(SIZEOF_INT128) && !defined(CUDACC) && !defined(_MSC_VER) # define BOOST_HAS_INT128 #endif

I'm not sure which is the right way to go here, but this should be at least be documented.

Change History (3)

comment:1 by Yaron Keren <yaron.keren@…>, 7 years ago

Just noticed all the double underscore symbols turned to underline, oh well.

comment:2 by anonymous, 7 years ago

I'll make the change but this should be reported as a bug to clang as int128 clearly isn't supported and yet they still define the GCC macro __SIZEOF_INT128__

comment:3 by John Maddock, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.