summaryrefslogtreecommitdiff
path: root/gcc/opth-gen.awk
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-20 21:02:46 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-20 21:02:46 +0000
commit615ef0bb3fc9c4ebb5349ae424373e14bd06b7ed (patch)
tree2c4f1fab67e1d031a842bdda5d4777aed748b3b5 /gcc/opth-gen.awk
parentcafb8a7729b9f3cde334d1890dff54478b0fb1dd (diff)
downloadgcc-615ef0bb3fc9c4ebb5349ae424373e14bd06b7ed.tar.gz
PR other/32998
* opth-gen.awk: Generate definitions of OPT_SPECIAL_unknown, OPT_SPECIAL_program_name and OPT_SPECIAL_input_file. * opts-common.c (find_opt): Return OPT_SPECIAL_unknown on failure. (decode_cmdline_option): Update for this return value. Set orig_option_with_args_text field. Set arg field for unknown options. Make static. (decode_cmdline_options_to_array): New. (prune_options): Update handling of find_opt return value. * opts.c (read_cmdline_option): Take decoded option. Return void. (read_cmdline_options): Take decoded options. (decode_options): Add parameters for decoded options. Use decode_cmdline_options_to_array. Use decoded options for -O scan. Use integral_argument for -O parameters. Update call to read_cmdline_options. (enable_warning_as_error): Update handling of find_opt return value. * opts.h: Update comment on unknown options. (struct cl_decoded_option): Update comments on opt_index and arg. Add orig_option_with_args_text. (decode_cmdline_option): Remove. (decode_cmdline_options_to_array): Declare. (decode_options): Update prototype. * toplev.c (save_argv): Remove. (save_decoded_options, save_decoded_options_count): New. (read_integral_parameter): Remove. (print_switch_values): Use decoded options. (toplev_main): Don't set save_argv. Update call to decode_options. * toplev.h (read_integral_parameter): Remove. * varasm.c (elf_record_gcc_switches): Don't handle holding back names. c-family: * c-common.c (parse_optimize_options): Update call to decode_options. fortran: * options.c (gfc_handle_option): Don't handle N_OPTS. testsuite: * gcc.dg/opts-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161053 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opth-gen.awk')
-rw-r--r--gcc/opth-gen.awk5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/opth-gen.awk b/gcc/opth-gen.awk
index cf2ef9683c8..19af0ef0f0c 100644
--- a/gcc/opth-gen.awk
+++ b/gcc/opth-gen.awk
@@ -358,7 +358,10 @@ for (i = 0; i < n_opts; i++) {
print " " enum "," s "/* -" opts[i] " */"
}
-print " N_OPTS"
+print " N_OPTS,"
+print " OPT_SPECIAL_unknown,"
+print " OPT_SPECIAL_program_name,"
+print " OPT_SPECIAL_input_file"
print "};"
print ""
print "#endif /* OPTIONS_H */"