Skip to content

Duplicate argument names allowed in extern function declarations #125862

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

Closed
bjorn3 opened this issue Jun 1, 2024 · 2 comments
Closed

Duplicate argument names allowed in extern function declarations #125862

bjorn3 opened this issue Jun 1, 2024 · 2 comments
Labels
C-bug Category: This is a bug.

Comments

@bjorn3
Copy link
Member

bjorn3 commented Jun 1, 2024

I tried this code:

extern "C" {
    fn foo(a: u8, a: u8);
}

I expected to see this happen: Error as there are two arguments named a.

Instead, this happened: Compiles fine.

I found this issue while working on parsing the core_arch and generating code from it. It has the following declaration: fn vcvtss2sd(a: f64x2, a: f32x4, src: f64x2, mask: u8, sae: i32) -> f64x2;.

Meta

Happens with both 1.78 stable and 1.80.0-nightly (2024-05-31 ada5e2c).

@bjorn3 bjorn3 added the C-bug Category: This is a bug. label Jun 1, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 1, 2024
@petrochenkov
Copy link
Contributor

This is a duplicate of this old issue - #33995.
I'm still not sure if this is worth changing.

@saethlin
Copy link
Member

saethlin commented Jun 3, 2024

Closing as duplicate

@saethlin saethlin closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

4 participants