Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ojeda opened this issue Apr 6, 2023 · 4 comments
Closed

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

ojeda opened this issue Apr 6, 2023 · 4 comments

Comments

@ojeda
Copy link
Contributor

ojeda commented Apr 6, 2023

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(); }
@pvdrz
Copy link
Contributor

pvdrz commented Apr 10, 2023

Same as #2485

@pvdrz pvdrz closed this as completed Apr 10, 2023
@ojeda
Copy link
Contributor Author

ojeda commented Apr 10, 2023

Same as #2485

It is not the same, one is about the parameter list, the other about returning a call that returns void.

@pvdrz
Copy link
Contributor

pvdrz commented Apr 10, 2023

Oh yeah my bad, this is fixed on 0.65.1, the other one is fixed on mastermain

@ojeda
Copy link
Contributor Author

ojeda commented Apr 10, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants