diff mc-parse.c @ 640:04211a2cf227

*** empty log message ***
author kono
date Wed, 01 Nov 2006 01:27:11 +0900
parents 35014112c01d
children 90274e6d4d5a
line wrap: on
line diff
--- a/mc-parse.c	Tue Oct 31 22:40:37 2006 +0900
+++ b/mc-parse.c	Wed Nov 01 01:27:11 2006 +0900
@@ -1120,10 +1120,6 @@
 	if(sym==IDENT) {
 	    if (nptr->sc==TYPE) {
 		t=nptr->ty;
-		if (mode==ADECL) {
-		    //   f(float a[4][4]) case
-		    t = list2(POINTER,t);
-		}
 		typedefed=glist2((int)nptr,typedefed);
 		getsym(0);
 		break;
@@ -1187,7 +1183,7 @@
 	    if(getsym(0)==RBRA) {
 		getsym(0);
 		if(mode==ADECL) {
-		    type=list2(POINTER,type);
+		    type=list3(ARRAY,type,0);
 		} else if (mode==GDECL || stmode==EXTRN) {
 		    type=list3(ARRAY,type,0);
 		} else if (mode==GSDECL || mode==LSDECL) {
@@ -1258,8 +1254,9 @@
 	    } else
 		error(DCERR);
 	    return n;
-	} else
+	} else {
 	    return n;
+	}
     }
     /* NOT REACHED */
 }
@@ -1311,7 +1308,7 @@
 		sargs = args;
 		arg=decl0();
 		args = sargs;
-		reverse(t);
+		reverse(t); // this sets type also
 		if (arg != &null_nptr) {
 		    if (smode==GDECL)
 			def(arg,ctmode);