Bug 117220 - Use isnan instead of x != x when possible
Summary: Use isnan instead of x != x when possible
Status: RESOLVED FIXED
Alias: None
Product: cppunit
Classification: Unclassified
Component: General (show other bugs)
Version:
(earliest affected)
1.12
Hardware: x86 (IA32) other
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-25 07:44 UTC by Felix Ramold
Modified: 2018-05-23 07:27 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Patch on brnach feature/cmake (2.09 KB, application/mbox)
2018-04-25 07:44 UTC, Felix Ramold
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Ramold 2018-04-25 07:44:16 UTC
Created attachment 141620 [details]
Patch on brnach feature/cmake

Windriver (VxWorks) compiler creates wrong opcode out of x != x which triggers an exception. This may occur on other platforms too!

Therfore i propose the patch in the attachment.

Note: This patch applies to the feature/cmake branch. Sadly i cannot provide an patch for the automake version, since i cannot code automake. However, it should be similiar.
As the cmake branch is unmaintained, can you please also "mainline" this?
Comment 1 Xisco Faulí 2018-04-25 10:06:09 UTC
Dear Felix Ramold,
Thanks for the patch.
Could you please submit it to gerrit as described here:
https://wiki.documentfoundation.org/Development/gerrit/SubmitPatch?
Comment 2 Markus Mohrhard 2018-04-25 10:34:10 UTC
I'm actually fine with cppunit patches in bugzilla. I'll take care of the patch.
Comment 3 Xisco Faulí 2018-04-25 12:37:16 UTC
Moving to NEW then
Comment 4 Markus Mohrhard 2018-05-23 00:10:27 UTC
Thanks a lot for making me aware of the problem.

This has now been resolved in master by switching to C++11's std::isnan and std::isfinite.

https://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=fd7111241a90b00eed45c7fb847101c732b9df83
Comment 5 Felix Ramold 2018-05-23 07:27:28 UTC
Embedded Compilers we use dont support C++11! This might be a showstopper for the next version.