J3/04-104 Date: 6 Dec 03 To: J3 From: Dan Nagle Subject: C_Sizeof() Many calls to C functions require a size argument. Adding a c_sizeof() intrinsic to iso_c_binding solves the problem. Number: Title: C_SIZEOF() Submitted By: J3 Status: For Consideration References: Section 15 Basic Functionality: Add c_sizeof() to iso_c_binding Rationale: Many calls to C functions require a size argument. Size in C is defined in terms of bytes, which are in turn defined in terms of characters. Thus, the value returned depends on the C compiler, and may depend on the mode of the C compiler (which character set is default). Estimated Impact: I estimate this feature to have low impact, because compilers know the sizes of data items. Detailed Specification: Many calls in C take the form of a starting address and a size, c_func( pointer-to-thingo, sizeof( thingo) ); Being able to call these functions from within Fortran without having to write a C wrapper to supply the sizeof argument is helpful. History: