Uh oh!
There was an error while loading. Please reload this page.
gh-135927: Fix MSVC Clatest C builds - #135935
Merged
Merged
Conversation
Fidget-Spinner
commented
Jun 25, 2025
MemberAuthor
Verified locally that building with clang-cl also works. |
zooba
commented
Jun 25, 2025
Member
Change looks fine to me, though I haven't dug into why the availability differs. If this works, then I guess it's fine. |
Fidget-Spinner
commented
Jun 25, 2025
MemberAuthor
Thanks Steve! |
chris-eibl
commented
Jun 25, 2025
Member
I am on Mobile, but LGTM |
| // to prevent C++ compiler warnings. On C23 and newer and on C++11 and newer, | ||
| // _Py_NULL is defined as nullptr. | ||
| #if (defined (__STDC_VERSION__) && __STDC_VERSION__ > 201710L) \ | ||
| #if (defined(__GNUC__) || defined(__clang__)) && \ |
Member
There was a problem hiding this comment.
Since there are other C compilers in the wild, it would be better to check for !defined(_MSC_VER) instead of being specific about GCC and clang.
MemberAuthor
There was a problem hiding this comment.
Hmm you're right. Do you want to open a PR for this?
Member
There was a problem hiding this comment.
I created #135987 : can you test it with MSC with /std:clatest?
AndPuQing pushed a commit
to AndPuQing/cpython
that referenced
this pull request
Jul 11, 2025
Pranjal095 pushed a commit
to Pranjal095/cpython
that referenced
this pull request
Jul 12, 2025
taegyunkim pushed a commit
to taegyunkim/cpython
that referenced
this pull request
Aug 4, 2025
Agent-Hellboy pushed a commit
to Agent-Hellboy/cpython
that referenced
this pull request
Aug 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem is that we are checking for the latest C assuming only GCC and Clang supports it, but in reality MSVC supports it (on some configurations) too.
The fix is to account for MSVC.