[J3] [EXTERNAL] US21 Enumeration type accessibility
Van Snyder
van.snyder at sbcglobal.net
Thu Oct 7 18:37:01 UTC 2021
I agree that an enumeration type name should be allowed in a PRIVATE or
PUBLIC statement, but I see no reason to remove the access-spec from
its syntax. That would make it different from a derived-type
definition. See R728. I would prefer simply to add <enumeration-type-
name> to C874.
On Thu, 2021-10-07 at 13:05 +0000, Brad Richardson via J3 wrote:
> I agree. This seems inconsistent with the rest of the language and
> can lead to problems.
>
> On Thu, 2021-10-07 at 11:04 +0000, Clune, Thomas L. \(GSFC-6101\) via
> J3 wrote:
> > I agree - we must have a mechanism to prevent a single USE
> > statement from "polluting" the namespace in higher level program
> > units.
> >
> > On 10/7/21, 4:45 AM, "J3 on behalf of John Reid via J3"
> > <j3-bounces at mailman.j3-fortran.org on behalf of
> > j3 at mailman.j3-fortran.org> wrote:
> >
> > Dear all,
> >
> > An enumeration type is not permitted to appear in a PUBLIC or
> > PRIVATE
> > statement(C874 on p. 114 of 21-007r2). Instead, its
> > accessibility can be
> > defined on an ENUMERATION TYPE statement (R767 on p. 91 of 21-
> > 007r2).
> > This means that if an enumeration type is accessed in a module
> > from
> > another module, its accessibility cannot changed. Was this
> > intended? I
> > think it would be better to allow enumeration type in a PUBLIC
> > or
> > PRIVATE statement and remove accessibility from ENUMERATION
> > TYPE
> > statements. This would be consistent with the treatment of
> > derived types.
> >
> > Comments, please.
> >
> > John.
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20211007/1562c90b/attachment.htm>
More information about the J3
mailing list