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-93207: Remove configure check for stdarg.h (HAVE_STDARG_PROTOTYPES)#93215

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
vstinner merged 6 commits intopython:mainfromkumaraditya303:gh-93207
May 27, 2022

Conversation

@kumaraditya303
Copy link
Contributor

@kumaraditya303kumaraditya303 commentedMay 25, 2022
edited
Loading

Closes#93207

@erlend-aasland
Copy link
Contributor

erlend-aasland commentedMay 25, 2022
edited
Loading

AC changes look good, but I would try to investigate further which compilers/build environments this will affect (if any); buildbots do not cover everything.

@kumaraditya303
Copy link
ContributorAuthor

AC changes look good, but I would try to investigate further which compilers/build environments this will affect (if any); buildbots do not cover everything.

It is unlikely as there is already code which uses variadic args and does not checks forHAVE_STDARG_PROTOTYPES and is working.

@kumaraditya303kumaraditya303 self-assigned thisMay 25, 2022
@kumaraditya303kumaraditya303 added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelMay 25, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@kumaraditya303 for commitc9a6cc4 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelMay 25, 2022
@kumaraditya303
Copy link
ContributorAuthor

So far all buildbots passed, I added a news item.

cc@vstinner

@kumaraditya303
Copy link
ContributorAuthor

kumaraditya303 commentedMay 25, 2022
edited
Loading

@erlend-aasland:va_start macro requires two arguments1 and if you try to replaceva_start(vargs, format); withva_start(vargs); then it won't even compile. I tried it and got this compilation error proving thatva_start with one argument is wrong. Hence this PR is correct and fixes the issue.

/workspaces/cpython/Modules/_asynciomodule.c:2646:19: error: macro "va_start" requires 2 arguments, but only 1 given 2646 |     va_start(vargs);      |                   ^

Footnotes

  1. https://www.cplusplus.com/reference/cstdarg/va_start/

erlend-aasland reacted with thumbs up emoji

@vstinner
Copy link
Member

vstinner commentedMay 27, 2022
edited
Loading

Many files already call va_start() with 2 arguments: Objects/call.c, PC/launcher.c and PC/launcher2.c, Parser/pegen_errors.c, etc. (Without testing if the HAVE_STDARG_PROTOTYPES macro is defined.)

@vstinner
Copy link
Member

Please remove also this line from PC/pyconfig.h:

/* Define if you have the <stdarg.h> prototypes.  */#define HAVE_STDARG_PROTOTYPES

@kumaraditya303kumaraditya303 requested a review froma team as acode ownerMay 27, 2022 10:28
@kumaraditya303
Copy link
ContributorAuthor

Many files already call va_start() with 2 arguments: Objects/call.c, PC/launcher.c and PC/launcher2.c, Parser/pegen_errors.c, etc. (Without testing if the HAVE_STDARG_PROTOTYPES macro is defined.)

Done

@vstinnervstinner merged commitcb04a09 intopython:mainMay 27, 2022
@vstinner
Copy link
Member

Merged, thanks.

@kumaraditya303kumaraditya303 deleted the gh-93207 branchMay 27, 2022 11:31
@tacaswell
Copy link
Contributor

This broke cython which appears to have been relying on HAVE_STDARG_PROTOTYPES to be defined by CPython. I am going to open a PR an the cython side to always go with the 2 argument version.

erlend-aasland reacted with thumbs up emoji

da-woods pushed a commit to cython/cython that referenced this pull requestJun 7, 2022
* MNT: always require va_start to have two argumentspython/cpython#93215 chance CPython to always use the2-input version of va_start and dropped defining HAVE_STDARG_PROTOTYPES.  Thisresulted in the 1-argument version being used when compiling cython sourcewhich failsThis makes cython also always use the 2-argument version.* Remove blank line* FIX: version gate 2-argument va_start checking to py311
da-woods pushed a commit to cython/cython that referenced this pull requestJun 7, 2022
* MNT: always require va_start to have two argumentspython/cpython#93215 chance CPython to always use the2-input version of va_start and dropped defining HAVE_STDARG_PROTOTYPES.  Thisresulted in the 1-argument version being used when compiling cython sourcewhich failsThis makes cython also always use the 2-argument version.* Remove blank line* FIX: version gate 2-argument va_start checking to py311
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@erlend-aaslanderlend-aaslanderlend-aasland approved these changes

@pablogsalpablogsalAwaiting requested review from pablogsalpablogsal is a code owner

@lysnikolaoulysnikolaouAwaiting requested review from lysnikolaoulysnikolaou is a code owner

@iritkatrieliritkatrielAwaiting requested review from iritkatrieliritkatriel is a code owner

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

@1st11st1Awaiting requested review from 1st11st1 is a code owner

@asvetlovasvetlovAwaiting requested review from asvetlovasvetlov is a code owner

@vstinnervstinnerAwaiting requested review from vstinner

Assignees

@kumaraditya303kumaraditya303

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Remove check for stdarg.h (HAVE_STDARG_PROTOTYPES) in configure.ac

5 participants

@kumaraditya303@erlend-aasland@bedevere-bot@vstinner@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp