[patch, Fortran] Fix PR 60526, variable name has already been declared as a type
Andre Vehreschild
vehre@gmx.de
Fri Feb 12 10:16:00 GMT 2016
Hi all,
it wasn't my intention to start such a big discussion for such a small
thing. Please stop this academic battle and get back to the issue at
hand:
Thomas is examining a symbol, that
- has come through the scanner, i.e., it adheres to the rules of
gfortran, especially it is known to be smaller than GFC_MAX_SYMBOL_LEN
- is still a valid symbol. When gfortran's internal
composition/modification of symbols breaks this rule, we are done
earlier already.
- its length is not changed in his routine.
I was only trying to prevent an alloc/free for this small use case,
which should fit on the stack quite easily. The proposed alloca() call
has according to the documentation of libc some availability issues on
certain platforms, too. Therefore why not going with the fixed size
stack array and adding a check for possible overflow to it and be done?
Regards,
Andre
On Fri, 12 Feb 2016 09:02:27 +0100
Thomas Koenig <tkoenig@netcologne.de> wrote:
> Hi Janne,
>
> [std::string]
>
> > As we're supposed to be C++ nowadays, why aren't we
> > using that?
>
> My reason is simple: I know C and Fortran. I hardly know C++,
> and I don't want to learn it for the sake of some largely
> irrelevant micro-optimizations.
>
> We should restrict C++ usage to those cases where there is
> a clear and large benefit.
>
> Regards
>
> Thomas
--
Andre Vehreschild * Email: vehre ad gmx dot de
More information about the Gcc-patches
mailing list