Skip to content

Replace inline assembly with function prototypes in sanity check #2101

@tobiasdiez

Description

@tobiasdiez

I get the following error:

C:\Users\Tobia\.conda\envs\sage-dev\Library\include\flint\fmpz_mpoly.h(1244): error C2664: '__int64 _mul128(__int64,__int64,__int64 *)': cannot convert argument 3 from 'mp_limb_t *' to '__int64 *'
C:\Users\Tobia\.conda\envs\sage-dev\Library\include\flint\fmpz_mpoly.h(1244): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\intrin.h(941): note: see declaration of '_mul128'
C:\Users\Tobia\.conda\envs\sage-dev\Library\include\flint\fmpz_mpoly.h(1244): note: while trying to match the argument list '(mp_limb_signed_t, mp_limb_signed_t, mp_limb_t *)'
C:\Users\Tobia\.conda\envs\sage-dev\Library\include\flint\fmpz_mpoly.h(1245): warning C4146: unary minus operator applied to unsigned type, result still unsigned
C:\Users\Tobia\.conda\envs\sage-dev\Library\include\flint\fmpz_mpoly.h(1253): error C2664: '__int64 _mul128(__int64,__int64,__int64 *)': cannot convert argument 3 from 'mp_limb_t *' to '__int64 *'
C:\Users\Tobia\.conda\envs\sage-dev\Library\include\flint\fmpz_mpoly.h(1253): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\intrin.h(941): note: see declaration of '_mul128'
C:\Users\Tobia\.conda\envs\sage-dev\Library\include\flint\fmpz_mpoly.h(1253): note: while trying to match the argument list '(mp_limb_signed_t, mp_limb_signed_t, mp_limb_t *)'
C:\Users\Tobia\.conda\envs\sage-dev\Library\include\flint\fmpz_mpoly.h(1254): warning C4146: unary minus operator applied to unsigned type, result still unsigned
C:\Users\Tobia\.conda\envs\sage-dev\Library\include\flint\calcium.h(155): warning C4146: unary minus operator applied to unsigned type, result still unsigned
C:\Users\Tobia\.conda\envs\sage-dev\Library\include\flint\mpoly.h(33): warning C4244: 'initializing': conversion from 'double' to 'mp_limb_signed_t', possible loss of data
C:\Users\Tobia\.conda\envs\sage-dev\Library\include\flint\mpoly.h(974): warning C4146: unary minus operator applied to unsigned type, result still unsigned
C:/Users/Tobia/.conda/envs/sage-dev/Library/include\flint/long_extras.h(37): error C2664: '__int64 _mul128(__int64,__int64,__int64 *)': cannot convert argument 3 from 'mp_limb_t *' to '__int64 *'
C:/Users/Tobia/.conda/envs/sage-dev/Library/include\flint/long_extras.h(37): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\intrin.h(941): note: see declaration of '_mul128'
C:/Users/Tobia/.conda/envs/sage-dev/Library/include\flint/long_extras.h(37): note: while trying to match the argument list '(mp_limb_signed_t, mp_limb_signed_t, mp_limb_t *)'
C:/Users/Tobia/.conda/envs/sage-dev/Library/include\flint/long_extras.h(39): warning C4146: unary minus operator applied to unsigned type, result still unsigned
C:/Users/Tobia/.conda/envs/sage-dev/Library/include\flint/long_extras.h(54): error C2664: '__int64 _mul128(__int64,__int64,__int64 *)': cannot convert argument 3 from 'mp_limb_t *' to '__int64 *'
C:/Users/Tobia/.conda/envs/sage-dev/Library/include\flint/long_extras.h(54): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\intrin.h(941): note: see declaration of '_mul128'
C:/Users/Tobia/.conda/envs/sage-dev/Library/include\flint/long_extras.h(54): note: while trying to match the argument list '(mp_limb_signed_t, mp_limb_signed_t, mp_limb_t *)'
C:/Users/Tobia/.conda/envs/sage-dev/Library/include\flint/long_extras.h(55): error C2664: '__int64 _mul128(__int64,__int64,__int64 *)': cannot convert argument 3 from 'mp_limb_t *' to '__int64 *'
C:/Users/Tobia/.conda/envs/sage-dev/Library/include\flint/long_extras.h(55): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\intrin.h(941): note: see declaration of '_mul128'

with __MACHINEX64(__int64 _mul128(__int64 _Multiplier, __int64 _Multiplicand, __int64 * _HighProduct)) being the definition in MSVC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions