From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22607 invoked by alias); 24 Apr 2002 12:26:05 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 22575 invoked by uid 71); 24 Apr 2002 12:26:02 -0000 Date: Wed, 24 Apr 2002 05:26:00 -0000 Message-ID: <20020424122602.22570.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: gnat-dev@buzco.nyct.net Subject: Re: ada/5690: renaming subprograms and default_expression Reply-To: gnat-dev@buzco.nyct.net X-SW-Source: 2002-04/txt/msg01243.txt.bz2 List-Id: The following reply was made to PR ada/5690; it has been noted by GNATS. From: gnat-dev@buzco.nyct.net To: gcc-gnats@gcc.gnu.org Cc: fw@deneb.enyo.de Subject: Re: ada/5690: renaming subprograms and default_expression Date: Wed, 24 Apr 2002 08:20:19 -0400 On 02-02-14 16:01:49 fw@deneb.enyo.de wrote: | > Number: 5690 | > Category: ada | > Synopsis: renaming subprograms and default_expression | > Confidential: no | > Severity: critical | > Priority: high | > Responsible: unassigned | > State: open | > Class: rejects-legal | > Submitter-Id: net | > Arrival-Date: Thu Feb 14 08:06:00 PST 2002 | > Closed-Date: | > Last-Modified: | > Originator: fw@deneb.enyo.de | > Release: GCC 3.1 2002-02-12 | > Organization: | > Environment: | Debian GNU/Linux unstable, x86 | > Description: | The attached program appears to be legal, but compilation results in the following error messages: | defaults.adb:6:14: not fully conformant with declaration at line 4 | defaults.adb:6:14: default expression for "X" does not match | > How-To-Repeat: | Compile the attached program. | > Fix: === End quoted text === This is "questionable, but should be legal" code ! The relevant part of the RM (§ 8.5.4 Subprogram Renaming Declarations) defines in ¶ 1 : 1. A subprogram_renaming_declaration can serve as the completion of a subprogram_declaration; such a renaming_declaration is called a renaming-as-body. A subprogram_renaming_declaration that is not a completion is called a renaming-as-declaration, and is used to rename a subprogram ... (This can be read at http://buzco.nyct.net/Programming/lang/Ada/gnat/3.14/arm95/arm95_134.html most of the time (I have about 90 % availability), and is of course in the RM shipped w/ gnat-3.14 and I guess w/ the new gcc-ada docs.) Your sample tries to change the default argument w/ a renaming-as-body, which I can see could be useful at times. The RM does +not+ explicitly state that this is legal, and all the examples show a renaming-as-declaration. GNAT-3.14p exhibits similar behaviour. I will map out the scope of the problem (eg, what happens if this is a package w/ "original" defined in another pkg, etc) and see if I can track down the code. Meanwhile, if some Compiler Lawyer can identify if this is really a bug in the compiler or just the manual, that would help. -- Buz Cory of BuzCo Systems -- New York NY USA http://BuzCo.nyct.net (Buz as GNAT Programmer) write to for FREE help with: Installing/Configuring Linux Getting started with the Ada Programming Language. Friends don't let friends do DOS; Linux to the rescue! Ada 95 is here! Why use an archaic, bug-prone language?