Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: e773d1fdd35a4d5836e0f1d7bedaf5b62ea94bbc
      
https://github.com/Perl/perl5/commit/e773d1fdd35a4d5836e0f1d7bedaf5b62ea94bbc
  Author: Karl Williamson <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M regen/embed.pl

  Log Message:
  -----------
  regen/embed.pl: White-space only

Properly vertically align two lines


  Commit: 62f927d8ae21f2d0ff83c13c26d72bbaba71ecba
      
https://github.com/Perl/perl5/commit/62f927d8ae21f2d0ff83c13c26d72bbaba71ecba
  Author: Karl Williamson <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  perlapi: Clarify and correct some PERL_UNUSED_foo pod

These all use nearly identical wording, that this clarifies a bit.

And it turns out that the unused parameter message for the context
parameter that is emitted by some compilers has always been suppressed
by Perl for compilers that understand _attribute__((unused)).  These are
currently gcc and clang.


  Commit: f27d69df9758e4d92d0c476abaa68d743765dbb0
      
https://github.com/Perl/perl5/commit/f27d69df9758e4d92d0c476abaa68d743765dbb0
  Author: Karl Williamson <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  perlapi: Update PERL_UNUSED_ARG entry

This expands the pod for this, accounting for the recent changes for
allowing an UNUSED modifier to arguments in function prototypes.


  Commit: 030423513b2a4e1a5efbafa4812097358c109691
      
https://github.com/Perl/perl5/commit/030423513b2a4e1a5efbafa4812097358c109691
  Author: Karl Williamson <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M proto.h
    M regen/embed.pl

  Log Message:
  -----------
  Make PERL_UNUSED_CONTEXT redundant for proto.h functions

Since 2001 in gcc-compatible compilers, perl has automatically
suppressed warnings from the compiler that the context (aTHX)
parameter is unused in the called function.  One is supposed to
manually add calls to PERL_UNUSED_CONTEXT to suppress these messages for
other compilers.

The simple change in this commit extends the new mechanism introduced in
b35a6ea61ae020705a7132331e14646f84592da5 to automatically suppress these
messages in all compilers for all functions declared in proto.h.  This
makes the calls to PERL_UNUSED_CONTEXT redundant in such functions; the
next commit removes these.  The way it works is that the generated
PERL_ARGS_ASSERT macro for each function now includes a call to the
equivalent of PERL_UNUSED_CONTEXT for non-gcc compilers.

PERL_UNUSED_CONTEXT is unchanged, for use with functions not in proto.h

Commit 24e8e624 in 2001 added the gcc suppression. I infer from the
commit message that gcc was starting to output these messages.  This
commit leaves that unchanged.

PERL_UNUSED_CONTEXT first appeared in 2006, in
96a5add60f1f39d38341c09c11f0542e68f782b0, with no explanation as to why.
I'm sure it was created to suppress these messages on other compilers.


  Commit: 54e21a31ad1200f4305d4e90b2154ab9994ddf39
      
https://github.com/Perl/perl5/commit/54e21a31ad1200f4305d4e90b2154ab9994ddf39
  Author: Karl Williamson <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M deb.c
    M doio.c
    M gv.c
    M hv.c
    M inline.h
    M invlist_inline.h
    M mathoms.c
    M mg.c
    M mro_core.c
    M op.c
    M perl.c
    M pp_ctl.c
    M reentr.c
    M regcomp.c
    M regcomp_debug.c
    M regcomp_trie.c
    M regen/reentr.pl
    M scope.c
    M sv.c
    M sv_inline.h
    M toke.c
    M utf8.c
    M util.c

  Log Message:
  -----------
  Remove now redundant calls to PERL_UNUSED_CONTEXT

The previous commit extended the automatic suppression of warnings about
the aTHX parameter being unused to all compilers for all functions that
have a proto.h entry (which all functions in embed.fnc do).  This makes
any calls to PERL_UNUSED_CONTEXT redundant in such functions.

This commit removes those now redundant calls.  Besides removing code
clutter, an advantage is those calls now expand to nothing on compilers
where they aren't needed.

To determine which were redundant, I manually turned off the automatic
gcc suppression on a blead checkout, and then compiled with gcc.  The
result was hundreds of new messages about aTHX not being used.  Each one
of those messages indicates a missing PERL_UNUSED_CONTEXT call.

I then applied the previous commit and recompiled.  The messages went to
zero.  This indicates:

    a) that yes the mechanism does work; and
    b) all affected functions in core:
        1) actually have embed.fnc entries; or
        2) have #ifdefs that cause them to not be compiled on my box; or
        3) their aTHX argument is used on my box

I then removed all the calls to PERL_UNUSED_CONTEXT and did a
'git diff -W'.  Most of the removed ones were in a function that had a
PERL_ARGS_ASSERT macro, so removing them was correct.

For this commit, I added back the PERL_UNUSED_CONTEXT lines for those
functions that don't have PERL_ARGS_ASSERT calls.

I infer from the fact that there are hundreds of missing
PERL_UNUSED_CONTEXT calls that other compilers either don't emit such
messages, or we have turned off the option for them to emit them.

Turning on those messages now becomes feasible.

I note that platforms like vms, amiga, etc would raise warnings for
their specific functions in core.  Also, I note that the porting test
to make sure that functions have a PERL_ARGS_ASSERT call doesn't catch
cases where the same function name occurs in different guises in
different platforms.  For example, do_aspawn()


  Commit: c12754c9311433869658e8f8ba6bc0515a9d24ac
      
https://github.com/Perl/perl5/commit/c12754c9311433869658e8f8ba6bc0515a9d24ac
  Author: Karl Williamson <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M embed.fnc
    M mg.c
    M os2/os2ish.h
    M perl.h
    M proto.h

  Log Message:
  -----------
  Convert core PERL_UNUSED_DECL uses to more general scheme

There were only a handful of these.

PERL_UNUSED_DECL is only effective with gcc-compatible compilers, so to
get the full effect, one needed to also have PERL_UNUSED_ARG calls.

The scheme introduced in b35a6ea61ae020705a7132331e14646f84592da5 is
more general than this old one, working on all compilers, without
needing the extra calls.

Convert the few uses of the old mechanism to this new one, and prevent
the old scheme from being used in core.

And #undef it for core use, and update its comments and perlapi entry

The new ability to specify a parameter as UNUSED in embed.fnc and
prototypes results in cleaner code than using this.

And #undef it for core use, and update its comments and perlapi entry

The new ability to specify a parameter as UNUSED in embed.fnc and
prototypes results in cleaner code than using this.


  Commit: 22488e2f8c6db326185e50c00d3d672546ed8d61
      
https://github.com/Perl/perl5/commit/22488e2f8c6db326185e50c00d3d672546ed8d61
  Author: Karl Williamson <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M perl.h

  Log Message:
  -----------
  perl.h: Add comment about the pTHX definition


  Commit: 21c2bd3292d00d7b360507d73beadfe662d5edb0
      
https://github.com/Perl/perl5/commit/21c2bd3292d00d7b360507d73beadfe662d5edb0
  Author: Karl Williamson <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M embed.fnc
    M embed.h
    M mg.c
    M proto.h

  Log Message:
  -----------
  embed.fnc: Add entry for unblock_sigmask


  Commit: 5a20281c2aaba314e377859c42055678893537bb
      
https://github.com/Perl/perl5/commit/5a20281c2aaba314e377859c42055678893537bb
  Author: Karl Williamson <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M embed.fnc
    M embed.h
    M op.c
    M proto.h

  Log Message:
  -----------
  embed.pl: Add entry for is_dollar_bracket()


  Commit: 140fb0f8fffe87295ce65f2fc115b5f3718d3e5a
      
https://github.com/Perl/perl5/commit/140fb0f8fffe87295ce65f2fc115b5f3718d3e5a
  Author: Karl Williamson <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M embed.fnc
    M embed.h
    M op.c
    M proto.h

  Log Message:
  -----------
  embed.fnc: Add entry for io_hints()


  Commit: 00e12d3492007906be93e4d892fd8b0b0141b6c5
      
https://github.com/Perl/perl5/commit/00e12d3492007906be93e4d892fd8b0b0141b6c5
  Author: Karl Williamson <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M embed.fnc
    M embed.h
    M op.c
    M proto.h

  Log Message:
  -----------
  embed.fnc: Add entry for new_slab()


  Commit: c0d63ef82af2fe9dfe9a278dbf07045ed5f9e962
      
https://github.com/Perl/perl5/commit/c0d63ef82af2fe9dfe9a278dbf07045ed5f9e962
  Author: Karl Williamson <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M embed.fnc
    M embed.h
    M proto.h
    M regexec.c

  Log Message:
  -----------
  embed.fnc: Add entry for clear_offs_spare()


  Commit: 740de346149fa58304a4a8dba5e65667652651ad
      
https://github.com/Perl/perl5/commit/740de346149fa58304a4a8dba5e65667652651ad
  Author: Karl Williamson <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M embed.fnc
    M embed.h
    M proto.h
    M regcomp.c

  Log Message:
  -----------
  embed.fnc: Add entry for has_runtime_code()


  Commit: d3b82c16b6df35576162c0d1f9c9275d59605e3f
      
https://github.com/Perl/perl5/commit/d3b82c16b6df35576162c0d1f9c9275d59605e3f
  Author: Karl Williamson <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M embed.fnc
    M embed.h
    M inline.h
    M proto.h

  Log Message:
  -----------
  embed.fnc: Add entry for sv_isbool()

I noticed in doing this that sv_isbool() is undocumented, yet the API
element BOOL_INTERNALS_sv_isbool() says in perlapi that you should be
using sv_isbool() instead.


Compare: https://github.com/Perl/perl5/compare/6d67209b2a16...d3b82c16b6df

To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to