develooper Front page | perl.perl5.changes | Postings from March 2023

[Perl/perl5] 095fd9: report uninit variable name even in optimizedcases

mauke via perl5-changes
March 23, 2023 23:56
[Perl/perl5] 095fd9: report uninit variable name even in optimizedcases
Message ID:
  Branch: refs/heads/blead
  Commit: 095fd90e6ff7791c309ef4175edebb2295e5ea04
  Author: Lukas Mai <>
  Date:   2023-03-24 (Fri, 24 Mar 2023)

  Changed paths:
    M sv.c
    M t/lib/warnings/9uninit

  Log Message:
  report uninit variable name even in optimized cases

Several cases that used to be simple assignment ops with lexical
variables have been optimized in some way:

 - $foo = undef is now a single OP_UNDEF with special flags
 - $foo = ... is now a single OP_PADSV_STORE
 - $foo[0] = ... is now a single OP_AELEMFASTLEX_STORE

This is mostly transparent to users, except for "Use of uninitialized
value" warnings, which previously mentioned the name of the undefined
variable, but don't do so anymore in blead.

This commit teaches find_uninit_var() about the new ops, so error
messages for these ops can mention variable names again.

Fixes #20945. Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About