This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, libgfortran] Add const restrict to intrinsic functions
- From: Thomas Koenig <Thomas dot Koenig at online dot de>
- To: GNU GFortran <fortran at gcc dot gnu dot org>, GCC patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 26 Nov 2005 15:57:16 +0100
- Subject: Re: [Patch, libgfortran] Add const restrict to intrinsic functions
- References: <20051126125829.GO16758@vipunen.hut.fi>
On Sat, Nov 26, 2005 at 02:58:30PM +0200, Janne Blomqvist wrote:
> Hi,
>
> the attached patch adds const restrict to the arguments for the
> intrinsic functions in the m4/ directory.
I believe this is incorrect for cases like eoshift1, which has:
if (ret->data == NULL)
{
int i;
ret->data = internal_malloc_size (size * size0 ((array_t *)array));
ret->offset = 0;
ret->dtype = array->dtype;
You can't declare ret as "const" in this case.
Thomas