[bug #59956] Recipes inside conditionals can break the parser

2021-01-27 Thread Paul D. Smith
Follow-up Comment #7, bug #59956 (project make): Adding a new keyword doesn't help: it's not that we're trying to use a make *else* clause but the *else* is being interpreted as something else, where replacing it with *.else* would help clarify what is meant; the problem is that we're trying to us

[bug #59956] Recipes inside conditionals can break the parser

2021-01-27 Thread Dmitry Goncharov
Follow-up Comment #6, bug #59956 (project make): What about adding another keyword, e.g. .else? ___ Reply to this item at: ___ Message sent via Savanna

[bug #59956] Recipes inside conditionals can break the parser

2021-01-27 Thread anonymous
Follow-up Comment #5, bug #59956 (project make): > We can "fix" it by adding a simplifying heuristic; perhaps something like: "conditional statements are only recognized if they are not prefixed by the recipe prefix in effect when the if-statement started". That is not perfect but it's probably g

[bug #59956] Recipes inside conditionals can break the parser

2021-01-27 Thread Paul D. Smith
Follow-up Comment #4, bug #59956 (project make): Any target can have a recipe, even special targets like *.PHONY:*, *.POSIX:*, *.ONESHELL:*, etc. Those recipes are ignored but they are syntactically legal. I guess there would be value in mentioning them if some sort of "warning mode" were enable

[bug #59956] Recipes inside conditionals can break the parser

2021-01-27 Thread Bogdan V
Follow-up Comment #3, bug #59956 (project make): Thanks for the even more detailed explanation than on Stack Overflow :) I didn't realize special targets like *.ONESHELL:* can also have a recipe. As a clarification, when I mentioned *.RECIPEPREFIX:* I was also implying actually using it in the r

[bug #59956] Recipes inside conditionals can break the parser

2021-01-27 Thread Paul D. Smith
Follow-up Comment #2, bug #59956 (project make): It may seem trivial but in reality it's pretty hard to hit. There is essentially only one way it can happen (in valid make recipes), and that's by using *.ONESHELL:*. If you don't use *.ONESHELL:* then the only way it can happen is if you have a p

[bug #59956] Recipes inside conditionals can break the parser

2021-01-27 Thread Paul D. Smith
Follow-up Comment #1, bug #59956 (project make): There is one real bug here, but everything else is just an understandable consequence of that same bug. The real bug is that the "else" that is part of a recipe, is being interpreted by make as an "else" match for the ifeq. This is because while m

[bug #59956] Recipes inside conditionals can break the parser

2021-01-27 Thread anonymous
URL: Summary: Recipes inside conditionals can break the parser Project: make Submitted by: None Submitted on: Wed 27 Jan 2021 08:29:00 PM UTC Severity: 3 - Normal Item