aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--decl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/decl.c b/decl.c
index d532029..e4187e4 100644
--- a/decl.c
+++ b/decl.c
@@ -944,7 +944,9 @@ decl(struct scope *s, struct func *f)
s = mkscope(&filescope);
f = mkfunc(name, t, s);
stmt(f, s);
- emitfunc(f, d->linkage == LINKEXTERN);
+ /* XXX: need to keep track of function in case a later declaration specifies extern */
+ if (!(fs & FUNCINLINE) || sc)
+ emitfunc(f, d->linkage == LINKEXTERN);
s = delscope(s);
delfunc(f);
d->defined = true;