Implement noreturn procedure declarations

This commit is contained in:
2025-02-18 16:09:27 +01:00
parent 39750f4656
commit 0b835abfa9
7 changed files with 70 additions and 85 deletions

View File

@ -256,6 +256,10 @@ namespace gcc
tree fndecl = build_fn_decl(definition->identifier.c_str(), declaration_type);
this->symbol_map->enter(definition->identifier, fndecl);
if (definition->no_return)
{
TREE_THIS_VOLATILE(fndecl) = 1;
}
if (definition->body() != nullptr)
{
tree resdecl = build_decl(UNKNOWN_LOCATION, RESULT_DECL, NULL_TREE, return_type);