This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug fortran/52846] [F2008] Support submodules - part 3/3
- From: Damian Rouson <damian at sourceryinstitute dot org>
- To: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- Cc: Mikael Morin <mikael dot morin at sfr dot fr>, "Bader, Reinhold" <Reinhold dot Bader at lrz 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>, "salvatore dot filippone at uniroma2 dot it" <salvatore dot filippone at uniroma2 dot it>
- Date: Fri, 24 Jul 2015 01:08:33 -0700
- Subject: Re: [Bug fortran/52846] [F2008] Support submodules - part 3/3
- Authentication-results: sourceware.org; auth=none
- References: <CAGkQGiJ-HQA97YRC0fSjR4KFxS=7ft8ci6YjYyO7AWGi_md+cw at mail dot gmail dot com> <55B10B58 dot 9000302 at sfr dot fr> <CAGkQGi+NODX-wo+HKOf1V9nD8PHUVdH9OSU_vaDHJct20DP0Tw at mail dot gmail dot com>
I love this idea and had similar thoughts as well.
:D
Sent from my iPhone
> On Jul 24, 2015, at 1:06 AM, Paul Richard Thomas <paul.richard.thomas@gmail.com> wrote:
>
> Dear Mikael,
>
> It had crossed my mind also that a .mod and a .smod file could be
> written. Normally, the .smod files are produced by the submodules
> themselves, so that their descendants can pick up the symbols that
> they generate. There is no reason at all why this could not be
> implemented; early on in the development I did just this, although I
> think that it would now be easier to modify this patch.
>
> One huge advantage of proceeding in this way is that any resulting
> library can be distributed with the .mod file alone so that the
> private entities are never exposed. The penalty is that a second file
> is output.
>
> With best regards
>
> Paul
>
>> On 23 July 2015 at 17:42, Mikael Morin <mikael.morin@sfr.fr> wrote:
>> Hello Paul,
>>
>> Le 23/07/2015 09:46, Paul Richard Thomas a Ãcrit :
>>>
>>> Since all the private entities in a module have to be transmitted to
>>> their descendant submodules, whilst keeping them hidden from normal
>>> use statements, I have chosen to write the module file as usual and
>>> add a second part that contains the private entities. This latter is
>>> only read when processing submodule statements.
>> why not write them to the/a .smod file? It was its primary purpose, wasn't
>> it?
>> [Sorry, I followed the submodule stuff very remotely].
>>
>> It's probably bad practice to put private entities in module files, at least
>> now that submodules are supported. Nevertheless with your change,
>> modifications made to private entities produce recompilation cascades, even
>> though the public interfaces are left unchanged.
>>
>> Mikael
>
>
>
> --
> Outside of a dog, a book is a man's best friend. Inside of a dog it's
> too dark to read.
>
> Groucho Marx