summaryrefslogtreecommitdiff
path: root/gcc/opts.h
Commit message (Collapse)AuthorAgeFilesLines
* * Makefile.in (FLAGS_H): New.rakdver2004-06-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | (flags.h): Replace by FLAGS_H. * c.opt: Document Var, VarExists, Init and Report attributes. * common.opt: Fill the values of the attributes. * diagnostic.c (flag_fatal_errors): Do not define. * except.c (flag_non_call_exceptions): Do not define. * flags.h: Include options.h. Remove declarations conflicting with the automatically defined ones. * opts.c: Remove automatically defined variables. (handle_option): Perform default initialization. (common_handle_option): Do not handle options covered by the default initialization. * opts.h (struct cl_option): Add flag_var, has_set_value and set_value fields. (CL_REPORT): New. * opts.sh: Generate variable declarations, handle CL_REPORT. * toplev.c: Remove automatically defined variables. (f_options): Removed. (print_switch_values): Use cl_options instead of f_options. * toplev.h (version_flag): Declaration removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83105 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c: Fix comment formatting.kazu2003-08-191-2/+2
| | | | | | | | | | | | | | | | * c-common.h: Likewise. * c-decl.c: Likewise. * cppinit.c: Likewise. * cpplib.h: Likewise. * emit-rtl.c: Likewise. * input.h: Likewise. * line-map.h: Likewise. * opts.c: Likewise. * opts.h: Likewise. * simplify-rtx.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70577 138bc75d-0d04-0410-961f-82ee72b054a4
* * opts.c (in_fnames, num_in_fnames): Moved here from c-opts.bothner2003-07-311-0/+9
| | | | | | | | | | | | | | | | | | | | | (add_input_filename): New function. (handle_options): Call add_input_filename directly instead of with a lang hook. * opts.h (in_fnames, num_in_fnames): Moved here. (add_input_filename): Declare. * c-decl.c: Need to #include opts.h. * Makefile.in (c-decl.o): Also depends on opts.h. * c-opts.c (in_fnames, num_in_fnames): Moved to opts.c. (c_common_handle_filename): Replaced by add_input_filename. * c-common.h (in_fnames, num_in_fnames, c_common_handle_filename): Remove. * langhooks.h (struct lang_hooks): Remove handle_filename hook. * langhooks-def.h (LANG_HOOKS_HANDLE_FILENAME): Remove macro. (LANG_HOOKS_INITIALIZER): Remove use of LANG_HOOKS_HANDLE_FILENAME. * c-lang.c (LANG_HOOKS_HANDLE_FILENAME): Remove macro. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70012 138bc75d-0d04-0410-961f-82ee72b054a4
* * c.opt: Document Uncodumented; use it. Document ObjC options.neil2003-07-171-0/+1
| | | | | | | | | | | | | | | * opts.c (print_filtered_help): Skip undocumented switches. * opts.h (CL_UNDOCUMENTED): New. * opts.sh: Handle Undocumented. * toplev.c (documented_lang_options): Prevent its becoming empty. f: * lang-options.h: Remove. * lang.opt: Document most options. objc: * lang-options.h: Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69494 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Update.neil2003-07-081-0/+1
| | | | | | | | | | | | | | | | | * c-opts.c (c_common_handle_option): opt_text now contains the '-'. * c.opt: Update documentation. * common.opt: Add some help text. * opts.c: Include intl.h. (wrap_help, print_help): New. (find_opt, handle_option, common_handle_option): opt_text now contains the '-'. Use print_help to output help. * opts.h (struct cl_option): New member "help". * opts.sh: Update to handle help text output and to prepend options with '-'. * toplev.c (display_help): Remove some help text. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69068 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h (c_common_init_options): New prototype.neil2003-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-opts.c (deferred_size): Remove. (defer_opt): Array is now pre-allocated. (c_common_init_options): Pre-allocate deferred_opts. Make lang_flags unsigned. (push_command_line_options): Free deferred_opts. * hooks.c (hook_uint_uint_constcharptrptr_0): New. * hooks.h (hook_uint_uint_constcharptrptr_0): New. * langhooks-def.h (LANG_HOOKS_INIT_OPTIONS): Update. * langhooks.h (struct lang_hooks): New prototype for init_options. * main.c (main): Cast argv. * opts.c (handle_option, handle_options): Update prototypes. (decode_options): save_argc, save_argv are not global. Constify. * opts.h (decode_options): New prototype. * toplev.c (general_init): New protoype. (save_argv): Make static. (save_argc): Remove. (print_switch_values, general_init): Constify. (toplev_main): Save argv. * toplev.h (toplev_main): Update prototype. (save_argc, save_argv): Remove. ada: * misc.c (save_argc, save_argv): Make static. (gnat_init_options): New prototype. (gnat_init_options): Update. f: * top.c (ffe_init_options): Update prototype. * top.h (ffe_init_options): Update prototype. java: * lang.c (java_init_options): Update prototype. treelang: * tree1.c (treelang_init_options): Update prototype. * treelang.h (treelang_init_options): Update prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68850 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Update.neil2003-06-281-2/+1
| | | | | | | | | | | | | | | * opts.c: Include tm_p.h. (handle_options): Make static. (decode_options): Copied from toplev.c. * opts.h (decode_options): New. * toplev.c (parse_options_and_default_flags): Move most to opts.c, some to... (general_init): ...here. (toplev_main): Use decode_options instead. * toplev.h (save_argc, save_argv): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68629 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (complain_wrong_lang, write_langs): Remove.neil2003-06-251-1/+3
| | | | | | | | | | | | | | | | (c_common_handle_option): Complaints about wrong language are handled in opts.c now. * opts.c (complain_wrong_lang, write_langs, handle_options): New. (find_opt): Fix thinko. (handle_option): Update prototype. Complain about switches for a different front end. * opts.h (lang_names, handle_options): New. (handle_option): Remove. * opts.sh: Write out language names array. * toplev.c (parse_options_and_default_flags): Use handle_options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68495 138bc75d-0d04-0410-961f-82ee72b054a4
* * opts.c (find_opt): Fix to always guarantee a find of aneil2003-06-221-0/+1
| | | | | | | | | switch with joined parameter. * opts.h (struct cl_option): New member back_chain. * opts.sh: Update to calculate and add back_chain member. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68324 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (c_common_handle_option): s/on/value/.neil2003-06-161-1/+3
| | | | | | | | | | | | | | | | | | | | (OPT_fabi_version_, OPT_ftabstop_, OPT_ftemplate_depth_): Use value directly rather than converting the argument. * c.opt: Update docs. Use UInteger where appropriate. * common.opt: Use UInteger where appropriate. * opts.c (integral_argument): New. (handle_argument): Handle integral arguments, and optional joined arguments. (common_handle_option): Update. * opts.h (CL_MISSING_OK, CL_UINTEGER): New. * opts.sh: Handle JoinedOrMissing and UInteger flags. java: * lang.c (java_handle_option): Special-casing of optional joined arguments no longer needed. * lang.opt: Update switches that take optional argument. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67999 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (lang_flags): Update for new spelling of flags.neil2003-06-151-10/+1
| | | | | | | | | | | | | | | | | | | | | | | (write_langs): Similarly. * c.opt: Specify languages. * opts.h: Remove languages. * opts.sh: Recognise front-end defined languages. ada: * lang.opt: Declare Ada. * misc.c (gnat_init_options): Update. doc: * sourcebuild.texi: Update. f: * lang.opt: Declare F77. java: * lang.opt: Declare Java. * lang.c (java_init_options): Update. treelang: * lang.opt: Declare Treelang. Update. * tree1.c (treelang_init_options): Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67976 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Update to use common.opt and lang_opt_files.neil2003-06-141-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (c-options.c, c-options.h): Remove. (options.c, options.h): Add. * c-opts.c: Include options.h not c-options.h. * common.opt: New file. * configure, configure.in: Add lang_opt_files. * opts.c: Include flags.h and diagnostic.h. (common_handle_option): New. (handle_option): Update to recognize common options and all language-dependent options. * opts.h (CL_F77, CL_JAVA, CL_ADA, CL_COMMON, CL_TREELANG): New. (struct cl_option): Make flags of type int. * opts.h: Flag option with front ends to which it applies. Handle duplicate options. * toplev.c (filename): Remove. (independent_decode_option): Don't handle filenames and -quiet. (process_options, do_compile): Update. ada: * Make-lang.in: Update to use options.c and options.h. * misc.c: Include options.h not aoptions.h. (gnat_handle_option): Abort on unrecognized switch. (gnat_init_options): Request Ada switches. cp: * Make-lang.in: Remove c-options.o. f: * Make-lang.in: Update to use options.c and options.h. * top.c: Include options.h not f-options.h. (gnat_handle_option): Abort on unrecognized switch. (ffe_init_options): From com.c. Request F77 options. (ffe_handle_options): Abort on unrecognized switch. * com.c (ffe_init_options): Move to top.c. * top.h (fee_init_options): New. java: * Make-lang.in: Update to use options.c and options.h. * lang.c: Include options.h not j-options.h. (java_handle_option): Abort on unrecognized option. (java_init_options): Request Java switches. treelang: * Make-lang.in: Update to use options.c and options.h. * tree1.c: Include options.h not t-options.h. (treelang_init_options): New. (treelang_handle_option): Abort on unrecognized switch. * treetree.c (LANG_HOOKS_INIT_OPTIONS): Override. * treetree.h (treelang_init_options): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67941 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Rename options.c and options.h to c-options.c andneil2003-06-081-0/+10
| | | | | | | | | | | | | c-options.h. (OBJS): Remove options.o. * c-opts.c: Don'tInclude c-options.h instead of options.h. * opts.c: Don't include options.h. (find_opt): Can't use enum opt_code or N_OPTS. * opts.h (struct cl_option, cl_options, cl_options_count): Move from... * opts.sh: ... here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67615 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (OJBS, c-opts.o): Update.neil2003-06-071-0/+34
(c-options.c, c-options.h): Rename options.h and options.c. (options.h): Rename options_.h. (opts.o): New. * c-common.h (c_common_handle_option): Replace c_common_decode_option. (c_common_init_options): Update prototype. * c-lang.c (c_init_options): Update prototype. (LANG_HOOKS_HANDLE_OPTION): Override. (LANG_HOOKS_DECODE_OPTION): Drop. * c-opts.c: Include opts.h and options.h instead of c-options.h and c-options.c. (lang_flags): Move to file scope. (find_opt, c_common_decode_option): Remove. (CL_C, CL_OBJC, CL_CXX, CL_OBJCXX, CL_JOINED, CL_SEPARATE, CL_REJECT_NEGATIVE): Move to opts.h. (missing_arg): Update prototype. (c_common_init_options): Update for new prototype. (c_common_handle_options): Filenames are passed as N_OPTS. * hooks.c (hook_int_void_0): New. * hooks.h (hook_int_void_0): New. * langhooks-def.h (LANG_HOOKS_INIT_OPTIONS): New default. (LANG_HOOKS_HANDLE_OPTION): Default to NULL for now. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (init_options): Update. (handle_option): New. * opts.c, opts.h: New files. * opts.sh: Update c file to include opts.h and options.h. * toplev.c: Include opts.h; change options.h to options_.h. (parse_options_and_default_flags): Get lang_mask, use handle_option for language-specific handling. * objc/objc-lang.c (LANG_HOOKS_DECODE_OPTON): Drop. (LANG_HOOKS_HANDLE_OPTION): Override. (objc_init_options): Update. ada: * misc.c (gnat_init_options): Update. cp: * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop. (LANG_HOOKS_HANDLE_OPTION): Override. * cp-tree.h (cxx_init_options): Update. * lex.c (cxx_init_options): Update. f: * com.c (ffe_init_options): Update. java: * lang.c (java_init_options): Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67584 138bc75d-0d04-0410-961f-82ee72b054a4