From eea13eaddc2a75a685f8a074e57f3510f9ca9c57 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 28 Jul 2010 10:36:21 +0100 Subject: darwin-driver.c (SWITCH_TAKES_ARG, [...]): Remove. * 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. From-SVN: r162620 --- gcc/gcc.h | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'gcc/gcc.h') diff --git a/gcc/gcc.h b/gcc/gcc.h index af8f002..8d59773 100644 --- a/gcc/gcc.h +++ b/gcc/gcc.h @@ -32,31 +32,6 @@ struct spec_function const char *(*func) (int, const char **); }; -/* 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")) - - /* These are exported by gcc.c. */ extern int do_spec (const char *); extern void record_temp_file (const char *, int, int); -- cgit v1.1