public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paul Richard Thomas <paul.richard.thomas@gmail.com>
To: Damian Rouson <damian@sourceryinstitute.org>
Cc: "Bader, Reinhold" <Reinhold.Bader@lrz.de>,
	"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
		gcc-patches <gcc-patches@gcc.gnu.org>,
		Salvatore Filippone <salvatore.filippone@uniroma2.it>
Subject: Re: [Bug fortran/52846] [F2008] Support submodules - part 3/3
Date: Thu, 23 Jul 2015 08:46:00 -0000	[thread overview]
Message-ID: <CAGkQGiKpNch+mHCEqCiCSFz1GFAu=wy4dJ8RcxYvtzzNhWkN9Q@mail.gmail.com> (raw)
In-Reply-To: <E39CA6B6-43CB-41D4-9052-BFE6BBFCA3C0@sourceryinstitute.org>

Dear Damian,

I do not think that there is any effect on compilation cascades. As
long as the private part of the module file remains unchanged, it will
not be recompiled if a descendant submodule is modified. Naturally,
the size of the module file is increased but, if one is careful, this
is not a big deal. A gotcha, which I will have to emphasize in the
documentation occurs if another module file is used and its symbols
are not exposed by public statements. If there are large numbers of
symbols this can have a big effect on the size of the module file. I
noticed this, when examining one of gfortran's testcases where the
ISO_C_BINDING intrinsic module is used. Generous sprinklings of USE
ONLYs are required to keep the module file sizes under control.

I am not over enthusiastic about using compilation flags to uphold
standards either.

Cheers

Paul

On 23 July 2015 at 10:22, Damian Rouson <damian@sourceryinstitute.org> wrote:
>
>
>> On Jul 23, 2015, at 12:46 AM, Paul Richard Thomas <paul.richard.thomas@gmail.com> wrote:
>>
>> 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.
>
> Hi Paul,
>
> Could you comment on whether this approach alleviates compilation cascades as
> seems to have been envisioned when submodules were added to the standard?  My
> guess is that a developer could adopt a policy of putting only public information in a
> module and reserving all private information for submodules, which would mitigate
> against unnecessary compilation cascades and would be consistent with putting
> the interface in the module and the implementation in a submodule..
>
>> It does cross my mind that all of this part of the submodule
>> implementation could be subject to the condition that a compiler
>> option is set. I am struck by the notion that making private module
>> entities available to submodules is an unnecessary complication and
>> that it amounts to be an error in the standard. This is why I am
>> suggesting the possibility of a specific compiler option.
>
> I strongly advocate against having to pass flags to force standard-compliant behavior
> (I happened to have just posted to c.l.f on a frustrating way in which two compilers
> currently require flags to comply with the standard), although it sounds like it might
> not matter in this case if one adopts the aforementioned policy
> of putting only pubic information in modules.
>
> Damian



-- 
Outside of a dog, a book is a man's best friend. Inside of a dog it's
too dark to read.

Groucho Marx

  reply	other threads:[~2015-07-23  8:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23  8:37 Paul Richard Thomas
2015-07-23  8:42 ` Damian Rouson
2015-07-23  8:46   ` Paul Richard Thomas [this message]
2015-07-23 16:35 ` Mikael Morin
2015-07-24  8:08   ` Paul Richard Thomas
2015-07-24  8:09     ` Damian Rouson
2015-07-24 12:10       ` Paul Richard Thomas
2015-07-29 15:32       ` Paul Richard Thomas
2015-07-29 15:36         ` Marek Polacek
2015-07-29 16:15           ` FX
2015-07-29 16:25             ` Marek Polacek
2015-07-29 16:45             ` Paul Richard Thomas
2015-08-03 10:45         ` Mikael Morin
2015-08-03 12:36           ` Paul Richard Thomas
2015-08-03 15:40             ` Mikael Morin
2015-08-04  9:40               ` Paul Richard Thomas
2015-08-05 12:09                 ` Paul Richard Thomas
2015-08-10 18:09             ` Toon Moene
2015-08-10 18:57               ` AW: " Bader, Reinhold
2015-08-11 10:28                 ` Paul Richard Thomas
2015-08-11 11:17                   ` AW: " Bader, Reinhold
2015-08-11 11:36                     ` Paul Richard Thomas
2015-07-23 12:20 Salvatore Filippone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGkQGiKpNch+mHCEqCiCSFz1GFAu=wy4dJ8RcxYvtzzNhWkN9Q@mail.gmail.com' \
    --to=paul.richard.thomas@gmail.com \
    --cc=Reinhold.Bader@lrz.de \
    --cc=damian@sourceryinstitute.org \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=salvatore.filippone@uniroma2.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).