https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120510
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Uecker <uec...@gcc.gnu.org>: https://gcc.gnu.org/g:0ede0508cc6e249f6759ac1e51b34d0e905eae80 commit r16-1425-g0ede0508cc6e249f6759ac1e51b34d0e905eae80 Author: Martin Uecker <uec...@tugraz.at> Date: Mon Jun 9 18:48:43 2025 +0200 c: remaining fix for the composite type inconsistency [PR120510] There is an old GNU extension which allows overriding the promoted old-style arguments when there is an earlier prototype An example (from a test added for PR16666) is the following. float dremf (float, float); float dremf (x, y) float x, y; { return x + y; } The types of the two declarations are not compatible, because the arguments are not self-promoting. Add a special case to function_types_compatible_p that can be toggled via a flag for comptypes_internal and add a helper function to be able to add the checking assertions to composite_type. PR c/120510 gcc/c/ChangeLog: * c-typeck.cc (composite_type_internal): Activate checking assertions for all types and also inputs. (comptypes_for_composite_check): New helper function. (function_types_compatible_p): Add exception. gcc/testsuite/ChangeLog: * gcc.dg/old-style-prom-4.c: New test.