1
Fork 0

Rollup merge of #124048 - veera-sivarajan:bugfix-123773-c23-variadics, r=compiler-errors

Support C23's Variadics Without a Named Parameter

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 commit is contained in:
Jubilee 2024-05-26 15:28:26 -07:00 committed by GitHub
commit 866630d004
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 45 additions and 112 deletions

View file

@ -92,13 +92,6 @@ pub struct FnParamTooMany {
pub max_num_args: usize,
}
#[derive(Diagnostic)]
#[diag(ast_passes_fn_param_c_var_args_only)]
pub struct FnParamCVarArgsOnly {
#[primary_span]
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(ast_passes_fn_param_c_var_args_not_last)]
pub struct FnParamCVarArgsNotLast {