bugmake - Bugs: bug #62881, parentheses confuse make parser

 
 

bug #62881: parentheses confuse make parser

Submitter:  Dmitry Goncharov <dgoncharov>
Submitted:  Tue 09 Aug 2022 07:02:50 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Wont Fix Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  4.4 Operating System:  None
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 11 Sep 2022 03:18:39 AM UTC, comment #2: 

I decided to "solve" this by updating the documentation instead.  See bug #62898.

Paul D. Smith <psmith>
Group administrator
Tue 09 Aug 2022 07:05:24 PM UTC, comment #1: 

A user reported the following here https://lists.gnu.org/archive/html/bug-make/2022-08/msg00017.html


in GNU-make macros. Like in:

   msg = @echo "$(1)"

   ptest_1:
        $(call msg, foo (arg1, arg2, arg3))

...

--------------------

A 'make ptest_1' shows:
   foo (arg1, arg2, arg3)

...


So does a "foo (arg1, arg2, arg3)" becomes one
argument due to the parenthesis or something?


"foo (arg1, arg2, arg3)" indeed becomes one argument due to the parenthesis.
Make needs to chop "foo (arg1, arg2, arg3))" into 3 arguments for 'msg'.
make assumes that any comma after an open parenthesis delimits an argument for a nested macro. Like in "foo $(arg1, arg2, arg3))".
There is no '$' in this case and make could figure out that the user intended 'foo (arg1' to be the 1st arg, etc.

Dmitry Goncharov <dgoncharov>
Tue 09 Aug 2022 07:02:50 PM UTC, original submission:  

.

Dmitry Goncharov <dgoncharov>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #53550:  sv62881_test.diff added by dgoncharov (1KiB - text/x-patch)
file #53551:  sv62881_fix.diff added by dgoncharov (897B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by dgoncharov (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-09-11 psmith StatusNone Wont Fix
        Open/ClosedOpen Closed
    2022-08-09 dgoncharov Attached File- Added sv62881_test.diff, #53550
        Attached File- Added sv62881_fix.diff, #53551

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code