https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109835
--- Comment #2 from Sam James <sjames at gcc dot gnu.org> --- Okay, fair point, I gave examples but not *motivating* examples. I have some non-harmless examples: 1. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e0e5c4d289004fa779c86da9319cf2bb18548b1 (a nasty one) 2. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71ae0b143a55fd45d4fd56cff13438cdbc602089 (sort example) 3. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=996809c0e52057ec8e5f32dd1d9f8f9bea559c18 (interesting example wrt attributes) 4. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=573dae0ef553e180e7f5c85a333adce34237f59b (completely wrong) I can dig some more for general examples I've seen, but I tried to pick out those above w/ different characteristics. I've seen a lot of e.g. qsort mismatched signatures but struggled for a bit with finding ABI concerns (SA I feel is something which is hard to manifest as a problem here because you need that "second order" manipulation which isn't that common.) But David Seifert (cc'd) came up with this wrt ABI: ``` #include <stdio.h> void fun(long long x, long long y) { printf("x = %lld, y = %lld\n", x, y); } void (*fun_ptr)(int, int) = fun; int main() { int x = 1; int y = 2; fun_ptr(x, y); } ``` ... which gives different results on x86_64-unknown-linux-gnu vs x86_64-unknown-linux-gnu -m32, but the only warning you get is -Wincompatible-pointer-types with GCC, rather than anything about the mismatch. I'll spend some more time reviewing -Wincompatible-pointer-types results when used on a global build but the last time I tried, it was unreasonably noisy given the other work we have ahead of us.