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

Restrict qualify pointers in generated C code #625

Open
SamirDroubi opened this issue Apr 23, 2024 · 0 comments
Open

Restrict qualify pointers in generated C code #625

SamirDroubi opened this issue Apr 23, 2024 · 0 comments

Comments

@SamirDroubi
Copy link
Collaborator

Exo currently enforces a non-aliasing constraint on all data passed to procedures. We should restrict qualify all pointers passed into procedures and pointers defined in window structs.

Some care needs to be considered when doing this since restrict is only a keyword in C (since C99), but not in C++. Since headers can be included from either, we need to make sure to defined a portable restrict macro (similar to here: https://github.com/nemequ/hedley/blob/8fb0604a8095f6c907378cc3f0391520ae843f6f/hedley.h#L1500C20-L1500C28).

This also addresses #343

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

1 participant