]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Spurious warning on untagged record type equality
authorJavier Miranda <miranda@adacore.com>
Thu, 27 Nov 2025 17:56:08 +0000 (17:56 +0000)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 9 Jan 2026 10:57:13 +0000 (11:57 +0100)
commit3e26e2677c0085b7db2d269fd2839d55dab3300c
treece99caaaaa291a01c982c15ea9f99d65740e71b6
parenta929418aa211a8f12a57d96368dcc1ba2505f079
ada: Spurious warning on untagged record type equality

The frontend reports a spurious warning when the type of some
component of an untagged record type is a private record type
that has an user-defined equality operator and the sources
are compiled enabling warnings for ignored equality operators
(that is, switch -gnatdw_q).

The warning is spurious because it must not be reported when
the full type declaration of the private type is a record type.

gcc/ada/ChangeLog:

* exp_ch3.adb (Build_Untagged_Record_Equality): Add missing
support for incomplete and private types.
gcc/ada/exp_ch3.adb