scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit e94025758a20cf19557cefc0cc13cf91382edfcf
parent f9da346c95dfad26333b396bdc1e52b158131a42
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat,  4 Jan 2025 00:22:52 +0100

cc2: Unlink np in delstmt()

We were unlinking curstmt instead of the np parameter, but
as it used to be almost always curstmt == np then we didn't
see the error.

Diffstat:
Msrc/cmd/scc-cc/cc2/node.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cmd/scc-cc/cc2/node.c b/src/cmd/scc-cc/cc2/node.c @@ -113,7 +113,7 @@ delstmt(Node *np) Node *next; next = np->next; - deltree(unlinkstmt(curstmt)); + deltree(unlinkstmt(np)); return next; }