Skip to content

aarch64 ABI: revisit which ZST fields should be filtered from repr(C) #58487

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

Open
pnkfelix opened this issue Feb 15, 2019 · 2 comments
Open

aarch64 ABI: revisit which ZST fields should be filtered from repr(C) #58487

pnkfelix opened this issue Feb 15, 2019 · 2 comments
Labels
A-ABI Area: Concerning the application binary interface (ABI) A-FFI Area: Foreign function interface (FFI) A-repr Area: the `#[repr(stuff)]` attribute T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@pnkfelix
Copy link
Member

Spawned off of #56877 (comment) and #57645 (comment)

The issues raised by #56877 were partially addressed by PR #57645 but there may be some followup work to do here.

Based on my current understanding, PR #57645 ended up settling on filtering out all ZST's when determining if a type is an instance of a so-called "homogeneous aggregate", and the remaining question is whether we have to deal with architecture/target dependencies when resolving the semantic question of whether the Rust type [T; 0] should map to the C typeT[0] or to T[].

Namely, it sounds like AArch64 may require us to restrict the filtering we do (for determining whether a type is a homogenous aggregate) to just the Rust ZST's like PhantomData.

Anyway, this issue is to tracking that leftover work to resolve that question.

@pnkfelix
Copy link
Member Author

(This may be a good topic to hand off to the WG-ffi that should be forming soon. Cc @joshtriplett )

@pnkfelix pnkfelix added A-FFI Area: Foreign function interface (FFI) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 15, 2019
@VivekYadav7272
Copy link

VivekYadav7272 commented Dec 7, 2021

Is this issue still active?

@workingjubilee workingjubilee added the A-ABI Area: Concerning the application binary interface (ABI) label Jul 1, 2022
@workingjubilee workingjubilee added the A-repr Area: the `#[repr(stuff)]` attribute label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ABI Area: Concerning the application binary interface (ABI) A-FFI Area: Foreign function interface (FFI) A-repr Area: the `#[repr(stuff)]` attribute T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants