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

--- Comment #2 from Urs Maurer <[email protected]> ---
(In reply to Eric Botcazou from comment #1)
> The first example is illegal per the RM 4.3.5(6/6) rule, which has replaced
> the RM 4.3.5(6/5) rule:
> "The name specified for Empty for an Aggregate aspect shall denote exactly
> one function with a result type of the container type that has no
> parameters, or that has one in parameter of a signed integer type."
> 
> The second example is illegal per the RM 4.3.5(12/5) rule:
> "The Aggregate aspect is nonoverridable."
> because Ada.Containers.Vectors already has the Aggregate aspect and
> Add_Unnamed is not fully conformant with the one declared for it.
> 
> See http://www.ada-auth.org/standards/22rm_w_amd1/html/RM-TOC.html

Thank you for the detailed explanation and for pointing me to the Ada 2022
Reference Manual with Amendment 1.

My examples were based on the original Ada 2022 Reference Manual, so I was not
aware of the changes introduced by Amendment 1. Your references to RM
4.3.5(6/6) and to the nonoverridable nature of the `Aggregate` aspect (RM
4.3.5(12/5)) explain why both examples are now illegal.

Although this was not the outcome I had expected, I now understand the reason
for the different behaviour between GNAT Pro 23.0 / GNAT 14.2 and GNAT 15.2.

Thank you for your time and for the clear explanation.

Reply via email to