Subject: Re: bug#74920: 31.0.50; 'should' defeats warning from set-advertised-calling-convention

From: "Basil L. Contovounesios" <[email-masked]>
Date: Mon, 03 Feb 2025 09:53:13 +0100

Basil L. Contovounesios [2025-02-02 19:27 +0100] wrote:

> It's not just 'should', and not just set-advertised-calling-convention:
>
>   ;; -*- lexical-binding: t -*-
>   (require 'cl-lib)
>   (require 'ert)
>   (defun       foo () (cl-nreconc '(1 2 3) '(4 5 6)))
>   (ert-deftest foo () (cl-nreconc '(a b c) '(d e f)))
>
> Byte-compiling this gives only one 'cl-nreconc on constant list' warning
> instead of two.
>
> The macroexpansion of (should (cl-nreconc '(a b c) '(d e f))) gives some
> hints as to why the warning could be lost, since the direct call to
> cl-nreconc is turned into an indirect one.
>
> But ERT seems to give rise to false negatives regardless of 'should'.

Ah, I think the case of cl-nreconc is affected by it being proclaimed as
inline in cl-macs.el.

-- 
Basil