diff options
author | Martin Uecker <uecker@tugraz.at> | 2025-06-09 18:48:43 +0200 |
---|---|---|
committer | Martin Uecker <uecker@gcc.gnu.org> | 2025-06-11 22:27:44 +0200 |
commit | 0ede0508cc6e249f6759ac1e51b34d0e905eae80 (patch) | |
tree | 209a6f3bb0cd1be8b0853a7328a2b26a5dfdf1b3 /libgcobol | |
parent | 582dda08eabc8f7dc9c504c0010d778bd6ff09b2 (diff) | |
download | gcc-master.zip gcc-master.tar.gz gcc-master.tar.bz2 |
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.
Diffstat (limited to 'libgcobol')
0 files changed, 0 insertions, 0 deletions