comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Subject: Re: Generic formal ">"
Date: Wed, 26 Jan 2022 19:46:06 +0100	[thread overview]
Message-ID: <sss4te$soa$1@dont-email.me> (raw)
In-Reply-To: <lymtjisahx.fsf@pushface.org>

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

  reply	other threads:[~2022-01-26 18:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26 16:54 Generic formal ">" Simon Wright
2022-01-26 18:46 ` Jeffrey R.Carter [this message]
2022-01-26 18:48 ` AdaMagica
2022-01-26 19:00   ` AdaMagica
2022-01-27 12:05     ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox