shithub: scc

Download patch

ref: 07080bf7b7a6efd833bbb5da74c9ace959ef5ed9
parent: 961c4456038b77fcf1832b819ef7210c5af4f652
author: Hiltjo Posthuma <[email protected]>
date: Mon Nov 15 13:45:30 EST 2021

cc1: fix function argument number in error message

"incompatible type for argument %d in function call"

--- a/src/cmd/cc/cc1/expr.c
+++ b/src/cmd/cc/cc1/expr.c
@@ -722,7 +722,7 @@
 			continue;
 		}
 		errorp("incompatible type for argument %d in function call",
-		       tp->n.elem - n + 1);
+		       tp->n.elem - n);
 	} while (accept(','));
 
 no_pars: