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

[Perl/perl5] 3472c1: quadmath: handle long doubles supplied viava_args...

From:
Tony Cook via perl5-changes
Date:
March 29, 2021 23:59
Subject:
[Perl/perl5] 3472c1: quadmath: handle long doubles supplied viava_args...
Message ID:
Perl/perl5/push/refs/heads/blead/4e82c8-3472c1@github.com
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 3472c1f6c5f15cb5047171d5a70ef37eccb023ab
      https://github.com/Perl/perl5/commit/3472c1f6c5f15cb5047171d5a70ef37eccb023ab
  Author: Tony Cook <tony@develop-help.com>
  Date:   2021-03-30 (Tue, 30 Mar 2021)

  Changed paths:
    M ext/XS-APItest/APItest.pm
    M ext/XS-APItest/APItest.xs
    M ext/XS-APItest/t/printf.t
    M sv.c

  Log Message:
  -----------
  quadmath: handle long doubles supplied via va_args in sv_vcatpvfn_flags()

All of perl's printf() style processing meets up in sv_vcatpvfn_flags()
which had three problems when dealing with long double parameters.

1) both the long double (L and q) and __float128 flags (Q) were
converted to the internal long double flag

2) the internal long double flag was then always treated as a __float128
parameter.

3) the non-Q format string was then passed to my_snprintf(), which
throws an exception on non-Q floating point formats, which meant that
C/XS code printing doubles or long doubles in a quadmath built would
throw an exception.





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