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

Compilation failure with Clang-cl: iterators.h nextBit #307

Open
bmanga opened this issue Nov 12, 2021 · 0 comments
Open

Compilation failure with Clang-cl: iterators.h nextBit #307

bmanga opened this issue Nov 12, 2021 · 0 comments
Assignees

Comments

@bmanga
Copy link
Contributor

bmanga commented Nov 12, 2021

Vc version / revision Operating System Compiler & Version Compiler Flags Assembler & Version CPU
  1.4.2                |        Windows          |     Clang 12               |                |                     |

I hit line 168 of common/iterators.h:

        void nextBit()
        {
#ifdef Vc_GNU_ASM
            bit = __builtin_ctzl(mask);
#elif defined(Vc_MSVC)
            _BitScanForward(&bit, mask);
#else
#error "Not implemented yet. Please contact [email protected]"
#endif
        }

Apparently clang on Windows is neither Vc_GNU_ASM nor Vc_MSVC. Something like the following works for me:

        void nextBit()
        {
#ifdef Vc_MSVC
            _BitScanForward(&bit, mask);
#else
            bit = __builtin_ctzl(mask);
#endif
        }
@amadio amadio self-assigned this May 6, 2022
amadio added a commit to amadio/vc that referenced this issue Jun 13, 2022
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