This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Minor improvement to typeclass.h
Andreas Jaeger <aj@suse.de> writes:
>> I tried getting rid of this header when I was doing compile-time type
>> reflection/introspection on Gaby's now-dead branch. It turned out that
>> glibc used it for some twisted purpose, even though gcc doesn't.
>
> I just did a grep through the current glibc sources and see no
> references to typeclass.h at all. Especially tgmath.h does not
> include it. It might be that tgmath.h could be written in a better
> way with typeclass...
I was unclear. glibc tgmath.h uses __builtin_classify_type. It
doesn't use typeclass.h (nor could it - gcc doesn't install it);
it has hardwired numeric constants for the builtin's return value.
Y'all might find __builtin_types_compatible_p a useable replacement,
but I can't be sure. (Take a look at gcc/config/rs6000/altivec.h for
example usage.)
zw