J3/04-344r1 To: J3 From: Bill Long, Interop Subject: C_SIZEOF Date: 2004 August 9 One item of unfinished business from f03 is the issue of a storage size intrinsic returning the C language idea of storage size. This is due, mainly, to the ubiquitous nature, in C, of procedure calls with , pairs. Number: Title: C_SIZEOF Submitted By: J3 Status: For Consideration References: Basic Functionality: Add a procedure to ISO_C_BINDING to return the size of its argument as per C sizeof. Rationale: There are situations where a program needs to know the size of an entity, as expressed in C. Estimated Impact: The impact was estimated by J3 at 167 as Small. Detailed Specification: A procedure to return the size of its argument as per C. Edits: [125:41+] Add list item "(4++) the intrinsic module function C_SIZEOF," [395:31+++] (after the Note) Add section "15.1.2.6 C_SIZEOF (X) *Description.* Returns the size, as defined by the C sizeof operator (Section 6.5.3.4 of the C International Standard), of the argument X. *Class.* Inquiry function. *Arguments.* X X shall have interoperable type and type parameters. It may be a scalar or an array that is not assumed-size. *Result Characteristics.* Integer scalar of kind C_SIZE_T (15.2.1). *Result Value.* The result value is the size of X as defined by the sizeof operator (Section 6.5.3.4 of the C International Standard) of the companion C processor. If the companion processor is not a C processor, the result value is processor dependent." History: Submitted as 04-104 at 167.