Vc
Vc copied to clipboard
Unexpected token 'asm' & unable to match function definition to an existing declaration
Vc version / revision | Operating System | Compiler & Version | Compiler Flags | Assembler & Version | CPU |
---|---|---|---|---|---|
v1.4.1 | Win 7 | VS 2017 15.9.7 | i7 6700k |
Testcase
#include <Vc\Vc>
int main()
{
return 0;
}
Simplest program imaginable, using the source from the release page. Inline asm doesn't appear to be supported under MSVC x64. This issue seems to have regressed?
Actual Results
1>------ Build started: Project: vctest, Configuration: Debug x64 ------
1>main.cpp
1>...\vc\vc\sse\detail.h(679): warning C4244: 'return': conversion from 'short' to 'Vc_1::schar', possible loss of data
1>...\vc\vc\common\scatterimplementation.h(78): error C2760: syntax error: unexpected token 'asm', expected 'statement'
1>...\vc\vc\sse\vector.tcc(230): error C2244: 'Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::setZero': unable to match function definition to an existing declaration
1>...\vc\vc\sse\vector.tcc(229): note: see declaration of 'Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::setZero'
1>...\vc\vc\sse\vector.tcc(230): note: definition
1>...\vc\vc\sse\vector.tcc(230): note: 'void Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::setZero(const Vc_1::Mask &)'
1>...\vc\vc\sse\vector.tcc(230): note: existing declarations
1>...\vc\vc\sse\vector.tcc(230): note: 'void Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::setZero(const SSE::VectorTraits<T>::MaskType &)'
1>...\vc\vc\sse\vector.tcc(230): note: 'void Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::setZero(void)'
1>...\vc\vc\sse\vector.tcc(235): error C2244: 'Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::setZeroInverted': unable to match function definition to an existing declaration
1>...\vc\vc\sse\vector.tcc(234): note: see declaration of 'Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::setZeroInverted'
1>...\vc\vc\sse\vector.tcc(235): note: definition
1>...\vc\vc\sse\vector.tcc(235): note: 'void Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::setZeroInverted(const Vc_1::Mask &)'
1>...\vc\vc\sse\vector.tcc(235): note: existing declarations
1>...\vc\vc\sse\vector.tcc(235): note: 'void Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::setZeroInverted(const SSE::VectorTraits<T>::MaskType &)'
1>...\vc\vc\sse\vector.tcc(269): error C2244: 'Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::store': unable to match function definition to an existing declaration
1>...\vc\vc\sse\vector.tcc(268): note: see declaration of 'Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::store'
1>...\vc\vc\sse\vector.tcc(269): note: definition
1>...\vc\vc\sse\vector.tcc(269): note: 'void Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::store(U *,Vc_1::Mask,Flags) const'
1>...\vc\vc\sse\vector.tcc(269): note: existing declarations
1>...\vc\vc\sse\vector.tcc(269): note: 'void Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::store(SSE::VectorTraits<T>::EntryType *,SSE::VectorTraits<T>::MaskType,Flags) const'
1>...\vc\vc\sse\vector.tcc(269): note: 'void Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::store(SSE::VectorTraits<T>::EntryType *,SSE::VectorTraits<T>::MaskType) const'
1>...\vc\vc\sse\vector.tcc(269): note: 'void Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::store(SSE::VectorTraits<T>::EntryType *,Flags) const'
1>...\vc\vc\sse\vector.tcc(269): note: 'void Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::store(SSE::VectorTraits<T>::EntryType *) const'
1>...\vc\vc\sse\vector.tcc(269): note: 'void Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::store(U *,SSE::VectorTraits<T>::MaskType,Flags) const'
1>...\vc\vc\sse\vector.tcc(269): note: 'void Vc_1::Vector<T,Vc_1::VectorAbi::Sse>::store(U *,Flags) const'
1>Done building project "vctest.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
File paths shortened for sanity
I got this when trying to enable /permissive-
. So a work-around is to not enable /permissive-
or, in later MSVCs, to issue /permissive
.