Email List: Xaustin-review-lX
[All Lists]

Defect in XCU c99

To: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Defect in XCU c99
From: yyyyyy@xxxxxxxxxxx
Date: Wed, 29 Sep 2004 00:54:25 +0100 (BST)
        Defect report from : Paul Eggert , UCLA

(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)

@ page 217 line 8538 section c99 comment {20040928e}

Problem:

Edition of Specification (Year): 2004

Defect code :  3. Clarification required

This is a question about how greedy option-parsing is required (or
allowed) to be.  Consider the command

   c99 -l y foo.c

which uses the Yacc library's definition of "main".  Here, "-l y" is
an operand, and the c99 description and the utility syntax guidelines
are all being followed.  The question is whether an implementation is
required to accept this form, or can it reject the "-l" as an unknown
option, so that a portable application must use "c99 -- -l y foo.c"
instead?

XCU page 211 lines 8286-8288 say, "The c99 utility shall conform to
the ... Utility Syntax Guidelines, except that: * The -l library
operands have the format of options, ...".  This suggests that one
cannot resolve the question of "c99 -l y foo.c" merely by
appealing to the guidelines, since this part of c99 is explicitly an
exception to the guidlines.

Common practice is for implementations to accept "c99 -l y foo.c" (or,
at least "c89 -l y foo.c", which is what I checked on Solaris 9 with
Forte Developer 7 C 5.4).

Also, one minor editorial bug (independent of the main question): in
line 8538 the standard says "-l options" where "-l operands" was
clearly intended.


Action:

In c99 APPLICATION USAGE (XCU page 217 line 8538), change:

   -l options.

to:

   -l operands, because the standard requires options to appear before
   operands.  The standard allows the first operand to be an -l
   operand, so conforming implementations must accept usages like "c99
   -l y foo.c".

<Prev in Thread] Current Thread [Next in Thread>