This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/64509] _Generic throws error in unselected generic association
- From: "maurits.de.jong at ericsson dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 07 Jan 2015 09:37:34 +0000
- Subject: [Bug c/64509] _Generic throws error in unselected generic association
- Auto-submitted: auto-generated
- References: <bug-64509-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64509
--- Comment #4 from Martien de Jong <maurits.de.jong at ericsson dot com> ---
I understand. What a shallow and ugly feature it is then. I think it can only
usefully be employed using a preprocessor macro, yet it is part of the
expression syntax. It is meant to resolve type issues, yet all variants
should be type-sane. You can indeed implement something like tgmath.h with it,
but only if the types can be implictly converted.
BTW, I notice that
./gcc/ginclude/tgmath.h
uses
__builtin_classify_type
__builtin_types_compatible_p
__builtin_choose_expr
Will it move to using _Generic() ?