Randomize type declaration order

This commit is contained in:
2025-03-12 23:56:54 +01:00
parent c9a8ecdc0a
commit ac084be7f5
5 changed files with 48 additions and 28 deletions

View File

@ -754,17 +754,8 @@ namespace gcc
get_identifier(definition->identifier.c_str()), this->current_expression);
auto result = this->symbols->enter(definition->identifier, this->current_expression);
/* if (result)
{ */
TREE_PUBLIC(definition_tree) = definition->exported;
TYPE_NAME(this->current_expression) = get_identifier(definition->identifier.c_str());
// }
/* else
{
error_at(get_location(&definition->position()),
"type '%s' already declared in this scope",
definition->identifier.c_str());
} */
TREE_PUBLIC(definition_tree) = definition->exported;
TYPE_NAME(this->current_expression) = get_identifier(definition->identifier.c_str());
this->current_expression = NULL_TREE;
}