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

Use of enum is ambiguous #85

Open
steven-bellock opened this issue Aug 27, 2024 · 2 comments
Open

Use of enum is ambiguous #85

steven-bellock opened this issue Aug 27, 2024 · 2 comments

Comments

@steven-bellock
Copy link
Contributor

The specification uses C enums within (packed?) structs. However the size of such fields is ill-defined. This occurs in AttestationCapabilities and MeasurementRegisterDescriptor.

@rsahita
Copy link
Collaborator

rsahita commented Jan 4, 2025

enums should be of size int - also the structs are not packed but what would you suggest? We can use the C23 convention to specify the size of the enum.

@steven-bellock
Copy link
Contributor Author

enums should be of size int

It needs to be able to represent an int but the actual storage size is up to the compiler. In particular the RISC-V ABI does not define a fixed size for C enums.

We can use the C23 convention to specify the size of the enum.

That would work.

also the structs are not packed but what would you suggest?

Let me file a separate issue for that.

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

3 participants