bugmake - Bugs: bug #45191, Implicit argument forwarding...


bug #45191: Implicit argument forwarding limited by infinite recursion checker

Submitted by:  Julio Guerra <julio>
Submitted on:  Tue 26 May 2015 10:46:34 AM UTC  
Severity:  3 - Normal Item Group:  Enhancement
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  4.0 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 26 May 2015 10:46:34 AM UTC, original submission:


It seems the infinite recursion detector does not consider implicit argument forwarding possible. When recursively expanding a variable without using `call`, it is assumed it does not use $1, $2, etc. and is thus considered as an infinite recursion.

list = $(list_) # list_ called in the context of list, $1 of `list_` is the $1 of `list`
list_ = $($1) # dummy example
a = $(call list,b) # new "call scope" #2 with $1 = b
b = ok
$(error $(call list,a)) # new "call scope" #1 with $1 = a
Result: *** Recursive variable 'list_' references itself (eventually).

The expansion is simple:
list_(b) <- error detected

The error disappears when forwarding arguments explicitly:
list = $(call list_,$1)
list_ = $($1)
a = $(call list,b)
b = ok
$(error $(call list,a))
Result: ok

Implicit forwarding is very useful in some cases (e.g `arg1 = $(strip $1)`), it would be nice to officially handle it.


Julio Guerra <julio>


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by julio (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.3