This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/64509] _Generic throws error in unselected generic association


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() ?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]