Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: 02c58b77b46d18e37fcdb8b57a26ca46b367ffb5
https://github.com/Perl/perl5/commit/02c58b77b46d18e37fcdb8b57a26ca46b367ffb5
Author: Karl Williamson <[email protected]>
Date: 2026-09-16 (Wed, 16 Sep 2026)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M perl.h
M proto.h
M regen/embed.pl
Log Message:
-----------
Allow declaring a parameter unused when not DEBUGGING
This is a follow on to b35a6ea61ae020705a7132331e14646f84592da5 which
adds the ability to decare a parameter to be unused. This new commit
makes it convenient to declare a parameter to be DEBUG_ONLY, allowing
the removal of PERL_UNUSED_ARG statements in the code that the previous
commit didn't.
And this commit removes two related such statements, to show how it
works.
The purpose of PERL_UNUSED_ARG is to avoid expected warnings that are
known harmless, without turning off all warnings of that kind. It is
possible to use that macro when there are actual uses of the parameter,
thus defeating the macro's purpose to some extent. This is typically
done when some Configure options cause the parameter to be used, and
some do not, and the author didn't want to add the extra #ifdef's
required to get the macro to be in effect in just the precise
conditions. After all, there's added complexity in the code for both
the author and future readers that can obscure the basic logic, with not
that much gain.
But, the most common case where the parameter is only used in some
Configurations is in DEBUGGING builds. This commit handles this common
case. It is a simple extension to
b35a6ea61ae020705a7132331e14646f84592da5, to whose commit message you
are referred to the details.
This is enabled only for core perl and extensions.
To use this capability, the symbol DEBUG_ONLY is added after the
parameter name in *both* its embed.fnc entry and its definition.
To unsubscribe from these emails, change your notification settings at
https://github.com/Perl/perl5/settings/notifications