bug#81493: 30.2; Incorrect byte-compiler warning about unused value

Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email protected]> Thu, 30 Jul 2026 01:54:05 +0200
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Michael Heerdegen <[email protected]> writes:

> Note the compiler generates warnings for the expanded code - and above
> the warning is (only) about the first `format' call.  You can interpret
> it as a warning about a partially poorly written macro.

I have investigated some background for you.  Only few sexps would
generate the same warning in this case:

The crucial properties of the `format' form here are "side effect free"
and that it fulfills `byte-compile-trueconstp'.  The latter means that
the byte compiler indeed has a test for forms that are guaranteed to
eval to a non-nil value (tested by `byte-optimize-if').

So the warning is adequate and helpful IMO.  Maybe it could be more
precise to be helpful - OTOH I don't think the wording of the warning
would have helped Drew.


Michael.