changeset 598:e29ae2dab3c0

*** empty log message ***
author kono
date Tue, 24 Jan 2006 10:55:00 +0900
parents 756ba7c78e4c
children df04bc5fd5fe
files mc-codegen.c
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mc-codegen.c	Mon Jan 23 14:09:31 2006 +0900
+++ b/mc-codegen.c	Tue Jan 24 10:55:00 2006 +0900
@@ -4263,6 +4263,20 @@
     }
     if (t>0) {
 	switch(car(t)) {
+	case POINTER:
+	    if (cadr(t)>0 && car(cadr(t))==FUNCTION) {
+		if (car(e)==FNAME) {
+		    NMTBL *n = (NMTBL*)cadr(e);
+		    int targ0 = caddr(cadr(t));
+		    int targ1 = caddr(n->ty);
+		    if (is_function(n)) {
+			compatible(cadr(cadr(t)),cadr(n->ty));
+		    }
+		    compatible(targ0,targ1);
+		}
+		// type should be checked...
+	    }
+	    break;
 	case STRUCT: case UNION:
 	    if(size(t)!=size(type)) error(TYERR);
 	    break;