You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To handle null-terminated strings, we will need to have null-terminated array_ptrs. The current plan is to have a new kind of type, just as we have ptr and array_ptr. The new type might be called nullterm_ptr. We still need to write up the design of the type. It will likely be modelled on the support for null-terminated pointers described in the Deputy research project. Programmers will be able to optionally declare that a variable with null-terminated pointer type has a bounds expression.
This proposed work items are based on what we did to implement array_ptr:
Extend the IR with a way to represent null-terminated array_ptr types. This includes extending AST dumping and pretty-printing.
An array_ptr type cannot be converted implicitly to a null-terminated array_ptr type. This is because there could be another copy of the pointer that allows the null value to be overwritten.
For similar reasons, unchecked pointer types cannot be converted implicitly to null-terminated array_ptr.
Null-terminated pointer types can be implicitly converted to array_ptr types.
Null terminated array_ptr pointers cannot be implicitly converted to an unchecked pointer type.
Write tests of language constructs using null-terminated array_ptr
Expressions.
Function calls
Extend existing interoperation support and write test of that.
Add bounds checking for null-terminated array_ptr types. The bounds checks will be different than those allowed for array_ptr types.
The text was updated successfully, but these errors were encountered:
This issue was copied from checkedc/checkedc-clang#215
To handle null-terminated strings, we will need to have null-terminated array_ptrs. The current plan is to have a new kind of type, just as we have
ptr
andarray_ptr
. The new type might be callednullterm_ptr
. We still need to write up the design of the type. It will likely be modelled on the support for null-terminated pointers described in the Deputy research project. Programmers will be able to optionally declare that a variable with null-terminated pointer type has a bounds expression.This proposed work items are based on what we did to implement
array_ptr
:The text was updated successfully, but these errors were encountered: