summaryrefslogtreecommitdiff
path: root/sdecls_cgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'sdecls_cgen.c')
-rw-r--r--sdecls_cgen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sdecls_cgen.c b/sdecls_cgen.c
index 1aa8e51..2bd71a0 100644
--- a/sdecls_cgen.c
+++ b/sdecls_cgen.c
@@ -70,6 +70,10 @@ static bool cgen_sdecls_expr(CGenerator *g, Expression *e) {
}
static bool cgen_sdecls_decl(CGenerator *g, Declaration *d) {
+ if (d->flags & DECL_FOREIGN) {
+ /* handled by cgen_decls */
+ return true;
+ }
cgen_sdecls_type(g, &d->type);
if (cgen_fn_is_direct(g, d)) {
d->expr.fn->c.name = d->idents[0];