mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Compiler segfault when accessing member of number cast to bitstruct #2516.
- Additional fix to #2515 - Compiler assert when getting a member of a `bitstruct : char @bigendian` #2517.
This commit is contained in:
@@ -1060,6 +1060,11 @@ static bool sema_analyse_bitstruct(SemaContext *context, Decl *decl, bool *erase
|
||||
DEBUG_LOG("Beginning analysis of %s.", decl->name ? decl->name : ".anon");
|
||||
if (!sema_resolve_type_info(context, decl->strukt.container_type, RESOLVE_TYPE_DEFAULT)) return false;
|
||||
Type *type = type_flatten(decl->strukt.container_type->type->canonical);
|
||||
if (type_size(type) == 1)
|
||||
{
|
||||
decl->strukt.big_endian = false;
|
||||
decl->strukt.little_endian = false;
|
||||
}
|
||||
Type *base_type = type->type_kind == TYPE_ARRAY ? type_flatten(type->array.base) : type;
|
||||
if (!type_is_integer(base_type))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user