<div dir="ltr"><div dir="ltr">On Fri, 8 May 2020 at 00:09, Jeffrey Walton via cfe-users <<a href="mailto:cfe-users@lists.llvm.org">cfe-users@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Everyone,<br>
<br>
I'm testing Steven Munroe's pveclib library<br>
(<a href="https://github.com/munroesj52/pveclib" rel="noreferrer" target="_blank">https://github.com/munroesj52/pveclib</a>). It is testing OK with GCC,<br>
but I am having trouble with Clang.<br>
<br>
I've been able to test up to Clang 9 and with/without -std=c11, but I<br>
keep encountering two errors:<br>
<br>
    decpowof2.c:30:7: error: GNU decimal type extension not supported<br>
        const _Decimal128 decpowof2 [] = {<br>
<br>
    decpowof2.c:31:8: error: invalid suffix 'DL' on floating constant<br>
        1.0E+0DL,       /* 2**0 */<br>
<br>
I believe _Decimal128 and the DL suffixes are part of ISO/IEC TS 18661<br>
or N2341 (<a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2341.pdf" rel="noreferrer" target="_blank">http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2341.pdf</a>).<br></blockquote><div><br></div><div>Clang does not implement ISO/IEC TS 18661-2 (decimal floating point).</div><div><br></div><div>It seems like a bug that our diagnostic claims this is a GNU extension, since it's an ISO Technical Specification, but otherwise the diagnostic is accurate. =(</div><div><br></div><div>We'd accept patches if you felt motivated to contribute an implementation, but a high-quality implementation would likely be a fair amount of work (LLVM has no support for decimal floating-point types yet).</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I think I am missing the right combination of Clang compiler and options.<br>
<br>
What compiler or options are needed for Clang?<br>
_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
</blockquote></div></div>