This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: ada/4851: GNAT crashs on certain argument lines
- From: Geert Bosch <bosch at gnat dot com>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 14 Dec 2001 19:26:01 -0000
- Subject: Re: ada/4851: GNAT crashs on certain argument lines
- Reply-to: Geert Bosch <bosch at gnat dot com>
The following reply was made to PR ada/4851; it has been noted by GNATS.
From: Geert Bosch <bosch@gnat.com>
To: Florian Weimer <fw@deneb.enyo.de>
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 <fw@deneb.enyo.de>
>
> * 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