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 05:16:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.stueberl.de!newsfeed.vmunix.org!newsfeed2.easynews.net!easynews.net!news.cid.net!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Renaming subprogram and default_expression Date: Thu, 14 Feb 2002 14:15:07 +0100 Organization: Enyo -- not your organization Message-ID: <878z9wi4ro.fsf@deneb.enyo.de> References: <87sn84i80s.fsf@deneb.enyo.de> NNTP-Posting-Host: deneb.enyo.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: cygnus.enyo.de 1013692449 7689 212.9.189.171 (14 Feb 2002 13:14:09 GMT) X-Complaints-To: abuse@enyo.de NNTP-Posting-Date: 14 Feb 2002 13:14:09 GMT Cancel-Lock: sha1:3MBYfe7JDPXid4KbKnGY0aqKamc= Xref: archiver1.google.com comp.lang.ada:20001 Date: 2002-02-14T13:14:09+00:00 List-Id: lutz@iks-jena.de (Lutz Donnerhacke) writes: > * Florian Weimer wrote: >>Christoph Grein writes: >>> So it looks OK. Did some compiler complain? >> >>GNAT 3.14p and GNAT 5.00w, both with the same, confusing error >>message: 'default expression for "X" does not match'. > > Initial program to reproduce this error in 3.13p. May it help you. > > procedure Defaults is > type Typ is new Integer; > > procedure Original (X : Typ); > procedure Renamed (X : Typ := -2); > procedure Renamed (X : Typ := -3) renames Original; This is illegal because full conformance of the subprogram_specification to a preceding declaration is required, see RM 8.5.4(5). The error message is correct in this case.