1. 03 Jan, 2005 1 commit
  2. 01 Jan, 2005 2 commits
    • re PR middle-end/17544 (incorrect -Wunreachable-code warning for mains with a return statement) · 43e05e45
      	* emit-rtl.c (add_insn_before): Fix comment typo.
      
      	PR middle-end/17544
      	* c-decl.c (finish_function): If compiling C99, annotate the
      	compiler generated return with the current file name and line 0.
      	* tree-cfg.c (remove_useless_stmts_warn_notreached): Only warn if
      	the source line is greater than 0.
      	(remove_bb): Likewise.
      
      cp/
      	PR middle-end/17544
      	* decl.c (finish_function): Fix comment.  Annotate the compiler
      	generated return with the current file name and line 0.
      
      testsuite/
      	* gcc.dg/20041231-1.C: New test.
      	* g++.dg/warn/Wunreachable-code-1.C: New test.
      
      From-SVN: r92784
      Steven Bosscher committed
    • re PR middle-end/17799 (Non-optimizing compile loses 'this') · 78e0d62b
              PR middle-end/17799
              * function.c (use_register_for_decl): Check DECL_IGNORED_P instead
              of DECL_ARTIFICIAL.
              (assign_parms_augmented_arg_list): Set DECL_IGNORED_P.
              * c-decl.c (build_compound_literal): Likewise.
              * dwarf2asm.c (dw2_force_const_mem): Likewise.
              * gimplify.c (create_artificial_label): Likewise.
              * tree-inline.c (expand_call_inline): Likewise.
              * var-tracking.c (vt_initialize): Likewise.
              * tree-outof-ssa.c (create_temp): Copy DECL_IGNORED_P.
      cp/
              * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
              * class.c (build_vtable): Don't conditionallize setting it
              based on DWARF2_DEBUG.
              (layout_class_type): Set DECL_IGNORED_P.
              * decl2.c (get_guard): Likewise.
              * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
              * tree.c (build_local_temp): Likewise.
      
      From-SVN: r92781
      Richard Henderson committed
  3. 30 Dec, 2004 2 commits
    • cp-tree.h (cp_declarator): Split "name" field into qualifying_scope and unqualified_name. · 1d786913
      	* cp-tree.h (cp_declarator): Split "name" field into
      	qualifying_scope and unqualified_name.
      	* decl.c (get_scope_of_declarator): Adjust accordingly.
      	(grokdeclarator): Likewise.
      	* decl2.c (grokfield): Likewise, and adjust call to
      	do_class_using_decl.
      	* name-lookup.c (do_class_using_decl): Split "decl" into
      	"scope" and "name".  Remove unnecessary code.
      	* name-lookup.h (do_class_using_decl): Adjust declaration.
      	* parser.c (make_id_declarator): Split "id" into qualifying_scope
      	and unqualified_name.
      	(cp_parser_using_declaration): Adjust call to do_class_using_decl.
      	(cp_parser_direct_declarator): Adjust to handle the fact that
      	cp_parser_declarator_id no longer returns a SCOPE_REF.
      	(cp_parser_direct_declarator): Likewise.
      	(cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
      	names.
      	(cp_parser_member_declaration): Adjust call to make_id_declarator.
      	(cp_parser_check_declarator_template_parameters): Do not expect a
      	SCOPE_REF.
      
      	* decl.c (duplicate_decls): Call ggc_free on declarations we will
      	not be needing any longer.
      
      From-SVN: r92746
      Mark Mitchell committed
    • re PR c++/19190 (warning "value computed is not used" emitted too often) · d9fa1233
      	PR c++/19190
      	* cvt.c (convert_to_void): Do not use STRIP_NOPs.
      
      	PR c++/19190
      	* g++.dg/warn/Wunused-10.C: New test.
      
      From-SVN: r92721
      Mark Mitchell committed
  4. 29 Dec, 2004 1 commit
  5. 28 Dec, 2004 1 commit
    • Add memory barriers to the double-checked locking used for static initialization. · 445cf5eb
      libstdc++:
              Add memory barriers to the double-checked locking used for static
              initialization.
              * libsupc++/guard.cc (__test_and_acquire): Define default.
              (_GLIBCXX_GUARD_TEST_AND_ACQUIRE, __set_and_release)
              (_GLIBCXX_GUARD_SET_AND_RELEASE): Likewise.
              (recursion_push, recursion_pop): New abstraction functions.
              (__cxa_guard_acquire): Use _GLIBCXX_GUARD_TEST_AND_ACQUIRE.
              (__cxa_guard_release): Use _GLIBCXX_GUARD_SET_AND_RELEASE.
              * config/cpu/generic/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST): Rename
              from _GLIBCXX_GUARD_ACQUIRE and reverse sense.
              (_GLIBCXX_GUARD_SET): Rename from _GLIBCXX_GUARD_RELEASE.
              * config/cpu/arm/cxxabi_tweaks.h: Likewise.
              * config/cpu/alpha/atomic_word.h (_GLIBCXX_READ_MEM_BARRIER)
              (_GLIBCXX_WRITE_MEM_BARRIER): Define.
              * config/cpu/powerpc/atomic_word.h: Likewise.
              * config/cpu/sparc/atomic_word.h: Likewise.
              * config/cpu/generic/atomic_word.h: Define them, commented out.
              * include/bits/atomicity.h: Define defaults.
              * config/cpu/ia64/atomic_word.h (__test_and_acquire)
              (__set_and_release): New inlines.
              (_GLIBCXX_GUARD_TEST_AND_ACQUIRE): Define.
              (_GLIBCXX_GUARD_SET_AND_RELEASE): Define.
      
              * libsupc++/guard.cc (acquire_1): Use __builtin_trap instead of
              abort();
      
      gcc:
              * doc/tm.texi (TARGET_RELAXED_ORDERING): Document.
              * target.h (struct gcc_target): Add relaxed_ordering field.
              * target-def.h (TARGET_RELAXED_ORDERING): Define default.
              (TARGET_INITIALIZER): Add it.
              * config/alpha/alpha.c (TARGET_RELAXED_ORDERING): Define.
              * config/ia64/ia64.c (TARGET_RELAXED_ORDERING): Define.
              * config/rs6000/rs6000.c (TARGET_RELAXED_ORDERING): Define.
              * config/sparc/sparc.c (TARGET_RELAXED_ORDERING): Define.
              * cp/decl.c (expand_static_init): Don't use shortcut if
              targetm.relaxed_ordering.
      
      From-SVN: r92659
      Jason Merrill committed
  6. 27 Dec, 2004 1 commit
  7. 23 Dec, 2004 6 commits
  8. 22 Dec, 2004 5 commits
  9. 21 Dec, 2004 4 commits
    • re PR c++/18984 (ICE in check_pointer_types_r) · af76441f
      2004-12-21  Andrew Pinski  <pinskia@physics.uc.edu>
      
              PR c++/18984
              * pointer-set.c (pointer_set_contains): Add back.
              * pointer-set.h (pointer_set_contains): Add back.
      
      2004-12-21  Andrew Pinski  <pinskia@physics.uc.edu>
      
              PR c++/18984
              * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
              check to see if contains the pointer.  Insert the statement before
              returning.
      
      2004-12-21  Andrew Pinski  <pinskia@physics.uc.edu>
      
              PR C++/18984
              * g++.dg/eh/ctor3.C: New test.
      
      From-SVN: r92470
      Andrew Pinski committed
    • re PR c++/14075 (("foo") accepted as char[] initializer) · 7a8380ae
      cp:
      	PR c++/14075
      	* decl.c (check_initializer): Check string initializer of array is
      	not parenthesized.
      	* cp-tree.h (PAREN_STRING_LITERAL_P): New.
      	* semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
      	* error.c (dump_expr): <STRING_CST case> Add parens, if needed.
      testsuite:
      	PR c++/14075
      	* g++.dg/init/string1.C: New.
      
      From-SVN: r92464
      Nathan Sidwell committed
    • system.c (IN_RANGE): Use plain unsigned, not unsigned HOST_WIDE_INT. · 38b3627d
      	* system.c (IN_RANGE): Use plain unsigned, not unsigned
      	HOST_WIDE_INT.
      	* tree.def (VOID_TYPE, INTEGER_TYPE, REAL_TYPE, COMPLEX_TYPE,
      	VECTOR_TYPE, OFFSET_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, CHAR_TYPE,
      	POINTER_TYPE, REFERENCE_TYPE, METHOD_TYPE, FUNCTION_TYPE,
      	FILE_TYPE, ARRAY_TYPE, RECORD_TYPE, UNION_TYPE,
      	QUAL_UNION_TYPE): Reorder for better code efficiency.
      	(CONST_DECL, TYPE_DECL, VAR_DECL, FIELD_DECL, PARM_DECL): Likewise.
      	(INDIRECT_REF, ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF): Likewise.
      	* tree.h (INDIRECT_REF_P): Reorder checks for better optimization.
      	(IS_EXPR_CODE_CLASS): Use IN_RANGE.
      	(INTEGRAL_TYPE_P, FLOAT_TYPE_P): Reorder checks for better
      	optimization.
      
      	* cp/cp-tree.def (TEMPLATE_TYPE_PARM,
      	BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
      	for better code efficiency.
      	* cp/cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
      	(CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
      	(INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
      	INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
      	CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
      	TYPE_PTROBV_P): Likewise.
      
      From-SVN: r92463
      Nathan Sidwell committed
    • re PR c++/18975 (Copying objects with mutable non-static data members) · fd749a60
      cp:
      	PR c++/18975
      	* method.c (do_build_copy_constructor): Refactor. Don't const
      	qualify a mutable field.
      	(do_build_assign_ref): Likewise.
      testsuite:
      	PR c++/18975
      	* g++.dg/other/synth1.C: New.
      
      From-SVN: r92461
      Nathan Sidwell committed
  10. 20 Dec, 2004 2 commits
  11. 17 Dec, 2004 3 commits
  12. 16 Dec, 2004 1 commit
    • re PR c++/18905 (Strange error: subscripted value is neither array nor pointer) · 8a784e4a
      cp:
      	PR c++/18905
      	* cp-tree.h (integral_constant_value): Declare.
      	* call.c (null_ptr_cst_p): Use integral_constant_value, not
      	decl_constant_value.
      	(convert_like_real): Likewise.
      	* class.c (check_bitfield_decl): Likewise.
      	* cvt.c (ocp_convert): Likewise.
      	(convert): Remove unnecessary decl_constant_value call.
      	* decl.c (compute_array_index_type): Use integral_constant_value,
      	not decl_constant_value.
      	(build_enumerator): Likewise.
      	* decl2.c (grokfield): Likewise.
      	* init.c (decl_constant_value): Simplify.
      	(integral_constant_value): New.
      	* pt.c (fold_decl_constant_value): Use integral_constant_value,
      	remove subsequent check.
      	(tsubst): Use integral_constant_value, not decl_constant_value.
      	(tsubst_copy, unify): Likewise.
      	* typeck.c (decay_conversion): Likewise.
      	(build_compound_expr): Remove unnecessary decl_constant_value
      	calls.
      	(build_static_cast_1, build_reinterpret_cast_1):
      	(convert_for_assignment): Remove comment about not calling
      	decl_constant_value.
      testsuite:
      	PR c++/18905
      	* g++.dg/template/init4.C: New.
      	* g++.dg/opt/static3.C: Enable optimizer.
      
      From-SVN: r92257
      Nathan Sidwell committed
  13. 15 Dec, 2004 3 commits
  14. 14 Dec, 2004 6 commits
  15. 12 Dec, 2004 1 commit
  16. 10 Dec, 2004 1 commit