From mboxrd@z Thu Jan 1 00:00:00 1970 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Renaming primitives. Date: Wed, 10 Jan 2024 20:18:39 -0600 Organization: A noiseless patient Spider Message-ID: References: Injection-Date: Thu, 11 Jan 2024 02:18:07 -0000 (UTC) Injection-Info: dont-email.me; posting-host="398f6d5c4c9ff6cbffb6894e51b840a0"; logging-data="2870460"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19tLvSdnRB0XgqqiT/Go72bRqoCddk5AWY=" Cancel-Lock: sha1:Tmx8h3s9idx55qPRKPrLo706Yb0= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MSMail-Priority: Normal X-RFC2646: Format=Flowed; Response X-Priority: 3 Xref: news.eternal-september.org comp.lang.ada:65981 List-Id: "Blady" wrote in message news:unls1j$2f0up$3@dont-email.me... > Is a procedure renaming equivalent to a simple call? General point: "Equivalent" is never true in programming language design. If construct A is equivalent in every way to construct B, then they have to be the same construct. For instance, in your example below, the two subprogram declarations have different identifiers which have different visibility (two declarations cannot be at exactly the same place), so there is at least one way that they're not equivalent. So, if you want to talk about "equivalence", you need to qualify that by what properties you are interested in. ... > What is happening if My_Generic_Handler change? Nothing. The names in a renaming are evaluated when the renaming is declared. If there are parts that could change, the compiler has to save the values at the point of the renaming. That's true for all forms of renaming (some names, like package names, can't change meaning so the example isn't possible, of course). ... > I got: > test_20240110_renproc.adb:47:14: error: too many arguments in call to > "log" > > Is it a correct or a GNAT issue? Looks like a bug to me. Not too surprising, though, this sort of thing is a special case in a compiler and often added to pass an ACATS test or user bug report. Such fixes can often not be fully general. Randy.