To: J3 10-192r1 From: Bill Long Subject: Macros in C Interop Date: 2010 June 17 References: 10-165r1, N1820 Discussion: The Macros specifying codes for the attribute field of the C descriptor were never integrated with the addition of assumed-rank objects. The current Table 5.1 lists macros for "assumed", "allocatable", and "pointer". For an assumed-rank object that is also allocatable the caller should use the allocatable code, and one that is a pointer the caller should use the pointer code. If the assumed-rank object is neither allocatable nor pointer, the "assumed" code should be used. From the C function's point of view, there is no material difference between an assumed-shape array and an assumed-rank non-allocatable, non-pointer array. The only new feature for assumed-rank is that it can be a scalar. Edits are provided to update Table 5.1 and add an explanation. Edits to 10-165r1 [10:24+] In Table 5.1, replace "assumed-shape array" with "assumed", and remove "object" after "allocatable". [10:25-] After Table 5.1, add a new paragraph: "CFI_attribute_pointer specifies an object with the Fortran POINTER attribute. CFI_attribute_allocatable specifies an object with the Fortran ALLOCATABLE attribute. CFI_attribute_assumed specifies an assumed-shape object or an assumed-rank object that is not allocatable or a pointer."