This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR40196 - [F03] [F08] Type parameter inquiry (str%len, a%kind) and Complex parts (z%re, z%im)


Hi Bernhard,

Thanks for going through the patch:
....snip....
> missing space before open parenthesis

Corrected.
....snip....
> inq would be easier to understand and unambiguous imho.

Why? inquiry_type seems fine to me.

....snip....
> Is the switch really worth it? I'd have used a plain chain of strcmp,
> fwiw.

I have done it. However, I might revert in order to combine the switch
block where I set the typespec for the primary expression.

....snip....
> I guess RE and IM should be capitalised?

Done

> you could break here
>
> > +
> >     for (ref = expr->ref; ref; ref = ref->next)
> >       switch (ref->type)
> >         {

Done

>
> > Index: gcc/fortran/trans-expr.c
....snip...

> Don't you have to gfc_free_expr (se->expr) or gfc_replace_expr() ?

No these are tree expressions not gfc_expr. No cleanup is needed.

I haven't added testcases for errors. Does anybody think that this is necessary?

Cheers

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]