From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cbdb6ca5158b52a8,start X-Google-Attributes: gid103376,public From: Jonas Nygren Subject: Question on renaming of subprogram Date: 1996/03/25 Message-ID: <3156745B.6D01@ehs.ericsson.se>#1/1 X-Deja-AN: 144166690 cc: report@gnat.com content-type: text/plain; charset=us-ascii organization: Ericsson Hewlett-Packard Telecommunications AB mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.0GoldB1 (WinNT; I) Date: 1996-03-25T00:00:00+00:00 List-Id: The following code compiles with Gnat 3.03 but the execution goes of in a deep loop. Now I am curious as to if my code is correct or not. The problem arises when I try to rename a subprogram with a subprogram of the same name, in the example below "p". If the name of "procedure p(b : tb)" is changed to e.g. "px" it compiles and executes normally. So, can I rename a subprogram with a name identical to it's own? If not, should Gnat have given an error message? /jonas PS using a separate package for "tb" does not seem to help. Perhaps it has to do with conformance rules. I copy this to report@gnat also: Gnat version: 3.03, Solaris 2.3 DS -- the code example follows package tests is type ta is private; procedure p(a : ta); type tb is private; procedure p(b : tb); private type ta is access integer; type tb is new ta; procedure p(b : tb) renames p; end tests; package body tests is procedure p(a : ta) is begin null; end p; end tests; with tests; use tests; procedure test is b : tb; begin p(b); end test;