aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
AgeCommit message (Collapse)AuthorFilesLines
2004-10-11re PR c++/17936 (Declaration of specialization rejected)Mark Mitchell3-0/+14
PR c++/17936 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment. * pt.c (optimize_specialization_lookup_p): Do not optimize lookups for members of partial or explicit specializations. PR c++/17936 * g++.dg/template/spec18.C: New test. From-SVN: r88905
2004-10-11re PR c++/17929 (ICE with qualified name in template specialization)Mark Mitchell2-2/+13
PR c++/17929 * decl2.c (finish_anon_union): Robustify. From-SVN: r88886
2004-10-11cp-tree.h (get_dynamic_cast_base_type): Rename to ...Nathan Sidwell4-100/+183
* cp-tree.h (get_dynamic_cast_base_type): Rename to ... (dcast_base_hint): ... here. * rtti.c (build_dynamic_cast_1): Use dcast_base_hint. * search.c (struct dcast_data_s): New. (dynamic_cast_base_recurse): Remove. Replace with ... (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New. (get_dynamic_cast_base_type): Rename to ... (dcast_base_hint): ... here. Use dfs_walk_once_accessible. (accessible_r): Remove. (dfs_accessible_post): New, broken out of accessible_r. (accessible_p): Use dfs_walk_once_accessible. (dfs_walk_once_accessible_r): New. From accessible_r. (dfs_walk_once_accessible): New. From acessible_p. From-SVN: r88884
2004-10-11cp-tree.h (SAME_BINFO_TYPE_P): New.Nathan Sidwell6-31/+57
* cp-tree.h (SAME_BINFO_TYPE_P): New. * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare binfo types. (convert_to_base_statically, determine_primary_bases, update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group, accumulate_vtbl_inits, dfs_accumulate_vtbl_inits, build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise. * init.c (expand_member_init): Likewise. * search.c (lookup_base_r, dynamic_cast_base_recurse, binfo_via_virtual, copied_binfo, binfo_for_vbase, original_binfo): Likewise. * tree.c (copy_binfo): Likewise. From-SVN: r88880
2004-10-11* semantics.c: Fix comment typos.Kazu Hirata2-3/+7
From-SVN: r88875
2004-10-10re PR c++/17554 (crashes in on kopete build (KDE's kdenetwork))Andrew Pinski3-7/+38
2004-10-10 Andrew Pinski <pinskia@physics.uc.edu> PR c++/17554 part of c++/17657 middle-end/17703 * semantics.c (maybe_cleanup_point_expr): Call fold_build_cleanup_point_expr. (maybe_cleanup_point_expr_void): New function. (add_decl_expr): Call maybe_cleanup_point_expr_void. (finish_expr_stmt): Likewise. (finish_return_stmt): Likewise. (finish_for_expr): Likewise. (finish_asm_stmt): Likewise. * typeck.c (condition_conversion): Call fold_build_cleanup_point_expr. 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu> PR middle-end/17703 part of PR c++/17657 * fold-const.c (fold_build_cleanup_point_expr): New function. * tree.h (fold_build_cleanup_point_expr): Prototype. 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu> PR c++/17554 * g++.dg/init/for3.C: New test. PR c++/17657 * g++.dg/opt/switch2.C: New test. PR middle-end/17703 * g++.dg/warn/Wreturn-2.C: New test. From-SVN: r88869
2004-10-10re PR c++/17907 (ice in optimize_inline_calls, at tree-inline.c)Andrew Pinski2-1/+8
2004-10-10 Andrew Pinski <pinskia@physics.uc.edu> PR c++/17907 * semantics.c (add_decl_expr): If the decl has a size which has side effects then the decl expression needs a cleanup point. 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu> PR c++/17907 * g++.dg/eh/cleanup5.C: New test. From-SVN: r88867
2004-10-10re PR c++/17393 ("unused variable '._0'" warning with -Wall)Mark Mitchell2-1/+7
PR c++/17393 * decl.c (grokdeclarator): Robustify error-recovery on invalid declarations. PR c++/17393 * g++.dg/parse/error21.C: New test. From-SVN: r88855
2004-10-10Convert diagnostics to use quoting flag q 7/nGabriel Dos Reis7-214/+266
cp/ Convert diagnostics to use quoting flag q 7/n * typeck.c (composite_pointer_type_r, composite_pointer_type, cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr, string_conv_p, build_class_member_access_expr, build_class_member_access_expr, lookup_destructor, finish_class_member_access_expr, build_indirect_ref, get_member_function_from_ptrfunc, build_function_call, convert_arguments, build_binary_op, pointer_diff, build_unary_op, check_for_casting_away_constness, build_static_cast, build_reinterpret_cast, build_const_cast, build_c_cast, build_modify_expr, get_delta_difference, build_ptrmemfunc, dubious_conversion_warnings, convert_for_assignment, convert_for_initialization, maybe_warn_about_returning_address_of_local, check_return_expr): Use quoting marks. * typeck2.c (error_not_base_type, readonly_error, abstract_virtuals_error, cxx_incomplete_type_diagnostic, store_init_value, digest_init, build_x_arrow, build_m_component_ref, require_complete_eh_spec_types): Likewise. * tree.c (cp_build_qualified_type_real, handle_java_interface_attribute, handle_init_priority_attribute): Likewise. * semantics.c (finish_asm_stmt, finish_non_static_data_member, finish_pseudo_destructor_expr, check_template_template_default_arg, begin_class_definition, finish_base_specifier, qualified_name_lookup_error, finish_id_expression, finish_typeof): Likewise. * search.c (lookup_base, check_final_overrider, look_for_overrides_r): Likewise. * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise. testsuite/ * g++.dg/overload/pmf1.C: Adjust quoting marks. * g++.dg/warn/incomplete1.C: Likewise. * g++.dg/template/qualttp20.C: Likewise. From-SVN: r88854
2004-10-10re PR c++/17867 ("void" instead of class name in error message)Mark Mitchell5-44/+61
PR c++/17867 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a constructor. PR c++/17670 * init.c (build_new): Correct comments. * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in the non-array case. PR c++/17821 * parser.c (cp_parser_postfix_dot_deref_expression): If the pseduo-destructor-name production does not work, fall back to the ordinary production. PR c++/17826 * tree.c (cp_tree_equal): Handle a BASELINK. PR c++/17687 * g++.dg/parse/error19.C: New test. PR c++/17670 * g++.dg/init/new11.C: New test. PR c++/17821 * g++.dg/parse/error20.C: New test. PR c++/17826 * g++.dg/template/crash24.C: New test. From-SVN: r88836
2004-10-09re PR c++/17524 (ICE with initializing a variable of type void)Mark Mitchell4-19/+51
PR c++/17524 * cp-tree.h (check_var_type): New function. * decl.c (check_var_type): New function, split out from ... (grokdeclarator): ... here. * pt.c (tsubst_decl): Use check_var_type. PR c++/17685 * decl.c (grokdeclarator): Disallow declarations of operators as PR c++/17524 * g++.dg/template/static9.C: New test. PR c++/17685 * g++.dg/parse/operator5.C: New test. From-SVN: r88820
2004-10-08re PR c++/17868 (RDIV_EXPR not supported by dump_expr)Volker Reichelt2-0/+6
PR c++/17868 * error.c (dump_expr): Add missing case for RDIV_EXPR. From-SVN: r88781
2004-10-08* pt.c, search.c: Fix comment typos.Kazu Hirata3-4/+8
From-SVN: r88749
2004-10-08cp-tree.h (dfs_walk, [...]): Remove.Nathan Sidwell5-269/+312
* cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp, unmarkedp): Remove. (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New. * class.c (struct find_final_overrider_data): Remove most_derived, vpath_list and vpath fields. Add path field. (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust. (dfs_find_final_overrider): Rename to ... (dfs_find_final_overrider_pre): ... here. Adjust. (dfs_find_final_overrider_post): Adjust. (dfs_find_final_overrider_q): Fold into dfs_find_final_overrider_pre. (find_final_overrider): Adjust dfs searching. (dfs_modify_vtables): Don't mark binfo here. (modify_all_vtables): Use dfs_walk_once. (build_vtt_inits): Likwise. Use dfs_walk_all. (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here. Return dfs_skip_bases as appropriate. (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate. * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as appropriate. Don't mark binfo here. (initialize_vtbl_ptrs): Use dfs_walk_once. * search.c (struct vbase_info): Remove unused struct. (access_in_type): Use dfs_walk_once. (dfs_access_in_type): Don't mark binfo here. (dfs_accessible_queue_p, dfs_accessible_p) Remove. Fold into ... (accessible_r): ... here. New. Specialize dfs_walk_once. (accessible_p): Use accessible_r. (lookup_field_queue_p): Remove. Fold into ... (lookup_field_r): ... here. Adjust. (lookup_member): Use dfs_walk_all. (dfs_walk_real, dfs_walk): Replace with ... (dfs_walk_all, dfs_walk_once): ... these. (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once. (dfs_unmark, unmarkedp, markedp): Remove. (dfs_get_pure_virtuals): Don't mark binfo here. (get_pure_virtuals): Use dfs_walk_once. (dfs_debug_unmarked_p): Remove. Fold into ... (dfs_debug_mark): ... here. (note_debug_info_needed): Use dfs_walk_all. From-SVN: r88738
2004-10-07pt.c (tsubst_expr): Look passed the CLEANUP_POINT_EXPR to get the asm ↵Andrew Pinski2-1/+11
expression. 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu> * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the CLEANUP_POINT_EXPR to get the asm expression. From-SVN: r88733
2004-10-07cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.Mark Mitchell8-260/+345
* cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag. (DECL_MEMBER_TEMPLATE_P): New macro. (is_member_template): Remove. (class_method_index_for_fn): New function. * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P. * class.c (finish_struct_methods): Remove out-of-date comment. * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P. * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and class_method_index_for_fn. * pt.c (is_member_template): Remove. (is_member_template_class): Likewise. (optimize_specialization_lookup_p): New function. (retrieve_specialization): Optimize lookups for members that are not member templates. (register_specialization): Adjust accordingly. (build_template_decl): Add member_template_p parameter. Set DECL_MEMBER_TEMPLATE_P. (process_partial_specialization): Adjust call to retrieve_specialization. (push_template_decl_real): Determine whether the template is a member template. (lookup_template_class): Use retrieve_specialization. (tsubst_decl): Adjust call to retrieve_specialization. (tsubst_exception_specification): New function. (tsubst): Use it. (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P. (instantiate_template): Adjust call to retrieve_specialization. (regenerate_decl_from_template): Do not actually generate a new DECL. (instantiate_decl): Adjust call to retrieve_specialization. (class_method_index_for_fn): New method. From-SVN: r88697
2004-10-07parser.c (cp_parser_asm_definition): Look passed the CLEANUP_POINT_EXPR to ↵Andrew Pinski2-2/+13
get the asm expression. cp/ChangeLog: * parser.c (cp_parser_asm_definition): Look passed the CLEANUP_POINT_EXPR to get the asm expression. testsuite/ChangeLog: * g++.dg/ext/asm6.C: Remove extraneous semicolon. From-SVN: r88688
2004-10-06[multiple changes]Andrew Pinski2-0/+7
2004-10-05 Andrew Pinski <pinskia@physics.uc.edu> PR c++/17368 * semantics.c (finish_asm_stmt): Asm expressions need cleanup also. 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu> PR c++/17368 * g++.dg/ext/asm6.C: New test. From-SVN: r88627
2004-10-05Fix emailGabriel Dos Reis1-1/+1
From-SVN: r88575
2004-10-05Convert diagnostics to use quoting flag q 6/nGabriel Dos Reis2-134/+154
Convert diagnostics to use quoting flag q 6/n * pt.c (finish_member_template_decl, check_specialization_scope, maybe_process_partial_specialization, determine_specialization, check_explicit_specialization, maybe_check_template_type, process_partial_specialization, check_default_tmpl_args, push_template_decl_real, redeclare_class_template, convert_nontype_argument, coerce_template_parms, lookup_template_class, push_tinst_level, instantiate_class_template, tsubst_arg_types, tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy_and_build, check_instantiated_args, do_decl_instantiation, do_type_instantiation, invalid_nontype_parm_type_p, check_specialization_namespace, convert_template_argument, determine_specialization, check_template_shadow, tsubst_decl instantiate_pending_templates): Use quoting marks. From-SVN: r88573
2004-10-05re PR c++/17829 (wrong error: call of overloaded function is ambiguous)Nathan Sidwell2-9/+33
cp: PR c++/17829 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when unqualified lookup finds a member function. testsuite: PR c++/17829 * g++.dg/lookup/koenig4.C: New. From-SVN: r88558
2004-10-05Convert diagnostics to use quoting flag q 4/nGabriel Dos Reis5-123/+153
Convert diagnostics to use quoting flag q 4/n * parser.c (cp_parser_name_lookup_error, cp_parser_diagnose_invalid_type_name, cp_parser_primary_expression, cp_parser_unqualified_id, cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement, cp_parser_jump_statement, cp_parser_simple_declaration, cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id, cp_parser_type_parameter, cp_parser_template_id, cp_parser_template_name, cp_parser_direct_declarator, cp_parser_parameter_declaration_list, cp_parser_class_head, cp_parser_base_specifier, cp_parser_lookup_name, cp_parser_late_parsing_default_args, cp_parser_optional_template_keyword cp_parser_elaborated_type_specifier, cp_parser_check_class_key, cp_parser_check_access_in_redeclaration): Use quoting marks. * name-lookup.c (supplement_binding, pushdecl, check_for_out_of_scope_variable, validate_nonmember_using_decl, do_nonmember_using_decl, lookup_tag, set_decl_namespace, push_namespace, do_namespace_alias, do_using_directive, ambiguous_decl, lookup_namespace_name, add_function): Likewise. * method.c (use_thunk): Likewise. * lex.c (unqualified_name_lookup_error, unqualified_fn_lookup_error): Likewise. testsuite/ merlin[1:17]% cd build ~ merlin[1:17]% ls ~/build 3 4 4.0.0 c++0x r tree merlin[1:17]% cd 4.0.0 ~/build merlin[1:17]% cd gcc ~/build/4.0.0 merlin[1:17]% make check-g++ ~/build/4.0.0/gcc (rootme=`${PWDCMD-pwd}`; export rootme; \ srcdir=`cd /home/gdr/redhat/egcs/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ cd testsuite; \ EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ if [ -f ${rootme}/../expect/expect ] ; then \ TCL_LIBRARY=`cd .. ; cd /home/gdr/redhat/egcs/gcc/../tcl/library ; ${PWDCMD-pwd}` ; \ export TCL_LIBRARY ; fi ; \ `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ ) Test Run By gdr on Tue Oct 5 01:18:04 2004 Native configuration is i686-pc-linux-gnu === g++ tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/gdr/redhat/egcs/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/bprob/bprob.exp ... Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/charset/charset.exp ...Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/compat/compat.exp ...Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/debug/debug.exp ... Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/dg.exp ... FAIL: g++.dg/other/classkey1.C (test for errors, line 9) FAIL: g++.dg/other/classkey1.C (test for errors, line 11) FAIL: g++.dg/other/classkey1.C (test for errors, line 14) FAIL: g++.dg/other/classkey1.C (test for errors, line 17) FAIL: g++.dg/other/classkey1.C (test for excess errors) FAIL: g++.dg/parse/error15.C (test for errors, line 13) FAIL: g++.dg/parse/error15.C (test for errors, line 14) FAIL: g++.dg/parse/error15.C (test for errors, line 15) FAIL: g++.dg/parse/error15.C (test for errors, line 21) FAIL: g++.dg/parse/error15.C (test for errors, line 22) FAIL: g++.dg/parse/error15.C (test for errors, line 23) FAIL: g++.dg/parse/error15.C (test for errors, line 31) FAIL: g++.dg/parse/error15.C (test for errors, line 32) FAIL: g++.dg/parse/error15.C (test for errors, line 33) FAIL: g++.dg/parse/error15.C (test for excess errors) XPASS: g++.dg/rtti/tinfo1.C scan-assembler _ZTIP9CTemplateIhE: XPASS: g++.dg/rtti/tinfo1.C scan-assembler-not .globl[ \t]+_ZTIP9CTemplateIhE XPASS: g++.dg/rtti/tinfo1.C scan-assembler-not .section[^\n\r]*_ZTIP9CTemplateIhE[^\n\r]*FAIL: g++.dg/template/meminit2.C (test for errors, line 10) FAIL: g++.dg/template/meminit2.C (test for errors, line 11) FAIL: g++.dg/template/meminit2.C (test for excess errors) Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/gcov/gcov.exp ... FAIL: 102:is -:should be 1 FAIL: g++.dg/gcov/gcov-1.C gcov: 1 failures in line counts, 0 in branch percentamerlin[1:27]% make check-g++ ~/build/4.0.0/gcc (rootme=`${PWDCMD-pwd}`; export rootme; \ srcdir=`cd /home/gdr/redhat/egcs/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ cd testsuite; \ EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ if [ -f ${rootme}/../expect/expect ] ; then \ TCL_LIBRARY=`cd .. ; cd /home/gdr/redhat/egcs/gcc/../tcl/library ; ${PWDCMD-pwd}` ; \ export TCL_LIBRARY ; fi ; \ `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ ) Test Run By gdr on Tue Oct 5 01:27:39 2004 Native configuration is i686-pc-linux-gnu === g++ tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for tar method.c cfns.gperf cxx-pretty-print.c method.c.~1.315.~ cfns.h cxx-pretty-print.h name-lookup.c ChangeLog decl2.c name-lookup.c.~1.85.~ ChangeLog.1 decl.c name-lookup.h ChangeLog.~1.4404.~ decl.h NEWS ChangeLog.2 dump.c operators.def ChangeLog.3 error.c optimize.c ChangeLog.egcs except.c parser.c ChangeLog.tree-ssa expr.c parser.c.~1.258.~ class.c friend.c pt.c config-lang.in g++spec.c ptree.c cp-gimplify.c init.c repo.c cp-lang.c init.c.~1.396.~ rtti.c cp-objcp-common.c lang-specs.h search.c cp-objcp-common.h lex.c semantics.c cp-tree.def lex.c.~1.349.~ tree.c cp-tree.h Make-lang.in typeck2.c CVS mangle.c typeck.c merlin[7:37]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Enter passphrase for RSA key '/home/gdr/.ssh/identity': cvs [diff aborted]: received interrupt signal merlin[7:37]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Warning: Remote host denied X11 forwarding. Warning: Remote host denied authentication agent forwarding. cvs diff: Diffing . merlin[7:38]% l ~/d-5.patch ~/redhat/egcs/gcc/cp merlin[7:39]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Warning: Remote host denied X11 forwarding. Warning: Remote host denied authentication agent forwarding. cvs diff: Diffing . merlin[7:40]% l ~/d-5.patch ~/redhat/egcs/gcc/cp You have new mail. merlin[8:21]% cvs -z9 commit ~/redhat/egcs/gcc/cp merlin[8:21]% cd . ~/redhat/egcs/gcc/cp merlin[8:21]% cvs -z9 commit cp testsuite ~/redhat/egcs/gcc/cp cvs commit: nothing known about `cp' cvs commit: nothing known about `testsuite' cvs [commit aborted]: correct above errors first! merlin[8:21]% cd .. ~/redhat/egcs/gcc/cp merlin[8:21]% cvs -z9 commit cp testsuite ~/redhat/egcs/gcc cvs commit: Examining cp cvs commit: Examining testsuite cvs commit: Examining testsuite/ada cvs commit: Examining testsuite/ada/acats cvs commit: Examining testsuite/ada/acats/support cvs commit: Examining testsuite/ada/acats/tests cvs commit: Examining testsuite/ada/acats/tests/a cvs commit: Examining testsuite/ada/acats/tests/c2 cvs commit: Examining testsuite/ada/acats/tests/c3 cvs commit: Examining testsuite/ada/acats/tests/c4 cvs commit: Examining testsuite/ada/acats/tests/c5 cvs commit: Examining testsuite/ada/acats/tests/c6 cvs commit: Examining testsuite/ada/acats/tests/c7 cvs commit: Examining testsuite/ada/acats/tests/c8 cvs commit: Examining testsuite/ada/acats/tests/c9 cvs commit: Examining testsuite/ada/acats/tests/ca cvs commit: Examining testsuite/ada/acats/tests/cb cvs commit: Examining testsuite/ada/acats/tests/cc cvs commit: Examining testsuite/ada/acats/tests/cd cvs commit: Examining testsuite/ada/acats/tests/ce cvs commit: Examining testsuite/ada/acats/tests/cxa cvs commit: Examining testsuite/ada/acats/tests/cxb cvs commit: Examining testsuite/ada/acats/tests/cxf cvs commit: Examining testsuite/ada/acats/tests/cxg cvs commit: Examining testsuite/ada/acats/tests/cxh cvs commit: Examining testsuite/ada/acats/tests/cz cvs commit: Examining testsuite/ada/acats/tests/d cvs commit: Examining testsuite/ada/acats/tests/e cvs commit: Examining testsuite/ada/acats/tests/gcc cvs commit: Examining testsuite/ada/acats/tests/l cvs commit: Examining testsuite/config cvs commit: Examining testsuite/consistency.vlad cvs commit: Examining testsuite/consistency.vlad/layout cvs commit: Examining testsuite/consistency.vlad/layout/i960-97r2-results cvs commit: Examining testsuite/g++.dg cvs commit: Examining testsuite/g++.dg/abi cvs commit: Examining testsuite/g++.dg/bprob cvs commit: Examining testsuite/g++.dg/charset cvs commit: Examining testsuite/g++.dg/compat cvs commit: Examining testsuite/g++.dg/compat/abi cvs commit: Examinin From-SVN: r88552
2004-10-04Convert diagnostics to use quoting flag q 4/nGabriel Dos Reis4-52/+65
Convert diagnostics to use quoting flag q 4/n * except.c (decl_is_java_type, build_throw, is_admissible_throw_operand, check_handlers_1, check_handlers): Use quoting formats. * friend.c (add_friend, make_friend_class, do_friend): Likewise. * init.c (sort_mem_initializers, emit_mem_initializers, member_init_ok_or_else, expand_member_init, is_aggr_type, build_offset_ref, build_java_class_ref): Likewise. From-SVN: r88511
2004-10-04Convert diagnostics to use quoting flag q 3/nGabriel Dos Reis4-361/+410
cp/ Convert diagnostics to use quoting flag q 3/n * decl.c (pop_label, duplicate_decls, redeclaration_error_message, redeclaration_error_message, lookup_label, check_goto, make_typename_type, make_unbound_class_template, fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1, grok_reference_init, layout_var_decl, maybe_commonize_var, check_for_uninitialized_const_var, reshape_init_array, reshape_init, check_initializer, cp_finish_decl, member_function_or_else, bad_specifiers, grokfndecl, grokvardecl, check_static_variable_definition, compute_array_index_type, create_array_type_for_decl, check_special_function_return_type, grokdeclarator, check_default_argument, grokparms, grok_ctor_properties, grok_op_properties, check_elaborated_type_specifier, xref_tag, finish_enum, build_enumerator, check_function_type, start_preparsed_function, store_parm_decls): Use quoting formats. * decl2.c (grok_array_decl, delete_sanity, check_member_template, check_java_method, check_classfn, finish_static_data_member_decl, grokfield, grokbitfield, grok_function_init, build_anon_union_vars, coerce_new_type, coerce_delete_type, check_default_args): Likewise. * parser.c (cp_parser_decl_specifier_seq): Likewise. testsuite/ * g++.dg/template/local1.C: Adjust quoting marks in testing for diagnostics. * g++.dg/tls/diag-2.C: Likewise. * g++.dg/other/error8.C: Likewise. From-SVN: r88478
2004-10-04Convert diagnostics to use quoting flag q 2/nGabriel Dos Reis2-72/+88
Convert diagnostics to use quoting flag q 2/n * class.c (build_base_path, add_method, alter_access, handle_using_decl, check_bases, maybe_warn_about_overly_private_class, find_final_overrider, warn_hidden, finish_struct_anon, add_implicitly_declared_members, check_bitfield_decl, check_field_decls, layout_empty_base, build_base_field, check_methods, layout_virtual_bases, warn_about_ambiguous_bases, layout_class_type, finish_struct_1, resolve_address_of_overloaded_function, instantiate_type, note_name_declared_in_class): Use format flag "q" for quoting. From-SVN: r88473
2004-10-03Convert diagnostics to use quoting flag q 1/nGabriel Dos Reis3-56/+74
Convert diagnostics to use quoting flag q 1/n * error.c (locate_error): Ignore quoting flag q. * call.c (build_user_type_conversion_1, build_operator_new_call, build_object_call, op_error, build_conditional_expr, build_new_op, build_op_delete_call, enforce_access, convert_like_real, convert_arg_to_ellipsis, build_x_va_arg, convert_default_arg, build_over_call, build_new_method_call, joust, perform_implicit_conversion, initialize_reference): Use the quoting flag q. From-SVN: r88465
2004-10-03re PR c++/17797 (ICE in build_reinterpret_cast)Andrew Pinski2-0/+9
2004-10-03 Andrew Pinski <pinskia@physics.uc.edu> PR c++/17797 * typeck.c (build_reinterpret_cast): Return if the inner type is error_mark_node. From-SVN: r88457
2004-10-01c-decl.c (c_expand_body): Update call tree_rest_of_compilation.Jan Hubicka2-1/+5
* c-decl.c (c_expand_body): Update call tree_rest_of_compilation. * cgraphunit.c (cgraph_build_static_cdtor): Likewise. * toplev.h (tree_rest_of_compilation): Update prototype. * tree-optimize.c (tree_rest_of_compilation): Kill nested_p argument. * misc.c (gnat_expand_body): Update call of tree_rest_of_compilation. * semantics.c (expand_body): Update call of tree_rest_of_compilation. * f95-lang.c (gfc_expand_function): Update call of tree_rest_of_compilation. * trans-decl.c (gfc_generate_constructors): Likewise. * java.c (java_expand_body): Update call of tree_rest_of_compilation. * treetree.c (treeland_expand_function): Update call of tree_rest_of_compilation. From-SVN: r88396
2004-09-30cp-tree.h (struct lang_decl): Shrink by reordering fields and turning ↵Nathan Sidwell2-11/+20
operator_code and fixed_offset into... * cp-tree.h (struct lang_decl): Shrink by reordering fields and turning operator_code and fixed_offset into bitfields. From-SVN: r88337
2004-09-29re PR c/7425 (deprecated attribute doesn't merge with multiple declarations)Joseph Myers2-0/+8
PR c/7425 * c-decl.c (merge_decls): Merge TREE_DEPRECATED. cp: * decl.c (duplicate_decls): Merge TREE_DEPRECATED. testsuite: * gcc.dg/deprecated-3.c, g++.dg/warn/deprecated-2.C: New tests. From-SVN: r88303
2004-09-29revert accidental checkinJason Merrill1-17/+8
From-SVN: r88302
2004-09-29re PR tree-optimization/17697 (ICE: Statement marked for throw, but doesn't ↵Jason Merrill2-8/+24
- verify_stmts failed) PR tree-optimization/17697 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl. From-SVN: r88293
2004-09-29re PR middle-end/17525 (ICE in emit_move_insn (non-BLKmode arg))Jason Merrill2-0/+6
PR middle-end/17525 * class.c (build_base_field): Set TYPE_MODE. From-SVN: r88270
2004-09-28re PR driver/17537 (g++ not passing -lstdc++ to linker when -l is only supplied)Roger Sayle2-0/+9
PR driver/17537 * g++spec.c (lang_specific_driver): Unrecognized libraries, other than -lc and -lm, may require linking against libstc++. From-SVN: r88256
2004-09-28* tree.c: Fix a comment typo.Kazu Hirata2-1/+5
From-SVN: r88229
2004-09-28class.c (VTT_TOP_LEVEL_P, [...]): Remove.Nathan Sidwell3-191/+107
* class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove. (struct secondary_vptr_vtt_init_data_s): New. (build_vtt_inits): Adjust dfs_walkers. (dfs_build_secondary_vptr_vtt_inits): Caller data is a secondary_vptr_vtt_init_data_s structure. Adjust. (dfs_ctor_vtable_bases_queue_p): Remove. (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify. * pt.c (struct get_template_base_data_s): Remove. (get_template_base_r): Fold into get_template_base. (get_template_base): Walk base binfos directly in inheritance graph order. Remove duplicated changelog entries From-SVN: r88224
2004-09-28re PR c++/17642 (internal compiler error: in invert_truthvalue, at ↵Mark Mitchell8-65/+151
fold-const.c:2997) PR c++/17642 * stor-layout.c (layout_decl): Use fold_convert, not convert. (bit_from_pos): Likewise. (byte_from_pos): Likewise. (pos_from_bit): Likewise. (normalize_offset): Likewise. (place_field): Likewise. (finalize_type_size): Likewise. (layout_type): Likewise. * tree.c (build_index_type): Likewise. PR c++/17642 * cp-tree.h (fold_if_not_in_template): New function. * call.c (build_conditional_expr): Use fold_if_not_in_template. (build_cxx_call): Likewise. * cvt.c (convert_to_complex): Likewise. (ocp_convert): Likewise. (convert): Likewise. (convert_force): Likewise. * decl.c (compute_array_index_type): Clear processing_template_decl while folding array bounds. * pt.c (convert_nontype_argument): Clear processing_template_decl while processing non-type argument initialization. * tree.c (fold_if_not_in_template): New function. * typeck.c (build_class_member_access_expr): Use fold_if_not_in_template. (build_array_ref): Likewise. (build_binary_op): Likewise. Do not try to optimize computations when processing templates. (cp_pointer_int_sum): Use fold_if_not_in_template. (pointer_diff): Likewise. (build_unary_op): Likewise. (build_reinterpret_cast): Likewise. (get_delta_difference): Likewise. (expand_ptrmemfunc_cst): Likewise. (dubious_conversion_warnings): Likewise. * g++.dg/template/crash23.C: New test. From-SVN: r88217
2004-09-27Fix implicit extern "C" breakage introduced by tokenization patch.Matt Austern2-13/+84
* cp/parser.c (struct cp_token): new one-bit field , implicit_extern_c (cp_lexer_get_preprocessor_token): Set implicit_extern_c for tokens that come from headers that are implicitly extern "C". (struct cp_parser): new one-bit field, implicit_extern_c. (cp_parser_new): Set parser's implicit_extern_c to false. (cp_parser_translation_unit): Pop lang context if we were in a header that was implicitly extern "C". (cp_parser_declaration_seq_opt): Push/pop lang context as required by the token's and parser's implicit_extern_c. From-SVN: r88203
2004-09-27re PR c++/17585 (usage of unqualified name of static member from within ↵Mark Mitchell4-8/+12
class not allowed) PR c++/17585 * cp-tree.h (shared_member_p): Declare. * search.c (shared_member_p): Give it external linkage. * semantics.c (finish_qualified_id_expr): Use it. (finish_id_expression): Likewise. From-SVN: r88188
2004-09-27re PR c++/17585 (usage of unqualified name of static member from within ↵Mark Mitchell2-1/+7
class not allowed) PR c++/17585 * semantics.c (finish_id_expression): Do not add "this->" to static member functions. PR c++/17585 * g++.dg/template/static8.C: New test. From-SVN: r88174
2004-09-27re PR c++/17681 (Bad message about constructor ordering (-Wall))Nathan Sidwell2-1/+4
cp: PR c++/17681 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO. testsuite: PR c++/17681 * g++.dg/other/error9.C: New test. From-SVN: r88170
2004-09-27class.c (struct count_depth_data): Remove.Nathan Sidwell5-173/+72
* class.c (struct count_depth_data): Remove. (dfs_depth_post, dfs_depth_q): Remove. (find_final_overrider): Use number of vbase classes as depth bound. * cp-tree.h (types_overlap_p): Remove. * search.c (struct overlap_info): Remove. (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove. * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove. (get_template_base_recursive): Remove. Replace with ... (get_template_base_r): ... this. (struct get_template_base_data_s): New. (get_template_base): Use get_template_base_r via dfs_walk. Always return NULL on failure. (unify): Remove error_mark_node check from get_template_base result. From-SVN: r88169
2004-09-24parser.c (cp_parser_expression_stack): Clarify why it is an array of ↵Paolo Bonzini2-1/+13
NUM_PREC_VALUES elements. 2004-09-24 Paolo Bonzini <bonzini@gnu.org> * parser.c (cp_parser_expression_stack): Clarify why it is an array of NUM_PREC_VALUES elements. (cp_parser_binary_expression): Clarify why we do not need to handle stack overflow. From-SVN: r88042
2004-09-24re PR c++/16889 (ambiguity is not detected)Nathan Sidwell2-101/+24
cp: PR c++/16889 * search.c (lookup_field_queue_p): Correct check for hidden base. * search.c (bfs_walk): Remove. (lookup_member): Use dfs_walk_real. (dfs_walk_real): Move and adjust documentation from bfs_walk. testsuite: PR c++/16889 * g++.dg/lookup/ambig3.C: New. From-SVN: r88037
2004-09-23decl.c (grokfndecl): If ::main is found not to return int, correct it after ↵Zack Weinberg4-190/+267
issuing a diagnostic. gcc/cp: * decl.c (grokfndecl): If ::main is found not to return int, correct it after issuing a diagnostic. (grokdeclarator): If the incoming type was error_mark_node, do not complain about declaring something with no type. (start_function): Change check for ::main not returning int to an assertion, as grokfndecl now catches this when the user did it. * init.c (perform_member_init, sort_mem_initializers) (emit_mem_initializers): Make most diagnostics be issued on the line of current_function_decl, not whatever the current input line is. * parser.c (cp_lexer_peek_token_emit_debug_info): Surround definition and declaration with #ifdef ENABLE_CHECKING. Avoid unnecessary use of fprintf. (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub definitions to avoid warnings. (cp_lexer_new_main): Add assertion that first token is not a padding token. (cp_lexer_new_from_token_array): Fold into ... (cp_lexer_new_from_tokens): ... here. Add assertion that first token is not a padding token. (cp_lexer_set_source_position_from_token): Move nearer to callers. Remove unused lexer argument. (cp_lexer_peek_token): Just print debugging report (if enabled) and return lexer->next_token. (cp_lexer_skip_purged_tokens): Delete. (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make inline, simplify bodies. (cp_lexer_peek_nth_token): Add debugging report a la cp_lexer_peek_token. (cp_lexer_consume_token): Correct commentary. Advance over purged tokens here. Set current source position here, from token to be returned. Avoid unnecessary use of fprintf. (cp_lexer_purge_token): Advance next_token pointer over this and subsequent purged tokens. (cp_parser_error): Adjust source position to that of the peeked token. (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions. (cp_parser_string_literal): Remove some excessive cleverness. (cp_parser_enum_specifier): Call start_enum before consuming the opening brace. (cp_parser_member_declaration): Make the "extra semicolon" diagnostic consistently-worded with the other place this is diagnosed. Explicitly set the diagnostic location to the location of the offending semicolon. (cp_parser_enclosed_template_argument_list): Use %</%> quoting in diagnostics. Do not use cp_parser_require. Set location of diagnostics about improper use of '>>' to location of offending token. (cp_parser_late_parsing_for_member): Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer. (cp_parser_late_parsing_default_args): Likewise. Manually move some logic outside the loop. gcc/testsuite: * g++.dg/ext/complit1.C * g++.dg/other/error2.C * g++.dg/other/nontype-1.C * g++.dg/parse/crash11.C * g++.dg/parse/crash12.C * g++.dg/parse/error15.C * g++.dg/parse/error4.C * g++.dg/parse/tmpl-outside1.C * g++.dg/parse/too-many-tmpl-args1.C * g++.dg/template/dependent-expr3.C * g++.dg/template/error10.C * g++.dg/template/instantiate1.C * g++.dg/template/vtable2.C * g++.dg/warn/Wshadow-1.C * g++.dg/warn/weak1.C * g++.old-deja/g++.brendan/crash16.C * g++.old-deja/g++.brendan/crash18.C * g++.old-deja/g++.brendan/crash48.C * g++.old-deja/g++.brendan/crash49.C * g++.old-deja/g++.brendan/crash55.C * g++.old-deja/g++.brendan/crash56.C * g++.old-deja/g++.brendan/crash8.C * g++.old-deja/g++.brendan/enum11.C * g++.old-deja/g++.brendan/enum8.C * g++.old-deja/g++.brendan/enum9.C * g++.old-deja/g++.brendan/friend3.C * g++.old-deja/g++.brendan/misc14.C * g++.old-deja/g++.bugs/900402_02.C * g++.old-deja/g++.bugs/900404_03.C * g++.old-deja/g++.bugs/900404_04.C * g++.old-deja/g++.bugs/900428_03.C * g++.old-deja/g++.jason/crash4.C * g++.old-deja/g++.jason/overload21.C * g++.old-deja/g++.jason/redecl1.C * g++.old-deja/g++.jason/report.C * g++.old-deja/g++.jason/rfg10.C * g++.old-deja/g++.jason/template30.C * g++.old-deja/g++.law/arm12.C * g++.old-deja/g++.law/ctors5.C * g++.old-deja/g++.law/cvt20.C * g++.old-deja/g++.law/init10.C * g++.old-deja/g++.law/init8.C * g++.old-deja/g++.law/visibility17.C * g++.old-deja/g++.law/visibility7.C * g++.old-deja/g++.mike/net8.C * g++.old-deja/g++.mike/p646.C * g++.old-deja/g++.mike/p700.C * g++.old-deja/g++.mike/p701.C * g++.old-deja/g++.mike/p811.C * g++.old-deja/g++.ns/template13.C * g++.old-deja/g++.other/array3.C * g++.old-deja/g++.other/crash25.C * g++.old-deja/g++.other/dtor3.C * g++.old-deja/g++.other/dtor4.C * g++.old-deja/g++.other/main1.C * g++.old-deja/g++.other/warn7.C * g++.old-deja/g++.pt/crash11.C * g++.old-deja/g++.pt/crash36.C * g++.old-deja/g++.pt/spec22.C * g++.old-deja/g++.pt/spec9.C * g++.old-deja/g++.pt/ttp52.C * g++.old-deja/g++.robertl/eb103.C * g++.old-deja/g++.robertl/eb121.C * g++.old-deja/g++.robertl/eb22.C * g++.old-deja/g++.robertl/eb8.C: Update locations and/or regexps of dg-error markers. Remove markers for some bogus messages that are no longer issued. libstdc++-v3: * testsuite/20_util/memory/auto_ptr/assign_neg.cc * testsuite/23_containers/map/operators/1_neg.cc * testsuite/23_containers/set/operators/1_neg.cc: Update locations and/or regexps of dg-error markers. From-SVN: r87985
2004-09-23Fix the location of the changelog for Fariborz Jahanian's last patch.Andrew Pinski1-0/+12
From-SVN: r87981
2004-09-23004-09-23 Andrew Pinski <pinskia@physics.uc.edu>Andrew Pinski2-0/+8
PR c++/17618 * cvt.c (cp_convert_to_pointer): Return early when the type is an error_mark_node. From-SVN: r87978
2004-09-23PR c++/9844, PR c++/13989Fariborz Jahanian3-11/+34
PR c++/9844, PR c++/13989 Reviewed by Mark Mitchel. From-SVN: r87971
2004-09-23re PR c++/17596 (expression parser is too slow, should be rewritten)Paolo Bonzini2-312/+227
2004-09-23 Paolo Bonzini <bonzini@gnu.org> PR c++/17596 * parser.c (cp_parser_token_tree_map_node, cp_parser_pm_expression, cp_parser_additive_expression, cp_parser_multiplicative_expression, cp_parser_shift_expression, cp_parser_relational_expression, cp_parser_equality_expression, cp_parser_and_expression, cp_parser_exclusive_or_expression, cp_parser_inclusive_or_expression, cp_parser_logical_and_expression, cp_parser_logical_or_expression): Removed. (enum cp_parser_prec, struct cp_parser_token_tree_map_node, binops, binops_by_token): New. (cp_parser_assignment_expression): Use cp_parser_binary_expression. (cp_parser_new): Initialize binops_by_token. (cp_parser_binary_expression): Rewritten. (N_CP_TTYPES): New. From-SVN: r87942
2004-09-23* parser.c: Fix a comment typo.Kazu Hirata2-1/+5
From-SVN: r87940