This issue was copied from checkedc/checkedc-clang#1120
Consider the following declaration of an nt_checked array:
char p nt_checked[] = {}
According to the Checked C spec section 2.4:
nt_checked declares an array whose last element is a null terminator. The size of the array includes the null terminator element.
- An
nt_checked array with size d converts to an nt_array_ptr with a count of d - 1 elements.
So it should be illegal to declare an nt_checked array with an empty initializer list.
This issue was copied from checkedc/checkedc-clang#1120
Consider the following declaration of an
nt_checkedarray:char p nt_checked[] = {}According to the Checked C spec section 2.4:
nt_checkeddeclares an array whose last element is a null terminator. The size of the array includes the null terminator element.nt_checkedarray with sizedconverts to annt_array_ptrwith a count ofd - 1elements.So it should be illegal to declare an
nt_checkedarray with an empty initializer list.