aboutsummaryrefslogtreecommitdiff
path: root/decl.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2024-04-26 18:31:18 -0700
committerMichael Forney <mforney@mforney.org>2024-04-27 02:48:40 -0700
commit186b7095eeb84bec527d6d7ac9320776a8b78734 (patch)
tree5a0da2807e8fa5a1d43aae307dc2316578c936ab /decl.c
parent2b6c69c6b7f9dd4b30f00f3b1d9552c5b1c6077e (diff)
Use hlt to implement noreturn
Diffstat (limited to 'decl.c')
-rw-r--r--decl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/decl.c b/decl.c
index 0749017..39c272d 100644
--- a/decl.c
+++ b/decl.c
@@ -1066,6 +1066,8 @@ decl(struct scope *s, struct func *f)
s = funcscope;
f = mkfunc(d, name, t, s);
stmt(f, s);
+ if (d->u.func.isnoreturn)
+ funchlt(f);
/* XXX: need to keep track of function in case a later declaration specifies extern */
if (!d->u.func.inlinedefn)
emitfunc(f, d->linkage == LINKEXTERN);