Hi Everyone,
I'm testing Steven Munroe's pveclib library
(GitHub - munroesj52/pveclib: Power Vector Library). 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).
I think I am missing the right combination of Clang compiler and options.
What compiler or options are needed for Clang?
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).