summaryrefslogtreecommitdiff
path: root/usr.bin/pcc
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/pcc')
-rw-r--r--usr.bin/pcc/ccom/pftn.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/pcc/ccom/pftn.c b/usr.bin/pcc/ccom/pftn.c
index 7e62929917d..baab75fcdbf 100644
--- a/usr.bin/pcc/ccom/pftn.c
+++ b/usr.bin/pcc/ccom/pftn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pftn.c,v 1.3 2007/10/12 17:03:14 otto Exp $ */
+/* $OpenBSD: pftn.c,v 1.4 2007/10/18 17:02:11 otto Exp $ */
/*
* Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se).
* All rights reserved.
@@ -2303,6 +2303,11 @@ incomp: uerror("incompatible types for arg %d",
goto out;
}
+ /* XXX should (recusively) check return type and arg list of
+ func ptr arg XXX */
+ if (ISFTN(DECREF(arrt)) && ISFTN(type))
+ type = INCREF(type);
+
/* Hereafter its only pointers (or arrays) left */
/* Check for struct/union intermixing with other types */
if (((type <= BTMASK) && ISSOU(BTYPE(type))) ||