From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15956 invoked by alias); 18 Mar 2009 08:59:51 -0000 Received: (qmail 15408 invoked by alias); 18 Mar 2009 08:59:37 -0000 Date: Wed, 18 Mar 2009 08:59:00 -0000 Message-ID: <20090318085937.15407.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug ada/39446] Can not resolve PUT between String and Character versions. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mark_r_eggleston at yahoo dot co dot uk" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-03/txt/msg01271.txt.bz2 ------- Comment #4 from mark_r_eggleston at yahoo dot co dot uk 2009-03-18 08:59 ------- Subject: Re: Can not resolve PUT between String and Character versions. Sam, Thank you that make complete sense and explains why I could only reproduce this problem with integers ans its sub types as the parameter. I'd forgotten all about Ada array indexing and due to a limitation of the Ada syntax the difference between a function call and accessing an array element look identical which is why I suppose that there are named parameters available in subprogram calls. Had I been using Ada longer I would have recognised the ambiguity at thogh the time it did look to me to be an obvious bug. I apologise for wasting your time. --- On Tue, 17/3/09, sam at gcc dot gnu dot org wrote: > From: sam at gcc dot gnu dot org > Subject: [Bug ada/39446] Can not resolve PUT between String and Character versions. > To: mark_r_eggleston@yahoo.co.uk > Date: Tuesday, 17 March, 2009, 2:28 PM > > > ------- Comment #3 from sam at gcc dot gnu dot org  > 2009-03-17 14:28 ------- > This is not a bug. The compiler really has no way to > distinguish between the > following two interpretations for "Put (Get_Name (7))": > >   1- Get_Name (7) is a call to Get_Name with argument > 7, which returns a String >   2- Get_Name (7) is a call to Get_Name without > argument, which returns a > String, and you attempt to take the 7th character of this > string, which is a > Character > > Hence the ambiguity. > > > -- > > sam at gcc dot gnu dot org changed: > >            What  >   |Removed            >          |Added > ---------------------------------------------------------------------------- >               >    CC|          >                 >   |sam at gcc dot gnu dot org >           >    Status|UNCONFIRMED      >            |RESOLVED >          Resolution|  >                 >           |INVALID > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39446 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39446