develooper Front page | perl.perl5.porters | Postings from September 2018

[perl #131388] g++ vs subnormals in 5.26.0

Thread Previous
From: via RT
September 12, 2018 02:11
[perl #131388] g++ vs subnormals in 5.26.0
Message ID:
On Wed, 05 Sep 2018 19:25:55 -0700, jkeenan wrote:

> One other consideration:  Your patch added no new tests, though we
> just reverted the TODO-ing of some older tests.  It may be the case --
> I haven't really followed the details of this RT that closely -- that
> to fully resolve the problem we need to write *new* tests.  If so, we
> should add them to this branch and do additional smoke testing.

I suppose, to be thorough, we should also be performing similar tests for subnormal NV values on -Duselongdouble and -Dusequadmath builds.

I'll work on patching the blead version of sprintf2.t to do this - and to also incorporate Dave's suggestion re converting the TODO into actual tests.

Attached is try.c which, when built with 'g++ -ansi' demonstrates the problem - and also demonstrates that the cast to double fixes the issue.

I asked about the validity of the way that 'g++ -ansi' handled that script on the gcc-help mailing list (see
The responses were not exactly definitive, but I gathered it was felt that there was no immediate need to alter the way that g++ was doing anything.

As a result of that thread, I did begin to wonder why it is that g++ builds of perl invoke the '-ansi' switch (which is actually equivalent to '-std=c++89').
Is this setting something that's easily configured differently ?

It also seemed strange that, having built perl with 'g++ -ansi', any XS modules subsequently installed, will be built without the '-ansi' switch.


via perlbug:  queue: perl5 status: open

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About