Skip to content
Snippets Groups Projects
  1. Feb 15, 2007
    • Manuel López-Ibáñez's avatar
      re PR c/26494 (-pedantic-errors can be overridden by -W*) · dc90f45b
      Manuel López-Ibáñez authored
      2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
      
      	PR c/26494
      	* doc/invoke.texi (Warning Options): Remove
      	-Werror-implicit-function-declaration.
      	(Wimplicit-function-declaration): Update description.
      	* opts.c (common_handle_option): Move handling of -Werror=* to...
      	(enable_warning_as_error): ...here.
      	* opts.h (enable_warning_as_error): Declare.
      	* c-decl.c (implicit_decl_warning): Unless
      	-Wno-implicit-function-declaration is given, emit a pedwarn if
      	-std=c99 or emit a warning if -Wimplicit-function-declaration.
      	* c.opt (Wimplicit-function-declaration): Replace
      	mesg_implicit_function_declaration with
      	warn_implicit_function_declaration.
      	* c-opts.c (c_common_handle_option):
      	-Werror-implicit-function-declaration is exactly equal as
      	-Werror=implicit-function-declaration.
      	(set_Wimplicit): Replace mesg_implicit_function_declaration with
      	warn_implicit_function_declaration.
      	(c_common_post_options): -Wimplict-function-declaration is enabled
      	by default by -std=c99, otherwise is disabled by default.
      	* c-objc-common.c (c_objc_common_init): Remove flawed logic.
      testsuite/
      	* gcc.dg/Wimplicit-function-declaration-c89.c: New.
      	* gcc.dg/Wimplicit-function-declaration-c89-default.c: New.
      	* gcc.dg/Wimplicit-function-declaration-c89-pedantic.c: New.
      	* gcc.dg/Wimplicit-function-declaration-c99.c: New.
      	* gcc.dg/Wimplicit-function-declaration-c99-pedantic.c: New.
      	* gcc.dg/Werror-implicit-function-declaration.c: New.
      
      From-SVN: r122017
      dc90f45b
  2. May 18, 2006
    • Mike Stump's avatar
      Whitespace fixups · c22cacf3
      Mike Stump authored
      From-SVN: r113893
      c22cacf3
    • Mike Stump's avatar
      Fix up vla, vm and [*] sematics. · 52ffd86e
      Mike Stump authored
      	PR c/18740
      	PR c/7948
      	PR c/25802
      	* c-tree.h (struct c_arg_info): Add had_vla_unspec.
      	(c_vla_unspec_p): Add.
      	(c_vla_type_p): Add.
      	* c-decl.c (struct c_scope): Add had_vla_unspec.
      	(build_array_declarator): Add support for [*].
      	(grokdeclarator): Likewise.
      	(grokparms): Likewise.
      	(get_parm_info): Likewise.
      	* c-objc-common.c (c_vla_unspec_p): Likewise.
      	* c-objc-common.h (LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P): Likewise.
      	* c-parser.c (c_parser_typeof_specifier): Evaluate arguments to
      	typeof when argument is a variably modified type not inside sizeof or alignof.
      	(c_parser_direct_declarator_inner): Propagate errors.
      	(c_parser_sizeof_expression): Add support for [*].
      	* c-typeck.c (c_vla_type_p): Add.
      	(composite_type): Add support for vla compositing.
      	(comptypes_internal): Add support for vla compatibility.
      	(c_expr_sizeof_expr): Evaluate vla arguments.
      	* tree.c (variably_modified_type_p): Update comment for [*].
      
      testsuite:
      	* gcc.dg/c90-arraydecl-1.c: Update for vla, vm [*] fixups.
      	* gcc.dg/vla-4.c: Add.
      	* gcc.dg/vla-5.c: Add.
      	* gcc.dg/vla-6.c: Add.
      
      From-SVN: r113888
      52ffd86e
  3. Jul 22, 2005
  4. Jul 02, 2005
    • Joseph Myers's avatar
      toplev.c (default_tree_printer): Handle setting location with '+' flag. · dee15844
      Joseph Myers authored
      2005-07-02  Zack Weinberg  <zack@codesourcery.com>
                  Joseph S. Myers  <joseph@codesourcery.com>
      
      	* toplev.c (default_tree_printer): Handle setting location with
      	'+' flag.
      	* c-objc.common.c (c_tree_printer): Likewise.
      	* c-format.c (gcc_diag_flag_specs): Add '+'.
      	(gcc_cdiag_char_table): Allow '+' flag for tree formats.
      	(format_types_orig): Allow '+' flag for gcc_diag and gcc_cdiag
      	formats.
      	* c-common.c, c-decl.c, c-objc-common.c, c-pragma.c,
      	config/arm/pe.c, config/i386/winnt.c, config/ia64/ia64.c,
      	config/mcore/mcore.c, config/sh/symbian.c, config/sol2.c,
      	config/v850/v850.c, function.c, stor-layout.c, toplev.c,
      	tree-inline.c, tree-optimize.c, tree.c, varasm.c: Use '+' flag
      	instead of %J or %H.  Use 'q' flag for quoting.  Avoid '.' at end
      	of diagnostics.  Use %q+D not %s for a decl.  Do not pass excess
      	format arguments where %J is used without %D.
      
      cp:
      	* error.c (location_of): Add comment.
      	(locate_error, cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
      	* cp-tree.h (cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
      	* call.c, class.c, decl.c, decl2.c, friend.c, init.c,
      	name-lookup.c, parser.c, pt.c, search.c, semantics.c, typeck.c,
      	typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at
      	or cp_pedwarn_at.  Mark up some diagnostic strings with N_.
      
      java:
      	* class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
      	flag for quoting.
      
      objc:
      	* objc-act.c: Use '+' flag instead of %J.  Use 'q' flag for
      	quoting.
      
      testsuite:
      	* gcc.dg/format/gcc_diag-1.c: Update.
      
      From-SVN: r101532
      dee15844
  5. Jun 30, 2005
    • Zack Weinberg's avatar
      pretty-print.h (PP_NL_ARGMAX): New. · 39ce81c9
      Zack Weinberg authored
      
      gcc:
      	* pretty-print.h (PP_NL_ARGMAX): New.
      	(text_info): Add locus.
      	(struct chunk_info): New.
      	(output_buffer): Add formatted_obstack, chunk_obstack, and
      	cur_chunk_array. Change obstack to a pointer.
      	(pp_wrapping_mode_t, pp_wrapping_mode, pp_set_verbatim_wrapping): New.
      	(struct pretty_print_info): Replace ideal_maximum_length and
      	prefixing_rule with wrapping.
      	(pp_line_cutoff, pp_prefixing_rule): Update to match.
      	Update prototypes and wrapper macros throughout.
      	* pretty-print.c (pp_formatted_text_data, pp_append_r)
      	(pp_base_clear_output_area, pp_construct, pp_base_formatted_text)
      	(pp_base_last_position_in_text, pp_base_newline, pp_base_character):
      	Update for changes to pp structure.
      	(pp_base_prepare_to_format, pp_base_format_text): Delete.
      	(pp_base_format, pp_base_output_formatted_text): New functions.
      	(pp_base_format_verbatim): Use pp_set_verbatim_wrapping.
      	(pp_verbatim): Clear text.locus.
      	(pp_printf): Likewise.  Use pp_format and pp_output_formatted_text.
      	* c-objc-common.c (c_tree_printer): Update function signature.
      	* diagnostic.c (diagnostic_initialize): Update for changes to
      	pp structure.
      	(diagnostic_report_diagnostic): Call pp_format and then
      	pp_output_formatted_text.
      	(verbatim): Clear text.locus.
      	* diagnostic.h (diagnostic_prefixing_rule, diagnostic_line_cutoff):
      	Update for changes to pp structure.
      
      	* c-lang.c: No need to include c-pretty-print.h.
      	* Makefile.in: Remove bogus line containing only a tab.
      	(c-lang.o): Update dependencies.
      	* toplev.c (announce_function): Don't use verbatim.
      	(default_tree_printer): Update signature.
      
      	* objc/objc-lang.c: No need to include c-pretty-print.h.
      	* objc/Make-lang.in: Update dependencies.
      
      gcc/cp:
      	* cp-lang.c: No need to include cxx-pretty-print.h.
      	* error.c (cp_printer): Update signature.  No need to process
      	flags.
      	(print_instantiation_partial_context): Output last newline
      	with pp_base_newline.
      	* Make-lang.in: Update dependencies.
      
      gcc/objcp:
      	* objcp-lang.c: No need to include cxx-pretty-print.h.
      	* Make-lang.in: Update dependencies.
      
      Co-Authored-By: default avatarJakub Jelinek <jakub@redhat.com>
      
      From-SVN: r101481
      39ce81c9
  6. Jun 25, 2005
  7. Jun 01, 2005
    • Daniel Berlin's avatar
      c-objc-common.c (c_tree_printer): Check flag before hashtable. · f991abd1
      Daniel Berlin authored
      2005-05-30  Daniel Berlin  <dberlin@dberlin.org>
      
      	* c-objc-common.c (c_tree_printer): Check flag before hashtable.
      	Use DECL_DEBUG_EXPR and SET_DECL_DEBUG_EXPR.
      	* dwarf2out.c (dwarf2out_var_location): Ditto.
      	* toplev.c (default_tree_printer): Ditto.
      	* tree-outof-ssa.c (create_temp): Ditto.
      	* tree-sra.c (instantiate_element): Ditto.
      	* var-tracking.c (track_expr_p): Ditto.
      	* tree.c (struct tree_map): New structure.
      	(debug_expr_for_decl): New.
      	(tree_map_eq): New function.
      	(tree_map_hash): Ditto.
      	(tree_map_marked_p): Ditto.
      	(print_debug_expr_statistics): Ditto.
      	(decl_debug_expr_lookup): Ditto.
      	(decl_debug_expr_insert): Ditto.
      	(dump_tree_statistics): Dump debug_expr hashtable stats.
      	* tree.h (DECL_DEBUG_EXPR): Change
      	(SET_DECL_DEBUG_EXPR): Add.
      
      From-SVN: r100417
      f991abd1
  8. Apr 25, 2005
    • Ian Lance Taylor's avatar
      c-common.def (EXPR_STMT): Remove, moved to C++ frontend. · 934790cc
      Ian Lance Taylor authored
      ./	* c-common.def (EXPR_STMT): Remove, moved to C++ frontend.
      	* c-common.h (EXPR_STMT_EXPR): Don't define.
      	(c_common_stmt_codes): Don't define.
      	* c-dump.c (c_dump_tree): Remove EXPR_STMT case.
      	* c-gimplify.c (gimplify_expr_stmt): Remove.
      	(c_gimplify_expr): Remove EXPR_STMT case.
      	* c-objc-common.c (c_objc_common_init): Remove stmt_codes and call
      	to INIT_STATEMENT_CODES.
      	* c-pretty-print.c (pp_c_statement): Just call dump_generic_node.
      cp/
      	* cp-tree.def: Add EXPR_STMT.
      	* cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
      	(EXPR_STMT_EXPR): Define.
      	* cp-gimplify.c: Include "flags.h".
      	(gimplify_expr_stmt): New static function.
      	(cp_gimplify_expr): Handle EXPR_STMT.
      	* cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
      	rather than pp_expression.
      	(pp_cxx_statement): Handle EXPR_STMT.
      	* dump.c (cp_dump_tree): Handle EXPR_STMT.
      	* lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
      	initializer.
      
      From-SVN: r98731
      934790cc
  9. Apr 23, 2005
    • DJ Delorie's avatar
      diagnostic.c (warning): Accept parameter to classify warning option. · d4ee4d25
      DJ Delorie authored
      * diagnostic.c (warning): Accept parameter to classify warning option.
      (warning0): New, for when a pointer to an error() like function is needed.
      * errors.c (warning): Likewise.
      * errors.h (warning, warning0): Adjust prototypes.
      * toplev.h (warning, warning0): Likewise.
      
      * attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c,
      c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c,
      c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c,
      fold-const.c, fortran/trans-decl.c, function.c, gcse.c,
      genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c,
      reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c,
      tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c,
      tree-ssa.c, tree.c, varasm.c: Adjust warning() callers.
      
      * config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
      config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c,
      config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c,
      config/darwin.c, config/darwin.h, config/h8300/h8300.c,
      config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c,
      config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c,
      config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c,
      config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c,
      config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h,
      config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h,
      config/rs6000/aix52.h, config/rs6000/darwin.h,
      config/rs6000/rs6000-c.c, config/rs6000/rs6000.c,
      config/s390/s390.c, config/sh/sh.c, config/sh/sh.h,
      config/sh/symbian.c, config/sol2-c.c, config/sol2.c,
      config/stormy16/stormy16.c, config/v850/v850-c.c,
      config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning()
      callers.
      
      * ada/misc.c: Adjust warning() callers.
      
      * cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c,
      cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c,
      cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c,
      cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers.
      
      * fortran/trans-decl.c: Adjust warning() callers.
      
      * java/class.c, java/decl.c, java/expr.c, java/jcf-io.c,
      java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning()
      callers.
      
      * objc/objc-act.c: Adjust warning() callers.
      
      * treelang/parse.y: Adjust warning() callers.
      
      From-SVN: r98633
      d4ee4d25
  10. Mar 23, 2005
    • Joseph Myers's avatar
      c-common.c (c_common_truthvalue_conversion): Adjust comment. · 85498824
      Joseph Myers authored
      	* c-common.c (c_common_truthvalue_conversion): Adjust comment.
      	Call c_common_truthvalue_conversion rather than
      	lang_hooks.truthvalue_conversion.
      	* c-convert.c (convert): Call c_objc_common_truthvalue_conversion.
      	* c-objc-common.c (c_objc_common_truthvalue_conversion): Move to
      	c-typeck.c.
      	* c-objc-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Change to
      	c_common_truthvalue_conversion.
      	* c-parser.c (c_parser_paren_condition, c_parser_for_statement,
      	c_parser_conditional_expression, c_parser_binary_expression): Call
      	c_objc_common_truthvalue_conversion.
      	* c-typeck.c (build_unary_op): Call
      	c_objc_common_truthvalue_conversion.
      	(build_conditional_expr): Do not call
      	lang_hooks.truthvalue_conversion.
      	(build_binary_op): Call c_common_truthvalue_conversion.
      	(c_objc_common_truthvalue_conversion): Moved from
      	c-objc-common.c.  Call default_function_array_conversion instead
      	of default_conversion.
      
      objc:
      	* objc-act.c (next_sjlj_build_enter_and_setjmp,
      	next_sjlj_build_catch_list, next_sjlj_build_try_catch_finally):
      	Call c_common_truthvalue_conversion.
      
      From-SVN: r96917
      85498824
  11. Jan 27, 2005
    • Kazu Hirata's avatar
      c-common.def, [...]: Update copyright. · f93089d2
      Kazu Hirata authored
      	* c-common.def, c-dump.c, c-gimplify.c, c-objc-common.c,
      	cfgexpand.c, dbxout.c, function.h, opts.c, tree-flow-inline.h,
      	tree-ssa-operands.h, tree-ssa-threadupdate.c, tree-tailcall.c,
      	config/avr/avr.md, config/cris/aout.h, config/cris/cris.h,
      	config/mips/iris6.h, config/sh/sh.c: Update copyright.
      
      From-SVN: r94328
      f93089d2
    • Richard Henderson's avatar
      re PR c++/14329 ([4.1 only] badly formatted warnings for SRA replacements used uninitialized) · dad2a933
      Richard Henderson authored
              PR tree-opt/14329
              * tree.h (struct tree_decl): Add debug_expr_is_from.
              (DECL_DEBUG_EXPR_IS_FROM): New.
              (DECL_DEBUG_EXPR): Rename from DECL_DEBUG_ALIAS_OF.
              * dwarf2out.c (dwarf2out_var_location): Update to match.
              * tree-outof-ssa.c (create_temp): Likewise.
              * var-tracking.c (track_expr_p): Likewise.
              * tree-sra.c (instantiate_element): Set DECL_DEBUG_EXPR.
              * c-objc-common.c (c_tree_printer) <'D'>: Handle DECL_DEBUG_EXPR.
              * toplev.c (default_tree_printer): Likewise.
      
      From-SVN: r94317
      dad2a933
  12. Dec 19, 2004
    • Richard Henderson's avatar
      re PR middle-end/16417 (crappy code (gcc.c-torture/compile/20020210-1.c) in arguments causes ICE) · 4744afba
      Richard Henderson authored
              PR middle-end/16417
              * c-decl.c (store_parm_decls): Clarify get_pending_sizes insertion
              comment.
              * c-objc-common.c (c_cannot_inline_tree_fn): Remove pending sizes
              checks.
              * c-tree.h (struct lang_decl): Remove pending_sizes.
              * function.c: Include tree-gimple.h
              (assign_parm_setup_reg): Remove callee-copies code.
              (gimplify_parm_type, gimplify_parameters): New functions.
              (expand_pending_sizes): Remove.
              (expand_function_start): Don't call it.
              * gimplify.c (gimplify_expr): Examine DECL_VALUE_EXPR for PARM_DECL.
              (gimplify_body): Add do_parms argument.  Use gimplify_parameters.
              (gimplify_function_tree): Setup cfun.  Update gimplify_body call.
              * tree-gimple.h (gimplify_body): Update decl.
              * tree-inline.c (initialize_inlined_parameters): Update gimplify_body
              call.
              * tree.h (gimplify_parameters): Declare.
              * Makefile.in (function.o): Depend on TREE_GIMPLE_H.
      
      From-SVN: r92373
      4744afba
  13. Nov 02, 2004
    • Ziemowit Laski's avatar
      c-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Remove. · 65958285
      Ziemowit Laski authored
      [gcc/ChangeLog]
      2004-11-02  Ziemowit Laski  <zlaski@apple.com>
      
      	* c-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Remove.
      	(c_types_compatible_p): Move function definition...
      	* c-objc-common.c (c_types_compatible_p): ...here.
      	* c-objc-common.h (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from
      	c-lang.c.
      
      [gcc/cp/ChangeLog]
      2004-11-02  Ziemowit Laski  <zlaski@apple.com>
      
      	* cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
      	(LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
      	* cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
      	from cp-lang.c.
      	* cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
      	from cp-lang.c.
      	(LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
      
      From-SVN: r89997
      65958285
  14. Oct 03, 2004
    • Joseph Myers's avatar
      c-aux-info.c, [...]: Follow code formatting conventions. · 3f75a254
      Joseph Myers authored
      	* 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
      3f75a254
  15. Oct 02, 2004
  16. Sep 21, 2004
  17. Sep 12, 2004
    • Joseph Myers's avatar
      c-common.c, [...]: Use %q, %< and %> for quoting in diagnostics. · bda67431
      Joseph Myers authored
      	* 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
      bda67431
  18. Sep 07, 2004
    • Nathan Sidwell's avatar
      c-aux-info.c (gen_type): Use gcc_assert or gcc_unreachable. · 366de0ce
      Nathan Sidwell authored
      	* c-aux-info.c (gen_type): Use gcc_assert or gcc_unreachable.
      	* c-common.c (c_type_hash, c_common_nodes_and_builtins,
      	c_expand_expr, boolean_increment, nonnull_check_p,
      	check_function_arguments_recurse, fold_offsetof_1): Likewise.
      	* c-cppbuiltin.c (define__GNUC__, builtin_define_stdint_macros,
      	builtin_define_type_max): Likewise.
      	* c-decl.c (bind, pop_scope, merge_decls, pushdecl_top_level,
      	implicit_decl_warning, builtin_function, build_compound_literal,
      	complete_array_type, grokdeclarator, get_parm_info,
      	start_function, store_parm_decls_oldstyle,
      	c_write_global_declarations): Likewise.
      	* c-format.c (get_constant, decode_format_attr,
      	maybe_read_dollar_number, get_flag_spec, check_format_arg,
      	check_format_types, format_type_warning,
      	find_char_info_specifier_index, init_dynamic_asm_fprintf_info,
      	init_dynamic_diag_info, handle_format_attribute): Likewise.
      	* c-gimplify.c (push_context, pop_context, finish_bc_block):
      	* c-lex.c (c_lex_with_flags, lex_string): Likewise.
      	* c-objc-common.c (c_tree_printer): Likewise.
      	* c-pch.c (pch_init): Likewise.
      	* c-pragma.c (maybe_apply_pragma_weak): Likewise.
      	* c-pretty-print.c (pp_c_tree_decl_identifier): Likewise.
      	* c-typeck.c (c_incomplete_type_error, composite_type,
      	common_pointer_type, common_type, same_translation_unit_p,
      	tagged_types_tu_compatible_p, finish_init, pop_init_level,
      	set_designator, set_nonincremental_init_from_string,
      	process_init_element, c_finish_if_stmt): Likewise.
      	* caller-save.c (init_caller_save, save_call_clobbered_regs,
      	insert_restore, insert_save, insert_one_insn): Likewise.
      	* calls.c (emit_call_1, compute_argument_block_size,
      	precompute_arguments, expand_call, emit_library_call_value_1,
      	store_one_arg): Likewise.
      
      From-SVN: r87140
      366de0ce
  19. Aug 15, 2004
    • Ziemowit Laski's avatar
      Makefile.in (C_PRETTY_PRINT_H): Add c-pretty-print.h. · 9a4d6480
      Ziemowit Laski authored
      [gcc/ChangeLog]
      2004-08-15  Ziemowit Laski  <zlaski@apple.com>
      
             * Makefile.in (C_PRETTY_PRINT_H): Add c-pretty-print.h.
             (c-lang.o): Depend on c-objc-common.h.
             (c-objc-common.o): Depend on $(C_PRETTY_PRINT_H) and
             c-objc-common.h; remove duplicate $(C_TREE_H) dependency.
             * c-lang.c: Include c-objc-common.h.
             (LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS,
             LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
             LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS,
             LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P,
             LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE,
             LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION,
             LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL,
             LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME,
             LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL,
             LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED,
             LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL,
             LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT,
             LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
             LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
             LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS,
             LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
             LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING,
             LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS,
             LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
             LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE,
             LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE,
             LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE,
             LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO,
             LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS):
             Move to c-objc-common.h.
             * c-objc-common.c: Include c-objc-common.h.
             * c-objc-common.h: New file.
      
      [gcc/objc/ChangeLog]
      2004-08-15  Ziemowit Laski  <zlaski@apple.com>
      
             * Make-lang.in (objc/objc-lang.o): Depend on $(C_PRETTY_PRINT_H),
             $(DIAGNOSTIC_H), c-objc-common.h and gtype-objc.h, but not on toplev.h.
             (objc/objc-parse.o): Do not depend on gtype-objc.h.
             * objc-act.c: Do not include gtype-objc.h.
             (finish_file): Rename to objc_finish_file().
             * objc-act.h (finish_file): Update copyright notice; remove prototype.
             * objc-lang.c: Update copyright notice; include diagnostic.h,
             c-objc-common.h, c-pretty-print.h and gtype-objc.h; do not include
             toplev.h.
             (finish_file): New hook routine.
             (LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS,
             LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
             LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS,
             LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P,
             LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE,
             LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION,
             LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL,
             LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME,
             LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL,
             LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED,
             LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL,
             LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT,
             LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
             LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
             LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS,
             LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
             LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING,
             LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS,
             LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
             LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE,
             LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE,
             LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE,
             LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO,
             LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS):
             Move to c-objc-common.h.
      
      From-SVN: r86037
      9a4d6480
  20. Jul 25, 2004
    • Bernardo Innocenti's avatar
      bitmap.c: Use type-safe memory allocation macros from libiberty. · 5d038c4c
      Bernardo Innocenti authored
      	* 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
      5d038c4c
  21. Jul 08, 2004
    • Zack Weinberg's avatar
      c-decl.c (static_ctors, [...]): Make static. · 36c1b0de
      Zack Weinberg authored
      	* c-decl.c (static_ctors, static_dtors): Make static.
      	(pop_file_scope): Call c_common_write_pch and
      	cgraph_finalize_compilation_unit here.
      	(build_cdtor): Moved here from c-objc-common.c; simplify.
      	(c_write_global_declarations_1): Clarify comment.
      	(c_write_global_declarations): Close the external scope before
      	doing anything else.  Call build_cdtor, cgraph_optimize, and
      	mudflap_finish_file here.
      	* c-lang.c (finish_file): Don't call c_objc_common_finish_file.
      	Clarify comment.
      	* c-objc-common.c: No need to include cgraph.h.
      	(build_cdtor): Moved to c-decl.c.
      	(c_objc_common_finish_file): Delete.
      	* c-tree.h: Update to match.
      	* objc/objc-act.c (finish_file): Don't call c_objc_common_finish_file.
      	(generate_static_references): Set TREE_USED before calling finish_decl.
      	Eliminate unnecessary dummy declaration.  Call rest_of_decl_compilation
      	on the static_instances_decl.
      
      From-SVN: r84307
      36c1b0de
  22. Jul 01, 2004
    • Joseph Myers's avatar
      re PR c/1027 (slightly misleading printf format warning) · ede1a387
      Joseph Myers authored
      	PR c/1027
      	* c-lang.c (c_initialize_diagnostics): Move from here ...
      	* c-objc-common.c: ... to here.  Include "c-pretty-print.h".
      	(c_tree_printer): Use pretty-printer to format %T.
      	* c-pretty-print.c (pp_c_specifier_qualifier_list): Include space
      	before '*' if not C++.
      	(pp_c_direct_abstract_declarator): Don't try to print array upper
      	bound for flexible array members.
      	* c-tree.h: Include "diagnostic.h".
      	(c_initialize_diagnostics): Declare.
      	* objc/objc-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Define.
      	* c-format.c (format_type_warning): New function.  Improve
      	diagnostics for incorrect format argument types.
      	(check_format_types): Use it.  Add two parameters.  Use the
      	TYPE_MAIN_VARIANT of wanted_type.
      	(check_format_info_main): Pass new parameters to
      	check_format_types.
      	(struct format_wanted_type): Update comment.
      
      testsuite:
      	* gcc.dg/Wswitch-enum.c, gcc.dg/Wswitch.c,
      	gcc.dg/format/branch-1.c, gcc.dg/format/diag-1.c,
      	gcc.dg/format/multattr-3.c, gcc.dg/format/xopen-1.c: Update
      	expected warning text.
      	* gcc.dg/format/diag-2.c: New test.
      
      From-SVN: r83965
      ede1a387
    • Richard Henderson's avatar
      cgraph.h (cgraph_build_static_cdtor): Declare. · c9b9aa64
      Richard Henderson authored
              * cgraph.h (cgraph_build_static_cdtor): Declare.
              * cgraphunit.c (cgraph_build_static_cdtor): New.
              * c-objc-common.c (build_cdtor): Use it.
              * coverage.c (create_coverage): Likewise.
              * libfuncs.h (LTI_gcov_init, gcov_init_libfunc): Remove.
              * optabs.c (init_optabs): Don't set gcov_init_libfunc.
      java/
              * class.c (registerClass_libfunc): Remove.
              (init_class_processing): Don't set it.
              (emit_register_classes): Take list_p parameter.  Fill it in
              with _Jv_RegisterClass calls.
              * decl.c (java_init_decl_processing): Don't call
              init_resource_processing.
              * jcf-parse.c (java_emit_static_constructor): New.
              (java_parse_file): Call it.
              * resource.c (registerResource_libfunc): Remove.
              (init_resource_processing): Remove.
              (write_resource_constructor): Take list_p parameter.  Fill it in
              with _Jv_RegisterResource calls.
              * java-tree.h: Update prototypes.
      
      From-SVN: r83958
      c9b9aa64
  23. Jun 20, 2004
    • Zack Weinberg's avatar
      c-common.h (has_c_linkage): New interface. · 84b8b0e0
      Zack Weinberg authored
      	* c-common.h (has_c_linkage): New interface.
      	* c-cppbuiltin.c: Include target.h.
      	(c_cpp_builtins): Define __PRAGMA_REDEFINE_EXTNAME and
      	__PRAGMA_EXTERN_PREFIX when appropriate.
      	* c-pragma.c: Include target.h.
      	Document clarified semantics of symbol-renaming #pragmas.
      	(handle_pragma_redefine_extname, handle_pragma_extern_prefix)
      	(maybe_apply_renaming_pragma): Rewrite according to clarified
      	semantics.  Always recognize, but do not necessarily execute.
      	(init_pragma): Unconditionally register symbol-renaming pragmas.
      	* system.h: Poison HANDLE_PRAGMA_REDEFINE_EXTNAME
      	and HANDLE_PRAGMA_EXTERN_PREFIX.
      	* target.h (struct gcc_target): Add handle_pragma_redefine_extname
      	and handle_pragma_extern_prefix flags.
      	* target-def.h: Add defaults for TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME
      	and TARGET_HANDLE_PRAGMA_EXTERN_PREFIX.
      	* Makefile.in (c-pragma.o, c-cppbuiltin.o): Update dependencies.
      	* config/sol2.h: Define TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME,
      	not HANDLE_PRAGMA_REDEFINE_EXTNAME.
      	(TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_REDEFINE_EXTNAME.
      	(TRANSFER_FROM_TRAMPOLINE): Prototype mprotect.
      	* config/alpha/osf.h: Define TARGET_HANDLE_PRAGMA_EXTERN_PREFIX,
      	not HANDLE_PRAGMA_EXTERN_PREFIX.
      	(TARGET_OS_CPP_BUILTINS): No need to define __PRAGMA_EXTERN_PREFIX.
      	* doc/extend.texi (Solaris Pragmas, Tru64 Pragmas): Combine
      	into one section "Symbol-Renaming Pragmas"; clarify; document
      	adjusted semantics.
      
      	* builtins.c (expand_builtin): Do not issue error for a builtin
      	with no special case code and no DECL_ASSEMBLER_NAME; just do the
      	library call.
      	* c-decl.c (builtin_function): Don't call make_decl_rtl.
      	* c-objc-common.c (has_c_linkage): Stub implementation.
      	* cgraphunit.c (cgraph_expand_function)
      	(cgraph_remove_unreachable_nodes): Don't clear DECL_ARGUMENTS.
      
      cp:
      	* cp-lang.c (has_c_linkage): Implement.
      
      	* cp-tree.h (set_mangled_name_for_decl): Don't prototype.
      	* decl.c (duplicate_decls): Use COPY_DECL_RTL.
      	(builtin_function_1): Don't call make_decl_rtl.
      	(build_cp_library_fn): Don't call set_mangled_name_for_decl.
      	(grokvardecl): Don't call mangle_decl.
      	* except.c (nothrow_libfn_p): Look at DECL_NAME, not
      	DECL_ASSEMBLER_NAME.
      	* method.c (set_mangled_name_for_decl): Delete.
      	* name-lookup.c (pushdecl): When a local extern shadows a
      	file-scope declaration of the same object, give both DECLs the
      	same DECL_UID.
      	* typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
      	on DECL_ASSEMBLER_NAME.
      
      testsuite:
      	* g++.dg/expr/enum1.C, g++.dg/opt/const3.C: Declare abort with
      	extern "C".
      	* g++.dg/other/pragma-re-1.C: Add comments.
      
      From-SVN: r83405
      84b8b0e0
  24. Jun 16, 2004
    • Richard Henderson's avatar
      c-common.c (lang_gimplify_stmt): Remove next_p argument. · 325c3691
      Richard Henderson authored
      	* c-common.c (lang_gimplify_stmt): Remove next_p argument.
      	(if_elt, if_stack, if_stack_space, c_expand_start_cond, c_finish_then,
      	c_expand_end_cond, c_expand_start_else, c_finish_else, c_begin_if_stmt,
      	c_begin_while_stmt, c_finish_while_stmt_cond): Move to c-typeck.c.
      	(finish_fname_decls, fname_decl): Use statement_lists.
      	(c_expand_expr_stmt): Don't set last_expr_type.
      	(c_type_hash): Fix indentation.
      	(c_safe_from_p): Don't follow TREE_CHAIN.
      	(c_tree_chain_matters_p): Remove.
      	* c-common.def (SCOPE_STMT): Remove.
      	(CLEANUP_STMT): Redefine to contain its own body.
      	* c-common.h (struct stmt_tree_s): Remove x_last_stmt,
      	x_last_expr_type, x_last_expr_filename, x_scope_stmt_stack.
      	Add x_cur_stmt_list.
      	(last_tree, last_expr_type, last_expr_filename, RECHAIN_STMTS): Remove.
      	(cur_stmt_list): New.
      	(STATEMENT_LIST_STMT_EXPR): New.
      	(SCOPE_BEGIN_P, SCOPE_END_P, SCOPE_STMT_BLOCK, SCOPE_NULLIFIED_P,
      	SCOPE_NO_CLEANUPS_P, SCOPE_PARTIAL_P, NEW_FOR_SCOPE_P): Remove.
      	(CLEANUP_BODY): New.
      	(CLEANUP_DECL): Move to operand 2.
      	(c_common_stmt_codes): Remove SCOPE_STMT.
      	(COMPOUND_STMT_NO_SCOPE, COMPOUND_STMT_BODY_BLOCK): Remove.
      	* c-decl.c (c_scope_stmt_stack, current_scope_stmt_stack): Remove.
      	(c_push_function_context, c_pop_function_context): Don't save it.
      	(finish_decl): Set TREE_USED on the decl for a cleanup.
      	Use push_cleanup.
      	(store_parm_decls): Use statement lists.
      	(finish_function): Remove compstmt rule workaround.  Use statement
      	lists.  Call finish_fname_decls after finalizing the body.
      	(c_begin_compound_stmt): Move to c-typeck.c.
      	* c-dump.c (c_dump_tree): Remove SCOPE_STMT.
      	* c-gimplify.c (gimplify_cleanup_stmt, gimplify_cleanup_stmts): New.
      	(c_genericize): Invoke them.
      	(c_gimplify_stmt): Don't look through TREE_CHAIN.  Kill SCOPE_STMT.
      	(c_build_bind_expr): Export.
      	(gimplify_block, gimplify_cleanup): Remove.
      	(gimplify_condition): Use gimplify_stmt.
      	(gimplify_for_stmt): Remove FOR_INIT_STMT chaining hack.
      	(gimplify_if_stmt): Remove recursion hack.
      	(c_gimplify_expr): Remove STMT_EXPR handling.
      	(stmt_expr_last_stmt, gimplify_stmt_expr): Remove.
      	(is_last_stmt_of_scope): Remove.
      	* c-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
      	* c-mudflap.c (mflang_flush_calls): Use c_begin_compound_stmt,
      	c_end_compound_stmt.
      	* c-objc-common.c (build_cdtor): Likewise.
      	* c-parse.in (primary): Use c_finish_stmt_expr.
      	(push_scope, pop_scope): Remove.
      	(c99_block_start, compstmt_start): Use c_begin_compound_stmt.
      	(c99_block_end, compstmt): Use c_end_compound_stmt.
      	(c99_block_lineno_labeled_stmt): Likewise.
      	(compstmt_primary_start): Use c_begin_stmt_expr.
      	(simple_if, select_or_iter_stmt): Update calls to stmt builders.
      	(do_stmt_start): Fill in body directly.
      	(lineno_stmt): Avoid setting lineno on constants.
      	* c-pretty-print.c (pp_c_statement): Handle STATEMENT_LIST.
      	Remove SCOPE_STMT.
      	* c-semantics.c (begin_stmt_tree): Remove.
      	(push_stmt_list, re_push_stmt_list, pop_stmt_list): New.
      	(add_stmt): Use statement lists.
      	(add_scope_stmt, finish_stmt_tree): Remove.
      	(push_cleanup): New.
      	* c-tree.h: Move some decls from c-common.h.
      	* c-typeck.c (c_tree_expr_nonnegative_p): Simplify for statement lists.
      	(do_case, c_finish_case): Likewise.
      	(c_finish_then): Take body for then as argument.
      	(c_finish_else): Similarly.
      	(c_begin_for_stmt, c_finish_for_stmt_init, c_finish_for_stmt_cond,
      	c_finish_for_stmt_incr, c_finish_for_stmt): New.
      	(c_begin_stmt_expr, c_finish_stmt_expr): New.
      	(c_begin_compound_stmt): Do scope management.
      	(c_end_compound_stmt): New.
      	* fold-const.c (tree_expr_nonnegative_p): Fix BIND_EXPR.
      	* gimplify.c (voidify_wrapper_expr): Accept temporary argument.
      	Look through exception handling constructs.
      	(gimplify_bind_expr): Accept temporary argument.
      	(gimplify_target_expr): Special case BIND_EXPR bodies.
      	(gimplify_expr): Handle fallback == fb_none like a statement.
      	* langhooks-def.h (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Kill.
      	* langhooks.c (lhd_tree_inlining_tree_chain_matters_p): Remove.
      	* langhooks.h (tree_chain_matters_p): Remove.
      	* stub-objc.c (objc_clear_super_receiver): New.
      	* tree-gimple.h (voidify_wrapper_expr): Update decl.
      	(append_to_statement_list, append_to_statement_list_force): Move
      	to tree-iterator.h.
      	* tree-inline.c (expand_call_inline): Update call.
      	(clone_body): Use statement lists.
      	(walk_tree): Don't check tree_chain_matters_p.
      	(copy_tree_r): Likewise.
      	* tree-iterator.c (alloc_stmt_list): Clear lang bits.
      	(tsi_link_before, tsi_link_after): Set TREE_SIDE_EFFECTS properly.
      	* tree-iterator.h (append_to_statement_list,
      	append_to_statement_list_force): Moved from tree-gimple.h.
      	* tree-pretty-print.c (dump_generic_node): Clean up TARGET_EXPR dump.
      	* objc/objc-act.c (build_module_descriptor): Use c_begin_compound_stmt.
      	(objc_enter_block): Likewise.
      	(objc_exit_block): Use c_end_compound_stmt.
      	(objc_build_try_enter_fragment): Add #error and comment for
      	rewriting for OBJCPLUS.
      	(objc_build_extract_fragment, objc_build_try_epilogue,
      	objc_build_catch_stmt, objc_build_finally_prologue,
      	objc_build_finally_epilogue): Update for C statement builders.
      	* objc/objc-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P):
      	Remove.
      cp/
      	* call.c (initialize_reference): Don't build CLEANUP_STMT here.
      	* cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
      	(genericize_try_block): Use gimplify_stmt.
      	(genericize_catch_block, genericize_eh_spec_block): Likewise.
      	(cp_gimplify_init_expr): Remove STMT_EXPR special case.
      	(gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
      	* cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
      	(cp_tree_chain_matters_p): Remove.
      	* cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
      	(COMPOUND_STMT_BODY_BLOCK): New.
      	(STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
      	(EXPR_STMT_STMT_EXPR_RESULT): New.
      	(building_stmt_tree): Check cur_stmt_list.
      	(tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
      	(BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
      	* decl.c (poplevel): Use pop_stmt_list for minding cleanups.
      	(cp_finish_decl): Use push_cleanup.
      	(start_function, finish_function): Use statement lists.
      	(finish_stmt): Do nothing.
      	* except.c (begin_eh_spec_block): Use statement lists.
      	(check_handlers_1, check_handlers): Likewise.
      	* init.c (construct_virtual_base): Don't add extra compound stmts.
      	(build_vec_init): Likewise.
      	* name-lookup.c (maybe_push_cleanup_level): Use statement lists.
      	* name-lookup.h (struct cp_binding_level): Add statement_list.
      	* parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
      	(cp_parser_labeled_statement, cp_parser_expression_statement,
      	cp_parser_statement_seq_opt): Likewise.
      	(cp_parser_compound_statement): Likewise.  Take bool for try block.
      	(cp_parser_selection_statement): Tidy if processing.
      	(cp_parser_already_scoped_statement): Rewrite to do what it says.
      	* pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
      	(tsubst_expr): Rewrite STMT_EXPR processing.  Handle STATEMENT_LIST.
      	Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
      	* semantics.c (do_poplevel, do_pushlevel): Use statement lists.
      	(finish_cond): New, rewritten from FINISH_COND.
      	(simplify_loop_decl_cond): New.
      	(finish_expr_stmt): Avoid nested EXPR_STMTs.
      	(begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
      	begin_else_clause, finish_else_clause, finish_if_stmt,
      	begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
      	begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
      	finish_for_cond, finish_for_stmt, begin_switch_stmt,
      	finish_switch_cond, finish_switch_stmt, begin_try_block,
      	finish_try_block, finish_cleanup_try_block, finish_function_try_block,
      	finish_handler_sequence, finish_function_handler_sequence,
      	begin_handler, finish_handler_parms, finish_handler,
      	begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
      	using statement lists.
      	(begin_compound_stmt): Replace has_no_scope argument with flags.
      	Update all callers.  Use statement lists.
      	(finish_compound_stmt): Likewise.
      	(finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
      	(current_scope_stmt_stack): Remove.
      	(simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
      	* typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
      	Rewrite with statement lists.
      testsuite/
      	* g++.dg/ext/stmtexpr1.C: XFAIL.
      	* gcc.dg/20030612-1.c: XFAIL.
      
      From-SVN: r83221
      325c3691
  25. Jun 09, 2004
    • Jason Merrill's avatar
      Gimplify VA_ARG_EXPR into simpler forms. · cd3ce9b4
      Jason Merrill authored
              * target.h: Add gimplify_va_arg_expr hook.
              * target-def.h: Add TARGET_GIMPLIFY_VA_ARG_EXPR.
              * fold-const.c (build_fold_addr_expr)
              (build_fold_addr_expr_with_type): Move from gimplify.c.
              * tree.h: Declare them.
              * gimplify.c (gimplify_and_add): New fn.
              (build_addr_expr, build_addr_expr_with_type): Move to fold-const.c.
              (gimplify_array_ref_to_plus, gimplify_modify_expr)
              (gimplify_expr): Use build_fold_*.
              (copy_if_shared_r): Only mark VA_ARG_EXPR volatile if we
              don't know how to gimplify it.
              * builtins.c (std_gimplify_va_arg_expr): New fn.
              (dummy_object): New static fn.
              (gimplify_va_arg_expr): New fn.
              (stabilize_va_list): Use build_fold_*.
              * tree-gimple.h: Declare new fns.
              * config/i386/i386.c (TARGET_GIMPLIFY_VA_ARG_EXPR): Define.
              (ix86_gimplify_va_arg): New fn.
              * config/i386/ia64.c (TARGET_GIMPLIFY_VA_ARG_EXPR): Define.
              (ia64_gimplify_va_arg): New fn.
              * config/i386/rs6000.c (rs6000_gimplify_va_arg): New fn.
              (TARGET_GIMPLIFY_VA_ARG_EXPR): Define.
              * config/i386/sparc.c (sparc_gimplify_va_arg): New fn.
              * alias.c (get_varargs_alias_set): Just return 0 for now.
      
              * c-objc-common.c (c_tree_printer): Improve handling of %T.
      
      From-SVN: r82838
      cd3ce9b4
  26. Jun 02, 2004
    • Jerry Quinn's avatar
      Makefile.in (EXPR_H): Add insn-config.h... · 78528714
      Jerry Quinn authored
      2004-06-01  Jerry Quinn  <jlquinn@optonline.net>
      
      	* Makefile.in (EXPR_H): Add insn-config.h, function.h,
      	$(RTL_H), flags.h, $(TREE_H), $(MACHMODE_H), $(EXPR_H).
      	(ALIAS_H, EMIT_RTL_H): New.
      	(cselib.o): Replace EXPR_H with EMIT_RTL_H.
      	(cfgcleanup.o): Add EMIT_RTL_H.
      	(alias.o): Replace EXPR_H with EMIT_RTL_H and ALIAS_H.
      	* alias.c: Replace expr.h with emit-rtl.h and alias.h.
      	* attribs.c, c-lex.c, c-obj-common.c, c-semantics.c: Remove expr.h.
      	* cfgcleanup.c, cselib.c: Replace expr.h with emit-rtl.h.
      	* expr.h: Add include guard.  Include function.h, rtl.h, flags.h,
      	tree.h, machmode.h, insn-config.h, alias.h, emit-rtl.h.
      	(get_varargs_alias_set, get_frame_alias_set, record_base_value,
      	record_alias_subset, new_alias_set, can_address_p): Move to alias.h.
      	(set_mem_alias_set, set_mem_align, set_mem_expr, set_mem_offset,
      	set_mem_size): Move to emit-rtl.h.
      	* emit-rtl.h: New.
      	* alias.h: New.
      
      From-SVN: r82568
      78528714
  27. May 13, 2004
  28. Mar 23, 2004
    • Zack Weinberg's avatar
      PR 12267, 12391, 12560, 13129, 14114, 14113 · f75fbaf7
      Zack Weinberg authored
      	* 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
      f75fbaf7
  29. Mar 20, 2004
    • Kazu Hirata's avatar
      alias.c, [...]: Replace calls via (*targetm.foo) () with targetm.foo (). · 5fd9b178
      Kazu Hirata authored
      	* alias.c, attribs.c, bt-load.c, builtins.c, c-common.c,
      	c-decl.c, c-objc-common.c, c-typeck.c, calls.c, cfglayout.c,
      	cse.c, dbxout.c, dwarf2out.c, except.c, final.c,
      	haifa-sched.c, integrate.c, passes.c, rtlanal.c, sched-rgn.c,
      	sched-vis.c, simplify-rtx.c, stor-layout.c, tree.c, varasm.c,
      	vmsdbgout.c: Replace calls via (*targetm.foo) () with
      	targetm.foo ().
      
      From-SVN: r79729
      5fd9b178
  30. Mar 14, 2004
    • Roger Sayle's avatar
      alias.c (get_alias_set): Replace calls via (*lang_hooks.foo) () with lang_hooks.foo (). · ae2bcd98
      Roger Sayle authored
      	* alias.c (get_alias_set): Replace calls via (*lang_hooks.foo) ()
      	with lang_hooks.foo ().
      	* builtins.c (expand_builtin_va_arg): Likewise.
      	* c-common.c (fname_as_string, c_common_truthvalue_conversion,
      	c_common_type_for_mode, c_common_nodes_and_builtins,
      	handle_mode_attribute, handle_vector_size_attribute): Likewise.
      	* c-convert.c (convert): Likewise.
      	* c-format.c (check_format_types): Likewise.
      	* c-objc-common.c (c_tree_printer): Likewise.
      	* c-typeck.c (build_unary_op, build_conditional_expr,
      	build_binary_op): Likewise.
      	* calls.c (try_to_integrate, expand_call,
      	emit_library_call_value_1): Likewise.
      	* cgraph.c (cgraph_node_name, cgraph_function_possibly_inlined_p):
      	Likewise.
      	* cgraphunit.c (record_call_1, cgraph_analyze_function,
      	cgraph_expand_function): Likewise.
      	* convert.c (convert_to_pointer, convert_to_integer): Likewise.
      	* coverage.c (build_fn_info_type, build_ctr_info_type,
      	build_gcov_info, create_coverage): Likewise.
      	* dbxout.c (dbxout_init): Likewise.
      	* diagnostic.c (diagnostic_report_current_function): Likewise.
      	* dojump.c (do_jump): Likewise.
      	* dwarf2out.c (dwarf2_name): Likewise.
      	* except.c (init_eh): Likewise.
      	* explow.c (expr_size, int_expr_size): Likewise.
      	* expmed.c (make_tree, const_mult_add_overflow_p, expand_mult_add):
      	Likewise.
      	* expr.c (store_expr, store_constructor, safe_from_p,
      	expand_expr_real, do_store_flag, try_casesi): Likewise.
      	* function.c (push_function_context_to, pop_function_context_from,
      	free_after_parsing, assign_stack_local_1, assign_stack_temp_for_type,
      	put_var_into_stack, allocate_struct_function, current_function_name):
      	Likewise.
      	* integrate.c (copy_decl_for_inlining, expand_inline_function):
      	Likewise.
      	* langhooks.c (lhd_clear_binding_stack, write_global_declarations,
      	lhd_print_error_function): Likewise.
      	* opts.c (handle_option, decode_options): Likewise.
      	* passes.c (open_dump_file): Likewise.
      	* print-tree.c (print_node): Likewise.
      	* stmt.c (expand_fixup, fixup_gotos, expand_asm_operands,
      	expand_decl_cleanup, emit_case_nodes): Likewise.
      	* stor-layout.c (variable_size): Likewise.
      	* toplev.c (announce_function, wrapup_global_declarations,
      	check_global_declarations, compile_file, default_tree_printer,
      	process_options, lang_dependent_init, finalize): Likewise.
      	* tree-dump.c (dequeue_and_dump): Likewise.
      	* tree-inline.c (remap_decl, remap_block, copy_body_r,
      	initialize_inlined_parameters, declare_return_variable,
      	inlinable_function_p, expand_call_inline, optimize_inline_calls,
      	walk_tree, copy_tree_r): Likewise.
      	* tree-optimize.c (tree_rest_of_compilation): Likewise.
      	* tree.c (decl_assembler_name, tree_size, size_in_bytes, staticp,
      	unsafe_for_reeval, get_unwidened, get_narrower, get_callee_fndecl,
      	variably_modified_type_p, dump_tree_statistics): Likewise.
      	* varasm.c (assemble_variable, compare_constant, copy_constant,
      	force_const_mem, compute_reloc_for_constant, output_constant,
      	output_addressed_constants, initializer_constant_valid_p): Likewise.
      
      From-SVN: r79481
      ae2bcd98
  31. Feb 12, 2004
    • Zack Weinberg's avatar
      debug.h (struct gcc_debug_hooks): Add type_decl field. · 21d13d83
      Zack Weinberg authored
      	* debug.h (struct gcc_debug_hooks): Add type_decl field.
      	(debug_nothing_tree_int): Prototype.
      	(dwarf_debug_hooks): Delete, unused.
      	* debug.c (do_nothing_debug_hooks): Update.
      	(debug_nothing_tree_int): New function.
      	* langhooks.h (struct lang_hooks_for_decls):
      	Remove builtin_type_decls field.
      	* langhooks-def.h (LANG_HOOKS_BUILTIN_TYPE_DECLS): Delete.
      	(LANG_HOOKS_DECLS): Update.
      	* toplev.c (rest_of_decl_compilation, rest_of_type_compilation):
      	Use debug_hooks->type_decl.
      	* dbxout.c (preinit_symbols): New static.
      	(dbx_debug_hooks, xcoff_debug_hooks): Update.
      	(dbxout_init): Don't call DBX_OUTPUT_STANDARD_TYPES or
      	lang_hooks.decls.builtin_type_decls.  Do scan preinit_symbols
      	for symbols to output.
      	(dbxout_type_decl): New function.
      	(dbxout_symbol): If called before dbxout_init has run, queue
      	the symbol for later.  Apply DBX_ASSIGN_FUNDAMENTAL_TYPE_NUMBER
      	to TYPE_DECLs before emitting them.
      	* xcoffout.c (assign_type_number): Delete.
      	(xcoff_type_numbers): New static table.
      	(xcoff_assign_fundamental_type_number): New function.
      	* xcoffout.h: Define DBX_ASSIGN_FUNDAMENTAL_TYPE_NUMBER, not
      	DBX_OUTPUT_STANDARD_TYPES.  Remove unnecessary #ifdefs.
      	* sdbout.c: Include varray.h.
      	(deferred_global_decls): New static.
      	(sdb_debug_hooks): Update.
      	(sdbout_global_decl): If we can't emit something right now,
      	remember it in deferred_global_decls.
      	(sdbout_finish): Just scan deferred_global_decls; don't call getdecls.
      	(sdbout_init): Initialize deferred_global_decls.
      	* Makefile.in: Update dependencies of sdbout.o.
      	* dwarf2out.c (dwarf2out_type_decl): New function.
      	(dwarf2_debug_hooks): Update.
      	* vmsdbgout.c (vmsdbg_debug_hooks): Update.
      	* c-decl.c (getdecls): Just return 0.
      	(check_for_loop_decls): Don't use getdecls.
      	(record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
      	* c-objc-common.c (c_objc_common_finish_file): Don't use getdecls.
      cp:
      	* cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
      	* cp-tree.h: Don't declare cxx_builtin_type_decls.
      	* decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
      	(record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
      
      From-SVN: r77730
      21d13d83
  32. Feb 08, 2004
    • Kazu Hirata's avatar
      c-objc-common.c (): Fix a typo in a warning. · 56ae04af
      Kazu Hirata authored
      	* c-objc-common.c (): Fix a typo in a warning.
      	* cse.c (preferrable): Change to preferable. Update all of its
      	callers.
      	* genautomata.c (ainsn): Change
      	first_ainsn_with_given_equialence_num to
      	first_ainsn_with_given_equivalence_num.  Update all of its
      	references.
      
      From-SVN: r77497
      56ae04af
  33. Feb 03, 2004
    • Paolo Bonzini's avatar
      re PR c/11658 (Wrong error message) · e57e265b
      Paolo Bonzini authored
      2004-02-03  Paolo Bonzini  <bonzini@gnu.org>
      
      	PR c/11658
      	PR c/13994
      	* Makefile.in (c-parse.o, c-convert.o, c-typeck.o): Depend
      	on langhooks.h.
      	* objc/Make-lang.in (objc-parse.o): Depend on langhooks.h.
      	* c-parse.in, c-convert.c, c-typeck.c, objc/objc-act.c:
      	Include langhooks.h.  Replace c_common_truthvalue_conversion
      	with the truthvalue_conversion language hook throughout.
      	(expr_no_commas): Call default_conversion before save_expr
      	for the first term of the production 'x ? : y'.
      	* c-common.c (c_common_truthvalue_conversion): Remove
      	obsolete block.  Invoke recursively the hook instead
      	of this function.
      	* c-convert.c (convert): handle ERROR_MARK_NODE.
      	* c-typeck.c (build_binary_op): handle ERROR_MARK_NODE
      	returned by the truthvalue_conversion language hook.
      	* c-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Use
      	c_objc_common_truthvalue_conversion.
      	* c-objc-common.c (c_objc_common_truthvalue_conversion):
      	New function.
      	* c-tree.h (c_objc_common_truthvalue_conversion): Declare it.
      	* objc/objc-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Use
      	c_objc_common_truthvalue_conversion.
      
      From-SVN: r77168
      e57e265b
  34. Jan 01, 2004
    • Jan Hubicka's avatar
      re PR rtl-optimization/13473 (cc1 segfault w/-march=pentium4) · b684a3df
      Jan Hubicka authored
      	PR opt/13473
      	* recog.c (validate_replace_rtx_1):  Take care for RTL sharing inside
      	ASM input operands
      
      	PR opt/12617
      	* toplev.c (dump_file_index): Reorder ce3 and bbro.
      	(dump_file): Likewise.
      	(rest_of_compilation): Likewise.
      
      	PR debug/13367
      	* cgraph.c (cgraph_function_possibly_inlined):  Even with
      	flag_really_no_inline we inline always_inline functions.
      	* cgraphunit.c (cgraph_analyze_function): Clear inlinable flag
      	for non-always_inline functions when there is flag_really_no_inline.
      	(cgraph_decide_inlining): Limit work done when not inlining.
      	(cgraph_decide_inlining_incrementally): Likewise.
      	(cgraph_optimize_function): Check whether something got inlined.
      	* c-objc-common.c (c_disregard_inline_limits): Do not always inline
      	extern inline functions when not inlining.
      
      	* opts.c (decode_options):  Disable crossjumping at -O1
      	* invoke.texi (-O1): Document change.
      
      	* gcc.dg/debug/20031231-1.c: New.
      	* gcc.c-torture/compile/20040101-1.c: New.
      	* gcc.dg/dwarf-die-[1-7].c: New.
      
      From-SVN: r75303
      b684a3df
  35. Oct 31, 2003
  36. Sep 21, 2003
    • Richard Henderson's avatar
      c-format.c (gcc_diag_char_table): Add %J. · ddd2d57e
      Richard Henderson authored
              * c-format.c (gcc_diag_char_table): Add %J.
              (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Likewise.
              (check_format_types): Fix wanted_type name lookup.
              (init_dynamic_diag_info): Setup %J.
              * diagnostic.c (text_specifies_location): Implement %J.
              * c-common.c, c-decl.c, c-objc-common.c, c-pragma.c, calls.c,
              dwarfout.c, expr.c, function.c, stmt.c, stor-layout.c, toplev.c,
              tree-inline.c, tree-optimize.c, varasm.c, config/arm/pe.c,
              config/i386/winnt.c, config/ia64/ia64.c, config/mcore/mcore.c,
              config/v850/v850.c, objc/objc-act.c: Use %J in diagnostics.
      
              * tree-inline.c: Include intl.h
              (inline_forbidden_p_1): Fix i18n of inline_forbidden_reason.
              * Makefile.in (tree-inline.o): Update.
      cp/
              * decl.c, decl2.c, pt.c: Use %J in diagnostics.
      java/
              * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
      testsuite/
              * gcc.dg/format/gcc_diag-1.c: Add tests for %J.
      
      From-SVN: r71619
      ddd2d57e
  37. Sep 10, 2003
    • Jan Hubicka's avatar
      c-objc-common.c (c_cannot_inline_tree_fn): Warn on why function is not... · f08545a8
      Jan Hubicka authored
      c-objc-common.c (c_cannot_inline_tree_fn): Warn on why function is not inlinable; do not check the body.
      
      
      	* c-objc-common.c (c_cannot_inline_tree_fn): Warn
      	on why function is not inlinable; do not check
      	the body.
      	(inline_forbidden_p): Move to...
      	* tree-inline.c (inline_forbidden_p_1): ... here; Add warnings;
      	deal with alloca, longjmp.
      	(inline_forbidden_p): New static function.
      	(find_alloca_call_1, find_alloca_call, find_builtin_longjmp_call_1,
      	find_builtin_longjmp_call): Kill.
      
      From-SVN: r71283
      f08545a8
Loading