A NOTE has been added to this issue. ====================================================================== https://austingroupbugs.net/view.php?id=1582 ====================================================================== Reported By: nmeum Assigned To: ====================================================================== Project: 1003.1(2016/18)/Issue7+TC2 Issue ID: 1582 Category: Shell and Utilities Type: Clarification Requested Severity: Editorial Priority: normal Status: New Name: Sören Tempel Organization: User Reference: Section: ed Page Number: 2691 Line Number: 87831 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2022-04-30 10:23 UTC Last Modified: 2022-05-05 16:29 UTC ====================================================================== Summary: Algorithm for computing addresses for "address chains" is not clearly specified ======================================================================
---------------------------------------------------------------------- (0005829) geoffclare (manager) - 2022-05-05 16:29 https://austingroupbugs.net/view.php?id=1582#c5829 ---------------------------------------------------------------------- Interpretation response ------------------------ The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor. Rationale: ------------- In order to evaluate the address list ",," two rules need to be applied, and it is unclear how they interact. Line 87365 states:<blockquote>If more than the required number of addresses are provided to a command that requires zero addresses, it shall be an error. Otherwise, if more than the required number of addresses are provided to a command, the addresses specified first shall be evaluated and then discarded until the maximum number of valid addresses remain, for the specified command.</blockquote> If the "omitted addresses" rule is applied first, then "the addresses specified first" are those that result from that rule, leading to ",," being evaluated as "1,$ 1,$", which is invalid syntax for an address list (unless the implementation accepts this as an extension). If it is applied during the address counting performed for the above rule, then the first ',' becomes "1,$" and then the second ',' is evaluated after this, leading to the above rule being applied to "1,$,$". It is clear from the rationale in the standard, that it is intended for the latter to be used, but the normative text does not say so. Notes to the Editor (not part of this interpretation): ------------------------------------------------------- After line 87382 add a new paragraph:<blockquote>If an address is omitted between two separators, the rule shall be applied to the first separator and the resulting second address shall be used as the first address for the second separator. For example, with the address list ",," the first ',' becomes "1,$" and the '$' is treated as the first address for the second ',', resulting in "1,$,$".</blockquote> Issue History Date Modified Username Field Change ====================================================================== 2022-04-30 10:23 nmeum New Issue 2022-04-30 10:23 nmeum Name => Sören Tempel 2022-04-30 10:23 nmeum Section => ed 2022-04-30 10:23 nmeum Page Number => 2691 2022-04-30 10:23 nmeum Line Number => 87831 2022-05-05 16:29 geoffclare Note Added: 0005829 ======================================================================