J3/13-215 To: J3 From: Van Snyder Subject: Protected components Date: 2013 December 19 Reference: Tom Clune's mail and related correspondence on 7 Dec 2012 Title: Protected components Submitted by: Van Snyder Status: For consideration Basic functionality: Define a PROTECTED attribute for components. Rationale: The PROTECTED attribute for components improves performance and reduces labor cost by not requiring PRIVATE components and trivial "read" functions. Estimated impact: Minor Markham M6 conformance: Remove simple deficiency and discrepancy. Detailed specification: Define a PROTECTED attribute for components. If a type has a component with the PROTECTED attribute and the type definition is accessed by use association: o a variable of the type shall not be storage associated, { this is stronger than the PROTECTED attribute for variables, which admits equivalence } o a variable of the type shall not appear in a variable definition context (16.6.7), and o a component with the PROTECTED attribute shall not appear in a variable definition context (16.6.7), a pointer association context (16.6.8), or as the or in a . Draft edits: To estimate scope of project Insert an alternative for R437 <> ... <> PROTECTED Within 5.3.15: Insert a <<5.3.15.1 General>> subclause, encompassing the introductory blather of 5.3.15, C548 and C549. Within C549, replace "procedure pointer or variable" by "procedure pointer, variable, or component". Insert a <<5.3.15.2 PROTECTED attribute for variables and procedure pointers>> subclause heading after C549. After 5.3.15p3 insert a <> subclause The PROTECTED attribute for components imposes limitations on their usage if the type is accessed by use association. C552a If the definition of a type is accessed by use association and a component of that type has the PROTECTED attribute o a variable of the type shall not be storage associated, o a variable of the type shall not appear in a variable definition context (16.6.7), and o a component with the PROTECTED attribute shall not appear in a variable definition context (16.6.7), a pointer association context (16.6.8), or as the or in a . If the definition of a type is accessed by use association, a component of that type that has the PROTECTED attribute not definable.