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

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

Thread Previous | Thread Next
From:
Tony Cook via RT
Date:
August 27, 2019 01:25
Subject:
[perl #134363] Odd warning in simple XSub (-Dusequadmath buildsonly)
Message ID:
rt-4.0.24-30904-1566869133-273.134363-15-0@perl.org
On Mon, 26 Aug 2019 06:02:47 -0700, sisyphus359@gmail.com wrote:
> On Mon, 26 Aug 2019 02:14:57 GMT, tonyc wrote:
> 
> >  This addition of -Wno-format isn't used while building CPAN modules
> after perl is installed though, so you see the warnings.
> 
> Yes - that explains it. If I introduce the -Wno-format switch into the
> Inline::C build then the warning does not appear.
> What should be done about this ?
> Would it be unwise to add the -Wno-format flag to (say) ccflags, so
> that modules (and Inline::C scripts) are built with it ?
> Or is there a way to hide the offending "Q" from gcc ?
> 
> The warning makes me a little nervous. I've seen similar types of warnings
> on Windows, where they often signify that the formatting won't be done as
> intended.

Well, from a custom perl installation point of view you could add -Wno-format to ccflags.

Realise while this suppresses the unknown "Q" warnings, it will also suppress any other format issues (but except for __float128, you'll see those in non-quadmath builds.)

Ideally gcc would have pragmas to register new size/format specifiers to -Wformat, and quadmath would use those.  quadmath already uses the glibc mechanism to add format specifiers[1], so it seems like a reasonable extension.

It doesn't seem to have come up - the first hit for google C<gcc "wformat" "quadmath"> is this ticket.

Tony

[1] https://www.gnu.org/software/libc/manual/html_node/Customizing-Printf.html#Customizing-Printf

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

Thread Previous | 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