From mboxrd@z Thu Jan 1 00:00:00 1970 Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Raise expressions from AARM. Date: Mon, 26 Feb 2024 22:01:23 +0200 Organization: Tidorum Ltd Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net Bfxuc1SPmeN3g4kDe0UTNQIkh7m1R5InalsM8BZd/Q0YDPZaJJ Cancel-Lock: sha1:cZqKD1wtrYL23BZ/eHXKWutZQdE= sha256:ntP7vPgSZDP4AdPzNZQwrtOvPy1APGnnxSues9Ks1D0= User-Agent: Mozilla Thunderbird Content-Language: en-US In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:66125 List-Id: On 2024-02-25 13:23, Blady wrote: > Le 24/02/2024 à 11:39, Niklas Holsti a écrit : >> The point of these examples (which are only in the discussion >> annotation, not in the normative standard) is to discuss what is >> syntactically legal and why. The examples need not make practical sense. > > Well, despite I knew that, I wanted to draw some use cases from them. > For instance: >   A : A_Tagged   := (Some_Tagged'(raise TBD_Error) with Comp => 'A'); > It will raise TBD_Error if Some_Tagged is not a null record, good to > know, isn't it? Hm, not raising the exception for a null record seems weird to me, and I cannot deduce it from the RM. Moreover, for a plain qualified expression Some_Tagged'(raise TBD_Error) not in an extension aggregate GNAT raises the exception even if the type is a null record. I suspect that not raising the exception for an extension aggregate where the ancestor type is a null record is a bug in GNAT.