Skip to content

Conversation

@mauke
Copy link
Contributor

@mauke mauke commented Dec 26, 2025

... which results from the compiler being unable to prove that the switch is exhaustive, which it is indeed not.

This one:

In file included from perl.h:7973,
                 from pp_ctl.c:35:
In function ‘Perl_SvREFCNT_dec’,
    inlined from ‘Perl_cx_poploop’ at inline.h:4194:13:
sv_inline.h:689:8: warning: ‘oldsv’ may be used uninitialized [-Wmaybe-uninitialized]
  689 |     if (LIKELY(sv != NULL)) {
      |        ^
In file included from perl.h:7972:
inline.h: In function ‘Perl_cx_poploop’:
inline.h:4172:17: note: ‘oldsv’ was declared here
 4172 |             SV *oldsv;
      |                 ^~~~~

Fixes #24033.


  • This set of changes does not require a perldelta entry.

... which results from the compiler being unable to prove that the
switch is exhaustive, which it is indeed not.

This one:

    In file included from perl.h:7973,
                     from pp_ctl.c:35:
    In function ‘Perl_SvREFCNT_dec’,
        inlined from ‘Perl_cx_poploop’ at inline.h:4194:13:
    sv_inline.h:689:8: warning: ‘oldsv’ may be used uninitialized [-Wmaybe-uninitialized]
      689 |     if (LIKELY(sv != NULL)) {
          |        ^
    In file included from perl.h:7972:
    inline.h: In function ‘Perl_cx_poploop’:
    inline.h:4172:17: note: ‘oldsv’ was declared here
     4172 |             SV *oldsv;
          |                 ^~~~~

Fixes Perl#24033.
@jkeenan
Copy link
Contributor

jkeenan commented Dec 26, 2025

Eliminates the build-time warning reported in GH #24033.

$ report-build-warnings ba692baf08.linux.unthreaded.mauke.maketp.output.txt.gz 
File:  ba692baf08.linux.unthreaded.mauke.maketp.output.txt.gz


LGTM -- but IANACP so would benefit from an additional set of eyeballs on the C code.

@mauke mauke merged commit 3b8e22d into Perl:blead Dec 28, 2025
34 checks passed
@mauke mauke deleted the fix-24033-uninit-warning branch December 28, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

059a773b00 introduced new build-time warning

3 participants