From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26893 invoked by alias); 14 Dec 2001 19:26:01 -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 26844 invoked by uid 71); 14 Dec 2001 19:26:01 -0000 Date: Fri, 14 Dec 2001 11:26:00 -0000 Message-ID: <20011214192601.26843.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Geert Bosch Subject: Re: ada/4851: GNAT crashs on certain argument lines Reply-To: Geert Bosch X-SW-Source: 2001-12/txt/msg00847.txt.bz2 List-Id: The following reply was made to PR ada/4851; it has been noted by GNATS. From: Geert Bosch To: Florian Weimer Cc: gcc-gnats@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: ada/4851: GNAT crashs on certain argument lines Date: Fri, 14 Dec 2001 14:18:06 -0500 Hi Florian, You wrote: > The old comment suggests that Generic_Position once was a procedure. > I wonder who changed it and why. ;-) (The bug is present in the GNAT > 3.13p sources as well, but it might not show up because of code > generation differences.) This code was introduced in 1999 and always had the bug you mention, and always was a function rather than a procedure. > 2001-11-11 Florian Weimer > > * make.adb (Add_Switch): Make Generic_Position a procedure. > The function approach did not work well because of a side > effect (the function call could reallocate the table which was > being indexed using its result). Your patch is OK. I have regression-tested it against the ACT test-suite and it passes fine, as expected. I'd only suggest a one-word comment improvement: < -- Generic procedure that chooses a position for S in T at the -- > -- Generic procedure that allocates a position for S in T at the This better describes what the procedure does. Regards, -Geert