https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18765

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marc Poulhi?s <[email protected]>:

https://gcc.gnu.org/g:3b694271bec01ed971147a0f4cb68d8c9a7d0915

commit r15-6731-g3b694271bec01ed971147a0f4cb68d8c9a7d0915
Author: Eric Botcazou <[email protected]>
Date:   Sun Jan 5 17:34:41 2025 +0100

    ada: Fix missing detection of late equality operator returning subtype of
Boolean

    In Ada 2012, the compiler fails to check that a primitive equality operator
    for an untagged record type must appear before the type is frozen, when the
    operator returns a subtype of Boolean.  This plugs the legality loophole
but
    adds the debug switch -gnatd_q to go back to the previous state.

    gcc/ada/ChangeLog:

            PR ada/18765
            * debug.adb (d_q): Document new usage.
            * sem_ch6.adb (New_Overloaded_Entity): Apply the special processing
            to all equality operators whose base result type is Boolean, but do
            not enforce the new Ada 2012 freezing rule if the result type is a
            proper subtype of it and the -gnatd_q switch is specified.
  • [Bug ada/18765] illegal program... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to