summaryrefslogtreecommitdiff
path: root/gcc/c-opts.c
Commit message (Collapse)AuthorAgeFilesLines
* c-opts.c (c_common_post_options): Don't clear flag_inline_functions.Steven Bosscher2004-11-241-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc/ * c-opts.c (c_common_post_options): Don't clear flag_inline_functions. * dojump.c (clear_pending_stack_adjust): Remove check on flag_inline_functions, it's always true. * config/alpha/alpha.md (movdi_er_maybe_g): Remove splitter that can never trigger. * config/c4x/c4x.h (TARGET_CPU_CPP_BUILTINS): Don't look at flag_inline_trees, now that flag_inline_functions is never cleared. * config/pdp11/pdp11.h (OPTIMIZATION_OPTIONS): Don't set flag_inline_functions at optimization levels greater than or equal to 3. This is already done by default. ada/ * misc.c (gnat_post_options): Don't clear flag_inline_functions. cp/ * decl.c (cxx_init_decl_processing): Don't clear flag_inline_functions. fortran/ * options.c (gfc_post_options): Don't clear flag_inline_functions. java/ * class.c (make_class_data): Don't check flag_inline_functions. * lang.c (flag_really_inline): Remove unused flag. (java_handle_option): Don't set it here. Remove special handling of flag_inline_functions for Java. (java_init): Don't set flag_inline_trees here. Already done... (java_post_options): ...here. Don't clear flag_inline_functions. From-SVN: r91190
* re PR c/17538 (Filename and IMA)Andrew Pinski2004-10-211-1/+1
| | | | | | | | | | 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu> PR c/17538 * c-opts.c (push_command_line_include): Use the current file name instead of the main one. From-SVN: r89385
* re PR other/17361 (gcc driver complains about C++ options when assembling)Roger Sayle2004-10-111-14/+12
| | | | | | | | | | | PR other/17361 * c-opts.c (permit_fortran_options): Delete/obsolete global variable. (c_common_init_options): Remove #ifdef CL_F77 code. Scan command line options for "-lang-asm" and if found allow any of the C-family front-end options. (c_common_handle_option): Remove last use of permit_fortran_options. From-SVN: r88906
* c-aux-info.c, [...]: Follow code formatting conventions.Joseph Myers2004-10-031-4/+4
| | | | | | | | | * c-aux-info.c, c-common.c, c-common.h, c-cppbuiltin.c, c-decl.c, c-format.c, c-incpath.c, c-lex.c, c-objc-common.c, c-opts.c, c-parse.in, c-pch.c, c-ppoutput.c, c-pragma.c, c-typeck.c: Follow code formatting conventions. From-SVN: r88462
* c-common.c, [...]: Use %q, %< and %> for quoting in diagnostics.Joseph Myers2004-09-131-7/+7
| | | | | | | | | | | | | | | | | | | | * c-common.c, c-decl.c, c-lex.c, c-objc-common.c, c-opts.c, c-parse.in, c-pragma.c, c-typeck.c: Use %q, %< and %> for quoting in diagnostics. Use %' for English apostrophes. * c-tree.h (ATTRIBUTE_GCC_CDIAG): Define. (pedwarn_c90, pedwarn_c99): Use it. * c-decl.c (lookup_label): Quote label name in diagnostic. * c-parse.in (yyprint): Use ' instead of ` for left quote. * c-typeck.c (warn_for_assignment): Likewise. testsuite: * g++.dg/warn/Wswitch-1.C, g++.dg/warn/Wswitch-2.C, gcc.dg/Wswitch-2.c, gcc.dg/Wswitch-enum.c, gcc.dg/Wswitch.c, gcc.dg/declspec-9.c, gcc.dg/declspec-10.c, gcc.dg/declspec-11.c, gcc.dg/m-un-2.c, gcc.dg/noreturn-1.c, gcc.dg/wtr-conversion-1.c: Update expected messages. From-SVN: r87413
* c-opts.c (c_common_handle_option): <case OPT_Werror> set ↵Gabriel Dos Reis2004-08-301-0/+1
| | | | | | | | | | | | | | global_dc->warning_as_error_requested. * c-opts.c (c_common_handle_option): <case OPT_Werror> set global_dc->warning_as_error_requested. * diagnostic.c (diagnostic_initialize): Tidy. * diagnostic.h (diagnostic_context::x_data): Remove (diagnostic_context::issue_warnings_are_errors_message): Rename from warnings_are_errors_message. (diagnostic_context::warning_as_error_requested): New. From-SVN: r86750
* re PR c++/13684 (local static object variable constructed once but ctors and ↵Jason Merrill2004-08-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dtors called multiple times on same memory when called in multiple threads) PR c++/13684 * cp/decl.c (expand_static_init): Use thread-safety API. (register_dtor_fn): Return the call, don't expand it. * cp/tree.c (add_stmt_to_compound): New fn. (stabilize_call): Use it. * gimplify.c (gimplify_cleanup_point_expr): Handle CLEANUP_EH_ONLY. (gimple_push_cleanup): Add eh_only parm. (gimplify_target_expr): Pass it. * c.opt (-fno-threadsafe-statics): New option. * c-opts.c (c_common_handle_option): Handle it. * c-common.h (flag_threadsafe_statics): Declare it. * c-common.c (flag_threadsafe_statics): Record it. * doc/invoke.texi: Document it. * tsystem.h (_GNU_SOURCE): Define. * gthr-posix.h (__gthread_recursive_mutex_t): New typedef. (__GTHREAD_RECURSIVE_MUTEX_INIT): New macro. (__GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION): New macro. (__gthread_recursive_mutex_init_function): New fn. (__gthread_recursive_mutex_lock): New fn. (__gthread_recursive_mutex_trylock): New fn. (__gthread_recursive_mutex_unlock): New fn. * gthr-solaris.h, gthr-single.h, gthr-dce.h: Likewise. * gthr-win32.h, gthr-vxworks.h: Likewise. * gthr.h: Document. * libsupc++/guard.cc (static_mutex): Internal class implementing a recursive mutex which controls initialization of local statics. (__gnu_cxx::recursive_init): New exception class. (__cxa_guard_acquire): Deal with locking and recursion detection. (acquire_1, __cxa_guard_abort, __cxa_guard_release): Likewise. From-SVN: r86687
* re PR c/13282 (A "-Wno..." switch to turn off "missing initializer" warnings)Richard Sandiford2004-08-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | PR c/13282 * c.opt (Wmissing-field-initializers): New option. * c-opts.c (c_common_post_options): Make -Wextra turn it on by default. * c-typeck.c (pop_init_level): Guard the missing field warning with warn_missing_field_initializers rather than extra_warnings. * doc/invoke.texi (-Wmissing-field-initializers): Document, moving some of the explanation from... (-Wextra): ...here. Say that the missing field warning can be seperately controlled by -Wmissing-field-initializers. cp/ * typeck2.c (process_init_constructor): Guard the missing field warning with warn_missing_field_initializers rather than extra_warnings. testsuite/ * gcc.dg/missing-field-init-[12].c: New tests. * g++.dg/warn/missing-field-init-[12].C: New tests. From-SVN: r85638
* re PR c++/9283 (__attribute__((visibility ("hidden"))) not supported for ↵Niall Douglas2004-07-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | class/struct) PR c++/9283 PR c++/15000 * c-common.c (c_common_attribute_table): Allow handle_visibility_attribute to be called for types. (handle_visibility_attribute) When given a type, set the visibility bits on the TYPE_NAME. When given a decl, don't set no_add_attrs so that we can check later whether the attribute was present. Added warning if attribute applied to non class type. * c-decl.c (diagnose_mismatched_decls): Updated rules for merging decls and checking that they are consistent. * common.opt: Added -fvisibility. * c.opt, c-opts.c: Added -fvisibility-inlines-hidden. * c-pragma.h, c-pragma.c: Added handle_pragma_visibility(). * flags.h, tree.h: Added assorted support defines for overall patch * opts.c: Added parsing support for -fvisibility. * tree.c (build_decl): Set visibility for all decls to be whatever is in force at that time. * varasm.c (default_binds_local_p_1): Reworked logic determining when to make a symbol locally bound. * doc/invoke.texi: Added documentation for -fvisibility and -fvisibility-inlines-hidden. PR c++/15000 PR c++/9283 * class.c (check_field_decls): Apply hidden visibility if -fvisibility-inlines-hidden and inlined unless otherwise specified (build_vtable): Set vtable visibility to class visibility. (check_field_decls): Default static member visibility to class visibility. (check_methods): Default method visibility to class visibility. * cp-tree.h: Added CLASSTYPE_VISIBILITY and CLASSTYPE_VISIBILITY_SPECIFIED macro. * decl.c (duplicate_decls): New logic for merging definition decls with declaration decls. Added ignore & warning when non default applied to global operator new or delete. * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED wherever VISIBILITY was changed * rtti.c (get_tinfo_decl): Set typeinfo visibility to class visibility. (tinfo_base_init): Set typeinfo name visibility to class visibility. PR c++/9283 PR c++/15000 * gcc.dg/visibility-9.c, gcc.dg/visibility-a.c: New tests. * g++.dg/ext/visibility/: New directory. * g++.dg/ext/visibility-1.C, g++.dg/ext/visibility-2.C g++.dg/ext/visibility-3.C, g++.dg/ext/visibility-4.C, g++.dg/ext/visibility-5.C, g++.dg/ext/visibility-6.C, g++.dg/ext/visibility-7.C: Move to g++.dg/ext/visibility/. * g++.dg/ext/visibility/fvisibility.C, g++.dg/ext/visibility/fvisibility-inlines-hidden.C, g++.dg/ext/visibility/fvisibility-override1.C g++.dg/ext/visibility/fvisibility-override2.C g++.dg/ext/visibility/memfuncts.C g++.dg/ext/visibility/noPLT.C g++.dg/ext/visibility/pragma.C g++.dg/ext/visibility/pragma-override1.C g++.dg/ext/visibility/pragma-override2.C g++.dg/ext/visibility/staticmemfuncts.C g++.dg/ext/visibility/virtual.C: New tests. Co-Authored-By: Brian Ryner <bryner@brianryner.com> From-SVN: r85167
* bitmap.c: Use type-safe memory allocation macros from libiberty.Bernardo Innocenti2004-07-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | * bitmap.c: Use type-safe memory allocation macros from libiberty. * c-common.c: Likewise. * c-decl.c: Likewise. * c-lang.c: Likewise. * c-lex.c: Likewise. * c-opts.c: Likewise. * c-parse.in: Likewise. * c-typeck.c: Likewise. * genconditions.c: Likewise. * gengtype-lex.l: Likewise. * gengtype-yacc.y: Likewise. * gengtype.c: Likewise. * genmodes.c: Likewise. * gensupport.c: Likewise. * read-rtl.c: Likewise. * read-rtl.c (read_constants): Use INSERT instead of TRUE in call to htab_find_slot(). From-SVN: r85163
* c-common.c: Convert ATTRIBUTE_UNUSED to ARG_UNUSED in parameter lists.Bernardo Innocenti2004-07-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * c-common.c: Convert ATTRIBUTE_UNUSED to ARG_UNUSED in parameter lists. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-opts.c: Likewise. * c-pragma.c: Likewise. * c-typeck.c: Likewise. * gencheck.c: Likewise. * genconditions.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype.c: Likewise. * gensupport.c: Likewise. * ggc-none.c: Likewise. * langhooks.c: Likewise. * statistics.h: Likewise. * stub-objc.c: Likewise. * java/decl.c: Likewise. From-SVN: r85128
* c-opts.c (c_common_post_options): Force unit-at-a-time mode on when we have ↵Zack Weinberg2004-07-091-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | more than one input file. 2004-07-09 Zack Weinberg <zack@codesourcery.com> Andrew Pinski <apinski@apple.com> * c-opts.c (c_common_post_options): Force unit-at-a-time mode on when we have more than one input file. (c_common_parse_file): Restore loop over all input files. Clarify diagnostic for -dy when YYDEBUG wasn't defined. * c-decl.c (set_type_context): New function. (pop_scope): Use it to set context of types. When we encounter a TYPE_DECL, set the context of the attached type too. (pop_file_scope): Don't call cpp_undef_all here. (diagnose_mismatched_decls): Do not complain about a second definition of an 'extern inline' function if it's not in the same translation unit. Do not complain about inline declaration after use if the use was in a different translation unit. (merge_decls): Don't clobber olddecl's DECL_CONTEXT. (pushdecl): Do not put DECL_EXTERNAL, !TREE_PUBLIC decls in the external scope. (pushdecl_top_level): Likewise. (grokdeclarator): Clarify what is going on with setting DECL_EXTERNAL on function types, a little. (c_write_global_declarations): Don't do anything if -fsyntax-only or errors have been encountered. testsuite: * gcc.dg/noncompile/init-4.c: Remove bogus dg-error marker. From-SVN: r84402
* Conditionally compile support for --enable-mapped_location.Per Bothner2004-06-301-7/+2
| | | | | | | | | | | | | | | | | | | * basic-block.h (struct edge_def): Use new source_locus typedef. * c-common.c (fname_decl): Update save/clear/store of input_location. (c_do_switch_warnings): Update for USE_MAPPED_LOCATION case. * c-decl.c: Likewise. * c-dump.c (dump_stmt): Likewise. * c-gimplify.c (c-gimplify.c): Generalize using SET_EXPR_LOCATION. * c-lex.c (cb_line_change): If USE_MAPPED_LOCATION use token's src_loc to set input_location direction, rather than using linemap_lookup. (fe_file_change, cb_def_pragma): Again use source_location directly. * c-opts.c (saved_lineno): Remove static variable. (c_common_post_options, c_common_init): Don't bothner to save, clear and restore input_Location - now handled by lang_dependent_init. * function.c (init_function_start): Use new DECL_IS_BUILTIN macro. * xcoffout.c (xcoff_assign_fundamental_type_number): Likewise. From-SVN: r83919
* c-common.h (warn_cast_qual, [...]): Remove explicit declarations.DJ Delorie2004-06-251-174/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.h (warn_cast_qual, warn_missing_format_attribute, warn_pointer_arith, warn_missing_prototypes, warn_parentheses, warn_missing_braces, warn_sign_compare, warn_long_long, warn_redundant_decls, warn_float_equal, warn_char_subscripts, warn_conversion, warn_format_y2k, warn_format_extra_args, warn_format_zero_length, warn_format_nonliteral, warn_format_security, mesg_implicit_function_declaration, warn_bad_function_cast, warn_traditional, warn_declaration_after_statement, warn_strict_prototypes, warn_missing_declarations, warn_nested_externs, warn_sequence_point, warn_init_self, warn_div_by_zero, warn_implicit_int, warn_nonnull, warn_old_style_definition, warn_selector, warn_undeclared_selector, warn_protocol, warn_abi, warn_invalid_offsetof, warn_ctor_dtor_privacy, warn_overloaded_virtual, warn_nonvdtor, warn_reorder, warn_synth, warn_pmf2ptr, warn_ecpp, warn_sign_promo, warn_old_style_cast, warn_nontemplate_friend, warn_deprecated): Remove explicit declarations. * c-common.c: Likewise, remove explicit definitions. * c-opts.c: Likewise, remove explicit assignments. * c.opts: Likewise, add implicit declare/define/assign. From-SVN: r83680
* c-opts.c (c_common_handle_option): Handle -fpch-preprocess.Geoffrey Keating2004-06-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-06-21 Geoffrey Keating <geoffk@apple.com> * c-opts.c (c_common_handle_option): Handle -fpch-preprocess. * c-common.h (flag_pch_preprocess): Declare. (c_common_pch_pragma): Likewise. * c-common.c (flag_pch_preprocess): New. * c-pch.c (c_common_read_pch): Support -fpreprocess-only. (c_common_pch_pragma): New. * c-ppoutput.c (cb_read_pch): New. (init_pp_output): Support -fpch-preprocess. * c-pragma.c (init_pragma): Support #pragma GNUC pch_preprocess. * c.opt (fpch-preprocess): New. * gcc.c (cpp_options): When save-temps, pass -fpch-preprocess. * doc/cppopts.texi: Document -fpch-preprocess. * doc/invoke.texi (Precompiled Headers): Mention that -fpreprocessed is safe for PCH. Mention that if an option is listed as safe that doesn't mean it does what you expect. Index: gcc/testsuite/ChangeLog 2004-06-21 Geoffrey Keating <geoffk@apple.com> * gcc.dg/pch/save-temps-1.c: New file. * gcc.dg/pch/save-temps-1.hs: New file. Index: libcpp/ChangeLog 2004-06-21 Geoffrey Keating <geoffk@apple.com> * files.c (should_stack_file): Correct swapped parameters to call to cb.read_pch. * pch.c (cpp_valid_state): Handle -fpreprocessed. From-SVN: r83478
* c-common.c (flag_objc_sjlj_exceptions): New.Richard Henderson2004-06-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c (flag_objc_sjlj_exceptions): New. * c-common.h (flag_objc_sjlj_exceptions): Declare. * c-opts.c (c_common_handle_option): Set it. (c_common_post_options): Handle interation of different objective-c exception and runtime switches. * c-decl.c (c_eh_initialized_p): New. (finish_decl): Use it instead of local eh_initialized_p. * c-parse.in (nested_function, notype_nested_function): Record the result of compstmt. (compstmt_or_error): Likewise. (compstmt): Don't add_stmt the result. (stmt): Don't return anything. Rewrite objc try and sync rules. (objc_try_stmt, objc_catch_list): Remove. (objc_catch_block, objc_finally_block): Remove. (objc_catch_prefix, objc_catch_clause, objc_opt_catch_list): New. (objc_try_catch_clause, objc_finally_clause): New. (objc_try_catch_stmt): Rewrite. * c-tree.h (c_eh_initialized_p): Declare. * c-opt (fobjc-sjlj-exceptions): New. * except.c (output_function_exception_table): Don't call cgraph on non-decls. * objc/objc-act.c (UTAG_EXCDATA_VAR, UTAG_CAUGHTEXC_VAR, UTAG_RETHROWEXC_VAR, UTAG_EVALONCE_VAR, struct val_stack, catch_count_stack, exc_binding_stack, if_nesting_count, blk_nesting_count, objc_enter_block, objc_exit_block, objc_declare_variable, val_stack_push, val_stack_pop, objc_build_try_enter_fragment, objc_build_extract_expr, objc_build_try_exit_fragment, objc_build_extract_fragment, objc_build_try_prologue, objc_build_try_epilogue, objc_build_catch_stmt, objc_build_catch_epilogue, objc_build_finally_prologue, objc_build_finally_epilogue, objc_build_try_catch_finally_stmt, objc_build_synchronized_prologue, objc_build_synchronized_epilogue): Remove. (objc_create_temporary_var, struct objc_try_context, cur_try_context, objc_eh_runtime_type, objc_init_exceptions, objc_build_exc_ptr, next_sjlj_build_try_exit, next_sjlj_build_enter_and_setjmp, next_sjlj_build_exc_extract, next_sjlj_build_catch_list, next_sjlj_build_try_catch_finally, objc_begin_try_stmt, objc_begin_catch_clause, objc_finish_catch_clause, objc_build_finally_clause, objc_finish_try_stmt, objc_build_synchronized): New. (objc_is_object_id, objc_is_class_id): New. (objc_comptypes): Use them. (build_next_objc_exception_stuff): Break NeXT sjlj out from build_objc_exception_stuff. (synth_module_prologue): Update to match. (objc_build_throw_stmt): Use cur_try_context to decide if we're in a @catch. * objc/objc-act.h: Update prototypes. (OCTI_EXCEPTION_BLK_STACK, objc_exception_block_stack): Remove. testsuite/ * objc.dg/sync-1.m: New. * objc.dg/try-catch-1.m: Don't force next runtime. * objc.dg/try-catch-3.m, objc.dg/try-catch-4.m: Likewise. * objc.dg/try-catch-2.m: Likewise. Enable everywhere. Remove shadowed catch clause. * objc.dg/try-catch-5.m: New. From-SVN: r83332
* Makefile.am: Add makedepend.Zack Weinberg2004-06-051-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libcpp: * Makefile.am: Add makedepend. * Makefile.in, aclocal.m4: Regenerate. * charset.c: Insert a space to avoid a warning. * directives.c: Include mkdeps.h. (_cpp_handle_directive): Reenable macro expander if appropriate. (undefine_macros): Inline body of _cpp_free_definition for speed. Do not call undef callback or _cpp_warn_if_unused_macro. (cpp_get_deps): New interface. * files.c (search_cache): Add pfile argument. Check for file that would be found by "" or <> search here... (_cpp_find_file): ...not here. Correct recorded start_dir of files found by directory-of-current-file search that would be found by "" or <> search. * init.c (cpp_add_dependency_target): Delete. * internal.h (struct lexer_state): Add discarding_output flag. * lex.c (lex_identifier): Compute hash function while scanning. * macro.c (cpp_scan_nooutput): Disable macro expansion outside directives. * makedepend.c: New file. * mkdeps.c (struct deps): Add vpath vector. (apply_vpath, deps_add_vpath): New function. (deps_free): Free vpath vector. (deps_add_dep, deps_add_target): Use apply_vpath. * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH. (ht_lookup_with_hash): New function. * cpplib.h, mkdeps.h: Update prototypes. * symtab.h: Update prototypes. (HT_HASHSTEP, HT_FINISH): New macros. gcc: * Makefile.in (MKDEPS_H): New shorthand. (c-opts.o): Update dependencies. * c-opts.c: Include mkdeps.h. (handle_deferred_opts): Use cpp_get_deps and deps_add_target, not cpp_add_dependency_target. From-SVN: r82654
* c.opt (Wmissing-include-dirs): New.Ben Elliston2004-05-221-5/+9
| | | | | | | | | | | | | | | | | | | | | | * c.opt (Wmissing-include-dirs): New. * c-opts.c (c_common_handle_option): Pass true for user_supplied_p to add_path () for -I, but false for OPT_idirafter, OPT_iquote and OPT_isystem. Handle case OPT_Wmissing_include_dirs. * c-incpath.h (add_path): Add fourth (bool) argument. * c-incpath.c (add_env_var_paths): Pass false to add_path (). (add_standard_paths): Likewise. (remove_duplicates) [REASON_NOENT]: Warn if -Wmissing-include-dirs is used and the directory was user-supplied via -I. (add_path): Set p->user_supplied_p. Remove duplicated code by using add_cpp_dir_path (). * cpplib.h (struct cpp_options): Add warn_missing_include_dirs. (struct cpp_dir): Add user_supplied_p. * doc/invoke.texi (Warning Options): Document new option. [testsuite] * gcc.dg/cpp/Wmissingdirs.c: New. From-SVN: r82121
* Merge tree-ssa-20020619-branch into mainline.Diego Novillo2004-05-131-15/+6
| | | | From-SVN: r81764
* invoke.texi (Directory Options): Document -iquote.Mike Stump2004-05-051-0/+6
| | | | | | | | | | | | | | | | | | * doc/invoke.texi (Directory Options): Document -iquote. * doc/cpp.texi: Likewise. * doc/cppopts.texi: Likewise. * c-opts.c (c_common_missing_argument): Add -iquote processing. (c_common_handle_option): Likewise. * c.opt (iquote): Add. * gcc.h (DEFAULT_WORD_SWITCH_TAKES_ARG): Add -iquote. * c-incpath.c (merge_include_chains): Update comment to use -iquote. * c-opts.c (case OPT_I): Deprecate -I- support. * doc/invoke.texi: Likewise. * doc/cpp.texi: Likewise. * doc/cppopts.texi: Likewise. From-SVN: r81521
* bb-reorder.c, [...]: Fix comment typos.Kazu Hirata2004-04-301-1/+1
| | | | | | | | | | | | | | | | | * bb-reorder.c, c-opts.c, cfglayout.c, cgraph.c, cgraphunit.c, cppfiles.c, fold-const.c, ggc-zone.c, loop-doloop.c, optabs.c, reg-stack.c, varasm.c, config/alpha/ev4.md, config/alpha/ev5.md, config/alpha/ev6.md, config/arm/arm.c, config/c4x/c4x.c, config/c4x/c4x.md, config/cris/cris.c, config/cris/cris.h, config/fr30/fr30.h, config/frv/frv.c, config/frv/frv.h, config/frv/frv.md, config/h8300/h8300.c, config/i386/i386.c, config/i386/i386.md, config/i386/winnt.c, config/ia64/itanium2.md, config/ip2k/ip2k.c, config/mips/mips.c, config/mips/mips.h, config/mips/sr71k.md, config/pa/pa.c, config/s390/s390.c, config/sh/sh.c: Fix comment typos. From-SVN: r81345
* Fix problem reported by Dan Berlin on gcc list.James E Wilson2004-04-131-1/+5
| | | | | | | * c-opt.c (c_common_post_options): If this_input_filename is NULL, increment errorcount and return false instead of true. From-SVN: r80678
* builtins.c, [...]: Change most occurrences of TREE_UNSIGNED to TYPE_UNSIGNED.Richard Kenner2004-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * builtins.c, c-aux-info.c, c-common.c, c-cppbuiltin.c, c-decl.c: Change most occurrences of TREE_UNSIGNED to TYPE_UNSIGNED. * c-format.c, c-opts.c, c-pretty-print.c, c-typeck.c: Likewise. * calls.c, convert.c, dbxout.c, dojump.c, dwarf2out.c: Likewise. * expmed.c, expr.c, fold-const.c, function.c, integrate.c: Likewise. * optabs.c, sdbout.c, stmt.c, stor-layout.c, tree-dump.c: Likewise. * tree.c, config/iq2000/iq2000.c, config/m32r/m32r.c: Likewise. * config/mips/mips.c, config/rs6000/rs6000.c: Likewise. * config/s390/s390.c, config/sparc/sparc.c, objc/objc-act.c: Likewise. * stor-layout.c (layout_type, case COMPLEX_TYPE): Test for REAL_TYPE, not INTEGER_TYPE. (layout_type, case VECTOR_TYPE): Simplify code. * tree.c (build_vector_type_for_mode): Remove dup unsigned setting. * tree.h: Update comments. (STRIP_NOPS): Use TYPE_UNSIGNED. (TYPE_UNSIGNED): New macro. (TYPE_TRAP_SIGNED): Remove now redundant check. (SAVE_EXPR_NOPLACEHOLDER): Don't use TREE_UNSIGNED. * cp/call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED. * cp/class.c (check_bitfield_decl): Likewise. * cp/cvt.c (type_promotes_to): Likewise. * cp/decl.c (finish_enum): Likewise. * cp/mangle.c (write_builtin_type): Likewise. * cp/semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise. * cp/typeck.c (type_after_usual_arithmetic_conversions): Likewise. (build_binary_op): Likewise. * f/com.c (ffecom_arrayref_): Use TYPE_UNSIGNED, not TREE_UNSIGNED. (ffecom_expr_): Likewise. * java/jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED. * treelang/treetree.c (tree_lang_signed_or_unsigned_type): Use TYPE_UNSIGNED, not TREE_UNSIGNED. * ada/decl.c (gnat_to_gnu_entity, make_type_from_size): Use TYPE_UNSIGNED, not TREE_UNSIGNED. * ada/trans.c (tree_transform, convert_with_check): Likewise. * ada/utils.c (gnat_signed_or_unsigned_type): Likewise. (build_vms_descriptor, unchecked_convert): Likewise. * ada/utils2.c (nonbinary_modular_operation): Likewise. From-SVN: r80287
* PR 12267, 12391, 12560, 13129, 14114, 14113Zack Weinberg2004-03-231-27/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-tree.h: Forward declare struct c_binding. Declare c_override_bindings_to_false. Update prototypes. (struct lang_identifier): Update comments. Change fields to be struct c_binding *. (IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE) (IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE) (KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete. (C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New. * c-common.h: Update prototypes. * c-decl.c (struct c_scope): Update commentary. Remove names, names_last, parms, parms_last, tags, and shadowed fields. Add bindings and depth fields. (scope_freelist): Move to more appropriate location. (c_print_identifier): Update for changes to struct lang_identifier. (objc_mark_locals_volatile): Update for new bindings structures. (global_bindings_p): Honor c_override_global_bindings_to_false. (pushlevel): Rename to push_scope; take no arguments; use the scope_freelist; initialize scope->depth and check for overflow. (poplevel): Rename to pop_scope; totally rewritten for new bindings structures. (diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not C_DECL_INVISIBLE, for certain decisions. Adjust some diagnostics. Improve some commentary. Adjust handling of forward parm decls. (merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate. Preserve C_DECL_IN_EXTERNAL_SCOPE. (warn_if_shadowing): Correct indentation. Improve diagnostics. (pushdecl): Remove unnecessary assertion. Short-circuit anonymous decls. Rewrite for new bindings structures. Improve commentary. Eliminate the copy_node call. (implicit_decl_warning): Use the "diag" idiom (as seen in locate_old_decl) to reduce code duplication; call locate_old_decl if appropriate. Relocate to remove need for forward declaration. (implicitly_declare): Adjust for new bindings structures. Kludge around Objective-C not-really-builtin functions. (undeclared_variable): Improve diagnostics. If current_function_decl is nonnull but current_function_scope is null, use current_scope. Use bind. (lookup_tag): Adjust for new bindings structures. Kludge around Objective-C's tag declarations that wind up in the external scope. (lookup_name): Adjust for new bindings structures. Kludge around c-common.c's pseudo-typedefs that wind up in the external scope. (lookup_name_current_level): Rename lookup_name_in_scope; take a second argument indicating the scope to examine; rewrite for new bindings structures. (c_init_decl_processing): Adjust for renamed functions. Do not initialize current_file_decl, first_builtin_decl, last_builtin_decl. First scope pushed is the external scope, not the global scope. (builtin_function): Use bind, not pushdecl. Adjust other bits for new data structures. Keep track of builtins that should be made visible automatically. (start_decl): Adjust diagnostics. Remove unnecessary call to expand_decl. (grokparms): Return 0 if arg_types is error_mark_node. (get_parm_info): Rename "void_at_end" argument to "ellipsis", with reversed sense. Rewrite for new bindings structures. Do not leave any decls in the scope, to prevent pop_scope from doing contradictory things with them. (finish_struct, finish_enum): Remove redundant diagnostics. (build_enumerator): Don't cascade diagnostics for error_mark_node. Mark location where -pedantic changes the meaning of the program. (store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the parameter decls into the function's scope structure using bind. Warn here about function definitions in the wrong style. Adjust diagnostics. (store_parm_decls): Correct the determination of whether a function was defined with a prototype. (c_write_global_declarations): Operate on all file decls and on the external scope. Split body of the loop to... (c_write_global_declarations_1): ... this new function, to avoid code duplication. (truly_local_externals, first_builtin_decl, last_builtin_decl) (make_scope, pop_scope, in_parm_level_p, set_block) (any_external_decl, record_external_decl, bind_label, getdecls) (link_hash_hash, link_hash_eq, merge_translation_unit_decls) (c_reset_state): Delete. (visible_builtins, c_override_global_bindings_to_false) (c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING) (I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope) (external_scope, binding_freelist, bind, free_binding_and_advance) (push_file_scope, pop_file_scope): New. (pushtag, pushdecl_top_level, lookup_label, declare_label) (define_label, c_make_fname_decl, finish_decl) (mark_forward_parm_decls, build_compound_literal) (grokdeclarator, start_function, check_for_loop_decls) (identifier_global_value, record_builtin_type): Minor adjustments for new bindings structures. Improve diagnostics and commentary. * c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to pushlevel/poplevel respectively. (c_objc_common_finish_file): Don't call merge_translation_unit_decls. * c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED. Warn about YYDEBUG not being defined only if -dy. Remove no-longer- correct loop over multiple translation units; call fatal_error if requested to compile more than one file at once. (This disables IMA temporarily - an up-front error being preferable to a crash.) * c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope. (all actions): Adjust calls to pushlevel/poplevel. (parsing_iso_function_signature): Delete. (extdef_1): Fold into extdef. (old_style_parm_decls_1): Fold into old_style_parm_decls. Don't warn here about function definitions in the wrong style. (after_tyle_declarator, parm_declarator_starttypename) (parm_declarator_nostarttypename, notype_declarator): Remove commented-out productions. (parmlist_1, parmlist_2): Use make_node, not tree_cons, to create an empty TREE_LIST node. Adjust calls to get_parm_info. (parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node to suppress -Wold-style-definition after this error. (c_parse_file): Don't clear the binding stack or call finish_fname_decls here. Correct comment. * c-typeck.c (same_translation_unit_p): Export. (common_type): Use c_override_global_bindings_to_false, not pushlevel/poplevel/declare_parm_level. * c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK, and LANG_HOOKS_GETDECLS with do-nothing stubs. * objc/objc-lang.c: Likewise. * objc/objc-act.c: Adjust all calls to pushlevel, poplevel, get_parm_info. (OBJC_VOID_AT_END): Delete; replace all uses with void_list_node. (generate_forward_declaration_to_string_table): Delete. * objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete. * coverage.c (create_coverage): Don't pushdecl anything. * langhooks.c (lhd_clear_binding_stack): Call lang_hooks.decls.poplevel, not poplevel. * tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a circular list rather than going into an infinite loop. cp: * cp-lang.c (c_reset_state): Delete. (push_file_scope, pop_file_scope): New stubs. * parser.c (c_parse_file): Call sorry() here if called more than once. testsuite: * gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c * gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c * gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m: Adjust error regexps. * gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c * gcc.dg/noncompile/undeclared-1.c: New test cases. * gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL. * gcc.dg/local1.c: Add explanatory comment. From-SVN: r79883
* target-def.h (TARGET_OPTF): Delete.Alan Modra2004-03-041-0/+4
| | | | | | | * target-def.h (TARGET_OPTF): Delete. * c-opts.c (TARGET_OPTF): Define. From-SVN: r78878
* Add framework support for darwin.Mike Stump2004-03-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-incpath.c: Include target.h and machmode.h. (add_path): Use a consistent style for cpp_dir. Initialize p->construct to 0. (add_cpp_dir_path): New. (register_include_chains): Add use of extra_includes callback. (hook_void_int): Add. (target_c_incpath): Add. * c-incpath.h (add_cpp_dir_path): New. (target_c_incpath_s): Add. (target_c_incpath): Add. (C_INCPATH_INIT): Add. * c-opts.c (c_common_missing_argument, c_common_handle_option): Add -F argument processing. * c.opt: Add -F argument processing. * gcc.c (trad_capable_cpp): Add -F argument processing. * cppfiles.c (find_file_in_dir): Update to use construct callback. (search_path_exhausted, cpp_get_path, cpp_get_buffer, cpp_get_prev): New. (_cpp_find_file): Use search_path_exhausted. (make_cpp_dir): Initialize construct to 0. * cpplib.h (missing_header_cb cpp_get_path, cpp_get_buffer, cpp_get_file, cpp_get_prev): New. (cpp_callbacks): Add missing_header (cpp_dir): Add construct. * target-def.h: (TARGET_OPTF): New. * hooks.c (hook_void_int, hook_void_charptr): Add. * hooks.h (hook_void_int, hook_void_charptr): Add. * Makefile.in (c-incpath.o) : Add $(TARGET_H) and $(MACHMODE_H) dependencies. * doc/invoke.texi (Darwin Options): Document -F. * doc/tm.texi (TARGET_EXTRA_INCLUDES): Add. (TARGET_OPTF): Add. * fix-header.c (target_c_incpath): Add. * config/darwin-c.c: Add c-incpath.h include. (using_frameworks, find_subframework_file, find_subframework_header, add_system_framework_path, frameworks_in_use, num_frameworks, max_frameworks, add_framework, find_framework, struct framework_header, framework_header_dirs, framework_construct_pathname, find_subframework_file, add_system_framework_path, add_framework_path, framework_defaults, darwin_register_frameworks, find_subframework_header): Add. * config/darwin.h (TARGET_EXTRA_INCLUDES, TARGET_OPTF): New. (TARGET_OPTION_TRANSLATE_TABLE): Add -framework support. (CPP_SPEC): Add __APPLE_CC__ support. * t-darwin (darwin-c.o): Add c-incpath.h dependency. From-SVN: r78875
* Remove -fwritable-strings.Zack Weinberg2004-02-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc/ Remove -fwritable-strings. * c-common.c (fix_string_type): Don't check flag_writable_strings. (fix_string_type): Likewise. * c-opts.c (set_std_c89): Don't initialize flag_writable_strings. (set_std_c99): Likewise. * common.opt (fwritable-strings): Remove. * flags.h: Remove the external declaration of flag_writable_strings. * opts.c (common_handle_option) <OPT_fwritable_strings>: Remove. * toplev.c (flag_writable_strings): Remove. (f_options): Remove an entry for writable-strings. * varasm.c (const_hash_1) <STRING_CST>: Don't check flag_writable_strings. (compare_constant) <STRING_CST>: Likewise. (build_constant_desc): Likewise. * config/darwin.c (machopic_select_section): Likewise. * config/arm/arm.c (AOF_ASSEMBLER): Likewise. * config/arm/pe.c (arm_pe_encode_section_info): Likewise. * config/iq2000/iq2000.c (iq2000_select_section): Likewise. * config/mips/mips.c (mips_select_section): Likewise. (mips_encode_section_info): Likewise. * config/pa/pa.c (pa_select_section): Likewise. * config/pa/pa.h (TEXT_SPACE_P): Likewise. * config/v850/v850.c (v850_select_section): Likewise. * doc/invoke.texi (-fwritable-strings): Remove. (-fno-const-strings): Don't mention -fwritable-strings. * doc/trouble.texi: Don't mention -fwritable-strings. gcc/cp/ * decl.c (cxx_init_decl_processing): Don't check flag_writable_strings. gcc/testsuite/ * gcc.dg/fwritable-strings-1.c: Remove. Co-Authored-By: Kazu Hirata <kazu@cs.umass.edu> From-SVN: r78333
* c-opts.c (warn_variadic_macros): New.Richard Henderson2004-02-191-0/+12
| | | | | | | | | | | | * c-opts.c (warn_variadic_macros): New. (c_common_handle_option): Set it. (sanitize_cpp_opts): Copy it to cpp_opts. * c.opt (Wvariadic-macros): New. * cpplib.h (struct cpp_options): Add warn_variadic_macros. * cppinit.c (cpp_create_reader): Initialize it. * cppmacro.c (parse_params): Check it. From-SVN: r78125
* re PR c++/11326 (C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return ↵Mark Mitchell2004-02-171-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | value is implicit first parameter preceding "this") PR c++/11326 * c-common.c (flag_abi_version): Remove. * c-common.h (flag_abi_version): Likewise. * c-opts.c (c_common_handle_option): Remove OPT_fabi_version case. * c.opt (fabi-version): Remove. * calls.c (expand_call): Always pass a function type to struct_value_rtx. Use convert_memory_address. * common.opt (fabi-version): Add it. * flags.h (flag_abi_version): Likewise. (abi_version_at_least): New macro. * opts.c (common_handle_option): Add OPT_fabi_version. * toplev.c (flag_abi_version): Define it. * config/ia64/ia64.c (ia64_struct_retval_addr_is_first_parm_p): New function. (ia64_output_mi_thunk): Use it. (ia64_struct_value_rtx): Likewise. PR c++/11326 * cp-tree.h (abi_version_at_least): Remove. * mangle.c: Include flags.h. PR c++/11326 * g++.dg/abi/structret1.C: New test. From-SVN: r77968
* c-opts.c (c_common_post_options): Don't emit working directory in cpp output ↵Per Bothner2004-02-101-1/+2
| | | | | | | | | if -P was specified. * c-opts.c (c_common_post_options): Don't emit working directory in cpp output if -P was specified. From-SVN: r77607
* c-common.c (shadow_warning): Delete.Zack Weinberg2004-02-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c (shadow_warning): Delete. * c-common.h (free_parser_stacks, shadow_warning, sw_kind): Delete. * c-decl.c (warn_if_shadowing): Issue shadow warnings directly. * c-opts.c (c_common_parse_file): Don't call free_parser_stacks. * c-parse.in (free_parser_stacks): Delete. cp: * name-lookup.c (pushdecl): Issue shadow warnings directly. * parser.c (free_parser_stacks): Delete. testsuite: * gcc.c-torture/execute/string-opt-15.c: Define memcmp with void * arguments. * gcc.dg/fwritable-strings-1.c: Expect the deprecation notice. ------ Bug 13856 * c-decl.c (diagnose_mismatched_decls): Only give special treatment when olddecl is DECL_BUILT_IN, if C_DECL_INVISIBLE is also true. (merge_decls): Don't clear DECL_BUILT_IN_CLASS and DECL_FUNCTION_CODE when defining a built-in function. Don't update DECL_ESTIMATED_INSNS. * dwarf2out.c (dwarf2out_decl): Don't ignore built-in FUNCTION_DECLs. * tree.h: Delete DECL_ESTIMATED_INSNS. * tree-inline.c (struct inline_data): Delete inlined_insns field. (expand_call_inline, optimize_inline_calls): Don't update DECL_ESTIMATED_INSNS nor inlined_insns. * cgraphunit.c (cgraph_analyze_function): Don't update DECL_ESTIMATED_INSNS. cp: * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS. * decl.c (duplicate_decls, start_function): Likewise. testsuite: * gcc.dg/visibility-8.c: New testcase. From-SVN: r77475
* Partially revert/redo 2003-10-01 change; fix -fworking-directory.Per Bothner2004-02-041-25/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-ppoutput.c (pp_dir_change): New function. * c-common.h (pp_dir_change): New declaration. * cpplib.h (struct cpp_options): Remove working_directory field. * cppinit.c (cpp_find_main_file, cpp_push_main_file): Merge back to (cpp_read_main_file): as before 10-01. Call _cpp_stack_file. Don't handle -fworking_directory here, but in c_common_post_options. (read_original_directory): Don't back up when done. Don't clear no-longer used working_directory flag. * cpplib.h: Update declarations to match. * c-lex.c (cb_dir_change): Move to c-opts.c. (init_c_lex): Don't set dir_change callback here, since we want to set it even if flag_preprocess_only. * c-opts.c (cb_dir_change): Function moved from c-lex.c. (c_common_post_options): Set dir_change callback. Call pp_dir_change if approporiate. (finish_options): Don't call cpp_find_main_file here. Hence remove unneeded parameter and result. Do LC_RENAME for <built-in>. (c_common_post_options): Call cpp_read_main_file here instead. (c_common_init): Update accordingly. (push_command_line_include): Don't cpp_push_main_file. Do LC_RENAME rather than LC_LEASE to get back to main file. Compared to pre-10-01 version, inline cpp_rename_to_main_file. (c_common_parse_file): Call cpp_read_main_file for subsequent main files, but call finish_options for all files. * c-opts.c (sanitize_cpp_opts): Don't set cpp_opts->working_directory. * fix-header.c (read_scan_file): Call cpp_read_main_file instead of cpp_find_main_file + cpp_push_main_file. * c-lex.c (fe_file_change): Don't set main_input_filename here. * opts.c (handle_options): Only set main_input_filename first time. From-SVN: r77303
* [multiple changes]Eric Christopher2004-02-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-02-02 Eric Christopher <echristo@redhat.com> Zack Weinberg <zack@codesourcery.com> * c-opts.c (c_common_handle_option): Add -finput-charset. * c.opt: Ditto. * cppcharset.c (one_iso88591_to_utf8): Remove. (convert_iso88591_utf8): Ditto. (conversion_tab): Remove 8859-1 converter. (_cpp_input_to_utf8): Remove. (_cpp_init_iconv_buffer): Ditto. (_cpp_close_iconv_buffer): Ditto. (_cpp_convert_input): New function. (_cpp_default_encoding): Ditto. * cpphash.h: Add/remove prototypes for above. * cppfiles.c (read_file_guts): Use _cpp_convert_input. * cppinit.c (cpp_create_reader): Use _cpp_default_encoding for narrow execution and input character sets. * cpplib.c (cpp_push_buffer): Delete uses of removed functions. * doc/cppopts.texi: Document -finput-charset. 2004-02-02 Eric Christopher <echristo@redhat.com> Zack Weinberg <zack@codesourcery.com> * gcc.c-torture/execute/wchar_t-1.c: Add -finput-charset. 2004-01-29 Eric Christopher <echristo@redhat.com> Zack Weinberg <zack@codesourcery.com> * testsuite/22_locale/collate/compare/wchar_t/2.cc: Remove xfail. Use -finput-charset. * testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc: Ditto. * testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc: Ditto * testsuite/22_locale/collate/hash/wchar_t/2.cc: Ditto. * testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc: Ditto. * testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc: Ditto. * testsuite/22_locale/collate/transform/wchar_t/2.cc: Ditto. * testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc: Ditto. * testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc: Ditto. From-SVN: r77136
* alias.c, [...]: Update copyright.Kazu Hirata2004-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | * alias.c, basic-block.h, c-common.c, c-common.h, c-cppbuiltin.c, c-opts.c, c-pragma.c, c-pretty-print.c, calls.c, cfg.c, cfgcleanup.c, cfgrtl.c, cgraph.h, collect2.c, combine.c, cppcharset.c, cpphash.h, cppinit.c, cpplib.c, cpplib.h, cppmacro.c, crtstuff.c, cselib.c, cselib.h, defaults.h, df.c, dominance.c, et-forest.c, expmed.c, expr.c, expr.h, fix-header.c, function.h, gcc.c, gcse.c, genattrtab.c, genautomata.c, genconditions.c, genemit.c, genflags.c, gengtype.c, gengtype.h, genopinit.c, genrecog.c, gensupport.c, ggc-zone.c, graph.c, haifa-sched.c, input.h, integrate.c, langhooks-def.h, langhooks.c, langhooks.h, line-map.c, line-map.h, local-alloc.c, optabs.c, optabs.h, postreload.c, ra.h, recog.c, reg-stack.c, regmove.c, reload.c, reorg.c, rtl.c, sched-deps.c, sched-ebb.c, sdbout.c, system.h, target.h, targhooks.c, toplev.h, tree-inline.c, unwind-pe.h, unwind.h, varray.c, varray.h: Update copyright. From-SVN: r76302
* Move cpp_reader's line_maps field to a shared global.Per Bothner2004-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * cpphash.h (cpp_reader): Rename line_maps field to line_table and change the type to a pointer rather than a struct. * cppinit.c (cpp_push_main_field): Adjust accordingly. * cpplib.c (do_include_common, _cpp_do_file_change, cpp_get_callbacks): Likewise. * cppfiles.c (validate_pch): Likewise. * cppmacro.c (_cpp_warn_if_unused_macro, _cpp_builtin_macro_text): Likewise. * cpperror.c (print_location): Likewise. * cpplib.h (cpp_create_reader): New line_maps pointer parameter. * cppinit.c (cpp_create_reader): Handle new parameter. (cpp_destroy): Don't free line_maps - that's no longer our job. * input.h (line_table): New variable. * toplev.c (line_table): Declare variable. (general_init): Initialize line_table. * c-opts.c (c_common_init_options): Pass line_table to cpp_create_reader. * fix-header.c (read_scan_file): New local variable line_table. Initialize, and pass it to cpp_create_reader. * Makefile.in (LIBS, LIBDEPS): Add libcpp.a. (C_AND_OBJC_OBJS, fix-header): Remove redundant libcpp.a. From-SVN: r76198
* re PR c++/12862 (Conflicts Between typedefs/enums and Namespace Member ↵Mark Mitchell2003-12-221-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declarations) * c-common.c (flag_external_templates): Remove. (flag_alt_external_templates): Likewise. * c-common.h (flag_external_templates): Remove. (flag_alt_external_templates): Likewise. * c-opts.c (c_common_handle_option): Unsupport -falt-external-templates and -ftemplates. * doc/invoke.texi: Remove mention of -fexternal-templates and -falt-external-templates. * decl.c (start_function): Do not check flag_alt_external_templates or flag_external_templates. * decl2.c (warn_if_unknown_interface): Likewise. * lex.c (extract_interface_info): Likewise. * pt.c (lookup_template_class): Likewise. PR c++/12862 * name-lookup.c (pushdecl): Look up all namespace-scope entities in their corresponding namespace. * g++.old-deja/g++.jason/template18.C: Remove. * g++.old-deja/g++.jason/template37.C: Likewise. PR c++/12862 * g++.dg/lookup/ns1.C: New test. From-SVN: r74954
* alias.c: Fix comment formatting.Kazu Hirata2003-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * alias.c: Fix comment formatting. * alloc-pool.c: Likewise. * bitmap.c: Likewise. * bitmap.h: Likewise. * bt-load.c: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-decl.c: Likewise. * c-opts.c: Likewise. * c-pretty-print.c: Likewise. * caller-save.c: Likewise. * cfghooks.h: Likewise. * cgraph.c: Likewise. * collect2.c: Likewise. * cppfiles.c: Likewise. * cpplib.h: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * final.c: Likewise. * function.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genemit.c: Likewise. * ggc.h: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * libgcc2.h: Likewise. * loop.c: Likewise. * predict.h: Likewise. * unwind-libunwind.c: Likewise. * varasm.c: Likewise. From-SVN: r74907
* c-opts.c (finish_options): Set include_cursor to disable premature calls to ↵Per Bothner2003-11-051-1/+5
| | | | | | | | | | push_command_line_include from... * c-opts.c (finish_options): Set include_cursor to disable premature calls to push_command_line_include from cpp_scan_nooutput. Fixes bug reported by DJ Delorie. From-SVN: r73281
* c-opts.c (needValue): Do cpp_find_main_file before processing any imacros ↵Per Bothner2003-11-021-3/+4
| | | | | | | | | flags... * c-opts.c (needValue): Do cpp_find_main_file before processing any imacros flags, so pfile->main_file is set for the latter. From-SVN: r73212
* c-opts.c (finish_options): Change to returns boolean - false iff the call to ↵Per Bothner2003-10-311-7/+10
| | | | | | | | | | | cpp_find_main_file fails. * c-opts.c (finish_options): Change to returns boolean - false iff the call to cpp_find_main_file fails. (c_common_init): Skip preprocess_file if finish_options failed. (c_common_parse_file): Break if finish_options failed. From-SVN: r73170
* c-opts.c (c_common_post_options): Don't call cpp_find_main_file yet.Per Bothner2003-10-021-13/+10
| | | | | | | | | | | | | * c-opts.c (c_common_post_options): Don't call cpp_find_main_file yet. (c_common_parse_file): No longer need to call cpp_read_main_file when file_index > 0 (as in multi-file or server compiation). (finish_options): Change to <built-in> is an LC_ENTER, not LC_RENAME as this now happens before cpp_push_main_file. (push_command_line_include): When done with options, pass LC_LEAVE instead of LC_RENAME to cpp_change_file and finally cpp_push_main_file. (fe_file_change): Handle NULL new_map, and simplify. From-SVN: r72015
* MERGE OF objc-improvements-branch into MAINLINE.Ziemowit Laski2003-09-251-0/+16
| | | | | | | | | | 2003-09-24 Ziemowit Laski <zlaski@apple.com> MERGE OF objc-improvements-branch into MAINLINE. See 'gcc/ChangeLog' and 'gcc/testsuite/ChangeLog' for the gory details. From-SVN: r71748
* invoke.texi (Warning Options): Describe -Wold-style-definition.Andreas Jaeger2003-09-151-0/+4
| | | | | | | | | | | | | | | | | | | 2003-09-15 Andreas Jaeger <aj@suse.de> Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * doc/invoke.texi (Warning Options): Describe -Wold-style-definition. * c-opts.c (c_common_handle_option): Handle OPT_Wold_style_definition. * c-parse.in: Warn about old-style parameter definition. * c-common.c: Define warn_old_style_defintion. * c-common.h: Declare it. * c.opt: Add Wold-style-defintion. testsuite: 2003-09-15 Andreas Jaeger <aj@suse.de> * gcc.dg/Wold-style-definition-1.c: New test. From-SVN: r71400
* PR c++/10538, PR c/5582Andrew Pinski2003-08-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ChangeLog: * langhooks-def.h (lhd_decl_uninit): Declare. (LANG_HOOKS_DECL_UNINIT): New macro. (LANG_HOOKS_INITIALIZER): Adjust. * langhooks.h (struct lang_hooks): Add new field decl_uninit. * langhooks.c (lhd_decl_uninit): Define. * c-common.c (c_decl_uninit_1): New function. (c_decl_uninit): New function. (warn_init_self): Define. * c-common.h (c_decl_uninit): Declare. (warn_init_self): Declare. * c.opt: Introduce -Winit-self. * c-opts.c (c_common_handle_options): Set warn_init_self. * c-lang.c (LANG_HOOKS_DECL_UNINIT): Define. * objc/objc-lang.c (LANG_HOOKS_DECL_UNINIT): Define. * function.c (uninitialized_vars_warning): Call the language hook. * doc/invoke.texi: Document -Winit-self. cp/ChangeLog: * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define. testsuite: * gcc.dg/uninit-D.c: New Test. * gcc.dg/uninit-E.c: New Test. * gcc.dg/uninit-F.c: New Test. * gcc.dg/uninit-G.c: New Test. From-SVN: r70574
* cppinit.c (cpp_read_main_file): Split out source-independent initialization ↵Per Bothner2003-08-091-1/+2
| | | | | | | | | | | | | | | | | | to separate function ... * cppinit.c (cpp_read_main_file): Split out source-independent initialization to separate function ... (cpp_post_options): New function. * cppfiles.c (cpp_stack_file): Rename public name to ... (_cpp_stack_file): New internal function name. * cpplib.h: Update accordingly. * cppinit.c: (cpp_create_reader): Initialize cpp_readers line here. (cpp_read_main_file): Don't initialize line here. * c-opts.c (c_common_post_options): Call cpp_post_options. (c_common_parse_file): Call cpp_read_main_file, not cpp_stack_file. * fix-header.c (read_scan_file): Call cpp_post_options. From-SVN: r70279
* c.opt: Introduce -fworking-directory.Alexandre Oliva2003-08-051-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | * c.opt: Introduce -fworking-directory. * doc/cpp.texi, doc/invoke.texi, doc/cppopts.texi: Document it. * c-common.h (flag_working_directory): Declare. * c-common.c (flag_working_directory): Define. * c-opts.c (c_common_handle_options): Set it. (sanitize_cpp_opts): Set... * cpplib.h (struct cpp_options): ... working_directory option. (struct cpp_callbacks): Add dir_change. * cppinit.c (read_original_filename): Call... (read_original_directory): New. Look for # 1 "directory//" and process it. (cpp_read_main_file): Call dir_change callback if working_directory option is set. * gcc.c (cpp_unique_options): Pass -g*. * c-lex.c (cb_dir_change): New. (init_c_lex): Set dir_change callback. * toplev.c (src_pwd): New static variable. (set_src_pwd, get_src_pwd): New functions. * toplev.h (get_src_pwd, set_src_pwd): Declare. * dbxout.c (dbxout_init): Call get_src_pwd() instead of getpwd(). * dwarf2out.c (gen_compile_unit_die): Likewise. * dwarfout.c (output_compile_unit_die, dwarfout_init): Likewise. From-SVN: r70189
* c-common.c (flag_noniso_default_format_attributes): Delete.Roger Sayle2003-08-041-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c (flag_noniso_default_format_attributes): Delete. (built_in_attribute): Don't define/undefine DEF_FN_ATTR. (c_attrs_initialized): Delete. (c_common_nodes_and_builtins): Don't test c_attrs_initialized, always call c_init_attributes. (c_init_attributes): Don't define/undefine DEF_FN_ATTR. Don't set c_attrs_initialized when done. (c_common_insert_default_attributes): Delete. * c-common.h (flag_noniso_default_format_attributes): Delete. (c_coomon_insert_default_attributes): Delete prototype. * c-opts.c (set_std_c89, set_std_c99, set_std_cxx98): Dont set flag_noniso_default_format_attributes. * c-decl.c (c_insert_default_attributes): Delete. * c-tree.h (c_insert_default_attributes): Delete prototype. * attribs.c (decl_attributes): Don't call insert_default_attributes langhook. Update function description comment. * langhooks.h (lang_hooks): Remove insert_default_attributes field. * langhooks-def.h (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Delete. * c-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define. * system.h: Poison LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES macro. cp/ * decl.c (cxx_insert_default_attributes): Delete. * cp-tree.h (cxx_insert_default_attributes): Don't prototype. * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define. objc/ * objc-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define. From-SVN: r70155
* Makefile.in: Refine dependencies.Neil Booth2003-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | * Makefile.in: Refine dependencies. * c-opts.c (c_common_handle_option): Do nothing for -Wimport. * c.opt: Update help for -Wimport. * cppfiles.c: Include hashtab.h. Update comments. (stack_file): Read the file before updating dependencies. (once_only_file_p): Be smarter about marking once-only files. (_cpp_mark_file_once_only): Correct the check for existence on the list. (open_file_failed): Use name not path, which is NULL. * cpphash.h: Don't include hashtab.h. (struct _cpp_file): Remove. (struct cpp_reader): Update. * cppinit.c (cpp_create_reader): Don't initialize warn_import. * cpplib.h (struct cpp_options): Remove warn_import. (cpp_simplify_path): Remove. From-SVN: r70045
* opts.c (in_fnames, [...]): Moved here from c-opts.Per Bothner2003-07-311-11/+0
| | | | | | | | | | | | | | | | | | | | | * 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
* re PR c/10320 (gcc 3.4 gets rid of static inline function that does not get ↵Jan Hubicka2003-07-301-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | inlined) * gcse.c (insert_store): Ignore fake edges. * c-common.c (flag_vtable_gc): Kill. * c-common.g (flag_vtable_gc): Kill. * c-opts (c_common_handle_option): Kill. * c.opt (fvtable-gc): Kill. * final.c (final_scan_insn): Do not call assemble_vtable_entry. * output.h (assemble_vtable_entry, assemble_vtable_inherit): Kill. * varasm.c (assemble_vtable_entry, assemble_vtable_inherit): Kill. * invoke.texi (-ftable-gc): Kill documentation. PR C/10320 * tree-inline.c (inlinable_function_p): Don't set DECL_UNINLINABLE just because function body is missing. * i386.c (pic_symbolic_operand): Properly detect RIP relative unspecs. * class.c (build_vtable_entry_ref): Kill. (build_vtbl_ref_1): Do not call build_vtable_entry_ref. (build_vfn_ref): Do not call build_vtable_entry_ref. * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill. * cp-tree.h (prepare_assemble_variable): Kill. * cp-decl.c (prepare_assemble_variable): Kill. From-SVN: r69964