From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.9 required=3.0 tests=BAYES_00,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R.Carter" Newsgroups: comp.lang.ada Subject: Re: Generic formal ">" Date: Wed, 26 Jan 2022 19:46:06 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 26 Jan 2022 18:46:06 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="1625313f3f97c0ea2ade76c1ca82823f"; logging-data="29450"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18wGXRtmsbiAizyJl/lyF6tQzbSGIZ60RU=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Cancel-Lock: sha1:y2yiBslOeRYDSwZilhisb/W67i0= In-Reply-To: Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:63403 List-Id: On 2022-01-26 17:54, Simon Wright wrote: > > GCC 10.1.0: > > Data'Length: 2 > Data'Length > 1: TRUE > Integer'(Data'Length) > 1: TRUE > Standard.">" (Data'Length, 1): TRUE > Standard.">" (Integer'(Data'Length), 1): TRUE > > GCC 11.1.0: > > Data'Length: 2 > Data'Length > 1: FALSE > Integer'(Data'Length) > 1: TRUE > Standard.">" (Data'Length, 1): FALSE > Standard.">" (Integer'(Data'Length), 1): TRUE This looks like an error introduced in V11. 'Length is universal_integer, which has no primitive subprograms. Within the generic, Element_Type and Integer are distinct types, and Element_Type is not a numeric type. So Data'Length should not be converted to Element_Type, and the ">" defined for Element_Type should not be invoked. This is also true for Integer'(Data'Length). -- Jeff Carter "Son of a window-dresser." Monty Python & the Holy Grail 12