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

Variadic functions not accepted for cdecl #40244

Closed
retep998 opened this issue Mar 3, 2017 · 1 comment
Closed

Variadic functions not accepted for cdecl #40244

retep998 opened this issue Mar 3, 2017 · 1 comment

Comments

@retep998
Copy link
Member

retep998 commented Mar 3, 2017

Despite cdecl being equivalent to C on Windows, Rust insists that I specify C and not cdecl for variadic functions.

error[E0045]: variadic function must have C calling convention
   --> src\um\shellapi.rs:815:5
    |
815 |       pub fn ShellMessageBoxA(
    |  _____^ starting here...
816 | |         hAppInst: HINSTANCE,
817 | |         hWnd: HWND,
818 | |         lpcText: LPCSTR,
819 | |         lpcTitle: LPCSTR,
820 | |         fuStyle: UINT,
821 | |         ...
822 | |     ) -> c_int;
    | |_______________^ ...ending here: variadics require C calling conventions
@abonander
Copy link
Contributor

cdecl should accept variadics regardless of target, really.

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue May 26, 2017
Allow variadic functions with cdecl calling convention.

Fixes rust-lang#40244.
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue May 27, 2017
Allow variadic functions with cdecl calling convention.

Fixes rust-lang#40244.
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue May 28, 2017
Allow variadic functions with cdecl calling convention.

Fixes rust-lang#40244.
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue May 28, 2017
Allow variadic functions with cdecl calling convention.

Fixes rust-lang#40244.
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