Issue 67585 - Function macro $(nil ...) does not evaluate expression
Summary: Function macro $(nil ...) does not evaluate expression
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: dmake (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: hjs
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-19 23:24 UTC by quetschke
Modified: 2013-08-07 15:34 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Patch for dmake (3.95 KB, patch)
2006-07-23 04:06 UTC, quetschke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description quetschke 2006-07-19 23:24:56 UTC
According to dmake's man page:

              $(nil expression)
                     Always  returns  the  value of $(NULL) regardless of what
                     expression is.  This function macro can be used  to  dis-
                     card results of expanding macro expressions.

nil expands expression and then discards the output. Well, it does not.
Comment 1 quetschke 2006-07-23 04:06:41 UTC
Created attachment 37966 [details]
Patch for dmake
Comment 2 quetschke 2006-07-23 04:48:50 UTC
Committed the previous patch and a testcase to CWS dmake46.

The committed patch also removes some unneeded code from function.c and
adds some extra documentation about function macros to the dmake man page:

       For historic reasons dmake treats the following case slightly special:

              $(name something)

       If  it  encounters a macro with a whitespace after name and name is not
       literally one of the above mentioned function  macro  identifiers  then
       dmake  will  return  the  recursively  expanded  value of $(name).  The
       remaining something part will be expanded but the result will  be  dis-
       carded. The use of this special feature is deprecated and should not be
       used.
Comment 3 quetschke 2006-07-23 04:49:54 UTC
@ause: Please verify.
Comment 4 hjs 2006-09-14 16:15:08 UTC
.
Comment 5 hjs 2007-01-03 12:04:40 UTC
.