develooper Front page | perl.perl5.changes | Postings from November 2021

[Perl/perl5] 307fbd: builtin.c: Fix C++ compilation errors

From:
Dagfinn Ilmari Mannsåker via perl5-changes
Date:
November 30, 2021 16:11
Subject:
[Perl/perl5] 307fbd: builtin.c: Fix C++ compilation errors
Message ID:
Perl/perl5/push/refs/heads/fix-builtin-c-plus-plus-goto/000000-307fbd@github.com
  Branch: refs/heads/fix-builtin-c-plus-plus-goto

  Home:   https://github.com/Perl/perl5

  Commit: 307fbd635db764a3df36aec4c5a74364f2268f72

      https://github.com/Perl/perl5/commit/307fbd635db764a3df36aec4c5a74364f2268f72

  Author: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>

  Date:   2021-11-30 (Tue, 30 Nov 2021)



  Changed paths:

    M builtin.c



  Log Message:

  -----------

  builtin.c: Fix C++ compilation errors



C++ does not allow `goto` across initalisations of variables that are

in scope at the label, so just get rid of the `goto`.



An alternative would be to start a new scope after the first `goto`,

so that the variables aren't in scope any more at the label, but I

think this is neater.








nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About