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

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

Thread Next
From:
Tony Cook via RT
Date:
August 20, 2019 06:05
Subject:
[perl #134363] Odd warning in simple XSub (-Dusequadmath buildsonly)
Message ID:
rt-4.0.24-32012-1566281102-111.134363-15-0@perl.org
On Wed, 14 Aug 2019 22:21:56 -0700, sisyphus359@gmail.com wrote:
> 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

Which operating system?  Which compiler?

Please include perl -V output when you report issues.

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=134363

Thread Next


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