1f08c3bdfSopenharmony_cistatic _Bool boolarray_d1[1]; 2f08c3bdfSopenharmony_cistatic _Bool boolarray_d8[8]; 3f08c3bdfSopenharmony_cistatic _Bool boolarray_i2[2] = { 4f08c3bdfSopenharmony_ci 0, 5f08c3bdfSopenharmony_ci 1, 6f08c3bdfSopenharmony_ci}; 7f08c3bdfSopenharmony_cistatic int nd1 = sizeof(boolarray_d1); 8f08c3bdfSopenharmony_cistatic int nd8 = sizeof(boolarray_d8); 9f08c3bdfSopenharmony_cistatic int ni2 = sizeof(boolarray_i2); 10f08c3bdfSopenharmony_ci 11f08c3bdfSopenharmony_ci 12f08c3bdfSopenharmony_cistatic long longarray_u2[] = { 13f08c3bdfSopenharmony_ci 0, 14f08c3bdfSopenharmony_ci 1, 15f08c3bdfSopenharmony_ci}; 16f08c3bdfSopenharmony_cistatic int nl2 = sizeof(longarray_u2); 17f08c3bdfSopenharmony_ci 18f08c3bdfSopenharmony_ci/* 19f08c3bdfSopenharmony_ci * Used to get "warning: excessive elements in array initializer" 20f08c3bdfSopenharmony_ci * for all elements but the first one. 21f08c3bdfSopenharmony_ci * Note: only occurs if nbr of elements is a multiple of 8 22f08c3bdfSopenharmony_ci * (if not, theer was another problem) 23f08c3bdfSopenharmony_ci */ 24f08c3bdfSopenharmony_cistatic _Bool boolarray_u8[] = { 25f08c3bdfSopenharmony_ci 0, 26f08c3bdfSopenharmony_ci 1, 27f08c3bdfSopenharmony_ci 0, 28f08c3bdfSopenharmony_ci 1, 29f08c3bdfSopenharmony_ci 0, 30f08c3bdfSopenharmony_ci 1, 31f08c3bdfSopenharmony_ci 0, 32f08c3bdfSopenharmony_ci 1, 33f08c3bdfSopenharmony_ci}; 34f08c3bdfSopenharmony_ci 35f08c3bdfSopenharmony_ci/* 36f08c3bdfSopenharmony_ci * Used to get "error: cannot size expression" for the sizeof. 37f08c3bdfSopenharmony_ci */ 38f08c3bdfSopenharmony_cistatic _Bool boolarray_u2[] = { 39f08c3bdfSopenharmony_ci 0, 40f08c3bdfSopenharmony_ci 1, 41f08c3bdfSopenharmony_ci}; 42f08c3bdfSopenharmony_cistatic int nu2 = sizeof(boolarray_u2); 43f08c3bdfSopenharmony_ci 44f08c3bdfSopenharmony_ci/* 45f08c3bdfSopenharmony_ci * check-name: sizeof(bool array) 46f08c3bdfSopenharmony_ci * check-command: sparse -Wno-sizeof-bool $file 47f08c3bdfSopenharmony_ci */ 48