On Tue, 3 Oct 2017, Bernd Edlinger wrote: > invalid, also if both function types have a non-null TYPE_ARG_TYPES > I would say this deserves a warning. As an exception I have
I'm not convinced by the TYPE_ARG_TYPES check, at least for C. In C, unprototyped function types are not compatible with variadic function types or functions with argument types changed by default argument promotions (that is, int () and int (char) and int (int, ...) are all incompatible). I'd think it appropriate to warn about such conversions, given that they are cases where calling the converted function has undefined behavior. There may well be cases of interfaces where void (*) (void) is used as a generic function pointer type (always converted to / from the actual type of the function in question), for which this warning would not be suitable. -- Joseph S. Myers jos...@codesourcery.com