On Thu, 6 Mar 2008, Akim Demaille wrote: > Le 6 mars 08 ? 01:49, Joel E. Denny a ?crit : > > > > There is also -d which takes no > > > argument, although the long option does :( I'd prefer that short and > > > long options have the same behavior, at least to avoid lying when we > > > state > > > > > > Mandatory arguments to long options are mandatory for short > > > options too. > > > > > > but I guess POSIX will make trouble? And anyway, this is likely to > > > break existing Makefiles :( > > > > It seems like we're stuck with this one exception. > > So you do confirm that POSIX require this, right?
I think so. Open Group does not specify an argument for -d. It also says: Options without option-arguments should be accepted when grouped behind one '-' delimiter. Thus, -d can be bundled with other short options. For example, -dv. If -d takes an argument, v becomes the argument rather than another option. > I always lose > the URL of the reference, I found > http://linux-documentation.com/en/man/man1p/yacc.html which does > confirm this. I always google "open group yacc". > > Maybe we should add > > the statement: > > > > The same is true for optional arguments with one exception: unlike > > --defines, -d cannot take an argument since POSIX Yacc requires that -d > > can be bundled with other short options. > > > > This would at least help future developers know the scheme we're trying to > > follow. It might help users remember how the options go as well. > > Overkill? > > I don't know. Another option would be to introduce -D which would > be the real match to --define. I tend to prefer this. And we > deprecate -d with an argument. I like that better too.