summaryrefslogtreecommitdiff
path: root/gcc/c-opts.c
Commit message (Collapse)AuthorAgeFilesLines
* * Makefile.in: Rename options.c and options.h to c-options.c andneil2003-06-081-1/+1
| | | | | | | | | | | | | 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-229/+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
* * c-opts.c (c_common_handle_option): New, pulled out ofneil2003-06-031-16/+29
| | | | | | | | c_common_decode_option. Substitute uses of argv. (c_common_decode_option): Broken into two. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67354 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (CL_REJECT_NEGATIVE): New.neil2003-06-021-16/+16
| | | | | | | | | (c_common_decode_option): Update to use it. * c.opt: Update documentation; use RejectNegative. * opts.sh: Handle RejectNegative. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67325 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (c-opts.o, c-options.h): Update dependencies.neil2003-05-311-311/+48
| | | | | | | | | | | | | | | | * c-opts.c: Include c-options.h and c-options.c. (CL_C_ONLY, CL_OBJC_ONLY, CL_CXX_ONLY, CL_OBJCXX_ONLY): Rename CL_C, CL_OBJC, CL_CXX, CL_OBJCXX. (CL_ARG, CL_ALL, COMMAND_LINE_OPTIONS, struct cl_option, OPT, opt_comp): Remove. (missing_arg, c_common_init_options, c_common_decode_option, write_langs): Update for macro redefinitions and enumeration name changes. * c.opt, opts.sh: New files. * doc/passes.texi: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67278 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (c_common_decode_option): Don't accept dollarsneil2003-05-191-0/+1
| | | | | | | | as identifier characters in assembly. * doc/cpp.texi: Document this. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66976 138bc75d-0d04-0410-961f-82ee72b054a4
* Add a new flag, -W(no-)invalid-offsetof, to control whether oraustern2003-05-191-0/+5
| | | | | | | | not the compiler warns about incorrect use of the offsetof macro in C++. By default the warning is on. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66972 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c, c-common.h (dollars_in_ident): Remove.neil2003-05-171-1/+6
| | | | | | | | | | | | | | | | | | | * c-opts.c (DOLLARS_IN_IDENTIFIERS): Default to true. (c_common_init_options, c_common_decode_option): Set dollars_in_ident. * cpphash.h (warned_dollar): Rename warn_dollars. * cppinit.c (struct lang_flags, lang_defaults, cpp_set_lang) Permit dollars regardless of -std=. (post_options): Set warn_dollars. * cpplex.c (forms_identifier_p): Use warn_dollars. * config/darwin.h, config/alpha/vms.h, config/m68hc11/m68hc11.h: Remove redundant definitions of DOLLARS_IN_IDENTIFIERS. * doc/cpp.texi, doc/cppopts.texi, doc/invoke.texi, doc/tm.texi: Update documentation. testsuite: * gcc.dg/dollar.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66911 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic.c (output_format): Add support for %m.zack2003-05-131-4/+4
| | | | | | | | | | | | | | | | | | | (output_printf, output_verbatim, diagnostic_set_info, verbatim): Set err_no field of the text_info structure being initialized. (fatal_io_error): Delete function. * diagnostic.h (text_info): Add err_no field. * toplev.h (fatal_io_error): Delete prototype. * c-opts.c, c-pch.c, dwarfout.c, ggc-common.c, ggc-page.c, graph.c * toplev.c, config/mips/mips.c, config/rs6000/host-darwin.c * f/com.c, java/jcf-parse.c, java/jcf-write.c, java/lex.c * objc/objc-act.c: Replace all calls to fatal_io_error with calls to fatal_error; add ": %m" to the end of all the affected error messages. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66769 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-cppbuiltin.c (c_cpp_builtins): Move __STDC_HOSTED__ intoneil2003-05-111-1/+1
| | | | | | | | | | | | | | cpplib as it's a Standard Predefined Macro. * c-opts.c (finish_options): Pass flag_hosted to cpp_init_builtins. * cppinit.c (_cpp_init_builtins): Take HOSTED. Define __STDC_HOSTED__ appropriately. * cpplib.h (_cpp_init_builtins): Update. * fix-header.c (read_scan_file): Update. * doc/cpp.texi, doc/cppopts.texi: Update documentation. * cppfiles.c (find_or_create_entry): Preserve errno. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66688 138bc75d-0d04-0410-961f-82ee72b054a4
* PR C++/689gdr2003-05-111-1/+0
| | | | | | | | | | PR C++/9257 * c-opts.c (c_common_decode_option): Don't set warn_ctor_dtor_privacy wen -Wall. * c-common.c (warn_ctor_dtor_privacy): Don't turn on by default. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66684 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (COMMAND_LINE_OPTIONS): Reject -Wmissing-prototypesneil2003-05-061-2/+2
| | | | | | | and -Wstrict-prototypes if C++. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66533 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c/10604zack2003-05-031-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c (warn_sign_compare): Initialize to -1. * c-opts.c (c_common_init_options): Don't set warn_sign_compare here. (c_common_decode_option <OPT_Wall>): Set warn_sign_compare for C++ only. (c_common_post_options): Set warn_sign_compare from extra_warnings if it's still -1 at this point. * toplev.c (maybe_warn_unused_parameter): New static variable. (set_Wextra): New static function. (W_options): Remove "extra". (decode_W_option): Call set_Wextra. (independent_decode_option): Likewise. (set_Wunused): Cooperate with set_Wextra in setting warn_unused_parameter. (rest_of_compilation): No need to check extra_warnings as well as warn_uninitialized. * c-typeck.c (build_binary_op, build_conditional_expr): No need to check extra_warnings as well as warn_sign_compare. (internal_build_compound_expr): No need to check extra_warnings as well as warn_unused_value. * function.c (expand_function_end): No need to check extra_warnings as well as warn_unused_parameter. * stmt.c (expand_expr_stmt_value): No need to check extra_warnings as well as warn_unused_value. * cp/typeck.c (build_x_compound_expr): No need to check extra_warnings as well as warn_unused_value. * doc/invoke.texi: Clarify documentation of -Wsign-compare. * gcc.dg/compare7.c, g++.dg/warn/compare1.C: New testcases. * Makefile.in: Disable -Werror for gengtype-lex.o. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66436 138bc75d-0d04-0410-961f-82ee72b054a4
* * input.h (lineno): Rename to ...nathan2003-05-011-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (input_line): ... here. * tree.h (lineno): Rename to ... (input_line): ... here. * scan.h (lineno): Rename to ... (input_line): ... here. * toplev.c (lineno): Rename to ... (input_line): ... here. (push_srcloc, pop_srcloc): Rename lineno to input_line. * c-common.c (c_expand_start_cond, fname_decl): Likewise. * c-decl.c (poplevel, pop_label_level, lookup_label, lookup_tag, store_parm_decls, c_expand_body_1): Likewise. * c-errors.c (pedwarn_c99): Likewise. * c-format.c (status_warning): Likewise. * c-lex.c (fe_file_change, cb_def_pragma, c_lex): Likewise. * c-opts.c (c_common_post_options, c_common_parse_file): Likewise. * c-parse.in (save_filename, maybe_type_qual, ifc): Likwise. * c-semantics.c (finish_stmt_tree, build_stmt, emit_local_var, gentrtl_goto_stmt, genrtl_expr_stmt_value, genrtl_decl_stmt, genrtl_if_stmt, genrtl_while_stmt, genrtl_do_stmt, genrtl_return_stmt, genrtl_for_stmt, build_break_stmt, build_continue_stmt, genrtl_switch_stmt, genrtl_asm_stmt, prep_stmt, find_reachable_label, expand_unreachable_stmt): Likewise. * coverage.c (create_coverage): Likewise. * diagnostic.c (pedwarn, sorry, error, fatal_error, internal_error, warning, diagnostic_report_current_module, inform): Likewise. * expr.c (expand_expr): Likewise. * integrate.c (expand_inline_function, output_inline_function): Likewise. * rtl-error.c (file_and_line_for_asm): Likewise. * tree-inline.c (find_alloca_call, find_builtin_longjmp_call, walk_tree): Likewise. * tree.c (make_node): Likewise. * ada, cp, f, java, objc, treelang: Likewise. ada * trans.c (build_unit_elab, set_lineno): Rename lineno to input_line. * utils.c (pushdecl, create_label_decl, begin_subprog_body, end_subprog_body): Likewise. * utils2.c (build_call_raise): Likewise. cp * class.c (finish_struct): Rename lineno to input_line. * decl.c (push_binding_level, pop_binding_level, suspend_binding_level, resume_binding_level, make_label_decl, use_label, start_function): Likewise. * decl2.c (warn_if_unknown_interface, start_static_initialization_or_destruction, generate_ctor_or_dtor_function, finish_file): Likewise. * error.c (cp_line_of, print_instantiation_full_context, print_instantiation_context): Likewise. * except.c (check_handlers_1, check_handlers): Likewise. * init.c (create_temporary_var): Likewise. * method.c (use_thunk, synthesize_method): Likewise. * parser.c (cp_lexer_set_source_position_from_token, cp_lexer_get_preprocessor_token): Likewise. * pt.c (push_tinst_level, pop_tinst_level, tsubst_friend_function, instantiate_class_template, tsubst_decl, tsubst, tsubst_expr, instantiate_decl): Likewise. * semantics.c (genrtl_try_block, finish_label_stmt, begin_class_definition, expand_body, genrtl_finish_function): Likewise. * tree.c (build_min_nt, build_min): Likewise. f * ansify.c (die_unless): Rename lineno to input_line. * com.c (ffecom_subscript_check_, ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_, ffecom_sym_transform_, ffecom_sym_transform_assign_, bison_rule_pushlevel_, bison_rule_compstmt_, finish_function, store_parm_decls): Likewise. * intrin.c (ffeintrin_fulfill_generic): Likewise. * lex.c (ffelex_hash_, ffelex_include_, ffelex_next_line_, ffelex_file_fixed, ffelex_file_free): Likewise. * std.c (ffestd_exec_end): Likewise. * ste.c (ffeste_emit_line_note_, ffeste_start_block_, ffeste_start_stmt_): Likewise. * ste.h (ffeste_filelinenum, ffeste_set_line): Likewise. java * lex.h (lineno): Rename to ... (input_line): ... here * parse-scan.y (lineno): Rename to ... (input_line): ... here. (reset_report): Rename lineno to input_line. * check-init.c (check_init): Likewise. * class.c (push_class): Likewise. * decl.c (complete_start_java_method, end_java_method): Likewise. * expr.c (expand_byte_code): Likewise. * jcf-parse.c (give_name_to_class, parse_class_file): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * lex.c (java_init_lex, java_allocate_new_line, do_java_lex): Likewise. * parse.h (YYNOT_TWICE): Likewise. * parse.y (empty_statement, expression_statement, java_pop_parser_context, java_parser_context_save_global, yyerror, register_fields, method_header, safe_layout_class, find_in_imports_on_demand, create_artificial_method, source_end_java_method, start_complete_expand_method, build_thisn_assign, java_complete_lhs, maybe_absorb_scoping_block): Likewise. objc * objc-act.c (objc_init): Rename lineno to input_line. (build_module_descriptor, build_selector_translation_table, build_protocol_template, build_method_prototype_list_template, build_category_template, build_selector_table, build_class_template, build_super_template, build_ivar_template, build_ivar_list_template, build_method_list_template, build_method_template, add_instance_variable): Likewise. treelang * tree1.c (treelang_init): Rename lineno to input_line. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66333 138bc75d-0d04-0410-961f-82ee72b054a4
* Various cleanups to help compile server.bothner2003-03-201-5/+6
| | | | | | | | | | | | | | | | | | | | | | * cppinit.c (cpp_create_reader): Take extra hash_table* argument, and pass that to _cpp_init_hashtable. (cpp_read_main_file): Drop hash_table* argument; don't call _cpp_init_hashtable. * cpplib.h: Update declarations to match. * c-opts.c (c_common_init_options): Pass ident_hash to cpp_create_reader. (c_common_post_options): Don't pass ident_hash to cpp_read_main_file. * fix-header.c (read_scan_file): Likewise pass NULL table to cpp_create_reader rather than cpp_read_main_file. * cppfiles.c (cpp_rename_file): Generalized and renamed to cpp_change_file. * cpplib.h: Update declaration to match. * c-opts.c (push_command_line_line, finish_options): Change cpp_rename_file calls to cpp_change_file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64617 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c: Default TARGET_EBCDIC to 0 if not defined.neil2003-03-171-0/+5
| | | | | | | | | | (c_common_init): Set EBCDIC in cpp options. * cpplex.c (maybe_read_ucs, cpp_parse_escape): Use EBCDIC option, not conditional compilation. * cpplib.h (struct cpp_options): New entry EBCDIC. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64471 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Update.neil2003-03-151-21/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.h (cb_register_builtins): Rename c_cpp_builtins. * c-lex.c (init_c_lex): Register builtins hook is dead. * c-opts.c (COMMAND_LINE_OPTIONS, missing_arg): Handle -A, -D and -U. (c_common_decode_option): Don't call cpp_handle_option. Handle -A, -D and -U. (handle_deferred_opts): Simplify. (finish_options): Define builtins and command line macros. * c-ppoutput.c (init_pp_output): Register builtins hook is dead. * cppinit.c: Don't include intl.h. (init_builtins): Rename cpp_init_builtins. No hook to call. (init_library): Don't need to sort options. (cpp_create_reader): Don't set pending. (cpp_destroy): Don't free pending. (struct pending_option, cl_directive_handler, struct cpp_pending, APPEND, free_chain, new_pending_directive, parse_option, opt_comp, cpp_finish_options, COMMAND_LINE_OPTIONS, DEF_OPT, struct cl_option, cl_options, cpp_handle_option): Remove. * cpplib.h (struct cpp_pending, register_builtins, cpp_handle_option, cpp_finish_options): Remove. (cpp_init_builtins): New. * fix-header.c (read_scan_file): Update to handle -D. Fix handling of -I. Replace call to cpp_finish_options. cp: * Make-lang.in: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64398 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (finish_options): New.neil2003-03-141-4/+32
| | | | | | | | | | | | | | (COMMAND_LINE_OPTIONS, c_common_decode_option): Add -imacros. (missing_arg): Handle OPT_include and OPT_imacros. (c_common_init, c_common_parse_file): Use finish_options. (handle_deferred_opts): Update. * cppinit.c (struct cpp_pending): Remove imacros_head and imacros_tail. (cpp_finish_options): Don't handle -imacros here. (no_fil): Remove. (COMMAND_LINE_OPTIONS, cpp_handle_option): Don't handle -imacros. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64378 138bc75d-0d04-0410-961f-82ee72b054a4
* /home/neil/diffs/include.logneil2003-03-141-5/+85
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64373 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (add_prefixed_path): Don't use concat. Whenzack2003-03-101-2/+12
| | | | | | | | prefixing with cpp_GCC_INCLUDE_DIR, copy only the first cpp_GCC_INCLUDE_DIR_len characters. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64114 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (c_common_post_options): On fopen failure, returnhp2003-03-081-1/+1
| | | | | | | false, not NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64004 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h (c_common_init, c_common_post_options): Update.neil2003-03-081-25/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-objc-common.c (c_objc_common_init): Update for new prototype. * c-opts.c (saved_lineno): New. (c_common_post_options, c_common_init): Update prototypes, move call to cpp_read_main_file from latter to former. * c-tree.h (c_ojbc_common_init): Update. * langhooks-def.h (lhd_post_options): New. (LANG_HOOKS_INIT, LANG_HOOKS_POST_OPTIONS): Update. * langhooks.c (lhd_post_options): New. * langhooks.h (struct lang_hooks): Update post_options and init hooks. * toplev.c (no_backend): New. (process_options): Call post_options hook and set main_input_filename and input_filename here. (lang_dependent_init, do_compile): post_options hook moved to process_options. * objc/objc-act.c (objc_init): Update prototype. * objc/objc-act.h (objc_init): Update prototype. ada: * misc.c (gnat_init): Update for new prototype. cp: * cp-tree.h (cxx_init): Update prototype. * lex.c (cxx_init): Similarly. f: * com.c (ffe_init): Update prototype; move code to ffe_post_options. (ffe_post_options): New. java: * lang.c (java_init): Update prototype, move code to java_post_options. (java_post_options): Similarly. treelang: * tree1.c (in_fname): Fix type. (treelang_init): Update prototype and use of in_fname. * treelang.h (in_fname): Fix type. * treetree.c (tree_code_if_start, tree_code_if_else, tree_code_if_end, tree_code_create_function_prototype, tree_code_create_function_initial, tree_code_create_funciton_wrapup, tree_code_create_variable, tree_code_output_expression_statement) : Fix prototypes and use of filenames. * treetree.h: Similarly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64001 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (c-ppoutput.o): Update.neil2003-03-061-14/+18
| | | | | | | | | | | | | | | | | | | | * c-common.h (init_pp_output): New. (preprocess_file): Update. * c-lex.c (init_c_lex): Move mbchar initialization to cpplib. Register builtins. * c-opts.c (c_common_init): Call init_pp_output if preprocessing. Make call to cpp_read_main_file common to whether preprocessing or not. Don't register builtins. * c-ppoutput.c: Include c-pragma.h. (setup_callbacks): Rename init_pp_output. (preprocess_file): No longer setup callbacks or call cpp_read_main_file. * cpphash.h (_cpp_init_mbchar): New. * cppinit.c (init_library): Call _cpp_init_mbchar. * cpplex.c (_cpp_init_mbchar): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63913 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Update.neil2003-03-041-44/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c (flag_no_line_commands, flag_no_output, flag_dump_macros, flag_dump_includes): New. * c-common.h (flag_no_line_commands, flag_no_output, flag_dump_macros, flag_dump_includes, preprocess_file): New. (init_c_lex): Update prototype. * c-lex.c (init_c_lex): Update prototype; move some code to c_common_init. * c-opts.c (preprocess_file): Subsume into c_common_init. (c_common_decode_option): Update flags. (c_common_init): Move code from preprocess_file and init_c_lex. (sanitize_cpp_opts): Update. * c-ppoutput.c: New, cppmain.c almost verbatim. * cpphash.h (struct printer): Remove. (struct cpp_reader): Remove print. * cpplib.h (dump_none, dump_only, dump_names, dump_definitions, cpp_preprocess_file): Remove. (struct cpp_options): Remove no_output, no_line_commands, dump_macros and dump_includes. * cppmain.c: Remove. * doc/passes.texi: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63773 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (C_AND_OBJC_OBJS, c-incpath.o, c-lex.o, LIBCPP_OBJS,neil2003-03-011-7/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cppinit.o, cppdefault.o, fix-header): Update. * c-incpath.c: New file. * c-incpath.h: New file. * c-lex.c: Include c-incpath.h. (init_c_lex): Register path simplifier. * c-opts.c: Include cppdefault.h and c-incpath.h. (TARGET_SYSTEM_ROOT, verbose, iprefix, sysroot, std_inc, std_cxx_inc, quote_chain_split, add_prefixed_path): New. (COMMAND_LINE_OPTIONS): Add more options from cpplib. (missing_arg, c_common_decode_option): Handle them. (c_common_post_options): Register include chains. (print_help): Update. * cppdefault.h (struct default include): Update. Move some macros to ... * cppdefault.c: ... here. (cpp_include_defaults): Add extra field add_sysroot. * cppfiles.c (include_file, search_from, find_or_create_entry, cpp_included, find_include_file, remap_filename): Update for renaming of search_path to cpp_path, and of the chain headers. (remove_component_p, _cpp_simplify_pathname): Move to c-incpath.c. * cpphash.h (struct search_path): Move to cpplib.h. (struct cpp_buffer, struct cpp_reader): Update. (_cpp_simplify_pathname): Remove. * cppinit.c: Don't include prefix.h and cppdefault.h. (INO_T_EQ, INO_T_COPY, path_include, append_include_chain, remove_dup_dir, remove_dup_nonsys_dirs, remove_dup_dirs, init_standard_includes, BRACKET, SYSTEM, AFTER, no_dir, no_pth, cpp_handle_options): Remove. (struct pending_option): Remove chain members. (cpp_destroy, cpp_read_main_file, COMMAND_LINE_OPTIONS, cpp_handle_option): Update. * cpplib.h (struct cpp_path, cpp_set_include_chains): New. (struct cpp_options): Remove quote_include, bracket_include, include_prefix, include_prefix_len, verbose, ignore_srcdir, no_standard_includes, no_standard_cplusplus_includes. (struct cpp_callbacks): Add simplify_path. (cpp_handle_options): Remove. * fix-header.c: Include c-incpath.h. (read_scan_file): Update to use c-incpath functionality. * doc/passes.texi: Update. cp: * Make-lang.in (CXX_C_OBJS): Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63612 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-02-20 Toon Moene <toon@moene.indiv.nluug.nl>toon2003-02-201-0/+9
| | | | | | | | | | PR fortran/9038 * c-opts.c (sanitize_cpp_opts): Add Fortran front end options to be ignored. (c_common_decode_option): Ignore them when preprocessing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63184 138bc75d-0d04-0410-961f-82ee72b054a4
* * cpplib.h (struct cpp_options): Add warn_deprecated field.jason2003-01-281-0/+1
| | | | | | | | | | * cppinit.c (cpp_create_reader): Turn it on by default. * c-opts.c (c_common_decode_option): Set it. * cpplib.c (do_pragma_once): Only complain about #pragma once if warn_deprecated is set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62005 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c: Fix comment typos.kazu2003-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * basic-block.h: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-decl.c: Likewise. * c-opts.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.h: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfglayout.c: Likewise. * cfgrtl.c: Likewise. * convert.c: Likewise. * cpphash.h: Likewise. * cpplex.c: Likewise. * cpplib.h: Likewise. * df.h: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dwarf2.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61462 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge from pch-branch.geoffk2003-01-101-0/+16
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61136 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge basic-improvements-branch to trunkzack2002-12-161-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (COMMAND_LINE_OPTIONS): Fix -Wimplicit.neil2002-11-091-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58952 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (missing_arg): Use cl_options[opt_index].opt_codeuweigand2002-10-211-1/+1
| | | | | | | | | | | | | instead of just opt_index as switch expression. * calls.c (store_one_arg): Change type of 'excess_align' to unsigned int. * profile.c (output_gcov_string): Change type of 'temp' to size_t. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58381 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c/761sayle2002-10-201-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | * toplev.c (flag_unsafe_profile_arcs): Remove. (flag_bounded_pointers): Remove. (flag_bounds_check): Correct comments. (lang_independent_options): Remove -funsafe-profile-arcs and -fbounded-pointers. Correct -fbounds-check comments. * flags.h: Correct flag_schedule_interblock comments. (flag_bounded_pointers): Remove prototype. (flag_bounds_check): Correct comments. * c-opts.c (c_common_init_options): No need to mark flag_bounds_check as unspecified. (c_common_post_options): And no need to set it from flag_bounded_pointers if its still unspecified. * doc/invoke.texi: Fix some overfull hboxes in "make dvi". Document --version, -feliminate-dwarf-2-dups, -fno-sched-interblock, -fno-sched-spec, -fsched-spec-load, -fsched-spec-load-dangerous, -fsched-verbose=n, -fno-branch-count-reg and -fbounds-check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58334 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc:nathan2002-10-081-1/+2
| | | | | | | | | | | | | | | | * c-opts.c (c_common_decode_option): Add warn_strict_aliasing to -Wall. * c-typeck.c (build_c_cast): Use warn_strict_aliasing, tweak message. * flags.h (warn_strict_aliasing): Declare. * toplev.c (warn_strict_aliasing): Define. (lang_independent_options): Add it. * doc/invoke.texi (-Wstrict-aliasing): Document it. testsuite: * gcc.dg/alias-1.c: Tweak expected warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57938 138bc75d-0d04-0410-961f-82ee72b054a4
* * cppinit.c (init_standard_includes, parse_option): Use strncmp.neil2002-10-061-2/+2
| | | | | | | * c-opts.c (find_opt): Similarly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57864 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (flag_abi_version): New variable.mmitchel2002-09-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | * c-common.h (flag_abi_version): Declare it. * c-opts.c (missing_arg): Add -fabi-version. (c_common_decode_option): Process -fabi-version. * doc/invoke.texi (-fabi-version): Document it. (-Wabi): Add information about bit-fields in unions. * cp/class.c (layout_virtual_bases): Do not round the size of the type to a multiple of the alignment before laying out virtual bases. (layout_class_type): Correct handling of bit-fields that are wider than their type inside unions. Round the size of the type to a even number of bytes when computing the size without virtual bases. * cp/cp-tree.h (abi_version_at_least): New macro. * g++.dg/abi/bitfield6.C: New test. * g++.dg/abi/bitfield7.C: New test. * g++.dg/abi/bitfield8.C: New test. * g++.dg/abi/vbase11.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57432 138bc75d-0d04-0410-961f-82ee72b054a4
* * ChangeLog: Follow spelling conventions.kazu2002-09-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog.0: Likewise. * ChangeLog.1: Likewise. * ChangeLog.2: Likewise. * ChangeLog.3: Likewise. * ChangeLog.4: Likewise. * ChangeLog.5: Likewise. * ChangeLog.6: Likewise. * FSFChangeLog.10: Likewise. * FSFChangeLog.11: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-format.c: Likewise. * c-opts.c: Likewise. * cpplib.c: Likewise. * langhooks.h: Likewise. * real.c: Likewise. * reg-stack.c: Likewise. * toplev.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/arm.md: Likewise. * config/arm/linux-gas.h: Likewise. * config/arm/netbsd.h: Likewise. * config/c4x/c4x.c: Likewise. * config/c4x/c4x.h: Likewise. * config/c4x/c4x.md: Likewise. * config/c4x/libgcc.S: Likewise. * config/fr30/fr30.md: Likewise. * config/frv/frv.md: Likewise. * config/ia64/ia64.md: Likewise. * config/mips/mips.h: Likewise. * config/mn10300/mn10300.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/v850/v850.md: Likewise. * doc/extend.texi: Likewise. * doc/invoke.texi: Likewise. * doc/md.texi: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57166 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (warn_abi): New variable.mmitchel2002-08-271-0/+5
| | | | | | | | | | | | | | | | | * c-common.h (warn_abi): Likewise. * c-opts.c (COMMAND_LINE_OPTIONS): Add -Wabi. (c_common_decode_option): Handle it. * doc/invoke.texi:P Document -Wabi. * class.c (layout_virtual_bases): Warn about bugs in G++ that result in incorrect object layouts. (layout_class_type): Likewise. * testsuite/g++.dg/abi/bitfield5.C: New test. * testsuite/g++.dg/abi/vbase10.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56618 138bc75d-0d04-0410-961f-82ee72b054a4
* Added -Wundeclared-selector ObjC command line optionnicola2002-08-271-0/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56615 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (find_opt): Don't complain about wrong languagesneil2002-08-261-19/+24
| | | | | | | | | here. Return exact matches even for wrong language. (c_common_decode_option): Complain about wrong languages here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56583 138bc75d-0d04-0410-961f-82ee72b054a4
* PR preprocessor/7358neil2002-08-141-2/+6
| | | | | | | | | | | | * c-opts.c (check_deps_environment_vars): Ignore main file for SUNPRO_DEPENDENCIES. * cppfiles.c (stack_include_file): Ignore main file if appropriate. * cpplib.h (struct cpp_options): New member in deps. * doc/cppenv.texi: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56333 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (c_common_post_options): Correct test.neil2002-08-141-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56299 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (lang_flags): Const-ify.ghazi2002-08-141-1/+1
| | | | | | | | * ra-build.c (undef_table): Likewise. * ra.c (eliminables): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56271 138bc75d-0d04-0410-961f-82ee72b054a4
* opts.c (c_common_init_options): Extra braces needed.neil2002-08-131-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56262 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (c_common_init_options): Check option array isneil2002-08-131-0/+8
| | | | | | | sorted if checking enabled. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56241 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (deps_seen, deps_file, deferred_count, deferred_size,neil2002-08-121-51/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handle_deferred_opts, sanitize_cpp_opts, defer_opt, struct deferred_opt): New. (COMMAND_LINE_OPTIONS): Add -M*. (missing_arg): Update. (c_common_decode_option): Handle -M*. (c_common_post_options): Handle -M*. Use sanitize_cpp_opts; don't call cpp_post_options. (c_common_finish, check_deps_environment_vars): Update. * cppfiles.c (stack_include_file, handle_missing_header): Update. * cpphash.h (CPP_PRINT_DEPS): Remove. * cppinit.c: Don't include version.h. (cpp_create_reader): Don't call deps_init. Initialize warn_long_long. (cpp_read_main_file): Init deps if necessary. (cpp_destroy): Conditionally free deps. (cpp_finish): Update. (no_tgt): Remove. (COMMAND_LINE_OPTIONS, cpp_handle_option): Remove -M*. (cpp_post_options): Rename post_options. * cpplib.h (struct cpp_options): Remove some dependency options; move others to a new structure. (cpp_post_options): Remove. (cpp_finish): Comment. * fix-header.c (read_scan_file): Don't call cpp_post_options. treelang: * treelang.c: Remove cpp_post_options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56239 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (STDC_0_IN_SYSTEM_HEADERS, c_common_init): Moveneil2002-08-121-7/+60
| | | | | | | | | | | | | | | | | | | | | | | to c-copts.c. (warn_multichar): Die. (cb_register_builtins): Export. * c-common.h (warn_multichar, preprocess_file): Remove. (cb_register_builtins): New. * c-lang.c (c_init): Remove. (LANG_HOOKS_INIT): Use c_objc_common_init. * c-lex.c (init_c_lex): Don't canonicalize filename. * c-opts.c (in_fname, STDC_0_IN_SYSTEM_HEADERS): New. (preprocess_file): Make static. Update for cpplib. (c_common_decode_option): Remove warn_multichar. Use in_fname. (c_common_post_options): Set some cpp options here. (c_common_init): Move from c-common.c. * cppinit.c (cpp_post_options): Don't canonicalize in_fname. * cpplib.h (struct cpp_options): Remove in_fname. (cpp_preprocess_file): Update. * cppmain.c (cpp_preprocess_file): Update for new prototypes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56223 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.c (c_common_init): Call preprocess_file instead.neil2002-08-111-4/+117
| | | | | | | | | | | | | | | | | | | | | | | | | (c_common_finish): Move to c-opts.c. * c-common.h (preprocess_file): new. * c-opts.c (out_fname, out_stream, deps_append, preprocess_file, check_deps_environment_vars, c_common_finish): New. (c_common_decode_option): Update for out_fname and dependencies. * cppinit.c (init_dependency_output, output_deps): Remove. (cpp_destroy): Update prototype. (cpp_add_dependency_target): New. (cpp_read_main_file): Don't overlay a buffer. (cpp_finish): Take a deps output stream and write deps to it. Return the error count. (cpp_post_options): Don't canonicalize out_fname, or do anything with dependencies. * cpplib.h (struct cpp_options): Remove out_fname and preprocess_only. (cpp_add_dependency_target): New. (cpp_destroy, cpp_finish, cpp_preprocess_file): Update. * cppmain.c (cpp_preprocess_file): Update prototype. Don't set preprocess_only. Don't handle the output stream directly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56214 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h (enum c_language_kind): Emphasize that clk_c is 0.neil2002-08-111-51/+60
| | | | | | | | | | | | | | * c-opts.c (parse_option): Rename find_opt. (set_std_c99): New function. (COMMAND_LINE_OPTIONS): Handle -remap and -o. Remove OPT_std_bad. (missing_arg): Remove OPT_std_bad. Handle -o. (c_common_decode_option): Handle input and output file names, -o and -remap. Clean up -std= handling. * cppinit.c (COMMAND_LINE_OPTIONS): Remove OPT_o and OPT_remap. (cpp_handle_option): Similarly. Don't handle filenames. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56197 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-opts.c (set_std_cxx98, set_std_c89): New.neil2002-08-101-25/+61
| | | | | | | | | | | | | | | | | | | | (COMMAND_LINE_OPTIONS): Move more from cppinit.c. (c_common_decode_option): Handle new switches from cppinit.c. Add -std=gnu++98. * cppinit.c (set_lang): Rename cpp_set_lang. Export. (no_arg, no_num): Remove. (COMMAND_LINE_OPTIONS): Move more to c-opts.c. Drop all lang- switches apart from -lang-objc and lang-asm. (cpp_handle_option): Similarly. * cpplib.h (cpp_set_lang): New. * doc/cppopts.texi, doc/invoke.texi: Document -std=c++98, -std=gnu++98. * objc/lang-specs.h: Remove -ansi. cp: * lang-specs.h: Remove -ansi. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56185 138bc75d-0d04-0410-961f-82ee72b054a4