Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected token 'asm' & unable to match function definition to an existing declaration #236

Open
Markyparky56 opened this issue Feb 19, 2019 · 1 comment

Comments

@Markyparky56
Copy link

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

@marc-kdab
Copy link

I got this when trying to enable /permissive-. So a work-around is to not enable /permissive- or, in later MSVCs, to issue /permissive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants