develooper Front page | perl.perl5.porters | Postings from August 2019

[perl #134363] Odd warning in simple XSub (-Dusequadmath buildsonly)

Thread Previous
From:
sisyphus
Date:
August 15, 2019 05:22
Subject:
[perl #134363] Odd warning in simple XSub (-Dusequadmath buildsonly)
Message ID:
rt-4.0.24-4037-1565846516-659.134363-75-0@perl.org
# New Ticket Created by  sisyphus 
# Please include the string:  [perl #134363]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=134363 >


Hi,

The Inline::C demo script:

#####################
use warnings;
use Devel::Peek;
use Inline C => Config =>
 BUILD_NOISY => 1,
 USING => 'ParseRegExp',
;
use Inline C => <<'EOC';
void foo(NV val) {
  printf("%.15" NVgf, val);
}
EOC
foo(sqrt(3));
#####################

On my -Dusequadmath build of perl-5.30.0 I get the following warning during
the compilation stage:

try_pl_0ea3.xs: In function ‘foo’:
try_pl_0ea3.xs:7:10: warning: unknown conversion type character ‘Q’ in
format [-Wformat=]
   printf("%.15" NVgf, val);
          ^~~~~~
try_pl_0ea3.xs:7:10: warning: too many arguments for format
[-Wformat-extra-arg ]

Upon compilation the script then runs successfully.

I noticed the same warning building Scalar-List-Utils-1.51 on the same
build of perl.
In that instance it was triggered by identical formatting in ListUtil.xs

The same code compiles without warning on non-quadmath builds of perl-5.30.0

Cheers,
Rob


Thread Previous


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