[cfe-users] _Decimal128 on PowerPC

Richard Smith via cfe-users cfe-users at lists.llvm.org
Tue May 26 12:09:08 PDT 2020

On Fri, 8 May 2020 at 00:09, Jeffrey Walton via cfe-users <
cfe-users at lists.llvm.org> wrote:

> Hi Everyone,
> I'm testing Steven Munroe's pveclib library
> (https://github.com/munroesj52/pveclib). It is testing OK with GCC,
> but I am having trouble with Clang.
> I've been able to test up to Clang 9 and with/without -std=c11, but I
> keep encountering two errors:
>     decpowof2.c:30:7: error: GNU decimal type extension not supported
>         const _Decimal128 decpowof2 [] = {
>     decpowof2.c:31:8: error: invalid suffix 'DL' on floating constant
>         1.0E+0DL,       /* 2**0 */
> I believe _Decimal128 and the DL suffixes are part of ISO/IEC TS 18661
> or N2341 (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2341.pdf).

Clang does not implement ISO/IEC TS 18661-2 (decimal floating point).

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. =(

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).

I think I am missing the right combination of Clang compiler and options.
> What compiler or options are needed for Clang?
> _______________________________________________
> cfe-users mailing list
> cfe-users at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20200526/bc7bdebd/attachment.html>

More information about the cfe-users mailing list