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: Richard Sandiford <richard at codesourcery dot com>
- To: Brooks Moses <brooks dot moses at codesourcery dot com>
- Cc: fortran at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Mon, 13 Nov 2006 15:37:35 +0000
- Subject: Re: How to create both -option-name-* and -option-name=* options?
- References: <45542B6A.5060409@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com> writes:
> Anyhow, if I try this, I get the following error (trimmed slightly for
> clarity):
>
> gcc -c [...] ../../svn-source/gcc/genconstants.c
> In file included from tm.h:7,
> from ../../svn-source/gcc/genconstants.c:32:
> options.h:659: error: redefinition of `OPT_ffixed_line_length_'
> options.h:657: error: `OPT_ffixed_line_length_' previously defined
> here
>
> This is because both the '=' and the '-' in the option name reduce to a
> '_' in the enumeration name, which of course causes the enumerator to
> get defined twice -- and that's a problem, even though I'm quite happy
> for the options to both be treated identically.
>
> There's not really any good way around this problem, is there?
I didn't see anyone mention this in the thread, so FWIW, we already
have this problem with -finline-limit. The option scripts deal with
it as a special case.
I'm not saying that we should continue to do it like that... a more
general approach is probably better. I just wanted to point out that
there was precedent.
Richard