Skip to content

--wrap-static-fns generates () for empty parameter lists #2484

Closed
@ojeda

Description

@ojeda

Input C/C++ Header

static inline void f(void) {}

Bindgen Invocation

$ bindgen --wrap-static-fns --experimental input.h

Actual Results

In /tmp/bindgen/extern.c:

void f__extern() { return f(); }

Expected Results

Before C23, one should use (void) to indicate an empty parameter list:

void f__extern(void) { return f(); }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions