https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114959

--- Comment #2 from Martin Uecker <muecker at gwdg dot de> ---

The GCC FE has all the necessary logic to compute type compatibility and this
could easily be adapted to compute equivalence classes and then set a
TYPE_CANONICAL. All function types in the same class would get the same
TYPE_CANONICAL even if a little bit different, i.e. return pointers to
compatible but slightly different array types.   I think function arguments we
need to ignore completely, because 

T (*f)();

is compatible with all pointers to functions with the same return type. (this
is gone in C23 though) Or we special case such functions.

What is unclear to me whether function types are the only remaining issue or
whether this should then be done for all types (pointers, arrays, etc)?

Reply via email to