zygoloid wrote: A few datapoints: * uClibc [uses `__builtin_classify_type`](https://git.uclibc.org/uClibc/tree/include/tgmath.h) and it looks like that'd work fine for us. * newlib [uses `__builtin_choose_expr`](https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/tgmath.h;h=97dc50eaa11348822350c56e24d25ecdd4b0125b;hb=refs/heads/main) and it looks like that'd work fine for us. * FreeBSD [uses `_Generic`](https://svnweb.freebsd.org/base/head/include/tgmath.h?revision=326192&view=markup) and it looks like that'd work fine for us. * MUSL [uses `__typeof`](https://git.musl-libc.org/cgit/musl/tree/include/tgmath.h) (like glibc's fallback implementation) and it looks like that'd work fine for us. But notably... those all suck. Every one of them macro expands the arguments repeatedly (leading to exponential code size for deeply nested calls) and expands to a pretty huge macro invocation. The current Clang implementation is better than all of these. Maybe that's sufficient reason to keep it.
https://github.com/llvm/llvm-project/pull/135236 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits