J3/08-147r1 To: J3 From: Van Snyder Subject: Public comment: VALUE attribute Date: 2008 May 13 Reference: 08-007r2 1. Introduction The restrictions on the VALUE attribute are mostly unnecessary. VALUE was originally developed for C interoperability, and restricted to what can be done for C function formal parameters, but when we allowed dummy data objects with length parameters, that went out the window. Any benefit that might have been gotten from having a size that can be determined at compile time is an illusion, since the processor already has to know how to do "copy in," i.e., the same thing as VALUE, in the case of noncontiguous actual arguments corresponding to contiguous dummy arguments. VALUE is actually simpler, since "copy out" is not needed. All VALUE does is demand that changes to the dummy argument (if any) do not affect the actual argument, and copy out is NOT to take place. 2. Suggested changes The constraints on the VALUE attribute ought to be reduced: [49: 4.3.1.1p1 C407] --------------------------------------------------- Delete the final sentence of C407 that deals with the VALUE attribute: "It shall not have the VALUE attribute." [99: 5.3.18p1 C556] ---------------------------------------------------- Editor: Replace constraint C556: "C556 An entity with the VALUE attribute shall be a dummy data object that is not an assumed-size array." If we really want to prohibit polymorphic dummy arguments from having the VALUE attribute, insert "nonpolymorphic" before "dummy". But why bother, since the processor has to know how to do copy in for polymorphic dummy arguments anyway? [99: 5.3.18p1 C558] ---------------------------------------------------- Editor: Delete constraint C558.