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

Type check bounds expression arguments #45

Closed
secure-sw-dev-bot opened this issue Jan 16, 2022 · 3 comments
Closed

Type check bounds expression arguments #45

secure-sw-dev-bot opened this issue Jan 16, 2022 · 3 comments

Comments

@secure-sw-dev-bot
Copy link

This issue was copied from checkedc/checkedc-clang#45


This change adds type checking for bounds expressions of the form (bounds(e1, e2). The type checking rules are:

  • The types of e1 and e2 must both be pointer types.
  • The types e1 and e2 must both be pointers to objects or incomplete types, and
  • The types of e1 and e2 must both be pointers to the same type or one of them must be a pointer to void.

Testing:

  • New tests will be added to typechecking\bounds.c in the Checked C GitHub repo. These will be committed separately.
  • Passes existing clang tests.
@secure-sw-dev-bot
Copy link
Author

Comment from @awruef:

Left two comments, otherwise looks fine to me.

@secure-sw-dev-bot
Copy link
Author

Comment from @reubeno:

Ditto. Left a few questions, otherwise looks good.

@secure-sw-dev-bot
Copy link
Author

Comment from @dtarditi:

I've address the code review feedback and improved commenting. I also answered the questions above. I'll commit this now. If you want additional changes, let me know.

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