How to create both -option-name-* and -option-name=* options?
Richard Sandiford
richard@codesourcery.com
Mon Nov 13 17:26:00 GMT 2006
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
More information about the Gcc
mailing list