http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39427

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #20 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-09-30 
15:49:37 UTC ---
(In reply to comment #19)
> Could someone please comment on the relevance (or lack thereof) of the
> component being public in the example I submitted?

This issue was solved off list/PR. The question was how to interpret the
following, where [F2008's] R455 defines a "structure-constructor":

"C496 (R455) If derived-type-spec is a type name that is the same as a generic
name, the component-spec-list shall not be a valid actual-arg-spec-list for a
function reference that is resolvable as a generic reference to that name
(12.5.5.2)."

My interpretation is that this only disallows structure constructors, i.e.,
that generic functions have a higher precedence than structure constructors.
Thus, one can always override a constructor by a generic function. (And I do
not see how private components could alter the interpretation of C496 - even if
one reads it differently.)

F2008 also has the following note, which supports the overriding
interpretation:

"NOTE 4.58   The form 'name(...)' is interpreted as a generic
function-reference if possible; it is interpreted as a structure-constructor
only if it cannot be interpreted as a generic function-reference."

Reply via email to