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/opts.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gcc/opts.h') diff --git a/gcc/opts.h b/gcc/opts.h index 6613da0..005a846 100644 --- a/gcc/opts.h +++ b/gcc/opts.h @@ -121,10 +121,12 @@ struct cl_decoded_option /* The canonical form of the option and its argument, for when it is necessary to reconstruct argv elements (in particular, for processing specs and passing options to subprocesses from the - driver). The first element of this array is non-NULL; the second - is NULL if the canonical form uses only one argv element, - non-NULL otherwise. */ - const char *canonical_option[2]; + driver). */ + const char *canonical_option[4]; + + /* The number of elements in the canonical form of the option and + arguments; always at least 1. */ + size_t canonical_option_num_elements; /* For a boolean option, 1 for the true case and 0 for the "no-" case. For an unsigned integer option, the value of the -- cgit v1.1