Make #simd an opaque type

This commit is contained in:
gingerBill
2022-05-25 17:26:18 +01:00
parent d8e77cd738
commit b032d5af87
5 changed files with 34 additions and 24 deletions
+5
View File
@@ -2802,6 +2802,11 @@ bool check_type_internal(CheckerContext *ctx, Ast *e, Type **type, Type *named_t
*type = alloc_type_array(elem, count, generic_type);
goto array_end;
}
if (count < 1 || !is_power_of_two(count)) {
error(at->elem, "Invalid length for 'intrinsics.simd_vector', expected a power of two length, got '%lld'", cast(long long)count);
*type = alloc_type_array(elem, count, generic_type);
goto array_end;
}
*type = alloc_type_simd_vector(count, elem);
} else {