This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
RE: How to create both -option-name-* and -option-name=* options?
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Mark Mitchell'" <mark at codesourcery dot com>
- Cc: "'Brooks Moses'" <brooks dot moses at codesourcery dot com>, <gcc at gcc dot gnu dot org>, <fortran at gcc dot gnu dot org>
- Date: Fri, 10 Nov 2006 20:47:09 -0000
- Subject: RE: How to create both -option-name-* and -option-name=* options?
On 10 November 2006 20:06, Mark Mitchell wrote:
> Dave Korn wrote:
>
>> It may seem a bit radical, but is there any reason not to modify the
>> option-parsing machinery so that either '-' or '=' are treated
>> interchangeably for /all/ options with joined arguments? That is,
>> whichever is specified in the .opt file, the parser accepts either?
>
> I like that idea.
Would it be a suitable solution to just provide a specialised wrapper around
the two strncmp invocations in find_opt? It seems ok to me; we only want this
change to affect comparisons, we call whichever form is listed in the .opts
file the canonical form and just don't worry if the (canonical) way a flag is
reported in an error message doesn't quite match when the non-canonical form
was used on the command line?
(I'm not even going to mention the 'limitation' that we are now no longer
free to create -fFLAG=VALUE and -fFLAG-VALUE options with different meanings!)
cheers,
DaveK
--
Can't think of a witty .sigline today....