On Tue, Nov 16, 2021 at 10:28 AM Edward Welbourne
<edward.welbou...@qt.io> wrote:
>
> On Sun, Nov 14, 2021 at 8:42 PM Paul Smith <psm...@gnu.org> wrote:
> > It's even possible to allow $(compare <lhs>,<rhs>) with no other
> > arguments and say that if they are equal then it expands to the value,
> > else it expands to the empty string, to give a very short-circuited
> > equality statement.
>
> I should point out one bug in that: if the two parameters are equal
> *but empty* you're going to mistake that for them being different.

Empty strings will not be accepted as <lhs> or <rhs>, since those
arguments are parsed as numbers. A case like
  $(compare +0,-0)
would expand to "0" (without quotes), which is how the value would be
formatted by the standard C routines.
I don't think there is a bug here.

Regards,
- Jouke

Reply via email to