code: plan9front

Download patch

ref: 75337cba3a21530c7da1efaa1ab3b6ed145c5172
parent: 267b0baa1b860c1672429abecf5ede3bacf84eb9
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Mar 20 09:08:31 EDT 2023

cc: fndecls: always ignore non-function types

--- a/sys/src/cmd/cc/dcl.c
+++ b/sys/src/cmd/cc/dcl.c
@@ -737,6 +737,8 @@
 	static Sym *funcsym;
 	Node *n;
 
+	if(thisfnnode->etype != TFUNC)
+		return;
 	if(pass == 0){
 		n = new(ONAME, Z, Z);
 		n->type = typ(TARRAY, garbt(types[TCHAR], BCONSTNT));