Closed
Description
Consider the following minimal example code:
static _Nt_array_ptr<const char> mystr;
void
myfunc(const char *str : itype(_Nt_array_ptr<const char>))
{
mystr = str;
}
int
main(void)
{
myfunc("foo");
}
I would expect this to compile correctly, unfortunately it doesn't:
test.c:6:8: error: assigning to '_Nt_array_ptr<const char>' from incompatible type 'const char *'
mystr = str;
^ ~~~
1 error generated.
From my understanding of the Checked C language specification, I was under the assumption that checked pointer types and bounds-safe interfaces are assignment compatible. Either this is not the case, i.e. my understanding of the specification is incorrect, or this is a bug in the compiler.
Metadata
Metadata
Assignees
Labels
No labels