aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-10-08 01:29:37 +0200
committerEugen Wissner <belka@caraus.de>2026-10-08 01:29:37 +0200
commitd4b7f5e52a33f2d15aafca7f1b040f3f2821fd0c (patch)
treec4d2f2ea44bbcb26108e86270a4454cd04f7873a /gcc
parent12e304fd56f054ba7296ab538eecd4280a67832a (diff)
downloadelna-d4b7f5e52a33f2d15aafca7f1b040f3f2821fd0c.tar.gz
Move record constructor type into the braces
Diffstat (limited to 'gcc')
-rw-r--r--gcc/gcc/elna-generic.cc15
1 files changed, 3 insertions, 12 deletions
diff --git a/gcc/gcc/elna-generic.cc b/gcc/gcc/elna-generic.cc
index 77ff61f..bb93270 100644
--- a/gcc/gcc/elna-generic.cc
+++ b/gcc/gcc/elna-generic.cc
@@ -248,14 +248,9 @@ namespace elna::gcc
void generic_visitor::visit(boot::record_constructor_expression *expression)
{
- tree type_decl = this->symbols->lookup(expression->type_name.name());
+ tree record_type = get_inner_alias(expression->type_decoration, this->symbols);
+ gcc_assert(TREE_CODE(record_type) == RECORD_TYPE);
- if (type_decl == NULL_TREE)
- {
- this->current_expression = error_mark_node;
- return;
- }
- tree record_type = TREE_TYPE(type_decl);
vec<constructor_elt, va_gc> *tree_arguments = nullptr;
for (const boot::field_initializer& initializer : expression->field_initializers)
@@ -271,12 +266,8 @@ namespace elna::gcc
void generic_visitor::visit(boot::array_constructor_expression *expression)
{
tree array_type = get_inner_alias(expression->type_decoration, this->symbols);
+ gcc_assert(TREE_CODE(array_type) == ARRAY_TYPE);
- if (TREE_CODE(array_type) != ARRAY_TYPE)
- {
- this->current_expression = error_mark_node;
- return;
- }
tree domain = TYPE_DOMAIN(array_type);
tree index = TYPE_MIN_VALUE(domain);
vec<constructor_elt, va_gc> *tree_arguments = nullptr;