J3/00-120 Date: 2000/02/18 To: J3 From: Henry Zongaro Subject: Miscellaneous interop fixes (issues 218 and 229) References: 99-205r2, 99-270r2, 00-007, 00-011, 00-101 Typos: [65:39-41] Move Note 5.3 after [65:47] The note currently sits amongst the constraints, but doesn't refer to a preceding constraint. [79:9] Change "nore" to "more" [83:5] Change "if" to "of" [394:26] Change "|" to ":" The following items were missing in the fix for issue 147 in 99-205r2. Those edits introduced a for use in the BIND statement, BIND attribute and BIND syntax, but neglected to complete the changes for the BIND . [265:40] Change "BIND(C [, ])" to "" [266:1] Change "BIND" to "a " [266:4] Change "The BIND " to "A that is a " The following edit was missing from the fix for issue 163. That issue required binding labels to not be treated as global entities, but rather as things that identify global entities. The glossary entry for entity still includes a binding label in the list of things that are entities. [397:13] Delete ", a binding label" In paper 00-101, Rich Maine points out that paper 99-270r1, in addressing issue 165, contains a reference to the edit for [411:35+] in 99-205r2, but fails to specify what should be done to that edit. The following edits remedy that, and partly address issue 218. [391:22-25] Replace paragraph with "A C variable with an external definition (6.9 of the C standard) created by means of a companion processor (2.5.10) can be declared in a program by means of a variable declared in the scope of a module or by way means of a common block. Such a Fortran variable or common block shall have the BIND attribute." [391:37-42] Replace sentence beginning "A C variable" (including numbered list) with "Two variables or common blocks in a Fortran program shall not have the same binding label. A variable in a common block corresponds with a member of a C struct type if and only if the variable appears in the same relative position in the common block object lists used to declare the common block in the scoping unit as the member appears in the declaration of the C struct type. A common block interoperates (1) with a variable of a C struct type, if the number of variables declared in the common block object lists used to declare the common block in the scoping unit is equal to the number of members of the struct type, and the variables in those common block object lists interoperate with the corresponding members of the C struct type; or (2) with a C variable, if the common block object lists used to declare the common block in the scoping unit contain a single variable, and that variable in the common block object lists interoperates with the C variable." [392:30] Change "associated with that variable." to "linked with that C variable. A Fortran variable or common block that is linked with a C variable shall interoperate with that C variable." [391:29-35] Delete sentence that begins "In addition, . . ." to end of note. I believe that the issue raised by the first sentence still needs to be resolved, but the two preceding edits address the two issues raised by the second sentence and second paragraph of the note. [399:18] After "12.5.3" add ", 16.2.7.1" [399:19] Before "It" insert "When a C variable with external linkage has the same binding label as a Fortran variable or common block with the BIND attribute, they are said to be linked." Issue 229. Paper 99-205r2 introduced a subclause for the term binding label and added a reference to it. Paper 99-270r1 removed the subclause without adjusting the reference. These edits remedy that. [341:13] Change "(???)" to "(12.5.2.7, 16.2.7.1)" [341:14-18] Delete Unresolved issue 229.