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: Bruno Haible
Subject: Re: error: Support the compiler's control flow analysis better (was: copy-file: Silence gcc warnings)
Date: Thu, 01 Jun 2023 14:10:22 +0200

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?

Bruno






reply via email to

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