cxa_demangle for long double / float80


I'm hitting another issue on libcxxabi:

libcxxabi :: test_demangle:

_ZN5test01hIfEEvRAcvjplstT_Le4001a000000000000000E_c should be invalid
but is not
got status = 0
void test2(): Assertion `status == -2' failed.

AFAICS, "e" is either "long double" or, on Intel, "float80", so that
string should not be invalid on any architecture.

I try that on c++filt on ARM and AArch64 and both returned the
"correct" demangling:

void test0::h<float>(char (&) [(unsigned int)((sizeof (float))+((long

Also, looking at libcxxabi::parse_builtin_type, there is no
distinction between long double and float80 in the switch, hinting me
that this macro is wrong:

// Is long double fp80? (Only x87 extended double has 64-bit mantissa)
#define LDBL_FP80 (__LDBL_MANT_DIG__ == 64)
#if !LDBL_FP80

is wrong.

If this was turned on because of x86 32-bits, shouldn't we restrict
that to x86 only? Instead of any 64-bit architecture?

Or am I missing something?