>Casper.Dik at Sun.COM wrote: >[snip] >> The standard ONLY says that a PORTABLE invocation of a program should >> use "--" to escape any first argument starting with "-" and that programs >> not accepting options should skip that argument. >> >> Solaris printf does just that. >> >> The standard does NOT require an argument of the form -------- to elicit >> an error. > >I disagree since "--------" starts with a '-' character. If this >argument comes before the "--" argument it needs to be interpreted as >option. If you disagree we have to drag this in front of Don Dragun >and/or file a "clarification request" to the Austin Group. >
You may disagree but perhaps you can tell me where it says so in the standard? The wording is very clear and I don't see where you get that interpretation. The requirement is that "--" is discarded so that portable invocations work. That is what is says, nothing more. The second sentence explaining this makes it perfectly clear that the intention is NOT to require implementations to implement option parsing when no options exist but rather to make it possible to have portable invocations. Casper