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

Update spec to include missing cases for bounds-safe interface assignment compatibility #397

Open
kkjeer opened this issue Mar 20, 2020 · 0 comments
Assignees

Comments

@kkjeer
Copy link
Contributor

kkjeer commented Mar 20, 2020

The current rules for assignment compatibility of expressions involving bounds-safe interfaces are missing two cases.

The first case is related to assignments involving nested pointers.
An assignment *p = e can pass type checking if:

  • p has an unchecked pointer type and a bounds-safe interface, and
  • e has a checked pointer type, and
  • the referent type of e is assignment compatible with the referent type of the referent type of p

The second case is related to assignments of an unchecked pointer with an _Nt_array_ptr bounds-safe interface to an _Nt_array_ptr variable.
An assignment v = e can pass type checking if:

  • v has type _Nt_array_ptr<T>, and
  • e has unchecked pointer type and a bounds-safe interface of _Nt_array_ptr<U>, and
  • the referent types T and U are assignment compatible.
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