Module Name: src Committed By: rillig Date: Mon Aug 8 19:53:28 UTC 2022
Modified Files: src/usr.bin/make/unit-tests: parse-var.mk Log Message: tests/make: document history of bug in parsing unbalanced expressions The bug was introduced in var.c 1.323, which merged two flags that sounded as if they had been exact opposites: VAR_NOSUBST (later named VARE_NOSUBST) and VARE_WANTRES. Before that commit, the branch where make only counted braces instead of properly parsing the nested expression was only taken in the modifiers ':@var@body@' and '::=', but not in ':S' and ':C'. After merging the two flags, the modifier parts of ':S' and ':C' had to be balanced as well, otherwise parsing would fail in cases where the expression was only parsed, not evaluated. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/parse-var.mk 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/make/unit-tests/parse-var.mk diff -u src/usr.bin/make/unit-tests/parse-var.mk:1.3 src/usr.bin/make/unit-tests/parse-var.mk:1.4 --- src/usr.bin/make/unit-tests/parse-var.mk:1.3 Mon Aug 8 18:23:30 2022 +++ src/usr.bin/make/unit-tests/parse-var.mk Mon Aug 8 19:53:28 2022 @@ -1,4 +1,4 @@ -# $NetBSD: parse-var.mk,v 1.3 2022/08/08 18:23:30 rillig Exp $ +# $NetBSD: parse-var.mk,v 1.4 2022/08/08 19:53:28 rillig Exp $ # # Tests for parsing variable expressions. @@ -14,8 +14,9 @@ VAR.${:U param }= value .endif -# Before var.c 1.1028 from 2022-08-08, the exact way of parsing an expression -# depended on whether the expression was actually evaluated or merely parsed. +# Since var.c 1.323 from 202-07-26 18:11 and before var.c 1.1028 from +# 2022-08-08, the exact way of parsing an expression depended on whether the +# expression was actually evaluated or merely parsed. # # If it was evaluated, nested expressions were parsed correctly, parsing each # modifier according to its exact definition (see varmod.mk).