diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-28 09:36:21 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-28 09:36:21 +0000 |
commit | 71a2f35e5978e483790debb7a469f4c28dc5ca19 (patch) | |
tree | 8fceb4a0955d8a639a2e7420a4f65b586c873f62 /gcc/defaults.h | |
parent | fbe77c753903c24f81735a3458d04fa07f0f6f18 (diff) | |
download | gcc-71a2f35e5978e483790debb7a469f4c28dc5ca19.tar.gz |
* config/darwin-driver.c (SWITCH_TAKES_ARG,
WORD_SWITCH_TAKES_ARG): Remove.
* cppspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Remove.
* defaults.h (DEFAULT_SWITCH_TAKES_ARG,
DEFAULT_WORD_SWITCH_TAKES_ARG): Move from gcc.h.
(SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Move default
definitions from gcc.c.
* gcc.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Move to
defaults.h.
* gcc.h (DEFAULT_SWITCH_TAKES_ARG, DEFAULT_WORD_SWITCH_TAKES_ARG):
Move to defaults.h.
* opts-common.c: Include tm.h.
(decode_cmdline_option): Use SWITCH_TAKES_ARG and
WORD_SWITCH_TAKES_ARG to count arguments to unknown options.
Handle more than one argument. Set canonical_option_num_elements.
(decode_cmdline_options_to_array): Set
canonical_option_num_elements and trailing elements of
canonical_option.
* opts.h (struct cl_decoded_option): Allow four elements in
canonical_option. Add field canonical_option_num_elements.
* Makefile.in (opts-common.o): Update dependencies.
ada:
* gcc-interface/misc.c (gnat_init_options): Ignore erroneous
options. Check canonical_option_num_elements on options copied.
fortran:
* gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
Remove.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162620 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/defaults.h')
-rw-r--r-- | gcc/defaults.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/defaults.h b/gcc/defaults.h index c2e68a742e3..c772ff5e9dd 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -32,6 +32,38 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define GET_ENVIRONMENT(VALUE, NAME) do { (VALUE) = getenv (NAME); } while (0) #endif +/* This defines which switch letters take arguments. */ + +#define DEFAULT_SWITCH_TAKES_ARG(CHAR) \ + ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \ + || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \ + || (CHAR) == 'I' || (CHAR) == 'J' || (CHAR) == 'm' \ + || (CHAR) == 'x' || (CHAR) == 'L' || (CHAR) == 'A' \ + || (CHAR) == 'B' ) + +/* This defines which multi-letter switches take arguments. */ + +#define DEFAULT_WORD_SWITCH_TAKES_ARG(STR) \ + (!strcmp (STR, "Tdata") || !strcmp (STR, "Ttext") \ + || !strcmp (STR, "Tbss") || !strcmp (STR, "include") \ + || !strcmp (STR, "imacros") || !strcmp (STR, "aux-info") \ + || !strcmp (STR, "idirafter") || !strcmp (STR, "iprefix") \ + || !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \ + || !strcmp (STR, "iquote") || !strcmp (STR, "isystem") \ + || !strcmp (STR, "isysroot") \ + || !strcmp (STR, "-param") || !strcmp (STR, "specs") \ + || !strcmp (STR, "MF") || !strcmp (STR, "MT") || !strcmp (STR, "MQ") \ + || !strcmp (STR, "fintrinsic-modules-path") \ + || !strcmp (STR, "dumpbase") || !strcmp (STR, "dumpdir")) + +#ifndef SWITCH_TAKES_ARG +#define SWITCH_TAKES_ARG(CHAR) DEFAULT_SWITCH_TAKES_ARG (CHAR) +#endif + +#ifndef WORD_SWITCH_TAKES_ARG +#define WORD_SWITCH_TAKES_ARG(STR) DEFAULT_WORD_SWITCH_TAKES_ARG (STR) +#endif + /* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable or function named NAME. LABELNO is an integer which is different for each call. */ |