Skip to content

Support C23's Variadics Without a Named Parameter - #124048

Merged
bors merged 2 commits into
rust-lang:masterfrom
veera-sivarajan:bugfix-123773-c23-variadics
May 27, 2024
Merged

bors merged 2 commits into
rust-lang:masterfrom
veera-sivarajan:bugfix-123773-c23-variadics

Conversation

@veera-sivarajan

Copy link
Copy Markdown
Contributor

Fixes #123773

This PR removes the static check that disallowed extern functions
with ellipsis (varargs) as the only parameter since this is now
valid in C23.

This will not break any existing code as mentioned in the proposal
document: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2975.pdf.

Also, adds a doc comment for check_decl_cvariadic_pos() and
fixes the name of the function (varadic -> variadic).

This PR removes the static check that disallowed extern functions
with ellipsis (varargs) as the only parameter since this is now
valid in C23.

Also, adds a doc comment for `check_decl_cvariadic_pos()` and
fixes the name of the function (`varadic` -> `variadic`).
@rustbot

rustbot commented Apr 16, 2024

Copy link
Copy Markdown
Collaborator

r? @compiler-errors

rustbot has assigned @compiler-errors.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 16, 2024
@fmease fmease added T-lang Relevant to the language team needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. I-lang-nominated Nominated for discussion during a lang team meeting. S-waiting-on-team labels Apr 17, 2024

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

r=me, needs T-lang approval though first

@compiler-errors compiler-errors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 18, 2024
@joshtriplett joshtriplett removed the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 15, 2024
@joshtriplett

ghost commented May 15, 2024

Copy link
Copy Markdown
Member

Concept seems reasonable to me.

@rfcbot merge

@rfcbot

ghost commented May 15, 2024 •

Copy link
Copy Markdown

Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels May 15, 2024
@joshtriplett joshtriplett added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 15, 2024
@tmandry

ghost commented May 15, 2024

Copy link
Copy Markdown
Member

Seems like a reasonable extension.

@rfcbot reviewed

@nikomatsakis

ghost commented May 15, 2024

Copy link
Copy Markdown
Contributor

@rfcbot reviewed

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels May 15, 2024
@rfcbot

ghost commented May 15, 2024

Copy link
Copy Markdown

🔔 This is now entering its final comment period, as per the review above. 🔔

@scottmcm

ghost commented May 15, 2024

Copy link
Copy Markdown
Member

Yeah, since this is extern "C" { … } if C says it exists, then might as well allow it.
@rfcbot reviewed

@traviscross

ghost commented May 15, 2024

Copy link
Copy Markdown
Contributor

@rustbot labels -I-lang-nominated

We discussed this in the lang triage call today. People felt good about this, and it's now in FCP.

@rustbot rustbot removed the I-lang-nominated Nominated for discussion during a lang team meeting. label May 15, 2024
@fmease fmease removed the needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. label May 15, 2024
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels May 25, 2024
@rfcbot rfcbot added the to-announce Announce this issue on triage meeting label May 25, 2024
@rfcbot

ghost commented May 25, 2024

Copy link
Copy Markdown

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

@compiler-errors

ghost commented May 25, 2024

Copy link
Copy Markdown
Contributor

@bors r+

@bors

ghost commented May 25, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit f005b45 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-team labels May 25, 2024
@bors

ghost commented May 26, 2024

Copy link
Copy Markdown
Collaborator

⌛ Testing commit f005b45 with merge df5b3f0...

@bors

ghost commented May 26, 2024

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 26, 2024
@rust-log-analyzer

ghost commented May 26, 2024

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
 mingw-w64-x86_64-cmake-3.28.1-1-any downloading...
 mingw-w64-x86_64-openssl-3.2.0-1-any downloading...
 mingw-w64-x86_64-gettext-0.22.4-3-any downloading...
 mingw-w64-x86_64-curl-8.5.0-1-any downloading...
error: failed retrieving file 'mingw-w64-x86_64-openssl-3.2.0-1-any.pkg.tar.zst.sig' from mirror.umd.edu : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds
error: failed retrieving file 'mingw-w64-x86_64-curl-8.5.0-1-any.pkg.tar.zst' from mirror.msys2.org : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds
warning: too many errors from mirror.msys2.org, skipping for the remainder of this transaction
warning: failed to retrieve some files
error: failed to commit transaction (unexpected error)

@jieyouxu

ghost commented May 26, 2024

Copy link
Copy Markdown
Member

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 26, 2024
@bors
bors merged commit 866630d into rust-lang:master May 27, 2024
@rustbot rustbot added this to the 1.80.0 milestone May 27, 2024
@veera-sivarajan
veera-sivarajan deleted the bugfix-123773-c23-variadics branch May 27, 2024 04:00
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to call variadic function with no named parameters even though it is useful since C23