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

Coroutine build failed with error C7651 #51

Closed
LilyWangL opened this issue Jul 17, 2020 · 1 comment · Fixed by #52
Closed

Coroutine build failed with error C7651 #51

LilyWangL opened this issue Jul 17, 2020 · 1 comment · Fixed by #52
Assignees

Comments

@LilyWangL
Copy link

I am a member of Microsoft VCPKG team. In an internal version of Visual Studio, coroutine build failed with error C7651:

buildtrees\coroutine\src\1.5.0-36192178c9.clean\modules\portable\frame.cpp(136): error C7651: __builtin_coro_resume cannot be used with /await. Use '/std:c++latest' or later for standard coroutine support
buildtrees\coroutine\src\1.5.0-36192178c9.clean\modules\portable\frame.cpp(144): error C7651: __builtin_coro_destroy cannot be used with /await. Use '/std:c++latest' or later for standard coroutine support

This issue due to an internal change in compiler. For fixing this issue, we need to introduce a set of wrapper functions in frame.cpp so that the calls to __builtin_coro_* only appear in templates with a value-dependent condition. Then in the portable_coro_(done|resume|destroy) functions replace the call to __builtin_coro_* with a call to the appropriate wrapper with a template argument <true>.
I have added a patch to solve this problem temporarily on VCPKG, the related PR microsoft/vcpkg#12456. I submit this issue and want to fix this error on upstream.

Thanks a lot.

@luncliff
Copy link
Owner

luncliff commented Jul 17, 2020 via email

@luncliff luncliff self-assigned this Aug 1, 2020
luncliff added a commit that referenced this issue Aug 12, 2020
Appreciate for the reporting and works!
I feel shame that I can't spend my time on the issue

see #51
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

Successfully merging a pull request may close this issue.

2 participants