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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,28dcfc3d6dc519b8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-14 08:29:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!ihug.co.nz!falcon.america.net!eagle.america.net.POSTED!not-for-mail Message-ID: <3C6BE659.27AFCA8F@otelco.net> From: Larry Hazel X-Mailer: Mozilla 4.78 [en] (Win98; U) X-Accept-Language: en,x-ns11F8K63r3NhQ,x-ns2r2e09OnmPe2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Renaming subprogram and default_expression References: <87sn84i80s.fsf@deneb.enyo.de> <87zo2cgkib.fsf@deneb.enyo.de> <87vgd0gin8.fsf@deneb.enyo.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 14 Feb 2002 10:31:21 -0600 NNTP-Posting-Host: 66.0.32.230 X-Trace: eagle.america.net 1013704152 66.0.32.230 (Thu, 14 Feb 2002 11:29:12 EST) NNTP-Posting-Date: Thu, 14 Feb 2002 11:29:12 EST Organization: 24hoursupport.com Xref: archiver1.google.com comp.lang.ada:20010 Date: 2002-02-14T10:31:21-06:00 List-Id: Florian Weimer wrote: > > "Alexander Boucke" writes: > > > Type roman is range 1..3999; is defined in strings edit.ads Note, > > that gnat3.14p does not complain about the preset values for the > > booelan arguments, only for the new integer type. If I comment these > > default values, the program compiles. This seems to be the same > > error as in the short testprog. starting this thread: A new > > integer-type was used there, too. > > You can eliminate the integer type. The minimal test case for GCC 3.1 > is: > > procedure Defaults is > > procedure Original (X : Integer); > procedure Renamed (X : Integer := -1); > > procedure Renamed (X : Integer := -1) > renames Original; > > procedure Original (X : Integer) is > begin > null; > end Original; > > begin > null; > end Defaults; > > (I wouldn't have thought that such basic things are broken, that's why > I had not tried the default Integer type.) > > I don't know why the bug doesn't occur with string types. Oh well. If you remove the declaration of Renamed and just leave the renames statement, there is no error. And here there is no need for the declaration. However, if you make it a package: package Defaults is procedure Original (X : Integer); procedure Renamed (X : Integer := -1); private procedure Renamed (X : Integer := -1) renames Original; end Defaults; the declaration is needed, and you get the error. Looks like a bug. Larry