J3/09-278r1 To: J3 From: Van Snyder/Stan Whitlock Subject: Conformance Date: 2009 August 11 References: 09-007r2 The original premise of 09-278: Subclause 1.5 specifies the conditions necessary for a processor to conform. It doesn't include a requirement to detect and report error conditions that occur during program execution. If an error condition occurs during execution of a program it is by definition not standard conforming. is false. On page 23, 1.5p1 says A program (2.2.2) is a standard-conforming program if it uses only those forms and relationships described herein and if the program has an interpretation according to this part of ISO/IEC 1539. A program that uses STAT= to catch an error is using standard forms and has a standard interpretation so it is a standard-conforming program. 1.5p2(1) says A processor conforms to this part of ISO/IEC 1539 if: (1) it executes any standard-conforming program in a manner that fulfills the interpretations herein, subject to any limits that the processor may impose on the size and complexity of the program; This says a standard-conforming processor is supposed to execute as specified by the standard, including handling run-time errors as specified by the standard. Therefore we reject section 1 and the edits in section 2 of 09-278. Section 3 asks about the values returned in STATUS by GET_ENVIRONMENT_VARIABLE. The text does not make it clear that STATUS == 0 is not an error but all other values STATUS may be set to are errors. It also does not make clear that any error that would set STATUS to a non-zero value when STATUS is not present causes error termination of the program to be initiated. This is also true for GET_COMMAND, GET_COMMAND_ARGUMENT, and partially for EXECUTE_COMMAND_LINE. But GET_ENVIRONMENT_VARIABLE, GET_COMMAND, and GET_COMMAND_ARGUMENT are in F2003 so changing their behavior to specify that error termination is initiated if a non-zero status result occurs but the status variable is not present would be a potentially large change to the standard and to existing implementations. Therefore we propose an edit for EXECUTE_COMMAND_LINE since it is new in F2008 but no change to GET_ENVIRONMENT_VARIABLE, GET_COMMAND, and GET_COMMAND_ARGUMENT at this time. Those three may be repaired via the F2008 interp process in the future. EDITS: [348:6] change "If an error condition occurs and CMDSTAT is not present, error termination of execution of the image is initiated." to "If a condition occurs that would assign a non-zero value to CMDSTAT but the CMDSTAT variable is not present, error termination is initiated." ---- rejected text -------------------------------------------------------------- 1. Introduction Subclause 1.5 specifies the conditions necessary for a processor to conform. It doesn't include a requirement to detect and report error conditions that occur during program execution. Subclause 6.7.1 enumerates several error conditions, but 6.7.1.2p9 says the set of error conditions for an ALLOCATE statement is processor dependent. Presumably this means any error conditions in addition to those specified. 6.7.1.2p9 then requires a processor to initiate error termination if an error condition occurs during execution of an ALLOCATE statement that does not contain a STAT= specifier. How can it be required to initiate error termination if it isn't required to detect the errors? This isn't covered by 1.5p2(1) because that item is conditional on the program being a standard-conforming program. If an error condition occurs during execution of a program it is by definition not standard conforming. Similar requirements appear in 6.7.3 concerning the DEALLOCATE statement, and throughout clauses 9 and 10. 2. Edits [23:27+ 1.5p2(6)+]------------------------------------------------------ Editor: Insert an item in the list: "(6a) It contains the ability to detect and report error conditions specified in this part of ISO/IEC 1539 if they occur during execution of the program;" [128:28 6.7.1.2p9]------------------------------------------------------ Editor: Replace "The set ... statement" by "Whether error conditions in addition to those specified in 6.7.1 can occur during execution of an ALLOCATE statement" [130:14 6.7.3.1p3]------------------------------------------------------ Editor: Replace "The set ... statement" by "Whether error conditions in addition to those specified in 6.7.3 can occur during execution of a DEALLOCATE statement" [195:9 8.5.7p4]--------------------------------------------------------- Editor: Delete "of execution" (it apparently isn't needed at [128:29] or [130:15]). [195:14 8.5.7p6]-------------------------------------------------------- Editor: Replace "The set ... in" by "Whether error conditions in addition to those specified in 8.5 can occur during execution of". [240:27 9.11.1p1]------------------------------------------------------- Editor: Replace "The set ... conditions" by "Whether error conditions in addition to those specified in Clause 9 or 10 can occur during execution of an input/output statement". [241:5 9.11.2p2]-------------------------------------------------------- Editor: Delete "of the program" (it apparently isn't needed at [128:29] or [130:15]). [348:4 13.7.57p6]------------------------------------------------------- Editor: Delete "of execution of the image" (it apparently isn't needed at [128:29] or [130:15]). [458:18 16.6.6p1(14)]--------------------------------------------------- Editor: Replace "exists" by "occurs". [461:38 A.2]------------------------------------------------------------ Editor: Replace "the set ... in" by "whether error conditions in addition to those specified in 6.7.1 or 6.7.3 can occur during execution of". [462:25 A.2]------------------------------------------------------------ Editor: Replace "the set ... in" by "whether error conditions in addition to those specified in 8.5 can occur during execution of". [463:30 A.2]------------------------------------------------------------ Editor: Replace "the set ... in" by "whether error conditions in addition to those specified in Clause 9 or 10 can occur during execution of". 3. Questions without answers or edits [352:32-37 13.7.67p3 STATUS]-------------------------------------------- Two values are defined for the optional STATUS argument of the GET_ENVIRONMENT_VARIABLE subroutine. They aren't defined to be error conditions. But then the specification allows other values for other error processor-dependent conditions. o Are the conditions specified error conditions? o If they occur, is error termination initiated?