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

constinit not working as expected in Visual Studio 2019 Update 16.10 #8690

Conversation

maxgolov
Copy link
Contributor

@maxgolov maxgolov commented Jun 2, 2021

Fixes #8688

Visual Studio 2019 Update 16.10 introduced support for constinit for the very first time on May 25th. Unfortunately the way how protobuf uses constinit does not work with Visual Studio msvc compiler. This is a temporary solution to unblock those who updated to latest release of Visual Studio 2019 compiler.

@google-cla
Copy link

google-cla bot commented Jun 2, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Jun 2, 2021
@maxgolov
Copy link
Contributor Author

maxgolov commented Jun 2, 2021

@googlebot I signed it!

@maxgolov
Copy link
Contributor Author

maxgolov commented Jun 3, 2021

I don't have permission to add label release notes: no. This change is for c++, the scope of it is too small for inclusion in release notes.

@fowles
Copy link
Contributor

fowles commented Jun 3, 2021

Thanks for the patch! will merge after CI finishes

@fowles fowles merged commit c05e7ad into protocolbuffers:master Jun 3, 2021
@maxgolov maxgolov deleted the maxgolov/vs2019_16.10_constinit_broken branch June 3, 2021 21:47
bithium pushed a commit to bithium/protobuf that referenced this pull request Sep 4, 2023
…_16.10_constinit_broken

constinit not working as expected in Visual Studio 2019 Update 16.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vs2019 update 16.10 : illegal initialization of constinit entity with a non-constant expression
3 participants