In that respect, when the XS code is compiled, the C compiler probably is yelling about it.
I've looked for a proper way of pursuading XS to display warnings produced by the C compiler without success. I generally resort to adding an obviously fatal error at the end of the inline C--a # in column one of the last line works:). When the fatal error is reported, you also get to see all the warning errors that were previously kept hidden from you.
*I'm not sure whether you want it to be your perl code, the XS-precompiler or the Inline generated wrappper stubs, or the C-code?
For any given processor, or rather for a given real format, that would be a fairly simple operation. Just requiring a bit mask of the appropriate bits of the long double to check.
For IEEE representation, you should be able to work out the appropriate bytes/bits to mask from IEEE 754 80-bit Extended double (long double) to 64-bit double unpack.
Doing it such that it would be portable across platforms that don't use IEEE format reals could be a lot harder.
In reply to Re: XS, C doubles and -Duselongdouble
by BrowserUk
in thread XS, C doubles and -Duselongdouble
by syphilis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |