aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.h
AgeCommit message (Collapse)AuthorFilesLines
2003-08-19c-common.c: Fix comment formatting.Kazu Hirata1-2/+2
* c-common.c: Fix comment formatting. * 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. From-SVN: r70577
2003-07-31opts.c (in_fnames, [...]): Moved here from c-opts.Per Bothner1-0/+9
* opts.c (in_fnames, num_in_fnames): Moved here from c-opts. (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. From-SVN: r70012
2003-07-17c.opt: Document Uncodumented; use it.Neil Booth1-0/+1
* c.opt: Document Uncodumented; use it. Document ObjC options. * 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. From-SVN: r69494
2003-07-08Makefile.in: Update.Neil Booth1-0/+1
* Makefile.in: Update. * 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. From-SVN: r69068
2003-07-02c-common.h (c_common_init_options): New prototype.Neil Booth1-1/+1
* c-common.h (c_common_init_options): New prototype. * 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. From-SVN: r68850
2003-06-28Makefile.in: Update.Neil Booth1-2/+1
* Makefile.in: Update. * 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. From-SVN: r68629
2003-06-25c-opts.c (complain_wrong_lang, [...]): Remove.Neil Booth1-1/+3
* c-opts.c (complain_wrong_lang, write_langs): Remove. (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. From-SVN: r68495
2003-06-22opts.c (find_opt): Fix to always guarantee a find of a switch with joined ↵Neil Booth1-0/+1
parameter. * opts.c (find_opt): Fix to always guarantee a find of a switch with joined parameter. * opts.h (struct cl_option): New member back_chain. * opts.sh: Update to calculate and add back_chain member. From-SVN: r68324
2003-06-16c-opts.c (c_common_handle_option): s/on/value/.Neil Booth1-1/+3
* c-opts.c (c_common_handle_option): s/on/value/. (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. From-SVN: r67999
2003-06-15c-opts.c (lang_flags): Update for new spelling of flags.Neil Booth1-10/+1
* c-opts.c (lang_flags): Update for new spelling of flags. (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. From-SVN: r67976
2003-06-14Makefile.in: Update to use common.opt and lang_opt_files.Neil Booth1-4/+10
* Makefile.in: Update to use common.opt and lang_opt_files. (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. From-SVN: r67941
2003-06-08Makefile.in: Rename options.c and options.h to c-options.c and c-options.h.Neil Booth1-0/+10
* Makefile.in: Rename options.c and options.h to c-options.c and 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. From-SVN: r67615
2003-06-07Makefile.in (OJBS, c-opts.o): Update.Neil Booth1-0/+34
* Makefile.in (OJBS, c-opts.o): Update. (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. From-SVN: r67584