On Wed, 11 Jun 2025, Uecker, Martin wrote:

>     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.

OK.

-- 
Joseph S. Myers
josmy...@redhat.com

Reply via email to