mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-14 15:23:15 +00:00
Add #simd[N]rawptr support
This commit is contained in:
@@ -3171,7 +3171,7 @@ gb_internal void check_array_type_internal(CheckerContext *ctx, Ast *e, Type **t
|
||||
} else if (name == "simd") {
|
||||
if (!is_type_valid_vector_elem(elem) && !is_type_polymorphic(elem)) {
|
||||
gbString str = type_to_string(elem);
|
||||
error(at->elem, "Invalid element type for #simd, expected an integer, float, or boolean with no specific endianness, got '%s'", str);
|
||||
error(at->elem, "Invalid element type for #simd, expected an integer, float, boolean, or 'rawptr' with no specific endianness, got '%s'", str);
|
||||
gb_string_free(str);
|
||||
*type = alloc_type_array(elem, count, generic_type);
|
||||
return;
|
||||
|
||||
@@ -2091,6 +2091,9 @@ gb_internal bool is_type_valid_vector_elem(Type *t) {
|
||||
if (is_type_boolean(t)) {
|
||||
return true;
|
||||
}
|
||||
if (t->Basic.kind == Basic_rawptr) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user