[swift-dev] long double usage in swift

Saleem Abdulrasool compnerd at compnerd.org
Wed Mar 23 16:29:50 CDT 2016


On Wed, Mar 23, 2016 at 2:28 PM, Alex Blewitt <alex.blewitt at gmail.com>
wrote:

> There’s a Float80 type, if you’re looking for an 80-bit floating point
> value.
>

Im explicitly trying to import a call from C through the clang-importer (to
ensure that long doubles are imported correctly).  As such, unfortunately,
I don't think that the use of Float80 is appropriate in this case.


> Alex
>
> > On 23 Mar 2016, at 21:25, Saleem Abdulrasool via swift-dev <
> swift-dev at swift.org> wrote:
> >
> > Hi,
> >
> > I was looking at an ABI related issue on Windows.  In trying to
> construct a test case, it seems that I am unable to import a declaration
> using a long double into swift.  I was wondering if there is something
> about long double usage in swift that I am unaware of.
> >
> > Inputs/abi.h:
> >
> > float fp32_call(void);
> > double fp64_call(void);
> > long double fp80_call(void);
> >
> > Inputs/module.map:
> >
> > module abi {
> >   header "abi.h"
> > }
> >
> > test.swift:
> >
> > %swift -I Inputs -parse %s
> > import abi
> >
> > @inline(never)
> > func blackhole<T>(t : T) { }
> >
> > func test_floating_point() {
> > }
> >
> > Thanks!
> >
> > --
> > Saleem Abdulrasool
> > compnerd (at) compnerd (dot) org
> > _______________________________________________
> > swift-dev mailing list
> > swift-dev at swift.org
> > https://lists.swift.org/mailman/listinfo/swift-dev
>
>


-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160323/0ca12dd4/attachment.html>


More information about the swift-dev mailing list