Open
Description
When converting without -alltypes
, the constraint variable associated with string literals will solve to WILD because there is a constraint with NTARR
. It makes sense to let string literals be checked because code like the following is accepted by CheckedC.
void foo(void) _Checked {
_Ptr<char> a = "test";
}
Making string literals unchecked also results in many unnecessary casts being inserted for benchmark programs such as vsftpd.
void foo(char* x) { }
void bar(void) {
foo("test");
}
void foo(_Ptr<char> x) _Checked { }
void bar(void) _Checked {
foo(_Assume_bounds_cast<_Ptr<char>>("test"));
}
When combine with issue #469, the extra cast causes a compile error for -addcr
.