This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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] Handle GENERIC type-bound procedures


Tobias Burnus wrote:
Hi Daniel,

Daniel Kraft wrote:
this is a follow-up patch to my recent type-bound procedures
implementation to handle GENERIC bindings and it also includes some
minor tweaks to the general type-bound procedures handling.
Thanks. (Note to others: OPERATOR(...) and ASSIGNMENT(=) do not work yet.)

Thanks for the review and in general the very good help in putting forward F2003 :)


Committed as rev. 139822. I will update the wiki pages now again and then update my documentation patch and resubmit it.

I suggest to open a PR for this and not handle it directly with this
patch as it is already quite big and I don't think I've understood that
section well enough to do it at the moment...
Deferring to a PR is OK.

I'll do this.


+/* XXX: Should I incorporate this and match_generic_in_type?  */
+
+match
+gfc_match_generic (void)

I would put them in one function; I think it is unlikely that gfc_match_generic will serve any other function then match_generic_in_type and gfc_match_generic is almost empty.

Done.


+ /* XXX: Do we have to do access checking here? What's about this code:
[...]
+ Is this valid or invalid? */



Very good question. I would claim it is valid: "An extended type has a scalar, nonpointer, nonallocatable, parent component with the type and type parameters of the parent type. The name of this component is the parent type name. It has the accessibility of the parent type." ("4.5.6.1 Inheritance")


Thus proc should be accessible in t2 and thus it should work. I know that f95 does not agree with me and thus one should maybe ask at c.l.f.

I asked there (as you may have seen yourself) and Richard Maine agrees with us that the code is valid. I just removed the XXX. If something else comes up, we can change the code easily in the future if needed.


Thanks,
Daniel

--
Done:     Arc-Bar-Cav-Sam-Val-Wiz, Dwa-Elf-Gno-Hum-Orc, Law-Neu-Cha, Fem-Mal
To go:    Hea-Kni-Mon-Pri-Ran-Rog-Tou


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