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

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

Thread Previous
From:
Tony Cook via RT
Date:
August 26, 2019 02:15
Subject:
[perl #134363] Odd warning in simple XSub (-Dusequadmath buildsonly)
Message ID:
rt-4.0.24-19550-1566785697-89.134363-15-0@perl.org
On Mon, 19 Aug 2019 23:44:18 -0700, sisyphus359@gmail.com wrote:
> OS is Ubuntu-18.04, current compiler is gcc-7.4.0.
> I can't find a -Dusequadmath build on the system that doesn't issue
> the
> warning.
> I've tested:
> (v5.31.2) built for x86_64-linux-quadmath
> (v5.30.0) built for x86_64-linux-quadmath
> (v5.28.0) built for x86_64-linux-quadmath
> (v5.26.0) built for x86_64-linux-thread-multi-quadmath
> (v5.24.0) built for x86_64-linux-thread-multi-quadmath
> (v5.22.0) built for x86_64-linux-thread-multi-quadmath

What I think is happening, is somehow, -Wformat is enabled by default on your gcc, similarly for James.

I don't see anything in the gcc release notes indicating that it was turned on by default, but it may have been omitted.

While building perl with a quadmath build, the build of perl itself and the bundled modules includes a -Wno-format, since gcc's -Wformat checks don't understand the Q size modifier.

This addition of -Wno-format isn't used while building CPAN modules after perl is installed though, so you see the warnings.

If you want to check if format warnings are on by default, try building this code:

#include <stdio.h>

extern __float128 x;

void f(void) {
    printf("%Qf", x);
}

with:

cc -c test.c

which doesn't warn here with gcc 6.3.0.

Tony

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

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