Skip to content

Should casting a char * to _Nt_array_ptr be allowed? #1155

Open
@mgrang

Description

@mgrang

Should we allow this type of code?

char *g(_Nt_array_ptr<char> p);

void f(_Nt_array_ptr<char> p) {
  p = (_Nt_array_ptr<char>) g(p);
}

There is no guarantee that the char * returned by the function g() actually contains a null-terminator.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions