<div dir="ltr">On Wed, Mar 23, 2016 at 2:35 PM, Alex Blewitt <span dir="ltr">&lt;<a href="mailto:alex.blewitt@gmail.com" target="_blank">alex.blewitt@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Why not?<div><br></div><div><a href="https://github.com/apple/swift/blob/8d9ef80304d7b36e13619ea50e6e76f3ec9221ba/test/Inputs/clang-importer-sdk/usr/include/ctypes.h#L146" target="_blank">https://github.com/apple/swift/blob/8d9ef80304d7b36e13619ea50e6e76f3ec9221ba/test/Inputs/clang-importer-sdk/usr/include/ctypes.h#L146</a></div></div></blockquote><div><br></div><div><br></div><div>AIUI, Float80 isn&#39;t exactly applicable to this test (since I want an explicit long double to be imported, not whatever the representation of FP80 happens to be).  However, thanks for that pointer, it was able to help me with my issue.  It seems that the clang importer explicitly excludes the long double type from being mapped.  Since long double is made illegal, the decl is pruned from the generated module, resulting in the unresolved reference.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="h5"><div><div><blockquote type="cite"><div>On 23 Mar 2016, at 21:29, Saleem Abdulrasool &lt;<a href="mailto:compnerd@compnerd.org" target="_blank">compnerd@compnerd.org</a>&gt; wrote:</div><br><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">On Wed, Mar 23, 2016 at 2:28 PM, Alex Blewitt<span> </span><span dir="ltr">&lt;<a href="mailto:alex.blewitt@gmail.com" target="_blank">alex.blewitt@gmail.com</a>&gt;</span><span> </span>wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">There’s a Float80 type, if you’re looking for an 80-bit floating point value.<br></blockquote><div><br></div><div>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&#39;t think that the use of Float80 is appropriate in this case.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Alex<br><div><div><br>&gt; On 23 Mar 2016, at 21:25, Saleem Abdulrasool via swift-dev &lt;<a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a>&gt; wrote:<br>&gt;<br>&gt; Hi,<br>&gt;<br>&gt; 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.<br>&gt;<br>&gt; Inputs/abi.h:<br>&gt;<br>&gt; float fp32_call(void);<br>&gt; double fp64_call(void);<br>&gt; long double fp80_call(void);<br>&gt;<br>&gt; Inputs/module.map:<br>&gt;<br>&gt; module abi {<br>&gt;   header &quot;abi.h&quot;<br>&gt; }<br>&gt;<br>&gt; test.swift:<br>&gt;<br>&gt; %swift -I Inputs -parse %s<br>&gt; import abi<br>&gt;<br>&gt; @inline(never)<br>&gt; func blackhole&lt;T&gt;(t : T) { }<br>&gt;<br>&gt; func test_floating_point() {<br>&gt; }<br>&gt;<br>&gt; Thanks!<br>&gt;<br>&gt; --<br>&gt; Saleem Abdulrasool<br>&gt; compnerd (at) compnerd (dot) org<br></div></div>&gt; _______________________________________________<br>&gt; swift-dev mailing list<br>&gt;<span> </span><a href="mailto:swift-dev@swift.org" target="_blank">swift-dev@swift.org</a><br>&gt;<span> </span><a href="https://lists.swift.org/mailman/listinfo/swift-dev" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-dev</a><br><br></blockquote></div><br><br clear="all"><div><br></div>--<span> </span><br><div>Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org</div></div></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org</div>
</div></div>