coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error: Support the compiler's control flow analysis better (was: cop


From: Pádraig Brady
Subject: Re: error: Support the compiler's control flow analysis better (was: copy-file: Silence gcc warnings)
Date: Thu, 1 Jun 2023 13:22:31 +0100
User-agent: Mozilla Thunderbird

On 01/06/2023 13:10, Bruno Haible wrote:
Pádraig Brady wrote:
Was there a reason to prefer curly braces there, rather than the more
conventional parentheses?

             '$(error_fns) \(.*%s[:"], .*(name|file)[^"]*\);$$' *.c; \

I had a slight preference for the curly braces since it was used in a shell 
pipeline
and so it's immediately obvious it's a ${variable interpolation}
rather than being misread as a $(command substitution).

Sorry, but I find it as confusing as Jim. Inside the commands of a Makefile 
rule,
   $$x or $${x}       references a shell variable
   $$(x)              does a command substitution
   $(x) or ${x)       references a Makefile variable
   $(x y) or ${x y}   does a GNU make function call
For the latter two, the customary notation is with parentheses.

So, if someone writes  ${x)  or  ${x y}, the reader immediately wonders:
What is the point of the braces? Was it a typo, and they mean $${x} instead?

Fair point.
I've adjusted to consistent $() interpolation now.

cheers,
Pádraig




reply via email to

[Prev in Thread] Current Thread [Next in Thread]