This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, Fortran] Fix PR 60526, variable name has already been declared as a type
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Thomas Koenig <tkoenig at netcologne dot de>
- Cc: Andre Vehreschild <vehre at gmx dot de>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 14 Feb 2016 10:35:41 +0200
- Subject: Re: [patch, Fortran] Fix PR 60526, variable name has already been declared as a type
- Authentication-results: sourceware.org; auth=none
- References: <56B3CAA1 dot 8090807 at netcologne dot de> <20160205113322 dot 42c5357c at vepi2> <56B65596 dot 3080800 at netcologne dot de> <CAO9iq9EUkwnahh0AqUp09Rbe6Q7LJ68dy99seozvwzGsm2KVvA at mail dot gmail dot com> <56BD9193 dot 4020904 at netcologne dot de> <20160212111632 dot 5b4e188d at vepi2> <CAO9iq9GhuY-9Ls8_aj_RrL_NwE-edPA3FDUUnQ6cYWnRV3tQHA at mail dot gmail dot com> <56BF19DE dot 9040404 at netcologne dot de>
On Sat, Feb 13, 2016 at 1:56 PM, Thomas Koenig <tkoenig@netcologne.de> wrote:
> Am 12.02.2016 um 11:42 schrieb Janne Blomqvist:
>>
>> On Fri, Feb 12, 2016 at 12:16 PM, Andre Vehreschild <vehre@gmx.de> wrote:
>
>
>>> The proposed alloca() call
>>> has according to the documentation of libc some availability issues on
>>> certain platforms, too.
>
>
> These availablity issues cannot be too serious, or we would be having
> trouble already:
>
> ig25@linux-fd1f:~/Gcc/trunk/gcc/fortran> fgrep -H -n 'alloca (' *.c
> cpp.c:839: to_file_quoted = (unsigned char *) alloca (to_file_len * 4 +
> 1);
> cpp.c:1079: (unsigned char *) alloca (to_file_len * 4 + 1);
> error.c:898: buffer = (char *) alloca (strlen (msg) + strlen (msg2) + 2);
> module.c:6042: filename = (char *) alloca (n);
> module.c:6048: filename = (char *) alloca (n);
> module.c:6058: filename_tmp = (char *) alloca (n + 1);
> options.c:267: source_path = (char *) alloca (i + 1);
> primary.c:214: buffer = (char *) alloca (length + 1);
> primary.c:438: buffer = (char *) alloca (length + 1);
> primary.c:600: buffer = (char *) alloca (count + 1);
> scanner.c:321: q = (char *) alloca (len + 1);
> simplify.c:6381: buffer = (unsigned char*)alloca (buffer_size);
> target-memory.c:674: buffer = (unsigned char*)alloca (len);
> target-memory.c:781: buffer = (unsigned char*)alloca (buffer_size);
>
>>> Therefore why not going with the fixed size
>>> stack array and adding a check for possible overflow to it and be done?
>>
>>
>> Yes, I agree. That sounds like the best approach in this case.
>
>
> OK, here is the final version of the patch. I'd like to get this
> committed so I can turn to PR 69742.
Ok, thanks for the patch.
--
Janne Blomqvist
- References:
- [patch, Fortran] Fix PR 60526, variable name has already been declared as a type
- Re: [patch, Fortran] Fix PR 60526, variable name has already been declared as a type
- Re: [patch, Fortran] Fix PR 60526, variable name has already been declared as a type
- Re: [patch, Fortran] Fix PR 60526, variable name has already been declared as a type
- Re: [patch, Fortran] Fix PR 60526, variable name has already been declared as a type
- Re: [patch, Fortran] Fix PR 60526, variable name has already been declared as a type
- Re: [patch, Fortran] Fix PR 60526, variable name has already been declared as a type
- Re: [patch, Fortran] Fix PR 60526, variable name has already been declared as a type