summaryrefslogtreecommitdiff
path: root/gcc/cp
Commit message (Collapse)AuthorAgeFilesLines
* Update FSF address.kcook2005-06-2542-82/+86
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101312 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/19317jason2005-06-232-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | Leave the return slot target in the MODIFY_EXPR rather than making it an argument, but only use it if the CALL_EXPR has a flag set. * tree.h (CALL_EXPR_HAS_RETURN_SLOT_ADDR): Rename to CALL_EXPR_RETURN_SLOT_OPT. * calls.c (expand_call): Adjust. * tree-inline.c (expand_call_inline): Adjust. * tree-pretty-print.c (dump_generic_node): Adjust. And set the flag as appropriate. * gimplify.c (gimplify_modify_expr_rhs): Set CALL_EXPR_HAS_RETURN_SLOT_ADDR where the LHS is obviously safe. * tree-nrv.c (execute_return_slot_opt): Set CALL_EXPR_HAS_RETURN_SLOT_ADDR based on escape analysis. * tree-pass.h: Declare pass_return_slot. * tree-optimize.c (init_tree_optimization_passes): Add it. * cp/semantics.c (simplify_aggr_init_expr): Use CALL_EXPR_RETURN_SLOT_OPT, not CALL_EXPR_HAS_RETURN_SLOT_ADDR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101269 138bc75d-0d04-0410-961f-82ee72b054a4
* * pt.c (register_specialization): Remove superfluous assertion.reichelt2005-06-222-5/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101253 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (locate_old_decl): Add format attribute.ghazi2005-06-184-6/+14
| | | | | | | | | | | | | | (implicit_decl_warning): Likewise. cp: * call.c (convert_like_real): Add format attribute. * typeck.c (check_for_casting_away_constness, build_static_cast_1): Likewise. * typeck2.c (readonly_error, cxx_incomplete_type_diagnostic): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101158 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-06-17 Geoffrey Keating <geoffk@apple.com>geoffk2005-06-172-10/+12
| | | | | | | | | | | | | | | | PR c++/17413 * pt.c (type_unification_real): Apply template type deduction even to procedure parameters that are not dependent on a template parameter. Index: testsuite/ChangeLog 2005-06-17 Geoffrey Keating <geoffk@apple.com> PR c++/17413 * g++.dg/template/local5.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101141 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-06-162-4/+10
| | | | | | | | | | | * rtti.c (get_tinfo_decl): Avoid caching tinfo_descs when it might change. (create_pseudo_type_info): First parameter is an int. testsuite: * g++.dg/rtti/crash2.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101011 138bc75d-0d04-0410-961f-82ee72b054a4
* * typeck.c (build_binary_op): Same.aldyh2005-06-152-2/+12
| | | | | | | * testsuite/g++.dg/conversion/simd3.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100977 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-06-152-1/+6
| | | | | | | | | | | | PR c++/20678 * error.c (dump_expr) <COMPONENT_REF case>: Check DECL_NAME is not null. testsuite: PR c++/20678 * g++.dg/other/crash-4.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100972 138bc75d-0d04-0410-961f-82ee72b054a4
* * Make-lang.in: Reformat some long lines.nathan2005-06-156-274/+325
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (gt-cp-rtti.h): New target. (cp/rtti.o): Add dependency. * config-lang.in (gtfiles): Add cp/rtti.c. * cp-tree.h (CPTI_TI_DESC_TYPE, CPTI_BLTN_DESC_TYPE, CPTI_PTR_DESC_TYPE, CPTI_ARY_DESC_TYPE, CPTI_FUNC_DESC_TYPE, CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE, CPTI_VMI_CLASS_DESC_TYPE, CPTI_PTM_DESC_TYPE, CPTI_BASE_DESC_TYPE): Remove. (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node, ary_desc_type_node, func_desc_type_node, enum_desc_type_node, class_desc_type_node, si_class_desc_type_node, vmi_class_desc_type_node, ptm_desc_type_node, base_desc_type_node): Remove. * decl.c: Adjust documentation of global trees. * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL, TINFO_REAL_NAME): Remove. (struct tinfo_s): New. (enum tinfo_kind): New. (tinfo_descs): New. (get_tinfo_decl): Adjust use of tinfo descriptor. (tinfo_base_init, generic_initializer, ptr_initializer, ptm_initializer, class_initializer): Likewise. (get_pseudo_ti_init): Take descriptor index. Adjust. (create_pseudo_type_info): Likewise. (get_pseudo_ti_desc): Return descriptor index. Adjust. (create_tinfo_types): Adjust use of create_pseudo_type_info. (emit_tinfo_decl): Adjust use of tinfo descriptor. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100971 138bc75d-0d04-0410-961f-82ee72b054a4
* Canonicalize whitespace.mrs2005-06-1537-2772/+2788
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100965 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove extra white spacing at end of lines.mrs2005-06-1442-2744/+2745
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100952 138bc75d-0d04-0410-961f-82ee72b054a4
* * decl.c (grokdeclarator): Only check TREE_OVERFLOW on INTEGER_CST.sayle2005-06-142-0/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100936 138bc75d-0d04-0410-961f-82ee72b054a4
* Index: ChangeLoggeoffk2005-06-142-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-06-13 Geoffrey Keating <geoffk@apple.com> * Makefile.in (install-man): Doesn't really depend on installdirs. (various rules for installing manpages): Do depend on installdirs. Index: cp/ChangeLog 2005-06-13 Geoffrey Keating <geoffk@apple.com> * Make-lang.in (c++.install-man): Doesn't really depend on installdirs. (rule for installing g++.1 manpage): Does depend on installdirs. Index: fortran/ChangeLog 2005-06-13 Geoffrey Keating <geoffk@apple.com> * Make-lang.in (fortran.install-man): Doesn't depend on installdirs. (rule for installing f95.1 manpage): Does depend on installdirs. Index: java/ChangeLog 2005-06-13 Geoffrey Keating <geoffk@apple.com> * Make-lang.in (rule for installing gcj.1): Depends on installdirs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100928 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-06-133-33/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PR c++/20789 * decl.c (cp_finish_decl): Clear runtime runtime initialization if in-class decl's initializer is bad. PR c++/21929 * parser.c (struct cp_parser): Document that scope could be error_mark. (cp_parser_diagnose_invalid_type_name): Cope with error_mark for scope. (cp_parser_nested_name_specifier): Return NULL_TREE on error. (cp_parser_postfix_expression): Deal with null or error_mark scope. (cp_parser_elaborated_type_specifier): Adjust cp_parser_nested_name_specifier call. * parser (cp_parser_skip_to_end_of_block_or_statement): Cleanup. testsuite: PR c++/21929 * g++.dg/parse/crash26.C: New. PR c++/20789 * g++.dg/init/member1.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100880 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/21930sayle2005-06-122-9/+8
| | | | | | | | | | * error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types. Treat CONVERT_EXPR identically to NOP_EXPR. * g++.dg/other/error10.C: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100865 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/10611aldyh2005-06-103-7/+41
| | | | | | | | | | | * cvt.c (build_expr_type_conversion): Same. * typeck.c (build_binary_op): Handle vectors. (common_type): Same. (type_after_usual_arithmetic_conversions): Same. * testsuite/g++.dg/conversion/simd2.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100823 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-06-0810-83/+125
| | | | | | | | | | | | | | | | | | | | | | | | | PR c++/19497 * cp-tree.def (USING_DECL): Update documentation. * cp-tree.h (DECL_DEPENDENT_P): New. (USING_DECL_DECLS, USING_DECL_SCOPE): New. * class.c (handle_using_decl): Move most of the processing to ... * name-lookup.c (do_class_using_decl): ... here. Make stricter. (push_using_decl): Use USING_DECL_SCOPE. (cp_emit_debug_info_for_using): Make extern. * cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust. * name-lookup.h (cp_emit_debug_info_for_using): Declare. * pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl when tsubsting. (tsubst_expr): Use USING_DECL_SCOPE. * search.c (lookup_field_1): Use DECL_DEPENDENT_P. * semantics.c (finish_member_declaration): Likewise. testsuite: PR c++/19497 * g++.dg/inherit/using5.C: New. * g++.dg/inherit/using6.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100757 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/19894reichelt2005-06-083-2/+19
| | | | | | | | | | | | | | | * pt.c (tsubst): Reject pointer-to-member of type void. * g++.dg/template/ptrmem15.C: New test. PR c++/20563 * parser.c (cp_parser_label_declaration): Deal with invalid/missing identifiers. * g++.dg/ext/label4.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100754 138bc75d-0d04-0410-961f-82ee72b054a4
* missed entrynathan2005-06-071-0/+7
| | | | | | | | | | | | * cp-tree.def (DEFAULT_ARG): Adjust documentation. * cp-tree.h (DEFARG_INSTANTIATIONS): New. (struct tree_default_arg): Add instantiations member. * parser.c (cp_parser_late_parsing_default_args): Adjust to use a VEC. * pt.c (tsubst_arg_types): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100715 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-tree.def (DEFAULT_ARG): Adjust documentation.nathan2005-06-074-10/+15
| | | | | | | | | | | * cp-tree.h (DEFARG_INSTANTIATIONS): New. (struct tree_default_arg): Add instantiations member. * parser.c (cp_parser_late_parsing_default_args): Adjust to use a VEC. * pt.c (tsubst_arg_types): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100707 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-06-072-1/+9
| | | | | | | | | | * parser.c (cp_parser_late_parsing_default_args): Fix overeager assert in previous patch. testsuite: * g++.dg/parse/defarg10.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100702 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/po/jakub2005-06-062-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exgettext: Handle gmsgid and cmsgid arguments specially, as gcc-internal-format and c-format. Because of xgettext bug, invoke xgettext once with --language=c, once with --language=GCC-source and then merge together. Fail if xgettext is not 0.14.5 or later. gcc/ * intl.h (G_): New macro. * rtl-error.c (error_for_asm, warning_for_asm): Use gmsgid instead of msgid for argument name. * tree-ssa.c (warn_uninit): Likewise. * c-parser.c (c_parser_error): Likewise. * config/rs6000/rs6000-c.c (SYNTAX_ERROR): Likewise. * config/darwin-c.c (BAD): Likewise. * config/c4x/c4x-c.c (BAD): Likewise. * c-pragma.c (GCC_BAD, GCC_BAD2): Likewise. * c-errors.c (pedwarn_c99, pedwarn_c90): Likewise. * c-common.c (c_parse_error): Likewise. * diagnostic.c (diagnostic_set_info, verbatim, inform, warning, warning0, pedwarn, error, sorry, fatal_error, internal_error): Likewise. (fnotice): Use cmsgid instead of msgid for argument name. * gcov.c (fnotice): Likewise. * protoize.c (notice): Likewise. * final.c (output_operand_lossage): Likewise. * gcc.c (fatal, notice): Likewise. (error): Use gmsgid instead of msgid for argument name. * collect2.c (notice, fatal_perror, fatal): Use cmsgid instead of msgid for argument name. (error): Use gmsgid instead of msgid for argument name. * c-decl.c (locate_old_decl, implicit_decl_warning): Use G_() instead of N_(). * c-typeck.c (readonly_error, convert_for_assignment): Likewise. * tree-inline.c (inline_forbidden_p_1): Likewise. * ABOUT-GCC-NLS: Require gettext 0.14.5 or later. Mention the new conventions for marking translations. * doc/install.texi: Mention gettext 0.14.5 or later requirement. gcc/cp/ * error.c (locate_error): Use gmsgid instead of msgid for argument name. (cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise. gcc/java/ * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of msgid for argument name. * gjavah.c (error): Likewise. * java-tree.h (parse_error_context): Likewise. * parse.y (parse_error_context, parse_warning_context, issue_warning_error_from_context): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100676 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-06-064-13/+46
| | | | | | | | | | | | | | PR 21903 * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use. * parser.c (cp_parser_late_parsing_default_args): Propagate parsed argument to any early instantiations. * pt.c (tsubst_arg_types): Chain early instantiation of default arg. testsuite: PR 21903 * g++.dg/parse/defarg9.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100669 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-06-066-28/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | PR c++/20637 * cp-tree.h (add_method): Add using_decl parameter. * class.c (add_method): Add using_decl parameter. Adjust error messages. (handle_using_decl): Pass the using decl to add_method. (clone_function_decl): Adjust add_member calls. * decl2.c (check_classfn): Likewise. * method.c (lazily_declare_fn): Likewise. * semantics.c (finish_member_declaration): Likewise. * method.c (synthesize_method): Use inform, not warning. testsuite: PR c++/20637 * g++.dg/inherit/using4.C: New. * g++.dg/overload/error1.C: Adjust expected errors. * g++.old-deja/g++.benjamin/warn02.C: Likewise. * g++.old-deja/g++.brendan/arm2.C: Likewise. * g++.old-deja/g++.other/redecl2.C: Likewise. * g++.old-deja/g++.other/redecl4.C: Likewise. * g++.old-deja/g++.pt/memtemp78.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100664 138bc75d-0d04-0410-961f-82ee72b054a4
* * config-lang.in (target_libs): Remove target-gperf.hp2005-06-062-1/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100659 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/21619mmitchel2005-06-054-7/+44
| | | | | | | | | | | | | | * cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro. * parser.c (cp_parser_postfix_expression): Allow non-constant expressions as arguments to __builtin_constant_p. * tree.c (builtin_valid_in_constant_expr_p): Use DECL_IS_BUILTIN_CONSTANT_P. PR c++/21619 * g++.dg/ext/builtin9.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100626 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/21853mmitchel2005-06-032-10/+16
| | | | | | | | | | | * typeck.c (casts_away_constness_r): Do not drop cv-qualifiers on the pointed-to type for a pointer-to-member. PR c++/21853 * g++.dg/expr/static_cast6.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100560 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/21336mmitchel2005-06-034-43/+57
| | | | | | | | | | | | | | * cp-tree.h (grok_op_properties): Remove friendp parameter. * decl.c (grokfndecl): Adjust call. (grok_op_properties): Determine the class of which the function is a member by looking at its DECL_CONTEXT, not current_class_type. * pt.c (tsubst_decl): Adjust call to grok_op_properties. PR c++/21336 * g++.dg/template/new2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100541 138bc75d-0d04-0410-961f-82ee72b054a4
* * method.c (synthesize_method): Add addtional arg to warning call.nathan2005-06-022-1/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100511 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-06-025-16/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PR c++/21280 * Make-lang.in (method.o): Add diagnostic.h * decl.c (start_preparsed_function): Use decl's location for file info. * decl2.c (cp_finish_file): Set input_location before synthesizing a function. (mark_used): When deferring a synthesized function, save current location. Do not set function's location when actually synthesizing it. * method.c: #include diagnostic.h. (synthesize_method): Set the functions source location. Show needed location if errors are emitted. testsuite: PR c++/21280 * g++.dg/opt/interface2.h: New. * g++.dg/opt/interface2.C: New. * g++.dg/init/ctor4.C: Adjust error lines. * g++.old-deja/g++.bob/inherit2.C: Likewise. * g++.old-deja/g++.bugs/900205_04.C: Likewise. * g++.old-deja/g++.jason/opeq3.C: Likewise. * g++.old-deja/g++.pt/assign1.C: Likewise. * g++.old-deja/g++.pt/crash20.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100500 138bc75d-0d04-0410-961f-82ee72b054a4
* * decl.c (start_decl): Simplify specialization handling. Removenathan2005-06-023-17/+26
| | | | | | | | unneeded CLASSTYPE_TEMPLATE_INSTANTIATION check. * mangle.c (discriminator_for_local_entity): Use VEC_index. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100488 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-06-022-7/+11
| | | | | | | | | | | PR c++/20350 * decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE. testsuite: PR c++/20350 * g++.dg/template/spec24.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100486 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-06-022-2/+6
| | | | | | | | | | | | PR c++/21151 * name-lookup.c (pushtag): Push local class even in a template. testsuite: PR c++/21151 * g++.dg/pch/local-1.C: New. * g++.dg/pch/local-1.Hs: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100482 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-05-312-1/+7
| | | | | | | | | | | | PR c++/21165 * init.c (integral_constant_value): Check the type of the initializer, not the decl. testsuite: PR c++/21165 * g++.dg/template/init5.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100402 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/21784mmitchel2005-05-302-9/+19
| | | | | | | | | | | * name-lookup.c (do_nonmember_using_decl): Ignore builtin functions, even when the used name is not a function. PR c++/21784 * g++.dg/lookup/using14.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100365 138bc75d-0d04-0410-961f-82ee72b054a4
* * operators.def, optimize.c: Update copyright.kazu2005-05-303-2/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100363 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/21340mmitchel2005-05-292-0/+22
| | | | | | | | | | | * method.c (implicitly_declare_fn): Clear processing_template_decl when generating implicit declaration. PR c++/21340 * g++.dg/init/ctor6.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100306 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/21614mmitchel2005-05-282-7/+22
| | | | | | | | | | | | * typeck.c (get_member_function_from_ptrfunc): Do not attempt conversions to base classes of incomplete types. PR c++/21614 * g++.dg/expr/ptrmem6.C: New test. * g++.dg/expr/ptrmem6a.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100291 138bc75d-0d04-0410-961f-82ee72b054a4
* ./:ian2005-05-283-0/+39
| | | | | | | | | | | | | | | * c-decl.c (add_stmt): Add C frontend specific version. (stmts_are_full_exprs_p): Remove. * c-common.h (STMT_IS_FULL_EXPR_P): Remove. (stmts_are_full_exprs_p): Don't declare. * c-semantics.c (add_stmt): Remove. cp/: * semantics.c (add_stmt): Add C++ frontend specific version. * cp-tree.h (STMT_IS_FULL_EXPR_P): Define. (stmts_are_full_exprs_p): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100289 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.sayle2005-05-2714-16/+65
| | | | | | | | | | | | | | | | | | | | | | | | * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead of CONVERT_EXPR. (cp_parser_unary_expression): Likewise. * typeck.c (build_unary_op): Likewise. * call.c (add_builtin_candidate, build_new_op): Likewise. * error.c (dump_expr): Likewise. * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise. * decl.c (ambi_op_p, grok_op_properties): Likewise. * dump.c (dump_op): Likewise. * lex.c (init_operators): Likewise. * operators.def ("+"): Likewise. * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a conversion, if the result and argument types differ. * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much like a NOP_EXPR when !processing_template_decl. * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype. (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100285 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-05-272-27/+32
| | | | | | | | | | | | PR c++/21455 * typeck.c (get_delta_difference): Cope with incomplete but equal classes. Reorder if. testsuite: PR c++/21455 * g++.dg/inherit/ptrmem3.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100258 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2005-05-272-0/+14
| | | | | | | | | | | | PR c++/21681 * parser.c (cp_parser_late_parsing_for_member): Disable access checking for template functions. testsuite: PR c++/21681 * g++.dg/parse/template16.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100252 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/21768reichelt2005-05-262-4/+9
| | | | | | | | * pt.c (redeclare_class_template): Change error message according to coding conventions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100206 138bc75d-0d04-0410-961f-82ee72b054a4
* * call.c (build_op_delete_call): Fix quoting in error message.reichelt2005-05-262-1/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100201 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libgcj/21692rth2005-05-254-12/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cp/ * cp-tree.h (make_alias_for): Declare. * decl2.c (build_java_method_aliases): New. (cp_finish_file): Call it. * method.c (make_alias_for): Split out from ... (make_alias_for_thunk): ... here. java/ * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H. * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and DECL_CONTEXT; avoid pushdecl_top_level. (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT. (layout_class): Don't SET_DECL_ASSEMBLER_NAME. (layout_class_method): Likewise. * decl.c (java_mark_cni_decl_local): New. (java_mark_class_local): Use it. * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New. (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New. (struct lang_decl_func): Add local_cni; (struct lang_decl_var): Add class_field, vtable. (java_mangle_decl): Declare. * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New. * mangle.c: Remove dup obstack.h; include langhooks-def.h. (mangle_obstack_1): New. (java_mangle_decl): Remove obstack argument. Call mangle_class_field, mangle_vtable, and mangle_local_cni_method_decl. Fall back to lhd_set_decl_assembler_name for things that don't need mangling. (mangle_class_field): Rename from java_mangle_class_field, make static, don't call init_mangling or finish_mangling. (mangle_vtable): Similarly. (mangle_local_cni_method_decl): New. (init_mangling): Remove obstack argument. Use &mangle_obstack_1, gcc_assert, and MANGLE_RAW_STRING. (finish_mangling): Use gcc_assert, remove if 0 debugging code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100171 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/21686reichelt2005-05-252-3/+8
| | | | | | | * semantics.c (finish_id_expression): Fix quoting in error message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100140 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (-Wattributes): New. Default true.dj2005-05-255-13/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/invoke.texi (-Wno-attributes): Document. * attribs.c (decl_attributes): Move warning control from if() to warning(OPT_*). * c-common.c (handle_packed_attribute): Likewise. (handle_nocommon_attribute): Likewise. (handle_common_attribute): Likewise. (handle_noreturn_attribute): Likewise. (handle_noinline_attribute): Likewise. (handle_always_inline_attribute): Likewise. (handle_used_attribute): Likewise. (handle_unused_attribute): Likewise. (handle_const_attribute): Likewise. (handle_transparent_union_attribute): Likewise. (handle_constructor_attribute): Likewise. (handle_destructor_attribute): Likewise. (handle_mode_attribute): Likewise. (handle_alias_attribute): Likewise. (handle_visibility_attribute): Likewise. (handle_tls_model_attribute): Likewise. (handle_malloc_attribute): Likewise. (handle_returns_twice_attribute): Likewise. (handle_pure_attribute): Likewise. (handle_deprecated_attribute): Likewise. (handle_vector_size_attribute): Likewise. (handle_nothrow_attribute): Likewise. (handle_cleanup_attribute): Likewise. (handle_warn_unused_result_attribute): Likewise. (handle_sentinel_attribute): Likewise. * c-decl.c (diagnose_mismatched_decls): Likewise. (start_decl): Likewise. (grokdeclarator): Likewise. (start_function): Likewise. * c-format.c (check_function_format): Likewise. * stor-layout.c (place_field): Likewise. (finalize_record_size): Likewise. * tree.c (handle_dll_attribute)): Likewise. * varasm.c (default_assemble_visibility): Likewise. * config/darwin.c (darwin_handle_weak_import_attribute): Likewise. (darwin_assemble_visibility): Likewise. * config/arc/arc.c (arc_handle_interrupt_attribute): Likewise. * config/arm/arm.c (arm_handle_fndecl_attribute): Likewise. (arm_handle_isr_attribute): Likewise. * config/avr/avr.c (avr_handle_progmem_attribute): Likewise. (avr_handle_fndecl_attribute): Likewise. * config/bfin/bfin.c (handle_int_attribute): Likewise. * config/c4x/c4x.c (c4x_handle_fntype_attribute): Likewise. * config/h8300/h8300.c (h8300_handle_fndecl_attribute): Likewise. (h8300_handle_eightbit_data_attribute): Likewise. (h8300_handle_tiny_data_attribute): Likewise. * config/i386/i386.c (ix86_handle_cdecl_attribute): Likewise. (ix86_handle_regparm_attribute): Likewise. (ix86_handle_struct_attribute): Likewise. * config/i386/winnt.c (ix86_handle_shared_attribute): Likewise. (i386_pe_encode_section_info): Likewise. * config/ia64/ia64.c (ia64_handle_model_attribute): Likewise. * config/ip2k/ip2k.c (ip2k_handle_progmem_attribute): Likewise. (ip2k_handle_fndecl_attribute): Likewise. * config/m32r/m32r.c (m32r_handle_model_attribute): Likewise. * config/m68hc11/m68hc11 (m68hc11_handle_page0_attribute): Likewise. (m68hc11_handle_fntype_attribute): Likewise. (m68hc11_encode_section_info): Likewise. * config/m68k/m68k.c (m68k_handle_fndecl_attribute): Likewise. * config/mcore/mcore.c (mcore_handle_naked_attribute): Likewise. * config/ns32k/ns32k.c (ns32k_handle_fntype_attribute): Likewise. * config/rs6000/rs6000.c (rs6000_handle_longcall_attribute): Likewise. * config/sh/sh.c (sh_handle_interrupt_handler_attribute): Likewise. (sh_handle_sp_switch_attribute): Likewise. (sh_handle_trap_exit_attribute): Likewise. * config/sh/symbian.c (sh_symbian_dllimport_p): Likewise. (sh_symbian_handle_dll_attribute): Likewise. * config/stormy16/stormy16.c (xstormy16_handle_interrupt_attribute): Likewise. (xstormy16_handle_below100_attribute): Likewise. * config/v850/v850.c (v850_handle_interrupt_attribute): Likewise. [testsuite] * gcc.dg/Wattributes-1.c: New. * gcc.dg/Wattributes-2.c: New. * gcc.dg/Wattributes-3.c: New. [cp] * decl.c (duplicate_decls): Move warning control from if() to warning(OPT_*). * name-lookup.c (parse_using_directive): Likewise. * parser.c (cp_parser_elaborated_type_specifier): Likewise. (cp_parser_init_declarator): Likewise. * tree.c (handle_com_interface_attribute): Likewise. [java] * class.c (set_constant_value): Move warning control from if() to warning(OPT_*). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100136 138bc75d-0d04-0410-961f-82ee72b054a4
* * class.c (layout_class_type): Do not issue C++ ABI warningsmrs2005-05-246-66/+72
| | | | | | | | | | | | | | | | | | | | for ObjC structs. * decl.c (objc_mark_locals_volatile): Streamline by calling objc_volatilize_decl(). * parser.c (cp_parser_objc_message_expression): Allow simple type specifiers (instead of merely type names) as message receivers. * pt.c (template_args_equal): Do not call objc_comptypes(). * typeck.c (composite_pointer_type): If both pointers are ObjC-esque, arbitrarily choose the first; do not call objc_comptypes(). (comptypes): Do not call objc_comptypes(). (convert_for_assignment): Call objc_compare_types(). (comp_ptr_ttypes_real): Call objc_type_quals_match() before concluding that types do not match. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100125 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-05-24 Andrew Pinski <pinskia@physics.uc.edu>pinskia2005-05-242-0/+7
| | | | | | | | | | | | | | PR C++/21645 * g++.dg/init/ctor5.C: New test. 2005-05-24 Andrew Pinski <pinskia@physics.uc.edu> PR C++/21645 * optimize.c (update_cloned_parm): Copy the TYPE also from the original one. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100106 138bc75d-0d04-0410-961f-82ee72b054a4
* tweak commentjason2005-05-231-9/+12
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100088 138bc75d-0d04-0410-961f-82ee72b054a4