aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/ChangeLog
AgeCommit message (Collapse)Author
2003-10-16Mark ChangeLogMark Mitchell
From-SVN: r72567
2003-10-16re PR c++/12369 (ICE with templates and friends)Kriang Lerdsuwanakij
PR c++/12369 * g++.dg/template/friend25.C: New test. PR c++/7939 * g++.dg/template/crash11.C: New test. From-SVN: r72548
2003-10-16re PR c++/7939 (ICE on function template specialization)Kriang Lerdsuwanakij
PR c++/7939 * typeck.c (comptypes): Don't ICE when its first argument is error_mark_node. (compparms): Reverse the arguments of same_type_p. PR c++/7939 * g++.dg/template/crash11.C: New test. From-SVN: r72546
2003-10-14re PR c++/11878 (ICE in cp_expr_size)Jason Merrill
PR c++/11878 * tree.c (build_target_expr_with_type): Call force_rvalue for classes with non-trivial copy ctors. PR c++/11063 * typeck.c (build_modify_expr): Call convert rather than abort. From-SVN: r72493
2003-10-07Fix typoMark Mitchell
From-SVN: r72184
2003-10-07re PR c++/10174 (g++ wrongly assumes a namespace of a function based on the ↵Mark Mitchell
namespace of the function's argument) PR c++/10174 * call.c (initialize_reference): Tweak error message. PR c++/12337 * init.c (build_new_1): Make sure that the expression returned is not an lvalue. PR c++/12344, c++/12236, c++/8656 * decl.c (start_function): Do not ignore attributes embedded in a function declarator. PR c++/12337 * g++.dg/init/new9.C: New test. PR c++/12334, c++/12236, c++/8656 * g++.dg/ext/attrib8.C: New test. From-SVN: r72179
2003-10-05re PR c++/11409 (using declarations and fabs built-in)Roger Sayle
PR c++/11409 * class.c (resolve_address_of_overloaded_function): When building list of matching non-template function decls, ignore anticipated declarations of undeclared or shadowed GCC builtins. * g++.dg/overload/builtin3.C: New test case. From-SVN: r72108
2003-10-02re PR c++/12486 (Accepts IMHO invalid C++ code)Mark Mitchell
PR c++/12486 * typeck.c (finish_class_member_access_expr): Issue diagnostic on erroneous use of qualified name. PR c++/12486 * g++.dg/inherit/error1.C: New test. From-SVN: r72051
2003-10-02[multiple changes]Jakub Jelinek
2003-07-09 Mark Mitchell <mark@codesourcery.com> * cp-tree.h (break_out_calls): Remove declaration. * tree.c (break_out_calls): Remove. * typeck.c (build_modify_expr): Avoid invalid sharing of trees. 2003-10-01 Jakub Jelinek <jakub@redhat.com> * g++.dg/opt/cond1.C: New test. From-SVN: r72021
2003-09-18class.c (resolve_address_of_overloaded_function): Replace complain parameter ↵Mark Mitchell
with flags parameter. * class.c (resolve_address_of_overloaded_function): Replace complain parameter with flags parameter. (instantiate_type): Adjust accordingly. From-SVN: r71529
2003-09-17re PR c++/11991 (ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:282 ↵Mark Mitchell
when applying typeid operator to template template parameter) PR c++/11991 * typeck2.c (incomplete_type_diagnostic): Robustify. PR c++/11991 * g++.dg/rtti/typeid3.C: New test. From-SVN: r71488
2003-09-15re PR c++/3907 (nested template parm collides with member name)Mark Mitchell
PR c++/3907 * cp-tree.h (innermost_scope_is_class_p): New function. * class.c (maybe_note_name_used_in_class): Refine test for whether or not we are in a class scope. * decl.c (innermost_scope_is_class_p): Define. PR c++/3907 * g++.dg/parse/template12.C: New test. From-SVN: r71396
2003-09-15class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for an bit-field ↵Mark Mitchell
whose width exceeds that of its... * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for an bit-field whose width exceeds that of its type. * g++.dg/abi/bitfield11.C: New test. * g++.dg/abi/bitfield12.C: Likewise. From-SVN: r71394
2003-09-09re PR c++/11595 (crash on duplicate label definition)Steven Bosscher
PR c++/11595 * decl.c (define_label): Remove unreachable timeva pop. Always return the decl, even if the definition is invalid. From-SVN: r71232
2003-09-08re PR c++/11786 (operator() call on variable in other namespace not recognized)Mark Mitchell
PR c++/11786 * decl2.c (add_function): Do not complain about seeing the same non-function twice. PR c++/11786 * g++.dg/lookup/koenig2.C: New test. From-SVN: r71216
2003-09-08re PR c++/5296 ([DR115] Pointers to functions and template functions behave ↵Mark Mitchell
different in deduction) PR c++/5296 * pt.c (try_one_overload): Add addr_p parameter. (resolve_overloaded_unification): Pass it. PR c++/5296 * g++.dg/rtti/typeid2.C: New test. From-SVN: r71212
2003-09-07re PR c++/12181 (Wrong code with comma operator and c++)Mark Mitchell
PR c++/12181 * typeck.c (build_modify_expr): Don't always stabilize the lhs and rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs. PR c++/12181 * g++.dg/expr/comma1.C: New test. From-SVN: r71181
2003-09-07Fix typoMark Mitchell
From-SVN: r71176
2003-09-07re PR c++/11867 (static_cast ignores ambiguity)Mark Mitchell
PR c++/11687 * call.c (standard_conversion): Improve comments. (perform_direct_initialization): Make sure we return an expression of the correct type. * typeck.c (build_static_cast): Check for ambiguity and accessibility when performing conversions. PR c++/11687 * g++.dg/expr/static_cast5.C: New test. From-SVN: r71159
2003-09-05re PR c++/12163 (static_cast + explicit ctor regression)Mark Mitchell
PR c++/12163 * call.c (perform_direct_initialization): Correct logic for direct-initialization of a class type. PR c++/12146 * pt.c (lookup_template_function): Robustify. PR c++/12163 * g++.dg/expr/static_cast4.C: New test. PR c++/12146 * g++.dg/template/crash9.C: New test. From-SVN: r71117
2003-09-04Revert this patch:Mark Mitchell
* class.c (include_empty_classes): Correct logic for ABI version 1. Revert this patch: * g++.dg/abi/layout4.C: New test. From-SVN: r71079
2003-09-03re PR c++/12053 (ABI difference between default g++ 3.3 and g++ 3.2)Mark Mitchell
PR c++/12053 * class.c (include_empty_classes): Correct logic for ABI version 1. PR c++/12053 * g++.dg/abi/layout4.C: New test. From-SVN: r71039
2003-09-01re PR c++/12114 ([3.3.2] Uninitialized memory accessed in dtor)Mark Mitchell
PR c++/12114 * cp-tree.h (initialize_reference): Change prototype. * call.c (initialize_reference): Add cleanup parameter. * decl.c (grok_reference_init): Likewise. (check_initializer): Likewise. (cp_finish_decl): Insert a CLEANUP_STMT if necessary. (duplicate_decls): When replacing an anticipated builtin, do not honor TREE_NOTHROW. * typeck.c (convert_for_initialization): Correct call to initialize_reference. PR c++/12114 * g++.dg/init/ref9.C: New test. From-SVN: r70985
2003-08-29re PR c++/11928 (c++ typedef handling)Mark Mitchell
PR c++/11928 * search.c (add_conversions): Avoid adding two conversion operators for the same type. PR c++/11928 * g++.dg/inherit/conv1.C: New test. From-SVN: r70936
2003-08-21stmt.c (expand_asm_operands): Avoid string concatenation.Kaveh R. Ghazi
* stmt.c (expand_asm_operands): Avoid string concatenation. * tree.c (default_flag_random_seed): Avoid ISO C definition. * varasm.c (output_constant_def): Delete unused variable. cp: * cp-tree.h (build_function_call_real): Remove unused parameter. * typeck.c (build_function_call_real): Likewise. Caller changed. * decl.c (binding_table_reverse_maybe_remap): Initialize variable. From-SVN: r70632
2003-08-19re PR c++/5293 (confusing message when binding a temporary to a reference)Gabriel Dos Reis
PR c++/5293 * call.c (initialize_reference): Improve diagnostic. From-SVN: r70582
2003-08-04Mark ChangeLogMark Mitchell
From-SVN: r70141
2003-08-04Mark ChangeLogMark Mitchell
From-SVN: r70137
2003-08-04re PR c++/11713 (declaration conflicts)Mark Mitchell
PR c++/11713 * search.c (setup_class_bindings): Handle conversion operators specially. PR c++/11713 * g++.dg/overload/operator1.C: New test. From-SVN: r70135
2003-07-25re PR c++/10796 (ICE (segfault) when defining an enum with two values: -1 ↵Mark Mitchell
and MAX_INT_64BIT) PR c++/10796 * decl.c (finish_enum): Make sure the underlying integer type has the same precision as some full integer type. Reverts part 2003-06-27's patch that didn't play any role in fixing the PR. * cp-tree.h (convert_to_base_statically): Declare. * call.c (build_special_member_call): Convert INSTANCE to the base type. * class.c (convert_to_base_statically): New method. * init.c (construct_virtual_base): Use it. * method.c (do_build_assign_ref): Fix typo in comment. * g++.dg/init/enum2.C: New. * g++.dg/inherit/access5.C: New test. From-SVN: r69769
2003-07-24re PR c++/11513 (ICE in push_template_decl_real cp/pt.c:2755, template ↵Kriang Lerdsuwanakij
member functions) PR c++/11513 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope. * g++.dg/template/crash8.C: New test. From-SVN: r69738
2003-07-23re PR c++/11645 (Failure to deal with using and private inheritance)Mark Mitchell
PR c++/11645 * cp-tree.h (accessible_base_p): Declare. * call.c (build_over_call): Use it. * search.c (accessible_base_p): New function, split out from ... (lookup_base): ... here. PR c++/11645 * g++.dg/inherit/access4.C: New test. From-SVN: r69726
2003-07-23re PR c++/11282 (Infinite memory usage after syntax error)Nathan Sidwell
cp: PR c++/11282 * decl.c: (reshape_init): Always advance *INITP. testsuite: PR c++/11282 * g++.dg/parse/crash7.C: New test. From-SVN: r69709
2003-07-20re PR c++/11546 (Type lookup problems in out-of-line definition of a class ↵Mark Mitchell
doubly nested from a template class) PR c++/11546 * pt.c (lookup_template_class): Treat TYPE_DECLs as TEMPLATE_DECLs where appropriate. PR c++/11546 * testsuite/g++.dg/template/lookup1.C: New test. From-SVN: r69601
2003-07-14re PR c++/7053 (ICE when declaring a function already defined as a friend ↵Mark Mitchell
method of a template class) PR c++/7053 * pt.c (unregister_specialization): Rename to ... (reregister_specialization): ... this. (tsubst_friend_function): Use it. (regenerate_decl_from_template): Likewise. PR c++/7053 * g++.dg/template/friend20.C: New test. From-SVN: r69349
2003-07-14re PR c++/11154 (spurious ambiguity report for template class specialization)Kriang Lerdsuwanakij
PR c++/11154 * pt.c (more_specialized_class): Add full_args parameter. (most_specialized_class): Adjust calls to more_specialized_class. * cp-tree.h (more_specialized_class): Adjust declaration. * g++.dg/template/partial2.C: New test. From-SVN: r69326
2003-07-14re PR c++/11503 (segfault when instantiating template with ADDR_EXPR)Mark Mitchell
PR c++/11503 * g++.dg/template/anon1.C: New test. PR c++/11503 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro. (SET_DECL_SELF_REFERENCE_P): Likewise. * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P. * pt.c (tsubst_decl): Copy it. * search.c (lookup_base): Use DECL_SELF_REFERENCE_P. From-SVN: r69320
2003-07-11backport: re PR c++/9738 ([mingw] Internal compiler error in ↵Danny Smith
rest_of_compilation, at toplev.c: 3491) Backport from mainline. 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net> PR c++/9738 * decl.c (duplicate_decls): Re-invoke make_decl_rtl if the old decl had instantiated DECL_RTL. (Based on Richard Henderson 2003-05-13 patch to c-decl.c). From-SVN: r69232
2003-07-11re PR c++/8164 (ICE when using different const expressions as template ↵Mark Mitchell
parameter) PR c++/8164 * decl.c (duplicate_decls): Avoid mangling names unnecessarily. PR c++/8164 * g++.dg/template/nontype2.C: New test. From-SVN: r69227
2003-07-11re PR c++/10558 (Segfault on illegal use of template without template args)Mark Mitchell
PR c++/10558 * parse.y (class_template_ok_as_expr): New variable. (template_arg_1): New non-terminal. (primary): Issue errors about uses of class templates as expressions. PR c++/10558 * g++.dg/parse/template8.C: New test. From-SVN: r69225
2003-07-10re PR c++/10032 (-pedantic converts some errors to warnings)Mark Mitchell
PR c++/10032 * doc/invoke.texi (C++ Dialect Options): Change documentation of -fpermissive. PR c++/10032 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are still errors. PR c++/10527 * error.c (decl_to_string): Do not print default argument expressions. PR c++/10032 * g++.dg/warn/pedantic1.C: New test. From-SVN: r69193
2003-07-10re PR c++/10849 (Cannot define an out-of-class specialization of a private ↵Kriang Lerdsuwanakij
nested template class) PR c++/10849 * decl2.c (handle_class_head_apparent_template): New function. * cp-tree.h (handle_class_head_apparent_template): Add declaration. * parse.y (class_head_defn): Use it. * search.c (type_access_control): Revert my 2003-05-25 change. * g++.dg/template/access12.C: New test. From-SVN: r69185
2003-07-06re PR c++/11345 (ICE in build_base_path)Mark Mitchell
PR c++/11345 * search.c (lookup_base_r): Remove is_non_public and within_current_scope parameters. Remove other dead code. (lookup_base): Adjust call to lookup_base_r. (adjust_result_of_qualified_name_lookup): Improve comment. * semantics.c (finish_call_expr): Use maybe_dummy_object. PR c++/11345 * g++.old-deja/g++.jason/access8.C: New test. From-SVN: r69018
2003-07-06re PR c++/11431 (static_cast behavior with subclasses when default ↵Mark Mitchell
constructor available) PR c++/11431 * typeck.c (build_static_cast): Check for reference conversions earlier. PR c++/11431 * g++.dg/expr/static_cast3.C: New test. From-SVN: r68991
2003-07-02re PR c++/6949 (ICE in tsubst_decl, at cp/pt.c:5733)Mark Mitchell
PR c++/6949 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local classes. PR c++/6949 * g++.dg/template/local3.C: New test. From-SVN: r68817
2003-07-01call.c (resolve_scoped_fn_name): Return error_mark_node for erroneous cases.Mark Mitchell
* call.c (resolve_scoped_fn_name): Return error_mark_node for erroneous cases. From-SVN: r68785
2003-07-01re PR c++/11137 (GNU/Linux shared library constructors not called unless ↵Mark Mitchell
there's one global object) PR c++/11137 * decl2.c (generate_ctor_or_dtor_function): Tolerate a non-existant ssdf_decls array. (finish_file): Call generator_ctor_or_dtor_function when there are static constructors or destructors and no other static initializations. PR c++/11137 * g++.dg/init/attrib1.C: New test. From-SVN: r68783
2003-07-01re PR c++/11149 (ICE on error when instantiation with call function of a ↵Mark Mitchell
base type) PR c++/11149 * call.c (resolve_scoped_fn_name): Check that the qualifying scope is a class type. PR c++/11149 * g++.dg/lookup/scoped6.C: New test. From-SVN: r68781
2003-07-01re PR c++/9559 (ICE with invalid initialization of a static const member)Mark Mitchell
PR c++/9559 * decl2.c (grokfield): Do not build NOP_EXPRs around the error_mark_node. PR c++/9559 * g++.dg/init/static1.C: New test. From-SVN: r68765
2003-06-30mangle.c (write_expression): Exit gracefully when trying to mangle a CALL_EXPR.Giovanni Bajo
2003-06-30 Giovanni Bajo <giovannibajo@libero.it> * mangle.c (write_expression): Exit gracefully when trying to mangle a CALL_EXPR. From-SVN: r68725