1169689Skan2004-12-31 Richard Henderson <rth@redhat.com> 2169689Skan 3169689Skan PR middle-end/17799 4169689Skan * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P. 5169689Skan * class.c (build_vtable): Don't conditionallize setting it 6169689Skan based on DWARF2_DEBUG. 7169689Skan (layout_class_type): Set DECL_IGNORED_P. 8169689Skan * decl2.c (get_guard): Likewise. 9169689Skan * rtti.c (get_tinfo_decl, build_lang_decl): Likewise. 10169689Skan * tree.c (build_local_temp): Likewise. 11169689Skan 12169689Skan2004-12-30 Mark Mitchell <mark@codesourcery.com> 13169689Skan 14169689Skan * cp-tree.h (cp_declarator): Split "name" field into 15169689Skan qualifying_scope and unqualified_name. 16169689Skan * decl.c (get_scope_of_declarator): Adjust accordingly. 17169689Skan (grokdeclarator): Likewise. 18169689Skan * decl2.c (grokfield): Likewise, and adjust call to 19169689Skan do_class_using_decl. 20169689Skan * name-lookup.c (do_class_using_decl): Split "decl" into 21169689Skan "scope" and "name". Remove unnecessary code. 22169689Skan * name-lookup.h (do_class_using_decl): Adjust declaration. 23169689Skan * parser.c (make_id_declarator): Split "id" into qualifying_scope 24169689Skan and unqualified_name. 25169689Skan (cp_parser_using_declaration): Adjust call to do_class_using_decl. 26169689Skan (cp_parser_direct_declarator): Adjust to handle the fact that 27169689Skan cp_parser_declarator_id no longer returns a SCOPE_REF. 28169689Skan (cp_parser_direct_declarator): Likewise. 29169689Skan (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified 30169689Skan names. 31169689Skan (cp_parser_member_declaration): Adjust call to make_id_declarator. 32169689Skan (cp_parser_check_declarator_template_parameters): Do not expect a 33169689Skan SCOPE_REF. 34169689Skan 35169689Skan * decl.c (duplicate_decls): Call ggc_free on declarations we will 36169689Skan not be needing any longer. 37169689Skan 38169689Skan PR c++/19190 39169689Skan * cvt.c (convert_to_void): Do not use STRIP_NOPs. 40169689Skan 41169689Skan2004-12-28 Richard Henderson <rth@redhat.com> 42169689Skan 43169689Skan PR inline-asm/15740 44169689Skan * semantics.c (finish_asm_stmt): Resolve asm names. Validate input 45169689Skan constraints. Mark memory inputs addressable. 46169689Skan 47169689Skan2004-12-27 Jason Merrill <jason@redhat.com> 48169689Skan 49169689Skan * decl.c (expand_static_init): Don't use shortcut if 50169689Skan targetm.relaxed_ordering. 51169689Skan 52169689Skan2004-12-27 Mark Mitchell <mark@codesourcery.com> 53169689Skan 54169689Skan PR c++/19149 55169689Skan * decl.c (check_tag_decl): Robustify. 56169689Skan 57169689Skan2004-12-23 Mark Mitchell <mark@codesourcery.com> 58169689Skan 59169689Skan PR c++/17595 60169689Skan * parser.c (cp_parser_error): Issue better messages about 61169689Skan #pragma in locations where it is not permitted. 62169689Skan 63169689Skan PR c++/17413 64169689Skan * pt.c (check_instantiated_args): Remove bogus SFINAE code. 65169689Skan 66169689Skan * cvt.c (convert_to_void): Fix typo in comment. 67169689Skan 68169689Skan2004-12-23 Alexandre Oliva <aoliva@redhat.com> 69169689Skan 70169689Skan PR c++/18962 71169689Skan * pt.c (check_explicit_specialization): Use the argument list from 72169689Skan the definition in a template function specialization definition. 73169689Skan 74169689Skan2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org> 75169689Skan 76169689Skan PR c++/18733 77169689Skan * pt.c (check_explicit_specialization): Use special logic to validate 78169689Skan befriended specializations. 79169689Skan 80169689Skan2004-12-22 Mark Mitchell <mark@codesourcery.com> 81169689Skan 82169689Skan * rtti.c (emit_support_tinfos): Avoid using C99 semantics. 83169689Skan 84169689Skan PR c++/18464 85169689Skan * call.c (build_this): In templates, do not bother with 86169689Skan build_unary_op. 87169689Skan * typeck.c (unary_complex_lvalue): In a template, always refuse 88169689Skan simplifications. 89169689Skan 90169689Skan PR c++/18492 91169689Skan * cp-gimplify.c (cp_genericize): Relax assertion. 92169689Skan 93169689Skan PR c++/11224 94169689Skan * cvt.c (convert_to_void): Warn about unused values. 95169689Skan 96169689Skan PR c++/18257 97169689Skan * rtti.c (emit_support_tinfos): On systems without weak symbols, 98169689Skan emit the runtime library type-info objects as non-COMDAT. 99169689Skan 100169689Skan2004-12-21 Mark Mitchell <mark@codesourcery.com> 101169689Skan 102169689Skan PR c++/18378 103169689Skan * call.c (convert_like_real): Do not permit the use of a copy 104169689Skan constructor to copy a packed field. 105169689Skan 106169689Skan PR c++/19063 107169689Skan * decl.c (grokdeclarator): Return error_mark_node, not 108169689Skan void_type_node, to indicate errors. 109169689Skan * parser.c (cp_parser_template_parameter_list): Robustify. 110169689Skan (cp_parser_template_parameter): Likewise. 111169689Skan 112169689Skan PR c++/19034 113169689Skan * tree.c (cp_tree_equal): Handle OVERLOAD. 114169689Skan 115169689Skan2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 116169689Skan 117169689Skan * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN. 118169689Skan * name-lookup.c (pushdecl_class_level): Likewise. 119169689Skan 120169689Skan2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 121169689Skan 122169689Skan * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN. 123169689Skan 124169689Skan2004-12-21 Andrew Pinski <pinskia@physics.uc.edu> 125169689Skan 126169689Skan PR c++/18984 127169689Skan * cp-gimplify.c (cp_genericize_r): Don't insert first but instead 128169689Skan check to see if contains the pointer. Insert the statement before 129169689Skan returning. 130169689Skan 131169689Skan2004-12-21 Nathan Sidwell <nathan@codesourcery.com> 132169689Skan 133169689Skan PR c++/14075 134169689Skan * decl.c (check_initializer): Check string initializer of array is 135169689Skan not parenthesized. 136169689Skan * cp-tree.h (PAREN_STRING_LITERAL_P): New. 137169689Skan * semantics.c (finish_parenthesized_expr): Mark a STRING_CST. 138169689Skan * error.c (dump_expr): <STRING_CST case> Add parens, if needed. 139169689Skan 140169689Skan * cp-tree.def (TEMPLATE_TYPE_PARM, 141169689Skan BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder 142169689Skan for better code efficiency. 143169689Skan * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check. 144169689Skan (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization. 145169689Skan (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P, 146169689Skan INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P, 147169689Skan CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P, 148169689Skan TYPE_PTROBV_P): Likewise. 149169689Skan 150169689Skan PR c++/18975 151169689Skan * method.c (do_build_copy_constructor): Refactor. Don't const 152169689Skan qualify a mutable field. 153169689Skan (do_build_assign_ref): Likewise. 154169689Skan 155169689Skan2004-12-20 Matt Austern <austern@apple.com> 156169689Skan 157169689Skan PR c++/19044 158169689Skan * decl.c (make_rtl_for_nonlocal_decl): Use 159169689Skan set_builtin_user_assembler_name. 160169689Skan 161169689Skan2004-12-19 Mark Mitchell <mark@codesourcery.com> 162169689Skan 163169689Skan * cp-tree.h (note_decl_for_pch): New function. 164169689Skan * class.c (build_clone): Call note_decl_for_pch. 165169689Skan * semantics.c (finish_member_declaration): Likewise. 166169689Skan (note_decl_for_pch): New function. 167169689Skan 168169689Skan2004-12-17 Steven Bosscher <stevenb@suse.de> 169169689Skan 170169689Skan * init.c (build_zero_init): max_index is the number of 171169689Skan elements, minus 1. 172169689Skan 173169689Skan2004-12-17 Nathan Sidwell <nathan@codesourcery.com> 174169689Skan 175169689Skan PR c++/18721 176169689Skan * class.c (add_method): Do not push conversion operators into a 177169689Skan binding level. 178169689Skan 179169689Skan * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat. 180169689Skan * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces. 181169689Skan 182169689Skan2004-12-16 Nathan Sidwell <nathan@codesourcery.com> 183169689Skan 184169689Skan PR c++/18905 185169689Skan * cp-tree.h (integral_constant_value): Declare. 186169689Skan * call.c (null_ptr_cst_p): Use integral_constant_value, not 187169689Skan decl_constant_value. 188169689Skan (convert_like_real): Likewise. 189169689Skan * class.c (check_bitfield_decl): Likewise. 190169689Skan * cvt.c (ocp_convert): Likewise. 191169689Skan (convert): Remove unnecessary decl_constant_value call. 192169689Skan * decl.c (compute_array_index_type): Use integral_constant_value, 193169689Skan not decl_constant_value. 194169689Skan (build_enumerator): Likewise. 195169689Skan * decl2.c (grokfield): Likewise. 196169689Skan * init.c (decl_constant_value): Simplify. 197169689Skan (integral_constant_value): New. 198169689Skan * pt.c (fold_decl_constant_value): Use integral_constant_value, 199169689Skan remove subsequent check. 200169689Skan (tsubst): Use integral_constant_value, not decl_constant_value. 201169689Skan (tsubst_copy, unify): Likewise. 202169689Skan * typeck.c (decay_conversion): Likewise. 203169689Skan (build_compound_expr): Remove unnecessary decl_constant_value 204169689Skan calls. 205169689Skan (build_static_cast_1, build_reinterpret_cast_1): 206169689Skan (convert_for_assignment): Remove comment about not calling 207169689Skan decl_constant_value. 208169689Skan 209169689Skan2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 210169689Skan 211169689Skan PR c++/18825 212169689Skan * pt.c (instantiate_class_template): Set input_location for 213169689Skan friend function. 214169689Skan (tsubst_friend_function): Don't set input_location here. 215169689Skan Make sure the context is complete if necessary. 216169689Skan 217169689Skan2004-12-15 Nathan Sidwell <nathan@codesourcery.com> 218169689Skan 219169689Skan PR c++/18981 220169689Skan * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE 221169689Skan flag setting. 222169689Skan 223169689Skan2004-12-14 Mark Mitchell <mark@codesourcery.com> 224169689Skan 225169689Skan PR c++/18738 226169689Skan * decl.c (make_typename_type): Do not handle namespace-scoped 227169689Skan names here. 228169689Skan (tag_name): Handle typename_type. 229169689Skan (check_elaborated_type_specifier): Handle typenames. 230169689Skan * parser.c (cp_parser_diagnose_invalid_type_name): Improve 231169689Skan comment. 232169689Skan (cp_parser_elaborated_type_specifier): Use 233169689Skan cp_parser_diagnose_invalid_type_name. 234169689Skan 235169689Skan2004-12-14 Andrew Pinski <pinskia@physics.uc.edu> 236169689Skan 237169689Skan PR c++/18965 238169689Skan * init.c (build_zero_init): If the max_index is 0, there is no 239169689Skan need to create a RANGE_EXPR. 240169689Skan 241169689Skan2004-12-14 Mark Mitchell <mark@codesourcery.com> 242169689Skan 243169689Skan PR c++/18793 244169689Skan * cp-objcp-common.c (cp_expr_size): Loosen assertion. 245169689Skan 246169689Skan2004-12-14 Nathan Sidwell <nathan@codesourcery.com> 247169689Skan 248169689Skan PR c++/18949 249169689Skan * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a 250169689Skan REFERENCE_REF_P is dereferencing a reference type. 251169689Skan * typeck.c (build_static_cast): Convert from reference even in a 252169689Skan template. 253169689Skan (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise. 254169689Skan 255169689Skan2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 256169689Skan 257169689Skan * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function. 258169689Skan (cp_parser_name_lookup_error): Use it. 259169689Skan (cp_parser_check_for_invalid_template_id): Likewise. 260169689Skan (cp_parser_skip_to_closing_parenthesis): Likewise. 261169689Skan (cp_parser_nested_name_specifier_opt): Likewise. 262169689Skan (cp_parser_simple_declaration, cp_parser_template_id): Likewise. 263169689Skan (cp_parser_parameter_declaration_list): Likewise. 264169689Skan (cp_parser_parameter_declaration): Likewise. 265169689Skan (cp_parser_template_name): Let cp_parser_simulate_error perform 266169689Skan the checking. 267169689Skan (cp_parser_committed_to_tentative_parse): Remove. 268169689Skan 269169689Skan2004-12-13 Andrew Pinski <pinskia@physics.uc.edu> 270169689Skan 271169689Skan PR c++/18968 272169689Skan * class.c (build_base_path): Convert the zero constant to the correct 273169689Skan type when comparing. 274169689Skan 275169689Skan2004-12-13 Mark Mitchell <mark@codesourcery.com> 276169689Skan 277169689Skan PR c++/18925 278169689Skan * class.c (layout_class_type): Determine the visibility of static 279169689Skan data members. 280169689Skan 281169689Skan2004-12-12 Roger Sayle <roger@eyesopen.com> 282169689Skan 283169689Skan PR middle-end/12454 284169689Skan * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the 285169689Skan condition is a constant and the unexecuted clause is empty. 286169689Skan 287169689Skan2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 288169689Skan 289169689Skan PR c++/18731 290169689Skan * parser.c (cp_parser_class_head): Reject typedef-name in class head. 291169689Skan 292169689Skan2004-12-09 Matt Austern <austern@apple.com> 293169689Skan 294169689Skan PR c++/18514 295169689Skan * name-lookup.c (do_nonmember_using_decl): A real function 296169689Skan declaration takes precedence over an anticipated declaration. 297169689Skan 298169689Skan2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 299169689Skan 300169689Skan * parser.c (cp_parser_member_declaration): Fix comment typo. 301169689Skan 302169689Skan2004-12-09 Alexandre Oliva <aoliva@redhat.com> 303169689Skan 304169689Skan PR c++/18757 305169689Skan * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID 306169689Skan if parsing failed. 307169689Skan 308169689Skan2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 309169689Skan 310169689Skan PR c++/18073 311169689Skan * typeck.c (build_reinterpret_cast_1): Allow cast from vector type. 312169689Skan 313169689Skan2004-12-09 Nathan Sidwell <nathan@codesourcery.com> 314169689Skan 315169689Skan PR c++/16681 316169689Skan * init.c (build_zero_init): Build a RANGE_EXPR for an array 317169689Skan initializer. 318169689Skan 319169689Skan2004-12-08 Kelley Cook <kcook@gcc.gnu.org> 320169689Skan 321169689Skan * typeck.c: Remove DOS line endings. 322169689Skan 323169689Skan2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 324169689Skan 325169689Skan PR c++/18100 326169689Skan * decl.c (lookup_and_check_tag): Diagnose nested class with 327169689Skan the same name as enclosing class. 328169689Skan 329169689Skan2004-12-08 Nathan Sidwell <nathan@codesourcery.com> 330169689Skan 331169689Skan PR c++/18803 332169689Skan * cp-tree.h (REFERENCE_REF_P): New. 333169689Skan (CPTI_TYPE_INFO_TYPE): Rename to ... 334169689Skan (CPTI_CONST_TYPE_INFO_TYPE): ... here. 335169689Skan (CPTI_TYPE_INFO_REF_TYPE): Remove. 336169689Skan (type_info_type_node): Rename to ... 337169689Skan (const_type_info_type_node): ... here. 338169689Skan (type_info_ref_type): Remove. 339169689Skan * call.c (build_user_type_conversion): Reformat. 340169689Skan (resolve_args): Do not convert_from_reference. 341169689Skan (build_object_call): Call convert_from_reference. 342169689Skan (prep_operand): Do not convert_from_reference. 343169689Skan (build_new_method_call): Likewise. 344169689Skan * class.c (build_vfield_ref): Likewise. 345169689Skan * cvt.c (convert_to_reference): Likewise. 346169689Skan (convert_from_reference): Build INDIRECT_REF here, not with 347169689Skan build_indirect_ref. 348169689Skan (convert_force): Do not convert_from_reference. 349169689Skan (build_expr_type_conversion): Likewise. 350169689Skan * decl.c (grok_reference_init): Likewise. 351169689Skan * decl2.c (delete_sanity): Likewise. 352169689Skan * except.c (initialize_handler_parm): Use POINTER_TYPE_P. 353169689Skan * init.c (build_dtor_call): Do not convert_from_reference. 354169689Skan * parser.c (cp_parser_template_argument): Unwrap indirected 355169689Skan reference. Allow TEMPLATE_PARM_INDEX as an object parm. 356169689Skan * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use 357169689Skan convert_from_reference, if indicated. 358169689Skan <case CALL_EXPR>: Do not convert_from_reference. 359169689Skan <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed. 360169689Skan (tsubst_initializer_list): Do not convert_from_reference. 361169689Skan * rtti.c (init_rtti_processing): Adjust node creation. 362169689Skan (throw_bad_typeid): Use const_type_info_type_node. 363169689Skan Do not convert_from_reference. 364169689Skan (typeid_ok_p): Use const_type_info_type_node. 365169689Skan (build_typeid, get_typeid): Always return type_info typed node. 366169689Skan (build_dynamic_cast_1): Dont convert_from_reference. Refactor. 367169689Skan * semantics.c (finish_stmt_expr_expr): Do not 368169689Skan convert_from_reference. 369169689Skan (finish_id_expression): Convert_from_reference as appropriate. 370169689Skan * typeck.c (decay_conversion): Do not convert_from_reference. 371169689Skan (finish_class_member_access_expr): Likewise. 372169689Skan (build_indirect_ref): Use POINTER_TYPE_P. 373169689Skan (convert_arguments): Do not convert_from_reference. 374169689Skan (build_modify_expr): Likewise. 375169689Skan (convert_for_initialization): Likewise. 376169689Skan * typeck2.c (build_x_arrow): Likewise. 377169689Skan 378169689Skan2004-12-07 Ziemowit Laski <zlaski@apple.com> 379169689Skan 380169689Skan * cp-tree.h (struct lang_type_class): Rename 'objc_protocols' 381169689Skan field to 'objc_info'. 382169689Skan 383169689Skan2004-12-07 Kazu Hirata <kazu@cs.umass.edu> 384169689Skan 385169689Skan * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH. 386169689Skan 387169689Skan2004-12-07 Roger Sayle <roger@eyesopen.com> 388169689Skan 389169689Skan * name-lookup.c (leave_scope): We only need to update 390169689Skan class_binding_level when leaving a class scope. 391169689Skan 392169689Skan2004-12-06 Ziemowit Laski <zlaski@apple.com> 393169689Skan 394169689Skan * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field. 395169689Skan 396169689Skan2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 397169689Skan 398169689Skan PR c++/17011, c++/17971 399169689Skan * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose 400169689Skan invalid field. 401169689Skan (tsubst_copy_and_build) <COMPONENT_REF case>: Check 402169689Skan error_mark_node after member substitution. 403169689Skan * semantics.c (finish_id_expression): Call 404169689Skan finish_non_static_data_member for non-dependent FIELD_DECL. 405169689Skan 406169689Skan2004-12-03 Nathan Sidwell <nathan@codesourcery.com> 407169689Skan 408169689Skan PR c++/18782 409169689Skan * decl.c (grokdeclarator): Make sure class in pointer to member is 410169689Skan not a namespace. 411169689Skan 412169689Skan2004-12-02 Nathan Sidwell <nathan@codesourcery.com> 413169689Skan 414169689Skan PR c++/18318 415169689Skan * parser.c (cp_parser_new_type_id): Move array size expression 416169689Skan checks from here ... 417169689Skan * init.c (build_new): ... to here. 418169689Skan 419169689Skan2004-12-02 Nathan Sidwell <nathan@codesourcery.com> 420169689Skan 421169689Skan PR c++/18758 422169689Skan * parser.c (cp_parser_class_head): Return NULL_TREE when 423169689Skan push_template_decl fails. Update comment. 424169689Skan 425169689Skan2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 426169689Skan 427169689Skan PR c++/15664, c++/18276 428169689Skan * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly 429169689Skan tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM. 430169689Skan 431169689Skan2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 432169689Skan 433169689Skan PR c++/18123 434169689Skan * parser.c (cp_parser_type_specifier): Catch template declaration 435169689Skan of enum. 436169689Skan 437169689Skan2004-12-01 Matt Austern <austern@apple.com> 438169689Skan 439169689Skan * name-lookup.c (namespace_binding): Omit alias check for global 440169689Skan namespace. 441169689Skan 442169689Skan2004-12-01 Nathan Sidwell <nathan@codesourcery.com> 443169689Skan 444169689Skan PR c++/18729 445169689Skan * parser.c (cp_parser_class_name): Check decl's type is not 446169689Skan error_mark_node. 447169689Skan 448169689Skan PR c++/17431 449169689Skan * call.c (standard_conversion): Add FLAGS parameter. Do not allow 450169689Skan derived to base conversion when checking constructor 451169689Skan accessibility. 452169689Skan (implicit_conversion): Pass FLAGS to standard_conversion. 453169689Skan (check_constructir_callable): Disallow conversion functions. 454169689Skan 455169689Skan2004-11-30 Kazu Hirata <kazu@cs.umass.edu> 456169689Skan 457169689Skan * parser.c: Fix comment typos. 458169689Skan 459169689Skan2004-11-27 Mark Mitchell <mark@codesourcery.com> 460169689Skan 461169689Skan PR c++/18368 462169689Skan * parser.c (cp_parser_check_for_definition_in_return_type): Take 463169689Skan the defined type as a parameter, and inform the user about the 464169689Skan possibility of a missing semicolon. 465169689Skan (cp_parser_explicit_instantiation): Adjust call to 466169689Skan cp_parser_check_for_definition_in_return_type. 467169689Skan (cp_parser_init_declarator): Likewise. 468169689Skan (cp_parser_member_declaration): Likewise. 469169689Skan 470169689Skan PR c++/18674 471169689Skan * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit 472169689Skan typename from comments. 473169689Skan * cp-tree.h (TYPENAME_IS_ENUM_P): New macro. 474169689Skan (TYPENAME_IS_CLASS_P): Likewise. 475169689Skan (make_typename_type): Change prototype. 476169689Skan * decl.c (struct_typename_info): New type. 477169689Skan (typename_compare): Expect the second argument to be a 478169689Skan typename_info, not a tree. 479169689Skan (build_typename_type): Add tag_type parameter. Do not create a 480169689Skan new type until necessary. 481169689Skan (make_typename_type): Add tag_type parameter. 482169689Skan * error.c (TYPENAME_TYPE): Print tags other than "typename" if 483169689Skan appropriate. 484169689Skan * friend.c (make_friend_class): Adjust call to make_typename_type. 485169689Skan * parser.c (cp_parser_make_typename_type): Likewise. 486169689Skan (cp_parser_primary_expression): Adjust call to 487169689Skan cp_parser_lookup_name. 488169689Skan (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name. 489169689Skan (cp_parser_class_or_namespace_name): Likewise. 490169689Skan (cp_parser_postfix_expression): Adjust calls to 491169689Skan make_typename_type. 492169689Skan (cp_parser_mem_initializer_id): Adjust calls to 493169689Skan cp_parser_class_name. 494169689Skan (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name. 495169689Skan (cp_parser_template_name): Likewise. 496169689Skan (cp_parser_template_argument): Likewise. 497169689Skan (cp_parser_type_name): Adjust call to cp_parser_class_name. 498169689Skan (cp_parser_elaborated_type_specifier): Adjust calls to 499169689Skan make_typename_type and cp_parser_lookup_name. 500169689Skan (cp_parser_namespace_name): Likewise. 501169689Skan (cp_parser_class_name): Replace type_p parameter with tag_type. 502169689Skan Adjust calls to make_typename_type and cp_parser_lookup_name. 503169689Skan (cp_parser_class_head): Adjust calls to cp_parser_class_name. 504169689Skan (cp_parser_base_specifier): Likewise. 505169689Skan (cp_parser_lookup_name): Replace is_type parameter with tag_type. 506169689Skan Adjust calls to make_typename_type and lookup_qualified_name. 507169689Skan (cp_parser_lookup_name_simple): Adjust call to 508169689Skan cp_parser_lookup_name. 509169689Skan (cp_parser_constructor_declarator_p): Adjust call to 510169689Skan cp_parser_class_name. 511169689Skan * pt.c (convert_template_argument): Adjust all to 512169689Skan make_typename_type. 513169689Skan (tsubst_decl): Do not pre-substitute the type of the declaration. 514169689Skan (tsubst): Hand off declarations more quickly. Adjust call to 515169689Skan make_typename_type. 516169689Skan 517169689Skan PR c++/18512 518169689Skan * parser.c (cp_parser_postfix_dot_deref_expression): Robustify. 519169689Skan 520169689Skan2004-11-29 Daniel Jacobowitz <dan@codesourcery.com> 521169689Skan 522169689Skan PR c/7544 523169689Skan * Make-lang.in (cp/decl2.o): Update dependencies. 524169689Skan * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks. 525169689Skan 526169689Skan2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 527169689Skan 528169689Skan PR c++/18652 529169689Skan * name-lookup.c (pushtag): Change return type to tree. 530169689Skan * cp-tree.h (pushtag): Adjust declaration. 531169689Skan * decl.c (xref_tag, start_enum): Use return value of pushtag. 532169689Skan * pt.c (push_template_decl_real): Return immediately if 533169689Skan pushdecl_namespace_level returns error_mark_node. 534169689Skan 535169689Skan2004-11-27 Kazu Hirata <kazu@cs.umass.edu> 536169689Skan 537169689Skan * pt.c: Fix a comment typo. 538169689Skan 539169689Skan2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 540169689Skan 541169689Skan Friend class name lookup 4/n 542169689Skan * class.c (pushclass): Don't call cxx_remember_type_decls. 543169689Skan * cp-tree.h (clear_anon_tags): Remove declaration. 544169689Skan * decl.c (grokdeclarator): Don't call lookup_tag_reverse. 545169689Skan * name-lookup.c (binding_entry_free, binding_table_free): Comment 546169689Skan out functions. 547169689Skan (binding_table_find_anon_type, binding_table_reverse_maybe_remap, 548169689Skan binding_table_remove_anonymous_types, cxx_remember_type_decls, 549169689Skan bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag, 550169689Skan lookup_tag_reverse): Remove 551169689Skan (begin_scope, leave_scope, kept_level_p, print_binding_level): 552169689Skan Don't use type_decls field in cp_binding_level. 553169689Skan (maybe_process_template_type_declaration, pushtag): Set 554169689Skan CLASSTYPE_NESTED_UTDS directly. 555169689Skan * name-lookup.h (binding_table_remove_anonymous_types, 556169689Skan cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove 557169689Skan declaration. 558169689Skan (cp_binding_level): Remove type_decls field. 559169689Skan 560169689Skan2004-11-26 Kazu Hirata <kazu@cs.umass.edu> 561169689Skan 562169689Skan * typeck.c: Fix a comment typo. 563169689Skan 564169689Skan2004-11-25 Mark Mitchell <mark@codesourcery.com> 565169689Skan 566169689Skan PR c++/18445 567169689Skan * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with 568169689Skan unknown_type as non matching. Tidy up. 569169689Skan * pt.c (build_non_dependent_expr): Do not build a 570169689Skan NON_DEPENDENT_EXPR for a VAR_DECL. 571169689Skan 572169689Skan PR c++/18001 573169689Skan * cp-tree.h (lvalue_or_else): Remove declaration. 574169689Skan * tree.c (lvalue_or_else): Remove. 575169689Skan * typeck.c (build_unary_op): Adjust call to lvalue_or_else. 576169689Skan (build_modify_expr): Likewise. 577169689Skan 578169689Skan PR c++/18625 579169689Skan * decl.c (duplicate_decls): Return error_mark_node on error, as 580169689Skan specified. 581169689Skan 582169689Skan PR c++/18466 583169689Skan * decl.c (grokvardecl): Keep track of whether or not a there was 584169689Skan explicit qualification. 585169689Skan * name-lookup.c (set_decl_namespace): Complain about explicit 586169689Skan qualification of a name within its own namespace. 587169689Skan 588169689Skan PR c++/18545 589169689Skan * typeck.c (check_return_expr): Robustify. 590169689Skan 591169689Skan2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 592169689Skan 593169689Skan Friend class name lookup 3/n, PR c++/3332 594169689Skan * name-lookup.c (push_inner_scope, pop_inner_scope): New functions. 595169689Skan (lookup_type_scope): Don't deal with name from user declaration 596169689Skan specially. 597169689Skan * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations. 598169689Skan * parser.c (cp_parser_class_specifier): Use push_inner_scope and 599169689Skan pop_inner_scope. 600169689Skan 601169689Skan2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 602169689Skan 603169689Skan Friend class name lookup 2/n, PR c++/14513, c++/15410 604169689Skan * name-lookup.c (lookup_name_real): Simplify. 605169689Skan (lookup_type_scope): Add SCOPE parameter. Handle friend class 606169689Skan lookup. 607169689Skan * name-lookup.h (tag_scope): New enum type. 608169689Skan (lookup_type_scope): Adjust declaration. 609169689Skan * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type): 610169689Skan Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE. 611169689Skan (start_enum): Likewise. Add assertion test that NAME is 612169689Skan IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in 613169689Skan case of error. 614169689Skan * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations. 615169689Skan * parser.c (cp_parser_elaborated_type_specifier, 616169689Skan cp_parser_class_head): Adjust call to xref_tag. 617169689Skan * pt.c (lookup_template_class, instantiate_class_template): 618169689Skan Likewise. 619169689Skan * rtti.c (init_rtti_processing, build_dynamic_cast_1, 620169689Skan tinfo_base_init, emit_support_tinfos): Likewise. 621169689Skan 622169689Skan2004-11-25 Joseph S. Myers <joseph@codesourcery.com> 623169689Skan 624169689Skan * g++spec.c, lex.c: Avoid ` as left quote in diagnostics. 625169689Skan 626169689Skan2004-11-24 Mark Mitchell <mark@codesourcery.com> 627169689Skan 628169689Skan PR c++/17473 629169689Skan * name-lookup.c (supplement_binding): Do not allow typedefs to be 630169689Skan redefined in class scope. 631169689Skan 632169689Skan PR c++/18285 633169689Skan * parser.c (cp_parser_set_decl_type_spec): Do not try to allow 634169689Skan redefinitions of builtin types other that "bool" or "wchar_t". 635169689Skan 636169689Skan2004-11-24 Steven Bosscher <stevenb@suse.de> 637169689Skan 638169689Skan * decl.c (cxx_init_decl_processing): Don't clear 639169689Skan flag_inline_functions. 640169689Skan 641169689Skan2004-11-24 Mark Mitchell <mark@codesourcery.com> 642169689Skan 643169689Skan * pt.c (tsubst_function_type): Do not permit function types which 644169689Skan return arrays or functions. 645169689Skan 646169689Skan PR c++/18586 647169689Skan * parser.c (cp_parser_init_declarator): Do not pop scope twice. 648169689Skan 649169689Skan PR c++/18530 650169689Skan * cp-tree.h (CTOR_NAME): Remove. 651169689Skan (DTOR_NAME): Remove. 652169689Skan * decl.c (initialize_predefined_identifiers): Add spaces to the 653169689Skan end of constructor and destructor names. 654169689Skan 655169689Skan2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org> 656169689Skan 657169689Skan PR c++/8929 658169689Skan * decl.c (start_decl): Check for invalid specialization headers. 659169689Skan 660169689Skan2004-11-24 Paolo Bonzini <bonzini@gnu.org> 661169689Skan 662169689Skan PR c++/16882 663169689Skan 664169689Skan * call.c (standard_conversion): Move check for conversions between 665169689Skan vector pointers... 666169689Skan * typeck.c (ptr_reasonably_similar): ... here. 667169689Skan 668169689Skan2004-11-23 Ben Elliston <bje@au.ibm.com> 669169689Skan 670169689Skan * cp-tree.h (context_as_string): Remove extern. 671169689Skan * error.c (context_as_string): Remove. 672169689Skan 673169689Skan * cp-tree.h (cp_type_qual_from_rid): Remove extern. 674169689Skan * lex.c (cp_type_qual_from_rid): Remove. 675169689Skan 676169689Skan * cp-tree.h (do_poplevel): Remove extern. 677169689Skan (check_multiple_declarators): Likewise. 678169689Skan * semantics.c (do_poplevel): Make static. 679169689Skan (check_multiple_declarators): Remove. 680169689Skan 681169689Skan * cp-tree.h (check_final_overrider): Remove extern. 682169689Skan * search.c (check_final_overrider): Make static. 683169689Skan 684169689Skan * cp-tree.h (build_artificial_parm): Remove extern. 685169689Skan * decl2.c (build_artificial_parm): Make static. 686169689Skan 687169689Skan2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org> 688169689Skan 689169689Skan PR c++/18354 690169689Skan * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code. 691169689Skan Make sure the result is always a rvalue. 692169689Skan 693169689Skan2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org> 694169689Skan 695169689Skan * decl.c (start_preparsed_function): Call check_function_type even 696169689Skan in templates. 697169689Skan (require_complete_types_for_parms): Skip dependent types. 698169689Skan (check_function_type): Likewise. 699169689Skan 700169689Skan2004-11-16 Steven Bosscher <stevenb@suse.de> 701169689Skan 702169689Skan * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h. 703169689Skan * search.c: Don't include it. 704169689Skan 705169689Skan2004-11-15 Andrew Pinski <pinskia@physics.uc.edu> 706169689Skan 707169689Skan * cp-gimplify.c: Include pointer-set.h 708169689Skan (cp_genericize_r): Use pointer_sets instead of a hashtable. 709169689Skan Also instert the new statement for CLEANUP_STMT. 710169689Skan (cp_genericize): Use pointer_sets instead of a hashtable. 711169689Skan * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h. 712169689Skan 713169689Skan2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 714169689Skan 715169689Skan Friend class name lookup 1/n, PR c++/18471 716169689Skan * decl.c (lookup_and_check_tag): New function. 717169689Skan (xref_tag, start_enum): Use it. 718169689Skan (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check 719169689Skan before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared 720169689Skan location. 721169689Skan * name-lookup.c (lookup_name_current_level): Rename to ... 722169689Skan (lookup_name_innermost_nonclass_level): ... this. 723169689Skan (lookup_type_scope): New function. 724169689Skan * name-lookup.h (lookup_name_current_level): Rename to ... 725169689Skan (lookup_name_innermost_nonclass_level): ... this. 726169689Skan (lookup_type_scope): Add declaration. 727169689Skan 728169689Skan2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 729169689Skan 730169689Skan PR c++/17344 731169689Skan * pt.c (coerce_template_parms): Only emit error message about 732169689Skan invalid template argument when TF_ERROR. 733169689Skan 734169689Skan2004-11-12 Mark Mitchell <mark@codesourcery.com> 735169689Skan 736169689Skan PR c++/18389 737169689Skan * decl.c (start_decl): Make sure to set *pop_scope_p. Return 738169689Skan error_mark_node to indicate errors. 739169689Skan 740169689Skan PR c++/18429 741169689Skan * parser.c (cp_parser_direct_declarator): Disallow non-constant 742169689Skan array bounds when not inside a function. 743169689Skan 744169689Skan PR c++/18436 745169689Skan * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an 746169689Skan unqualified name resolves to a member function. 747169689Skan 748169689Skan PR c++/18407 749169689Skan * pt.c (tsubst_copy_and_build): Handle qualified names used from a 750169689Skan derived class correctly. 751169689Skan 752169689Skan * decl2.c (import_export_decl): Fix typo in comment. 753169689Skan * tree.c (pod_type_p): Likewise. 754169689Skan 755169689Skan2004-11-10 Andrew Pinski <pinskia@physics.uc.edu> 756169689Skan 757169689Skan * typeck.c (cxx_mark_addressable): Add braces around the first if. 758169689Skan 759169689Skan2004-11-10 Adam Nemet <anemet@lnxw.com> 760169689Skan 761169689Skan PR middle-end/18160 762169689Skan * typeck.c (cxx_mark_addressable): Issue an error if address of an 763169689Skan explicit register variable is requested. 764169689Skan 765169689Skan2004-11-10 Nathan Sidwell <nathan@codesourcery.com> 766169689Skan 767169689Skan PR c++/18143 768169689Skan * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New. 769169689Skan (struct lang_decl_flags): Add thunk_p flag. 770169689Skan (struct lang_decl): Remove separate fixed_offset. Place 771169689Skan cloned_function and fixed_offset into union. 772169689Skan (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust. 773169689Skan (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust. 774169689Skan (THUNK_FIXED_OFFSET): Adjust. 775169689Skan * method.c (make_thunk): Adjust. 776169689Skan 777169689Skan2004-11-09 Mark Mitchell <mark@codesourcery.com> 778169689Skan 779169689Skan PR c++/18369 780169689Skan * init.c (build_new_1): Handle parenthesized type-ids that name an 781169689Skan array type. Tidy. 782169689Skan 783169689Skan2004-11-09 Joseph S. Myers <joseph@codesourcery.com> 784169689Skan 785169689Skan * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c, 786169689Skan pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for 787169689Skan quoting in diagnostics. 788169689Skan * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for 789169689Skan quoting in printf format. 790169689Skan * decl.c (duplicate_decls, start_decl): Use %qD instead of 791169689Skan unquoted %D. 792169689Skan 793169689Skan2004-11-08 Kazu Hirata <kazu@cs.umass.edu> 794169689Skan 795169689Skan * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c, 796169689Skan search.c, typeck2.c: Fix comment formatting. 797169689Skan 798169689Skan2004-11-04 Ulrich Weigand <uweigand@de.ibm.com> 799169689Skan 800169689Skan PR tree-optimization/18184 801169689Skan * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers 802169689Skan of different modes or alias-all flags as equivalent. 803169689Skan * typeck.c (comptypes): Likewise. 804169689Skan 805169689Skan2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org> 806169689Skan 807169689Skan DR 49, 100 808169689Skan * cp-tree.h (TYPE_REF_OBJ_P): New macro. 809169689Skan (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P, 810169689Skan TYPE_REFFN_P): Document. 811169689Skan (fold_decl_constant_value): New prototype. 812169689Skan * pt.c (convert_nontype_argument_function): Rewrite and extract 813169689Skan parts into... 814169689Skan (fold_decl_constant_value, convert_nontype_argument_function): New. 815169689Skan (lookup_template_class): Add comment about useless double call. 816169689Skan * mangle.c (write_expression): Strip conversions before lowering 817169689Skan pointer to members. 818169689Skan * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow 819169689Skan enum to enum conversion. 820169689Skan 821169689Skan2004-11-02 Mark Mitchell <mark@codesourcery.com> 822169689Skan 823169689Skan PR c++/18124 824169689Skan * parser.c (cp_parser_type_parameter): Robustify. 825169689Skan 826169689Skan PR c++/18155 827169689Skan * parser.c (cp_parser_single_declaration): Disallow template 828169689Skan typedefs. 829169689Skan 830169689Skan PR c++/18177 831169689Skan * typeck.c (build_const_cast): Use error_operand_p. 832169689Skan 833169689Skan2004-11-02 Ziemowit Laski <zlaski@apple.com> 834169689Skan 835169689Skan * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition. 836169689Skan (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h. 837169689Skan * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here 838169689Skan from cp-lang.c. 839169689Skan * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here 840169689Skan from cp-lang.c. 841169689Skan (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c. 842169689Skan 843169689Skan2004-11-01 Nathan Sidwell <nathan@codesourcery.com> 844169689Skan 845169689Skan PR c++/18064 846169689Skan * search.c (check_final_overrider): Deprecate gnu covariant extension. 847169689Skan 848169689Skan2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net> 849169689Skan 850169689Skan Convert diagnostics to use quoting flag q 9/n 851169689Skan * typeck.c (build_x_unary_op, convert_member_func_to_ptr, 852169689Skan get_delta_difference): Use new quotation style. 853169689Skan * repo.c (reopen_repo_file_for_write): Likewise. 854169689Skan * pt.c (do_type_instantiation): Likewise. 855169689Skan * parser.c (cp_parser_diagnose_invalid_type_name): 856169689Skan * name-lookup.c (push_overloaded_decl, set_decl_namespace): 857169689Skan * error.c (cp_print_error_function, 858169689Skan print_instantiation_full_context): Likewise. 859169689Skan * decl.c (define_label, grok_reference_init, 860169689Skan maybe_deduce_size_from_array_init, revert_static_member_fn): 861169689Skan * decl2.c (check_classfn): Likewise. 862169689Skan * class.c (add_method, check_field_decls, layout_class_type, 863169689Skan resolve_address_of_overloaded_function): Likewise. 864169689Skan * call.c (build_x_va_arg, build_over_call): Likewise. 865169689Skan 866169689Skan2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net> 867169689Skan 868169689Skan Convert diagnostics to use quoting flag q 8/n 869169689Skan * cvt.c (cp_convert_to_pointer, warn_ref_binding, 870169689Skan convert_to_reference, ocp_convert, convert_to_void 871169689Skan cp_convert_to_pointer): Use new quotation style. 872169689Skan 873169689Skan2004-10-31 Mark Mitchell <mark@codesourcery.com> 874169689Skan 875169689Skan PR c++/15172 876169689Skan * typeck2.c (store_init_value): Use split_nonconstant_init even 877169689Skan for types that require construction. 878169689Skan 879169689Skan1004-10-28 Matt Austern <austern@apple.com> 880169689Skan 881169689Skan PR c++/17542 882169689Skan * cp-tree.h (class_key_or_enum_as_string): Declare. 883169689Skan * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string 884169689Skan and remove static qualifier. 885169689Skan * decl.c (shadow_tag): Warn about ignored attributes in class/struct/ 886169689Skan union/enum declaration. 887169689Skan 888169689Skan2004-10-29 Kazu Hirata <kazu@cs.umass.edu> 889169689Skan 890169689Skan * pt.c: Fix a comment typo. 891169689Skan 892169689Skan2004-10-28 Nathan Sidwell <nathan@codesourcery.com> 893169689Skan 894169689Skan * typeck.c (composite_pointer_type): Remove comment about DR 195. 895169689Skan (build_reinterpret_cast_1): Revert DR195 patch. Only emit a 896169689Skan warning when being pedantic. 897169689Skan (build_reinterpet_cast, build_c_cast): Adjust. 898169689Skan 899169689Skan2004-10-29 Mark Mitchell <mark@codesourcery.com> 900169689Skan 901169689Skan PR c++/17695 902169689Skan * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they 903169689Skan appear in a constructor/destructor that will be cloned. 904169689Skan 905169689Skan1004-10-28 Matt Austern <austern@apple.com> 906169689Skan 907169689Skan PR c++/14124 908169689Skan * decl.c (finish_enum): Handle packed attribute. 909169689Skan * parser.c (cp_parser_enum_specifier): Process trailing attributes. 910169689Skan 911169689Skan2004-10-28 Mark Mitchell <mark@codesourcery.com> 912169689Skan 913169689Skan PR c++/17132 914169689Skan * pt.c (instantiate_class_template): Increment 915169689Skan processing_template_decl when substituting into a member class 916169689Skan template. 917169689Skan 918169689Skan2004-10-27 Mark Mitchell <mark@codesourcery.com> 919169689Skan 920169689Skan PR c++/17435 921169689Skan * call.c (convert_like_real): Fix formatting. 922169689Skan (initialize_reference): When binding a temporary to a base class, 923169689Skan ensure that the nominal copy made is to the derived class, not the 924169689Skan base class. 925169689Skan 926169689Skan PR c++/18140 927169689Skan * parser.c (cp_parser_next_token_ends_template_argument_p): Do not 928169689Skan include ">>". 929169689Skan 930169689Skan2004-10-27 Andrew Pinski <pinskia@physics.uc.edu> 931169689Skan 932169689Skan * decl.c (bad_specifiers): Move the q after the %. 933169689Skan 934169689Skan2004-10-27 Andrew Pinski <pinskia@physics.uc.edu> 935169689Skan 936169689Skan * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after 937169689Skan the %. 938169689Skan 939169689Skan2004-10-26 Mark Mitchell <mark@codesourcery.com> 940169689Skan 941169689Skan * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT. 942169689Skan * search.c (current_scope): Fix prototype. 943169689Skan 944169689Skan PR c++/18093 945169689Skan * search.c (current_scope): Return the innermost non-block scope, 946169689Skan not the innermost non-block, non-namespace scope. 947169689Skan (at_namespace_scope_p): Adjust accordingly. 948169689Skan (dfs_accessible_post): Do not pass namespaces to is_friend. 949169689Skan (dfs_walk_once_accessible_r): Likewise. 950169689Skan * decl.c (grokvardecl): Adjust call to current_scope. 951169689Skan (build_enumerator): Likewise. 952169689Skan * parser.c (cp_parser_using_declaration): Likewise. 953169689Skan (cp_parser_direct_declarator): Use at_namespace_scope_p instead of 954169689Skan current_scope. 955169689Skan (cp_parser_class_head): Adjust call to current_scope. 956169689Skan * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the 957169689Skan alias. 958169689Skan 959169689Skan PR c++/18020 960169689Skan * pt.c (tusbst_copy_and_build): Resolve enumeration constants to 961169689Skan their underlying values. 962169689Skan 963169689Skan PR c++/18161 964169689Skan * typeck.c (build_binary_op): Honor build_type, even when in a 965169689Skan template. 966169689Skan 967169689Skan2004-10-26 Nathan Sidwell <nathan@codesourcery.com> 968169689Skan 969169689Skan * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded 970169689Skan padding token checking. 971169689Skan 972169689Skan2004-10-25 Andrew Pinski <pinskia@physics.uc.edu> 973169689Skan 974169689Skan PR c++/18121 975169689Skan * decl.c (grokdeclarator) <case cdk_array>: Remove the call 976169689Skan layout_type as it is already done by create_array_type_for_decl. 977169689Skan 978169689Skan2004-10-22 Nathan Sidwell <nathan@codesourcery.com> 979169689Skan 980169689Skan PR c++/18095 981169689Skan * parser.c (eof_token): Make const, correctly initialize rid and 982169689Skan location fields. 983169689Skan (struct cp_lexer): Replace buffer_end pointer with buffer_length 984169689Skan count. Adjust. 985169689Skan (cp_lexer_new_main): Directly grow lexer's buffer here. Don't 986169689Skan zero it out. 987169689Skan (cp_lexer_new_from_tokens): Adjust. 988169689Skan (cp_lexer_grow_buffer): Remove. 989169689Skan (cp_lexer_peek_nth_token, cp_lexer_consume_token, 990169689Skan cp_lexer_purge_token): Add const casts. 991169689Skan 992169689Skan2004-10-21 Mark Mitchell <mark@codesourcery.com> 993169689Skan 994169689Skan PR c++/18073 995169689Skan PR c++/10841 996169689Skan * cp-tree.h (convert_to_base): Change prototype. 997169689Skan (build_ptrmemfunc): Likewise. 998169689Skan (convert_ptrmem): New function. 999169689Skan * call.c (struct conversion): Adjust documentation for base_p. 1000169689Skan (standard_conversion): Set base_p for ck_pmem conversions as 1001169689Skan appropriate. 1002169689Skan (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr 1003169689Skan conversions. 1004169689Skan * class.c (convert_to_base): Handle both pointers and objects. 1005169689Skan Add nonnull parameter. 1006169689Skan (build_vfield_ref): Adjust call to convert_to_base. 1007169689Skan * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc. 1008169689Skan (convert_force): Likewise. 1009169689Skan * typeck.c (build_unary_op): Likewise. 1010169689Skan (convert_ptrmem): New function. 1011169689Skan (build_static_cast_1): Use it. 1012169689Skan (build_reinterpret_cast): Allow conversions to vector types. 1013169689Skan (get_delta_difference): Add c_cast_p parameter. 1014169689Skan (build_ptrmemfunc): Likewise. Adjust calls to 1015169689Skan get_delta_difference. 1016169689Skan 1017169689Skan2004-10-21 Andrew Pinski <pinskia@physics.uc.edu> 1018169689Skan 1019169689Skan PR c++/13560 1020169689Skan * error.c (cp_error_at): Output the context as it might be 1021169689Skan different file as the other location. 1022169689Skan 1023169689Skan2004-10-21 Kazu Hirata <kazu@cs.umass.edu> 1024169689Skan 1025169689Skan * typeck.c: Fix a comment typo. 1026169689Skan 1027169689Skan2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1028169689Skan 1029169689Skan PR c++/13495 1030169689Skan * decl.c (make_unbound_class_template): Add PARM_LIST parameter. 1031169689Skan * cp-tree.h (make_unbound_class_template): Adjust prototype. 1032169689Skan * parser.c (cp_parser_lookup_name): Adjust call to 1033169689Skan make_unbound_class_template. 1034169689Skan (cp_parser_single_declaration): Handle member class of class 1035169689Skan template as template friend parsing correctly. 1036169689Skan * friend.c (is_friend): Call is_specialization_of_friend for 1037169689Skan template friend class. 1038169689Skan (make_friend_class): Handle member class of class template as 1039169689Skan template friend. 1040169689Skan * pt.c (is_specialization_of_friend): Likewise. 1041169689Skan (instantiate_class_template): Likewise. 1042169689Skan (tsubst): Adjust call to make_unbound_class_template. 1043169689Skan 1044169689Skan2004-10-20 Nathan Sidwell <nathan@codesourcery.com> 1045169689Skan 1046169689Skan * typeck.c (composite_pointer_type): Add comment about DR 195 1047169689Skan (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter. 1048169689Skan Allow function pointer conversions that DR195 suggests. 1049169689Skan (build_reinterpret_cast, build_c_cast): Update 1050169689Skan build_reinterpret_cast_1 calls. 1051169689Skan 1052169689Skan2004-10-20 Kazu Hirata <kazu@cs.umass.edu> 1053169689Skan 1054169689Skan * call.c, typeck.c: Fix comment typos. 1055169689Skan 1056169689Skan2004-10-20 Nathan Sidwell <nathan@codesourcery.com> 1057169689Skan 1058169689Skan * parser.c (cp_token_position): New typedef. Define VEC thereof. 1059169689Skan (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make 1060169689Skan next_token and last_token cp_token_position. Make saved_tokens a 1061169689Skan VEC(cp_token_position). 1062169689Skan (eof_token): New static variable. 1063169689Skan (CP_SAVED_TOKENS_SIZE): Rename to ... 1064169689Skan (CP_SAVED_TOKEN_STACK): ... here. 1065169689Skan (cp_lexer_new_main): Adjust main lexer creation and buffer 1066169689Skan filling. 1067169689Skan (cp_lexer_new_from_tokens): Do not copy the tokens, merely point 1068169689Skan to the parent buffer. Do not append eof token. 1069169689Skan (cp_lexer_destroy): Only free buffer if non-NULL. Free token 1070169689Skan stack. 1071169689Skan (cp_lexer_next_token, cp_lexer_prev_token): Remove. 1072169689Skan (cp_lexer_token_position, cp_lexer_token_at): New. 1073169689Skan (cp_lexer_saving_tokens): Adjust. Make inline. 1074169689Skan (cp_lexer_advance_token, cp_lexer_token_difference): Remove. 1075169689Skan (cp_lexer_peek_token_emit_debug_info): Fold into ... 1076169689Skan (cp_lexer_peek_token): ... here. 1077169689Skan (cp_lexer_peek_nth_token): Don't peek past EOF. 1078169689Skan (cp_lexer_consume_token): Set next_token to eof_token, if reaching 1079169689Skan EOF. 1080169689Skan (cp_lexer_purge_token): Adjust eof setting. 1081169689Skan (cp_lexer_purge_tokens_after): Likewise. 1082169689Skan (cp_lexer_save_tokens): Push next_token directly. 1083169689Skan (cp_lexer_commit_tokens): Adjust. 1084169689Skan (cp_lexer_rollback_tokens): Pop next_token directly. 1085169689Skan (cp_parser_check_for_invalid_template_id): Adjust token purging. 1086169689Skan (cp_parser_translation_unit): Do not consume the EOF. 1087169689Skan (cp_parser_nested_name_specifier_opt): Adjust token purging. 1088169689Skan (cp_parser_template_id, cp_parser_template_name): Likewise. 1089169689Skan 1090169689Skan2004-10-19 Mark Mitchell <mark@codesourcery.com> 1091169689Skan 1092169689Skan PR c++/14035 1093169689Skan * call.c (struct conversion): Add base_p. 1094169689Skan (convert_like): Add c_cast_p argument. 1095169689Skan (convert_like_with_conversion): Likewise. 1096169689Skan (build_conv): Clear base_p. 1097169689Skan (standard_conversion): Set it, for derived-to-base conversions. 1098169689Skan (convert_like_real): Add c_cast_p parameter. Handle pointer 1099169689Skan conversions directly rather than relying on ocp_convert. 1100169689Skan (perform_direct_initialization_if_possible): Add c_cast_p 1101169689Skan parameter. 1102169689Skan * cp-tree.h (perform_direct_initialization_if_possible): Change 1103169689Skan prototype. 1104169689Skan (convert_member_func_to_ptr): New function. 1105169689Skan * typeck.c (check_for_casting_away_constness): Add diag_fn 1106169689Skan parameter. 1107169689Skan (build_static_cast_1): New function, split out from ... 1108169689Skan (build_static_cast): ... here. Use build_static_cast_1. 1109169689Skan (build_reinterpret_cast_1): New function, split out from ... 1110169689Skan (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1. 1111169689Skan (build_const_cast_1): New function, split out from ... 1112169689Skan (build_const_cast): ... here. Use build_const_cast_1. 1113169689Skan (build_c_cast): Rewrite to use build_const_cast_1, 1114169689Skan build_static_cast_1, and build_reinterpret_cast_1. 1115169689Skan (convert_member_func_to_ptr): New function. 1116169689Skan 1117169689Skan2004-10-19 Paolo Bonzini <bonzini@gnu.org> 1118169689Skan 1119169689Skan PR c++/18047 1120169689Skan * parser.c (enum cp_parser_prec): Give relational expressions 1121169689Skan a higher precedence than equality expressions. 1122169689Skan 1123169689Skan2004-10-15 Nathan Sidwell <nathan@codesourcery.com> 1124169689Skan 1125169689Skan * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call. 1126169689Skan (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove. 1127169689Skan (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call. 1128169689Skan (enum base_access): Reorganize. 1129169689Skan (accessible_base_p, accessible_p): Add consider_local_p parameter. 1130169689Skan * call.c (standard_conversion): Update comment about 1131169689Skan DERIVED_FROM_P. 1132169689Skan (enforce_access): Adjust accessible_p call. 1133169689Skan (build_over_call): Adjust accessible_base_p call. 1134169689Skan * class.c (convert_to_base): Adjust lookup_base call. 1135169689Skan (build_vtbl_ref_1): Likewise. 1136169689Skan (warn_about_ambiguous_bases): Likewise. Add early exit. 1137169689Skan * cvt.c (convert_to_pointer_force) Adjust lookup_base call. 1138169689Skan * search.c (accessible_base_p): Add consider_local_p parameter. 1139169689Skan (lookup_base): Pass consider_local_p to accessible_base_p call. 1140169689Skan (friend_accessible_p): Check whether scope is a class member. 1141169689Skan Remove unnecessary class template check. 1142169689Skan (accessible_p): Add consider_local_p parameter. Use it. 1143169689Skan (adjust_result_of_qualified_name_lookup): Adjust lookup_base call. 1144169689Skan * tree.c (maybe_dummy_object): Likewise. 1145169689Skan * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P. 1146169689Skan (build_class_member_access_expr): Adjust lookup_base call. 1147169689Skan * typeck2.c (binfo_or_else): Likewise. 1148169689Skan * rtti.c (build_dynamic_cast_1): Access can consider friendship 1149169689Skan and current scope. 1150169689Skan 1151169689Skan2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org> 1152169689Skan 1153169689Skan PR c++/17743 1154169689Skan * decl2.c (grokfield): Apply attributes also to TYPE_DECLs. 1155169689Skan 1156169689Skan2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org> 1157169689Skan 1158169689Skan PR c++/10479 1159169689Skan * parser.c (cp_parser_parenthesized_expression_list): Fold 1160169689Skan non-dependent expressions in attribute lists. 1161169689Skan 1162169689Skan2004-10-15 Mark Mitchell <mark@codesourcery.com> 1163169689Skan 1164169689Skan PR c++/17042 1165169689Skan * decl.c (declare_global_var): Use the return value from pushdecl. 1166169689Skan 1167169689Skan PR c++/14667 1168169689Skan * parser.c (cp_parser_simple_declaration): Do not diagnose invalid 1169169689Skan type names if we have already found a valid type. 1170169689Skan (cp_parser_member_declaration): Likewise. 1171169689Skan 1172169689Skan PR c++/17916 1173169689Skan * parser.c (cp_parser_member_specification_opt): Handle 1174169689Skan CPP_PRAGMA. 1175169689Skan 1176169689Skan2004-10-15 Kazu Hirata <kazu@cs.umass.edu> 1177169689Skan 1178169689Skan * dump.c, g++spec.c, repo.c: Update copyright. 1179169689Skan 1180169689Skan2004-10-15 Kazu Hirata <kazu@cs.umass.edu> 1181169689Skan 1182169689Skan * decl.c: Fix a comment typo. 1183169689Skan 1184169689Skan2004-10-13 Andrew Pinski <pinskia@physics.uc.edu> 1185169689Skan 1186169689Skan PR c++/16301 1187169689Skan * name-lookup.c (parse_using_directive): If we have a 1188169689Skan error_mark_node, do not set the decl namespace associations 1189169689Skan on it. 1190169689Skan 1191169689Skan2004-10-14 Mark Mitchell <mark@codesourcery.com> 1192169689Skan 1193169689Skan PR c++/17976 1194169689Skan * decl.c (cp_finish_decl): Do not call expand_static_init more 1195169689Skan than once for a single variable. 1196169689Skan 1197169689Skan2004-10-14 Matt Austern <austern@apple.com> 1198169689Skan 1199169689Skan * Make-lang.in (pt.o): depends on pointer-set.h 1200169689Skan * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now. 1201169689Skan * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t 1202169689Skan (for_each_template_parm): Convert from htab_t to pointer_set_t. 1203169689Skan * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now. 1204169689Skan 1205169689Skan2004-10-13 Andrew Pinski <pinskia@physics.uc.edu> 1206169689Skan 1207169689Skan PR c++/17661 1208169689Skan * semantics.c (finish_for_expr): Convert expression to void 1209169689Skan so that we don't create temporaries for a?b:c. 1210169689Skan 1211169689Skan2004-10-13 Kazu Hirata <kazu@cs.umass.edu> 1212169689Skan 1213169689Skan * search.c: Fix a comment typo. 1214169689Skan 1215169689Skan2004-10-12 Nathan Sidwell <nathan@codesourcery.com> 1216169689Skan 1217169689Skan * class.c (dfs_modify_vtables): Simplify condition. Return 1218169689Skan dfs_skip_bases as appropriate. 1219169689Skan (modify_all_vtables): Walk in pre-order. 1220169689Skan * search.c (dfs_walk_all, dfs_walk_once_r, 1221169689Skan dfs_walk_once_accessible_r): Assert post order function never 1222169689Skan returns dfs_skip_bases. 1223169689Skan 1224169689Skan * search.c (struct lookup_base_data_s): New. 1225169689Skan (lookup_base_r): Replace with ... 1226169689Skan (dfs_lookup_base): ... this. 1227169689Skan (lookup_base): Use dfs_walk_all. 1228169689Skan 1229169689Skan2004-10-12 Kazu Hirata <kazu@cs.umass.edu> 1230169689Skan 1231169689Skan * search.c: Fix comment typos. 1232169689Skan 1233169689Skan2004-10-11 Mark Mitchell <mark@codesourcery.com> 1234169689Skan 1235169689Skan PR c++/15786 1236169689Skan * parser.c (cp_parser_declarator): Add member_p parameter. 1237169689Skan (cp_parser_condition): Adjust calls to cp_parser_declarator. 1238169689Skan (cp_parser_explicit_instantiation): Likewise. 1239169689Skan (cp_parser_init_declarator): Likewise. 1240169689Skan (cp_parser_direct_declarator): Add member_p parameter. Do not 1241169689Skan parse tentatively when parsing the parameters to a member. 1242169689Skan (cp_parser_type_id): Adjust calls to cp_parser_declarator. 1243169689Skan (cp_parser_parameter_declaration): Likewise. 1244169689Skan (cp_parser_member_declaration): Likewise. 1245169689Skan (cp_parser_exception_declaration): Likewise. 1246169689Skan 1247169689Skan PR c++/17936 1248169689Skan * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment. 1249169689Skan * pt.c (optimize_specialization_lookup_p): Do not optimize lookups 1250169689Skan for members of partial or explicit specializations. 1251169689Skan 1252169689Skan PR c++/17929 1253169689Skan * decl2.c (finish_anon_union): Robustify. 1254169689Skan 1255169689Skan2004-10-11 Nathan Sidwell <nathan@codesourcery.com> 1256169689Skan 1257169689Skan * cp-tree.h (get_dynamic_cast_base_type): Rename to ... 1258169689Skan (dcast_base_hint): ... here. 1259169689Skan * rtti.c (build_dynamic_cast_1): Use dcast_base_hint. 1260169689Skan * search.c (struct dcast_data_s): New. 1261169689Skan (dynamic_cast_base_recurse): Remove. Replace with ... 1262169689Skan (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New. 1263169689Skan (get_dynamic_cast_base_type): Rename to ... 1264169689Skan (dcast_base_hint): ... here. Use dfs_walk_once_accessible. 1265169689Skan (accessible_r): Remove. 1266169689Skan (dfs_accessible_post): New, broken out of accessible_r. 1267169689Skan (accessible_p): Use dfs_walk_once_accessible. 1268169689Skan (dfs_walk_once_accessible_r): New. From accessible_r. 1269169689Skan (dfs_walk_once_accessible): New. From acessible_p. 1270169689Skan 1271169689Skan * cp-tree.h (SAME_BINFO_TYPE_P): New. 1272169689Skan * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare 1273169689Skan binfo types. 1274169689Skan (convert_to_base_statically, determine_primary_bases, 1275169689Skan update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits, 1276169689Skan dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group, 1277169689Skan accumulate_vtbl_inits, dfs_accumulate_vtbl_inits, 1278169689Skan build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise. 1279169689Skan * init.c (expand_member_init): Likewise. 1280169689Skan * search.c (lookup_base_r, dynamic_cast_base_recurse, 1281169689Skan binfo_via_virtual, copied_binfo, binfo_for_vbase, 1282169689Skan original_binfo): Likewise. 1283169689Skan * tree.c (copy_binfo): Likewise. 1284169689Skan 1285169689Skan2004-10-11 Kazu Hirata <kazu@cs.umass.edu> 1286169689Skan 1287169689Skan * semantics.c: Fix comment typos. 1288169689Skan 1289169689Skan2004-10-10 Andrew Pinski <pinskia@physics.uc.edu> 1290169689Skan 1291169689Skan PR c++/17554 1292169689Skan part of c++/17657 1293169689Skan middle-end/17703 1294169689Skan * semantics.c (maybe_cleanup_point_expr): Call 1295169689Skan fold_build_cleanup_point_expr. 1296169689Skan (maybe_cleanup_point_expr_void): New function. 1297169689Skan (add_decl_expr): Call maybe_cleanup_point_expr_void. 1298169689Skan (finish_expr_stmt): Likewise. 1299169689Skan (finish_return_stmt): Likewise. 1300169689Skan (finish_for_expr): Likewise. 1301169689Skan (finish_asm_stmt): Likewise. 1302169689Skan * typeck.c (condition_conversion): Call 1303169689Skan fold_build_cleanup_point_expr. 1304169689Skan 1305169689Skan2004-10-10 Andrew Pinski <pinskia@physics.uc.edu> 1306169689Skan 1307169689Skan PR c++/17907 1308169689Skan * semantics.c (add_decl_expr): If the decl has a size which 1309169689Skan has side effects then the decl expression needs a cleanup point. 1310169689Skan 1311169689Skan2004-10-10 Mark Mitchell <mark@codesourcery.com> 1312169689Skan 1313169689Skan PR c++/17393 1314169689Skan * decl.c (grokdeclarator): Robustify error-recovery on invalid 1315169689Skan declarations. 1316169689Skan 1317169689Skan2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net> 1318169689Skan 1319169689Skan Convert diagnostics to use quoting flag q 7/n 1320169689Skan * typeck.c (composite_pointer_type_r, composite_pointer_type, 1321169689Skan cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr, 1322169689Skan string_conv_p, build_class_member_access_expr, 1323169689Skan build_class_member_access_expr, lookup_destructor, 1324169689Skan finish_class_member_access_expr, build_indirect_ref, 1325169689Skan get_member_function_from_ptrfunc, build_function_call, 1326169689Skan convert_arguments, build_binary_op, pointer_diff, build_unary_op, 1327169689Skan check_for_casting_away_constness, build_static_cast, 1328169689Skan build_reinterpret_cast, build_const_cast, build_c_cast, 1329169689Skan build_modify_expr, get_delta_difference, build_ptrmemfunc, 1330169689Skan dubious_conversion_warnings, convert_for_assignment, 1331169689Skan convert_for_initialization, 1332169689Skan maybe_warn_about_returning_address_of_local, check_return_expr): 1333169689Skan Use quoting marks. 1334169689Skan 1335169689Skan * typeck2.c (error_not_base_type, readonly_error, 1336169689Skan abstract_virtuals_error, cxx_incomplete_type_diagnostic, 1337169689Skan store_init_value, digest_init, build_x_arrow, 1338169689Skan build_m_component_ref, require_complete_eh_spec_types): Likewise. 1339169689Skan 1340169689Skan * tree.c (cp_build_qualified_type_real, 1341169689Skan handle_java_interface_attribute, handle_init_priority_attribute): 1342169689Skan Likewise. 1343169689Skan 1344169689Skan * semantics.c (finish_asm_stmt, finish_non_static_data_member, 1345169689Skan finish_pseudo_destructor_expr, 1346169689Skan check_template_template_default_arg, begin_class_definition, 1347169689Skan finish_base_specifier, qualified_name_lookup_error, 1348169689Skan finish_id_expression, finish_typeof): Likewise. 1349169689Skan 1350169689Skan * search.c (lookup_base, check_final_overrider, 1351169689Skan look_for_overrides_r): Likewise. 1352169689Skan 1353169689Skan * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise. 1354169689Skan 1355169689Skan2004-10-09 Mark Mitchell <mark@codesourcery.com> 1356169689Skan 1357169689Skan PR c++/17867 1358169689Skan * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a 1359169689Skan constructor. 1360169689Skan 1361169689Skan PR c++/17670 1362169689Skan * init.c (build_new): Correct comments. 1363169689Skan * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in 1364169689Skan the non-array case. 1365169689Skan 1366169689Skan PR c++/17821 1367169689Skan * parser.c (cp_parser_postfix_dot_deref_expression): If the 1368169689Skan pseduo-destructor-name production does not work, fall back to the 1369169689Skan ordinary production. 1370169689Skan 1371169689Skan PR c++/17826 1372169689Skan * tree.c (cp_tree_equal): Handle a BASELINK. 1373169689Skan 1374169689Skan PR c++/17524 1375169689Skan * cp-tree.h (check_var_type): New function. 1376169689Skan * decl.c (check_var_type): New function, split out from ... 1377169689Skan (grokdeclarator): ... here. 1378169689Skan * pt.c (tsubst_decl): Use check_var_type. 1379169689Skan 1380169689Skan PR c++/17685 1381169689Skan * decl.c (grokdeclarator): Disallow declarations of operators as 1382169689Skan non-functions. 1383169689Skan 1384169689Skan2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 1385169689Skan 1386169689Skan PR c++/17868 1387169689Skan * error.c (dump_expr): Add missing case for RDIV_EXPR. 1388169689Skan 1389169689Skan2004-10-08 Kazu Hirata <kazu@cs.umass.edu> 1390169689Skan 1391169689Skan * pt.c, search.c: Fix comment typos. 1392169689Skan 1393169689Skan2004-10-08 Nathan Sidwell <nathan@codesourcery.com> 1394169689Skan 1395169689Skan * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp, 1396169689Skan unmarkedp): Remove. 1397169689Skan (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New. 1398169689Skan * class.c (struct find_final_overrider_data): Remove most_derived, 1399169689Skan vpath_list and vpath fields. Add path field. 1400169689Skan (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust. 1401169689Skan (dfs_find_final_overrider): Rename to ... 1402169689Skan (dfs_find_final_overrider_pre): ... here. Adjust. 1403169689Skan (dfs_find_final_overrider_post): Adjust. 1404169689Skan (dfs_find_final_overrider_q): Fold into 1405169689Skan dfs_find_final_overrider_pre. 1406169689Skan (find_final_overrider): Adjust dfs searching. 1407169689Skan (dfs_modify_vtables): Don't mark binfo here. 1408169689Skan (modify_all_vtables): Use dfs_walk_once. 1409169689Skan (build_vtt_inits): Likwise. Use dfs_walk_all. 1410169689Skan (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here. 1411169689Skan Return dfs_skip_bases as appropriate. 1412169689Skan (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate. 1413169689Skan * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as 1414169689Skan appropriate. Don't mark binfo here. 1415169689Skan (initialize_vtbl_ptrs): Use dfs_walk_once. 1416169689Skan * search.c (struct vbase_info): Remove unused struct. 1417169689Skan (access_in_type): Use dfs_walk_once. 1418169689Skan (dfs_access_in_type): Don't mark binfo here. 1419169689Skan (dfs_accessible_queue_p, dfs_accessible_p) Remove. 1420169689Skan Fold into ... 1421169689Skan (accessible_r): ... here. New. Specialize dfs_walk_once. 1422169689Skan (accessible_p): Use accessible_r. 1423169689Skan (lookup_field_queue_p): Remove. Fold into ... 1424169689Skan (lookup_field_r): ... here. Adjust. 1425169689Skan (lookup_member): Use dfs_walk_all. 1426169689Skan (dfs_walk_real, dfs_walk): Replace with ... 1427169689Skan (dfs_walk_all, dfs_walk_once): ... these. 1428169689Skan (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once. 1429169689Skan (dfs_unmark, unmarkedp, markedp): Remove. 1430169689Skan (dfs_get_pure_virtuals): Don't mark binfo here. 1431169689Skan (get_pure_virtuals): Use dfs_walk_once. 1432169689Skan (dfs_debug_unmarked_p): Remove. Fold into ... 1433169689Skan (dfs_debug_mark): ... here. 1434169689Skan (note_debug_info_needed): Use dfs_walk_all. 1435169689Skan 1436169689Skan2004-10-07 Andrew Pinski <pinskia@physics.uc.edu> 1437169689Skan 1438169689Skan * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the 1439169689Skan CLEANUP_POINT_EXPR to get the asm expression. 1440169689Skan 1441169689Skan2004-10-07 Mark Mitchell <mark@codesourcery.com> 1442169689Skan 1443169689Skan * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag. 1444169689Skan (DECL_MEMBER_TEMPLATE_P): New macro. 1445169689Skan (is_member_template): Remove. 1446169689Skan (class_method_index_for_fn): New function. 1447169689Skan * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P. 1448169689Skan * class.c (finish_struct_methods): Remove out-of-date comment. 1449169689Skan * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P. 1450169689Skan * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and 1451169689Skan class_method_index_for_fn. 1452169689Skan * pt.c (is_member_template): Remove. 1453169689Skan (is_member_template_class): Likewise. 1454169689Skan (optimize_specialization_lookup_p): New function. 1455169689Skan (retrieve_specialization): Optimize lookups for members that are 1456169689Skan not member templates. 1457169689Skan (register_specialization): Adjust accordingly. 1458169689Skan (build_template_decl): Add member_template_p parameter. Set 1459169689Skan DECL_MEMBER_TEMPLATE_P. 1460169689Skan (process_partial_specialization): Adjust call to 1461169689Skan retrieve_specialization. 1462169689Skan (push_template_decl_real): Determine whether the template is a 1463169689Skan member template. 1464169689Skan (lookup_template_class): Use retrieve_specialization. 1465169689Skan (tsubst_decl): Adjust call to retrieve_specialization. 1466169689Skan (tsubst_exception_specification): New function. 1467169689Skan (tsubst): Use it. 1468169689Skan (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P. 1469169689Skan (instantiate_template): Adjust call to retrieve_specialization. 1470169689Skan (regenerate_decl_from_template): Do not actually generate a new 1471169689Skan DECL. 1472169689Skan (instantiate_decl): Adjust call to retrieve_specialization. 1473169689Skan (class_method_index_for_fn): New method. 1474169689Skan 1475169689Skan2004-10-07 Andrew Pinski <pinskia@physics.uc.edu> 1476169689Skan 1477169689Skan * parser.c (cp_parser_asm_definition): Look passed the 1478169689Skan CLEANUP_POINT_EXPR to get the asm expression. 1479169689Skan 1480169689Skan2004-10-06 Andrew Pinski <pinskia@physics.uc.edu> 1481169689Skan 1482169689Skan PR c++/17368 1483169689Skan * semantics.c (finish_asm_stmt): Asm expressions need cleanup 1484169689Skan also. 1485169689Skan 1486169689Skan2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net> 1487169689Skan 1488169689Skan Convert diagnostics to use quoting flag q 6/n 1489169689Skan * pt.c (finish_member_template_decl, check_specialization_scope, 1490169689Skan maybe_process_partial_specialization, determine_specialization, 1491169689Skan check_explicit_specialization, maybe_check_template_type, 1492169689Skan process_partial_specialization, check_default_tmpl_args, 1493169689Skan push_template_decl_real, redeclare_class_template, 1494169689Skan convert_nontype_argument, coerce_template_parms, 1495169689Skan lookup_template_class, push_tinst_level, 1496169689Skan instantiate_class_template, tsubst_arg_types, 1497169689Skan tsubst_function_type, tsubst, tsubst_qualified_id, 1498169689Skan tsubst_copy_and_build, check_instantiated_args, 1499169689Skan do_decl_instantiation, do_type_instantiation, 1500169689Skan invalid_nontype_parm_type_p, check_specialization_namespace, 1501169689Skan convert_template_argument, determine_specialization, 1502169689Skan check_template_shadow, tsubst_decl 1503169689Skan instantiate_pending_templates): Use quoting marks. 1504169689Skan 1505169689Skan2004-10-05 Nathan Sidwell <nathan@codesourcery.com> 1506169689Skan 1507169689Skan PR c++/17829 1508169689Skan * parser.c (cp_parser_postfix_expression): Inhibit Koenig when 1509169689Skan unqualified lookup finds a member function. 1510169689Skan 1511169689Skan2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net> 1512169689Skan 1513169689Skan Convert diagnostics to use quoting flag q 5/n 1514169689Skan * parser.c (cp_parser_name_lookup_error, 1515169689Skan cp_parser_diagnose_invalid_type_name, 1516169689Skan cp_parser_primary_expression, cp_parser_unqualified_id, 1517169689Skan cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement, 1518169689Skan cp_parser_jump_statement, cp_parser_simple_declaration, 1519169689Skan cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id, 1520169689Skan cp_parser_type_parameter, cp_parser_template_id, 1521169689Skan cp_parser_template_name, cp_parser_direct_declarator, 1522169689Skan cp_parser_parameter_declaration_list, cp_parser_class_head, 1523169689Skan cp_parser_base_specifier, cp_parser_lookup_name, 1524169689Skan cp_parser_late_parsing_default_args, 1525169689Skan cp_parser_optional_template_keyword 1526169689Skan cp_parser_elaborated_type_specifier, cp_parser_check_class_key, 1527169689Skan cp_parser_check_access_in_redeclaration): Use quoting marks. 1528169689Skan 1529169689Skan * name-lookup.c (supplement_binding, pushdecl, 1530169689Skan check_for_out_of_scope_variable, validate_nonmember_using_decl, 1531169689Skan do_nonmember_using_decl, lookup_tag, set_decl_namespace, 1532169689Skan push_namespace, do_namespace_alias, do_using_directive, 1533169689Skan ambiguous_decl, lookup_namespace_name, add_function): Likewise. 1534169689Skan 1535169689Skan * method.c (use_thunk): Likewise. 1536169689Skan 1537169689Skan * lex.c (unqualified_name_lookup_error, 1538169689Skan unqualified_fn_lookup_error): Likewise. 1539169689Skan 1540169689Skan2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net> 1541169689Skan 1542169689Skan Convert diagnostics to use quoting flag q 4/n 1543169689Skan * except.c (decl_is_java_type, build_throw, 1544169689Skan is_admissible_throw_operand, check_handlers_1, check_handlers): 1545169689Skan Use quoting formats. 1546169689Skan * friend.c (add_friend, make_friend_class, do_friend): Likewise. 1547169689Skan * init.c (sort_mem_initializers, emit_mem_initializers, 1548169689Skan member_init_ok_or_else, expand_member_init, is_aggr_type, 1549169689Skan build_offset_ref, build_java_class_ref): Likewise. 1550169689Skan 1551169689Skan2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net> 1552169689Skan 1553169689Skan Convert diagnostics to use quoting flag q 3/n 1554169689Skan * decl.c (pop_label, duplicate_decls, redeclaration_error_message, 1555169689Skan redeclaration_error_message, lookup_label, check_goto, 1556169689Skan make_typename_type, make_unbound_class_template, 1557169689Skan fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1, 1558169689Skan grok_reference_init, layout_var_decl, maybe_commonize_var, 1559169689Skan check_for_uninitialized_const_var, reshape_init_array, 1560169689Skan reshape_init, check_initializer, cp_finish_decl, 1561169689Skan member_function_or_else, bad_specifiers, grokfndecl, grokvardecl, 1562169689Skan check_static_variable_definition, compute_array_index_type, 1563169689Skan create_array_type_for_decl, check_special_function_return_type, 1564169689Skan grokdeclarator, check_default_argument, grokparms, 1565169689Skan grok_ctor_properties, grok_op_properties, 1566169689Skan check_elaborated_type_specifier, xref_tag, finish_enum, 1567169689Skan build_enumerator, check_function_type, start_preparsed_function, 1568169689Skan store_parm_decls): Use quoting formats. 1569169689Skan * decl2.c (grok_array_decl, delete_sanity, check_member_template, 1570169689Skan check_java_method, check_classfn, finish_static_data_member_decl, 1571169689Skan grokfield, grokbitfield, grok_function_init, 1572169689Skan build_anon_union_vars, coerce_new_type, coerce_delete_type, 1573169689Skan check_default_args): Likewise. 1574169689Skan * parser.c (cp_parser_decl_specifier_seq): Likewise. 1575169689Skan 1576169689Skan2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net> 1577169689Skan 1578169689Skan Convert diagnostics to use quoting flag q 2/n 1579169689Skan * class.c (build_base_path, add_method, alter_access, 1580169689Skan handle_using_decl, check_bases, 1581169689Skan maybe_warn_about_overly_private_class, find_final_overrider, 1582169689Skan warn_hidden, finish_struct_anon, add_implicitly_declared_members, 1583169689Skan check_bitfield_decl, check_field_decls, layout_empty_base, 1584169689Skan build_base_field, check_methods, layout_virtual_bases, 1585169689Skan warn_about_ambiguous_bases, layout_class_type, finish_struct_1, 1586169689Skan resolve_address_of_overloaded_function, instantiate_type, 1587169689Skan note_name_declared_in_class): Use format flag "q" for quoting. 1588169689Skan 1589169689Skan2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net> 1590169689Skan 1591169689Skan Convert diagnostics to use quoting flag q 1/n 1592169689Skan * error.c (locate_error): Ignore quoting flag q. 1593169689Skan * call.c (build_user_type_conversion_1, build_operator_new_call, 1594169689Skan build_object_call, op_error, build_conditional_expr, 1595169689Skan build_new_op, build_op_delete_call, enforce_access, 1596169689Skan convert_like_real, convert_arg_to_ellipsis, build_x_va_arg, 1597169689Skan convert_default_arg, build_over_call, build_new_method_call, 1598169689Skan joust, perform_implicit_conversion, initialize_reference): Use the 1599169689Skan quoting flag q. 1600169689Skan 1601169689Skan2004-10-03 Andrew Pinski <pinskia@physics.uc.edu> 1602169689Skan 1603169689Skan PR c++/17797 1604169689Skan * typeck.c (build_reinterpret_cast): Return if the inner type 1605169689Skan is error_mark_node. 1606169689Skan 1607169689Skan2004-10-01 Jan Hubicka <jh@suse.cz> 1608169689Skan 1609169689Skan * semantics.c (expand_body): Update call of tree_rest_of_compilation. 1610169689Skan 1611169689Skan2004-09-30 Nathan Sidwell <nathan@codesourcery.com> 1612169689Skan 1613169689Skan * cp-tree.h (struct lang_decl): Shrink by reordering fields and 1614169689Skan turning operator_code and fixed_offset into bitfields. 1615169689Skan 1616169689Skan2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk> 1617169689Skan 1618169689Skan * decl.c (duplicate_decls): Merge TREE_DEPRECATED. 1619169689Skan 1620169689Skan2004-09-29 Jason Merrill <jason@redhat.com> 1621169689Skan 1622169689Skan PR tree-optimization/17697 1623169689Skan * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl. 1624169689Skan 1625169689Skan2004-09-28 Jason Merrill <jason@redhat.com> 1626169689Skan 1627169689Skan PR middle-end/17525 1628169689Skan * class.c (build_base_field): Set TYPE_MODE. 1629169689Skan 1630169689Skan2004-09-28 Roger Sayle <roger@eyesopen.com> 1631169689Skan 1632169689Skan PR driver/17537 1633169689Skan * g++spec.c (lang_specific_driver): Unrecognized libraries, other 1634169689Skan than -lc and -lm, may require linking against libstc++. 1635169689Skan 1636169689Skan2004-09-28 Kazu Hirata <kazu@cs.umass.edu> 1637169689Skan 1638169689Skan * tree.c: Fix a comment typo. 1639169689Skan 1640169689Skan2004-09-28 Nathan Sidwell <nathan@codesourcery.com> 1641169689Skan 1642169689Skan * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove. 1643169689Skan (struct secondary_vptr_vtt_init_data_s): New. 1644169689Skan (build_vtt_inits): Adjust dfs_walkers. 1645169689Skan (dfs_build_secondary_vptr_vtt_inits): Caller data is a 1646169689Skan secondary_vptr_vtt_init_data_s structure. Adjust. 1647169689Skan (dfs_ctor_vtable_bases_queue_p): Remove. 1648169689Skan (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify. 1649169689Skan 1650169689Skan * pt.c (struct get_template_base_data_s): Remove. 1651169689Skan (get_template_base_r): Fold into get_template_base. 1652169689Skan (get_template_base): Walk base binfos directly in inheritance 1653169689Skan graph order. 1654169689Skan 1655169689Skan2004-09-27 Mark Mitchell <mark@codesourcery.com> 1656169689Skan 1657169689Skan PR c++/17642 1658169689Skan * cp-tree.h (fold_if_not_in_template): New function. 1659169689Skan * call.c (build_conditional_expr): Use fold_if_not_in_template. 1660169689Skan (build_cxx_call): Likewise. 1661169689Skan * cvt.c (convert_to_complex): Likewise. 1662169689Skan (ocp_convert): Likewise. 1663169689Skan (convert): Likewise. 1664169689Skan (convert_force): Likewise. 1665169689Skan * decl.c (compute_array_index_type): Clear 1666169689Skan processing_template_decl while folding array bounds. 1667169689Skan * pt.c (convert_nontype_argument): Clear 1668169689Skan processing_template_decl while processing non-type argument 1669169689Skan initialization. 1670169689Skan * tree.c (fold_if_not_in_template): New function. 1671169689Skan * typeck.c (build_class_member_access_expr): Use 1672169689Skan fold_if_not_in_template. 1673169689Skan (build_array_ref): Likewise. 1674169689Skan (build_binary_op): Likewise. Do not try to optimize computations 1675169689Skan when processing templates. 1676169689Skan (cp_pointer_int_sum): Use fold_if_not_in_template. 1677169689Skan (pointer_diff): Likewise. 1678169689Skan (build_unary_op): Likewise. 1679169689Skan (build_reinterpret_cast): Likewise. 1680169689Skan (get_delta_difference): Likewise. 1681169689Skan (expand_ptrmemfunc_cst): Likewise. 1682169689Skan (dubious_conversion_warnings): Likewise. 1683169689Skan 1684169689Skan2004-09-27 Matt Austern <austern@apple.com> 1685169689Skan 1686169689Skan * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c 1687169689Skan (cp_lexer_get_preprocessor_token): Set implicit_extern_c for 1688169689Skan tokens that come from headers that are implicitly extern "C". 1689169689Skan (struct cp_parser): new one-bit field, implicit_extern_c. 1690169689Skan (cp_parser_new): Set parser's implicit_extern_c to false. 1691169689Skan (cp_parser_translation_unit): Pop lang context if we were in a 1692169689Skan header that was implicitly extern "C". 1693169689Skan (cp_parser_declaration_seq_opt): Push/pop lang context as 1694169689Skan required by the token's and parser's implicit_extern_c. 1695169689Skan 1696169689Skan2004-09-27 Mark Mitchell <mark@codesourcery.com> 1697169689Skan 1698169689Skan PR c++/17585 1699169689Skan * cp-tree.h (shared_member_p): Declare. 1700169689Skan * search.c (shared_member_p): Give it external linkage. 1701169689Skan * semantics.c (finish_qualified_id_expr): Use it. 1702169689Skan (finish_id_expression): Likewise. 1703169689Skan 1704169689Skan PR c++/17585 1705169689Skan * semantics.c (finish_id_expression): Do not add "this->" to 1706169689Skan static member functions. 1707169689Skan 1708169689Skan2004-09-27 Nathan Sidwell <nathan@codesourcery.com> 1709169689Skan 1710169689Skan PR c++/17681 1711169689Skan * error.c (dump_type): Change TREE_VEC case into TREE_BINFO. 1712169689Skan 1713169689Skan * class.c (struct count_depth_data): Remove. 1714169689Skan (dfs_depth_post, dfs_depth_q): Remove. 1715169689Skan (find_final_overrider): Use number of vbase classes as depth 1716169689Skan bound. 1717169689Skan 1718169689Skan * cp-tree.h (types_overlap_p): Remove. 1719169689Skan * search.c (struct overlap_info): Remove. 1720169689Skan (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove. 1721169689Skan 1722169689Skan * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove. 1723169689Skan (get_template_base_recursive): Remove. Replace with ... 1724169689Skan (get_template_base_r): ... this. 1725169689Skan (struct get_template_base_data_s): New. 1726169689Skan (get_template_base): Use get_template_base_r via dfs_walk. Always 1727169689Skan return NULL on failure. 1728169689Skan (unify): Remove error_mark_node check from get_template_base result. 1729169689Skan 1730169689Skan2004-09-24 Paolo Bonzini <bonzini@gnu.org> 1731169689Skan 1732169689Skan * parser.c (cp_parser_expression_stack): Clarify why it is 1733169689Skan an array of NUM_PREC_VALUES elements. 1734169689Skan (cp_parser_binary_expression): Clarify why we do not need to 1735169689Skan handle stack overflow. 1736169689Skan 1737169689Skan2004-09-24 Nathan Sidwell <nathan@codesourcery.com> 1738169689Skan 1739169689Skan PR c++/16889 1740169689Skan * search.c (lookup_field_queue_p): Correct check for hidden base. 1741169689Skan 1742169689Skan * search.c (bfs_walk): Remove. 1743169689Skan (lookup_member): Use dfs_walk_real. 1744169689Skan (dfs_walk_real): Move and adjust documentation from bfs_walk. 1745169689Skan 1746169689Skan2004-09-23 Zack Weinberg <zack@codesourcery.com> 1747169689Skan 1748169689Skan * decl.c (grokfndecl): If ::main is found not to return int, 1749169689Skan correct it after issuing a diagnostic. 1750169689Skan (grokdeclarator): If the incoming type was error_mark_node, do 1751169689Skan not complain about declaring something with no type. 1752169689Skan (start_function): Change check for ::main not returning int to 1753169689Skan an assertion, as grokfndecl now catches this when the user did it. 1754169689Skan * init.c (perform_member_init, sort_mem_initializers) 1755169689Skan (emit_mem_initializers): Make most diagnostics be issued on 1756169689Skan the line of current_function_decl, not whatever the current 1757169689Skan input line is. 1758169689Skan * parser.c (cp_lexer_peek_token_emit_debug_info): Surround 1759169689Skan definition and declaration with #ifdef ENABLE_CHECKING. 1760169689Skan Avoid unnecessary use of fprintf. 1761169689Skan (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub 1762169689Skan definitions to avoid warnings. 1763169689Skan (cp_lexer_new_main): Add assertion that first token is not a 1764169689Skan padding token. 1765169689Skan (cp_lexer_new_from_token_array): Fold into ... 1766169689Skan (cp_lexer_new_from_tokens): ... here. Add assertion that 1767169689Skan first token is not a padding token. 1768169689Skan (cp_lexer_set_source_position_from_token): Move nearer to callers. 1769169689Skan Remove unused lexer argument. 1770169689Skan (cp_lexer_peek_token): Just print debugging report (if enabled) 1771169689Skan and return lexer->next_token. 1772169689Skan (cp_lexer_skip_purged_tokens): Delete. 1773169689Skan (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make 1774169689Skan inline, simplify bodies. 1775169689Skan (cp_lexer_peek_nth_token): Add debugging report a la 1776169689Skan cp_lexer_peek_token. 1777169689Skan (cp_lexer_consume_token): Correct commentary. Advance over 1778169689Skan purged tokens here. Set current source position here, from 1779169689Skan token to be returned. Avoid unnecessary use of fprintf. 1780169689Skan (cp_lexer_purge_token): Advance next_token pointer over this and 1781169689Skan subsequent purged tokens. 1782169689Skan (cp_parser_error): Adjust source position to that of the 1783169689Skan peeked token. 1784169689Skan (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions. 1785169689Skan (cp_parser_string_literal): Remove some excessive cleverness. 1786169689Skan (cp_parser_enum_specifier): Call start_enum before consuming 1787169689Skan the opening brace. 1788169689Skan (cp_parser_member_declaration): Make the "extra semicolon" 1789169689Skan diagnostic consistently-worded with the other place this is 1790169689Skan diagnosed. Explicitly set the diagnostic location to the 1791169689Skan location of the offending semicolon. 1792169689Skan (cp_parser_enclosed_template_argument_list): Use %</%> quoting 1793169689Skan in diagnostics. Do not use cp_parser_require. Set location 1794169689Skan of diagnostics about improper use of '>>' to location of 1795169689Skan offending token. 1796169689Skan (cp_parser_late_parsing_for_member): 1797169689Skan Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer. 1798169689Skan (cp_parser_late_parsing_default_args): Likewise. Manually 1799169689Skan move some logic outside the loop. 1800169689Skan 1801169689Skan2004-09-23 Andrew Pinski <pinskia@physics.uc.edu> 1802169689Skan 1803169689Skan PR c++/17618 1804169689Skan * cvt.c (cp_convert_to_pointer): Return early when the type is 1805169689Skan an error_mark_node. 1806169689Skan 1807169689Skan2004-09-21 Fariborz Jahanian <fjahanian@apple.com> 1808169689Skan 1809169689Skan PR c++/13989 1810169689Skan PR c++/9844 1811169689Skan * decl.c (grokfndecl): Add new argument "attrlist", use it 1812169689Skan to call cplus_decl_attributes. 1813169689Skan (start_function): Remove call to cplus_decl_attributes. 1814169689Skan * cvt.c (ocp_convert): Add support to use type conversion 1815169689Skan function to vector type. 1816169689Skan * parser.c (cp_parser_conversion_type_id): Add attributes, if any, 1817169689Skan to the parsed type. 1818169689Skan 1819169689Skan2004-09-23 Paolo Bonzini <bonzini@gnu.org> 1820169689Skan 1821169689Skan PR c++/17596 1822169689Skan 1823169689Skan * parser.c (cp_parser_token_tree_map_node, 1824169689Skan cp_parser_pm_expression, cp_parser_additive_expression, 1825169689Skan cp_parser_multiplicative_expression, cp_parser_shift_expression, 1826169689Skan cp_parser_relational_expression, cp_parser_equality_expression, 1827169689Skan cp_parser_and_expression, cp_parser_exclusive_or_expression, 1828169689Skan cp_parser_inclusive_or_expression, 1829169689Skan cp_parser_logical_and_expression, 1830169689Skan cp_parser_logical_or_expression): Removed. 1831169689Skan (enum cp_parser_prec, struct cp_parser_token_tree_map_node, 1832169689Skan binops, binops_by_token): New. 1833169689Skan (cp_parser_assignment_expression): Use cp_parser_binary_expression. 1834169689Skan (cp_parser_new): Initialize binops_by_token. 1835169689Skan (cp_parser_binary_expression): Rewritten. 1836169689Skan (N_CP_TTYPES): New. 1837169689Skan 1838169689Skan2004-09-23 Kazu Hirata <kazu@cs.umass.edu> 1839169689Skan 1840169689Skan * parser.c: Fix a comment typo. 1841169689Skan 1842169689Skan2004-09-23 Nathan Sidwell <nathan@codesourcery.com> 1843169689Skan 1844169689Skan PR c++/17620 1845169689Skan * decl.c (xref_basetypes): Look through typedefs before checking 1846169689Skan for duplicate base. 1847169689Skan 1848169689Skan2004-09-22 Nathan Sidwell <nathan@codesourcery.com> 1849169689Skan 1850169689Skan * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree). 1851169689Skan * decl2.c (cp_finish_file): Adjust tinfo decl emission loop. 1852169689Skan * rtti.c (unemitted_tinfo_decls): Make a VEC(tree). 1853169689Skan (init_rtti_processing): Initialize it to something realistic. 1854169689Skan (get_tinfo_decl): Adjust pushing the new decl. 1855169689Skan 1856169689Skan * cp-tree.h (struct lang_type_class): Remove marked flags, add 1857169689Skan diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks. 1858169689Skan (TYPE_MARKED_P): New. 1859169689Skan (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New. 1860169689Skan (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N, 1861169689Skan CLEAR_CLASSTYPE_MARKED_N): Remove. 1862169689Skan (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*, 1863169689Skan CLEAR_CLASSTYPE_MARKED_*): Remove. 1864169689Skan * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond 1865169689Skan shaped and repeated base properties. 1866169689Skan * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET. 1867169689Skan * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark, 1868169689Skan class_hint_flags): Remove. 1869169689Skan (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and 1870169689Skan CLASSTYPE_DIAMOND_SHAPED_P. 1871169689Skan 1872169689Skan2004-09-21 Ziemowit Laski <zlaski@apple.com> 1873169689Skan 1874169689Skan * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from 1875169689Skan cp-objcp-common.h. 1876169689Skan (objcp_tsubst_copy_and_build): Reformat function signature. 1877169689Skan * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise. 1878169689Skan (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c. 1879169689Skan 1880169689Skan2004-09-21 Zack Weinberg <zack@codesourcery.com> 1881169689Skan 1882169689Skan * parser.c (cp_lexer_peek_token, cp_lexer_consume_token): 1883169689Skan Don't handle CPP_PRAGMA tokens specially. 1884169689Skan (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't 1885169689Skan purge the token; do clear token->value after processing. Add 1886169689Skan assertion at beginning that token->value is nonzero. 1887169689Skan (cp_parser_statement, cp_parser_declaration_seq_opt): Handle 1888169689Skan CPP_PRAGMA as a full statement or declaration in its own right. 1889169689Skan 1890169689Skan2004-09-21 Matt Austern <austern@apple.com> 1891169689Skan 1892169689Skan PR c++/15049 1893169689Skan * decl.c (grokvardecl): Accept declarations of global variables 1894169689Skan using anonymous types. 1895169689Skan 1896169689Skan2004-09-21 Roger Sayle <roger@eyesopen.com> 1897169689Skan 1898169689Skan PR c++/7503 1899169689Skan * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues 1900169689Skan if either operand has side-effects. 1901169689Skan * typeck.c (rationalize_conditional_expr): Assert that neither 1902169689Skan operand of MIN_EXPR or MAX_EXPR has side-effects. 1903169689Skan (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR. 1904169689Skan Check that the "lhs" is a valid lvalue, i.e. that neither operand 1905169689Skan of a MIN_EXPR or MAX_EXPR has a side-effect. 1906169689Skan 1907169689Skan2004-09-21 Nathan Sidwell <nathan@codesourcery.com> 1908169689Skan 1909169689Skan * cp-tree.h (struct lang_type_header): Remove 1910169689Skan uses_multiple_inheritance field. 1911169689Skan (TYPE_USES_MULTIPLE_INHERITANCE): Remove. 1912169689Skan (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove. 1913169689Skan (TYPE_USES_VIRTUAL_BASECLASSES): Remove. 1914169689Skan (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES. 1915169689Skan (TYPE_CONTAINS_VPTR_P): Likewise. 1916169689Skan * call.c (add_template_candidate_real): Use 1917169689Skan CLASSTYPE_VBASECLASSES. 1918169689Skan (build_special_member_call): Likewise. 1919169689Skan * class.c (finish_struct_bits): Remove 1920169689Skan TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES 1921169689Skan bookkeeping. 1922169689Skan (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P. 1923169689Skan (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P 1924169689Skan bookkeeping. 1925169689Skan (build_vtt_inits): Use CLASSTYPE_VBASECLASSES. 1926169689Skan (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries): 1927169689Skan Likewise. 1928169689Skan * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE, 1929169689Skan TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES 1930169689Skan bookkeeping. 1931169689Skan (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES. 1932169689Skan * decl2.c (maybe_retrofit_in_chrg): Likewise. 1933169689Skan * init.c (expand_member, push_base_cleanups): Likewise. 1934169689Skan * pt.c (instantiate_class_template): Remove 1935169689Skan TYPE_USES_MULTIPLE_INHERITANCE, 1936169689Skan TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES 1937169689Skan bookkeeping. 1938169689Skan * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE 1939169689Skan check. 1940169689Skan * typeck2.c (process_init_constructor): Replace some sorrys with 1941169689Skan asserts. 1942169689Skan 1943169689Skan2004-09-21 Andreas Tobler <a.tobler@schweiz.ch> 1944169689Skan 1945169689Skan * decl.c (reshape_init_array): Initialize max_index_cst to fix 1946169689Skan bootstrap failure. 1947169689Skan 1948169689Skan2004-09-20 Mark Mitchell <mark@codesourcery.com> 1949169689Skan 1950169689Skan PR c++/17530 1951169689Skan * pt.c (tsubst): Fix parentheses to accomodate emacs. 1952169689Skan (tsubst_baselink): If we get a single function, mark it as used. 1953169689Skan 1954169689Skan2004-09-20 Matt Austern <austern@apple.com> 1955169689Skan Zack Weinberg <zack@codesourcery.com> 1956169689Skan 1957169689Skan * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function): 1958169689Skan Apply lbasename to input_filename before passing to get_fileinfo. 1959169689Skan * semantics.c (begin_class_definition): Likewise. 1960169689Skan * lex.c (handle_pragma_interface): Apply get_fileinfo to the 1961169689Skan correct filename. Rename variables to be less confusing. 1962169689Skan (handle_pragma_implementation): Likewise. Disable "appears 1963169689Skan after file is included" diagnostic. 1964169689Skan 1965169689Skan * parser.c (struct cp_token): Add in_system_header fiag. 1966169689Skan (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block) 1967169689Skan (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token) 1968169689Skan (CPP_NONE, cp_lexer_read_token): Delete. 1969169689Skan (struct cp_lexer): Remove first_token, string_tokens, 1970169689Skan main_lexer_p fields. Clarify comments. 1971169689Skan (struct cp_token_cache): Now just a pair of pointers. 1972169689Skan (CP_LEXER_BUFFER_SIZE): New #define. 1973169689Skan (CPP_PURGED): New fake token type. 1974169689Skan (cp_lexer_new_from_token_array, cp_lexer_destroy) 1975169689Skan (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens) 1976169689Skan (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal): 1977169689Skan New functions. 1978169689Skan (cp_lexer_new_from_tokens): Now a simple wrapper around 1979169689Skan cp_lexer_new_from_token_array. 1980169689Skan (cp_lexer_set_source_position_from_token): Also update 1981169689Skan in_system_header. 1982169689Skan (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token): 1983169689Skan Don't wrap round. 1984169689Skan (cp_lexer_token_difference): Dont handle wrapping round. 1985169689Skan (cp_lexer_new_main): Enable pragma deferral and raw strings, 1986169689Skan read the entire translation unit through c_lex_with_flags into 1987169689Skan this lexer's buffer, then turn raw strings back off again. 1988169689Skan (cp_lexer_grow_buffer): Adjust for buffer no longer being circular. 1989169689Skan (cp_lexer_get_preprocessor_token): No need to handle not being 1990169689Skan the main lexer. Set token->in_system_header too. 1991169689Skan (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens 1992169689Skan to cp_lexer_handle_pragma. No need to call cp_lexer_read_token. 1993169689Skan (cp_lexer_peek_nth_token): Likewise. 1994169689Skan (cp_lexer_purge_token): Mark the token PURGED, don't shift all 1995169689Skan the other tokens down. 1996169689Skan (cp_lexer_purge_tokens_after): Likewise. 1997169689Skan (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry 1998169689Skan about there being no tokens. 1999169689Skan (cp_lexer_print_token): Revise to give useful information on 2000169689Skan all tokens. 2001169689Skan (struct cp_parser): Add field translate_strings_p. 2002169689Skan (cp_parser_new): Initialize it. 2003169689Skan (cp_parser_translation_unit): Destroy the lexer when done. 2004169689Skan (cp_parser_parameter_declaration): Restructure saving of 2005169689Skan default arguments. 2006169689Skan (cp_parser_save_member_function_body): Likewise. 2007169689Skan (cp_parser_check_for_invalid_template_id) 2008169689Skan (cp_parser_nested_name_specifier_opt, cp_parser_template_id): 2009169689Skan Adjust calls to cp_lexer_advance_token. 2010169689Skan (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration): 2011169689Skan No need to fiddle c_lex_string_translate. 2012169689Skan (cp_parser_primary_expression, cp_parser_linkage_specification) 2013169689Skan (cp_parser_asm_definition, cp_parser_asm_specification_opt) 2014169689Skan (cp_parser_asm_operand_list, cp_parser_asm_clobber_list) 2015169689Skan Use cp_parser_string_literal. 2016169689Skan (cp_parser_attribute_list): Save and restore 2017169689Skan parser->translate_strings_p, not c_lex_string_translate. 2018169689Skan (cp_parser_cache_group): Delete. 2019169689Skan (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do 2020169689Skan not take a cache argument. 2021169689Skan 2022169689Skan2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org> 2023169689Skan 2024169689Skan PR c++/14179 2025169689Skan * decl.c (reshape_init): Extract array handling into... 2026169689Skan (reshape_init_array): New function. Use integers instead of trees 2027169689Skan for indices. Handle out-of-range designated initializers. 2028169689Skan 2029169689Skan2004-09-20 Steven Bosscher <stevenb@suse.de> 2030169689Skan 2031169689Skan * lex.c (cxx_init): Don't set the ridpointer for RID_NULL 2032169689Skan to null_node. 2033169689Skan 2034169689Skan2004-09-19 Mark Mitchell <mark@codesourcery.com> 2035169689Skan 2036169689Skan * decl2.c (determine_visibility): Allow class visibility 2037169689Skan directives to override targetm.cxx.export_class_data. 2038169689Skan 2039169689Skan2004-09-18 Kazu Hirata <kazu@cs.umass.edu> 2040169689Skan 2041169689Skan * call.c, semantics.c: Follow spelling conventions. 2042169689Skan * class.c: Fix a comment typo. 2043169689Skan 2044169689Skan2004-09-16 Geoffrey Keating <geoffk@apple.com> 2045169689Skan 2046169689Skan PR pch/13361 2047169689Skan * cp/lex.c (handle_pragma_interface): Duplicate string from tree. 2048169689Skan (handle_pragma_implementation): Likewise. 2049169689Skan 2050169689Skan2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com> 2051169689Skan Zack Weinberg <zack@codesourcery.com> 2052169689Skan 2053169689Skan * cp-tree.def: Use tree_code_class enumeration constants 2054169689Skan instead of code letters. 2055169689Skan * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c 2056169689Skan * mangle.c, pt.c, semantics.c, tree.c, typeck.c: 2057169689Skan Update for new tree-class enumeration constants. 2058169689Skan 2059169689Skan2004-09-16 Mark Mitchell <mark@codesourcery.com> 2060169689Skan 2061169689Skan PR c++/16002 2062169689Skan * parser.c (cp_parser_simple_declaration): Commit to tentative 2063169689Skan parses after seeing a decl-specifier. 2064169689Skan (cp_parser_simple_declaration): Eliminate spurious message. 2065169689Skan (cp_parser_init_declarator): Adjust error message. 2066169689Skan 2067169689Skan PR c++/16029 2068169689Skan * lex.c (unqualified_name_lookup_error): Mark the dummy 2069169689Skan declaration as used. 2070169689Skan 2071169689Skan PR c++/17501 2072169689Skan * parser.c (cp_parser_nested_name_specifier): Do not resolve 2073169689Skan typename types if the user explicitly said "typename". 2074169689Skan 2075169689Skan2004-09-16 Andrew MacLeod <amacleod@redhat.com> 2076169689Skan 2077169689Skan * error.c (dump_decl): Make sure there is lang_specific info before 2078169689Skan checking for DTOR and CTOR decls. 2079169689Skan 2080169689Skan2004-09-16 Nathan Sidwell <nathan@codesourcery.com> 2081169689Skan 2082169689Skan * class.c (copy_virtuals): Remove. 2083169689Skan (build_primary_vtable): Use copy_list directly. 2084169689Skan (build_secondary_vtable): Likewise. 2085169689Skan (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here. 2086169689Skan (create_vtable_ptr): Likewise. 2087169689Skan 2088169689Skan2004-09-16 Kazu Hirata <kazu@cs.umass.edu> 2089169689Skan 2090169689Skan * search.c: Follow spelling conventions. 2091169689Skan 2092169689Skan2004-09-16 Nathan Sidwell <nathan@codesourcery.com> 2093169689Skan 2094169689Skan * cp-tree.h (struct lang_type_class): Make pure_virtuals a 2095169689Skan VEC(tree). 2096169689Skan (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update 2097169689Skan comments. 2098169689Skan * call.c (build_new_method_call): Don't confirm a pure virtual is 2099169689Skan in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning. 2100169689Skan * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree). 2101169689Skan (fixup_inline_methods, finish_struct): Likewise. 2102169689Skan * decl.c (finish_method): Likewise. 2103169689Skan * search.c (dfs_get_pure_virtuals, get_pure_virtuals): 2104169689Skan CLASSTYPE_PURE_VIRTUALS is a VEC(tree). 2105169689Skan * typeck2.c (abstract_virtuals_error): Likewise. Truncate the 2106169689Skan vector to avoid repeating the list in error messages. 2107169689Skan 2108169689Skan2004-09-15 Mark Mitchell <mark@codesourcery.com> 2109169689Skan 2110169689Skan * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define. 2111169689Skan * cp-tree.h (cxx_comdat_group): Declare. 2112169689Skan * decl.c (cxx_comdat_group): New function. 2113169689Skan 2114169689Skan2004-09-15 Nathan Sidwell <nathan@codesourcery.com> 2115169689Skan 2116169689Skan * search.c (get_pure_virtuals): Remove unused variables. 2117169689Skan 2118169689Skan * cp-tree.h (struct lang_decl_flags): Remove 2119169689Skan needs_final_overrider. 2120169689Skan (DECL_NEEDS_FINAL_OVERRIDER_P): Remove. 2121169689Skan * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P. 2122169689Skan * class.c (finish_struct_bits): Correct comment about 2123169689Skan CLASSTYPE_PURE_VIRTUALS. 2124169689Skan * search.c (get_pure_virtuals): Remove useless loop. 2125169689Skan 2126169689Skan2004-09-14 Mark Mitchell <mark@codesourcery.com> 2127169689Skan 2128169689Skan PR c++/17324 2129169689Skan * mangle.c (partially_mangled_name): New variable. 2130169689Skan (partially_mangled_name_len): Likewise. 2131169689Skan (save_partially_mangled_name): New function. 2132169689Skan (restore_partially_mangled_name): Likewise. 2133169689Skan (write_encoding): Save and restore partially mangled names around 2134169689Skan calls to get_mostly_instantiated_function_type. 2135169689Skan (write_unqualified_name): Likewise. 2136169689Skan 2137169689Skan2004-09-14 Nathan Sidwell <nathan@codesourcery.com> 2138169689Skan 2139169689Skan * pt.c (unify): Replace gcc_unreachable with gcc_assert. 2140169689Skan 2141169689Skan2004-09-13 Mark Mitchell <mark@codesourcery.com> 2142169689Skan 2143169689Skan PR c++/16162 2144169689Skan * parser.c (cp_parser_id_expression): Correct value for 2145169689Skan is_declarator. 2146169689Skan (cp_parser_nested_name_specifier_opt): Look through typenames as 2147169689Skan necessary. 2148169689Skan (cp_parser_template_name): Honor check_dependency_p. 2149169689Skan 2150169689Skan PR c++/16716 2151169689Skan * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): 2152169689Skan Robustify. 2153169689Skan 2154169689Skan PR c++/17327 2155169689Skan * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with 2156169689Skan gcc_unreacable. 2157169689Skan 2158169689Skan2004-09-12 Richard Henderson <rth@redhat.com> 2159169689Skan 2160169689Skan PR c++/16254 2161169689Skan * semantics.c (maybe_cleanup_point_expr): Don't call fold. 2162169689Skan * typeck.c (condition_conversion): Likewise. 2163169689Skan 2164169689Skan2004-09-11 Richard Henderson <rth@redhat.com> 2165169689Skan 2166169689Skan PR c++/17404 2167169689Skan * pt.c (cur_stmt_expr): Move from tsubst_expr. 2168169689Skan (tsubst_expr) <case STMT_EXPR>: Move ... 2169169689Skan (tsubst_copy_and_build): ... here. 2170169689Skan 2171169689Skan2004-09-10 Zack Weinberg <zack@codesourcery.com> 2172169689Skan 2173169689Skan * cp-tree.h (interface_only, interface_unknown): Delete declarations; 2174169689Skan comment explaining them moved to c-common.h. 2175169689Skan * lex.c (interface_only, interface_unknown, extract_interface_info): 2176169689Skan Delete definitions. 2177169689Skan (cxx_finish): Don't reset interface_unknown. 2178169689Skan (handle_pragma_interface): Don't set interface_only and 2179169689Skan interface_unknown; just the like-named fields in finfo. 2180169689Skan (handle_pragma_implementation): Adjust comment. 2181169689Skan * decl2.c (cp_finish_file): Don't reset interface_only and 2182169689Skan interface_unknown. 2183169689Skan * method.c (synthesize_method): Don't reset interface_unknown or 2184169689Skan call extract_interface_info. 2185169689Skan * pt.c (pop_tinst_level): Don't call extract_interface_info. 2186169689Skan * decl.c (start_cleanup_fn): Don't save or restore interface_only 2187169689Skan and interface_unknown. 2188169689Skan (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename 2189169689Skan and use the result instead of the interface_only/interface_unknown 2190169689Skan globals. 2191169689Skan (start_preparsed_function): Likewise. 2192169689Skan * lex.c (cxx_make_type): Likewise. 2193169689Skan * semantics.c (begin_class_definition): Likewise. 2194169689Skan (expand_body): Don't call extract_interface_info. 2195169689Skan 2196169689Skan2004-09-10 Ziemowit Laski <zlaski@apple.com> 2197169689Skan 2198169689Skan * decl.c (objc_mark_locals_volatile): Make description of 2199169689Skan routine more descriptive; only mark VAR_DECLs at each 2200169689Skan binding level. 2201169689Skan 2202169689Skan2004-09-10 Richard Henderson <rth@redhat.com> 2203169689Skan 2204169689Skan PR c++/17386 2205169689Skan * call.c (build_vfield_ref): Move... 2206169689Skan * class.c (build_vfield_ref): ... here. Convert datum to the 2207169689Skan primary base containing the vptr. 2208169689Skan (make_new_vtable): Simplify build_primary_vtable arguments. 2209169689Skan (finish_struct_1): Do not duplicate TYPE_VFIELD. 2210169689Skan * typeck.c (build_class_member_access_expr): Don't warn for 2211169689Skan null object access to base fields. 2212169689Skan 2213169689Skan2004-09-10 Ziemowit Laski <zlaski@apple.com> 2214169689Skan 2215169689Skan * decl.c (objc_get_current_scope, objc_mark_locals_volatile): 2216169689Skan New functions, to be called from ObjC++. 2217169689Skan 2218169689Skan2004-09-10 Kazu Hirata <kazu@cs.umass.edu> 2219169689Skan 2220169689Skan * class.c, cp-tree.h, decl.c, decl2.c, mangle.c, 2221169689Skan name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix 2222169689Skan comment typos. 2223169689Skan 2224169689Skan2004-09-09 Ziemowit Laski <zlaski@apple.com> 2225169689Skan 2226169689Skan * typeck.c (build_c_cast): Preserve the cast if casting 2227169689Skan to and from an Objective-C type. 2228169689Skan 2229169689Skan2004-09-09 Ziemowit Laski <zlaski@apple.com> 2230169689Skan 2231169689Skan * Make-lang.in (cp/typeck.o): Depend on c-common.h. 2232169689Skan * typeck.c: Include c-common.h. 2233169689Skan (comptypes): For RECORD_TYPEs, call objc_comptypes() and 2234169689Skan return the result if nonnegative. 2235169689Skan 2236169689Skan2004-09-09 Zack Weinberg <zack@codesourcery.com> 2237169689Skan 2238169689Skan * decl2.c (import_export_class) 2239169689Skan * lex.c (handle_pragma_interface): 2240169689Skan Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef. 2241169689Skan 2242169689Skan2004-09-08 Ziemowit Laski <zlaski@apple.com> 2243169689Skan 2244169689Skan * Make-lang.in (cp/semantics.o): Depend on c-common.h. 2245169689Skan * semantics.c: Include c-common.h. 2246169689Skan (finish_compound_stmt): Call objc_clear_super_receiver(). 2247169689Skan 2248169689Skan2004-09-08 Ziemowit Laski <zlaski@apple.com> 2249169689Skan 2250169689Skan * cp-tree.h (do_poplevel): New prototype. 2251169689Skan * semantics.c (do_poplevel): Make externally visible. 2252169689Skan 2253169689Skan2004-09-08 Nathan Sidwell <nathan@codesourcery.com> 2254169689Skan 2255169689Skan * cp-tree.h (tree_pair_s): Define a GC'd vector. 2256169689Skan * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise. 2257169689Skan * semantics.c (deferred_access): Likewise. 2258169689Skan 2259169689Skan2004-09-06 Daniel Jacobowitz <dan@debian.org> 2260169689Skan 2261169689Skan * semantics.c (expand_body): Assert that we are not nested. 2262169689Skan 2263169689Skan2004-09-06 Zack Weinberg <zack@codesourcery.com> 2264169689Skan 2265169689Skan * decl.c (build_enumerator): Use add_double and int_fits_type_p 2266169689Skan instead of cp_build_binary_op, to avoid creating short-lived trees. 2267169689Skan * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token 2268169689Skan lookahead instead of backtracking. Move some code to avoid a 2269169689Skan conditional branch. 2270169689Skan (cp_parser_enum_specifier): Avoid duplication of effort with caller. 2271169689Skan Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate. 2272169689Skan (cp_parser_enumerator_list, cp_parser_enumerator_definition): 2273169689Skan Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate. 2274169689Skan 2275169689Skan2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2276169689Skan 2277169689Skan * decl.c (grok_declarator): Remove a redundant semicolon. 2278169689Skan 2279169689Skan * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier): 2280169689Skan Correct comments describing function parameters. 2281169689Skan 2282169689Skan2004-09-03 Matt Austern <austern@apple.com> 2283169689Skan Compile speed improvement. 2284169689Skan * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set. 2285169689Skan Otherwise define a stub macro that expands to nothing. 2286169689Skan (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise 2287169689Skan define a stub macro that expands to 0. 2288169689Skan (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set. 2289169689Skan (cp_lexer_stop_debugging): Likewise. 2290169689Skan (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise 2291169689Skan define a stub macro that expands to NULL. 2292169689Skan (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set. 2293169689Skan (cp_lexer_new_from_tokens): Likewise. 2294169689Skan 2295169689Skan2004-09-03 Jan Hubicka <jh@suse.cz> 2296169689Skan 2297169689Skan * decl.c (finish_function): Clean out pointers we no longer need. 2298169689Skan 2299169689Skan2004-09-03 Jan Beulich <jbeulich@novell.com> 2300169689Skan 2301169689Skan * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather 2302169689Skan than "-lm". 2303169689Skan 2304169689Skan2004-09-02 Paul Brook <paul@codesourcery.com> 2305169689Skan 2306169689Skan * decl2.c (determine_visibility): Only check data visibility 2307169689Skan for VAR_DECLS. 2308169689Skan 2309169689Skan2004-08-31 Mark Mitchell <mark@codesourcery.com> 2310169689Skan 2311169689Skan * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro. 2312169689Skan * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P. 2313169689Skan * decl2.c (determine_visibility): Honor 2314169689Skan TARGET_CXX_EXPORT_CLASS_DATA. 2315169689Skan 2316169689Skan * class.c (key_method): Rename to ... 2317169689Skan (determine_key_method): ... this. 2318169689Skan (finish_struct_1): Adjust accordingly. 2319169689Skan * cp-tree.h (key_method): Declare. 2320169689Skan * decl2.c (maybe_emit_vtables): Determine the key method here if 2321169689Skan it has not already been done. 2322169689Skan 2323169689Skan2004-08-31 Ziemowit Laski <zlaski@apple.com> 2324169689Skan 2325169689Skan * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o. 2326169689Skan (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h. 2327169689Skan (cp/cp-decl.c): Do not depend on gtype-cp.h. 2328169689Skan (cp/cp-objcp-common.o): New target. 2329169689Skan * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h. 2330169689Skan (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size, 2331169689Skan cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move 2332169689Skan prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c, 2333169689Skan respectively. 2334169689Skan (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH, 2335169689Skan LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS, 2336169689Skan LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION, 2337169689Skan LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT, 2338169689Skan LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET, 2339169689Skan LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR, 2340169689Skan LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE, 2341169689Skan LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION, 2342169689Skan LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE, 2343169689Skan LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, 2344169689Skan LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, 2345169689Skan LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION, 2346169689Skan LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS, 2347169689Skan LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL, 2348169689Skan LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P, 2349169689Skan LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, 2350169689Skan LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES, 2351169689Skan LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN, 2352169689Skan LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS, 2353169689Skan LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P, 2354169689Skan LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P, 2355169689Skan LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P, 2356169689Skan LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN, 2357169689Skan LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE, 2358169689Skan LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR, 2359169689Skan LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE, 2360169689Skan LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE, 2361169689Skan LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, 2362169689Skan LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR, 2363169689Skan LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE, 2364169689Skan LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move 2365169689Skan hooks to cp-objcp-common.h. 2366169689Skan (finish_file): New function. 2367169689Skan * cp-objcp-common.c: New file. 2368169689Skan * cp-objcp-common.h: New file. 2369169689Skan * cp-tree.h (cp_finish_file): New prototype. 2370169689Skan * decl.c: Do not include gtype-cp.h. 2371169689Skan * decl2.c (finish_file): Rename to cp_finish_file. 2372169689Skan 2373169689Skan2004-08-31 Richard Henderson <rth@redhat.com> 2374169689Skan 2375169689Skan PR c++/17221 2376169689Skan * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ... 2377169689Skan (tsubst_copy_and_build): ... here. 2378169689Skan 2379169689Skan2004-08-30 Mark Mitchell <mark@codesourcery.com> 2380169689Skan 2381169689Skan * cp-tree.h (initialize_artificial_var): Declare. 2382169689Skan * decl.c (initialize_artifical_var): New function. 2383169689Skan * class.c (initialize_array): Remove. 2384169689Skan (initialize_vtable): Use initialize_artificial_var. 2385169689Skan (build_vtt): Likewise. 2386169689Skan (build_ctor_vtbl_group): Likewise. 2387169689Skan 2388169689Skan2004-08-30 Richard Henderson <rth@redhat.com> 2389169689Skan 2390169689Skan * class.c (build_base_path): Use build_address directly. 2391169689Skan * typeck.c (build_unary_op): Don't lower &a.b to pointer 2392169689Skan arithmetic directly. 2393169689Skan * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT 2394169689Skan means !initializer_constant_valid_p. 2395169689Skan 2396169689Skan2004-08-30 Richard Henderson <rth@redhat.com> 2397169689Skan 2398169689Skan * class.c (fixed_type_or_null): Use get_base_address before 2399169689Skan assuming an ADDR_EXPR is non-null. 2400169689Skan 2401169689Skan2004-08-30 Nathan Sidwell <nathan@codesourcery.com> 2402169689Skan 2403169689Skan * name-lookup.c (pop_binding, pushdecl, 2404169689Skan set_identifier_type_value_with_scope, push_overloaded_decl, 2405169689Skan arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable. 2406169689Skan * parser.c (cp_parser_diagnose_invalid_type_name, 2407169689Skan cp_parser_postfix_expression, cp_parser_unary_expression, 2408169689Skan cp_parser_check_declarator_template_para): Likewise. 2409169689Skan * pt.c (push_inline_template_parms_recursive, 2410169689Skan check_explicit_specialization, convert_nontype_argument, 2411169689Skan coerce_template_template_parms, uses_template_parms, 2412169689Skan instantiate_class_template, tsubst_decl, tsubst, tsubst_copy, 2413169689Skan tsubst_expr, instantiate_template, 2414169689Skan maybe_adjust_types_for_deduction, type_unification_real, 2415169689Skan resolve_overloaded_unification, template_decl_level, 2416169689Skan type_dependent_expression_p): Likewise. 2417169689Skan * search.c (lookup_base_r): Likewise. 2418169689Skan * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise. 2419169689Skan * tree.c (lvalue_p_1, count_functions, cxx_printable_name, 2420169689Skan verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise. 2421169689Skan * typeck.c (common_type, get_member_function_from_ptrfunc, 2422169689Skan build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise. 2423169689Skan * typeck2.c (cxx_incomplete_type_diagnostic, 2424169689Skan split_nonconstant_init_1, store_init_value, 2425169689Skan process_init_constructor): Likewise. 2426169689Skan 2427169689Skan2004-08-30 Nathan Sidwell <nathan@codesourcery.com> 2428169689Skan 2429169689Skan * call.c (check_dtor_name): Replace abort with gcc_assert or 2430169689Skan gcc_unreachable. 2431169689Skan (build_call, add_builtin_candidate, build_new_op, 2432169689Skan convert_like_real, build_over_call, in_charge_arg_for_name, 2433169689Skan source_type, joust): Likewise. 2434169689Skan * class.c (build_simple_base_path, get_vcall_index, 2435169689Skan finish_struct_1, instantiate_type, get_enclosing_class, 2436169689Skan add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise. 2437169689Skan * cp-gimplify.c (cp_genericize): Likewise. 2438169689Skan * cp-lang.c (cp_expr_size, cp_tree_size): Likewise. 2439169689Skan * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise. 2440169689Skan * decl.c (poplevel, make_unbound_class_template, reshape_init, 2441169689Skan check_special_function_return_type, grokdeclarator, 2442169689Skan grok_op_properties, tag_name, xref_tag, start_preparsed_function, 2443169689Skan finish_function): Likewise. 2444169689Skan * decl2.c (grokfield, maybe_emit_vtables):Likewise. 2445169689Skan * error.c (dump_global_iord, dump_decl, dump_template_decl, 2446169689Skan language_to_string): Likewise. 2447169689Skan * except.c (choose_personality_routine): Likewise. 2448169689Skan * friend.c (do_friend): Likewise. 2449169689Skan * g++spec.c (lang_specific_driver): Likewise. 2450169689Skan * init.c (build_zero_init, expand_default_init, build_new_1, 2451169689Skan build_vec_delete_1, build_vec_init, build_dtor_call): Likewise. 2452169689Skan * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise. 2453169689Skan * mangle.c (add_substitution, write_unscoped_name, 2454169689Skan write_template_prefix, write_identifier, 2455169689Skan write_special_name_destructor, write_type, write_builtin_type, 2456169689Skan write_expression, write_template_param, 2457169689Skan write_java_integer_type_codes): Likewise. 2458169689Skan * method.c (implicitly_declare_fn): Likewise. 2459169689Skan 2460169689Skan2004-08-30 Nathan Sidwell <nathan@codesourcery.com> 2461169689Skan 2462169689Skan * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag. 2463169689Skan (BINFO_INDIRECT_PRIMARY_P): Remove. 2464169689Skan * class.c (determine_primary_base): Rename to ... 2465169689Skan (determine_primary_bases): ... here. Set all primary bases. 2466169689Skan (set_primary_base): Remove. 2467169689Skan (mark_primary_bases): Remove. 2468169689Skan (build_simple_base_path, walk_subobject_offsets, 2469169689Skan propagate_binfo_offsets, end_of_class): Adjust. 2470169689Skan (layout_class_type): Rename determine_primary_base call. 2471169689Skan (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo 2472169689Skan to type_as_string. 2473169689Skan (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits, 2474169689Skan build_rtti_vtbl_entries): Adjust. 2475169689Skan * init.c (build_vtbl_address): Adjust. 2476169689Skan 2477169689Skan * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert. 2478169689Skan 2479169689Skan2004-08-28 Ziemowit Laski <zlaski@apple.com> 2480169689Skan 2481169689Skan * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and 2482169689Skan CXX_AND_OBJCXX_OBJS. 2483169689Skan (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing 2484169689Skan separately on the link line. 2485169689Skan 2486169689Skan2004-08-28 Jason Merrill <jason@redhat.com> 2487169689Skan 2488169689Skan * decl.c (expand_static_init): Avoid bogus warnings. 2489169689Skan 2490169689Skan2004-08-27 Jason Merrill <jason@redhat.com> 2491169689Skan 2492169689Skan PR c++/16851 2493169689Skan * tree.c (stabilize_init): See through a COMPOUND_EXPR. 2494169689Skan 2495169689Skan PR c++/13684 2496169689Skan * decl.c (expand_static_init): Use thread-safety API. 2497169689Skan (register_dtor_fn): Return the call, don't expand it. 2498169689Skan * tree.c (add_stmt_to_compound): New fn. 2499169689Skan (stabilize_call): Use it. 2500169689Skan 2501169689Skan2004-08-27 Richard Henderson <rth@redhat.com> 2502169689Skan 2503169689Skan * cp-tree.def (OFFSETOF_EXPR): New. 2504169689Skan * parser.c (cp_parser_builtin_offsetof): Either built an 2505169689Skan OFFSETOF_EXPR, or call fold_offsetof immediately. 2506169689Skan * pt.c (tsubst_expr): Handle OFFSETOF_EXPR. 2507169689Skan 2508169689Skan2004-08-27 Nathan Sidwell <nathan@codesourcery.com> 2509169689Skan 2510169689Skan * call.c (validate_conversion_obstack): Replace 2511169689Skan my_friendly_assert with gcc_assert or gcc_unreachable. 2512169689Skan (direct_reference_binding, merge_conversion_sequences, 2513169689Skan build_user_type_conversion_1, perform_overload_resolution, 2514169689Skan build_op_delete_call, enforce_access, call_builtin_trap, 2515169689Skan build_over_call, build_special_member_call, build_new_method_call, 2516169689Skan initialize_reference): Likewise. 2517169689Skan * class.c (build_base_path, build_primary_vtable, alter_access, 2518169689Skan check_bases, update_vtable_entry_for_fn, layout_empty_base, 2519169689Skan clone_function_decl, adjust_clone_args, 2520169689Skan type_requires_array_cookie, include_empty_classes, 2521169689Skan finish_struct_1, resolve_address_of_overloaded_function, 2522169689Skan instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits, 2523169689Skan dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group, 2524169689Skan accumulate_vtbl_inits, build_vtbl_initializer, 2525169689Skan build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise. 2526169689Skan * cvt.c (build_up_reference, convert_to_reference): Likewise. 2527169689Skan * decl.c (poplevel, duplicate_decls, make_typename_type, 2528169689Skan cxx_init_decl_processing, reshape_init, check_initializer, 2529169689Skan make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl, 2530169689Skan expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type, 2531169689Skan grokdeclarator, copy_fn_p, grok_op_properties, xref_tag, 2532169689Skan xref_basetypes, start_preparsed_function, save_function_data, 2533169689Skan finish_function, finish_method, maybe_register_incomplete_var, 2534169689Skan complete_vars): Likewise. 2535169689Skan * decl2.c (grok_array_decl, check_member_template, 2536169689Skan check_classfn, finish_static_data_member_decl, coerce_new_type, 2537169689Skan coerce_delete_type, import_export_class, decl_needed_p, 2538169689Skan determine_visibility, import_export_decl, build_cleanup, 2539169689Skan start_static_initialization_or_destructi, do_static_destruction, 2540169689Skan prune_vars_needing_no_initialization, 2541169689Skan build_offset_ref_call_from_tree): Likewise. 2542169689Skan * error.c (dump_decl, dump_expr): Likewise. 2543169689Skan * init.c (finish_init_stmts, build_zero_init, 2544169689Skan expand_virtual_init, expand_default_init, expand_aggr_init_1, 2545169689Skan build_offset_ref, build_new_1, build_delete, build_vbase_delete): 2546169689Skan Likewise. 2547169689Skan * mangle.c (write_method_parms, write_template_args, 2548169689Skan write_expression, write_template_arg): Likewise. 2549169689Skan * method.c (make_thunk, finish_thunk, use_thunk): Likewise. 2550169689Skan * name-lookup.c (pop_binding, begin_scope, leave_scope, 2551169689Skan resume_scope, push_using_decl, validate_nonmember_using_decl, 2552169689Skan is_ancestor, poplevel_class, set_inherited_value_binding_p, 2553169689Skan push_class_level_binding, do_class_using_decl, push_namespace, 2554169689Skan pop_namespace, add_using_namespace, ambiguous_decl, 2555169689Skan lookup_namespace_name, lookup_type_current_level, 2556169689Skan maybe_process_template_type_declaration): Likewise. 2557169689Skan * parser.c (cp_lexer_peek_nth_token, 2558169689Skan cp_parser_parse_and_diagnose_invalid_typ, 2559169689Skan cp_parser_translation_unit, cp_parser_template_id, 2560169689Skan cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise. 2561169689Skan * pt.c (push_access_scope, finish_member_template_decl, 2562169689Skan push_inline_template_parms_recursive, add_outermost_template_args, 2563169689Skan get_innermost_template_args, begin_explicit_instantiation, 2564169689Skan end_explicit_instantiation, retrieve_specialization, 2565169689Skan is_specialization_of, is_specialization_of_friend, 2566169689Skan register_specialization, check_explicit_specialization, 2567169689Skan comp_template_parms, process_template_parm, 2568169689Skan process_partial_specialization, convert_nontype_argument, 2569169689Skan coerce_template_template_parms, coerce_template_parms, 2570169689Skan mangle_class_name_for_template, lookup_template_function, 2571169689Skan lookup_template_class, instantiate_class_template, tsubst_decl, 2572169689Skan tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy, 2573169689Skan instantiate_template, fn_type_unification, type_unification_real, 2574169689Skan get_template_base, regenerate_decl_from_template, 2575169689Skan template_for_substitution, instantiate_decl, 2576169689Skan get_mostly_instantiated_function_type, dependent_scope_ref_p, 2577169689Skan value_dependent_expression_p, resolve_typename_type): Likewise. 2578169689Skan * repo.c (repo_emit_p): Likewise. 2579169689Skan * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init, 2580169689Skan create_tinfo_types, emit_tinfo_decl): Likewise. 2581169689Skan * search.c (lookup_base_r, lookup_base, lookup_field_1, 2582169689Skan dfs_access_in_type, build_baselink, lookup_member, 2583169689Skan adjust_result_of_qualified_name_lookup, copied_binfo): Likewise. 2584169689Skan * semantics.c (perform_or_defer_access_check, 2585169689Skan finish_non_static_data_member, finish_stmt_expr_expr, 2586169689Skan finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr, 2587169689Skan finish_template_template_parm, finish_member_declaration, 2588169689Skan emit_associated_thunks): Likewise. 2589169689Skan * tree.c (build_target_expr_with_type, force_target_expr, 2590169689Skan copy_binfo, get_first_fn, cp_tree_equal): Likewise. 2591169689Skan * typeck.c (type_after_usual_arithmetic_conversions, comptypes, 2592169689Skan cxx_sizeof_or_alignof_type, perform_integral_promotions, 2593169689Skan build_class_member_access_expr, finish_class_member_access_expr, 2594169689Skan build_ptrmemfunc_access_expr, build_unary_op, 2595169689Skan unary_complex_lvalue, cxx_mark_addressable, build_modify_expr, 2596169689Skan build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr 2597169689Skan * typeck2.c (complete_type_check_abstract, 2598169689Skan abstract_virtuals_error, process_init_constructor, 2599169689Skan add_exception_specifier): Likewise. 2600169689Skan 2601169689Skan2004-08-27 Nathan Sidwell <nathan@codesourcery.com> 2602169689Skan 2603169689Skan * class.c (build_vtbl_initializer): Use ssize_int. 2604169689Skan * decl.c (complete_array_type): Likewise. 2605169689Skan * method.c (finish_thunk): Likewise. 2606169689Skan * search.c (get_dynamic_base_type): Likewise. 2607169689Skan 2608169689Skan2004-08-26 Richard Henderson <rth@redhat.com> 2609169689Skan 2610169689Skan * cp-tree.h (DECL_FIELD_IS_BASE): New. 2611169689Skan * class.c (build_base_field): Set it. 2612169689Skan (build_simple_base_path): Use it. 2613169689Skan (fixed_type_or_null): Don't consider base fields definitive. 2614169689Skan 2615169689Skan2004-08-25 Roger Sayle <roger@eyesopen.com> 2616169689Skan 2617169689Skan PR middle-end/16693 2618169689Skan PR tree-optimization/16372 2619169689Skan * decl.c (finish_enum): Make the precision of the enumerated type 2620169689Skan the same width as the underlying integer type. 2621169689Skan 2622169689Skan2004-08-25 Mark Mitchell <mark@codesourcery.com> 2623169689Skan 2624169689Skan PR c++/17155 2625169689Skan * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++ 2626169689Skan functions. 2627169689Skan 2628169689Skan * mangle.c (get_identifier_nocopy): Add cast. 2629169689Skan 2630169689Skan * cp-tree.h (mangle_type): Remove. 2631169689Skan * mangle.c (globals): GTY it. 2632169689Skan (mangle_obstack): New variable. 2633169689Skan (name_obstack): Likewise. 2634169689Skan (name_base): Likewise. 2635169689Skan (write_char): Adjust accordingly. 2636169689Skan (write_chars): Likewise. 2637169689Skan (write_string): Likewise. 2638169689Skan (start_mangling): Initialize G.substitutions only one. Add 2639169689Skan ident_p parameter. 2640169689Skan (finish_mangling): Use VARRAY_CLEAR to reclaim 2641169689Skan storage in G.substitutions. Use obstack_finish. 2642169689Skan (init_mangle): Adjust for changes to variable names above. 2643169689Skan Initialize G.substitutions. 2644169689Skan (mangle_decl_string): Adjust call to start_mangling. 2645169689Skan (get_identifier_nocopy): New function. 2646169689Skan (mangle_decl): Use it. 2647169689Skan (mangle_type_string): Adjust call to start_mangling. 2648169689Skan (mangle_special_for_type): Likewise. 2649169689Skan (mangle_vtt_for_type): Likewise. 2650169689Skan (mangle_ctor_vtbl_for_type): Likewise. 2651169689Skan (mangle_thunk): Likewise. 2652169689Skan (mangle_guard_variable): Likewise. 2653169689Skan (mangle_ref_init_variable): Likewise. 2654169689Skan 2655169689Skan2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2656169689Skan 2657169689Skan PR c++/14428 2658169689Skan * pt.c (redeclare_class_template): Check the type of non-type and 2659169689Skan template template parameter. 2660169689Skan 2661169689Skan2004-08-25 Nathan Sidwell <nathan@codesourcery.com> 2662169689Skan 2663169689Skan * call.c (convert_class_to_reference): Adjust build_int_cst calls. 2664169689Skan (build_user_type_conversion_1, convert_like_real, 2665169689Skan build_java_interface_fn_ref, build_special_member_call): Likewise. 2666169689Skan * class.c (finish_struct_1, build_vtbl_initializer): Likewise. 2667169689Skan * cp-gimplify.c (cp_gimplify_expr): Likewise. 2668169689Skan * cvt.c (cp_convert_to_pointer): Likewise. 2669169689Skan * decl.c (cxx_init_decl_processing, complete_array_type): Likewise. 2670169689Skan * decl2.c (start_static_initialization_or_destruction, 2671169689Skan generate_ctor_or_dtor_function): Likewise. 2672169689Skan * except.c (build_throw): Likewise. 2673169689Skan * mangle.c (write_integer_cst): Likewise. 2674169689Skan * method.c (finish_thunk): Likewise. 2675169689Skan * rtti.c (build_headof, get_tinfo_decl_dynamic, 2676169689Skan build_dynamic_cast_1, ptr_initializer, ptm_initializer, 2677169689Skan get_pseudo_ti_init): Likewise. 2678169689Skan * search.c (get_dynamic_cast_base_type): Likewise. 2679169689Skan 2680169689Skan2004-08-25 Zack Weinberg <zack@codesourcery.com> 2681169689Skan 2682169689Skan * class.c, search.c: Remove references to DWARF_DEBUG. 2683169689Skan 2684169689Skan2004-08-25 Adam Nemet <anemet@lnxw.com> 2685169689Skan 2686169689Skan * repo.c (extract_string): Reset backquote after one character. 2687169689Skan (get_base_filename): Fix indentation. 2688169689Skan 2689169689Skan2004-08-24 Nathan Sidwell <nathan@codesourcery.com> 2690169689Skan 2691169689Skan * decl.c (cxx_init_decl_processing): Adjust 2692169689Skan build_common_tree_nodes call. 2693169689Skan 2694169689Skan2004-08-24 Nathan Sidwell <nathan@codesourcery.com> 2695169689Skan 2696169689Skan PR c++/16889 2697169689Skan * (is_subobject_of_p): Resurrect & optimize. 2698169689Skan (lookup_field_r): Use it. 2699169689Skan 2700169689Skan2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2701169689Skan 2702169689Skan PR c++/16706 2703169689Skan * search.c (friend_accessible_p): Increment processing_template_decl 2704169689Skan when deal with TEMPLATE_DECL of SCOPE. 2705169689Skan 2706169689Skan2004-08-24 Nathan Sidwell <nathan@codesourcery.com> 2707169689Skan 2708169689Skan PR c++/17149 2709169689Skan * semantics.c (check_accessibility_of_qualified_id): Defer check 2710169689Skan if qualifying_type is a template parameter. 2711169689Skan 2712169689Skan2004-08-23 Mark Mitchell <mark@codesourcery.com> 2713169689Skan 2714169689Skan PR c++/17163 2715169689Skan * pt.c (instantiate_decl): Do not try to apply 2716169689Skan DECL_DECLARED_INLINED_P to a VAR_DECL. 2717169689Skan 2718169689Skan * search.c (build_baselink): Fix typo in comment. 2719169689Skan 2720169689Skan2004-08-22 Andrew Pinski <apinski@apple.com> 2721169689Skan 2722169689Skan Revert: 2723169689Skan 2004-08-22 Andrew Pinski <apinski@apple.com> 2724169689Skan PR c++/14029 2725169689Skan * typeck.c (build_unary_op): Use &a.b if the folded lowered 2726169689Skan expression is not constant. 2727169689Skan 2728169689Skan2004-08-23 Nathan Sidwell <nathan@codesourcery.com> 2729169689Skan 2730169689Skan * name-lookup.c (pushdecl): Rename build_type_copy call. 2731169689Skan * tree.c (cp_build_qualified_type_real, 2732169689Skan build_exception_variant, handle_java_interface_attribute): Likewise. 2733169689Skan 2734169689Skan2004-08-22 Andrew Pinski <apinski@apple.com> 2735169689Skan 2736169689Skan PR c++/14029 2737169689Skan * typeck.c (build_unary_op): Use &a.b if the folded lowered 2738169689Skan expression is not constant. 2739169689Skan 2740169689Skan2004-08-20 Mark Mitchell <mark@codesourcery.com> 2741169689Skan 2742169689Skan PR c++/17121 2743169689Skan * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P. 2744169689Skan 2745169689Skan2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk> 2746169689Skan 2747169689Skan PR c++/17120 2748169689Skan * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for 2749169689Skan MODOP_EXPR. 2750169689Skan 2751169689Skan2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2752169689Skan 2753169689Skan * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION 2754169689Skan before calling comp_template_args. 2755169689Skan 2756169689Skan2004-08-20 Nathan Sidwell <nathan@codesourcery.com> 2757169689Skan 2758169689Skan * class.c (build_vtbl_initializer): Use build_int_cst for 2759169689Skan negative size types. 2760169689Skan * decl.c (complete_array_type): Likewise. 2761169689Skan * method.c (finish_thunk): Likewise. 2762169689Skan 2763169689Skan2004-08-20 Andreas Tobler <a.tobler@schweiz.ch> 2764169689Skan 2765169689Skan * tree.c: Remove unused mark_local_for_remap_r. 2766169689Skan 2767169689Skan2004-08-19 Eric Christopher <echristo@redhat.com> 2768169689Skan 2769169689Skan * cp-tree.h (cxx_unsave_expr_now): Delete prototype. 2770169689Skan * tree.c (cxx_unsave_expr_now): Delete. 2771169689Skan (cp_unsave_r): Ditto. 2772169689Skan 2773169689Skan2004-08-19 Mark Mitchell <mark@codesourcery.com> 2774169689Skan 2775169689Skan PR c++/15890 2776169689Skan * pt.c (push_template_decl_real): Disallow template allocation 2777169689Skan functions with fewer than two parameters. 2778169689Skan 2779169689Skan2004-08-19 Nathan Sidwell <nathan@codesourcery.com> 2780169689Skan 2781169689Skan * cp-tree.h (build_shared_int_cst): Remove. 2782169689Skan * tree.c (shared_int_cache): Remove. 2783169689Skan (build_shared_int_cst): Remove. 2784169689Skan * class.c (finish_struct_1): Use build_int_cst. 2785169689Skan 2786169689Skan2004-08-19 Nathan Sidwell <nathan@codesourcery.com> 2787169689Skan 2788169689Skan * decl.c (finish_enum): Do not copy value node early, copy 2789169689Skan later. 2790169689Skan * lex.c (cxx_init): Force null_node to be unique. 2791169689Skan 2792169689Skan2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk> 2793169689Skan 2794169689Skan PR c++/17041 2795169689Skan * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING 2796169689Skan from input for MODOP_EXPR. 2797169689Skan 2798169689Skan2004-08-18 Mark Mitchell <mark@codesourcery.com> 2799169689Skan 2800169689Skan * pt.c (dependent_template_p): Fix typo in commment. 2801169689Skan 2802169689Skan PR c++/17068 2803169689Skan * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as 2804169689Skan dependent. 2805169689Skan 2806169689Skan2004-08-17 Mark Mitchell <mark@codesourcery.com> 2807169689Skan 2808169689Skan PR c++/16246 2809169689Skan * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type 2810169689Skan arguments have the same type as the corresponding parameter. 2811169689Skan 2812169689Skan PR c++/16215 2813169689Skan * parser.c (cp_parser_name_lookup_error): If parser->object_scope 2814169689Skan is set use it for diagnostic purposes. 2815169689Skan (cp_parser_pseudo_destructor_name): Remove special-case error 2816169689Skan message. 2817169689Skan 2818169689Skan PR c++/15871 2819169689Skan * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions. 2820169689Skan 2821169689Skan PR c++/16965 2822169689Skan * cp-tree.h (qualified_name_lookup_error): Add parameter. 2823169689Skan * name-lookup.c (do_class_using_decl): Restrict set of entities 2824169689Skan passed to cp_emit_debug_info_for_using more carefully. 2825169689Skan (lookup_qualified_name): Allow lookup_member to return sets of 2826169689Skan ambiguous entries. 2827169689Skan * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter. 2828169689Skan (cp_parser_primary_expression): Handle ambiguous lookups. 2829169689Skan (cp_parser_template_name): Adjust use of cp_parser_lookup_name. 2830169689Skan (cp_parser_template_argument): Likewise. 2831169689Skan (cp_parser_elaborate_type_specifier): Likewise. 2832169689Skan (cp_parser_namespace_name): Likewise. 2833169689Skan (cp_parser_class_name): Likewise. 2834169689Skan (cp_parser_lookup_name_simple): Likewise. 2835169689Skan * pt.c (tsubst_qualified_id): Handle ambiguous results. 2836169689Skan (tsubst_expr): Likewise. 2837169689Skan * semantics.c (qualified_name_lookup_error): Add decl paramter. 2838169689Skan For ambiguous lookups, print candidates. 2839169689Skan 2840169689Skan2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2841169689Skan 2842169689Skan PR c++/6749 2843169689Skan * pt.c (instantiate_pending_templates): Add int parameter. Don't 2844169689Skan return anything. 2845169689Skan * cp-tree.h (instantiate_pending_templates): Adjust prototype. 2846169689Skan * decl2.c (finish_file): Adjust call to 2847169689Skan instantiate_pending_templates. 2848169689Skan 2849169689Skan2004-08-15 Roger Sayle <roger@eyesopen.com> 2850169689Skan 2851169689Skan * call.c (build_vfield_ref, build_call, build_conditional_expr, 2852169689Skan convert_arg_to_ellipsis, build_x_va_arg, build_over_call, 2853169689Skan build_java_interface_fn_ref, build_special_member_call, 2854169689Skan build_new_method_call, initialize_reference): Replace calls to 2855169689Skan build with calls to buildN. 2856169689Skan * class.c (build_base_path, convert_to_base_statically, 2857169689Skan build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits, 2858169689Skan build_vtbl_initializer): Likewise. 2859169689Skan * cp-gimplify.c (genericize_try_block, genericize_catch_block, 2860169689Skan gimplify_if_stmt, cp_genericize_r): Likewise. 2861169689Skan * cvt.c (convert_to_void): Likewise. 2862169689Skan * decl.c (check_initializer, finish_constructor_body, 2863169689Skan finish_destructor_body): Likewise. 2864169689Skan * error.c (dump_expr): Likewise. 2865169689Skan * except.c (build_exc_ptr, expand_start_catch_block, build_throw): 2866169689Skan Likewise. 2867169689Skan * init.c (perform_member_init, expand_virtual_init, 2868169689Skan expand_cleanup_for_base, build_init, expand_default_init, 2869169689Skan build_offset_ref, decl_constant_value, build_new, build_new_1, 2870169689Skan build_vec_delete_1, build_vec_init, build_delete, 2871169689Skan push_base_cleanups, build_vec_delete): Likewise. 2872169689Skan * mangle.c (write_integer_cst): Likewise. 2873169689Skan * method.c (thunk_adjust, do_build_copy_constructor, 2874169689Skan do_build_assign_ref): Likewise. 2875169689Skan * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build, 2876169689Skan unify, build_non_dependent_expr): Likewise. 2877169689Skan * rtti.c (build_headof, build_typeid, ifnonnull, 2878169689Skan build_dyanmic_cast_1, tinfo_base_init): Likewise. 2879169689Skan * semantics.c (begin_compound_stmt, finish_call_expr, 2880169689Skan finish_pseudo_destructor_expr, finish_id_expression, 2881169689Skan simplify_aggr_init_expr, finalize_nrv_r): Likewise. 2882169689Skan * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top, 2883169689Skan array_type_nelts_total, stabilize_call): Likewise. 2884169689Skan * typeck.c (decay_conversion, build_class_member_access_expr, 2885169689Skan lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref, 2886169689Skan get_member_function_from_ptrfunc, build_binary_op, pointer_diff, 2887169689Skan build_x_unary_op, build_unary_op, unary_complex_lvalue, 2888169689Skan build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst, 2889169689Skan check_return_expr): Likewise. 2890169689Skan * typeck2.c (split_nonconstant_1, split_nonconstant_init_1, 2891169689Skan split_nonconstant_init, store_init_value, build_m_component_ref): 2892169689Skan Likewise. 2893169689Skan 2894169689Skan2004-08-15 Nathan Sidwell <nathan@codesourcery.com> 2895169689Skan 2896169689Skan * call.c (convert_class_to_reference, 2897169689Skan build_user_type_conversion_1, convert_like_real, 2898169689Skan build_java_interface_fn_ref, build_special_member_call): Use 2899169689Skan build_int_cst. 2900169689Skan * class.c (build_vtbl_initializer): Likewise. 2901169689Skan * cp-gimplify.c (cp_gimplify_expr): Likewise. 2902169689Skan * cvt.c (cp_convert_to_pointer): Likewise. 2903169689Skan * decl.c (cxx_init_decl_processing, complete_array_type): Likewise. 2904169689Skan * decl2.c (start_static_initialization_or_destruction, 2905169689Skan generate_ctor_or_dtor_function): Likewise. 2906169689Skan * except.c (build_throw): Likewise. 2907169689Skan * lex.c (cxx_init): Likewise. 2908169689Skan * mangle.c (write_integer_cst): Likewise. 2909169689Skan * rtti.c (build_headof, get_tinfo_decl_dynamic, 2910169689Skan build_dynamic_cast_1, ptr_initializer, ptm_initializer, 2911169689Skan get_pseudo_ti_init): Likewise. 2912169689Skan * search.c (get_dynamic_cast_base_type): Likewise. 2913169689Skan * tree.c (build_shared_int_cst): Likewise. 2914169689Skan 2915169689Skan2004-08-12 Mark Mitchell <mark@codesourcery.com> 2916169689Skan 2917169689Skan PR c++/16273 2918169689Skan * class.c (count_depth_data): New type. 2919169689Skan (dfs_depth_post): New function. 2920169689Skan (dfs_depth_q): Likewise. 2921169689Skan (find_final_overrider_data_s): Change type of vpath. 2922169689Skan Add vpath_list. 2923169689Skan (dfs_find_final_overrider_1): New function. 2924169689Skan (dfs_find_final_overrider): Use it. 2925169689Skan (dfs_find_final_overrider_q): Adjust use of vpath. 2926169689Skan (dfs_find_final_overrider_post): Likewise. 2927169689Skan (find_final_overrider): Use dfs_depth. Allocate and deallocate 2928169689Skan vpath_list. 2929169689Skan 2930169689Skan2004-08-12 Jan Beulich <jbeulich@novell.com> 2931169689Skan 2932169689Skan * parser.c (cp_parser_asm_definition): Properly consume scope operator 2933169689Skan tokens preceding the clobbers. Don't check for scope operator 2934169689Skan following inputs. Simplify inputs handling to match that now used for 2935169689Skan clobbers. 2936169689Skan 2937169689Skan2004-08-11 Mark Mitchell <mark@codesourcery.com> 2938169689Skan 2939169689Skan PR c++/16698 2940169689Skan * except.c (build_throw): Allocate cleanup_type and the function 2941169689Skan for __cxa_throw separately. 2942169689Skan 2943169689Skan PR c++/16853 2944169689Skan * call.c (standard_conversion): Do not accept conversions between 2945169689Skan pointers to members if the class types are unrelated. 2946169689Skan 2947169689Skan PR c++/16618 2948169689Skan * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile 2949169689Skan char &" instead of just "char &". 2950169689Skan 2951169689Skan PR c++/16870 2952169689Skan * pt.c (tsubst): Just return the unknown_type_node. 2953169689Skan 2954169689Skan2004-08-11 Mark Mitchell <mark@codesourcery.com> 2955169689Skan 2956169689Skan PR c++/16964 2957169689Skan * parser.c (cp_parser_class_specifier): Robustify. 2958169689Skan 2959169689Skan PR c++/16904 2960169689Skan * pt.c (tsubst_copy_and_build): Complain about invalid 2961169689Skan qualification. 2962169689Skan 2963169689Skan PR c++/16929 2964169689Skan * pt.c (tsubst_default_argument): Clear out current_class_ptr and 2965169689Skan current_class_ref while tsubsting. 2966169689Skan 2967169689Skan2004-08-10 Mark Mitchell <mark@codesourcery.com> 2968169689Skan 2969169689Skan PR c++/16971 2970169689Skan * parser.c (cp_parser_init_declarator): Robustify. 2971169689Skan 2972169689Skan2004-08-06 Richard Sandiford <rsandifo@redhat.com> 2973169689Skan 2974169689Skan * typeck2.c (process_init_constructor): Guard the missing field warning 2975169689Skan with warn_missing_field_initializers rather than extra_warnings. 2976169689Skan 2977169689Skan2004-08-06 Paolo Bonzini <bonzini@gnu.org> 2978169689Skan 2979169689Skan * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle. 2980169689Skan 2981169689Skan2004-08-05 Mark Mitchell <mark@codesourcery.com> 2982169689Skan 2983169689Skan * decl.c (start_preparsed_function): Move determine_visibility 2984169689Skan call. 2985169689Skan * decl2.c (determine_visibility): Incorporate dllexport testing. 2986169689Skan 2987169689Skan2004-08-05 Geoffrey Keating <geoffk@apple.com> 2988169689Skan 2989169689Skan * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option 2990169689Skan means that libstdc++ is needed. 2991169689Skan 2992169689Skan2004-08-05 Nathan Sidwell <nathan@codesourcery.com> 2993169689Skan 2994169689Skan * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call. 2995169689Skan 2996169689Skan2004-08-04 Geoffrey Keating <geoffk@apple.com> 2997169689Skan 2998169689Skan * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather 2999169689Skan than passing it as a parameter to rest_of_decl_compilation. 3000169689Skan * decl2.c (grokfield): Use set_user_assembler_name. 3001169689Skan 3002169689Skan2004-08-04 Nathan Sidwell <nathan@codesourcery.com> 3003169689Skan 3004169689Skan * decl.c (complete_array_type): Don't gratuitously copy 3005169689Skan maxindex. Its type is always set. 3006169689Skan 3007169689Skan2004-08-04 Paul Brook <paul@codesourcery.com> 3008169689Skan 3009169689Skan * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H. 3010169689Skan * cp-tree.h (struct language_function): Rename x_dtor_label to 3011169689Skan x_cdtor_label. 3012169689Skan (dtor_label): Rename ... 3013169689Skan (cdtor_label): ... to this. 3014169689Skan * decl.c (begin_constructor_body): Remove. 3015169689Skan (check_special_function_return_type): Maybe change the return type. 3016169689Skan (grokdeclarator): Pass the class type. 3017169689Skan (start_preparsed_function): Constructors may need a return label. 3018169689Skan (finish_constructor_body, finish_destructor_body): Set the return 3019169689Skan value. 3020169689Skan (begin_function_body): Don't call begin_constructor_body. 3021169689Skan (finish_function): Don't warn for constructors or destructors. 3022169689Skan (implicitly_declare_fn): Maybe change the return type. 3023169689Skan * optimize.c: Include target.h. 3024169689Skan (maybe_clone_body): Remap the function result. 3025169689Skan * semantics.c: Include target.h. 3026169689Skan (finish_return_stmt): Maybe jump to return label for constructors. 3027169689Skan 3028169689Skan2004-08-03 Mark Mitchell <mark@codesourcery.com> 3029169689Skan 3030169689Skan * class.c (build_vtable): Do not set DECL_VISIBILITY here. 3031169689Skan (check_field_decls): Or here. 3032169689Skan (check_methods): Or here. 3033169689Skan (initialize_array): Don't mess with DECL_CONTEXT. 3034169689Skan * cp-tree.h (start_decl): Adjust prototype. 3035169689Skan (determine_visibility): New function. 3036169689Skan * decl.c (duplicate_decls): Remove checks for hidden "operator 3037169689Skan new". 3038169689Skan (build_library_fn_1): Give all library functions default 3039169689Skan visibility. 3040169689Skan (start_decl): Add pop_scope_p parameter. Tidy. 3041169689Skan (cp_finish_decl): Do not pop scopes here. Call 3042169689Skan determine_visibility for variable definitions. 3043169689Skan (start_preparsed_function): Call determine_visibility. 3044169689Skan * decl2.c (determine_visibility): New function. 3045169689Skan * method.c (use_thunk): Fix formatting. 3046169689Skan * parser.c (cp_parser_condition): Adjust calls to start_decl. 3047169689Skan (cp_parser_init_declarator): Likewise. 3048169689Skan * pt.c (instantiate_decl): Always call pop_nested_class. 3049169689Skan * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY. 3050169689Skan (tinfo_base_init): Likewise. 3051169689Skan 3052169689Skan2004-08-02 Mark Mitchell <mark@codesourcery.com> 3053169689Skan 3054169689Skan PR c++/16707 3055169689Skan * name-lookup.c (validate_nonmember_using_decl): Robustify. 3056169689Skan 3057169689Skan2004-08-01 Mark Mitchell <mark@codesourcery.com> 3058169689Skan 3059169689Skan PR c++/16224 3060169689Skan * name-lookup.c (decl_namespace): Remove. 3061169689Skan (current_decl_namespace): Use decl_namespace_context instead of 3062169689Skan decl_namespace. 3063169689Skan (push_decl_namespace): Likewise. 3064169689Skan (arg_assoc_class): Likewise. 3065169689Skan (arg_assoc_type): Likewise. 3066169689Skan * pt.c (check_specialization_namespace): New function. 3067169689Skan (maybe_process_partial_specialization): Use it. 3068169689Skan (register_specialization): Likewise. 3069169689Skan 3070169689Skan PR c++/16489 3071169689Skan * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro. 3072169689Skan * call.c (null_ptr_cst_p): Handle variables with constant 3073169689Skan initializers. 3074169689Skan * pt.c (convert_nontype_argument): Use 3075169689Skan DECL_INTEGRAL_CONSTANT_VAR_P. 3076169689Skan * semantics.c (finish_id_expression): Likewise. 3077169689Skan 3078169689Skan PR c++/16529 3079169689Skan * decl.c (duplicate_decls): Reject duplicate namespace 3080169689Skan declarations. 3081169689Skan 3082169689Skan PR c++/16810 3083169689Skan * typeck.c (build_ptrmemfunc): Loosen assertion. 3084169689Skan 3085169689Skan2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net> 3086169689Skan 3087169689Skan * call.c (z_candidate::template_decl): Rename from template. 3088169689Skan (add_template_candidate_real): Adjust member reference. 3089169689Skan (joust): Likewise. 3090169689Skan 3091169689Skan2004-07-29 Mark Mitchell <mark@codesourcery.com> 3092169689Skan 3093169689Skan * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define. 3094169689Skan (lang_decl_flags): Narrow the width of "languages". Add 3095169689Skan repo_available_p. 3096169689Skan (DECL_NEEDED_P): Remove. 3097169689Skan (FOR_EACH_CLONE): New macro. 3098169689Skan (DECL_REPO_AVAILABLE_P): Likewise. 3099169689Skan (DECL_TINFO_P): Likewise. 3100169689Skan (set_linkage_according_to_type): Declare. 3101169689Skan (import_export_vtable): Remove. 3102169689Skan (import_export_tinfo): Likewise. 3103169689Skan (mark_needed): New function. 3104169689Skan (decl_needed_p): Likewise. 3105169689Skan (note_vauge_linkage_fn): Likewise. 3106169689Skan (init_repo): Change prototype. 3107169689Skan (repo_template_used): Remove. 3108169689Skan (repo_template_instantiated): Likewise. 3109169689Skan (repo_emit_p): New function. 3110169689Skan (repo_export_class_p): Likewise. 3111169689Skan (no_linkage_check): Change prototype. 3112169689Skan * class.c (set_linkage_according_to_type): New function. 3113169689Skan (build_vtable): Use it. Do not call import_export_vtable. Set 3114169689Skan DECL_IGNORED_P if appropriate. 3115169689Skan * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P. 3116169689Skan (make_rtL_for_nonlocal_decls): Check for template instantiations 3117169689Skan explicitly. 3118169689Skan (grokfndecl): Adjust call to no_linkage_check. 3119169689Skan (set_linkage_for_static_data_member): New function. 3120169689Skan (grokvardecl): Use it. Adjust call to no_linkage_check. 3121169689Skan (grokdeclarator): Use set_linkage_for_static_data_member. 3122169689Skan * decl2.c (note_vague_linkage_fn): New function. 3123169689Skan (note_vague_linkage_var): Likewise. 3124169689Skan (finish_static_data_member_decl): Use it. 3125169689Skan (import_export_vtable): Remove. 3126169689Skan (import_export_class): Use repo_export_class_p. 3127169689Skan (var_finalized_p): Simplify. 3128169689Skan (maybe_emit_vtables): Simplify. 3129169689Skan (mark_needed): New function. 3130169689Skan (decl_needed_p): Likewise. 3131169689Skan (import_export_decl): Add documentation and consistency checks. 3132169689Skan Use repo_emit_p. Handle virtual tables and RTTI information 3133169689Skan here. 3134169689Skan (import_export_tinfo): Remove. 3135169689Skan (write_out_vars): Call import_export_decl. 3136169689Skan (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted 3137169689Skan whenever one is. 3138169689Skan (finish_file): Use decl_needed_p. Do not call import_export_decl 3139169689Skan for undefined static data members. Do not warn about undefined 3140169689Skan inlines when using a repository. 3141169689Skan (mark_used): Use note_vague_linkage_fn. Always defer template 3142169689Skan instantiations. 3143169689Skan * lex.c (cxx_init): Adjust call to init_repo. Always set 3144169689Skan flag_unit_at_a-time. 3145169689Skan * method.c (synthesize_method): Remove unncessary 3146169689Skan import_export_decl call. 3147169689Skan (implicitly_declare_fn): Use set_linkage_according_to_type. 3148169689Skan * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE. 3149169689Skan * pt.c (instantiate_class_template): Don't redundantly add classes 3150169689Skan to keyed_classes. Don't call repo_template_used. 3151169689Skan (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of 3152169689Skan templates with internal linkage. 3153169689Skan (check_instantiated_args): Adjust call to no_linkage_check. 3154169689Skan (instantiate_template): Use FOR_EACH_CLONE. 3155169689Skan (mark_definable): New function. 3156169689Skan (mark_decl_instantiated): Use it. 3157169689Skan (do_decl_instantiation): Adjust tests for explicit instantiation 3158169689Skan after "extern template". 3159169689Skan (instantiate_class_member): Do not use repo_template_instantiated. 3160169689Skan (do_type_instantiation): Simplify. 3161169689Skan (instantiate_decl): Use mark_definable. Check repo_emit_p. 3162169689Skan Simplify. 3163169689Skan * repo.c (repo_get_id): Remove. 3164169689Skan (original_repo): Remove. 3165169689Skan (IDENTIFIER_REPO_USED): Remove. 3166169689Skan (IDENTIFIER_REPO_CHOSEN): Remove. 3167169689Skan Remove all #if 0'd code. 3168169689Skan (repo_template_used): Remove. 3169169689Skan (repo_template_instantiated): Remove. 3170169689Skan (temporary_obstack_initialized_p): New variable. 3171169689Skan (init_repo): Register with lang_post_pch_load. Avoid creating 3172169689Skan identifiers unnecessarily. Don't use original_repo. Close the 3173169689Skan file here. 3174169689Skan (reopen_repo_file_for_write): Not here. 3175169689Skan (finish_repo): Always write out a new repository file. 3176169689Skan (repo_emit_p): New function. 3177169689Skan (repo_export_class_p): Likewise. 3178169689Skan * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type. 3179169689Skan (involves_incomplete_p): New function. 3180169689Skan (tinfo_base_init): Use it. 3181169689Skan (ptr_initializer): Remove non_public_ptr parameter. 3182169689Skan (ptm_initializer): Likewise. 3183169689Skan (get_pseudo_ti_init): Likewise. 3184169689Skan (unemitted_tinfo_decl_p): Remove. 3185169689Skan (emit_tinfo_decl): Use import_export_decl. 3186169689Skan * semantics.c (expand_body): Move updates of static_ctors and 3187169689Skan static_dtors to ... 3188169689Skan (expand_or_defer_fn): ... here. 3189169689Skan * tree.c (no_linkage_check): Add relaxed_p parameter. 3190169689Skan 3191169689Skan2004-07-28 Eric Christopher <echristo@redhat.com> 3192169689Skan 3193169689Skan * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete. 3194169689Skan 3195169689Skan2004-07-28 Nathan Sidwell <nathan@codesourcery.com> 3196169689Skan 3197169689Skan * cp-tree.h (struct tree_pair_s): New. 3198169689Skan (typedef tree_pair_p): New. 3199169689Skan (DEF_VEC_O(tree_pair_s)): New. 3200169689Skan (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s). 3201169689Skan (CLASSTYPE_VCALL_INDICES): Update documentation. 3202169689Skan * class.c (get_vcall_index): Adjust. 3203169689Skan (add_vcall_offset): Adjust. 3204169689Skan 3205169689Skan2004-07-27 Kelley Cook <kcook@gcc.gnu.org> 3206169689Skan 3207169689Skan * pt.c, typeck.c: Remove spurious carriage returns. 3208169689Skan 3209169689Skan2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3210169689Skan 3211169689Skan PR c++/14429 3212169689Skan * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check 3213169689Skan when the type of ARG is not dependent. 3214169689Skan 3215169689Skan2004-07-26 Geoffrey Keating <geoffk@apple.com> 3216169689Skan 3217169689Skan * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX. 3218169689Skan (lang_specific_driver): If the C++ or math library options don't 3219169689Skan start with '-l', don't count them as added libraries. 3220169689Skan 3221169689Skan2004-07-26 Nathan Sidwell <nathan@codesourcery.com> 3222169689Skan 3223169689Skan * decl.c (xref_basetypes): Adjust base access vector creation. 3224169689Skan * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base 3225169689Skan access accesses. 3226169689Skan * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise. 3227169689Skan 3228169689Skan2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com> 3229169689Skan Brian Ryner <bryner@brianryner.com> 3230169689Skan 3231169689Skan PR c++/15000 3232169689Skan PR c++/9283 3233169689Skan * class.c (check_field_decls): Apply hidden visibility if 3234169689Skan -fvisibility-inlines-hidden and inlined unless otherwise specified 3235169689Skan (build_vtable): Set vtable visibility to class visibility. 3236169689Skan (check_field_decls): Default static member visibility to class 3237169689Skan visibility. 3238169689Skan (check_methods): Default method visibility to class visibility. 3239169689Skan * cp-tree.h: Added CLASSTYPE_VISIBILITY and 3240169689Skan CLASSTYPE_VISIBILITY_SPECIFIED macro. 3241169689Skan * decl.c (duplicate_decls): New logic for merging definition decls 3242169689Skan with declaration decls. Added ignore & warning when non default 3243169689Skan applied to global operator new or delete. 3244169689Skan * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED 3245169689Skan wherever VISIBILITY was changed 3246169689Skan * rtti.c (get_tinfo_decl): Set typeinfo visibility to class 3247169689Skan visibility. 3248169689Skan (tinfo_base_init): Set typeinfo name visibility to class visibility. 3249169689Skan 3250169689Skan2004-07-25 Bernardo Innocenti <bernie@develer.com> 3251169689Skan 3252169689Skan * decl.c: Rename all identifiers named `class' to `cl'. 3253169689Skan * cp-tree.h: Likewise. 3254169689Skan 3255169689Skan2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net> 3256169689Skan 3257169689Skan * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW. 3258169689Skan * typeck2.c (abstract_virtuals_error): Use GGC_NEW. 3259169689Skan * name-lookup.c (binding_entry_make): Use GGC_NEW. 3260169689Skan (binding_table_construct): Use GGC_CNEWVEC. 3261169689Skan (binding_table_new): Use GGC_NEW. 3262169689Skan (cxx_binding_make): Likewise. 3263169689Skan (begin_scope): Likewise. 3264169689Skan (push_to_top_level): Use GCC_CNEW. 3265169689Skan * parser.c (cp_token_cache_new): Likewise. 3266169689Skan (cp_token_cache_push_token): Likewise. 3267169689Skan (cp_lexer_new_main): Likewise. 3268169689Skan (cp_lexer_new_from_tokens): Likewise. 3269169689Skan (cp_parser_context_new): Likewise. 3270169689Skan (cp_parser_new): Likewise. 3271169689Skan (cp_lexer_new_from_tokens): Use GGC_NEWVEC. 3272169689Skan * lex.c (cxx_make_type): Use GGC_CNEW. 3273169689Skan (retrofit_lang_decl): Use GGC_NEWVAR. 3274169689Skan (cxx_dup_lang_specific_decl): Likewise. 3275169689Skan (copy_lang_type): Likewise. 3276169689Skan * decl.c (use_label): Use GGC_NEW instead of ggc_alloc. 3277169689Skan (save_function_data): Likewise. 3278169689Skan (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared. 3279169689Skan (cxx_push_function_context): Likewise. 3280169689Skan 3281169689Skan2004-07-25 Richard Henderson <rth@redhat.com> 3282169689Skan 3283169689Skan * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and 3284169689Skan DECL_IGNORED_P on RESULT_DECL. 3285169689Skan * semantics.c (finalize_nrv): Copy them too. 3286169689Skan 3287169689Skan2004-07-23 Nathan Sidwell <nathan@codesourcery.com> 3288169689Skan 3289169689Skan * search.c (lookup_conversion_operator): Avoid two loops. 3290169689Skan (add_conversions): Remove. 3291169689Skan (check_hidden_convs, split_conversions, 3292169689Skan lookup_conversions_r): New. 3293169689Skan (lookup_conversions): Use lookup_conversions_r. 3294169689Skan 3295169689Skan2004-07-22 Nathan Sidwell <nathan@codesourcery.com> 3296169689Skan 3297169689Skan * pt.c (get_template_base): Check type is completable. 3298169689Skan 3299169689Skan2004-07-21 Eric Christopher <echristo@redhat.com> 3300169689Skan 3301169689Skan * decl.c (poplevel): Inline unused variable checking. 3302169689Skan Change formatting. 3303169689Skan 3304169689Skan2004-07-21 Paolo Bonzini <bonzini@gnu.org> 3305169689Skan 3306169689Skan * typeck.c (build_binary_op): Do not use RDIV_EXPR for 3307169689Skan integer vectors. 3308169689Skan 3309169689Skan2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org> 3310169689Skan 3311169689Skan PR c++/14497 3312169689Skan * pt.c (check_explicit_specialization): Remove extension to accept 3313169689Skan specializations without template headers. Fall-through to normal 3314169689Skan processing. 3315169689Skan 3316169689Skan2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org> 3317169689Skan 3318169689Skan PR c++/509 3319169689Skan * pt.c (determine_specialization): New parameter template_count. 3320169689Skan Disambiguate between member templates and member functions counting 3321169689Skan the template headers. 3322169689Skan (check_explicit_specialization): Update caller. 3323169689Skan (tsubst_friend_function): Likewise. 3324169689Skan 3325169689Skan2004-07-20 Steven Bosscher <stevenb@suse.de> 3326169689Skan 3327169689Skan * cp-tree.def (TINST_LEVEL): Make it an 'x' node. 3328169689Skan * cp-tree.h (tinst_level_t): New tree type. 3329169689Skan (union lang_tree_node): Handle it. 3330169689Skan (TINST_LOCATION): New accessor macro. 3331169689Skan (make_tinst_level): New prototype. 3332169689Skan * cp-lang.c (cp_tree_size): Handle TINST_LEVEL. 3333169689Skan * decl.c (cp_tree_node_structure): Likewise. 3334169689Skan * error.c (print_instantiation_full_context): Use TINST_LOCATION. 3335169689Skan (print_instantiation_partial_context): Likewise. 3336169689Skan * pt.c (pop_tinst_level): Likewise. 3337169689Skan (push_tinst_level): Use make_tinst_level. 3338169689Skan * tree.c (make_tinst_level): New function. 3339169689Skan (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node. 3340169689Skan 3341169689Skan2004-07-20 Mark Mitchell <mark@codesourcery.com> 3342169689Skan 3343169689Skan * parser.c (cp_parser_simple_type_specifier): Fix typo. 3344169689Skan 3345169689Skan PR c++/16637 3346169689Skan * parser.c (cp_parser_simple_type_specifier): Do not record usage 3347169689Skan of globally-qualified names. 3348169689Skan 3349169689Skan2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3350169689Skan 3351169689Skan PR c++/16175 3352169689Skan * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output 3353169689Skan cv qualifier. 3354169689Skan 3355169689Skan2004-07-19 Mark Mitchell <mark@codesourcery.com> 3356169689Skan 3357169689Skan PR c++/16623 3358169689Skan * cp-tree.h (lang_type_class): Add lazy_assignment_op. 3359169689Skan (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro. 3360169689Skan * class.c (add_implicitly_declared_members): Use 3361169689Skan CLASSTYPE_LAZY_ASSIGNMENT_OP. 3362169689Skan * method.c (lazily_declare_fn): Clear 3363169689Skan CLASSTYPE_LAZY_ASSIGNMENT_OP. 3364169689Skan * search.c (lookup_fnfields_1): Check it. 3365169689Skan 3366169689Skan2004-07-20 Nathan Sidwell <nathan@codesourcery.com> 3367169689Skan 3368169689Skan * cp-tree.h (vec_binfo_member): Remove. 3369169689Skan * tree.c (vec_binfo_member): Remove. 3370169689Skan 3371169689Skan * cp-tree.h (struct lang_type_class): Remove vfields field. 3372169689Skan (CLASSTYPE_VFIELDS): Remove. 3373169689Skan (SET_BINFO_NEW_VTABLE_MARKED): Adjust. 3374169689Skan * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS 3375169689Skan handling. 3376169689Skan (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P. 3377169689Skan (finish_struct_1): Remove CLASSTYPE_VFIELDS handling. 3378169689Skan * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P. 3379169689Skan 3380169689Skan2004-07-20 Nathan Sidwell <nathan@codesourcery.com> 3381169689Skan 3382169689Skan * cp-tree.h (DEF_VEC_P(tree)): Remove here. 3383169689Skan (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF): 3384169689Skan Moved to common. 3385169689Skan (BINFO_LANG_SLOTS): Remove. 3386169689Skan * tree.c (copy_binfo): Adjust BINFO creation and accessors. 3387169689Skan * decl.c (xref_basetypes): Adjust BINFO creation and accessors. 3388169689Skan * class.c (check_bases): Adjust BINFO accessors. 3389169689Skan (determine_primary_base, finish_struct_bits, 3390169689Skan maybe_warn_about_overly_private_class, warn_hidden, 3391169689Skan walk_subobject_offsets, propagate_binfo_offsets, end_of_class, 3392169689Skan warn_about_ambiguous_bases, get_vfield_name, 3393169689Skan dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits, 3394169689Skan add_vcall_offset_vtbl_entries_r): Likewise. 3395169689Skan * dump.c (cp_dump_tree): Likewise. 3396169689Skan * init.c (sort_mem_initializers, expand_member_init, build_delete, 3397169689Skan push_base_cleanups): Likewise. 3398169689Skan * method.c (do_build_copy_constructor, do_build_assign_ref, 3399169689Skan synthesize_exception_spec): Likewise. 3400169689Skan name-lookup.c (arg_assoc_class): Likewise. 3401169689Skan * pt.c (instantiate_class_template, 3402169689Skan get_template_base_recursive): Likewise. 3403169689Skan * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise. 3404169689Skan * typeck2.c (process_init_constructor): Likewise. 3405169689Skan * search.c (lookup_base_r, dynamic_cast_base_recurse, 3406169689Skan dfs_access_in_type, dfs_walk_real, look_for_overrides, 3407169689Skan types_overlap_p, copied_binfo, original_binfo): Likewise. 3408169689Skan (binfo_for_vtable): Remove 3409169689Skan 3410169689Skan2004-07-20 Steven Bosscher <stevenb@suse.de> 3411169689Skan 3412169689Skan * cp-tree.h (struct lang_decl_flags): Unify the template_info and 3413169689Skan thunk_alias, and the access and virtual_offset fields. 3414169689Skan (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust. 3415169689Skan * decl.c (finish_case_label): Update c_add_case_node call. 3416169689Skan 3417169689Skan2004-07-19 Mark Mitchell <mark@codesourcery.com> 3418169689Skan 3419169689Skan Revert patch for PR c++/16623. 3420169689Skan 3421169689Skan2004-07-19 Kelley Cook <kcook@gcc.gnu.org> 3422169689Skan 3423169689Skan * except.c: Remove two spurious carriage returns. 3424169689Skan 3425169689Skan2004-07-19 Mark Mitchell <mark@codesourcery.com> 3426169689Skan 3427169689Skan PR c++/16623 3428169689Skan * cp-tree.h (lang_type_class): Add lazy_assignment_op. 3429169689Skan (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro. 3430169689Skan * class.c (add_implicitly_declared_members): Use 3431169689Skan CLASSTYPE_LAZY_ASSIGNMENT_OP. 3432169689Skan * method.c (lazily_declare_fn): Clear 3433169689Skan CLASSTYPE_LAZY_ASSIGNMENT_OP. 3434169689Skan * search.c (lookup_fnfields_1): Check it. 3435169689Skan 3436169689Skan2004-07-19 Nathan Sidwell <nathan@codesourcery.com> 3437169689Skan 3438169689Skan * class.c (add_method): Delay adding the slot until the end. 3439169689Skan (determine_primary_base): Adjust VEC_iterate invokation. 3440169689Skan (resort_type_method_vec, finish_struct_methods, warn_hidden, 3441169689Skan walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases, 3442169689Skan build_vtbl_initializer): Likewise. 3443169689Skan * init.c (sort_mem_initializers, build_delete, push_base_cleanups, 3444169689Skan build_vbase_delete): Likewise. 3445169689Skan * method.c (do_build_copy_constructor): Likewise. 3446169689Skan * name-lookup.c (new_class_binding, print_binding_level, 3447169689Skan poplevel_class, store_class_bindings, push_to_top_level, 3448169689Skan pop_from_top_level): Likewise. 3449169689Skan * pt.c (check_explicit_specialization): Likewise. 3450169689Skan * search.c (lookup_conversion_operator, lookup_fnfields_1, 3451169689Skan get_pure_virtuals, add_conversions, dfs_check_overlap, 3452169689Skan binfo_for_vbase): Likewise. 3453169689Skan 3454169689Skan2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3455169689Skan 3456169689Skan PR c++/12170 3457169689Skan * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only 3458169689Skan innermost set of template arguments during deduction. Simplify. 3459169689Skan 3460169689Skan2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk> 3461169689Skan 3462169689Skan * typeck.c (build_modify_expr, build_x_modify_expr): Set 3463169689Skan TREE_NO_WARNING on assignments with an operator other than '='. 3464169689Skan 3465169689Skan2004-07-10 Steven Bosscher <stevenb@suse.de> 3466169689Skan Joseph S. Myers <jsm@polyomino.org.uk> 3467169689Skan 3468169689Skan * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove. 3469169689Skan * decl2.c (grokfield): Don't check current_class_depth via 3470169689Skan unused TREE_COMPLEXITY. 3471169689Skan * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING 3472169689Skan to avoid the missing parentheses warning. 3473169689Skan Don't set C_SET_EXP_ORIGINAL_CODE. 3474169689Skan 3475169689Skan2004-07-18 Mark Mitchell <mark@codesourcery.com> 3476169689Skan 3477169689Skan * tree.c (no_linkage_helper): Remove. 3478169689Skan (no_linkage_check): Don't use walk_tree_without_duplicates. 3479169689Skan 3480169689Skan * mangle.c (write_expression): Issue a sorry for zero-operand 3481169689Skan functional casts. 3482169689Skan 3483169689Skan2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3484169689Skan 3485169689Skan PR c++/13092 3486169689Skan * init.c (build_offset_ref): Build SCOPE_REF with non-null 3487169689Skan TREE_TYPE for non-dependent names. 3488169689Skan * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF. 3489169689Skan * pt.c (type_dependent_expression_p): Handle SCOPE_REF with 3490169689Skan unknown_type_node as its TREE_TYPE. 3491169689Skan * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK. 3492169689Skan * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression. 3493169689Skan (dump_expr) <SCOPE_REF case>: Likewise. 3494169689Skan 3495169689Skan2004-07-17 Jason Merrill <jason@redhat.com> 3496169689Skan 3497169689Skan PR c++/16115 3498169689Skan * call.c (type_passed_as): Make the invisible reference type 3499169689Skan __restrict. 3500169689Skan * cp-gimplify.c (gimplify_cleanup_stmt): Rename to 3501169689Skan cp_genericize_r. Handle invisible reference lowering. 3502169689Skan (is_invisiref_parm): New fn. 3503169689Skan (cp_genericize): Adjust the types of invisible reference parms. 3504169689Skan Don't repeat the walk for clones. 3505169689Skan * decl.c (store_parm_decls): Don't generate any code for clones. 3506169689Skan 3507169689Skan2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk> 3508169689Skan 3509169689Skan * cp-tree.h (builtin_function): Declare. 3510169689Skan 3511169689Skan2004-07-16 Mark Mitchell <mark@codesourcery.com> 3512169689Skan 3513169689Skan * class.c (finish_struct_methods): Remove unncessary code. 3514169689Skan (add_implicitly_declared_members): Create declarations for default 3515169689Skan constructors and copy constructors lazily. 3516169689Skan * cp-tree.h (lang_type_class): Remove lazy_default_ctor and 3517169689Skan lazy_copy_ctor. 3518169689Skan (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro. 3519169689Skan (CLASSTYPE_LAZY_COPY_CTOR): Likewise. 3520169689Skan * decl2.c (check_classfn): Robustify. 3521169689Skan (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC. 3522169689Skan (locate_ctor): Handle lazy default constructors. 3523169689Skan (locate_copy): Handle lazy copy constructors. 3524169689Skan (implicitly_declare_fn): Make sure we're looking at the 3525169689Skan TYPE_MAIN_VARIANT for a class before creating functions. Don't 3526169689Skan set TYPE_HAS_CONSTRUCTOR. 3527169689Skan (lazily_declare_fn): New function. 3528169689Skan * name-lookup.c (constructor_name_full): Simplify. 3529169689Skan * search.c (lookup_fnfields_1): Lazily create methods, as 3530169689Skan necessary. 3531169689Skan (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC. 3532169689Skan 3533169689Skan2004-07-16 Steven Bosscher <stevenb@suse.de> 3534169689Skan 3535169689Skan * cp-tree.h (struct lang_type): Don't have three GTY options on a 3536169689Skan single bit GTY desc. 3537169689Skan 3538169689Skan2004-07-16 Richard Henderson <rth@redhat.com> 3539169689Skan 3540169689Skan * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die. 3541169689Skan * cp-tree.h (cp_copy_res_decl_for_inlining): Remove. 3542169689Skan * tree.c (cp_copy_res_decl_for_inlining): Remove. 3543169689Skan 3544169689Skan2004-07-16 Nathan Sidwell <nathan@codesourcery.com> 3545169689Skan 3546169689Skan * class.c (finish_struct_bits): Use for loop. 3547169689Skan (propagate_binfo_offsets): Do primary binfo outside of loop. 3548169689Skan 3549169689Skan PR c++/16583 3550169689Skan * dump.c (cp_dump_tree): Don't dump the bases if there's no 3551169689Skan binfo. 3552169689Skan 3553169689Skan * pt.c (tsubst) <TREE_BINFO case>: We should never get here. 3554169689Skan 3555169689Skan2004-07-15 Mark Mitchell <mark@codesourcery.com> 3556169689Skan 3557169689Skan * cp-tree.h (lang_type_class): Remove has_real_assign_ref and 3558169689Skan has_abstract_assign_ref. Make methods a VEC(tree) *. 3559169689Skan (TYPE_HAS_CONST_ASSIGN_REF): Add documentation. 3560169689Skan (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC. 3561169689Skan (CLASSTYPE_DESTRUCTORS): Likewise. 3562169689Skan (TYPE_HAS_REAL_ASSIGN_REF): Remove. 3563169689Skan (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise. 3564169689Skan (add_method): Change prototoype. 3565169689Skan * class.c (add_method): Remove error_p parameter. Adjust for 3566169689Skan changes to CLASSTYPE_METHOD_VEC. 3567169689Skan (handle_using_decl): Adjust call to add_method. 3568169689Skan (maybe_warn_about_overly_private_class): Adjust for 3569169689Skan changes to CLASSTYPE_METHOD_VEC. 3570169689Skan (resort_type_method_vec): Likewise. 3571169689Skan (finish_struct_methods): Likewise. 3572169689Skan (check_for_override): Likewise. 3573169689Skan (warn_hidden): Likewise. 3574169689Skan (add_implicitly_declared_members): Defer creation of assignment 3575169689Skan operators. Adjust call to add_method. 3576169689Skan (clone_function_decl): Adjust call to add_method. 3577169689Skan (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF. 3578169689Skan (finish_struct_1): Use CLASSTYPE_DESTRUCTORS. 3579169689Skan * decl.c (grok_special_member_properties): Don't set 3580169689Skan TYPE_HAS_ABSTRACT_ASSIGN_REF. 3581169689Skan * decl2.c (check_classfn): Adjust for 3582169689Skan changes to CLASSTYPE_METHOD_VEC. 3583169689Skan * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS. 3584169689Skan (locate_ctor): Use CLASSTYPE_CONSTRUCTORS. 3585169689Skan (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC. 3586169689Skan (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call 3587169689Skan cp_finish_decl. 3588169689Skan * pt.c (check_explicit_specialization): Adjust for 3589169689Skan changes to CLASSTYPE_METHOD_VEC. 3590169689Skan (instantiate_class_template): Do not set 3591169689Skan TYPE_HAS_ABSTRACT_ASSIGN_REF. 3592169689Skan * ptree.c (cxx_print_type): Don't try to print 3593169689Skan CLASSTYPE_METHOD_VEC. 3594169689Skan * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS. 3595169689Skan * search.c (lookup_field_r): Adjust for 3596169689Skan changes to CLASSTYPE_METHOD_VEC. 3597169689Skan (lookup_fnfields): Likewise. 3598169689Skan (lookup_conversion_operator): Likewise. 3599169689Skan (lookup_fnfields_1): Likewise. Create assignment operators 3600169689Skan lazily. 3601169689Skan (look_for_overrides_here): Adjust for 3602169689Skan changes to CLASSTYPE_METHOD_VEC. 3603169689Skan (add_conversions): Likewise. 3604169689Skan * semantics.c (finish_member_declaration): Adjust call to add_method. 3605169689Skan 3606169689Skan2004-07-15 Jason Merrill <jason@redhat.com> 3607169689Skan 3608169689Skan * cp-lang.c (cxx_types_compatible_p): To the middle-end, 3609169689Skan references and pointers are compatible. 3610169689Skan 3611169689Skan2004-07-15 Nathan Sidwell <nathan@codesourcery.com> 3612169689Skan 3613169689Skan * decl.c (xref_basetypes): Refactor. 3614169689Skan * tree.c (copy_base_binfos): Replace with ... 3615169689Skan (copy_binfo): ... this. Deep copy the given binfo, (not the just 3616169689Skan bases of the given base). 3617169689Skan * cp-tree.h (copy_base_binfo): Remove. 3618169689Skan (copy_binfo): Declare. 3619169689Skan 3620169689Skan2004-07-15 Mark Mitchell <mark@codesourcery.com> 3621169689Skan 3622169689Skan * name-lookup.c (set_inherited_value_binding_p): Add class_type 3623169689Skan parameter. 3624169689Skan (get_class_binding): Adjust. 3625169689Skan (push_class_level_binding): Don't use set_inherited_value_binding_p. 3626169689Skan 3627169689Skan2004-07-15 Nathan Sidwell <nathan@codesourcery.com> 3628169689Skan 3629169689Skan * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here. 3630169689Skan * decl.c (xref_basetypes): Set it here. 3631169689Skan 3632169689Skan * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here. 3633169689Skan Don't check for incomplete base. 3634169689Skan (get_vfield_name): Simplify while loop. 3635169689Skan * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here. 3636169689Skan 3637169689Skan2004-07-14 Mark Mitchell <mark@codesourcery.com> 3638169689Skan 3639169689Skan * lex.c (cxx_make_type): Remove call to get_pointer_type. 3640169689Skan 3641169689Skan * cp-tree.h (IDENTIFIER_VALUE): Remove. 3642169689Skan (BINFO_PUSHDECLS_MARKED): Likewise. 3643169689Skan (maybe_inject_for_scope_var): Likewise. 3644169689Skan (push_class_decls): Likewise. 3645169689Skan * name-lookup.h (push_class_binding): Remove. 3646169689Skan (innermost_non_namespace_value): New function. 3647169689Skan (outer_binding): Likewise. 3648169689Skan * class.c (add_method): Push bindings before adding to 3649169689Skan TYPE_METHODS. 3650169689Skan (restore_class_cache): Do not restore class_shadowed. 3651169689Skan (pushclass): Do not add USING_DECLs. Do not call 3652169689Skan push_class_decls. 3653169689Skan * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c. 3654169689Skan * decl.c (pushdecl): Use outer_binding. 3655169689Skan (poplevel): Set the scope for an out-of-scope for-loop declaration 3656169689Skan appropriately. 3657169689Skan (cp_finish_decl): Don't call maybe_inject_for_scope_var. 3658169689Skan * name-lookup.c (new_class_binding): New function. 3659169689Skan (push_binding): Use it. 3660169689Skan (pushdecl): Use innermost_non_namespace_value. 3661169689Skan (maybe_inject_for_scope_var): Remove. 3662169689Skan (push_class_binding): Remove. 3663169689Skan (set_inherited_value_binding_p): New function. 3664169689Skan (get_class_binding): New function. 3665169689Skan (push_class_level_binding): Assert that the current_class_type is 3666169689Skan being defined. 3667169689Skan (outer_binding): New function. 3668169689Skan (innermost_non_namespace_value): Likewise. 3669169689Skan (lookup_name_real): Use outer_binding. 3670169689Skan (lookup_name_current_level): Ignore out-of-scope variables. 3671169689Skan * pt.c (check_template_shadow): Use innermost_non_namespace_value. 3672169689Skan (lookup_template_class): Likewise. 3673169689Skan * search.c (dfs_push_type_decls): Remove. 3674169689Skan (dfs_push_decls): Likewise. 3675169689Skan (setup_class_bindings): Likewise. 3676169689Skan (lookup_field_1): Handle USING_DECLs from dependent scopes. 3677169689Skan (marked_pushdecls_p): Remove. 3678169689Skan (unmarked_pushdecls_p): Remove. 3679169689Skan (marked_identifiers): Remove. 3680169689Skan (setup_class_bindings): Remove. 3681169689Skan (dfs_push_type_decls): Remove. 3682169689Skan (dfs_push_decls): Remove. 3683169689Skan (push_class_decls): Remove. 3684169689Skan 3685169689Skan2004-07-13 Mark Mitchell <mark@codesourcery.com> 3686169689Skan 3687169689Skan PR c++/16518 3688169689Skan PR c++/16337 3689169689Skan * decl.c (grokvardecl): Make declspecs parameter const. 3690169689Skan (grokdeclarator): Likewise. Adjust accordingly. 3691169689Skan * decl.h (grokdeclarator): Adjust declaration. 3692169689Skan * parser.c (cp_parser_init_declarator): Do not clear 3693169689Skan decl_specifiers->attributes. 3694169689Skan 3695169689Skan * cp-tree.h (lang_identifier): Remove class_value. 3696169689Skan (IDENTIFIER_CLASS_VALUE): Remove. 3697169689Skan (pop_class_decls): Likewise. 3698169689Skan (init_search_processing): Likewise. 3699169689Skan * class.c (handle_using_decl): Use lookup_member, not 3700169689Skan IDENTIFIER_CLASS_VALUE. 3701169689Skan (restore_class_cache): New function, split out from ... 3702169689Skan (pushclass): ... here. Do not call clear_identifier_class_values. 3703169689Skan (invalidate_class_lookup_cache): Do not clear 3704169689Skan IDENTIFIER_CLASS_VALUE. 3705169689Skan (popclass): Do not call pop_class_decls. 3706169689Skan (maybe_note_name_used_in_class): Do not save names looked up after 3707169689Skan the class is complete. Use lookup_member, not 3708169689Skan IDENTIFIER_CLASS_VALUE. 3709169689Skan * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c. 3710169689Skan * decl.c (cxx_init_decl_processing): Do not call 3711169689Skan init_search_processing. 3712169689Skan * method.c (do_build_copy_constructor): Remove unnecessary code. 3713169689Skan (do_build_assign_ref): Likewise. 3714169689Skan * name-lookup.c (pushdecl): Use lookup_member, not 3715169689Skan IDENTIFIER_CLASS_VALUE. 3716169689Skan (set_identifier_type_value_with_scope): Set TREE_TYPE on the 3717169689Skan type_shadowed list. 3718169689Skan (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE. 3719169689Skan (push_class_binding): Do not set it. 3720169689Skan (clear_identifier_class_values): Remove. 3721169689Skan (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE. 3722169689Skan (store_binding): Do not save it. 3723169689Skan (pop_from_top_level): Do not restore it. 3724169689Skan * name-lookup.h (cxx_saved_binding): Remove class_value. 3725169689Skan (clear_identifier_class_values): Remove. 3726169689Skan * ptree.c (cxx_print_identifier): Do not print 3727169689Skan IDENTIFIER_CLASS_VALUE. 3728169689Skan * search.c (search_obstack): Remove. 3729169689Skan (push_stack_level): Remove. 3730169689Skan (pop_stack_level): Remove. 3731169689Skan (search_level): Remove. 3732169689Skan (search_stack): Remove. 3733169689Skan (lookup_member): Don't check IDENTIFIER_CLASS_VALUE. 3734169689Skan (setup_class_bindings): Use IDENTIFIER_MARKED, not 3735169689Skan IDENTIFIER_CLASS_VALUE. 3736169689Skan (marked_identifiers): New variable. 3737169689Skan (push_class_decls): Clear IDENTIFIER_MARKED. 3738169689Skan (pop_class_decls): Don't call pop_search_level. 3739169689Skan (init_search_processing): Remove. 3740169689Skan 3741169689Skan2004-07-12 Mark Mitchell <mark@codesourcery.com> 3742169689Skan 3743169689Skan * cp-tree.h (get_aggr_typedef): Remove. 3744169689Skan * init.c (get_aggr_typedef): Likewise. 3745169689Skan 3746169689Skan * name-lookup.c (push_class_level_binding): Simplify. 3747169689Skan 3748169689Skan2004-07-12 Andrew Pinski <apinski@apple.com> 3749169689Skan 3750169689Skan PR c++/16475 3751169689Skan Revert: 3752169689Skan 2004-07-07 H.J. Lu <hongjiu.lu@intel.com> 3753169689Skan PR c++/16276 3754169689Skan * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo 3755169689Skan is not public. 3756169689Skan 3757169689Skan2004-07-12 Eric Christopher <echristo@redhat.com> 3758169689Skan 3759169689Skan * parser.c (cp_parser_class_head): Remove unused variable. 3760169689Skan 3761169689Skan2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org> 3762169689Skan 3763169689Skan * decl.c (grok_op_properties): Reject [de-]allocation functions 3764169689Skan declared in a namespace, or declared as static. 3765169689Skan 3766169689Skan2004-07-12 Nathan Sidwell <nathan@codesourcery.com> 3767169689Skan 3768169689Skan * cp-tree.h (make_binfo): Remove. 3769169689Skan * decl.c (xref_basetypes): Use make_tree_binfo directly. 3770169689Skan * tree.h (copy_base_binfos): Likewise. 3771169689Skan (make_binfo): Remove. 3772169689Skan 3773169689Skan * call.c (build_user_type_conversion_1, build_new_op, 3774169689Skan check_constructor_callable, build_temp, 3775169689Skan perform_direct_initialization_of_possible): Pass type directly to 3776169689Skan lookup_fnfields & build_special_member_call. 3777169689Skan (build_special_member_call): Accept a type, and complete it. 3778169689Skan * class.c (finish_stuct_bits): Copy the BINFOs here. 3779169689Skan * cvt.c (ocp_convert): Pass type directly to 3780169689Skan build_special_member_call. 3781169689Skan * decl.c (build_ptrmemfunc_type): Call xref_bastypes here. 3782169689Skan (xref_basetypes): Allocate the binfo here. Adjust. 3783169689Skan * init.c (build_init, build_new_1): Pass type directly to 3784169689Skan build_special_member_call. 3785169689Skan * lex.c (cxx_make_type): Do not allocate binfo here. 3786169689Skan * name-lookup.c (arg_assoc_class): Incomplete types have no binfo. 3787169689Skan * parser.c (cp_parser_class_head): Always call xref_basetypes. 3788169689Skan * pt.c (instantiate_class_template): Likewise. Inhibit access 3789169689Skan checking for template friends. 3790169689Skan * ptree.c (cxx_print_type): Adjust record printing. 3791169689Skan * search.c (lookup_base): When taking a type, complete it before 3792169689Skan looking for a binfo. 3793169689Skan (lookup_member): Delay completing a type. 3794169689Skan (push_class_decls): Don't walk an incomplete type. 3795169689Skan (lookup_conversions): Likewise. 3796169689Skan * semantics.c (finish_stmt_expr_expr): Pass type directly to 3797169689Skan build_special_member_call. 3798169689Skan * tree.c (copy_base_binfos): Adjust. 3799169689Skan (make_binfo): Likewise. 3800169689Skan * typeck.c (build_modify_expr): Pass type directly to 3801169689Skan build_special_member_call. 3802169689Skan * typeck2.c (process_init_constructor): Check a binfo exists. 3803169689Skan (build_m_component_ref): Allow accessing an incomplete type. 3804169689Skan (build_functional_cast): Pass type directly to 3805169689Skan build_special_member_call. 3806169689Skan 3807169689Skan2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org> 3808169689Skan 3809169689Skan PR c++/2204 3810169689Skan * config-lang.in (gtfiles): Add typeck2.c. 3811169689Skan * Make-lang.in: Tweak typeck2.c dependencies, and add rule for 3812169689Skan gt-cp-typeck2.h. 3813169689Skan * cp-tree.h: Declare complete_type_check_abstract. 3814169689Skan * typeck2.c (pat_calc_hash, pat_compare, 3815169689Skan complete_type_check_abstract): New functions. 3816169689Skan (abstract_virtuals_error): If the type is abstract, register the 3817169689Skan declaration within abstract_pending_vars for further checks. 3818169689Skan Inspect also dependent types. Handle IDENTIFIER_NODEs as decl. 3819169689Skan * decl.c (cp_finish_decl): Do not strip array types. 3820169689Skan (create_array_type_for_decl): Check for abstractness of the element 3821169689Skan type. 3822169689Skan (complete_vars): Call complete_type_check_abstract. 3823169689Skan * class.c (finish_struct): Prepare a list of virtual functions for 3824169689Skan template types, and call complete_vars on it to check for abstractness. 3825169689Skan 3826169689Skan2004-07-12 Paolo Bonzini <bonzini@gnu.org> 3827169689Skan 3828169689Skan PR tree-optimization/14107 3829169689Skan * decl.c (finish_function): Remove temporary band-aid. 3830169689Skan 3831169689Skan2004-07-11 Mark Mitchell <mark@codesourcery.com> 3832169689Skan 3833169689Skan * call.c (build_operator_new_call): Avoid using push_to_top_level. 3834169689Skan (build_new_op): Adjust call to lookup_function_nonclass. 3835169689Skan * name-lookup.c (identifier_type_value): Adjust call to 3836169689Skan lookup_name_real. 3837169689Skan (lookup_name_real): Add block_p parameter. 3838169689Skan (lookup_name_nonclass): Adjust call to lookup_name_real. 3839169689Skan (lookup_function_nonclass): Likewise. 3840169689Skan (lookup_name): Likewise. 3841169689Skan * name-lookup.h (lookup_name_real): Change prototype. 3842169689Skan (lookup_name_nonclass): Likewise. 3843169689Skan * parser.c (cp_parser_lookup_name): Likewise. 3844169689Skan 3845169689Skan * cp-tree.h (saved_scope): Make old_bindings a vector. 3846169689Skan (unuse_fields): Remove. 3847169689Skan * name-lookup.h (cxx_saved_binding): Define it. 3848169689Skan * class.c (pushclass): Don't use unuse_fields. 3849169689Skan * name-lookup.c (cxx_saved_binding_make): Remove. 3850169689Skan (store_binding): Add new bindings to a vector, using an 3851169689Skan accumulator style, rather than adding them to a list. 3852169689Skan (store_bindings): Adjust accordingly. 3853169689Skan (store_class_bindings): Likewise. 3854169689Skan (push_to_top_level): Likewise. 3855169689Skan (pop_from_top_level): Likewise. 3856169689Skan * optimize.c (maybe_clone_body): Must push_to_top_level and 3857169689Skan pop_from_top_level calls outside of loop. 3858169689Skan * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope 3859169689Skan calls here from cp_parser_late_parsing_default_args. 3860169689Skan (cp_parser_save_default_args): Record the class type in which the 3861169689Skan function is declared. 3862169689Skan (cp_parser_late_parsing_default_args): Do not call 3863169689Skan push_nested_class/pop_nested_class. 3864169689Skan * search.c (dfs_unuse_fields): Remove. 3865169689Skan (unuse_fields): Remove. 3866169689Skan 3867169689Skan2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk> 3868169689Skan 3869169689Skan * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL, 3870169689Skan LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove. 3871169689Skan * cp-tree.h (poplevel): Declare. 3872169689Skan (set_block): Remove. 3873169689Skan * decl.c (set_block): Remove. 3874169689Skan 3875169689Skan2004-07-10 Mike Stump <mrs@apple.com> 3876169689Skan 3877169689Skan * decl2.c (import_export_class): Never export/import vtables 3878169689Skan with inline key functions. 3879169689Skan 3880169689Skan2004-07-09 Steven Bosscher <stevenb@suse.de> 3881169689Skan 3882169689Skan * typeck.c (c_expand_asm_operands): Remove. 3883169689Skan 3884169689Skan2004-07-09 Mike Stump <mrs@apple.com> 3885169689Skan 3886169689Skan * typeck.c (build_class_member_access_expr): Skip null deref 3887169689Skan warning when we don't dereference it. 3888169689Skan 3889169689Skan2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org> 3890169689Skan 3891169689Skan PR c++/8211 3892169689Skan PR c++/16165 3893169689Skan * class.c (check_field_decls): Improve -Weffc++ warning: do not 3894169689Skan warn for pointers to functions/members, or for classes without 3895169689Skan destructors. 3896169689Skan 3897169689Skan2004-07-08 Mark Mitchell <mark@codesourcery.com> 3898169689Skan 3899169689Skan * name-lookup.h (struct cp_binding_level): Update documentation 3900169689Skan for class_shadowed. 3901169689Skan 3902169689Skan2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org> 3903169689Skan 3904169689Skan PR c++/16169 3905169689Skan * typeck.c (check_return_expr): Improve -Weffc++ warning: handle 3906169689Skan returning CALL_EXPR, and non-reference return type. 3907169689Skan 3908169689Skan2004-07-08 Nathan Sidwell <nathan@codesourcery.com> 3909169689Skan 3910169689Skan * name-lookup.c (push_binding): Use VEC_reserve. 3911169689Skan 3912169689Skan2004-07-08 Richard Henderson <rth@redhat.com> 3913169689Skan 3914169689Skan * cp-tree.h (expand_eh_spec_block): Remove. 3915169689Skan 3916169689Skan2004-07-07 Mark Mitchell <mark@codesourcery.com> 3917169689Skan 3918169689Skan * cp-tree.h (saved_scope): Remove x_previous_class_type and 3919169689Skan x_previous_class_values; add x_previous_class_level. 3920169689Skan (previous_class_type): Remove. 3921169689Skan (previous_class_values): Remove. 3922169689Skan (previous_class_level): New macro. 3923169689Skan * class.c (pushclass): Restore the identifier cache more 3924169689Skan expeditiously. 3925169689Skan (invalidate_class_lookup_cache): Use vector for class_shadowed and 3926169689Skan previous_class_values. 3927169689Skan * decl.c (poplevel): Likewise. 3928169689Skan * name-lookup.c (cxx_binding_init): New function. 3929169689Skan (cxx_binding_make): Use it. 3930169689Skan (push_binding): For a binding in a class level, use a vector of 3931169689Skan cp_class_binding nodes. 3932169689Skan (push_binding_level): New function. 3933169689Skan (begin_scope): Use it. 3934169689Skan (leave_scope): Do not put class binding levels on the free list. 3935169689Skan (print_binding_level): Adjust for the fact that class_shadowed is 3936169689Skan a vector. 3937169689Skan (poplevel_class): Likewise. 3938169689Skan (clear_identifier_class_values): Likewise. 3939169689Skan (push_class_level_binding): Likewise. 3940169689Skan (set_class_shadows): Remove. 3941169689Skan (store_binding): New function. 3942169689Skan (store_class_bindings): New function. 3943169689Skan (push_to_top_level): Use store_class_bindings as appropriate. 3944169689Skan (pop_from_top_level): Use previous_class_level, not 3945169689Skan previous_class_type. 3946169689Skan * name-lookup.h (cp_class_binding): New type. 3947169689Skan (cp_binding_level): Use a vector object for class_shadowed. 3948169689Skan (push_binding_level): Declare. 3949169689Skan (set_class_shadows): Remove. 3950169689Skan 3951169689Skan2004-07-07 Andrew Pinski <apinski@apple.com> 3952169689Skan 3953169689Skan * class.c (instantiate_type): BUFFER_REF is dead. 3954169689Skan * lex.c (init_operators): IN_EXPR is dead. 3955169689Skan 3956169689Skan2004-07-07 Jason Merrill <jason@redhat.com> 3957169689Skan 3958169689Skan PR c++/16334 3959169689Skan * call.c (build_new_op): Give overload warnings for built-in 3960169689Skan candidates. 3961169689Skan 3962169689Skan2004-07-07 H.J. Lu <hongjiu.lu@intel.com> 3963169689Skan 3964169689Skan PR c++/16276 3965169689Skan * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo 3966169689Skan is not public. 3967169689Skan 3968169689Skan2004-07-07 Nathan Sidwell <nathan@codesourcery.com> 3969169689Skan 3970169689Skan * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove. 3971169689Skan * class.c (build_primary_vtable, check_bases, 3972169689Skan determine_primary_base, finish_struct_bits, 3973169689Skan maybe_warn_about_overly_private_class, dfs_find_final_overrider_q, 3974169689Skan get_basefndecls, warn_hidden, walk_subobject_offsets, 3975169689Skan build_base_fields, create_vtable_ptr, propagate_binfo_offsets, 3976169689Skan layout_virtual_bases, end_of_class, warn_about_ambiguous_bases, 3977169689Skan finish_struct_1, get_vfield_name, contains_empty_class_p, 3978169689Skan dump_class_hierarchy_r, finish_vtbls, build_vtt_inits, 3979169689Skan dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits, 3980169689Skan add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust 3981169689Skan BINFO macros. 3982169689Skan * decl.c (xref_basetypes): Likewise. 3983169689Skan * dump.c (cp_dump_tree): Likewise. 3984169689Skan * error.c (dump_expr): Likewise. 3985169689Skan * init.c (sort_mem_initializers, expand_member_init, 3986169689Skan push_base_cleanups): Likewise. 3987169689Skan * method.c (do_build_copy_constructor, do_build_assign_reg, 3988169689Skan synthesize_exception_spec): Likewise. 3989169689Skan * name-lookup.c (arg_assoc_class): Likewise. 3990169689Skan * pt.c (instantiate_class_template, tsubst, 3991169689Skan get_template_base_recursive): Likewise. 3992169689Skan * ptree.c (cxx_print_type): Likewise. 3993169689Skan * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise. 3994169689Skan * search.c (lookup_base_r, dynamic_cast_base_recurse, 3995169689Skan dfs_access_in_type, access_in_type, lookup_field_queue_p, 3996169689Skan bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp, 3997169689Skan marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp, 3998169689Skan dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet, 3999169689Skan binfo_for_vtable, copied_binfo, original_binfo): Likewise 4000169689Skan * tree.c (copy_base_binfos, make_binfo): Likewise. 4001169689Skan * typeck.c (commmon_base_type): Likewise 4002169689Skan * typeck2.c (process_init_constructor): Likewise 4003169689Skan 4004169689Skan2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk> 4005169689Skan 4006169689Skan * decl.c (check_tag_decl): Name redeclared type in diagnostic. 4007169689Skan 4008169689Skan2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org> 4009169689Skan 4010169689Skan PR c++/3671 4011169689Skan * pt.c (convert_nontype_argument): Disallow conversions between 4012169689Skan different enumeration types. 4013169689Skan 4014169689Skan2004-07-06 Nathan Sidwell <nathan@codesourcery.com> 4015169689Skan 4016169689Skan * cp-tree.h (BINFO_MARKED): Remove. 4017169689Skan (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED, 4018169689Skan BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P, 4019169689Skan BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n. 4020169689Skan (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P. 4021169689Skan * class.c (build_base_path): Use BINFO_VIRTUAL_P. 4022169689Skan (mark_primary_bases, determine_primary_base, base_derived_from, 4023169689Skan dfs_find_final_overrider, dfs_find_final_overrider_q, 4024169689Skan dfs_find_inal_overrider_post, update_vtable_entry_for_fn, 4025169689Skan dfs_modify_vtables, walk_subobject_offsets, 4026169689Skan layout_nonempty_base_or_field, build_base_field, 4027169689Skan build_base_fields, propagate_binfo_offsets, layout_virtual_bases, 4028169689Skan end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable, 4029169689Skan finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits, 4030169689Skan build_ctor_vtbl_group, accumulate_vtble_inits, 4031169689Skan dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries, 4032169689Skan build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r, 4033169689Skan add_vcall_offset_vtbl_entries_1): Likewise. 4034169689Skan * decl.c (xref_basetypes): Incomming virtual base indicated by 4035169689Skan TREE_TYPE. Adjust. 4036169689Skan * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P. 4037169689Skan * init.c (finish_init_stmts, sort_mem_initializers, 4038169689Skan emit_mem_initializers, build_vtble_address, expand_member_init, 4039169689Skan push_base_cleanups): Likewise. 4040169689Skan * method.c (do_build_copy_constructor): Likewise. 4041169689Skan * pt.c (instantiate_class_template, 4042169689Skan get_template_base_recursive): Likewise. 4043169689Skan * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init, 4044169689Skan get_pseudo_ti_desc): Likewise. 4045169689Skan * search.c (lookup_base_r, dynamic_cast_base_recurse, 4046169689Skan binfo_from_vbase, binfo_via_virtual, copied_binfo, 4047169689Skan original_binfo): Likewise. 4048169689Skan * semantics.c (finish_base_specifier): Virtualness is indicated 4049169689Skan by TREE_TYPE. 4050169689Skan * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P. 4051169689Skan 4052169689Skan2004-07-06 Mark Mitchell <mark@codesourcery.com> 4053169689Skan 4054169689Skan Revert: 4055169689Skan 2004-06-24 Jason Merrill <jason@redhat.com> 4056169689Skan PR c++/16115 4057169689Skan * decl.c (grokparms): Give the PARM_DECL reference type if the 4058169689Skan parameter is passed by invisible reference. 4059169689Skan 4060169689Skan2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 4061169689Skan 4062169689Skan * cp-lang.c (cp_var_mod_type_p): Add extra arg. 4063169689Skan * decl.c (grokdeclarator): Extra arg to variably_modified_type_p. 4064169689Skan * pt.c (check_instantiated_args, unify): Likewise. 4065169689Skan 4066169689Skan2004-07-05 Phil Edwards <phil@codesourcery.com> 4067169689Skan 4068169689Skan * Make-lang.in (check-c++, lang_checks): Add some comments. 4069169689Skan 4070169689Skan2004-07-05 Zack Weinberg <zack@codesourcery.com> 4071169689Skan 4072169689Skan * cp-mudflap.c: Delete file. 4073169689Skan * Makefile.in: Remove all references to cp-mudflap.o. 4074169689Skan 4075169689Skan2004-07-05 Zack Weinberg <zack@codesourcery.com> 4076169689Skan 4077169689Skan * decl.c (cxx_init_decl_processing): Call 4078169689Skan build_common_tree_nodes before creating the global NAMESPACE_DECL. 4079169689Skan 4080169689Skan2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org> 4081169689Skan 4082169689Skan PR c++/2518 4083169689Skan * call.c (build_operator_new_call): Look only at global scope. 4084169689Skan 4085169689Skan2004-07-05 Nathan Sidwell <nathan@codesourcery.com> 4086169689Skan 4087169689Skan * call.c (enforce_access): Expect TREE_BINFO. 4088169689Skan * class.c (binfo_ctor_vtable): Check TREE_BINFO. 4089169689Skan * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove. 4090169689Skan (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF): 4091169689Skan Adjust. 4092169689Skan (BINFO_LANG_ELTS): Remove. 4093169689Skan (BINFO_LANG_SLOTS): New. 4094169689Skan (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1. 4095169689Skan (CLASSTYPE_TEMPLATE_INFO): Adjust. 4096169689Skan * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case. 4097169689Skan * search.c (lookup_member): Check TREE_BINFO. 4098169689Skan * semantics.c (perform_or_defer_access_check): Likewise. 4099169689Skan (check_accessibility_of_qualified_id): Check 4100169689Skan deferred_access_no_check. 4101169689Skan * tree.c (make_binfo): Use make_tree_binfo. 4102169689Skan 4103169689Skan2004-07-04 Mark Mitchell <mark@codesourcery.com> 4104169689Skan 4105169689Skan * method.c (implicitly_declare_fn): Set linkage of generated 4106169689Skan functions. 4107169689Skan 4108169689Skan2004-07-04 Richard Henderson <rth@redhat.com> 4109169689Skan 4110169689Skan * typeck.c (cxx_mark_addressable): Don't put_var_into_stack. 4111169689Skan 4112169689Skan2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net> 4113169689Skan 4114169689Skan PR c++/3761 4115169689Skan * name-lookup.c (push_class_level_binding): Don't pass a 4116169689Skan TREE_LIST of ambiguous names to check_template_shadow as it 4117169689Skan only handles declarations. Instead, pull the declaration 4118169689Skan out and pass that. 4119169689Skan 4120169689Skan2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org> 4121169689Skan 4122169689Skan PR c++/14971 4123169689Skan * pt.c (check_explicit_specialization): Clarify error message. 4124169689Skan 4125169689Skan2004-07-02 Richard Henderson <rth@redhat.com> 4126169689Skan 4127169689Skan * tree.c (cp_unsave_r): Update remap_save_expr call. 4128169689Skan 4129169689Skan2004-07-02 Mark Mitchell <mark@codesourcery.com> 4130169689Skan 4131169689Skan PR c++/16240 4132169689Skan * mangle.c (write_template_arg): Correct mangling. 4133169689Skan 4134169689Skan PR c++/16297 4135169689Skan * decl.c (grokdeclarator): Robustify. 4136169689Skan 4137169689Skan2004-07-01 Richard Henderson <rth@redhat.com> 4138169689Skan 4139169689Skan * class.c (fixed_type_or_null): Don't handle RTL_EXPR. 4140169689Skan * method.c (synthesize_method): Don't clear_last_expr. 4141169689Skan * name-lookup.c (maybe_push_cleanup_level): Likewise. 4142169689Skan 4143169689Skan2004-07-01 Nick Clifton <nickc@redhat.com> 4144169689Skan 4145169689Skan * decl2.c (import_export_class): Invoke the 4146169689Skan import_export_class field in the gcc_target structure if it is not 4147169689Skan empty. 4148169689Skan 4149169689Skan2004-06-30 Richard Henderson (rth@redhat.com> 4150169689Skan 4151169689Skan * decl.c (start_preparsed_function): Don't set immediate_size_expand. 4152169689Skan * method.c (use_thunk): Likewise. 4153169689Skan 4154169689Skan2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk> 4155169689Skan 4156169689Skan * call.c (build_over_call), typeck.c (build_function_call): Call 4157169689Skan check_function_arguments instead of check_function_format. 4158169689Skan 4159169689Skan2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk> 4160169689Skan 4161169689Skan * call.c (build_over_call), typeck.c (build_function_call): Update 4162169689Skan calls to check_function_format. 4163169689Skan 4164169689Skan2004-06-30 Richard Henderson <rth@redhat.com> 4165169689Skan 4166169689Skan * call.c (build_over_call): Use __builtin_memcpy for copying 4167169689Skan CLASS_AS_BASE rather than funny casting. 4168169689Skan 4169169689Skan2004-06-30 Richard Henderson <rth@redhat.com> 4170169689Skan 4171169689Skan * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and 4172169689Skan TYPE_SIZE_UNIT of full_type. 4173169689Skan 4174169689Skan2004-06-30 Per Bothner <per@bothner.com> 4175169689Skan 4176169689Skan Conditionally compile support for --enable-mapped_location. 4177169689Skan * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case. 4178169689Skan * decl2.c: If USE_MAPPED_LOCATION, don't do some line number 4179169689Skan adjustments - which I don't understand. 4180169689Skan * error.c (dump_decl): Rename "<interrnal>" to "<built-in>". 4181169689Skan * error.c: Use LOCATION_FILE and EXPR_LOCATION macros. 4182169689Skan (print_instantiation_partial_context): Use expand_location. 4183169689Skan * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro. 4184169689Skan * name-lookup.c: Likewise. 4185169689Skan * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION. 4186169689Skan * name-lookup.c: Use input_line macro. 4187169689Skan * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION. 4188169689Skan (cp_parser_statement): Rename locaal variable statement_locus to 4189169689Skan statement_location and use SET_EXPR_LOCATION macro. 4190169689Skan * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros. 4191169689Skan * tree.c (cp_walk_subtrees): Likewise. 4192169689Skan 4193169689Skan2004-06-29 Per Bothner <per@bothner.com> 4194169689Skan 4195169689Skan * tree.c (build_min_nt, build_min, build_min_non_dep): 4196169689Skan Don't set TREE_COMPLEXITY from input_line. 4197169689Skan 4198169689Skan2004-06-29 Paul Brook <paul@codesourcery.com> 4199169689Skan 4200169689Skan * init.c: Include target.h. 4201169689Skan (get_cookie_size): Remove and replace with target hook. 4202169689Skan Update callers. 4203169689Skan (build_new_1): Store the element size in the cookie. 4204169689Skan 4205169689Skan2004-06-29 Nathan Sidwell <nathan@codesourcery.com> 4206169689Skan 4207169689Skan PR c++/16260 4208169689Skan * parser.c (cp_parser_template_declaration_after_export): Disable 4209169689Skan access checks here ... 4210169689Skan (cp_parser_class_specifier): ... not here. 4211169689Skan 4212169689Skan2004-06-28 Nathan Sidwell <nathan@codesourcery.com> 4213169689Skan 4214169689Skan * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK, 4215169689Skan VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK, 4216169689Skan BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate 4217169689Skan TREE_CHECK macro. 4218169689Skan 4219169689Skan2004-06-28 Nathan Sidwell <nathan@codesourcery.com> 4220169689Skan 4221169689Skan * cp-tree.h (struct deferred_access): Move to ... 4222169689Skan * semantics.c (struct deferred_access): ... here. Adjust. 4223169689Skan (deferred_access_stack): Make a VEC(deferred_access), 4224169689Skan (deferred_access_free_list): Remove. 4225169689Skan (deferred_access_no_check): New. 4226169689Skan (push_deferring_access_checks, resume_deferring_access_checks, 4227169689Skan stop_deferring_access_checks, pop_deferring_access_checks, 4228169689Skan get_deferred_access_checks, pop_to_parent_deferring_access_checks, 4229169689Skan perform_deferred_access_checks, perform_or_defer_access_check): Adjust. 4230169689Skan 4231169689Skan2004-06-28 Nathan Sidwell <nathan@codesourcery.com> 4232169689Skan 4233169689Skan PR c++/16174 4234169689Skan * call.c (build_temp): Declare. 4235169689Skan (check_constructor_callable): New. 4236169689Skan (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for 4237169689Skan CONSTRUCTOR_CALLABLE. 4238169689Skan (convert_like_real, initialize_reference): Use 4239169689Skan check_constructor_callable. 4240169689Skan * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New. 4241169689Skan (LOOKUP_*): Renumber. 4242169689Skan 4243169689Skan2004-06-28 Nathan Sidwell <nathan@codesourcery.com> 4244169689Skan 4245169689Skan * friend.c (add_friend): Only perform access checks when context 4246169689Skan is a class. 4247169689Skan * lex.c (cxx_make_type): Only create a binfo for aggregate types. 4248169689Skan * parser.c (cp_parser_class_specifier): Disable access checks here 4249169689Skan when parsing the body of a templated class. 4250169689Skan * semantics.c (perform_or_defer_access_checks): Reorder to allow 4251169689Skan NULL binfos when not checking access. 4252169689Skan 4253169689Skan2004-06-28 Nathan Sidwell <nathan@codesourcery.com> 4254169689Skan 4255169689Skan Use vector API for vbase list. 4256169689Skan * cp-tree.h: Include vec.h 4257169689Skan (DEF_VEC_P (tree)): New type. 4258169689Skan (struct lang_type_class): Change vbase's member type. 4259169689Skan (binfo_for_vbase): Declare. 4260169689Skan * class.c (determine_primary_base, base_derived_from, 4261169689Skan update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class, 4262169689Skan warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits, 4263169689Skan build_vtbl_initializer): Adjust. 4264169689Skan * decl.c (xref_basetypes): Adjust, accumulate upper bound of 4265169689Skan vbases. 4266169689Skan * init.c (sort_mem_initializers, expand_member_init, 4267169689Skan push_base_cleanups): Adjust. 4268169689Skan * method.c (do_build_copy_constructor): Adjust. 4269169689Skan * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust. 4270169689Skan (binfo_for_vbase): New. 4271169689Skan * tree.c (copy_base_binfos): Adjust. 4272169689Skan 4273169689Skan2004-06-28 Mark Mitchell <mark@codesourcery.com> 4274169689Skan 4275169689Skan * parser.c (cp_parser_set_decl_spec_type): Fix thinko. 4276169689Skan 4277169689Skan2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net> 4278169689Skan 4279169689Skan PR c++/14123 4280169689Skan * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put 4281169689Skan paranthesis in case of pointers to array members. 4282169689Skan * error.c (dump_type_prefix): Likewise. 4283169689Skan (dump_type_suffix): Maybe issue a whitespace when printing 4284169689Skan ARRAY_TYPE. 4285169689Skan 4286169689Skan2004-06-27 Mark Mitchell <mark@codesourcery.com> 4287169689Skan 4288169689Skan PR c++/16193 4289169689Skan * parser.c (cp_parser_set_decl_spec_type): Refine test for 4290169689Skan redefinition of built-in types. 4291169689Skan 4292169689Skan2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net> 4293169689Skan 4294169689Skan * error.c (pp_template_argument_list_start): Remove. 4295169689Skan (pp_template_argument_list_end): Likewise. 4296169689Skan (pp_separate_with_comma): Use pp_cxx_separate_with. 4297169689Skan (reinit_global_formatting_buffer): Remove. 4298169689Skan (pp_non_consecutive_character): Likewise. 4299169689Skan (dump_scope): Use pp_cxx_colon_colon. 4300169689Skan (dump_template_parameter): Use pp_cxx_identifier, 4301169689Skan pp_cxx_tree_identifier and pp_cxx_whitespace. 4302169689Skan (dump_templat_bindings): Replace use of pp_string with sequence 4303169689Skan of pp_cxx_whitespace and pp_equal. 4304169689Skan (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier, 4305169689Skan pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set 4306169689Skan padding here. 4307169689Skan (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier. 4308169689Skan (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace, 4309169689Skan pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout. 4310169689Skan (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket, 4311169689Skan pp_cxx_right_bracket, pp_cxx_identifier throughout, 4312169689Skan (dump_decl): Likewise. 4313169689Skan (dump_template_decl): Likewise. 4314169689Skan (dump_function_decl): Likewise. Set padding as appropriate. 4315169689Skan (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and 4316169689Skan pp_cxx_right_paren. 4317169689Skan (dump_exception_spec): Likewise. 4318169689Skan (dump_function_name): Use pp_cxx_tree_identifier and 4319169689Skan pp_cxx_identifier. 4320169689Skan (dump_template_parms): Use pp_cxx_begin_template_argument_list and 4321169689Skan pp_cxx_end_template_argument_list. 4322169689Skan (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren, 4323169689Skan pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and 4324169689Skan pp_cxx_whitespace throughout. 4325169689Skan (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and 4326169689Skan pp_cxx_right_paren. 4327169689Skan (dump_unary_op): Likewise. 4328169689Skan (reinit_cxx_pp): New function. 4329169689Skan (type_as_string); Use it. 4330169689Skan (expr_as_string): Likewise. 4331169689Skan (decl_as_string); Likewise. 4332169689Skan (context_as_string): Likewise. 4333169689Skan (lang_decl_name): Likewise. 4334169689Skan (decl_to_string): Likewise. 4335169689Skan (expr_to_string): Likewise. 4336169689Skan (parm_to_string): Likewise. 4337169689Skan (type_to_string): Likewise. 4338169689Skan (args_to_string): Likewise. 4339169689Skan (cv_to_string): Likewise. 4340169689Skan 4341169689Skan2004-06-26 Mark Mitchell <mark@codesourcery.com> 4342169689Skan 4343169689Skan * cp-tree.h (cp_cv_quals): New type. 4344169689Skan (cp_declarator): Use it instead of "tree" as appropriate. 4345169689Skan (grok_method_quals): Adjust prototype. 4346169689Skan (grokclassfn): Likewise. 4347169689Skan (do_friend): Likewise. 4348169689Skan * decl.c (grokfndecl): Use cp_cv_quals, not tree. 4349169689Skan (grokdeclarator): Likewise. 4350169689Skan * decl2.c (grok_method_quals): Likewise. 4351169689Skan (grokclassfn): Likewise. 4352169689Skan * friend.c (do_friend): Likewise. 4353169689Skan * method.c (implicitly_declare_fn): Adjust call to grokclassfn. 4354169689Skan * parser.c (make_call_declarator): Use cp_cv_quals, not tree. 4355169689Skan (make_pointer_declarator): Likewise. 4356169689Skan (make_reference_declarator): Likewise. 4357169689Skan (make_ptrmem_declarator): Likewise. 4358169689Skan (cp_parser_ptr_operator): Likewise. 4359169689Skan (cp_parser_cv_qualifier_seq_opt): Likewise. 4360169689Skan (cp_parser_cv_qualifier_opt): Remove. 4361169689Skan (cp_parser_new_declarator_opt): Adjust call to 4362169689Skan cp_parser_ptr_operator. 4363169689Skan (cp_parser_conversion_declaration_opt): Likewise. 4364169689Skan (cp_parser_declarator): Use cp_cv_quals, not tree. 4365169689Skan (cp_parser_direct_declarator): Likewise. 4366169689Skan 4367169689Skan2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 4368169689Skan 4369169689Skan * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c: 4370169689Skan Rename DECL_STMT to DECL_EXPR. 4371169689Skan * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise. 4372169689Skan * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted. 4373169689Skan * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees. 4374169689Skan 4375169689Skan2004-06-26 Jan Hubicka <jh@suse.cz> 4376169689Skan 4377169689Skan PR C++/14865 4378169689Skan * decl2.c (maybe_emit_vtables): Always import_export_vtable for the 4379169689Skan reachability analysis. 4380169689Skan 4381169689Skan2004-06-25 Mark Mitchell <mark@codesourcery.com> 4382169689Skan 4383169689Skan * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from 4384169689Skan 2004-06-23 change. 4385169689Skan 4386169689Skan2004-06-25 Paul Brook <paul@codesourcery.com> 4387169689Skan 4388169689Skan * decl2.c (get_guard): Call targetm.cxx.guard_type. 4389169689Skan (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit. 4390169689Skan 4391169689Skan2004-06-24 Mark Mitchell <mark@codesourcery.com> 4392169689Skan 4393169689Skan * decl.c (grokdeclarator): Restore error messages about __thread. 4394169689Skan * parser.c (cp_parser_decl_specifier_seq): Likewise. 4395169689Skan 4396169689Skan2004-06-24 Jason Merrill <jason@redhat.com> 4397169689Skan 4398169689Skan PR c++/16115 4399169689Skan * decl.c (grokparms): Give the PARM_DECL reference type if the 4400169689Skan parameter is passed by invisible reference. 4401169689Skan 4402169689Skan2004-06-24 Andreas Schwab <schwab@suse.de> 4403169689Skan 4404169689Skan * cp-tree.h (enum cp_storage_class): Remove trailing comma. 4405169689Skan 4406169689Skan2004-06-23 Mark Mitchell <mark@codesourcery.com> 4407169689Skan 4408169689Skan * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h. 4409169689Skan (cp/decl.o): Likewise. 4410169689Skan (cp/decl2.o): Likewise. 4411169689Skan (cp/pt.o): Likewise. 4412169689Skan (cp/semantics.o): Likewise. 4413169689Skan * config-lang.in (gtfiles): Do not reference cp/lex.h. 4414169689Skan * class.c: Do not include lex.h. 4415169689Skan (add_implicitly_declared_members): Do not use 4416169689Skan adding_implicit_members. 4417169689Skan (check_bases_and_members): Do not talk about grok_x_components. 4418169689Skan * cp/cp-tree.h (adding_implicit_members): Remove. 4419169689Skan (cp_storage_class): New type. 4420169689Skan (cp_decl_spec): Likewise. 4421169689Skan (cp_decl_specifier_seq): Likewise. 4422169689Skan (cp_parameter_declarator): Use it for the decl_specifiers field. 4423169689Skan (check_tag_decl): Adjust prototype. 4424169689Skan (shadow_tag): Likewise. 4425169689Skan (groktypename): Likewise. 4426169689Skan (start_decl): Likewise. 4427169689Skan (start_function): Likewise. 4428169689Skan (start_method): Likewise. 4429169689Skan (grok_x_components): Remove. 4430169689Skan (grokfield): Adjust prototype. 4431169689Skan (grokbitfield): Likewise. 4432169689Skan (finish_member_class_template): Remove. 4433169689Skan * decl.c: Do not include lex.h. 4434169689Skan (adding_implicit_members): Do not define. 4435169689Skan (check_tag_decl): Do not use trees to represent decl-specifiers. 4436169689Skan (shadow_tag): Likewise. 4437169689Skan (groktypename): Likewise. 4438169689Skan (start_decl): Likewise. 4439169689Skan (grokvardecl): Likewise. 4440169689Skan (grokdeclarator): Likewise. 4441169689Skan (grokparms): Likewise. 4442169689Skan (start_function): Likewise. 4443169689Skan (start_method): Likewise. 4444169689Skan * decl.h (grokdeclarator): Adjust prototype. 4445169689Skan * decl2.c: Do not include lex.h. 4446169689Skan (grok_x_components): Remove. 4447169689Skan (grokfield): Do not use trees to represent decl-specifiers. 4448169689Skan (grokbitfield): Likewise. 4449169689Skan * lex.c: Do not include lex.h. 4450169689Skan * lex.h: Remove. 4451169689Skan * parser.c: Include target.h. 4452169689Skan (clear_decl_specs): New function. 4453169689Skan (cp_parser_translation_unit): Do not use trees to represent 4454169689Skan decl-specifiers. 4455169689Skan (cp_parser_postfix_expression): Likewise. 4456169689Skan (cp_parser_new_type_id): Likewise. 4457169689Skan (cp_parser_condition): Likewise. 4458169689Skan (cp_parser_simple_declaration): Likewise. 4459169689Skan (cp_parser_decl_specifier_seq): Likewise. 4460169689Skan (cp_parser_function_specifier_opt): Likewise. 4461169689Skan (cp_parser_conversion_type_id): Likewise. 4462169689Skan (cp_parser_template_parameter): Likewise. 4463169689Skan (cp_parser_explicit_instantiation): Likewise. 4464169689Skan (cp_parser_type_specifier): Likewise. 4465169689Skan (cp_parser_simple_type_specifier): Likewise. 4466169689Skan (cp_parser_init_declarator): Likewise. 4467169689Skan (cp_parser_type_id): Likewise. 4468169689Skan (cp_parser_type_specifier_seq): Likewise. 4469169689Skan (cp_parser_parameter_declaration): Likewise. 4470169689Skan (cp_parser_member_declaration): Likewise. 4471169689Skan (cp_parser_exception_declaration): Likewise. 4472169689Skan (cp_parser_function_definition_from_specifiers_and_declarator): 4473169689Skan Likewise. 4474169689Skan (cp_parser_single_declaration): Likewise. 4475169689Skan (cp_parser_save_member_function_body): Likewise. 4476169689Skan (cp_parser_friend_p): Likewise. 4477169689Skan (cp_parser_set_storage_class): New function. 4478169689Skan (cp_parser_set_decl_spec_type): Likewise. 4479169689Skan * pt.c: Do not include lex.h. 4480169689Skan * semantics.c: Likewise. 4481169689Skan (finish_member_class_template): Remove. 4482169689Skan 4483169689Skan2004-06-23 Roger Sayle <roger@eyesopen.com> 4484169689Skan 4485169689Skan * call.c (build_cxx_call): Don't call expand_tree_builtin. No 4486169689Skan longer take both "args" and "convert_args" as arguments. 4487169689Skan (build_op_delete_call): Update call to build_cxx_call. 4488169689Skan (build_over_call): Likewise, update call to build_cxx_call. 4489169689Skan * cp-tree.h (build_cxx_call): Update funtion prototype. 4490169689Skan * typeck.c (build_function_call): Don't call expand_tree_builtin. 4491169689Skan * rtti.c (throw_bad_cast): Update call to build_cxx_call. 4492169689Skan (throw_bad_typeid): Likewise. 4493169689Skan (build_dynamic_cast_1): Likewise. 4494169689Skan 4495169689Skan2004-06-22 Richard Henderson <rth@redhat.com> 4496169689Skan 4497169689Skan * class.c (build_vfn_ref): Take a pointer not object. Build 4498169689Skan an OBJ_TYPE_REF. 4499169689Skan (cp_fold_obj_type_ref): New. 4500169689Skan * call.c (build_over_call): Update build_vfn_ref call. 4501169689Skan * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New. 4502169689Skan * cp-tree.h (cp_fold_obj_type_ref): Declare. 4503169689Skan 4504169689Skan2004-06-21 Jason Merrill <jason@redhat.com> 4505169689Skan 4506169689Skan PR c++/16112 4507169689Skan * cp-gimplify.c (cp_gimplify_init_expr): Look through 4508169689Skan CLEANUP_POINT_EXPR. 4509169689Skan 4510169689Skan2004-06-21 Mark Mitchell <mark@codesourcery.com> 4511169689Skan 4512169689Skan * cp-tree.def (NEW_EXPR): Add a fourth slot. 4513169689Skan * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove. 4514169689Skan (TREE_PARMLIST): Likewise. 4515169689Skan (CALL_DECLARATOR_PARMS): Likewise. 4516169689Skan (CALL_DECLARATOR_QUALS): Likewise. 4517169689Skan (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise. 4518169689Skan (cp_declarator_kind): New type. 4519169689Skan (cp_parameter_declarator): Likewise. 4520169689Skan (cp_declarator): Likewise. 4521169689Skan (cp_error_declarator): Likewise. 4522169689Skan (no_parameters): Likewise. 4523169689Skan (groktypename): Change prototype. 4524169689Skan (start_decl): Likewise. 4525169689Skan (start_handler_parms): Likewise. 4526169689Skan (get_scope_of_declarator): Likewise. 4527169689Skan (start_function): Likewise. 4528169689Skan (start_preparsed_function): New function. 4529169689Skan (start_function): Change prototype. 4530169689Skan (start_method): Likewise. 4531169689Skan (grokfield): Likewise. 4532169689Skan (grokbitfield): Likewise. 4533169689Skan (build_new): Likewise. 4534169689Skan (make_pointer_declarator): Remove. 4535169689Skan (make_reference_declarator): Likewise. 4536169689Skan (make_call_declarator): Likewise. 4537169689Skan (set_quals_and_spec): Likewise. 4538169689Skan (process_template_parm): Change prototype. 4539169689Skan (begin_function_definition): Remove. 4540169689Skan (finish_parmlist): Remove. 4541169689Skan * decl.c (groktypename): Do not use trees to represent 4542169689Skan declarators. 4543169689Skan (start_decl): Likewise. 4544169689Skan (start_handler_parms): Remove. 4545169689Skan (get_scope_of_declarator): Reimplement. 4546169689Skan (grokdeclarator): Do not use trees to represent declarators. 4547169689Skan (grokparms): Likewise. 4548169689Skan (start_function): Likewise. 4549169689Skan (start_method): Likewise. 4550169689Skan (build_void_list_mode): Do not use TREE_PARMLIST. 4551169689Skan * decl.h (grokdeclarator): Change prototype. 4552169689Skan * decl2.c (grok_method_quals): Robustify. 4553169689Skan (grok_x_components): Do not use trees to represent declarators. 4554169689Skan (grokfield): Likewise. 4555169689Skan (grokbitfield): Likewise. 4556169689Skan (start_objects): Build FUNCTION_DECLs, not declarators. 4557169689Skan (start_static_storage_duration_function): Likewise. 4558169689Skan * init.c (build_new): Simplify. 4559169689Skan * lex.c (make_pointer_declarator): Remove. 4560169689Skan (make_reference_declarator): Likewise. 4561169689Skan (make_call_declarator): Likewise. 4562169689Skan (set_quals_and_spec): Likewise. 4563169689Skan * method.c (use_thunk): Use start_preparsed_function. 4564169689Skan (synthesize_method): Likewise. 4565169689Skan (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators. 4566169689Skan * optimize.c (maybe_clone_body): Use start_preparsed_function. 4567169689Skan * parser.c (cp_error_declarator): New variable. 4568169689Skan (declarator_obstack): Likewise. 4569169689Skan (alloc_declarator): New function. 4570169689Skan (make_declarator): Likewise. 4571169689Skan (make_id_declarator): Likewise. 4572169689Skan (make_pointer_declarator): Likewise. 4573169689Skan (make_reference_declarator): Likewise. 4574169689Skan (make_ptrmem_declarator): Likewise. 4575169689Skan (make_call_declarator): Likewise. 4576169689Skan (make_array_declarator): Likewise. 4577169689Skan (no_parameters): New variable. 4578169689Skan (make_parameter_declarator): Likewise. 4579169689Skan (cp_parser_check_for_definition_in_return_type): Do not use trees 4580169689Skan to represent declarators. 4581169689Skan (cp_parser_translation_unit): Likewise. 4582169689Skan (cp_parser_new_expression): Likewise. 4583169689Skan (cp_parser_new_type_id): Likewise. 4584169689Skan (cp_parser_new_declarator_opt): Likewise. 4585169689Skan (cp_parser_direct_new_declarator): Likewise. 4586169689Skan (cp_parser_condition): Likewise. 4587169689Skan (cp_parser_declaration_statement): Likewise. 4588169689Skan (cp_parser_declaration): Likewise. 4589169689Skan (cp_parser_conversion_type_id): Likewise. 4590169689Skan (cp_parser_conversion_declarator_opt): Likewise. 4591169689Skan (cp_parser_template_parameter_list): Likewise. 4592169689Skan (cp_parser_template_parameter): Likewise. 4593169689Skan (cp_parser_explicit_instantiation): Likewise. 4594169689Skan (cp_parser_init_declarator): Likewise. 4595169689Skan (cp_parser_declarator): Likewise. 4596169689Skan (cp_parser_direct_declarator): Likewise. 4597169689Skan (cp_parser_type_id): Likewise. 4598169689Skan (cp_parser_parameter_declaration_clause): Likewise. 4599169689Skan (cp_parser_parameter_declaration_list): Likewise. 4600169689Skan (cp_parser_parameter_declaration): Likewise. 4601169689Skan (cp_parser_member_declaration): Likewise. 4602169689Skan (cp_parser_exception_declaration): Likewise. 4603169689Skan (cp_parser_check_declarator_template_parameters): Likewise. 4604169689Skan (cp_parser_function_definition_from_specifiers_and_declarator): 4605169689Skan Likewise. 4606169689Skan (cp_parser_save_member_function_body): Likewise. 4607169689Skan * pt.c (process_template_parm): Add is_non_type parameter. 4608169689Skan (convert_template_argument): Adjust call to groktypename. 4609169689Skan (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST. 4610169689Skan (tsubst): Do not expect declarators. 4611169689Skan (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional 4612169689Skan argument. 4613169689Skan (instantiate_decl): Use start_preparsed_function. 4614169689Skan * semantics.c (begin_function_definition): Remove. 4615169689Skan (finish_parmlist): Remove. 4616169689Skan * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not 4617169689Skan declarators. 4618169689Skan 4619169689Skan2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 4620169689Skan 4621169689Skan * call.c (build_vfield_ref): Add new operand for COMPONENT_REF. 4622169689Skan (build_new_method_call): Likewise. 4623169689Skan * decl.c (local_variable_p_walkfn): Don't walk into types. 4624169689Skan * decl2.c (grok_array_decl): Add new operands for ARRAY_REF. 4625169689Skan (build_anon_union_vars): Add new operand for COMPONENT_REF. 4626169689Skan * init.c (buld_new): Add new operand for ARRAY_REF. 4627169689Skan * method.c (do_build_copy_constructor): New op for COMPONENT_REF. 4628169689Skan (do_build_assign_ref): Likewise. 4629169689Skan * parser.c (cp_parser_direct_new_declarator): Add new operands 4630169689Skan for ARRAY_REF. 4631169689Skan (cp_parser_direct_declarator): Likewise. 4632169689Skan * pt.c (tsubst): Likewise. 4633169689Skan (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand 4634169689Skan for COMPONENT_REF. 4635169689Skan * semantics.c (finish_non_static_data_member): Add new operand 4636169689Skan for COMPONENT_REF. 4637169689Skan * typeck.c (build_class_member_access_expr): Likewise. 4638169689Skan (build_class_member_access_expr, finish_class_member_access_expr): 4639169689Skan Likewise. 4640169689Skan (build_ptrmemfunc_access_expr): Likewise. 4641169689Skan (build_array_ref): Add new operands for ARRAY_REF. 4642169689Skan * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too. 4643169689Skan * tree.c (count_trees_r, no_linkage_helper): Don't walk in types. 4644169689Skan 4645169689Skan2004-06-21 Richard Henderson <rth@redhat.com> 4646169689Skan 4647169689Skan * dump.c (cp_dump_tree): Don't use dump_next_stmt. 4648169689Skan * parser.c (cp_parser_jump_statement): Update commentary. 4649169689Skan * pt.c (tsubst_expr): Use RETURN_EXPR. 4650169689Skan * semantics.c (finish_return_stmt): Likewise. 4651169689Skan (finalize_nrv_r): Likewise. 4652169689Skan * typeck.c, typeck2.c: Update file start commentary. 4653169689Skan 4654169689Skan2004-06-21 Richard Henderson <rth@redhat.com> 4655169689Skan 4656169689Skan * semantics.c (finish_expr_stmt): Call verify_sequence_points. 4657169689Skan 4658169689Skan2004-06-20 Richard Henderson <rth@redhat.com> 4659169689Skan 4660169689Skan * cp-tree.h (add_decl_stmt): Declare. 4661169689Skan * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR. 4662169689Skan * semantics.c (maybe_cleanup_point_expr): New. 4663169689Skan (add_decl_stmt, finish_expr_stmt, finish_return_stmt, 4664169689Skan finish_for_expr, finish_switch_cond): Use it. 4665169689Skan (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN. 4666169689Skan 4667169689Skan2004-06-20 Richard Henderson <rth@redhat.com> 4668169689Skan 4669169689Skan * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def. 4670169689Skan * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c. 4671169689Skan (cp_gimplify_expr): Call it. 4672169689Skan (gimplify_cleanup_stmt): Move from c-gimplify.c. 4673169689Skan (cp_genericize): New. 4674169689Skan * decl.c (finish_function): Call it. 4675169689Skan * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT. 4676169689Skan (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h. 4677169689Skan (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise. 4678169689Skan (cp_genericize): Declare. 4679169689Skan * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT. 4680169689Skan * dump.c (cp_dump_tree): Likewise. 4681169689Skan * semantics.c (push_cleanup): Move from c-semantics.c. 4682169689Skan 4683169689Skan2004-06-20 Zack Weinberg <zack@codesourcery.com> 4684169689Skan 4685169689Skan * cp-lang.c (has_c_linkage): Implement. 4686169689Skan 4687169689Skan * cp-tree.h (set_mangled_name_for_decl): Don't prototype. 4688169689Skan * decl.c (duplicate_decls): Use COPY_DECL_RTL. 4689169689Skan (builtin_function_1): Don't call make_decl_rtl. 4690169689Skan (build_cp_library_fn): Don't call set_mangled_name_for_decl. 4691169689Skan (grokvardecl): Don't call mangle_decl. 4692169689Skan * except.c (nothrow_libfn_p): Look at DECL_NAME, not 4693169689Skan DECL_ASSEMBLER_NAME. 4694169689Skan * method.c (set_mangled_name_for_decl): Delete. 4695169689Skan * name-lookup.c (pushdecl): When a local extern shadows a 4696169689Skan file-scope declaration of the same object, give both DECLs the 4697169689Skan same DECL_UID. 4698169689Skan * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE 4699169689Skan on DECL_ASSEMBLER_NAME. 4700169689Skan 4701169689Skan2004-06-19 Richard Henderson <rth@redhat.com> 4702169689Skan 4703169689Skan * cp-gimplify.c: Remove unnecessary prototypes. 4704169689Skan (cp_gimplify_stmt): Merge into ... 4705169689Skan (cp_gimplify_expr): ... here. Move to end of file. Handle 4706169689Skan stmts_are_full_exprs_p frobbing. 4707169689Skan * cp-tree.h (cp_gimplify_stmt): Remove. 4708169689Skan * pt.c (tsubst_expr): Merge prep_stmt and unify. 4709169689Skan * tree.c (init_tree): Don't set lang_gimplify_stmt. 4710169689Skan 4711169689Skan2004-06-18 Richard Henderson <rth@redhat.com> 4712169689Skan 4713169689Skan PR c++/16034 4714169689Skan * semantics.c (begin_cond): New. 4715169689Skan (finish_cond): Rewrite to handle template DECL_STMTs specially. 4716169689Skan Assume that non-template decls go land before the conditional. 4717169689Skan (simplify_loop_decl_cond): Likewise. 4718169689Skan (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt, 4719169689Skan finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond, 4720169689Skan begin_switch_stmt, finish_switch_cond): Update to match. 4721169689Skan 4722169689Skan2004-06-17 Jason Merrill <jason@redhat.com> 4723169689Skan 4724169689Skan PR c++/16015 4725169689Skan * semantics.c (simplify_aggr_init_expr): Don't return the slot. 4726169689Skan (finish_stmt_expr_expr): Update type after conversions. 4727169689Skan (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR. 4728169689Skan Handle void initializer. 4729169689Skan * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void. 4730169689Skan 4731169689Skan2004-06-17 Geoffrey Keating <geoffk@apple.com> 4732169689Skan 4733169689Skan * class.c (build_clone): Don't call defer_fn, let mark_used do it. 4734169689Skan * cp-tree.h (defer_fn): Delete. 4735169689Skan * decl2.c (defer_fn): Delete. 4736169689Skan (finish_file): Simplify deferred_fns loops; check that 4737169689Skan only used inline functions get into deferred_fns. 4738169689Skan (mark_used): Inline previous contents of defer_fn. 4739169689Skan 4740169689Skan2004-06-16 Richard Henderson <rth@redhat.com> 4741169689Skan 4742169689Skan * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill. 4743169689Skan (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New. 4744169689Skan * cxx-pretty-print.c (pp_cxx_function_definition): Move handling 4745169689Skan of CTOR_INITIALIZER ... 4746169689Skan (pp_cxx_statement): ... here. 4747169689Skan * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK. 4748169689Skan (finish_function): Use alloc_stmt_list to zap entire function. 4749169689Skan * parser.c (cp_parser_compound_statement): Update commentary. 4750169689Skan * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT. 4751169689Skan * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise. 4752169689Skan (finish_stmt_expr): Don't look through COMPOUND_STMT. 4753169689Skan 4754169689Skan2004-06-16 Geoffrey Keating <geoffk@apple.com> 4755169689Skan 4756169689Skan * pt.c (mark_decl_instantiated): Don't call defer_fn. 4757169689Skan 4758169689Skan2004-06-16 Richard Henderson <rth@redhat.com> 4759169689Skan 4760169689Skan * parser.c (cp_parser_labeled_statement): Update commentary. 4761169689Skan * pt.c (tsubst_expr): Use CASE_LABEL_EXPR. 4762169689Skan * tree.c (mark_local_for_remap_r): Likewise. 4763169689Skan 4764169689Skan2004-06-16 Richard Henderson <rth@redhat.com> 4765169689Skan 4766169689Skan * parser.c (cp_parser_asm_definition): Update commentary. 4767169689Skan * pt.c (tsubst_expr): Use ASM_EXPR. 4768169689Skan * semantics.c (finish_asm_stmt): Likewise. 4769169689Skan 4770169689Skan2004-06-16 Richard Henderson <rth@redhat.com> 4771169689Skan 4772169689Skan * decl.c (finish_destructor_body): Use LABEL_EXPR. 4773169689Skan * parser.c (cp_parser_statement): Update commentary. 4774169689Skan * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR. 4775169689Skan * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise. 4776169689Skan * tree.c (mark_local_for_remap_r): Likewise. 4777169689Skan 4778169689Skan2004-06-16 Richard Henderson <rth@redhat.com> 4779169689Skan 4780169689Skan PR c++/16012 4781169689Skan * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init 4782169689Skan statement in FOR_INIT_STMT for templates. 4783169689Skan 4784169689Skan2004-06-15 Richard Henderson <rth@redhat.com> 4785169689Skan 4786169689Skan * call.c (initialize_reference): Don't build CLEANUP_STMT here. 4787169689Skan * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument. 4788169689Skan (genericize_try_block): Use gimplify_stmt. 4789169689Skan (genericize_catch_block, genericize_eh_spec_block): Likewise. 4790169689Skan (cp_gimplify_init_expr): Remove STMT_EXPR special case. 4791169689Skan (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call. 4792169689Skan * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove. 4793169689Skan (cp_tree_chain_matters_p): Remove. 4794169689Skan * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New. 4795169689Skan (COMPOUND_STMT_BODY_BLOCK): New. 4796169689Skan (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New. 4797169689Skan (EXPR_STMT_STMT_EXPR_RESULT): New. 4798169689Skan (building_stmt_tree): Check cur_stmt_list. 4799169689Skan (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove. 4800169689Skan (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New. 4801169689Skan * decl.c (poplevel): Use pop_stmt_list for minding cleanups. 4802169689Skan (cp_finish_decl): Use push_cleanup. 4803169689Skan (start_function, finish_function): Use statement lists. 4804169689Skan (finish_stmt): Do nothing. 4805169689Skan * except.c (begin_eh_spec_block): Use statement lists. 4806169689Skan (check_handlers_1, check_handlers): Likewise. 4807169689Skan * init.c (construct_virtual_base): Don't add extra compound stmts. 4808169689Skan (build_vec_init): Likewise. 4809169689Skan * name-lookup.c (maybe_push_cleanup_level): Use statement lists. 4810169689Skan * name-lookup.h (struct cp_binding_level): Add statement_list. 4811169689Skan * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool. 4812169689Skan (cp_parser_labeled_statement, cp_parser_expression_statement, 4813169689Skan cp_parser_statement_seq_opt): Likewise. 4814169689Skan (cp_parser_compound_statement): Likewise. Take bool for try block. 4815169689Skan (cp_parser_selection_statement): Tidy if processing. 4816169689Skan (cp_parser_already_scoped_statement): Rewrite to do what it says. 4817169689Skan * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr. 4818169689Skan (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST. 4819169689Skan Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT. 4820169689Skan * semantics.c (do_poplevel, do_pushlevel): Use statement lists. 4821169689Skan (finish_cond): New, rewritten from FINISH_COND. 4822169689Skan (simplify_loop_decl_cond): New. 4823169689Skan (finish_expr_stmt): Avoid nested EXPR_STMTs. 4824169689Skan (begin_if_stmt, finish_if_stmt_cond, finish_then_clause, 4825169689Skan begin_else_clause, finish_else_clause, finish_if_stmt, 4826169689Skan begin_while_stmt, finish_while_stmt_cond, finish_while_stmt, 4827169689Skan begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt, 4828169689Skan finish_for_cond, finish_for_stmt, begin_switch_stmt, 4829169689Skan finish_switch_cond, finish_switch_stmt, begin_try_block, 4830169689Skan finish_try_block, finish_cleanup_try_block, finish_function_try_block, 4831169689Skan finish_handler_sequence, finish_function_handler_sequence, 4832169689Skan begin_handler, finish_handler_parms, finish_handler, 4833169689Skan begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite 4834169689Skan using statement lists. 4835169689Skan (begin_compound_stmt): Replace has_no_scope argument with flags. 4836169689Skan Update all callers. Use statement lists. 4837169689Skan (finish_compound_stmt): Likewise. 4838169689Skan (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup. 4839169689Skan (current_scope_stmt_stack): Remove. 4840169689Skan (simplify_aggr_init_expr): Don't muck with TREE_CHAIN. 4841169689Skan * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): 4842169689Skan Rewrite with statement lists. 4843169689Skan 4844169689Skan2004-06-15 Alexandre Oliva <aoliva@redhat.com> 4845169689Skan 4846169689Skan * parser.c: Change all assignments of c_lex_string_translate 4847169689Skan to true and false to 1 and 0. 4848169689Skan (cp_lexer_read_token): Convert type of the translated string. 4849169689Skan (cp_parser_skip_to_closing_parentheses): Preserve original 4850169689Skan value of c_lex_string_translate, and set it to -1 while 4851169689Skan running. 4852169689Skan (cp_parser_cache_group): Likewise. 4853169689Skan (cp_parser_cache_group_1): Renamed. 4854169689Skan (cp_parser_asm_operand_list): Remove redundant setting of 4855169689Skan c_lex_string_translate. 4856169689Skan (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]: 4857169689Skan Handle chained strings. 4858169689Skan 4859169689Skan2004-06-12 Andrew Pinski <apinski@apple.com> 4860169689Skan 4861169689Skan PR c++/14639 4862169689Skan Revert: 4863169689Skan 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu> 4864169689Skan 4865169689Skan * cp-tree.h: Fix typo. 4866169689Skan 4867169689Skan * cp-tree.h: Include cgraph.h 4868169689Skan (DECL_NEEDED_P): Use cgraph_*node on the decl instead of 4869169689Skan TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl. 4870169689Skan 4871169689Skan2004-06-12 Jason Merrill <jason@redhat.com> 4872169689Skan 4873169689Skan PR tree-optimization/14107 4874169689Skan * decl.c (finish_function): Warn about no return in all functions. 4875169689Skan 4876169689Skan2004-06-15 Paolo Bonzini <bonzini@gnu.org> 4877169689Skan 4878169689Skan * cp-tree.h (struct language_function): Remove cannot_inline. 4879169689Skan * decl.c (save_function_data): cannot_inline is no more. 4880169689Skan (cxx_push_function_context): Likewise. 4881169689Skan * decl2.c (start_objects, start_static_storage_duration_function): 4882169689Skan Reset DECL_INLINE, set DECL_UNINLINABLE. 4883169689Skan 4884169689Skan2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org> 4885169689Skan 4886169689Skan PR c++/15967 4887169689Skan * search.c (lookup_field): Propagate the ambiguity list. 4888169689Skan (lookup_fnfields): Likewise. 4889169689Skan 4890169689Skan2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org> 4891169689Skan 4892169689Skan PR c++/15947 4893169689Skan * parser.c (cp_parser_template_name): Ctors/dtors never need a 4894169689Skan template keyword to disambiguate. 4895169689Skan 4896169689Skan2004-06-14 Mark Mitchell <mark@codesourcery.com> 4897169689Skan 4898169689Skan PR c++/15096 4899169689Skan * decl.c (grokdeclarator): Ignore pointer-to-members when 4900169689Skan computing template depth. 4901169689Skan 4902169689Skan PR c++/14930 4903169689Skan * name-lookup.c (pushtag): Do not try to put class declarations in 4904169689Skan explicit specialization scopes. 4905169689Skan 4906169689Skan2004-06-11 Andrew Pinski <pinskia@physics.uc.edu> 4907169689Skan 4908169689Skan * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior. 4909169689Skan 4910169689Skan2004-06-11 Mark Mitchell <mark@codesourcery.com> 4911169689Skan 4912169689Skan PR c++/15862 4913169689Skan * name-lookup.c (unqualified_namespace_lookup): Do not ignore type 4914169689Skan bindings for undeclared built-ins. 4915169689Skan 4916169689Skan2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org> 4917169689Skan 4918169689Skan * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them 4919169689Skan appear at the correct location. 4920169689Skan 4921169689Skan2004-06-10 Jason Merrill <jason@redhat.com> 4922169689Skan 4923169689Skan PR c++/15875 4924169689Skan Revert: 4925169689Skan 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 4926169689Skan * init.c (build_offset_ref): Build SCOPE_REF with non-null 4927169689Skan TREE_TYPE for non-dependent names. 4928169689Skan * pt.c (type_dependent_expression_p): Handle SCOPE_REF with 4929169689Skan unknown_type_node as its TREE_TYPE. 4930169689Skan * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK. 4931169689Skan * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression. 4932169689Skan (dump_expr) <SCOPE_REF case>: Likewise. 4933169689Skan 4934169689Skan2004-06-10 Mark Mitchell <mark@codesourcery.com> 4935169689Skan 4936169689Skan PR c++/15227 4937169689Skan * parser.c (cp_parser_direct_declarator): Robustify. 4938169689Skan 4939169689Skan PR c++/15877 4940169689Skan * pt.c (tsubst_copy): Use decl_constant_value on enumeration 4941169689Skan constants in non-dependent contexts. 4942169689Skan 4943169689Skan PR c++/14211 4944169689Skan PR c++/15076 4945169689Skan * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when 4946169689Skan necessary. 4947169689Skan 4948169689Skan2004-06-10 Jakub Jelinek <jakub@redhat.com> 4949169689Skan 4950169689Skan PR c++/14791 4951169689Skan * decl.c (duplicate_decls): Handle fileptr_type_node arguments 4952169689Skan specially. 4953169689Skan 4954169689Skan2004-06-09 Mark Mitchell <mark@codesourcery.com> 4955169689Skan 4956169689Skan Revert: 4957169689Skan PR c++/15815 4958169689Skan 2004-06-07 Mark Mitchell <mark@codesourcery.com> 4959169689Skan * lex.c (handle_pragma_interface): Deprecate. 4960169689Skan (handle_pragma_implementation): Likewise. 4961169689Skan 4962169689Skan2004-06-09 Andrew Pinski <pinskia@physics.uc.edu> 4963169689Skan 4964169689Skan * g++spec.c (lang_specific_driver): Remove check for -lm 4965169689Skan and -lmath when check it see if it was the math library. 4966169689Skan 4967169689Skan2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org> 4968169689Skan 4969169689Skan PR c++/7841 4970169689Skan * parser.c (cp_parser_direct_declarator): Reject constructor named 4971169689Skan as qualified template-id. 4972169689Skan 4973169689Skan2004-06-07 Mark Mitchell <mark@codesourcery.com> 4974169689Skan 4975169689Skan PR c++/15815 4976169689Skan * lex.c (handle_pragma_interface): Deprecate. 4977169689Skan (handle_pragma_implementation): Likewise. 4978169689Skan 4979169689Skan2004-06-07 Mark Mitchell <mark@codesourcery.com> 4980169689Skan 4981169689Skan PR c++/15766 4982169689Skan * parser.c (cp_parser_iteration_statement): Fix typo in error 4983169689Skan message. 4984169689Skan 4985169689Skan PR c++/14777 4986169689Skan * pt.c (tsubst_default_argument): Do not defer access checks 4987169689Skan while substituting into the default argument. 4988169689Skan 4989169689Skan PR c++/15554 4990169689Skan * pt.c (tsubst_copy): Do not try to substitute for an enumeration 4991169689Skan constant in a non-dependent context. 4992169689Skan 4993169689Skan PR c++/15057 4994169689Skan * except.c (build_throw): Ensure that temp_expr has been 4995169689Skan initialized. 4996169689Skan 4997169689Skan2004-06-06 Roger Sayle <roger@eyesopen.com> 4998169689Skan 4999169689Skan * cp/cp-tree.h (lvalue_or_else): Add function prototype. 5000169689Skan 5001169689Skan2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org> 5002169689Skan 5003169689Skan PR c++/15503 5004169689Skan * parser.c (cp_parser_mem_initializer_id): Gracefully reject 5005169689Skan 'typename', and accept 'template'. 5006169689Skan 5007169689Skan2004-06-03 Andrew Pinski <pinskia@physics.uc.edu> 5008169689Skan Jan Hubicka <jh@suse.cz> 5009169689Skan 5010169689Skan PR c++/14639 5011169689Skan * method.c (use_think): Do not mark thunk as referenced. 5012169689Skan 5013169689Skan2004-06-03 Matt Austern <austern@apple.com> 5014169689Skan 5015169689Skan PR c++/15428 5016169689Skan * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC 5017169689Skan is nonzero, and if we see a noninline definition of a key method, 5018169689Skan make the vtables nonweak. 5019169689Skan 5020169689Skan2004-06-02 Matt Austern <austern@apple.com> 5021169689Skan 5022169689Skan * cp-tree.h (instantiate_decl): new boolean parameter, 5023169689Skan undefined_ok. Current behavior is equivalent to its being 0. 5024169689Skan * decl2.c (mark_used): Add new argument when calling instantiate_decl 5025169689Skan * pt.c (mark_decl_instantiated): Unconditionally make 5026169689Skan instantiations explicit unconditionally 5027169689Skan (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION, 5028169689Skan since mark_decl_instantiated now does it. 5029169689Skan (instantiate_class_member): New. Instantiate a member of an 5030169689Skan explicitly instantiated class template. 5031169689Skan (do_type_instantiation): Explicitly instantiate members of an 5032169689Skan explicitly instantiated class template. 5033169689Skan (instantiate_decl): if undefined_ok is nonzero, and if we're 5034169689Skan trying to explicitly instantiated a template with no definition, 5035169689Skan change it to an implicit instantiation. 5036169689Skan (instantiate_pending_templates): Add new argument to instantiate_decl. 5037169689Skan * tree.c (cp_cannot_inline_tree_fn): Likewise. 5038169689Skan 5039169689Skan2004-06-02 Andrew Pinski <pinskia@physics.uc.edu> 5040169689Skan 5041169689Skan * cp-tree.h: Fix typo. 5042169689Skan 5043169689Skan * cp-tree.h: Include cgraph.h 5044169689Skan (DECL_NEEDED_P): Use cgraph_*node on the decl instead of 5045169689Skan TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl. 5046169689Skan 5047169689Skan2004-06-01 Jason Merrill <jason@redhat.com> 5048169689Skan 5049169689Skan PR c++/15142 5050169689Skan * call.c (call_builtin_trap): Remove type parm. 5051169689Skan (convert_arg_to_ellipsis): Change a non-POD argument to integer type. 5052169689Skan (build_x_va_arg): Dereference a null pointer for a non-POD argument. 5053169689Skan 5054169689Skan2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5055169689Skan 5056169689Skan PR c++/13092 5057169689Skan * init.c (build_offset_ref): Build SCOPE_REF with non-null 5058169689Skan TREE_TYPE for non-dependent names. 5059169689Skan * pt.c (type_dependent_expression_p): Handle SCOPE_REF with 5060169689Skan unknown_type_node as its TREE_TYPE. 5061169689Skan * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK. 5062169689Skan * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression. 5063169689Skan (dump_expr) <SCOPE_REF case>: Likewise. 5064169689Skan 5065169689Skan2004-06-01 Richard Henderson <rth@redhat.com> 5066169689Skan Andrew Pinski <pinskia@physics.uc.edu> 5067169689Skan 5068169689Skan * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof". 5069169689Skan * parser.c (struct cp_parser): Remove in_offsetof. 5070169689Skan (cp_parser_new): Don't set it. 5071169689Skan (cp_parser_unary_expression): Don't check it. 5072169689Skan (cp_parser_postfix_open_square_expression): Split out from ... 5073169689Skan (cp_parser_postfix_expression): ... here. 5074169689Skan (cp_parser_postfix_dot_deref_expression): Likewise. 5075169689Skan (cp_parser_builtin_offsetof): New. 5076169689Skan (cp_parser_primary_expression): Use it. 5077169689Skan 5078169689Skan2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org> 5079169689Skan 5080169689Skan PR c++/14932 5081169689Skan * parser.c (cp_parser_postfix_expression): Allow subscript 5082169689Skan operator in offsetof. 5083169689Skan 5084169689Skan2004-05-31 Mark Mitchell <mark@codesourcery.com> 5085169689Skan 5086169689Skan PR c++/15701 5087169689Skan * friend.c (add_friend): Do not try to perform access checks for 5088169689Skan functions from dependent classes. 5089169689Skan 5090169689Skan2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net> 5091169689Skan 5092169689Skan * cxx-pretty-print.c (pp_cxx_colon_colon): Expor. 5093169689Skan (pp_cxx_begin_template_argument_list): Turn into a function. 5094169689Skan (pp_cxx_end_template_argument_list): Likewise. 5095169689Skan (pp_cxx_separate_with): Define. 5096169689Skan (pp_cxx_unqualified_id): Tidy. 5097169689Skan (pp_cxx_primary_expression): Likewise. 5098169689Skan (pp_cxx_postfix_expression): Likewise. 5099169689Skan (pp_cxx_expression): Likewise. 5100169689Skan (pp_cxx_simple_type_specifier): Likewise. 5101169689Skan (pp_cxx_type_specifier_seq): Likewise. 5102169689Skan (pp_cxx_parameter_declaration_clause): Likewise. 5103169689Skan (pp_cxx_exception_specification): Likewise. 5104169689Skan (pp_cxx_direct_declarator): Likewise. 5105169689Skan (pp_cxx_type_id): Likewise. 5106169689Skan * cxx-pretty-print.h (pp_cxx_whitespace): Export from 5107169689Skan cxx-pretty-print.c. 5108169689Skan (pp_cxx_left_paren): Likewise. 5109169689Skan (pp_cxx_right_paren): Likewise. 5110169689Skan (pp_cxx_left_brace): Likewise. 5111169689Skan (pp_cxx_right_brace): Likewise. 5112169689Skan (pp_cxx_left_bracket): Likewise. 5113169689Skan (pp_cxx_right_bracket): Likewise. 5114169689Skan (pp_cxx_dot): Likewise. 5115169689Skan (pp_cxx_identifier): Likewise. 5116169689Skan (pp_cxx_tree_identifier): Likewise. 5117169689Skan (pp_cxx_ampersand): New macro. 5118169689Skan (pp_cxx_star): Likewise. 5119169689Skan (pp_cxx_arrow): Likewise. 5120169689Skan (pp_cxx_semicolon): Likewise. 5121169689Skan (pp_cxx_complement): Likewise. 5122169689Skan (pp_cxx_begin_template_argument_list): Declaree. 5123169689Skan (pp_cxx_end_template_argument_list): Likewise. 5124169689Skan (pp_cxx_colon_colon): likewise. 5125169689Skan 5126169689Skan2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr> 5127169689Skan 5128169689Skan * parser.c (cp_parser_simple_type_specifier): Explicitly test 5129169689Skan against NULL_TREE. 5130169689Skan 5131169689Skan2004-05-31 Kazu Hirata <kazu@cs.umass.edu> 5132169689Skan 5133169689Skan * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c, 5134169689Skan typeck.c: Fix comment formatting. 5135169689Skan 5136169689Skan2004-05-30 Andrew Pinski <pinskia@physics.uc.edu> 5137169689Skan 5138169689Skan * cp-lang.c (cp_expand_decl): Remove. 5139169689Skan (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl. 5140169689Skan 5141169689Skan2004-05-30 Andreas Jaeger <aj@suse.de> 5142169689Skan 5143169689Skan * lang-specs.h: Add missing initializers for .ii. 5144169689Skan 5145169689Skan2004-05-28 Aldy Hernandez <aldyh@redhat.com> 5146169689Skan 5147169689Skan * decl.c (cp_make_fname_decl): Free return value from 5148169689Skan fname_as_string. 5149169689Skan 5150169689Skan2004-05-28 Mark Mitchell <mark@codesourcery.com> 5151169689Skan 5152169689Skan PR c++/15083 5153169689Skan * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR, 5154169689Skan even in a templat.e 5155169689Skan * init.c (build_new): Likewise. 5156169689Skan 5157169689Skan PR c++/15640 5158169689Skan * name-lookup.c (arg_assoc): Robustify. 5159169689Skan 5160169689Skan PR c++/15471 5161169689Skan * typeck.c (unary_complex_lvalue): Use context_for_name_lookup 5162169689Skan when determining the scope to use for a pointer to member. 5163169689Skan (lookup_anon_field): Give it external linkage. 5164169689Skan * cp-tree.h (lookup_anon_field): Declare it. 5165169689Skan * expr.c (cplus_expand_constant): Use it. 5166169689Skan 5167169689Skan2004-05-28 Mark Mitchell <mark@codesourcery.com> 5168169689Skan 5169169689Skan PR c++/14668 5170169689Skan * parser.c (cp_parser_simple_type_specifier): Call 5171169689Skan maybe_note_name_used_in_class. 5172169689Skan 5173169689Skan2004-05-28 Tom Marshall <tmarshall@real.com> 5174169689Skan 5175169689Skan PR c++/15214 5176169689Skan * class.c (finish_struct_1): Warn only if the dtor is non-private or 5177169689Skan the class has friends. 5178169689Skan 5179169689Skan2004-05-27 Adam Nemet <anemet@lnxw.com> 5180169689Skan 5181169689Skan PR c++/12883 5182169689Skan * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and 5183169689Skan TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type. 5184169689Skan 5185169689Skan2004-05-24 Geoffrey Keating <geoffk@apple.com> 5186169689Skan 5187169689Skan * method.c (implicitly_declare_fn): Don't call defer_fn; abort 5188169689Skan if it might be needed. 5189169689Skan * pt.c (mark_decl_instantiated): Only call defer_fn if 5190169689Skan the function actually needs processing in finish_file. 5191169689Skan * decl2.c (finish_file): Add check that elements in 5192169689Skan deferred_fns_used are really needed there. Remove unnecessary 5193169689Skan test of DECL_SAVED_TREE. 5194169689Skan 5195169689Skan2004-05-23 Paolo Bonzini <bonzini@gnu.org> 5196169689Skan 5197169689Skan * Make-lang.in: No need to specify $(LIBCPP). 5198169689Skan 5199169689Skan2004-05-23 Mark Mitchell <mark@codesourcery.com> 5200169689Skan 5201169689Skan PR c++/15044 5202169689Skan * parser.c (cp_parser_class_head): Robustify. 5203169689Skan 5204169689Skan PR c++/15317 5205169689Skan * parser.c (cp_parser_decl_specifier_seq): Correct error in 5206169689Skan comment. 5207169689Skan (cp_parser_constructor_declarator_p): Treat attributes 5208169689Skan as decl-specifiers. 5209169689Skan 5210169689Skan PR c++/15329 5211169689Skan * typeck.c (build_unary_op): Do not attempt to resolve casts to 5212169689Skan base classes in templates. 5213169689Skan 5214169689Skan2004-05-23 Mark Mitchell <mark@codesourcery.com> 5215169689Skan 5216169689Skan PR c++/15165 5217169689Skan * pt.c (instantiate_template): Robustify. 5218169689Skan 5219169689Skan2004-05-23 Mark Mitchell <mark@codesourcery.com> 5220169689Skan 5221169689Skan PR c++/15025 5222169689Skan * decl.c (xref_tag): Issue errors about redeclaring template 5223169689Skan classes as non-template classes. 5224169689Skan 5225169689Skan2004-05-23 Mark Mitchell <mark@codesourcery.com> 5226169689Skan 5227169689Skan PR c++/14821 5228169689Skan * name-lookup.c (supplement_binding): Allow redefinitions of 5229169689Skan namespace aliases. 5230169689Skan 5231169689Skan PR c++/14883 5232169689Skan * parser.c (cp_parser_template_argument): Robustify. 5233169689Skan 5234169689Skan2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net> 5235169689Skan 5236169689Skan * class.c (alter_access): Use %E format specifier to print an 5237169689Skan identifier node. Avoid looking at the IDENTIFIER_POINTER. 5238169689Skan (push_lang_context): Likewise. 5239169689Skan * decl.c (lookup_label): Likewise. 5240169689Skan (grokdeclarator): Likewise. 5241169689Skan * parser.c (cp_parser_check_for_invalid_template_id): Likewise. 5242169689Skan * pt.c (do_type_instantiation): Likewise. 5243169689Skan * tree.c (handle_java_interface_attribute): Likewise. 5244169689Skan (handle_com_interface_attribute): Likewise. 5245169689Skan (handle_init_priority_attribute): Likewise. 5246169689Skan 5247169689Skan2004-05-22 Mark Mitchell <mark@codesourcery.com> 5248169689Skan 5249169689Skan PR c++/15285 5250169689Skan PR c++/15299 5251169689Skan * pt.c (build_non_dependent_expr): Expand the set of tree nodes 5252169689Skan recognized as overloaded functions. 5253169689Skan 5254169689Skan2004-05-22 Mark Mitchell <mark@codesourcery.com> 5255169689Skan 5256169689Skan PR c++/15507 5257169689Skan * class.c (layout_nonempty_base_or_field): Do not try to avoid 5258169689Skan layout conflicts for unions. 5259169689Skan 5260169689Skan PR c++/15542 5261169689Skan * typeck.c (build_x_unary_op): Instantiate template class 5262169689Skan specializations before looking for "operator &". 5263169689Skan 5264169689Skan PR c++/15427 5265169689Skan * typeck.c (complete_type): Layout non-dependent array types, even 5266169689Skan in templates. 5267169689Skan 5268169689Skan PR c++/15287 5269169689Skan * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a 5270169689Skan template. 5271169689Skan 5272169689Skan2004-05-22 Roger Sayle <roger@eyesopen.com> 5273169689Skan 5274169689Skan * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by 5275169689Skan returning when TREE_TYPE is error_mark_node. 5276169689Skan * typeck.c (require_complete_type): Return error_mark_node if 5277169689Skan value's type is an error_mark_node. 5278169689Skan 5279169689Skan2004-05-20 Andrew Pinski <pinskia@physics.uc.edu> 5280169689Skan 5281169689Skan * optimize.c (calls_setjmp_r): Remove. 5282169689Skan (calls_setjmp_p): Remove. 5283169689Skan * cp-tree.c (calls_setjmp_p): Remove. 5284169689Skan * decl.c (finish_function): Do not call calls_setjmp_p. 5285169689Skan 5286169689Skan2004-05-18 Zack Weinberg <zack@codesourcery.com> 5287169689Skan 5288169689Skan * decl.c (cp_finish_decl): Use mark_decl_referenced. 5289169689Skan * decl2.c (maybe_make_one_only): Likewise. 5290169689Skan * method.c (use_thunk): Likewise. 5291169689Skan 5292169689Skan2004-05-18 Jason Merrill <jason@redhat.com> 5293169689Skan 5294169689Skan * class.c (build_base_path): Tidy a bit. 5295169689Skan 5296169689Skan2004-05-14 Geoffrey Keating <geoffk@apple.com> 5297169689Skan 5298169689Skan * name-lookup.c (struct scope_binding): New. 5299169689Skan (EMPTY_SCOPE_BINDING): New. 5300169689Skan (lookup_using_namespace): Take a scope_binding instead of a 5301169689Skan cxx_binding. 5302169689Skan (qualified_lookup_using_namespace): Likewise. 5303169689Skan (cxx_binding_clear): Delete. 5304169689Skan (do_nonmember_using_decl): Use a scope_binding instead of a 5305169689Skan cxx_binding. 5306169689Skan (lookup_tag): Don't call select_decl. 5307169689Skan (ambiguous_decl): Don't return anything (and change callers to match). 5308169689Skan Take a scope_binding as the second parameter. 5309169689Skan (lookup_namespace_name): Use a scope_binding instead of a 5310169689Skan cxx_binding. 5311169689Skan (unqualified_namespace_lookup): Likewise. 5312169689Skan (lookup_qualified_name): Likewise. 5313169689Skan (select_decl): Take a scope_binding instead of a cxx_binding. 5314169689Skan Use macros rather than hand-coding tests for type-ness. 5315169689Skan 5316169689Skan2004-05-13 Diego Novillo <dnovillo@redhat.com> 5317169689Skan 5318169689Skan * cp-gimplify.c: Rename from cp-simplify.c. 5319169689Skan * Make-lang.in, optimize.c: Update. 5320169689Skan 5321169689Skan2004-05-13 Diego Novillo <dnovillo@redhat.com> 5322169689Skan 5323169689Skan Merge from tree-ssa-20020619-branch. See 5324169689Skan ChangeLog.tree-ssa for details. 5325169689Skan 5326169689Skan * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def, 5327169689Skan cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c, 5328169689Skan expr.c, init.c, name-lookup.h, optimize.c, parser.c, 5329169689Skan pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: 5330169689Skan Merged. 5331169689Skan * cp-mudflap.c: New file. 5332169689Skan * cp-simplify.c:: New file. 5333169689Skan 5334169689Skan2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org> 5335169689Skan 5336169689Skan PR c++/14389 5337169689Skan * decl2.c (check_classfn): For member templates, compare also the 5338169689Skan template parameters to match the declaration. 5339169689Skan * cp-tree.h: Adjust declaration of check_classfn. 5340169689Skan * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn. 5341169689Skan * friend.c (do_friend): Likewise. 5342169689Skan * pt.c (tsubst_friend_function): Likewise. 5343169689Skan 5344169689Skan2004-05-01 Zack Weinberg <zack@codesourcery.com> 5345169689Skan 5346169689Skan * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE. 5347169689Skan Instead, dig into the representation type to find the array bound. 5348169689Skan 5349169689Skan2004-04-30 Jason Merrill <jason@redhat.com> 5350169689Skan 5351169689Skan Refer to base members using COMPONENT_REFs where possible. 5352169689Skan * class.c (build_simple_base_path): New fn. 5353169689Skan (build_base_path): Use it for non-virtual base references. 5354169689Skan (layout_class_type): Change base fields to their real type 5355169689Skan after layout is done. 5356169689Skan * cp-tree.h (IS_FAKE_BASE_TYPE): New macro. 5357169689Skan * cp-lang.c (cxx_get_alias_set): Use it. 5358169689Skan 5359169689Skan2004-04-30 Kazu Hirata <kazu@cs.umass.edu> 5360169689Skan 5361169689Skan * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix 5362169689Skan comment typos. 5363169689Skan 5364169689Skan2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org> 5365169689Skan 5366169689Skan PR c++/15064 5367169689Skan * parser.c (cp_parser_postfix_expression): typeid operator cannot be 5368169689Skan used in integral constant expressions. 5369169689Skan 5370169689Skan2004-04-22 Mark Mitchell <mark@codesourcery.com> 5371169689Skan 5372169689Skan * init.c (build_aggr_init): Fix accidental use of C99 construct in 5373169689Skan previous change. 5374169689Skan 5375169689Skan * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on 5376169689Skan braced initializer. 5377169689Skan * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro. 5378169689Skan * decl.c (reshape_init): Use it. 5379169689Skan * init.c (perform_member_init): Remove redundant condition. 5380169689Skan (build_aggr_init): Adjust to handle brace-enclosed initializers 5381169689Skan correctly. 5382169689Skan (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P. 5383169689Skan 5384169689Skan * parser.c (cp_parser_initializer_clause): Do not set 5385169689Skan TREE_HAS_CONSTRUCTOR on the initializer. 5386169689Skan * rtti.c (tinfo_base_init): Likewise. 5387169689Skan (generic_initializer): Likewise. 5388169689Skan (ptr_initializer): Likewise. 5389169689Skan (ptm_initializer): Likewise. 5390169689Skan (class_initializer): Likewise. 5391169689Skan (get_pseudo_ti_init): Likewise. 5392169689Skan * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P. 5393169689Skan 5394169689Skan2004-04-22 Alan Modra <amodra@bigpond.net.au> 5395169689Skan 5396169689Skan * name-lookup.c (anonymous_namespace_name): Make static. 5397169689Skan 5398169689Skan2004-04-19 Roger Sayle <roger@eyesopen.com> 5399169689Skan 5400169689Skan PR middle-end/14531 5401169689Skan * class.c (build_base_path): Call fold whilst building the NULL 5402169689Skan pointer check expression trees. 5403169689Skan 5404169689Skan2004-04-15 Bryce McKinlay <mckinlay@redhat.com> 5405169689Skan 5406169689Skan * init.c (build_new_1): Don't use type size argument for Java 5407169689Skan _Jv_AllocObject call. 5408169689Skan 5409169689Skan2004-04-09 Danny Smith <dannysmith@users.sourceforge.net> 5410169689Skan 5411169689Skan * method.c (make_alias_for_thunk): Remove preprocessor guard on 5412169689Skan declaration and definition. 5413169689Skan 5414169689Skan2004-04-08 Danny Smith <dannysmith@users.sourceforge.net> 5415169689Skan 5416169689Skan PR c++/14808 5417169689Skan * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather 5418169689Skan than ASM_OUTPUT_DEF. 5419169689Skan 5420169689Skan2004-04-08 Jakub Jelinek <jakub@redhat.com> 5421169689Skan 5422169689Skan * decl2.c (mark_used): Don't segfault if cfun != NULL but 5423169689Skan current_function_decl == NULL. 5424169689Skan 5425169689Skan2004-04-05 Nathan Sidwell <nathan@codesourcery.com> 5426169689Skan 5427169689Skan PR c++/3518 5428169689Skan * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer 5429169689Skan level. 5430169689Skan 5431169689Skan2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5432169689Skan 5433169689Skan * init.c (decl_constant_value): Don't look at DECL_INITIAL 5434169689Skan of PARM_DECL. 5435169689Skan * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT 5436169689Skan or TREE_SIDE_EFFECTS of a type. 5437169689Skan 5438169689Skan2004-04-02 Nathan Sidwell <nathan@codesourcery.com> 5439169689Skan 5440169689Skan PR c++/14007 5441169689Skan * pt.c (check_cv_quals_for_unify): Correct logic for disallowed 5442169689Skan cv-qualifier unification. 5443169689Skan * tree.c (cp_build_qualified_type_real): Renable DR295 logic. 5444169689Skan 5445169689Skan2004-04-02 Jan Hubicka <jh@suse.cz> 5446169689Skan 5447169689Skan * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define. 5448169689Skan * cp-tree.h (cp_update_decl_after_saving): Declare. 5449169689Skan * tree.c (cp_update_decl_after_saving): Define. 5450169689Skan 5451169689Skan2004-04-01 Mark Mitchell <mark@codesourcery.com> 5452169689Skan 5453169689Skan PR c++/14803 5454169689Skan * typeck.c (get_delta_difference): Call fold before returning the 5455169689Skan value. 5456169689Skan 5457169689Skan2004-04-01 Richard Henderson <rth@redhat.com> 5458169689Skan 5459169689Skan PR c++/14804 5460169689Skan * decl.c (cp_finish_decl): Preserve TREE_READONLY more often. 5461169689Skan * typeck2.c (split_nonconstant_init): Clear TREE_READONLY. 5462169689Skan 5463169689Skan2004-04-01 Mark Mitchell <mark@codesourcery.com> 5464169689Skan 5465169689Skan PR c++/14810 5466169689Skan * name-lookup.c (maybe_push_cleanup_level): Robustify. 5467169689Skan 5468169689Skan2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5469169689Skan 5470169689Skan * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly. 5471169689Skan 5472169689Skan2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5473169689Skan 5474169689Skan * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED. 5475169689Skan * class.c (check_bitfield_decl): Likewise. 5476169689Skan * cvt.c (type_promotes_to): Likewise. 5477169689Skan * decl.c (finish_enum): Likewise. 5478169689Skan * mangle.c (write_builtin_type): Likewise. 5479169689Skan * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise. 5480169689Skan * typeck.c (type_after_usual_arithmetic_conversions): Likewise. 5481169689Skan (build_binary_op): Likewise. 5482169689Skan 5483169689Skan2004-03-31 Jan Hubicka <jh@suse.cz> 5484169689Skan 5485169689Skan * tree.h (optimize_function): Kill prototype. 5486169689Skan * optimize.c (dump_function, optimize_function, dump_finction): Kill. 5487169689Skan * semantics.c (expand_body): Kill. 5488169689Skan 5489169689Skan2004-03-30 Mark Mitchell <mark@codesourcery.com> 5490169689Skan 5491169689Skan PR c++/14724 5492169689Skan * decl.c (start_decl_1): Do not decide whether or not to create a 5493169689Skan new cleanup level until after the type has been completed. 5494169689Skan 5495169689Skan PR c++/14763 5496169689Skan * pt.c (tsubst_default_argument): Clear current_function_decl. 5497169689Skan 5498169689Skan2004-03-30 Zack Weinberg <zack@codesourcery.com> 5499169689Skan 5500169689Skan * name-lookup.c, parser.c: Use new shorter form of GTY markers. 5501169689Skan 5502169689Skan2004-03-29 Zack Weinberg <zack@codesourcery.com> 5503169689Skan 5504169689Skan * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC 5505169689Skan is null, just print the literal name and return. 5506169689Skan 5507169689Skan2004-03-25 Kazu Hirata <kazu@cs.umass.edu> 5508169689Skan 5509169689Skan * cxx-pretty-print.c: Fix comment typos. 5510169689Skan 5511169689Skan2004-03-24 Kazu Hirata <kazu@cs.umass.edu> 5512169689Skan 5513169689Skan * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c: 5514169689Skan Update copyright. 5515169689Skan 5516169689Skan2004-03-23 Ziemowit Laski <zlaski@apple.com> 5517169689Skan 5518169689Skan * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H). 5519169689Skan * mangle.c (write_type): Add call to 'mangle_fundamental_type' 5520169689Skan target hook. 5521169689Skan 5522169689Skan2004-03-23 Zack Weinberg <zack@codesourcery.com> 5523169689Skan 5524169689Skan PR 12267, 12391, 12560, 13129, 14114, 14133 5525169689Skan * cp-lang.c (c_reset_state): Delete. 5526169689Skan (push_file_scope, pop_file_scope): New stubs. 5527169689Skan * parser.c (c_parse_file): Call sorry() here if called more than once. 5528169689Skan 5529169689Skan2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5530169689Skan 5531169689Skan * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW 5532169689Skan for INTEGER_CST. 5533169689Skan 5534169689Skan2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net> 5535169689Skan 5536169689Skan * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare. 5537169689Skan 5538169689Skan2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net> 5539169689Skan 5540169689Skan * error.c (enum pad): Remove. 5541169689Skan (dump_qualifiers): Likewise. 5542169689Skan (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq. 5543169689Skan (dump_aggr_type): Likewise. 5544169689Skan (dump_type_suffix): Likewise. 5545169689Skan (dump_simple_decl): Likewise. 5546169689Skan (dump_function_decl): Likewise. 5547169689Skan (cv_to_string): Likewise. 5548169689Skan (dump_type_prefix): Likewise. Adjust return void. 5549169689Skan * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to 5550169689Skan cxx_pretty_print.h. 5551169689Skan (pp_cxx_template_keyword_if_needed): Document. 5552169689Skan (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy. 5553169689Skan (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and 5554169689Skan MUST_NOT_THROW_EXPR. 5555169689Skan 5556169689Skan2004-03-21 Mark Mitchell <mark@codesourcery.com> 5557169689Skan 5558169689Skan PR c++/14616 5559169689Skan * decl.c (cp_finish_decl): Compute the size of arrays declared in 5560169689Skan templates, if their type is non-dependent. 5561169689Skan 5562169689Skan2004-03-19 Mark Mitchell <mark@codesourcery.com> 5563169689Skan 5564169689Skan * call.c (build_op_delete_call): Do not forget the placement 5565169689Skan arguments when iterating through mutiple delete operators. 5566169689Skan 5567169689Skan * cp-tree.h (svaed_scope): Remove last_parms. 5568169689Skan (NEW_DELETE_OPNAME_P): New macro. 5569169689Skan (last_function_parms): Remove. 5570169689Skan (do_friend): Adjust prototype. 5571169689Skan * decl.c (grokparms): Return the PARM_DECLs directly, rather than 5572169689Skan using last_function_parms. 5573169689Skan (grokfndecl): Take the PARM_DECLs as an argument, rather than 5574169689Skan using last_function_parms. 5575169689Skan (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs 5576169689Skan for class-specific operator new and operator delete. 5577169689Skan (grok_op_properties): Do not look for allocation functions with 5578169689Skan METHOD_TYPEs. 5579169689Skan (start_function): Use DECL_ARGUMENTS instead of 5580169689Skan last_function_parms. 5581169689Skan * decl.h (last_function_parms): Do not declare. 5582169689Skan * decl2.c (grokclassfn): Do not use last_function_parms. 5583169689Skan * friend.c (do_friend): Remove parmdecls parameter. 5584169689Skan * name-lookup.c (push_to_top_level): Do not save last_function_parms. 5585169689Skan (pop_from_top_level): Do not restore it. 5586169689Skan * pt.c (check_explicit_specialization): Do not adjust 5587169689Skan last_function_parms. 5588169689Skan 5589169689Skan * name-lookup.c (do_local_using_decl): Create a local binding for 5590169689Skan types brought in via using declarations. 5591169689Skan 5592169689Skan * name-lookup.c (lookup_arg_dependent): Handle block-scope 5593169689Skan function declarations correctly. 5594169689Skan 5595169689Skan * semantics.c (finish_id_expression): Correct handling of 5596169689Skan conversion operators to dependent types. 5597169689Skan 5598169689Skan * typeck.c (lookup_destructor): Allow the use of destructors from 5599169689Skan base classes. 5600169689Skan 5601169689Skan2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5602169689Skan 5603169689Skan * cxx-pretty-print.c (pp_cxx_unqualified_id): Use 5604169689Skan TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS. 5605169689Skan * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean 5606169689Skan the field is named TEMPLATE_TYPE_PARM_INDEX. 5607169689Skan 5608169689Skan2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org> 5609169689Skan 5610169689Skan PR c++/14545 5611169689Skan * parser.c (cp_parser_functional_cast): A cast to anything 5612169689Skan but integral or enumaration type is not an integral constant 5613169689Skan expression. 5614169689Skan * pt.c (value_dependent_expression_p): Handle cast expressions 5615169689Skan without operands (such as "int()"). 5616169689Skan 5617169689Skan2004-03-18 Mark Mitchell <mark@codesourcery.com> 5618169689Skan 5619169689Skan * semantics.c (finish_pseudo_destructor_expr): Allow differing 5620169689Skan cv-qualification between the type named by the 5621169689Skan pseudo-destructor-name and the object-type. 5622169689Skan 5623169689Skan * search.c (accessible_base_p): Handle non-proper bases. 5624169689Skan 5625169689Skan * name-lookup.c (do_nonmember_using_decl): If a using declaration 5626169689Skan refers to a single overloaded function, set the type of the 5627169689Skan function. 5628169689Skan * tree.c (lvalue_type): Simplify. 5629169689Skan * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an 5630169689Skan unknown type. 5631169689Skan (build_unary_op): Handle OVERLOADs with known types. 5632169689Skan 5633169689Skan * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for 5634169689Skan function templates. 5635169689Skan 5636169689Skan * parser.c (cp_parser_postfix_expression): Handle the use of 5637169689Skan "typename" in non-dependent contexts. Convert appropriately when 5638169689Skan when using a qualified name after "->" or ".". 5639169689Skan 5640169689Skan * call.c (conditional_conversion): Honor the requirement that some 5641169689Skan conversions refer to the original object. 5642169689Skan 5643169689Skan2004-03-18 Mark Mitchell <mark@codesourcery.com> 5644169689Skan 5645169689Skan * call.c (build_conditional_expr): Do not call force_rvalue for 5646169689Skan operands of void_type when the conditional expression itself has 5647169689Skan void type. 5648169689Skan * name-lookup.c (pushdecl): Don't consider a declaration of a 5649169689Skan function named "main" to be an overload of a type named "main". 5650169689Skan * parser.c (cp_parser_template_name): Perform name lookup when the 5651169689Skan template name is proceeded by "template" if the qualifying scope 5652169689Skan is non-dependent. 5653169689Skan * typeck.c (composite_pointer_type_r): Correctly handle 5654169689Skan pointer-to-member types. 5655169689Skan (build_const_cast): Likewise. 5656169689Skan 5657169689Skan2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5658169689Skan 5659169689Skan * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments. 5660169689Skan * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check. 5661169689Skan (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise. 5662169689Skan (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise. 5663169689Skan (TYPENAME_TYPE_FULLNAME): Add check and use type.values. 5664169689Skan (TYPEOF_TYPE_EXPR): New macro. 5665169689Skan * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS. 5666169689Skan * error.c (dump_type): Use TYPEOF_TYPE_EXPR. 5667169689Skan * pt.c (tsubst): Likewise. 5668169689Skan * semantics.c (finish_typeof): Likewise. 5669169689Skan * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE, 5670169689Skan and TEMPLATE_TYPE_PARM. 5671169689Skan * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN. 5672169689Skan (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES. 5673169689Skan 5674169689Skan2004-03-16 Mark Mitchell <mark@codesourcery.com> 5675169689Skan 5676169689Skan PR c++/14586 5677169689Skan * cp-tree.h (build_new_op): Change prototype. 5678169689Skan (build_x_binary_op): Likewise. 5679169689Skan * call.c (build_new_op): Add overloaded_p parameter. 5680169689Skan * decl2.c (grok_array_decl): Adjust call to build_new_op. 5681169689Skan * parser.c (cp_parser_binary_expression): Note that uses of 5682169689Skan overloaded operators prevents an expression from being considered 5683169689Skan an integral constant. 5684169689Skan * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or 5685169689Skan build_x_binary_op. 5686169689Skan * semantics.c (finish_call_expr): Likewise. 5687169689Skan * typeck.c (rationalize_conditional_expr): Likewise. 5688169689Skan (build_x_indirect_ref): Likewise. 5689169689Skan (build_x_binary_op): Likewise. 5690169689Skan (build_x_unary_op): Likewise. 5691169689Skan (build_x_compound_expr): Likewise. 5692169689Skan (build_modify_expr): Likewise. 5693169689Skan * typeck2.c (build_x_arrow): Likewise. 5694169689Skan 5695169689Skan2004-03-15 Kazu Hirata <kazu@cs.umass.edu> 5696169689Skan 5697169689Skan * cp-lang.c, ptree.c: Update copyright. 5698169689Skan 5699169689Skan2004-03-13 Mark Mitchell <mark@codesourcery.com> 5700169689Skan 5701169689Skan PR c++/14550 5702169689Skan * parser.c (cp_parser_non_integral_constant_expression): Encode 5703169689Skan more of the idiom that surrounded calls to this function within 5704169689Skan the function itself 5705169689Skan (cp_parser_primary_expression): Adjust accordingly. 5706169689Skan (cp_parser_postfix_expression): Likewise. 5707169689Skan (cp_parser_unary_expression): Likewise. 5708169689Skan (cp_parser_cast_expression): Likewise. 5709169689Skan (cp_parser_assignment_expression): Likewise. 5710169689Skan (cp_parser_expression): Likewise. 5711169689Skan (cp_parser_new_expression): Note that new-expressions are not 5712169689Skan allowed in integral constant expressions. 5713169689Skan (cp_parser_delete_expression): Likewise. 5714169689Skan 5715169689Skan2004-03-12 Matt Austern <austern@apple.com> 5716169689Skan 5717169689Skan * decl2.c (maybe_make_one_only): Look at 5718169689Skan TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether 5719169689Skan to make an explicit instantiation weak. 5720169689Skan * method.c (use_thunk): Make sure we call comdat_linkage 5721169689Skan when appropriate. 5722169689Skan * pt.c (do_type_instantiation): On systems where weak symbols 5723169689Skan don't go in a static archive's TOC, explicit instantiation of a 5724169689Skan class must imply *explicit* instantiation of its memeber. 5725169689Skan 5726169689Skan2004-03-11 Kazu Hirata <kazu@cs.umass.edu> 5727169689Skan 5728169689Skan * call.c, cp-tree.h, pt.c: Fix comment typos. 5729169689Skan 5730169689Skan2004-03-10 Mark Mitchell <mark@codesourcery.com> 5731169689Skan 5732169689Skan PR c++/14510 5733169689Skan * decl.c (xref_tag): Disregard non-type declarations when 5734169689Skan looking up a tagged type. 5735169689Skan 5736169689Skan2004-03-09 Nathan Sidwell <nathan@codesourcery.com> 5737169689Skan 5738169689Skan PR c++/14397 5739169689Skan * call.c (convert_like_real): Build a const qualified temporary, 5740169689Skan when testing ctor access. 5741169689Skan 5742169689Skan2004-03-09 Mark Mitchell <mark@codesourcery.com> 5743169689Skan 5744169689Skan * call.c (initialize_reference): Fix typo. 5745169689Skan 5746169689Skan2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org> 5747169689Skan 5748169689Skan PR c++/14409 5749169689Skan * pt.c (determine_specialization): For member templates, match also 5750169689Skan constness. 5751169689Skan 5752169689Skan PR c++/14448 5753169689Skan * parser.c (cp_parser_initializer_clause): Fold initializer if it is 5754169689Skan non-dependent. 5755169689Skan * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs. 5756169689Skan 5757169689Skan2004-03-09 Mark Mitchell <mark@codesourcery.com> 5758169689Skan 5759169689Skan PR c++/14230 5760169689Skan * call.c (initialize_reference): Handle initializers that are 5761169689Skan class-member access expressions applies to rvalues. 5762169689Skan 5763169689Skan2004-03-09 Mark Mitchell <mark@codesourcery.com> 5764169689Skan 5765169689Skan PR c++/14432 5766169689Skan * name-lookup.c (supplement_binding): Ignore functions that are 5767169689Skan marked DECL_ANTICIPATED. 5768169689Skan 5769169689Skan2004-03-08 Mark Mitchell <mark@codesourcery.com> 5770169689Skan 5771169689Skan PR c++/14401 5772169689Skan * class.c (check_field_decls): Complain about non-static data 5773169689Skan members of reference type in unions. Propagate 5774169689Skan CLASSTYPE_REF_FIELDS_NEED_INIT and 5775169689Skan CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static 5776169689Skan data members. 5777169689Skan * init.c (perform_member_init): Complain about mbmers with const 5778169689Skan type that are not explicitly initialized. 5779169689Skan 5780169689Skan2004-03-08 Mark Mitchell <mark@codesourcery.com> 5781169689Skan 5782169689Skan * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS. 5783169689Skan * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro. 5784169689Skan (lang_identifier): Remove implicit_decl and error_locus. 5785169689Skan (IDENTIFIER_IMPLICIT_DECL): Remove. 5786169689Skan (SET_IDENTIFIER_IMPLICTI_DECL): Likewise. 5787169689Skan (IDENTIFIER_ERROR_LOCUS): Likewise. 5788169689Skan (SET_IDENTIFIER_ERROR_LOCUS): Likewise. 5789169689Skan (TYPE_ASSEMBLER_NAME_STRING): Likewise. 5790169689Skan (TYPE_ASSEMBLER_NAME_LENGTH): Likewise. 5791169689Skan (implicitly_declare): Remove. 5792169689Skan * decl.c (warn_extern_redeclared_static): Remove check of 5793169689Skan IDENTIFIER_IMPLICIT_DECL. 5794169689Skan (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS. 5795169689Skan (implicitly_declare): Remove. 5796169689Skan (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS. 5797169689Skan (start_function): Don't check IDENTIFIER_IMPLICIT_DECL. 5798169689Skan (start_method): Don't check IDENTIFIER_ERROR_LOCUS. 5799169689Skan * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL 5800169689Skan in the innermost scope, rather than at namespace scope. 5801169689Skan * name-lookup.c (push_local_binding): Give it external linkage. 5802169689Skan (pushdecl): Remove dead code. 5803169689Skan * name-lookup.h (push_local_binding): Declare it. 5804169689Skan * ptree.c (cxx_print_identifier): Don't print 5805169689Skan IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS. 5806169689Skan * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P, 5807169689Skan not IDENTIFIER_ERROR_LOCUS. 5808169689Skan * typeck.c (build_function_call): Remove dead code. 5809169689Skan 5810169689Skan2004-03-08 Jason Merrill <jason@redhat.com> 5811169689Skan 5812169689Skan PR c++/13170 5813169689Skan * decl.c (xref_tag): Remove attribute handling. 5814169689Skan * cp-tree.h: Adjust prototype. 5815169689Skan * decl.c, parser.c, rtti.c: Adjust callers. 5816169689Skan * parser.c (cp_parser_class_head): Pass back attributes in the 5817169689Skan class head. 5818169689Skan (cp_parser_class_specifier): Adjust. 5819169689Skan 5820169689Skan2004-03-08 Matt Austern <austern@apple.com> 5821169689Skan 5822169689Skan PR debug/14079 5823169689Skan * name-lookup.c (add_decl_to_level): Add extern variables, as well 5824169689Skan as static, to static_decls array. 5825169689Skan 5826169689Skan2004-03-05 Jason Merrill <jason@redhat.com> 5827169689Skan 5828169689Skan * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/. 5829169689Skan 5830169689Skan2004-03-04 Geoffrey Keating <geoffk@apple.com> 5831169689Skan 5832169689Skan * decl.c (grokfndecl): Update old incorrect comment. 5833169689Skan (grokvardecl): Diagnose C++ variables of type with no linkage. 5834169689Skan 5835169689Skan2004-03-01 Mark Mitchell <mark@codesourcery.com> 5836169689Skan 5837169689Skan PR c++/14369 5838169689Skan * pt.c (build_non_dependent_expr): Do not create a 5839169689Skan NON_DEPENDENT_EXPR for a THROW_EXPR. 5840169689Skan 5841169689Skan2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net> 5842169689Skan 5843169689Skan PR c++/14369 5844169689Skan * error.c (dump_expr): Handle THROW_EXPR. 5845169689Skan 5846169689Skan2004-03-01 Mark Mitchell <mark@codesourcery.com> 5847169689Skan 5848169689Skan PR c++/14360 5849169689Skan * parser.c (cp_parser_postfix_expression): Do not perform Koenig 5850169689Skan lookup if ordinary name-lookup finds a non-function. 5851169689Skan * pt.c (tsubst_copy_and_build): Likewise. 5852169689Skan 5853169689Skan PR c++/14361 5854169689Skan * parser.c (cp_parser_late_parsing_default_args): Check that there 5855169689Skan are no extra tokens after the end of the default-argument 5856169689Skan expression. 5857169689Skan 5858169689Skan2004-03-01 Mark Mitchell <mark@codesourcery.com> 5859169689Skan 5860169689Skan PR c++/14324 5861169689Skan * lex.c (retrofit_lang_decl): Treat entities with no linkage as 5862169689Skan having C++ linkage for name-mangling purposes. 5863169689Skan 5864169689Skan PR c++/14260 5865169689Skan * parser.c (cp_parser_direct_declarator): Recognize constructor 5866169689Skan declarators that use a template-id to name the class being 5867169689Skan constructed. 5868169689Skan 5869169689Skan PR c++/14337 5870169689Skan * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes. 5871169689Skan (tsubst_expr): Do not call tsubst_copy, even when 5872169689Skan processing_template_decl. 5873169689Skan 5874169689Skan2004-03-01 Jeff Law <law@redhat.com> 5875169689Skan 5876169689Skan * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to 5877169689Skan the proper type. 5878169689Skan 5879169689Skan2004-02-29 Mark Mitchell <mark@codesourcery.com> 5880169689Skan 5881169689Skan PR c++/14138 5882169689Skan * name-lookup.h (push_scope): Change prototype. 5883169689Skan * name-lookup.c (push_scope): Do not reenter the current class 5884169689Skan scope. 5885169689Skan * decl.c (grokfndecl): Check return code from push_scope before 5886169689Skan calling pop_scope. 5887169689Skan * decl2.c (check_classfn): Likewise. 5888169689Skan * parser.c (cp_parser_conversion_function_id): Likewise. 5889169689Skan (cp_parser_init_declarator): Likewise. 5890169689Skan (cp_parser_direct_declarator): Likewise. 5891169689Skan (cp_parser_class_specifier): Likewise. 5892169689Skan (cp_parser_class_head): Likewise. 5893169689Skan (cp_parser_lookup_name): Likewise. 5894169689Skan (cp_parser_constructor_declarator_p): Likewise. 5895169689Skan * pt.c (instantiate_class_template): Likewise. 5896169689Skan (resolve_typename_type): Likewise. 5897169689Skan 5898169689Skan2004-02-29 Mark Mitchell <mark@codesourcery.com> 5899169689Skan 5900169689Skan PR c++/14267 5901169689Skan * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue 5902169689Skan extension. 5903169689Skan 5904169689Skan PR debug/12103 5905169689Skan * class.c (update_vtable_entry_for_fn): Do not go through 5906169689Skan covariance machinery if the type returned by an overrider is the 5907169689Skan same as the original. 5908169689Skan 5909169689Skan2004-02-29 Kazu Hirata <kazu@cs.umass.edu> 5910169689Skan 5911169689Skan * call.c: Fix a comment typo. 5912169689Skan 5913169689Skan2004-02-27 Ziemowit Laski <zlaski@apple.com> 5914169689Skan 5915169689Skan * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs. 5916169689Skan 5917169689Skan2004-02-26 Mark Mitchell <mark@codesourcery.com> 5918169689Skan 5919169689Skan PR c++/14278 5920169689Skan * parser.c (cp_parser_parameter_declaration_list): Commit 5921169689Skan to fewer tentative parses. 5922169689Skan 5923169689Skan2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org> 5924169689Skan 5925169689Skan PR c++/14284 5926169689Skan * pt.c (dependent_type_p_r): A template template parameter is a 5927169689Skan dependent type. 5928169689Skan 5929169689Skan2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org> 5930169689Skan 5931169689Skan PR c++/14246 5932169689Skan * mangle.c (write_template_arg_literal): Don't rely on identity for 5933169689Skan boolean constants. 5934169689Skan 5935169689Skan2004-02-24 Jason Merrill <jason@redhat.com> 5936169689Skan 5937169689Skan * tree.c (build_exception_variant): Use check_qualified_type. 5938169689Skan 5939169689Skan2004-02-23 Zack Weinberg <zack@codesourcery.com> 5940169689Skan Kazu Hirata <kazu@cs.umass.edu> 5941169689Skan 5942169689Skan * decl.c (cxx_init_decl_processing): Don't check 5943169689Skan flag_writable_strings. 5944169689Skan 5945169689Skan2004-02-23 Andrew Pinski <pinskia@physics.uc.edu> 5946169689Skan 5947169689Skan PR c++/14156 5948169689Skan * typeck.c (maybe_warn_about_returning_address_of_location): 5949169689Skan Change check for VAR_DECL to use DECL_P instead. 5950169689Skan 5951169689Skan2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org> 5952169689Skan 5953169689Skan PR c++/14250 5954169689Skan * cvt.c (build_expr_type_conversion): Type must be complete before 5955169689Skan looking up for conversions. 5956169689Skan 5957169689Skan2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org> 5958169689Skan 5959169689Skan PR c++/14143 5960169689Skan * name-lookup.c (arg_assoc_class): Don't look into template 5961169689Skan arguments if it is not a primary template. 5962169689Skan 5963169689Skan2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> 5964169689Skan 5965169689Skan PR c++/12007 5966169689Skan * method.c (use_thunk): Always clone function argument tree. 5967169689Skan 5968169689Skan2004-02-20 Mark Mitchell <mark@codesourcery.com> 5969169689Skan 5970169689Skan PR c++/14199 5971169689Skan * pt.c (tsubst_copy): Call mark_used for a PARM_DECL. 5972169689Skan 5973169689Skan PR c++/14173 5974169689Skan * semantics.c (begin_class_definition): Set TYPE_PACKED correctly 5975169689Skan for all type variants. 5976169689Skan 5977169689Skan2004-02-19 Mark Mitchell <mark@codesourcery.com> 5978169689Skan 5979169689Skan PR c++/13927 5980169689Skan * decl.c (duplicate_decls): Return error_mark_node for invalid 5981169689Skan redeclarations. 5982169689Skan * name-lookup.c (push_namespace): Ignore the return value from 5983169689Skan pushdecl. 5984169689Skan * pt.c (push_template_decl_real): Robustify. 5985169689Skan 5986169689Skan PR c++/14186 5987169689Skan * name-lookup.c (push_class_level_binding): Do not complain about 5988169689Skan adding a binding for a member whose name is the same as the 5989169689Skan enclosing class if the member is located in a base class of the 5990169689Skan current class. 5991169689Skan 5992169689Skan2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org> 5993169689Skan 5994169689Skan PR c++/14181 5995169689Skan * parser.c (cp_parser_new_expression): Parse an ill-formed 5996169689Skan direct-new-declarator after a parenthesized type-id to emit good 5997169689Skan diagnostic. 5998169689Skan 5999169689Skan2004-02-18 Kazu Hirata <kazu@cs.umass.edu> 6000169689Skan 6001169689Skan * cp-tree.def, cvt.c: Update copyright. 6002169689Skan 6003169689Skan2004-02-17 Mark Mitchell <mark@codesourcery.com> 6004169689Skan 6005169689Skan PR c++/11326 6006169689Skan * cp-tree.h (abi_version_at_least): Remove. 6007169689Skan * mangle.c: Include flags.h. 6008169689Skan 6009169689Skan2004-02-15 Mark Mitchell <mark@codesourcery.com> 6010169689Skan 6011169689Skan PR c++/13971 6012169689Skan * call.c (build_conditional_expr): Handle conversions between 6013169689Skan class types which result in differently cv-qualified type 6014169689Skan variants. 6015169689Skan 6016169689Skan PR c++/14086 6017169689Skan * class.c (delete_duplicate_fields_1): Remove. 6018169689Skan (delete_duplicate_fields): Likewise. 6019169689Skan (finish_struct_anon): Remove check for members with the same name 6020169689Skan as their enclosing class. 6021169689Skan (check_field_decls): Do not call duplicate_fields. 6022169689Skan * decl.c (grokdeclarator): Remove check for static data members 6023169689Skan with the same name as their enclosing class. 6024169689Skan * name-lookup.c (push_class_level_binding): Check for members with 6025169689Skan the same name as their enclosing class. 6026169689Skan 6027169689Skan2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net> 6028169689Skan 6029169689Skan PR c++/14085 6030169689Skan * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM. 6031169689Skan 6032169689Skan2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 6033169689Skan 6034169689Skan PR c++/13635 6035169689Skan * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL 6036169689Skan has full set of arguments. 6037169689Skan 6038169689Skan2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6039169689Skan 6040169689Skan PR c++/13927 6041169689Skan * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations. 6042169689Skan 6043169689Skan2004-02-13 Mark Mitchell <mark@codesourcery.com> 6044169689Skan 6045169689Skan PR c++/14122 6046169689Skan * cp-tree.h (delete_sanity): Change prototype. 6047169689Skan * decl2.c (delete_sanity): Make doing_vec a bool, not an int. 6048169689Skan Remove dead code. Adjust code to warn about deleting an array. 6049169689Skan * typekc.c (decay_conversion): Use build_address and build_nop. 6050169689Skan 6051169689Skan PR c++/14108 6052169689Skan * search.c (accessible_p): Do not check access in thunks. 6053169689Skan 6054169689Skan PR c++/14083 6055169689Skan * call.c (build_conditional_expr): Call force_rvalue on the 6056169689Skan non-void operand in the case that one result is a throw-expression 6057169689Skan and the other is not. 6058169689Skan 6059169689Skan2004-02-13 Ian Lance Taylor <ian@wasabisystems.com> 6060169689Skan 6061169689Skan PR c++/9851 6062169689Skan * parser.c (cp_parser_pseudo_destructor_name): Check for errors on 6063169689Skan the type name and look ahead for ::~, and bail out early with a 6064169689Skan better error message if the parse is going to fail. 6065169689Skan 6066169689Skan2004-02-12 Mark Mitchell <mark@codesourcery.com> 6067169689Skan 6068169689Skan * call.c (conversion_kind): New type. 6069169689Skan (conversion_rank): Likewise. 6070169689Skan (conversion): Likewise. 6071169689Skan (CONVERSION_RANK): New macro. 6072169689Skan (conversion_obstack): New variable. 6073169689Skan (obstack_initialized): Likewise. 6074169689Skan (z_candidate): Change type of convs and second_conv. 6075169689Skan (candidate_warning): New type. 6076169689Skan (IDENTITY_RANK): Remove. 6077169689Skan (EXACT_RANK): Likewise. 6078169689Skan (PROMO_RANK): Likewise. 6079169689Skan (STD_RANK): Likewise. 6080169689Skan (PBOOL_RANK): Likewise. 6081169689Skan (USER_RANK): Likewise. 6082169689Skan (ELLIPSIS_RANK): Likewise. 6083169689Skan (BAD_RANK): Likewise. 6084169689Skan (ICS_RANK): Likewise. 6085169689Skan (ICS_STD_RANK): Likewise. 6086169689Skan (ICS_USER_FLAG): Likewise. 6087169689Skan (ICS_ELLIPSIS_FLAG): Likewise. 6088169689Skan (ICS_THIS_FLAG): Likewise. 6089169689Skan (ICS_BAD_FLAG): Likewise. 6090169689Skan (NEED_TEMPORARY_P): Likewise. 6091169689Skan (CHECK_COPY_CONSTRUCTOR_P): Likewise. 6092169689Skan (USER_CONV_CAND): Likewise. 6093169689Skan (USER_CONV_FN): Likewise. 6094169689Skan (conversion_obstack_alloc): New function. 6095169689Skan (alloc_conversion): Likewise. 6096169689Skan (validate_conversion_obstack): Likewise. 6097169689Skan (alloc_conversions): Likewise. 6098169689Skan (build_conv): Adjust to deal with new conversion data structures. 6099169689Skan (build_identity_conv): New function. 6100169689Skan (build_ambiguous_conv): Likewise. 6101169689Skan (standard_conversion): Adjust to deal with new conversion data 6102169689Skan structures. 6103169689Skan (convert_class_to_reference): Likewise. 6104169689Skan (direct_reference_binding): Likewise. 6105169689Skan (reference_binding): Likewise. 6106169689Skan (implicit_conversion): Likewise. 6107169689Skan (add_candidate): Likewise. 6108169689Skan (add_function_candidate): Likewise. 6109169689Skan (add_conv_candidate): Likewise. 6110169689Skan (build_builtin_candidate): Likewise. 6111169689Skan (print_z_candidate): Likewise. 6112169689Skan (merge_conversion_sequences): Likewise. 6113169689Skan (build_user_type_conversion_1): Likewise. 6114169689Skan (build_user_type_conversion): Likewise. 6115169689Skan (build_new_function_call): Likewise. 6116169689Skan (build_object_call): Likewise. 6117169689Skan (conditional_conversion): Likewise. 6118169689Skan (build_conditional_expr): Likewise. 6119169689Skan (build_new_op): Likewise. 6120169689Skan (build_op_delete_call): Likewise. 6121169689Skan (convert_like_real): Likewise. 6122169689Skan (build_over_call): Likewise. 6123169689Skan (build_new_method_call): Likewise. 6124169689Skan (is_subseq): Likewise. 6125169689Skan (maybe_handle_implicit_object): Likewise. 6126169689Skan (maybe_handle_ref_bind): Likewise. 6127169689Skan (compare_ics): Likewise. 6128169689Skan (source_type): Likewise. 6129169689Skan (add_warning): Likewise. 6130169689Skan (joust): Likewise. 6131169689Skan (can_convert_arg): Likewise. 6132169689Skan (can_convert_arg_bad): Likewise. 6133169689Skan (perform_implicit_conversion): Likewise. 6134169689Skan (perform_direct_initialization_if_possible): Likewise. 6135169689Skan (initialize_reference): Likewise. 6136169689Skan * cp-lang.c (cp_tree_size): Do not handle WRAPPER. 6137169689Skan * cp-tree.def (WRAPPER): Likewise. 6138169689Skan (IDENTITY_CONV): Remove. 6139169689Skan (LVALUE_CONV): Likewise. 6140169689Skan (QUAL_CONV): Likewise. 6141169689Skan (STD_CONV): Likewise. 6142169689Skan (PTR_CONV): Likewise. 6143169689Skan (PMEM_CONV): Likewise. 6144169689Skan (BASE_CONV): Likewise. 6145169689Skan (REF_BIND): Likewise. 6146169689Skan (USER_CONV): Likewise. 6147169689Skan (AMBIG_CONV): Likewise. 6148169689Skan (RVALUE_CONV): Likewise. 6149169689Skan * cp-tree.h (tree_wrapper): Remove. 6150169689Skan (WRAPPER_ZC): Remove. 6151169689Skan (lang_tree_node): Remove wrapper. 6152169689Skan (LOOKUP_SPECULATIVELY): Remove. 6153169689Skan (build_op_delete_call): Adjust prototype. 6154169689Skan (validate_conversion_obstack): Declare. 6155169689Skan (build_zc_wrapper): Remove. 6156169689Skan * cvt.c (convert_to_reference): Remove dead code. 6157169689Skan (ocp_convert): Likewise. 6158169689Skan * decl.c (redeclaration_error_message): Correct handling of 6159169689Skan templates. 6160169689Skan (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY. 6161169689Skan (cp_tree_node_structure): Remove WRAPPER case. 6162169689Skan * decl2.c (finish_file): Call validate_conversion_obstack. 6163169689Skan * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY. 6164169689Skan (build_op_delete_call): Likewise. 6165169689Skan (build_x_delete): Likewise. 6166169689Skan (build_delete): Adjust call to build_op_delete_call. 6167169689Skan * pt.c (tsubst_friend_declaration): Adjust code to determine 6168169689Skan whether or not a friend template is a definition. 6169169689Skan (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs. 6170169689Skan * tree.c (build_zc_wrapper): Remove. 6171169689Skan 6172169689Skan2004-02-12 Zack Weinberg <zack@codesourcery.com> 6173169689Skan 6174169689Skan * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS. 6175169689Skan * cp-tree.h: Don't declare cxx_builtin_type_decls. 6176169689Skan * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete. 6177169689Skan (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL. 6178169689Skan 6179169689Skan2004-02-10 Mark Mitchell <mark@codesourcery.com> 6180169689Skan 6181169689Skan * typeck.c (lookup_destructor): Fix typo in error message. 6182169689Skan 6183169689Skan2004-02-09 Kazu Hirata <kazu@cs.umass.edu> 6184169689Skan 6185169689Skan * call.c, parser.c, tree.c: Fix comment typos. 6186169689Skan 6187169689Skan2004-02-07 Zack Weinberg <zack@codesourcery.com> 6188169689Skan 6189169689Skan Bug 13856 6190169689Skan * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS. 6191169689Skan * decl.c (duplicate_decls, start_function): Likewise. 6192169689Skan 6193169689Skan2004-02-07 Zack Weinberg <zack@codesourcery.com> 6194169689Skan 6195169689Skan * name-lookup.c (pushdecl): Issue shadow warnings directly. 6196169689Skan * parser.c (free_parser_stacks): Delete. 6197169689Skan 6198169689Skan2004-02-07 Kazu Hirata <kazu@cs.umass.edu> 6199169689Skan 6200169689Skan * rtti.c: Update copyright. 6201169689Skan 6202169689Skan2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6203169689Skan 6204169689Skan PR c++/14033 6205169689Skan * decl.c (require_complete_types_for_parms): Do not insert 6206169689Skan error_mark_node in the parameter list. 6207169689Skan 6208169689Skan2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6209169689Skan 6210169689Skan PR c++/14028 6211169689Skan * parser.c (cp_parser_enclosed_template_argument_list): Emit straight 6212169689Skan error when terminator can not be found. 6213169689Skan 6214169689Skan2004-02-05 Kelley Cook <kcook@gcc.gnu.org> 6215169689Skan 6216169689Skan Make-lang.in (po-generated): Delete. 6217169689Skan 6218169689Skan2004-02-05 Kazu Hirata <kazu@cs.umass.edu> 6219169689Skan 6220169689Skan * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with 6221169689Skan targetm.calls.promote_prototypes. 6222169689Skan 6223169689Skan2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 6224169689Skan 6225169689Skan PR middle-end/13750 6226169689Skan Revert: 6227169689Skan 2004-01-15 Geoffrey Keating <geoffk@apple.com> 6228169689Skan PR pch/13361 6229169689Skan * cp/lex.c (handle_pragma_interface): Duplicate string from tree. 6230169689Skan (handle_pragma_implementation): Likewise. 6231169689Skan 6232169689Skan2004-02-05 Mark Mitchell <mark@codesourcery.com> 6233169689Skan 6234169689Skan PR c++/13714 6235169689Skan * typeck.c (lookup_destructor): Tweak error message. 6236169689Skan 6237169689Skan2004-02-05 Jan Hubicka <jh@suse.cz> 6238169689Skan 6239169689Skan * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat 6240169689Skan functions. 6241169689Skan 6242169689Skan2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6243169689Skan 6244169689Skan PR c++/14008 6245169689Skan * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing 6246169689Skan code, only emits the diagnostic now. Added lookup of the identifier 6247169689Skan and support for qualified ids. 6248169689Skan (cp_parser_parse_and_diagnose_invalid_type_name): New function. 6249169689Skan Parse an (invalid) type name as id-expression within a declarator. 6250169689Skan (cp_parser_simple_declaration): Use it. 6251169689Skan (cp_parser_member_declaration): Likewise. 6252169689Skan (cp_parser_make_typename_type): New function. Handle errors through 6253169689Skan cp_parser_diagnose_invalid_typename. 6254169689Skan (cp_parser_elaborated_type_specifier): Use it. 6255169689Skan 6256169689Skan2004-02-04 Mark Mitchell <mark@codesourcery.com> 6257169689Skan 6258169689Skan PR c++/13932 6259169689Skan * call.c (convert_like_real): Use "converting" rather than 6260169689Skan "argument" as the descriptive keyword to 6261169689Skan dubious_conversion_warnings. 6262169689Skan * typeck.c (convert_for_assignment): Do not call 6263169689Skan dubious_conversion_warnings. 6264169689Skan 6265169689Skan2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6266169689Skan 6267169689Skan PR c++/13086 6268169689Skan * init.c (build_delete): Emit a more informative error message in 6269169689Skan case of an incomplete type, and on the correct source line. 6270169689Skan 6271169689Skan2004-02-04 Kazu Hirata <kazu@cs.umass.edu> 6272169689Skan 6273169689Skan * error.c, search.c: Update copyright. 6274169689Skan 6275169689Skan2004-02-04 Mark Mitchell <mark@codesourcery.com> 6276169689Skan 6277169689Skan PR c++/9941 6278169689Skan * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the 6279169689Skan linkage for the typeinfo name string. 6280169689Skan 6281169689Skan2004-02-04 Mark Mitchell <mark@codesourcery.com> 6282169689Skan 6283169689Skan PR c++/13969 6284169689Skan * cp-tree.h (fold_non_dependent_expr): New function. 6285169689Skan * parser.c (cp_parser_fold_non_dependent_expr): Remove. 6286169689Skan (cp_parser_template_argument): Use fold_non_dependent_expr. 6287169689Skan (cp_parser_direct_declarator): Likewise. 6288169689Skan * pt.c (fold_non_dependent_expr): New function. 6289169689Skan (convert_nontype_argument): Use it. 6290169689Skan (tsubst_qualified_id): Simplify. 6291169689Skan (tsubst_copy_and_build): Likewise. 6292169689Skan 6293169689Skan2004-02-04 Mark Mitchell <mark@codesourcery.com> 6294169689Skan 6295169689Skan * decl.c (cxx_push_function_context): Do not set 6296169689Skan current_function_is_thunk. 6297169689Skan * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the 6298169689Skan actual function. 6299169689Skan 6300169689Skan2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6301169689Skan 6302169689Skan PR c++/13997 6303169689Skan * pt.c (more_specialized_class): Increase processing_template_decl 6304169689Skan while partial ordering. 6305169689Skan 6306169689Skan2004-02-03 Mark Mitchell <mark@codesourcery.com> 6307169689Skan 6308169689Skan PR c++/13925 6309169689Skan * decl.c (start_function): Do not call pushdecl for any 6310169689Skan instantiation or specialization of a primary template. 6311169689Skan 6312169689Skan2004-02-03 Mark Mitchell <mark@codesourcery.com> 6313169689Skan 6314169689Skan PR c++/13950 6315169689Skan * parser.c (cp_parser_class_name): Robustify. 6316169689Skan 6317169689Skan PR c++/13970 6318169689Skan * parser.c (cp_parser_cache_group): Do not consume the EOF token. 6319169689Skan 6320169689Skan PR c++/14002 6321169689Skan * semantics.c (finish_id_expression): Do not return an 6322169689Skan IDENTIFIER_NODE when lookup finds a PARM_DECL. 6323169689Skan 6324169689Skan2004-02-03 Mark Mitchell <mark@codesourcery.com> 6325169689Skan 6326169689Skan PR c++/13978 6327169689Skan * pt.c (build_non_dependent_expr): Do not build 6328169689Skan NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs. 6329169689Skan 6330169689Skan PR c++/13968 6331169689Skan * semantics.c (finish_id_expression): Do not return an 6332169689Skan IDENTIFIER_NODE when lookup finds a VAR_DECL. 6333169689Skan 6334169689Skan PR c++/13975 6335169689Skan * parser.c (cp_parser_simple_declaration): When skipping to the 6336169689Skan end of the statement swallow the terminating semicolon. 6337169689Skan 6338169689Skan2004-02-02 Mark Mitchell <mark@codesourcery.com> 6339169689Skan 6340169689Skan PR c++/13113 6341169689Skan * init.c (build_offset_ref): Improve error recovery for invalid 6342169689Skan uses of non-static member functions. 6343169689Skan 6344169689Skan PR c++/13854 6345169689Skan * cp-tree.h (cp_build_type_attribute_variant): New function. 6346169689Skan * class.c (build_clone): Use cp_build_type_attribute_variant. 6347169689Skan * decl.c (duplicate_decls): Likewise. 6348169689Skan * pt.c (copy_default_args_to_explicit_spec): Likewise. 6349169689Skan (tsubst_function_type): Likewise. 6350169689Skan * tree.c (build_exception_variant): Check attributes before 6351169689Skan concluding that two types are the same. 6352169689Skan (cp_build_type-attribute_variant): New method. 6353169689Skan * typeck.c (merge_types): Use cp_build_type_attribute_variant. 6354169689Skan 6355169689Skan PR c++/13907 6356169689Skan * call.c (convert_class_to_reference): Keep better track of 6357169689Skan pedantically invalid user-defined conversions. 6358169689Skan 6359169689Skan2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6360169689Skan 6361169689Skan PR c++/13957 6362169689Skan * pt.c (tsubst_qualified_id): Improved error message when a type 6363169689Skan is expected but not found. 6364169689Skan 6365169689Skan2004-01-31 Kazu Hirata <kazu@cs.umass.edu> 6366169689Skan 6367169689Skan * class.c: Fix comment typos. 6368169689Skan * decl.c: Likewise. 6369169689Skan * error.c: Likewise. 6370169689Skan * parser.c: Likewise. 6371169689Skan * pt.c: Likewise. 6372169689Skan * search.c: Likewise. 6373169689Skan * typeck.c: Likewise. 6374169689Skan 6375169689Skan2004-01-30 Richard Henderson <rth@redhat.com> 6376169689Skan 6377169689Skan PR c++/13693 6378169689Skan * method.c (use_thunk): Don't force_target_expr for void thunks. 6379169689Skan * tree.c (build_target_expr_with_type): Assert non-void type. 6380169689Skan (force_target_expr): Likewise. 6381169689Skan 6382169689Skan2004-01-30 Michael Matz <matz@suse.de> 6383169689Skan 6384169689Skan * parser.c (cp_parser_labeled_statement): Accept case ranges. 6385169689Skan 6386169689Skan2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6387169689Skan 6388169689Skan DR206 6389169689Skan PR c++/13813 6390169689Skan * decl.c (grokdeclarator): Check immediatly type completeness for 6391169689Skan non-dependent types. 6392169689Skan 6393169689Skan2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6394169689Skan 6395169689Skan PR c++/13683 6396169689Skan * call.c (convert_arg_to_ellipsis): Don't emit a warning if within 6397169689Skan a sizeof expression.block 6398169689Skan 6399169689Skan2004-01-29 Mark Mitchell <mark@codesourcery.com> 6400169689Skan 6401169689Skan PR c++/13883 6402169689Skan * mangle.c (write_encoding): Correct encoding of member template 6403169689Skan constructors. 6404169689Skan 6405169689Skan2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6406169689Skan 6407169689Skan * parser.c (cp_parser_template_id): Parse tentatively `[:' after a 6408169689Skan template name as it was `<::' (digraph typo). 6409169689Skan (cp_parser_nth_token_starts_template_argument_list_p): New function. 6410169689Skan (cp_parser_id_expression): Use it. 6411169689Skan (cp_parser_nested_name_specifier_opt): Likewise. 6412169689Skan (cp_parser_template_name): Likewise. 6413169689Skan (cp_parser_class_name): Likewise. 6414169689Skan (cp_lexer_get_preprocessor_token): Use c_lex_with_flags. 6415169689Skan 6416169689Skan2004-01-28 Mark Mitchell <mark@codesourcery.com> 6417169689Skan 6418169689Skan PR c++/13791 6419169689Skan * typeck.c (merge_types): Do not merge attributes into 6420169689Skan TYPENAME_TYPEs. 6421169689Skan 6422169689Skan PR c++/13736 6423169689Skan * parser.c (cp_parser_direct_declarator): Do not prevent 6424169689Skan backtracking inside a parenthesized declarator. 6425169689Skan (cp_parser_parameter_declaration): Fix typo in comment. 6426169689Skan 6427169689Skan2004-01-28 Jan Hubicka <jh@suse.cz> 6428169689Skan 6429169689Skan * semantics.c (expand_body) Do emit_associated_thunks before 6430169689Skan expansion. 6431169689Skan 6432169689Skan2004-01-27 Devang Patel <dpatel@apple.com> 6433169689Skan 6434169689Skan * name-lookup.c: Include "debug.h" 6435169689Skan (do_namespace_alias): Invoke debug_hooks to emit debug info 6436169689Skan for namespace alias. 6437169689Skan (do_local_using_decl): Invoke debug_hooks to emit debug info 6438169689Skan for using decl. 6439169689Skan (do_class_using_decl): Same. 6440169689Skan (do_toplevel_using_decl): Same. 6441169689Skan (do_using_directive): Same. 6442169689Skan (cp_emit_debug_info_for_using): New function. 6443169689Skan * Make-lang.in (cp/parser.o): Depend on debug.h 6444169689Skan (cp/name-lookup.o): Same. 6445169689Skan 6446169689Skan2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6447169689Skan 6448169689Skan * cp-tree.h (language_function, lang_type_header): Use 6449169689Skan BOOL_BITFIELD. 6450169689Skan * name-lookup.h (cp_binding_level): Likewise. 6451169689Skan 6452169689Skan2004-01-26 Mark Mitchell <mark@codesourcery.com> 6453169689Skan 6454169689Skan PR c++/13663 6455169689Skan * semantics.c (finish_for_expr): Check for unresolved overloaded 6456169689Skan functions. 6457169689Skan 6458169689Skan * class.c (add_method): Just check processing_template_decl to 6459169689Skan determine whether or not we are within a template. 6460169689Skan * decl2.c (maybe_retrofit_in_chrg): Likewise. 6461169689Skan * init.c (decl_constant_value): Check the type of the declaration, 6462169689Skan not TREE_READONLY. 6463169689Skan * name-lookup.c (maybe_push_to_top_level): Rename to ... 6464169689Skan (push_to_top_level): ... this. 6465169689Skan * name-lookup.h (maybe_push_to_top_level): Do not declare it. 6466169689Skan * pt.c (push_template_decl_real): Reorder condition for speed. 6467169689Skan (convert_template_argument): Use dependency-checking functions in 6468169689Skan place of uses_template_parms. 6469169689Skan (lookup_template_class): Avoid calling uses_template_parms more 6470169689Skan than once. 6471169689Skan (uses_template_parms): Reimplement, using dependency-checking 6472169689Skan functions. 6473169689Skan (instantiate_class_template): Use push_to_top_level, not 6474169689Skan maybe_push_to_top_level. 6475169689Skan (type_unification_real): Simplify. 6476169689Skan (type_dependent_expression_p): Handle OFFSET_REFs and 6477169689Skan TEMPLATE_DECLs. 6478169689Skan (any_dependent_template_arguments_p): Handle multiple levels of 6479169689Skan template argument. 6480169689Skan * semantics.c (expand_or_defer_fn): Do not check 6481169689Skan uses_template_parms for template instantiations. 6482169689Skan * typeck.c (comptypes): Avoid calling cp_type_quals. 6483169689Skan 6484169689Skan2004-01-25 Mark Mitchell <mark@codesourcery.com> 6485169689Skan 6486169689Skan PR c++/13833 6487169689Skan * call.c (build_over_call): Do not convert arguments when 6488169689Skan processing a template. 6489169689Skan * pt.c (build_non_dependent_expr): Do not build a 6490169689Skan NON_DEPENDENT_EXPR for arithmetic constants. 6491169689Skan 6492169689Skan2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6493169689Skan 6494169689Skan PR c++/13810 6495169689Skan * parser.c (cp_parser_type_parameter): When cp_parser_id_expression 6496169689Skan returns a TYPE_DECL. no further lookup is required. 6497169689Skan * semantics.c (check_template_template_default_arg): A TYPE_DECL 6498169689Skan is invalid. Rework to give better diagnostics. 6499169689Skan 6500169689Skan2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 6501169689Skan 6502169689Skan PR c++/13797 6503169689Skan * pt.c (instantiate_class_template): Add an error_mark_node 6504169689Skan check. 6505169689Skan (tsubst_decl) <TEMPLATE_DECL case>: Likewise. 6506169689Skan 6507169689Skan2004-01-23 Andrew Pinski <pinskia@physics.uc.edu> 6508169689Skan 6509169689Skan PR c++/13701 6510169689Skan * decl.c (finish_function): Move the call to 6511169689Skan finish_fname_decls below the call to 6512169689Skan finish_eh_spec_block. 6513169689Skan 6514169689Skan2004-01-21 Kazu Hirata <kazu@cs.umass.edu> 6515169689Skan 6516169689Skan * optimize.c, typeck2.c: Update copyright. 6517169689Skan 6518169689Skan2004-01-21 Kazu Hirata <kazu@cs.umass.edu> 6519169689Skan 6520169689Skan * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c, 6521169689Skan init.c, mangle.c, typeck.c: Update copyright. 6522169689Skan 6523169689Skan2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> 6524169689Skan 6525169689Skan * parser.c (cp_parser_class_specifier): Prevent garbage collection. 6526169689Skan 6527169689Skan2004-01-20 Kelley Cook <kcook@gcc.gnu.org> 6528169689Skan 6529169689Skan * Make-lang.in: Replace $(docdir) with doc. 6530169689Skan (c++.info, c++.srcinfo): Dummy entry. 6531169689Skan (c++.man, c++.srcman): New rules. 6532169689Skan (c++.install-man): Revamp rule. 6533169689Skan 6534169689Skan2004-01-20 Kelley Cook <kcook@gcc.gnu.org> 6535169689Skan 6536169689Skan * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME, 6537169689Skan CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a 6538169689Skan immediate $(shell) instead of deferred backquote. 6539169689Skan 6540169689Skan2004-01-19 Mark Mitchell <mark@codesourcery.com> 6541169689Skan 6542169689Skan PR c++/13651 6543169689Skan * parser.c (cp_parser_postfix_expression): When encountering 6544169689Skan incomplete type on left-hand side of "->" or ".", treat the entire 6545169689Skan expression as erroneous. 6546169689Skan 6547169689Skan PR c++/13592 6548169689Skan * call.c (build_field_call): Remove. 6549169689Skan (n_build_method_call): Likewise. 6550169689Skan (build_method_call): Likewise. 6551169689Skan (build_new_method_call): Do not call build_field_call. 6552169689Skan * class.c (n_build_method_call): Remove. 6553169689Skan (print_class_statistics): Do not print it. 6554169689Skan * cp-tree.h (build_method_call): Remove declaration. 6555169689Skan (finish_object_call_expr): Likewise. 6556169689Skan (build_new_1): Do not use build_method_call. 6557169689Skan * parser.c (cp_parser_postfix_expression): Use finish_call_expr 6558169689Skan when the function appearing on the right-hand-side of "." or "->" 6559169689Skan is not actually a function. 6560169689Skan * pt.c (tsubst_copy_and_build): Likewise. 6561169689Skan * semantics.c (finish_object_call_expr): Remove. 6562169689Skan 6563169689Skan2004-01-18 Mark Mitchell <mark@codesourcery.com> 6564169689Skan 6565169689Skan PR c++/13710 6566169689Skan * pt.c (tsubst): Use finish_typeof. 6567169689Skan 6568169689Skan2004-01-18 Jason Merrill <jason@redhat.com> 6569169689Skan 6570169689Skan PR c++/11725 6571169689Skan * except.c (build_throw): In a template, set 6572169689Skan current_function_returns_abnormally. 6573169689Skan 6574169689Skan2004-01-17 Fred Fish <fnf@intrinsity.com> 6575169689Skan 6576169689Skan PR c++/11895 6577169689Skan * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE, 6578169689Skan except don't call array_type_nelts() with a VECTOR_TYPE. 6579169689Skan 6580169689Skan2004-01-16 Jan Hubicka <jh@suse.cz> 6581169689Skan 6582169689Skan * mangle.c (write_mangled_name): Remove inline modifier. 6583169689Skan 6584169689Skan2004-01-16 Mark Mitchell <mark@codesourcery.com> 6585169689Skan 6586169689Skan PR c++/13574 6587169689Skan * decl.c (compute_array_index_type): Fix grammar in comment. 6588169689Skan * init.c (build_zero_init): Handle zero-sized arrays correctly. 6589169689Skan 6590169689Skan PR c++/13178 6591169689Skan * call.c (name_as_c_string): Print conversion operator names 6592169689Skan correctly. 6593169689Skan 6594169689Skan PR c++/13478 6595169689Skan * call.c (initialize_reference): Pass -1 for inner parameter to 6596169689Skan convert_like_real. 6597169689Skan 6598169689Skan2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6599169689Skan 6600169689Skan PR c++/13407 6601169689Skan * parser.c (cp_parser_base_specifier): Check for an invalid 6602169689Skan keyword `typename' and emit an user-friendly error message. 6603169689Skan 6604169689Skan2004-01-15 Geoffrey Keating <geoffk@apple.com> 6605169689Skan 6606169689Skan PR pch/13361 6607169689Skan * cp/lex.c (handle_pragma_interface): Duplicate string from tree. 6608169689Skan (handle_pragma_implementation): Likewise. 6609169689Skan 6610169689Skan2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6611169689Skan 6612169689Skan PR c++/9259 6613169689Skan * typeck.c (build_class_member_access_expr): Allow to access members 6614169689Skan of the currently open class. 6615169689Skan (finish_class_member_access_expr): Likewise. 6616169689Skan 6617169689Skan2004-01-15 Alexandre Oliva <aoliva@redhat.com> 6618169689Skan 6619169689Skan PR c++/13659 6620169689Skan * name-lookup.c (validate_nonmember_using_decl): Take scope and 6621169689Skan name by value, instead of computing them. 6622169689Skan (do_local_using_decl, do_toplevel_using_decl): Add scope and name 6623169689Skan arguments. Pass them to validate_nonmember_using_decl. 6624169689Skan * name-lookup.h (do_local_using_decl): Adjust. 6625169689Skan (do_toplevel_using_decl): Likewise. 6626169689Skan * parser.c (cp_parser_using_declaration): Likewise. 6627169689Skan * pt.c (tsubst_expr): Likewise. 6628169689Skan 6629169689Skan2004-01-15 Alexandre Oliva <aoliva@redhat.com> 6630169689Skan 6631169689Skan PR c++/13594 6632169689Skan PR c++/13658 6633169689Skan * name-lookup.c (qualified_lookup_using_namespace): Search 6634169689Skan strongly-associated namespaces first, and only then try other 6635169689Skan namespaces. 6636169689Skan 6637169689Skan2004-01-15 Kelley Cook <kcook@gcc.gnu.org> 6638169689Skan 6639169689Skan * Make-lang.in (c++.srcextra): Dummy entry. 6640169689Skan 6641169689Skan2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6642169689Skan 6643169689Skan PR c++/8856 6644169689Skan * parser.c (cp_parser_template_name): Don't try to parse a 6645169689Skan conversion-function-id, as it cannot be a template-name. 6646169689Skan (cp_parser_simple_type_specifier): Check for invalid template-ids 6647169689Skan even after a built-in type. 6648169689Skan 6649169689Skan2004-01-14 Jan Hubicka <jh@suse.cz> 6650169689Skan 6651169689Skan PR c++/12850 6652169689Skan * pt.c (instantiate_decl): Do not increase function_depth. 6653169689Skan 6654169689Skan2004-01-14 Danny Smith <dannysmith@users,sourceforge.net> 6655169689Skan 6656169689Skan PR c++/9021 6657169689Skan PR c++/11005 6658169689Skan * parser.c (cp_parser_elaborated_type_specifier): Warn about 6659169689Skan attributes and discard. 6660169689Skan * decl.c (xref_tag): Don't overwite existing attributes with 6661169689Skan NULL_TREE. 6662169689Skan 6663169689Skan2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6664169689Skan 6665169689Skan PR c++/12335 6666169689Skan * parser.c (cp_parser_lookup_name): Return error_mark_node if there 6667169689Skan is no destructor while looking up a BIT_NOT_EXPR. 6668169689Skan 6669169689Skan2004-01-13 Ian Lance Taylor <ian@wasabisystems.com> 6670169689Skan 6671169689Skan * cxxfilt.c: Remove unused file. 6672169689Skan 6673169689Skan2004-01-14 Jan Hubicka <jh@suse.cz> 6674169689Skan 6675169689Skan Partial fix to PR c++/12850 6676169689Skan * decl2.c (mark_used): Do not proactively instantiate templates 6677169689Skan when compiling in unit-at-a-time or not optimizing. 6678169689Skan * optimize.c (maybe_clone_body): Do not increase function depth. 6679169689Skan 6680169689Skan2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6681169689Skan 6682169689Skan PR c++/13474 6683169689Skan * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking. 6684169689Skan 6685169689Skan2004-01-12 Steven Bosscher <stevenb@suse.de> 6686169689Skan 6687169689Skan PR c++/13558 6688169689Skan * parser.c (cp_parser_member_declaration): Any non-type is also 6689169689Skan not a class or a function. 6690169689Skan 6691169689Skan2004-01-12 Jason Merrill <jason@redhat.com> 6692169689Skan 6693169689Skan PR c++/12815 6694169689Skan * class.c (build_base_path): Do not mark vtable references as 6695169689Skan TREE_CONSTANT. 6696169689Skan (build_vtbl_ref_1): Likewise. 6697169689Skan 6698169689Skan2004-01-12 Richard Henderson <rth@redhat.com> 6699169689Skan 6700169689Skan PR opt/10776 6701169689Skan * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New. 6702169689Skan (store_init_value): Use it. 6703169689Skan * decl.c (check_initializer): Expect full initialization code 6704169689Skan from store_init_value. 6705169689Skan * init.c (expand_aggr_init_1): Likewise. 6706169689Skan * decl2.c (maybe_emit_vtables): Abort if runtime init needed. 6707169689Skan 6708169689Skan2004-01-12 Mark Mitchell <mark@codesourcery.com> 6709169689Skan 6710169689Skan * class.c (layout_class_type): For non-POD class types, also copy 6711169689Skan the DECL_SIZE and DECL_MODE of fields to the base class type. 6712169689Skan 6713169689Skan2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 6714169689Skan 6715169689Skan PR c++/13289 6716169689Skan * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before 6717169689Skan calling regenerate_decl_from_template. 6718169689Skan 6719169689Skan2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net> 6720169689Skan 6721169689Skan PR c++/4100 6722169689Skan * parser.c (cp_parser_decl_specifier_seq): Add check for a friend 6723169689Skan decl-specifier occurring along with a class definition. 6724169689Skan 6725169689Skan2004-01-12 Ian Lance Taylor <ian@wasabisystems.com> 6726169689Skan 6727169689Skan * parser.c (cp_parser_decl_specifier_seq): Add parenthetical 6728169689Skan clauses to comments describing declares_class_or_enum. 6729169689Skan (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not 6730169689Skan false. 6731169689Skan 6732169689Skan2004-01-12 Jan Hubicka <jh@suse.cz> 6733169689Skan 6734169689Skan * pt.c (for_each_template_parm): Do not check for duplicates. 6735169689Skan (for_each_template_parm): Use walk_tree duplicate checking code. 6736169689Skan 6737169689Skan2004-01-11 Ian Lance Taylor <ian@wasabisystems.com> 6738169689Skan 6739169689Skan PR c++/3478 6740169689Skan * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec 6741169689Skan is error_mark_node, don't add any more decl_specs. 6742169689Skan (cp_parser_init_declarator): After committing to a declaration, if 6743169689Skan the decl_specifiers start with error_mark_node, issue an error and 6744169689Skan change the type to "int". 6745169689Skan 6746169689Skan2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org> 6747169689Skan 6748169689Skan PR bootstrap/7817 6749169689Skan * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so. 6750169689Skan 6751169689Skan2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6752169689Skan 6753169689Skan DR 337 6754169689Skan PR c++/9256 6755169689Skan * pt.c (tsubst): Substitution must fail if we are attempting to 6756169689Skan create an array with element type that is an abstract class type. 6757169689Skan * decl.c (cp_finish_decl): Strip pointers and array types recursively 6758169689Skan before calling abstract_virtuals_error. 6759169689Skan 6760169689Skan2004-01-09 Alexandre Oliva <aoliva@redhat.com> 6761169689Skan 6762169689Skan * name-lookup.c (qualified_lookup_using_namespace): Consider 6763169689Skan strong using directives even if we've already found a binding. 6764169689Skan 6765169689Skan2004-01-09 Mark Mitchell <mark@codesourcery.com> 6766169689Skan 6767169689Skan * cp-tree.h (cxx_expand_expr): Change prototype. 6768169689Skan * expr.c (cxx_expand_expr): Add alt_rtl parameter. 6769169689Skan 6770169689Skan2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org> 6771169689Skan 6772169689Skan PR c++/12573 6773169689Skan * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by 6774169689Skan looking into them recursively. They can be there because of the 6775169689Skan new __offsetof__ extension. 6776169689Skan 6777169689Skan2004-01-07 Zack Weinberg <zack@codesourcery.com> 6778169689Skan 6779169689Skan * parser.c (cp_parser_save_member_function_body): Mark the 6780169689Skan definition static. 6781169689Skan 6782169689Skan2004-01-05 Mark Mitchell <mark@codesourcery.com> 6783169689Skan 6784169689Skan PR c++/13057 6785169689Skan * class.c (build_clone): Copy type attributes from the original 6786169689Skan function to the clone. 6787169689Skan 6788169689Skan PR c++/12815 6789169689Skan * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable 6790169689Skan references as constant. 6791169689Skan 6792169689Skan PR c++/12132 6793169689Skan * parser.c (cp_parser_explicit_instantiation): Improve error 6794169689Skan recovery. 6795169689Skan (cp_parser_require): Improve indication of the error location. 6796169689Skan 6797169689Skan PR c++/13451 6798169689Skan * parser.c (cp_parser_class_head): Reorder logic to check for 6799169689Skan invalid qualification. 6800169689Skan 6801169689Skan2004-01-04 Mark Mitchell <mark@codesourcery.com> 6802169689Skan 6803169689Skan PR c++/13157 6804169689Skan * name-lookup.c (lookup_using_namespace): Remove spacesp 6805169689Skan parameter. 6806169689Skan (unqualified_namespace_lookup): Likewise. 6807169689Skan (lookup_qualified_name): Adjust accordingly. 6808169689Skan (lookup_name_real): Likewise. 6809169689Skan (lookup_arg_dependent): Do not eliminate the namespace of the 6810169689Skan functions found by unqualified name lookup unless that is the 6811169689Skan current namespace. 6812169689Skan 6813169689Skan2004-01-04 Andrew Pinski <pinskia@physics.uc.edu> 6814169689Skan 6815169689Skan * semantics.c (push_deferring_access_checks): Fix format. 6816169689Skan (resume_deferring_access_checks): Likewise. 6817169689Skan (stop_deferring_access_checks): Likewise. 6818169689Skan (pop_deferring_access_checks): Likewise. 6819169689Skan (get_deferred_access_checks): Likewise. 6820169689Skan (pop_to_parent_deferring_access_checks): Likewise. 6821169689Skan (perform_deferred_access_checks): Likewise. 6822169689Skan (perform_or_defer_access_check): Likewise. 6823169689Skan 6824169689Skan2004-01-04 Richard Henderson <rth@redhat.com> 6825169689Skan 6826169689Skan * call.c (build_over_call): Don't create a save_expr of an 6827169689Skan aggregate, but rather its address. 6828169689Skan 6829169689Skan2004-01-04 Mark Mitchell <mark@codesourcery.com> 6830169689Skan 6831169689Skan PR c++/13529 6832169689Skan * parser.c (cp_parser_postfix_expression): Allow "." to appear in 6833169689Skan an offsetof expression. 6834169689Skan 6835169689Skan * parser.c (cp_parser_parameter_declaration): Fix comment. 6836169689Skan 6837169689Skan PR c++/12226 6838169689Skan * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro. 6839169689Skan (reference_binding): Set it when appropriate. 6840169689Skan (build_temp): New function, split out from ... 6841169689Skan (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P. 6842169689Skan (initialize_reference): Likewise. 6843169689Skan 6844169689Skan PR c++/13536 6845169689Skan * parser.c (cp_parser): Add in_type_id_in_expr_p. 6846169689Skan (cp_parser_new): Initialize it. 6847169689Skan (cp_parser_postfix_expression): Set it. 6848169689Skan (cp_parser_sizeof_operand): Likewise. 6849169689Skan (cp_parser_parameteR_declaration): Do not commit early to tenative 6850169689Skan parsers when in_type_id_in_expr_p is set. 6851169689Skan 6852169689Skan2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 6853169689Skan 6854169689Skan PR c++/13094 6855169689Skan * parser.c (cp_parser_template_argument): Don't call 6856169689Skan make_unbound_class_template directly. 6857169689Skan (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from 6858169689Skan UNBOUND_CLASS_TEMPLATE tree node. 6859169689Skan 6860169689Skan2004-01-02 Richard Sandiford <rsandifo@redhat.com> 6861169689Skan 6862169689Skan PR target/12729 6863169689Skan * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr. 6864169689Skan 6865169689Skan2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 6866169689Skan 6867169689Skan PR c++/13520 6868169689Skan * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro. 6869169689Skan (DECL_FUNCTION_TEMPLATE_P): Use it. 6870169689Skan (DECL_CLASS_TEMPLATE_P): Likewise. 6871169689Skan * parser.c (cp_parser_lookup_name): Add is_template parameter. 6872169689Skan (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name. 6873169689Skan (cp_parser_template_name): Likewise. 6874169689Skan (cp_parser_elaborated_type_specifier): Likewise. 6875169689Skan (cp_parser_namespace_name): Likewise. 6876169689Skan (cp_parser_class_name): Likewise. 6877169689Skan (cp_parser_lookup_name_simple): Likewise. 6878