Follow-up Comment #2, bug#64259 (group make): The change suggested here doesn't treat these two cases quite symmetrically:
martind@stormy:~/tmp/make-missing-endif$ printf 'ifeq "a" "a"\n\tendif\ndefault:;\n' > Makefile; ~/download/make/make Makefile:2: *** recipe commences before first target. Stop. martind@stormy:~/tmp/make-missing-endif$ printf 'ifeq "a" "b"\n\tendif\ndefault:;\n' > Makefile; ~/download/make/make Makefile:4: *** missing 'endif'. Stop. martind@stormy:~/tmp/make-missing-endif$ I'd say that's only a minor code smell. I consider it an advance on the pushed code, which accepts the first, while rejecting the second. It better fulfills the NEWS entry by rejecting: martind@stormy:~/tmp/make-missing-endif$ printf '\tifeq "" ""\nendif\ndefault:;\n' > Makefile; ~/download/make/make Makefile:1: *** recipe commences before first target. Stop. martind@stormy:~/tmp/make-missing-endif$ ... which the pushed code accepts: martind@stormy:~/tmp/make-missing-endif$ printf '\tifeq "" ""\nendif\ndefault:;\n' > Makefile; ~/bin/make-4.4.90 make-4.4.90: 'default' is up to date. martind@stormy:~/tmp/make-missing-endif$ I'd like to also suggest this correction to the introducer: martind@stormy:~/download/make$ git diff tests/scripts/features/conditionals diff --git a/tests/scripts/features/conditionals b/tests/scripts/features/conditionals index c1eee95c..27417623 100644 --- a/tests/scripts/features/conditionals +++ b/tests/scripts/features/conditionals @@ -153,7 +153,7 @@ endif ', '', "one\n"); -# SV 64085: Ensure recipe prefixed conditionals are never considered +# SV 64185: Ensure recipe prefixed conditionals are never considered run_make_test(q! blah=1 ifdef blah martind@stormy:~/download/make$ I struggled to find the right bug, hence to find my way here. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64259> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/