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

Add offset checks when checking that 3D type refines a C type #143

Open
nikswamy opened this issue Aug 19, 2024 · 1 comment
Open

Add offset checks when checking that 3D type refines a C type #143

nikswamy opened this issue Aug 19, 2024 · 1 comment

Comments

@nikswamy
Copy link
Contributor

Cf. https://project-everest.github.io/everparse/3d-lang.html#checking-3d-types-for-correspondence-with-existing-c-types

We currently only add sizeof checks; we should also add offsetof checks.

@tahina-pro
Copy link
Member

Thanks Nik!
Right now #144 is enough for most cases, but does not seem to work with #if . To this end, we should:

  • Generate offsetof for nested anonymous structs and casetypes
  • Make the generated StaticAssertions.c file include the .h file provided by the user (in the configuration file given as --config) where compilation constants are meant to be defined

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