Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-135927: Fix MSVC Clatest C builds#135935

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Fidget-Spinner merged 2 commits intopython:mainfromFidget-Spinner:fix-latest-c
Jun 25, 2025

Conversation

Fidget-Spinner
Copy link
Member

@Fidget-SpinnerFidget-Spinner commentedJun 25, 2025
edited
Loading

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.

@Fidget-Spinner
Copy link
MemberAuthor

Verified locally that building with clang-cl also works.

chris-eibl reacted with heart emoji

@zooba
Copy link
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.

chris-eibl reacted with thumbs up emoji

@Fidget-SpinnerFidget-Spinner merged commita88b49c intopython:mainJun 25, 2025
40 checks passed
@Fidget-SpinnerFidget-Spinner deleted the fix-latest-c branchJune 25, 2025 15:02
@Fidget-Spinner
Copy link
MemberAuthor

Thanks Steve!

@chris-eibl
Copy link
Member

I am on Mobile, but LGTM

Fidget-Spinner reacted with heart emoji

@@ -49,7 +49,8 @@
// Static inline functions should use _Py_NULL rather than using directly NULL
// 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__)) && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Hmm you're right. Do you want to open a PR for this?

vstinner reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I created#135987 : can you test it with MSC with/std:clatest?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@vstinnervstinnervstinner left review comments

@picnixzpicnixzAwaiting requested review from picnixz

@chris-eiblchris-eiblAwaiting requested review from chris-eibl

@encukouencukouAwaiting requested review from encukou

@zoobazoobaAwaiting requested review from zooba

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@Fidget-Spinner@zooba@chris-eibl@vstinner

[8]ページ先頭

©2009-2025 Movatter.jp