Skip to content

C-variadic function definitions are rejected, blocking varargs_without_pattern lint #4657

Description

@lucasly-ba

The rustc varargs_without_pattern lint warns when ... is used as a C-variadic argument in a function definition without a pattern name.

gccrs hard-errors on any c_variadic function definition, even the well-formed unsafe extern "C" form:

#![feature(c_variadic)]
pub unsafe extern "C" fn f(args: ...) {}
// gccrs: only foreign or `unsafe extern "C"` functions may be C-variadic
pub unsafe extern "C" fn g(...) {}
// same error

Since the construct cannot be compiled at all, the lint is moot until gccrs supports C-variadic function definitions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    missing-lintA warning or error is missing and gccrs is not restrictive enoughparser

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions