Module Name: src Committed By: rillig Date: Mon Apr 19 13:18:43 UTC 2021
Modified Files: src/usr.bin/xlint/lint1: func.c Log Message: lint: add debug logging for reachability To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/usr.bin/xlint/lint1/func.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/xlint/lint1/func.c diff -u src/usr.bin/xlint/lint1/func.c:1.105 src/usr.bin/xlint/lint1/func.c:1.106 --- src/usr.bin/xlint/lint1/func.c:1.105 Sun Apr 18 17:36:18 2021 +++ src/usr.bin/xlint/lint1/func.c Mon Apr 19 13:18:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: func.c,v 1.105 2021/04/18 17:36:18 rillig Exp $ */ +/* $NetBSD: func.c,v 1.106 2021/04/19 13:18:43 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: func.c,v 1.105 2021/04/18 17:36:18 rillig Exp $"); +__RCSID("$NetBSD: func.c,v 1.106 2021/04/19 13:18:43 rillig Exp $"); #endif #include <stdlib.h> @@ -190,6 +190,11 @@ end_control_statement(control_statement_ static void set_reached(bool new_reached) { +#ifdef DEBUG + printf("%s:%d: %s -> %s\n", curr_pos.p_file, curr_pos.p_line, + reached ? "reachable" : "unreachable", + new_reached ? "reachable" : "unreachable"); +#endif reached = new_reached; warn_about_unreachable = true; }