Fix size calculation of unsized bool array

This stops sparse from issuing the error message
	"error: cannot size expression"
for code like:
	static _Bool boolarray[] = {
	static int n = sizeof(boolarray);

The fix consists of using array_element_offset() for calculating
the size of unsized arrays, like it is done elsewhere for sized ones.

Signed-off-by: Luc Van Oostenryck <>
Signed-off-by: Christopher Li <>
2 files changed