J3/04-344 To: J3 From: Dan Nagle Subject: C_SIZEOF Date: 2004 June 24 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 may be of intrinsic or derived type. It shall not be polymorphic. If it is of derived type, that type shall be a SEQUENCE or interoperable type and shall have no allocatable ultimate components. If its type has any deferred type parameters, it shall be a pointer that is associated or an allocatable object that is allocated. 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-121 at 167.