Document Number: J4/02-0151
July 17, 2002
D-4 Page 1 of 2
Defect Report Response D-4 (for 01-0376/138)
Subject:
Overlapping Operands in RELEASE Statement
Author:
Charles C. Stevens
\
Previous Version:
J4/02-0145
References in Document:
1.
ISO/IEC FDIS 1989:2002, Programming language COBOL:
a.
Page 390, 14.5.9, Overlapping operands
b.
Page 503, 14.8.30, RELEASE statement, syntax rule 2
c.
Page 505, 14.8.32, RETURN statement, syntax rule 1
Other References:
2.
J4/01-0376 – Comments on SC/22 N2304 (FCD 1989) (Klein/Josling)
Submitter:
William M. Klein ( wmklein @ ix.netcom.com ) on behalf of Tim Josling
( tej @ melbpc.org.au )
The defect was submitted directly to J4 by Mr. Klein, a US citizen, on behalf of
Tim Josling, a resident of Australia.
Nature of Defect:
Reference 1b: It may be difficult for the implementor to check, as is required for
syntax errors, that record-name-1 and identifier-1 do not share the same storage
area e.g. if identifier-1 is in linkage or is based.
Solution Proposed by Submitter:
Document Number: J4/02-0151
July 17, 2002
D-4 Page 2 of 2
Rule should be changed to say that results are undefined if the areas overlap.
Discussion at Meeting 238:
It is indeed not possible for the implementor to detect, as this rule (and the
corresponding Syntax Rule 1 in Reference 1c) requires, overlapping or cospatial
operands in every case. That the results are undefined for any successfully-
compiled statements in which the operands overlap is adequately covered by
Reference 1a.
Proposed response:
The implementor cannot detect in all cases whether the operands of a RELEASE
… FROM address the same storage area. No new rule is needed, however, to
point out that the results are unpredictable in such cases; Reference 1a
adequately provides for that case.
Changes Needed:
The following changes to the Standard are needed:
On Page 503, 14.8.30, RELEASE statement, delete the second sentence from
syntax rule 2.
On Page 505, 14.8.32, RETURN statement, delete syntax rule 1.