12002-12-31 Neil Booth <neil@daikokuya.co.uk> 2 3 * .cvsignore: Remove. 4 52002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl> 6 7 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c, 8 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h, 9 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c, 10 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c, 11 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the 12 copyright header. 13 * lex.h: parse.y is dead, so don't mention it. Also replace the 14 copyright header with the default GNU copyright header. 15 162002-12-31 Mark Mitchell <mark@codesourcery.com> 17 18 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove. 19 (lookup_name_namespace_only): Likewise. 20 (begin_only_namespace_names): Likewise. 21 (end_only_namespace_names): Likewise. 22 * decl.c (only_namespace_names): Remove. 23 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED. 24 (lookup_name_real): Do not check only_namespace_names. 25 (lookup_name_namespace_only): Remove. 26 (begin_only_namespace_names): Likewise. 27 (end_only_namespace_names): Likewise. 28 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous 29 nested-name-specifiers more gracefully. 30 (cp_parser_class_or_namespace_name): Avoid looking up namespace 31 names when they cannot possibly appear. 32 (cp_parser_template_name): Adjust call to cp_parser_lookup_name. 33 (cp_parser_elaborated_type_specifier): Likewise. 34 (cp_parser_namespace_name): Only look for namespace names. 35 (cp_parser_lookup_name): Add is_namespace parameter. 36 (cp_parser_lookup_name_simple): Adjust call to 37 cp_parser_lookup_name. 38 39 * parser.c (cp_parser_dependent_type_p): Fix thinko. 40 412002-12-31 Neil Booth <neil@daikokuya.co.uk> 42 43 * .cvsignore: Update. 44 452002-12-31 Nathan Sidwell <nathan@codesourcery.com> 46 47 * class.c (modify_vtable_entry): Remove unused variable. 48 (get_vcall_index): Always expect a non-thunk. 49 (update_vtable_entry_for_fn): Combine covariant adjustments, when 50 overriding a thunk. Pass get_vcall_index a non-thunk. 51 52 * decl2.c (finish_file): Mark undefined inlines as extern. 53 542002-12-31 Mark Mitchell <mark@codesourcery.com> 55 56 * cp-tree.def (RETURN_INIT): Remove. 57 * cp-tree.h (DECL_IN_MEMORY_P): Remove. 58 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for. 59 (note_level_for_for): Remove. 60 (note_level_for_try): Likewise. 61 (note_level_for_catch): Likewise. 62 (finish_named_return_value): Likewise. 63 (do_pushlevel): Change prototype. 64 (pending_lang_change): Remove. 65 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch, 66 sk_for. 67 (note_level_for_for): Remove. 68 (note_level_for_try): Likewise. 69 (note_level_for_catch): Likewise. 70 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P. 71 * parser.c (cp_parser_context_free_list): Make it "deletable". 72 (cp_parser_template_argument): Remove misleading comment. 73 * pt.c (tsubst_expr): Remove RETURN_INIT code. 74 * semantics.c (genrtl_named_return_value): Remove. 75 (do_pushlevel): Take a scope kind as an argument. 76 (begin_if_stmt): Adjust. 77 (begin_while_stmt): Likewise. 78 (begin_for_stmt): Likewise. 79 (finish_for_init_stmt): Likewise. 80 (begin_switch_stmt): Likewise. 81 (begin_handler): Likewise. 82 (begin_compound_stmt): Likewise. 83 (finish_named_return_value): Remove. 84 (cp_expand_stmt): Remove RETURN_INIT case. 85 * tree.c (cp_statement_code_p): Remove RETURN_INIT case. 86 872002-12-31 Mark Mitchell <mark@codesourcery.com> 88 89 PR c++/9112 90 * parser.c (cp_parser_direct_declarator): Handle erroneous 91 parenthesized declarators correctly. 92 932002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net> 94 95 * cp-tree.h (pending_lang_change): Declare. 96 972002-12-30 Mark Mitchell <mark@codesourcery.com> 98 99 * parser.c (cp_parser_context_free_list): New variable. 100 (cp_parser_context_new): Use it. 101 (cp_parser_error): Check return code from 102 cp_parser_simulate_error. 103 (cp_parser_simulate_error): Return a value. 104 (cp_parser_id_expression): Optimize common case. 105 (cp_parser_class_name): Likewise. 106 (cp_parser_class_specifier): Adjust call to 107 cp_parser_late_parsing_default_args. 108 (cp_parser_lookup_name): Optimize common case. 109 (cp_parser_late_parsing_for_member): Adjust call to 110 cp_parser_late_parsing_default_args. 111 (cp_parser_late_parsing_default_args): Add scope parameter. 112 (cp_parser_require): Avoid creating the error message unless it's 113 needed. 114 (cp_parser_parse_definitely): Place free'd contexts on the free 115 list. 116 117 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change. 118 1192002-12-30 David Edelsohn <edelsohn@gnu.org> 120 121 * parser.c (cp_parser_parameter_declaration_clause): Treat system 122 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined. 123 1242002-12-30 Nathanael Nerode <neroden@gcc.gnu.org> 125 126 * config-lang.in, Make-lang.in, operators.def, cp-tree.def: 127 GCC, not GNU CC. 128 1292002-12-30 Mark Mitchell <mark@codesourcery.com> 130 131 * parse.y: Remove. 132 * spew.c: Likewise. 133 * Make-lang.in (gt-cp-spew.h): Remove. 134 * cp-tree.h (do_pending_lang_change): Remove. 135 (do_identifier): Change prototype. 136 (finish_id_expr): Remove. 137 * decl.c (lookup_name_real): Remove yylex variable. 138 * decl2.c (build_expr_from_tree): Adjust call to do_identifier. 139 * lex.c (init_cpp_parse): Remove. 140 (reduce_cmp): Likewise. 141 (token_cmp): Likewise. 142 (yychar): Likewise. 143 (lastiddecl): Likewise. 144 (token_count): Likewise. 145 (reduce_count): Likewise. 146 (yyhook): Likewise. 147 (print_parse_statistics): Likewise. 148 (do_pending_lang_change): Likewise. 149 (do_identifier): Remove parsing parameter. 150 * lex.h (lastiddecl): Remove. 151 (looking_for_typename): Remove. 152 (looking_for_template): Likewise. 153 (pending_lang_change): Likewise. 154 (yylex): Likewise. 155 * semantics.c (finish_id_expr): Remove. 156 157 * decl.c (grokdeclarator): Diagnost "extern thread" and "static 158 thread" correctly. 159 1602002-12-30 Nathanael Nerode <neroden@gcc.gnu.org> 161 162 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front 163 end, not the C front end. 164 1652002-12-30 Nathan Sidwell <nathan@codesourcery.com> 166 167 * cp-tree.h (THUNK_TARGET): New macro. 168 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo. 169 (finish_thunk): Remove offset parms. 170 * class.c (find_final_overrider): Look through thunks. 171 (get_vcall_index): Use THUNK_TARGET. 172 (update_vtable_entry_for_fn): Look through thunks. Set covariant 173 fixed offset here. Adjust finish_thunk call. 174 (build_vtbl_initializer): Adjust finish_thunk calls. 175 * mangle.c (mangle_call_offset): Remove superfluous if. 176 (mangle_thunk): Adjust. 177 * method.c (make_thunk): Adjust. 178 (finish_thunk): Adjust. 179 (thunk_adjust): Remove assert. 180 (use_thunk): Use THUNK_TARGET 181 * dump1.c (cp_dump_tree): Adjust thunk dumping. 182 183 PR c++/9054 184 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base. 185 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types. 186 1872002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net> 188 189 Remove traditional C constructs 4/n. 190 * decl2.c (grok_method_quals, warn_if_unknown_interface, 191 grok_x_components, cp_build_parm_decl, build_artificial_parm, 192 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl, 193 delete_sanity, check_member_template, check_java_method, 194 check_classfn, finish_static_data_member_decl, grokfield, 195 grokbitfield, grokoptypename, grok_function_init, 196 cplus_decl_attributes, constructor_name, defer_fn, 197 build_anon_union_vars, finish_anon_union, coerce_new_type, 198 coerce_delete_type, comdat_linkage, maybe_make_one_only, 199 key_method, import_export_vtable, import_export_class, 200 output_vtable_inherit, import_export_decl, import_export_tinfo, 201 build_cleanup, get_guard, get_guard_bits, get_guard_cond, 202 set_guard, start_objects, finish_objects, 203 start_static_storage_duration_function, 204 finish_static_storage_duration_function, get_priority_info, 205 start_static_initialization_or_destruction, 206 finish_static_initialization_or_destruction, 207 do_static_initialization, do_static_destruction, 208 prune_vars_needing_no_initialization, write_out_vars, 209 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor, 210 add_using_namespace, merge_functions, ambiguous_decl, 211 lookup_using_namespace, lookup_using_namespace, 212 qualified_lookup_using_namespace, set_decl_namespace, 213 decl_namespace, current_decl_namespace, push_decl_namespace, 214 pop_decl_namespace, push_scope, pop_scope, add_function, 215 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc, 216 lookup_arg_dependent, do_namespace_alias, 217 validate_nonmember_using_decl, do_nonmember_using_decl, 218 do_toplevel_using_decl, do_local_using_decl, 219 do_class_using_decl, do_using_directive, check_default_args, 220 mark_used, handle_class_head): Use C90 prototypings. Use booleans. 221 * parser.c (cp_parser_class_head): Use booleanss. 222 * decl.c (walk_globals, walk_vtables): Likewise. 223 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables, 224 walk_globals): Change return type from 'int' to 'bool'. 225 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast 226 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p, 227 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr, 228 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast, 229 qualifier_flags, tinfo_base_init, generic_initializer, 230 ptr_initializer, dfs_class_hint_mark, ptm_initializer, 231 dfs_class_hint_unmark, class_hint_flags, class_initializer, 232 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info, 233 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos, 234 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise. 235 * repo.c (repo_compile_flags, repo_template_declared, 236 repo_template_defined, repo_class_defined, repo_get_id, 237 repo_template_used, repo_vtable_used, repo_inline_used, 238 repo_tinfo_used, repo_template_instantiated, extract_string, 239 open_repo_file, afgets, init_repo, reopen_repo_file_for_write, 240 finish_repo): Likewise. 241 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier, 242 cxx_print_xnode): Likewise.. 243 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set, 244 cxx_warn_unused_global_decl, cp_expr_size): Likewise. 245 * cxxfilt.c (demangle_it, print_demangler_list, usage, 246 standard_symbol_characters, hp_symbol_characters, main, fatal): 247 Likewise. 248 (strip_underscore): Change type from 'int' to 'bool'. 249 (main): Use boolean constants. 250 2512002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net> 252 253 Remove traditional C constructs 3/n. 254 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force, 255 build_up_reference, warn_ref_binding, convert_to_reference, 256 convert_from_reference, convert_lvalue, cp_convert, ocp_convert, 257 convert_to_void, convert, convert_force, build_type_conversion, 258 build_expr_type_conversion, type_promotes_to, 259 perform_qualification_conversions): Use C90 prototyping style. 260 * decl2.c (grok_array_decl): Use boolean constant. 261 (delete_sanity): Likewise. 262 * typeck.c (build_unary_op): Likewise. 263 * semantics.c (finish_switch_cond): Likewise. 264 * parser.c (cp_parser_direct_new_declarator): Likewise. 265 * init.c (build_new): Likewise. 266 2672002-12-27 Mark Mitchell <mark@codesourcery.com> 268 269 * Make-lang.in (po-generated): Remove parse.c. 270 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o. 271 ($(srcdir)/cp/parse.h): Remove target. 272 ($(srcdir)/cp/parse.c): Likewise. 273 (gt-cp-parse.h): Likewise. 274 (gt-cp-parser.h): New target. 275 (c++.distclean): Do not remove parse.output. 276 (c++.maintainer-clean): Do not remove parse.c or parse.h. 277 (cp/spew.o): Remove target. 278 (cp/lex.o): Adjust dependencies. 279 (cp/pt.o): Likewise. 280 (cp/parse.o): Likewise. 281 (cp/TAGS): Do not mention parse.c. 282 (cp/parser.o): New target. 283 * NEWS: Mention the new parser. 284 * call.c (build_scoped_method_call): Simplify. 285 (build_method_call): Likewise. 286 (build_new_function_call): Adjust calls to add_function_candidate 287 and add_template_candidate. 288 (build_new_op): Improve handling of erroroneous operands. 289 (convert_default_arg): Remove circular argument processing. 290 (name_as_c_string): New function. 291 (build_new_method_call): Use it. 292 (perform_implicit_conversion): Use error_operand_p. 293 * class.c (finish_struct_anon): Use constructor_name_p. 294 (check_field_decls): Likewise. 295 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN. 296 (resolve_address_of_overloaded_function): Likewise. 297 (instantiate_type): Tweak pointer-to-member handling. 298 (get_primary_binfo): Remove incorrect assertion. 299 * config-lang.in (gtfiles): Add parser.c, remove parse.c. 300 * cp-tree.h (DEFARG_TOKENS): New macro. 301 (default_arg): New structure. 302 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG. 303 (lang_tree_node): Add default_arg. 304 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE. 305 (type_info_ref_type): New macro. 306 (saved_scope): Make processing_explicit_instantiation a boolean. 307 (check_access): New field. 308 (unparsed_text): Remove. 309 (language_function): Remove unparsed_inlines. 310 (error_operand_p): New macro. 311 (lang_decl): Adjust pending_inline_info. 312 (DEFARG_POINTER): Remove. 313 (tag_types): Add typenames. 314 (lookup_ualified_name): Declare. 315 (lookup_name_real): Likewise. 316 (shadow_tag): Adjust prototype. 317 (get_scope_of_declarator): Declare it. 318 (process_next_inline): Remove it. 319 (check_for_missing_semicolon): Likewise. 320 (maybe_get_template_decl_from_type_decl): Declare it. 321 (finish_label_stmt): Adjust prototype. 322 (finish_non_static_data_meber): Declare it. 323 (finish_pseudo_destructor_call_expr): Rename to ... 324 (finish_pseudo_destructor_expr): ... this. 325 (finish_compound_literal): Declare it. 326 (begin_inline_definitions): Remove it. 327 (init_spew): Remove. 328 (peekyylex): Likewise. 329 (arbitrate_lookup): Likewise. 330 (frob_opname): Likewise. 331 (maybe_snarf_defarg): Likewise. 332 (add_defarg_fn): Likewise. 333 (do_pending_defargs): Likewise. 334 (done_pending_defargs): Likewise. 335 (unprocessed_defarg_fn): Likewise. 336 (replace_defarg): Likewise. 337 (end_input): Likewise. 338 (get_overloaded_fn): Likewise. 339 * cvt.c (convert_to_reference): Improve error handling. 340 * decl.c (lookup_name_real): Do not declare it static. 341 (maybe_push_to_top_level): Set check_access. 342 (identifier_type_value): Adjust call to lookup_name_real. 343 (lookup_qualified_name): New method. 344 (lookup_name_real): Remove special-case parsing code. 345 (lookup_name-nonclass): Adjust call to lookup_name_real. 346 (lookup_name_namespace_only): Likewise. 347 (lookup_name): Likewise. 348 (check_tag_decl): Return the type declared. 349 (shadow_tag): Likewise. 350 (register_dtor_fn): Tweak check_access. 351 (grokfndecl): Use constructor_name_p. 352 (get_scope_of_declarator): New function. 353 (grokdeclarator): Obscure tweaks for slightly different declarator 354 representations. 355 (start_method): Return error_mark_node to indicate failure. 356 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs. 357 * decl2.c (constructor_name_full): Simplify. 358 (constructor_name): Use it. 359 (build_expr_from_tree): Adjust for changes to do new parser. 360 (push_scope): Improve robustness. 361 (validate_nonmember_using_decl): Process declarations, not names. 362 (do_class_using_decl): Likewise. 363 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS 364 here. 365 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs. 366 * expr.c (cxx_expand_expr): Handle BASELINKs. 367 * init.c (member_init_ok_or_else): Issue more errors. 368 (build_offset_ref): Tweak handling of FUNCTION_DECLs. 369 * lex.c: Do not include parse.h. 370 (yypring): Do not declare. 371 (yylval): Likewise. 372 (make_reference_declarator): Remove error-generating code. 373 (rid_to_yy): Remove. 374 (cxx_init): Do not call init_spew. 375 (yypring): Remove. 376 (check_for_missing_semicolon): Remove. 377 * lex.h (got_scope): Remove. 378 (got_object): Remove. 379 * method.c (hack_identifier): Use finish_non_static_data_member. 380 (implicitly_declare_fn): Adjust use of constructor_name. 381 * parser.c: New file. 382 * pt.c (parse.h): Do not include it. 383 (maybe_get_template_decl_from_template): Do not declare it. 384 (finish_member_template_decl): Tweak. 385 (begin_explicit_instantiation): Adjust for 386 processing_explicit_instantiation being boolean. 387 (end_explicit_instantiation): Likewise. 388 (maybe_process_partial_specialization): Tighten specialization 389 test. 390 (retrieve_local_specialization): Adjust ue of hash table. 391 (eq_local_specializations): New function. 392 (register_local_specialization): Likewise. 393 (push_template_decl_real): Remove unnecessary test. 394 (maybe_get_template_decl_from_type_decl): Don't make it static. 395 (for_each_template_parm_r): Handle TYPEOF_TYPE. 396 (tsubst_copy): Use retrieive_local_specialization to handle 397 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs. 398 Handle COMPONENT_REFs with pseudo-destructor-expressions. 399 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR. 400 (tsubst_expr): Pass decls, not names, to do_local_using_decl. 401 (unify): Tweak handling of CONST_DECLs. 402 (regenerate_decl_from_template): Use push_nested_class. 403 (template_for_substitution): New funciton. 404 (instantiate_decl): Use it. Register parameters as local 405 specializations. 406 * rtti.c (init_rtti_processing): Set type_info_ref_type. 407 (build_typeid): Use it. 408 (get_typeid): Likeise. 409 * search.c (accessible_p): Use check_access, not 410 flag_access_control. 411 (adjust_result_of_qualified_name_lookup): Pay attention to the 412 context_class. 413 * semantics.c (finish_asm_stmt): Adjust error handling. 414 (finish_label_stmt): Return the statement. 415 (finish_non_static_data_member): New function. 416 (finish_class_expr): Handle BASELINKs. 417 (finish_call_expr): Handle PSEUDO_DTOR_EXPR. 418 (finish_object_call_expr): Simplify handling during templates. 419 (finish_pseudo_destructor_call_expr): Rename to ... 420 (finish_pseudo_dtor_expr): ... this. 421 (finish_compound_literal): New function. 422 (begin_inline_definitions): Remove. 423 (finish_sizeof): Remove special template handling. 424 * spew.c: Do not include parse.h. 425 * tree.c (get_overloaded_fn): Remove. 426 * typeck.c (build_class_member_access_expr): Handle 427 PSEUDO_DTOR_EXPR. Adjust handling of static member functions. 428 (lookup_destructor): New function. 429 (finish_class_member_access_expr): Use it. 430 (convert_arguments): Simplify. 431 (build_unary_op): Handle BASELINKs. 432 4332002-12-26 Nathan Sidwell <nathan@codesourcery.com> 434 435 PR c++/4803 436 * decl2.c (mark_used): Defer inline functions. 437 (finish_file): Merge deferred_fns loops. Check all used 438 inline functions have a definition. 439 * method.c (make_thunk): Thunks are not inline. 440 441 PR c++/5116, c++/764 442 * call.c (build_new_op): Make sure template class operands are 443 instantiated. 444 4452002-12-24 Nathan Sidwell <nathan@codesourcery.com> 446 447 PR C++/7964 448 * cp-tree.h (resolve_scoped_fn_name): Prototype. 449 * call.c (resolve_scoped_fn_name): New function. Deal with 450 more template expansion. Broken out of ... 451 * parse.y (parse_finish_call_expr): ... here. Call it. 452 * decl2.c (build_expr_from_tree, CALL_EXPR): Use 453 resolve_scoped_fn_name and build_call_from_tree. 454 455 PR c++/9053 456 * decl.c (duplicate_decls): Templates may be disambiguated by 457 return type. 458 459 PR c++/8702 460 * decl2.c (check_classfn): Use lookup_fnfield_1. List all 461 conversion operators on failure. 462 4632002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net> 464 465 Remove traditional C constructs 2/n. 466 * call.c (tourney, build_field_call, equal_functions, joust, 467 compare_ics, build_over_call, build_java_interface_fn_ref, 468 convert_like_real, op_error, build_object_call, resolve_args, 469 build_vfield_ref, check_dtor_name, build_scoped_method_call, 470 build_addr_func, build_call, build_method_call, null_ptr_cst_p, 471 sufficient_parms_p, build_conv, non_reference, strip_top_quals, 472 standard_conversion, reference_related_p, 473 reference_compatible_p, convert_class_to_reference, 474 direct_reference_binding, reference_binding, 475 ,implicit_conversion, is_complete, promoted_arithmetic_type_p, 476 add_template_conv_candidate, any_viable, any_strictly_viable, 477 build_this, splice_viable, print_z_candidates, 478 build_user_type_conversion, build_new_function_call, 479 conditional_conversion, build_conditional_expr, build_new_op, 480 build_op_delete_call, enforce_access, call_builtin_trap, 481 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to, 482 convert_default_arg, type_passed_as, convert_for_arg_passing, 483 in_charge_arg_for_name, is_properly_derived_from, 484 maybe_handle_implicit_object, maybe_handle_ref_bind, 485 source_type, add_warning, can_convert, can_convert_arg, 486 perform_implicit_conversion, can_convert_arg_bad, 487 initialize_reference, add_conv_candidate, 488 add_template_candidate_real, add_template_candidate): Ansify. 489 4902002-12-22 Nathan Sidwell <nathan@codesourcery.com> 491 492 PR c++/8572 493 * cp-tree.h (grokoptypename): Add SCOPE parameter. 494 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type 495 if in a template scope. 496 * parse.y (unoperator): Return the scope. 497 (operator_name): Adjust grokoptypename call. 498 4992002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 500 501 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t. 502 * decl.c (make_unbound_class_template): Adjust. Check for tf_error. 503 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error. 504 5052002-12-20 Kazu Hirata <kazu@cs.umass.edu> 506 507 * ChangeLog: Fix a typo. 508 * class.c: Fix comment typos. 509 * cp-tree.h: Likewise. 510 5112002-12-18 Jason Merrill <jason@redhat.com> 512 513 Handle anonymous unions at the tree level. 514 C++ ABI change: Mangle anonymous unions using the name of their 515 first named field (by depth-first search). Should not cause 516 binary compatibility problems, though, as the compiler previously 517 didn't emit anything for affected unions. 518 * cp-tree.def (ALIAS_DECL): New tree code. 519 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the 520 first field, not the largest. 521 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME, 522 push the decl, and write it out at namespace scope. 523 * decl.c (lookup_name_real): See through an ALIAS_DECL. 524 (pushdecl): Add namespace bindings for ALIAS_DECLs. 525 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name 526 of a decl which doesn't have one. 527 * typeck.c (build_class_member_access_expr): Don't recurse if 528 we already have the type we want. 529 5302002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 531 532 PR c++/8099 533 * friend.c (make_friend_class): Allow partial specialization 534 when declaration is not a template friend. 535 5362002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 537 538 PR c++/3663 539 * pt.c (lookup_template_class): Copy TREE_PRIVATE and 540 TREE_PROTECTED to created decl nodes. 541 5422002-12-18 Mark Mitchell <mark@codesourcery.com> 543 544 * class.c (build_base_field): Do not set DECL_PACKED on the 545 FIELD_DECL. 546 5472002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net> 548 549 * cp-tree.h (struct tree_srcloc): Use location_t. 550 (SOURCE_LOCUS): New. 551 (SRCLOC_FILE, SRCLOC_LINE): Adjust. 552 5532002-12-17 Jason Merrill <jason@redhat.com> 554 555 * decl.c (finish_function): Also complain about no return in 556 templates. 557 * semantics.c (finish_return_stmt): Also call check_return_expr in 558 templates. 559 * typeck.c (check_return_expr): In a template, just remember that we 560 saw a return. 561 5622002-12-16 Jason Merrill <jason@redhat.com> 563 564 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type 565 of the CALL_EXPR. 566 567 * semantics.c (do_pushlevel): Call pushlevel after adding the 568 SCOPE_STMT. 569 (do_poplevel): Call poplevel before adding the SCOPE_STMT. 570 * parse.y (function_body): Go back to using compstmt. 571 * decl.c (pushdecl): Skip another level to get to the parms level. 572 573 * call.c (build_new_method_call): Use is_dummy_object to determine 574 whether or not to evaluate the object parameter to a static member 575 function. 576 5772002-12-14 Jason Merrill <jason@redhat.com> 578 579 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the 580 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR. 581 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE, 582 don't bother with an AGGR_INIT_EXPR. 583 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE, 584 just generate a new decl normally. Take return slot parm. 585 * cp-tree.h: Adjust prototype. 586 5872002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net> 588 589 PR C++/8031 590 * cvt.c (convert_to_pointer_force): Don't try comparing against 591 erronous type. 592 5932002-12-13 Geoffrey Keating <geoffk@apple.com> 594 595 * cp-tree.h: Have the multiple-include guards around 596 the entire file. 597 5982002-12-10 David Edelsohn <edelsohn@gnu.org> 599 600 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos 601 for SPEW_DEBUG. 602 (snarf_method): Same. 603 (snarf_defarg): Same. 604 6052002-12-10 Mark Mitchell <mark@codesourcery.com> 606 607 PR c++/8372 608 * pt.c (tsubst_copy): Handle destructor names more correctly. 609 6102002-12-10 Matt Austern <austern@apple.com> 611 612 * cp-tree.h: get rid of needs_virtual_reinit bit. 613 6142002-12-09 Mark Mitchell <mark@codesourcery.com> 615 616 * NEWS: Document removal of in-class initialization extension for 617 static data members of non-arithmetic, non-enumeration type. 618 * decl.c (check_static_variable_definition): Do not allow that 619 extension. 620 * decl2.c (grokfield): Do not call digest_init when processing 621 templates. 622 6232002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 624 625 * error.c (dump_expr): Fix format specifier warning. 626 6272002-12-04 Geoffrey Keating <geoffk@apple.com> 628 629 * class.c (finish_struct_1): Correct comment. 630 * cp-tree.c (DECL_SORTED_FIELDS): Likewise. 631 6322002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net> 633 634 PR C++/8799 635 * error.c (dump_expr): Don't ever try to dump a non-existent 636 expression. 637 6382002-12-03 Nathan Sidwell <nathan@codesourcery.com> 639 640 Implement covariant returns. 641 * cp-tree.h (IS_AGGR_TYPE_2): Remove. 642 (struct lang_decl_flags): Add this_thunk_p flag. 643 Rename vcall_offset to virtual_offset. 644 (struct lang_decl): Rename delta to fixed_offset. 645 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines. 646 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg. 647 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ... 648 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here. 649 (make_thunk): Add this_adjusting arg. 650 (finish_thunk): Declare. 651 (mangle_thunk): Add this_adjusting arg. 652 * class.c (get_vcall_index): Use base function for lookup. 653 (update_vtable_entry_for_fn): Generate covariant thunk. 654 (finish_struct_1): Set DECL_VINDEX to NULL for thunks. 655 (build_vtbl_initializer): Use base function for lookup. 656 Finish covariant thunk here. Adjust thunk generation. 657 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling. 658 Adjust thunk dumping. 659 * mangle.c (mangle_call_offset): New function. 660 (mangle_thunk): Adjust for covariant thunks. 661 * method.c (make_thunk): Adjust. Do not set name here. 662 (finish_thunk): New function. Set name here. 663 (use_thunk): Generate covariant thunks too. 664 (thunk_adjust): New function. 665 * search.c (covariant_return_p): Remove. Fold into ... 666 (check_final_overrider): ... here. Simplify. 667 * semantics.c (emit_associated_thunks): Walk covariant thunk lists. 668 6692002-12-03 Jason Merrill <jason@redhat.com> 670 671 PR c++/8674 672 * call.c (build_over_call): Check specifically for TARGET_EXPR 673 when eliding. 674 675 PR c++/8461, c++/8625 676 * call.c (convert_for_arg_passing): Don't mess with error_mark_node. 677 (cp_convert_parm_for_inlining): Remove. 678 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): 679 Remove. 680 * cp-tree.h (ADDR_IS_INVISIREF): Remove. 681 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code. 682 683 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on 684 an ambiguous conversion. 685 6862002-12-03 Mark Mitchell <mark@codesourcery.com> 687 688 PR c++/8688 689 * decl.c (reshape_init): Handle erroneous initializers. 690 6912002-12-02 Mark Mitchell <mark@codesourcery.com> 692 693 PR c++/8720 694 * spew.c (remove_last_token): Make sure that last_chunk is set 695 correctly. 696 697 PR c++/8615 698 * error.c (dump_expr): Handle character constants with 699 TREE_OVERFLOW set. 700 7012002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 702 703 DR 180 704 * decl.c (grokdeclarator): Require class-key for all friend class. 705 Output the correct type and context in the error message. 706 7072002-12-01 Mark Mitchell <mark@codesourcery.com> 708 709 PR c++/5919 710 * pt.c (unify): Use variably_modified_type_p to test validity of 711 template argument types. 712 713 PR c++/8727 714 * cp-tree.h (lang_type_class): Add typeinfo_var. 715 (CLASSTYPE_TYPEINFO_VAR): New macro. 716 * rtti.c (get_tinfo_decl): Use it. 717 718 PR c++/8663 719 * init.c (expand_member_init): Always get the main variant of a 720 base class. 721 7222002-12-01 Mark Mitchell <mark@codesourcery.com> 723 724 PR c++/8332 725 PR c++/8493 726 * decl.c (cxx_init_decl_processing): Use size_type_node, not 727 c_size_type_node. 728 * decl2.c (coerce_new_type): Likewise. 729 * except.c (do_allocate_exception): Likewise. 730 7312002-11-30 Zack Weinberg <zack@codesourcery.com> 732 733 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c, 734 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c, 735 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c, 736 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c, 737 typeck2.c: Include coretypes.h and tm.h. 738 * Make-lang.in: Update dependencies. 739 7402002-11-30 Mark Mitchell <mark@codesourcery.com> 741 742 PR c++/8227 743 * decl.c (layout_var_decl): Deal gracefully with erroneous types. 744 (check_initializer): Validate the type of the initialized 745 variable, even if the initializer is absent. 746 * typeck.c (cp_type_quals): Deal gracefully with erroneous types. 747 748 PR c++/8214 749 * typeck.c (convert_for_assignment): Do not use 750 decl_constant_value on the operand. 751 752 PR c++/8511 753 * pt.c (instantiate_decl): Handle template friends defined outside 754 of the class correctly. 755 7562002-11-29 Joe Buck <jbuck@synopsys.com> 757 758 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for 759 anonymous structs. 760 7612002-11-29 Mark Mitchell <mark@codesourcery.com> 762 763 * class.c (walk_subobject_offsets): Recur on binfos as well as on 764 types. 765 (layout_nonempty_base_or_field): Pass it a binfo when processing a 766 base class. 767 (layout_empty_base): Likewise. 768 (build_base_field): Likewise. 769 7702002-11-27 Mark Mitchell <mark@codesourcery.com> 771 772 * class.c (build_base_field): Make sure we get the canonical base 773 when descending through primary bases. 774 7752002-11-26 Geoffrey Keating <geoffk@apple.com> 776 777 * decl.c (check_initializer): Don't error on initialisation of 778 a scalar with a brace-enclosed expression. 779 7802002-11-26 Nathan Sidwell <nathan@codesourcery.com> 781 782 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses. 783 (template_parms_equal): Remove prototype. 784 * typeck.c (buuld_indirect_ref): Reformat. 785 7862002-11-25 Jason Merrill <jason@redhat.com> 787 788 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT 789 and a DO_STMT. 790 7912002-11-25 Mark Mitchell <mark@codesourcery.com> 792 793 * tree.c (cp_build_qualified_type_real): Correct handling of 794 array types. 795 * class.c (walk_subobject_offsets): Fix thinko. 796 (build_base_field): Record offsets of empty bases in primary 797 virtual bases. 798 (layout_class_type): Record offsets of empty bases in fields. 799 800 * search.c (is_subobject_of_p_1): Fix thinko. 801 (lookup_field_queue_p): Likewise. 802 8032002-11-24 Mark Mitchell <mark@codesourcery.com> 804 805 * class.c (layout_class_type): Reuse tail padding when laying out 806 virtual bases. 807 8082002-11-22 Mark Mitchell <mark@codesourcery.com> 809 810 * rtti.c (qualifier_flags): Fix thinko. 811 8122002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net> 813 814 Remove traditional C constructs 1/n. 815 * cp-tree.h (init_method, set_mangled_name_for_decl, 816 build_opfncall, hack_identifier, make_thunk, use_thunk, 817 synthesize_method, implicitly_declare_fn, 818 skip_artificial_parms_for, optimize_function, calls_setjmp_p, 819 maybe_clone_body): Remove use of PARAMS. 820 821 * method.c (do_build_assign_ref, do_build_copy_constructor, 822 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy): 823 Likewise. 824 (synthesize_method): Use 'bool' type and constants instead of 825 'int'. 826 (locate_copy): Likewise. 827 (implicitly_declare_fn): Likewise. 828 829 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function): 830 Remove old-style declaration. 831 (maybe_clone_body): Use 'bool' type and constants. 832 8332002-11-21 Glen Nakamura <glen@imodulo.com> 834 835 PR c++/8342 836 * typeck.c (get_member_function_from_ptrfunc): Make sure that a 837 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one 838 of the branches of a COND_EXPR. 839 8402002-11-19 Mark Mitchell <mark@codesourcery.com> 841 842 * pt.c (for_each_template_parm): Free allocated memory. 843 * search.c (is_subobject_of_p_1): New function. 844 (is_subobject_of_p): Avoid walking virtual bases multiple times. 845 8462002-11-19 Jason Thorpe <thorpej@wasabisystems.com> 847 848 * g++spec.c (lang_specific_spec_functions): New. 849 8502002-11-15 Kazu Hirata <kazu@cs.umass.edu> 851 852 * ChangeLog: Follow spelling conventions. 853 * class.c: Likewise. 854 * decl2.c: Likewise. 855 8562002-11-14 Zack Weinberg <zack@codesourcery.com> 857 858 * search.c (dfs_push_decls): Do not try to reorder elements 859 3..n of method_vec if method_vec has only two elements. 860 Reverse order of two tests to avoid accessing unallocated 861 memory. 862 8632002-11-14 Mark Mitchell <mark@codesourcery.com> 864 865 * class.c (dfs_find_final_overrider): Adjust so that the most 866 derived object is a binfo, rather than a class type. 867 (find_final_overrider): Likewise. 868 (add_vcall_offset_vtbl_entries_1): Simplify accordingly. 869 (add_vcall_offset): Likewise. 870 8712002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 872 873 PR c++/8389 874 * pt.c (instantiate_template): Push class scope for member 875 functions. 876 (get_mostly_instantiated_function_type): Likewise. Don't call 877 tsubst on context. Remove CONTEXTP and TPARMSP parameters. 878 * cp-tree.h (get_mostly_instantiated_function_type): Adjust. 879 * mangle.c (write_encoding, write_unqualified_name): Adjust. 880 8812002-11-07 Mark Mitchell <mark@codesourcery.com> 882 883 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of 884 vcall offfsets. Split out ... 885 (add_vcall_offset): ... new function. 886 887 PR c++/8338 888 * pt.c (for_each_template_parm): Add htab parameter. 889 (process_partial_specialization): Adjust call. 890 (push_template_decl_real): Likewise. 891 (pair_fn_data): Add visited. 892 (for_each_template_parm_r): Avoid walking duplicates more than 893 once. 894 (uses_template_parms): Adjust call to for_each_template_parm. 895 8962002-11-07 Mark Mitchell <mark@codesourcery.com> 897 898 * class.c (add_implicitly_declared_members): Put implicitly 899 declared functions at the end of TYPE_METHODs when -fabi-version 900 is at least 2. 901 9022002-11-05 Geoffrey Keating <geoffk@apple.com> 903 904 * decl2.c (finish_file): Correct spelling. 905 9062002-11-03 Mark Mitchell <mark@codesourcery.com> 907 908 * call.c (build_special_member_call): Do not try to lookup VTTs by 909 name. 910 * class.c (vtbl_init_data): Add generate_vcall_entries. 911 (get_vtable_decl): Do not look up virtual tables by name. 912 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P. 913 (set_primary_base): Do not set CLASSTYPE_RTTI. 914 (determine_primary_base): Likewise. 915 (get_matching_virtual): Remove. 916 (get_vcall_index): New function. 917 (update_vtable_entry_for_fn): Do not try to use virtual thunks 918 when they are not required. Assign vcall indices at this point. 919 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT. 920 Do update dynamic_classes. 921 (build_vtt): Do not add VTTs to the symbol table. 922 (build_ctor_vtbl_group): Likewise. 923 (build_vtbl_initializer): Simplify handling of vcall indices. 924 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets 925 for the most derived class. 926 (add_vcall_offset_vtbl_entries_1): But do not actually add them to 927 the vtable. 928 * cp-tree.h (dynamic_classes): New macro. 929 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices. 930 (CLASSTYPE_RTTI): Remove. 931 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove. 932 (CLASSTYPE_VCALL_INDICES): New macro. 933 (CLASSTYPE_VTABLES): Likewise. 934 (BV_USE_VCALL_INDEX_P): Remove. 935 (build_vtable_path): Remove. 936 * decl2.c (finish_vtable_vardecl): Remove. 937 (key_method): Remove #if 0'd code. 938 (finish_vtable_vardecl): Rename to ... 939 (maybe_emit_vtables): ... this. 940 (finish_file): Use it. 941 * search.c (look_for_overrides_here): Update comment. 942 9432002-11-01 Zack Weinberg <zack@codesourcery.com> 944 945 PR c/7353 redux 946 * decl2.c (grokfield): Reject TYPE_DECLs with initializers. 947 9482002-10-30 Jason Merrill <jason@redhat.com> 949 950 PR c++/8186 951 * cp-tree.h (ADDR_IS_INVISIREF): New macro. 952 * call.c (convert_for_arg_passing): Set it. 953 * except.c (stabilize_throw_expr): Recurse for such an arg. 954 9552002-10-31 Mark Mitchell <mark@codesourcery.com> 956 957 * cp-tree.h (lang_decl_flags): Remove init_priority. 958 (lang_decl): Add delta. 959 (GLOBAL_INIT_PRIORITY): Remove. 960 (THUNK_DELTA): Revise definition. 961 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY. 962 * dump.c (cp_dump_tree): Don't dump it. 963 9642002-10-30 Mark Mitchell <mark@codesourcery.com> 965 966 PR c++/8160 967 * typeck2.c (process_init_constructor): Call complete_array_type. 968 969 PR c++/8149 970 * decl.c (make_typename_type): Issue errors about invalid results. 971 9722002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 973 974 Core issue 287, PR c++/7639 975 * cp-tree.h (lang_type_class): Add decl_list field. 976 (CLASSTYPE_DECL_LIST): New macro. 977 (maybe_add_class_template_decl_list): Add declaration. 978 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST. 979 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST. 980 (maybe_add_class_template_decl_list): New function. 981 (add_implicitly_declared_members): Use it. 982 * decl.c (maybe_process_template_type_declaration): Likewise. 983 (pushtag): Likewise. 984 * friend.c (add_friend): Likewise. 985 (make_friend_class): Likewise. 986 * semantics.c (finish_member_declaration): Likewise. 987 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST. 988 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST 989 to process members and friends in the order of declaration. 990 9912002-10-29 Mark Mitchell <mark@codesourcery.com> 992 993 PR c++/8287 994 * decl.c (finish_destructor_body): Create the label to jump to 995 when returning from a destructor here. 996 (finish_function_body): Rather than here. 997 9982002-10-25 Zack Weinberg <zack@codesourcery.com> 999 1000 PR c++/7266 1001 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a 1002 SCOPE_REF is not null before dereferencing it. 1003 10042002-10-25 Mark Mitchell <mark@codesourcery.com> 1005 1006 * call.c (build_over_call): Use DECL_CONTEXT, not 1007 DECL_VIRTUAL_CONTEXT. 1008 * class.c (modify_vtable_entry): Don't mess with 1009 DECL_VIRTUAL_CONTEXT. 1010 (set_vindex): Remove. 1011 (set_primary_base): Remove vfuns_p parameter. 1012 (determine_primary_base): Likewise. 1013 (modify_all_vtables): Likewise. 1014 (layout_class_type): Likewise. Adjust calls to other functions 1015 accordingly. 1016 (finish_struct_1): Adjust calls to modified functions. Set 1017 DECL_VINDEX here. 1018 * cp-tree.h (lang_type_class): Remove vsize. 1019 (CLASSTYPE_VSIZE): Remove. 1020 (lang_decl): Remove thunks. 1021 (DECL_THUNKS): Adjust. 1022 (DECL_VIRTUAL_CONTEXT): Remove. 1023 (duplicate_decls): Don't copy it. 1024 * pt.c (build_template_decl): Don't set it. 1025 (tsubst_decl): Likewise. 1026 * typeck.c (expand_ptrmemfunc_cst): Don't use it. 1027 1028 * class.c (build_vtbl_initializer): Don't use build_vtable_entry. 1029 (build_vtable_entry): Remove. 1030 * cp-tree.h (BINFO_VIRTUALS): Expand documentation. 1031 (lang_decl): Add thunks. 1032 (DECL_THUNKS): New macro. 1033 * decl.c (duplicate_decls): Copy it. 1034 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS. 1035 * semantics.c (emit_associated_thunks): Simplify. 1036 10372002-10-24 David Edelsohn <edelsohn@gnu.org> 1038 1039 PR c++/7228 1040 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that 1041 lang_type structure exists before accessing field. 1042 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro. 1043 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar. 1044 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro. 1045 * class.c (check_field_decls): Use new macros. 1046 * typeck2.c (process_init_constructor): Remove redundant check for 1047 existence of lang_type structure. 1048 10492002-10-24 Mark Mitchell <mark@codesourcery.com> 1050 1051 * class.c (end_of_base): New method. 1052 (end_of_class): Use it. Check indirect virtual bases. 1053 1054 * class.c (check_field_decls): Fix typo. 1055 10562002-10-23 Mark Mitchell <mark@codesourcery.com> 1057 1058 PR c++/8067 1059 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and 1060 related variables. 1061 1062 PR c++/7679 1063 * spew.c (next_token): Do not return an endless stream of 1064 END_OF_SAVED_INPUT tokens. 1065 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of 1066 the cached token stream. 1067 (snarf_defarg): Likewise. 1068 10692002-10-23 Zack Weinberg <zack@codesourcery.com> 1070 1071 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for 1072 variably_modified_type_p. 1073 * cp-tree.h: Remove prototype of variably_modified_type_p. 1074 * tree.c (variably_modified_type_p): Remove; now implemented 1075 in language-independent code. 1076 10772002-10-22 Mark Mitchell <mark@codesourcery.com> 1078 1079 PR c++/6579 1080 * spew.c (snarf_parenthesized_expression): New function. 1081 (snarf_block): Use it. 1082 10832002-10-22 Richard Henderson <rth@redhat.com> 1084 1085 * method.c (use_thunk): Always compute vcall_value; assert that 1086 it is not zero. Use can_output_mi_thunk; use output_mi_thunk 1087 for vcall thunks as well. 1088 10892002-10-21 Mark Mitchell <mark@codesourcery.com> 1090 1091 * class.c (empty_base_at_nonzero_offset_p): New function. 1092 (layout_nonempty_base_or_field): Do not check for conflicts when 1093 laying out a virtual base using the GCC 3.2 ABI. 1094 (build_base_field): Correct checking for presence of empty classes 1095 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P. 1096 1097 * class.c (include_empty_classes): Use normalize_rli. 1098 (layout_class_type): Likewise. 1099 1100 * decl.c (reshape_init): Tweak handling of character arrays. 1101 1102 PR c++/8218 1103 * cp-tree.h (lang_type_class): Add contains_empty_class_p. 1104 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro. 1105 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P. 1106 (check_field_decls): Likewise. 1107 (layout_class_type): Likewise. 1108 (finish_struct_1): Initialize it. 1109 (walk_subobject_offsets): Use it to prune searches. 1110 11112002-10-20 Mark Mitchell <mark@codesourcery.com> 1112 1113 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT. 1114 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with 1115 TARGET_ASM_OUTPUT_MI_THUNK in comments. 1116 11172002-10-18 Zack Weinberg <zack@codesourcery.com> 1118 1119 * decl.c (start_decl): Point users of the old initialized- 1120 typedef extension at __typeof__. 1121 11222002-10-18 Mark Mitchell <mark@codesourcery.com> 1123 1124 * Make-lang.in (method.o): Depend on TARGET_H. 1125 * method.c (target.h): Include it. 1126 (use_thunk): Use target hooks. Use vcall thunks, if available. 1127 11282002-10-18 Mark Mitchell <mark@codesourcery.com> 1129 1130 * class.c (base_derived_from): Make sure return value is a bool. 1131 11322002-10-18 Mark Mitchell <mark@codesourcery.com> 1133 1134 * class.c (find_final_overrider_data_s): Remove overriding_fn and 1135 overriding_base. 1136 (dfs_base_derived_from): New function. 1137 (base_derived_from): Likewise. 1138 (dfs_find_final_overrider): Use base_derived_from. 1139 (find_final_overrider): Adjust. 1140 11412002-10-18 Jason Merrill <jason@redhat.com> 1142 1143 PR c++/8080 1144 * semantics.c (finish_for_cond, finish_while_cond): Don't mess 1145 with condition decls in a template. 1146 11472002-10-17 Nathan Sidwell <nathan@codesourcery.com> 1148 1149 * class.c (add_method): Compare template parms too. 1150 11512002-10-17 Mark Mitchell <mark@codesourcery.com> 1152 1153 PR c++/7584 1154 * class.c (handle_using_decl): Allow the declaration used to be 1155 from an ambiguous base. 1156 1157 * pt.c (convert_template_argument): Revert this change: 1158 2002-10-16 Mark Mitchell <mark@codesourcery.com> 1159 * pt.c (convert_template_argument): Do not fold non-type 1160 template rguments when inside a template. 1161 1162 * init.c (expand_default_init): Handle brace-enclosed initializers 1163 correctly. 1164 11652002-10-16 Mark Mitchell <mark@codesourcery.com> 1166 1167 * mangle.c (write_expression): Correct handling of enumeration 1168 constants. 1169 (write_template_arg): Likewise. 1170 * pt.c (convert_template_argument): Do not fold non-type template 1171 arguments when inside a template. 1172 1173 PR c++/7478 1174 * cvt.c (convert_to_reference): Allow references as the incoming 1175 type. 1176 11772002-10-16 Mark Mitchell <mark@codesourcery.com> 1178 1179 PR c++/7524 1180 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not 1181 build_qualified_type. 1182 11832002-10-15 Richard Henderson <rth@redhat.com> 1184 1185 * error.c (dump_expr): Use real_to_decimal directly, and with 1186 the new arguments. 1187 11882002-10-15 Mark Mitchell <mark@codesourcery.com> 1189 1190 * decl.c (reshape_init): Fix typo. 1191 1192 * cp-tree.h (operator_name_info_t): Add arity. 1193 * lex.c (init_operators): Initialize it. 1194 * mangle.c (write_conversion_operator_name): New function. 1195 (write_unqualified_name): Use it. 1196 (write_template_args): Accept template arguments as a TREE_LIST. 1197 (write_expression): Adjust handling of qualified names to match 1198 specification. 1199 12002002-10-15 Jason Merrill <jason@redhat.com> 1201 1202 * call.c (call_builtin_trap): New fn. 1203 (convert_arg_to_ellipsis): Use it. Downgrade error to warning. 1204 (build_call): Don't set current_function_returns_abnormally outside 1205 a function. 1206 12072002-10-14 Mark Mitchell <mark@codesourcery.com> 1208 1209 * class.c (check_field_decls): Remove empty_p parameter. Instead, 1210 clear CLASSTYPE_EMPTY_P. 1211 (build_base_field): Likewise. 1212 (build_base_fields): Likewise. 1213 (check_bases_and_members): Likewise. 1214 (create_vtbl_ptr): Likewise. 1215 (layout_class_type): Likewise. Ensure that empty classes have 1216 size zero when used as base classes in the 3.2 ABI. 1217 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and 1218 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p 1219 parameter. 1220 (is_empty_class): Correct definition when using post-3.2 ABI. 1221 * cp-tree.h (lang_type_class): Add empty_p. 1222 (CLASSTYPE_EMPTY_P): New macro. 1223 12242002-10-12 Nathan Sidwell <nathan@codesourcery.com> 1225 1226 * init.c (build_delete): Do not apply save_expr for arrays. 1227 (build_vec_delete): Likewise. 1228 12292002-10-14 Mark Mitchell <mark@codesourcery.com> 1230 1231 * decl.c (layout_var_decl): Call layout_decl even for variables 1232 whose type is an array with unspecified bounds. 1233 1234 PR c++/7176 1235 * lex.c (do_identifier): Add another option for the parsing 1236 parameter. 1237 * parse.y (do_id): Use it. 1238 12392002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net> 1240 1241 PRs C++/6803, C++/7721 and C++/7803 1242 * decl.c (grokdeclarator): Gracefully handle template-name as 1243 decl-specifier. 1244 12452002-10-11 Jason Molenda <jmolenda@apple.com> 1246 1247 * init.c (build_field_list): Provide uses_unions_p with a default 1248 value. 1249 12502002-10-11 Mark Mitchell <mark@codesourcery.com> 1251 1252 PR c++/5661 1253 * cp-tree.h (variably_modified_type_p): New function. 1254 (grokdeclarator) Tighten check for variably modified types as 1255 fields. 1256 * pt.c (convert_template_argument): Do not allow variably modified 1257 types as template arguments. 1258 * tree.c (variably_modified_type_p): New function. 1259 1260 * NEWS: Document removal of "new X = ..." extension. 1261 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on 1262 brace-enclosed initializers. 1263 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro. 1264 (initialize_local_var): Remove declaration. 1265 (expand_static_init): Likewise. 1266 * decl.c (next_initializable_field): New function. 1267 (reshape_init): Likewise. 1268 (check_initializer): Use them. Build dynamic initializer for 1269 aggregates here too. 1270 (initialize_local_var): Simplify, and incorporate cleanup 1271 insertion code as well. 1272 (destroy_local_var): Remove. 1273 (cp_finish_decl): Tidy. 1274 (expand_static_init): Fold checks for whether or not a variable 1275 needs initialization into this function. Simplify. 1276 * decl2.c (do_static_initialization): Simplify. 1277 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will 1278 be done for us automatically. 1279 (expand_default_init): Handle brace-enclosed initializers 1280 correctly. 1281 (expand_aggr_init_1): Remove RTL-generation code. 1282 (build_vec_init): Remove "new X = ..." support. 1283 * parse.y (new_initializer): Likewise. 1284 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on 1285 brace-enclosed initializer. 1286 (create_pseudo_type_info): Likewise. 1287 * typeck2.c (store_init_value): Don't try to handle digest_init 1288 being called more than once. 1289 (digest_init): Tidy handling of brace-enclosed initializers. 1290 12912002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1292 1293 * decl.c (typename_hash): Use htab_hash_pointer. 1294 12952002-10-10 Jim Wilson <wilson@redhat.com> 1296 1297 * decl.c (duplicate_decls): Don't call decl_attributes. 1298 12992002-10-09 Zack Weinberg <zack@codesourcery.com> 1300 1301 PR c/7353 1302 * decl.c (start_decl): Unconditionally issue error for 1303 'typedef foo = bar'. 1304 (cp_finish_decl): Remove special case for TYPE_DECL with initializer. 1305 (grokdeclarator): Remove redundant error for 'typedef foo = bar'. 1306 13072002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1308 1309 * decl2.c (prune_vtable_vardecl): Delete unused function. 1310 13112002-10-03 Mark Mitchell <mark@codesourcery.com> 1312 1313 PR c++/7754 1314 * decl2.c (finish_anon_union): Do not expand anonymous unions when 1315 procesing template functions. 1316 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable 1317 type. Call layout_decl. 1318 (tsubst_expr, case DECL_STMT): Handle anonymous unions. 1319 13202002-10-07 Richard Henderson <rth@redhat.com> 1321 1322 * decl2.c, pt.c: Revert c++/7754 fix. 1323 13242002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1325 1326 PR c++/7804 1327 * error.c (dump_expr) [REAL_CST]: Output in decimal format. 1328 13292002-10-03 Mark Mitchell <mark@codesourcery.com> 1330 1331 PR c++/7931 1332 * pt.c (for_each_template_parm_r): Handle BASELINKs. 1333 1334 PR c++/7754 1335 * decl2.c (finish_anon_union): Do not expand anonymous unions when 1336 procesing template functions. 1337 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable 1338 type. Call layout_decl. 1339 (tsubst_expr, case DECL_STMT): Handle anonymous unions. 1340 13412002-10-03 Mark Mitchell <mark@codesourcery.com> 1342 1343 PR c++/8006 1344 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template 1345 template parameters. 1346 (globals): Add entity and need_abi_warning. 1347 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not 1348 CLASSTYPE_TEMPLATE_INFO. 1349 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not 1350 TYPE_TI_TEMPLATE. 1351 (write_prefix): Handle typename types correctly. 1352 (write_template_prefix): Handle template template parameters 1353 correctly. 1354 (start_mangling): Add entity parameter. 1355 (finish_mangling): Warn about names whose mangling will change. 1356 (mangle_decl_string): Adjust. 1357 (mangle_type_string): Likewise. 1358 (mangle_special_for_type): Likewise. 1359 (mangle_ctor_vtbl_for_type): Likewise. 1360 (mangle_thunk): Likewise. 1361 (mangle_guard_variable): Likewise. 1362 (mangle_ref_init_variable): Likewise. 1363 13642002-10-02 Mark Mitchell <mark@codesourcery.com> 1365 1366 PR c++/7188. 1367 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two. 1368 * cp-tree.h (emit_base_init): Rename to .... 1369 (emit_mem_initializers): ... this. 1370 (expand_member_init): Change prototype. 1371 * init.c (perform_member_init): Compute explicit, rather than 1372 requiring it as a parameter. 1373 (sort_member_init): Rename to ... 1374 (sort_mem_initializers): ... this. Process bases and data members 1375 together. 1376 (sort_base_init): Remove. 1377 (emit_base_init): Rename to ... 1378 (emit_mem_initializers): ... this. 1379 (expand_aggr_vbase_init_1): Remove. 1380 (construct_virtual_bases): Rename to ... 1381 (construct_virtual_base): ... this. 1382 (expand_member_init): Rework handling of base initializers. 1383 * method.c (do_build_copy_constructor): Use 1384 finish_mem_initializers. 1385 * parse.y (member_init): Adjust calls to expand_member_init. 1386 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case. 1387 (tsubst_initializer_list): Use expand_member_init. 1388 * semantics.c (finish_mem_intiailizers): Simplify. 1389 13902002-10-02 Matt Austern <austern@apple.com> 1391 * decl.c (walk_vtables_r): Fixed typo that caused result to 1392 never get a nonzero value. 1393 13942002-10-02 Roger Sayle <roger@eyesopen.com> 1395 1396 PR optimization/6627 1397 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition 1398 from here, and move it to tree.h. 1399 * decl.c (cxx_init_decl_processing): If storing the vbit 1400 in function pointers, ensure that force_align_functions_log 1401 is atleast one. 1402 14032002-10-02 Matt Austern <austern@apple.com> 1404 1405 * class.c (check_field_decls): Changed warning about const member 1406 variables so that it doesn't get issued for a class aggregate. 1407 14082002-10-01 Mark Mitchell <mark@codesourcery.com> 1409 1410 * decl.c (cp_finish_decl): Make sure array types are laid out, 1411 even if the array bounds are unknown. 1412 14132002-10-01 Steve Ellcey <sje@cup.hp.com> 1414 1415 * class.c (build_vtbl_initializer): Change build_c_cast 1416 to build1. 1417 14182002-10-01 Mark Mitchell <mark@codesourcery.com> 1419 1420 * decl.c (cp_finish_decl): Make sure array types are laid out, 1421 even if the array bounds are unknown. 1422 1423 * decl.c (cp_finish_decl): Correct check for dynamic 1424 initialization of thread-local storage. 1425 14262002-09-30 Nathan Sidwell <nathan@codesourcery.com> 1427 1428 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also 1429 overloaded. 1430 14312002-09-30 Steve Ellcey <sje@cup.hp.com> 1432 1433 * class.c (build_vtbl_initializer): Add cast. 1434 (add_vcall_offset_vtbl_entries_1): 1435 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset. 1436 14372002-09-30 Mark Mitchell <mark@codesourcery.com> 1438 1439 * class.c (walk_subobject_offsets): Correct the calculation of 1440 offsets for virtual bases. Correct the counting of array 1441 elements. 1442 (layout_nonempty_base_or_field): Simplify. Correct the 1443 calculation of offsets to be propagated through the binfo 1444 hierarchy. 1445 (build_base_field): Avoid creating a FIELD_DECL for empty bases. 1446 Add the FIELD_DECL to TYPE_FIELDS. 1447 (build_base_fields): Adjust accordingly. 1448 (layout_virtual_bases): Use build_base_field. 1449 (end_of_class): Return a tree, not an integer. 1450 (warn_about_ambiguous_direct_bases): Rename to ... 1451 (warn_about_ambiguous_bases): ... this. 1452 (include_empty_classes): New function. 1453 (layout_class_type): Create an alternative version of the type to 1454 be used when as a base class type. Do not call 1455 finish_record_layout until we are done laying out the class. 1456 * cp-tree.h (lang_type_class): Remove size, size_unit. Add 1457 as_base. 1458 (CLASSTYPE_SIZE): Reimplement. 1459 (CLASSTYPE_SIZE_UNIT): Likewise. 1460 (CLASSTYPE_ALIGN): Likweise. 1461 (CLASSTYPE_USER_ALIGN): Likewise. 1462 (CLASSTYPE_AS_BASE): New macro. 1463 (DECL_INITIALIZED_P): Likewise. 1464 (extract_init): Remove prototype. 1465 (build_forced_zero_init): Rename to ... 1466 (build_zero_init): ... this. 1467 (force_store_init_value): Remove. 1468 * decl.c (obscure_complex_init): Remove. 1469 (duplicate_decls): Copy DECL_INITIALIZED_P. 1470 (check_initializer): Do not leave junk in DECL_INITIAL. 1471 (cp_finish_decl): Handle zero-initialization of entities with 1472 static storage duration. 1473 * expr.c (extract_init): Remove. 1474 * init.c (build_forced_zero_init): Remove. 1475 (build_zero_init): New function. 1476 (build_default_init): Use it. 1477 (build_field_list): Skip FIELD_DECLs for base subobjects. 1478 (push_base_cleanups): Likewise. 1479 * method.c (do_build_assign_ref): Likewise. 1480 (synthesize_exception_spec): Likewise. 1481 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P. 1482 (regenerate_decl_from_template): To not set DECL_INITIAL for a 1483 static data member whose initialization took place in its class. 1484 (instantiate_decl): Do not pass an initializer to cp_finish_decl 1485 in that situation. 1486 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects. 1487 (dfs_unuse_fields): Likewise. 1488 * tree.c (pod_type_p): Handle error_mark_node. 1489 (zero_init_p): Likewise. 1490 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base 1491 subobjects. 1492 * typeck2.c (store_init_value): Remove #if 0'd code. 1493 (force_store_init_value): Remove. 1494 (process_init_constructor): Use build_zero_init. 1495 14962002-09-29 Nathan Sidwell <nathan@codesourcery.com> 1497 1498 PR c++/7788 1499 * rtti.c (unemitted_tinfo_decl_p): Check it has a field. 1500 15012002-09-29 Kazu Hirata <kazu@cs.umass.edu> 1502 1503 * cp-tree.h: Fix comment typos. 1504 * decl.c: Likewise. 1505 * pt.c: Likewise. 1506 15072002-09-25 Mark Mitchell <mark@codesourcery.com> 1508 1509 * cp/class.c (contains_empty_class_p): New method. 1510 (walk_subobject_offsets): Correct computation of field offset. 1511 (layout_empty_base): Correct placement of emtpy base classes. 1512 (layout_class_type): Warn about ABI changes. 1513 15142002-09-23 Mark Mitchell <mark@codesourcery.com> 1515 1516 * cp/class.c (layout_virtual_bases): Do not round the size of the 1517 type to a multiple of the alignment before laying out virtual bases. 1518 (layout_class_type): Correct handling of bit-fields that are wider 1519 than their type inside unions. Round the size of the type to a 1520 even number of bytes when computing the size without virtual 1521 bases. 1522 * cp/cp-tree.h (abi_version_at_least): New macro. 1523 15242002-09-21 Kazu Hirata <kazu@cs.umass.edu> 1525 1526 * ChangeLog: Follow spelling conventions. 1527 * ChangeLog.2: Likewise. 1528 * call.c: Likewise. 1529 * class.c: Likewise. 1530 * cp-tree.h: Likewise. 1531 * cvt.c: Likewise. 1532 * decl.c: Likewise. 1533 * decl2.c: Likewise. 1534 * except.c: Likewise. 1535 * friend.c: Likewise. 1536 * g++spec.c: Likewise. 1537 * init.c: Likewise. 1538 * lex.c: Likewise. 1539 * mangle.c: Likewise. 1540 * method.c: Likewise. 1541 * operators.def: Likewise. 1542 * optimize.c: Likewise. 1543 * pt.c: Likewise. 1544 * rtti.c: Likewise. 1545 * search.c: Likewise. 1546 * semantics.c: Likewise. 1547 * spew.c: Likewise. 1548 * tree.c: Likewise. 1549 * typeck.c: Likewise. 1550 15512002-09-18 Devang Patel <dpatel@apple.com> 1552 1553 * cp/cp-tree.h: New prototype for walk_vtabls(). 1554 * cp/decl.c (walk_vtables_r): New function. 1555 (struct cp_binding_level): Add new members, namespaces, 1556 names_size and vtables. 1557 (add_decl_to_level): Add decl in namespaces or vtables 1558 chain, if conditions match. 1559 (walk_vtables): New function. 1560 (walk_namespaces_r): Travers separate namespace chain 1561 for namespace decls. 1562 (wrapup_globals_for_namespace): Use names_size instead 1563 of list_length(). 1564 * cp/decl2.c (finish_file): Use walk_vtables() instead of 1565 walk_globals() to walk vtable decls. 1566 15672002-09-18 Nathan Sidwell <nathan@codesourcery.com> 1568 1569 * decl.c (grokdeclarator): Use assert, not internal_error. Don't 1570 ICE with invalid pointers & references. 1571 15722002-09-17 Zack Weinberg <zack@codesourcery.com> 1573 1574 * Make-lang.in: Remove all references to the demangler. 1575 * cxxfilt.c: Moved to binutils. 1576 15772002-09-16 Nathan Sidwell <nathan@codesourcery.com> 1578 1579 PR c++/7718 1580 * pt.c (tsubst_decl): Remove assert. 1581 1582 Remove DR 295 implementation. 1583 * pt.c (check_cv_quals_for_unify): Disable function & method cases. 1584 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn 1585 about ignoring volatile qualifiers. 1586 1587 * search.c (lookup_member): Correct documentation. 1588 15892002-09-16 Geoffrey Keating <geoffk@apple.com> 1590 1591 * cp-tree.h (union lang_tree_node): Add chain_next option. 1592 15932002-09-16 Nathan Sidwell <nathan@codesourcery.com> 1594 1595 * parse.y (parse_finish_call_expr): Check lookup_member result. 1596 1597 PR c++/7015 1598 * semantic.c (finish_asm_stmt): Fix operand/output_operands 1599 thinko. 1600 * typeck.c (c_expand_asm_operands): Protect from error_mark_node. 1601 16022002-09-15 Nathan Sidwell <nathan@codesourcery.com> 1603 1604 PR c++/7919 1605 * call.c (build_over_call): Convert this pointer for fns found by 1606 using decls. 1607 16082002-09-15 Kazu Hirata <kazu@cs.umass.edu> 1609 1610 * ChangeLog: Follow spelling conventions. 1611 * ChangeLog.1: Likewise. 1612 16132002-09-14 Nathan Sidwell <nathan@codesourcery.com> 1614 1615 PR c++/7768 1616 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P. 1617 16182002-09-14 Kazu Hirata <kazu@cs.umass.edu> 1619 1620 * error.c: Fix comment formatting. 1621 * except.c: Likewise. 1622 * expr.c: Likewise. 1623 * friend.c: Likewise. 1624 * g++spec.c: Likewise. 1625 * init.c: Likewise. 1626 * lex.c: Likewise. 1627 * mangle.c: Likewise. 1628 * method.c: Likewise. 1629 * optimize.c: Likewise. 1630 * pt.c: Likewise. 1631 * rtti.c: Likewise. 1632 * search.c: Likewise. 1633 * semantics.c: Likewise. 1634 * spew.c: Likewise. 1635 * tree.c: Likewise. 1636 * typeck.c: Likewise. 1637 * typeck2.c: Likewise. 1638 16392002-09-13 Matt Austern <austern@apple.com> 1640 1641 PR C++/7828 1642 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p. 1643 * cp/call.c: Change call-by-const-reference mechanism to use 1644 non_cast_lvalue_p when deciding whether the create a temporary. 1645 We need a temporary when passing, e.g. (long) x by const ref. 1646 16472002-09-13 Nathan Sidwell <nathan@codesourcery.com> 1648 1649 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified. 1650 16512002-09-13 Kazu Hirata <kazu@cs.umass.edu> 1652 1653 * decl.c: Fix comment formatting. 1654 * decl2.c: Likewise. 1655 16562002-09-12 Kazu Hirata <kazu@cs.umass.edu> 1657 1658 * call.c: Fix comment formatting. 1659 * class.c: Likewise. 1660 * cp-lang.c: Likewise. 1661 * cp-tree.h: Likewise. 1662 * cvt.c: Likewise. 1663 16642002-09-11 Zack Weinberg <zack@codesourcery.com> 1665 1666 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c, 1667 and c++filt from cxxfilt.o + version.o + $(LIBDEPS). 1668 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with 1669 minor adjustments (use version_string, eliminate yet another 1670 duplicate of xmalloc) 1671 16722002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1673 1674 * cp-tree.h (require_complete_eh_spec_types): Add prototype. 1675 16762002-09-05 Jason Merrill <jason@redhat.com> 1677 1678 * typeck2.c (add_exception_specifier): Only pedwarn for an 1679 incomplete type. 1680 (require_complete_eh_spec_types): New fn. 1681 (cxx_incomplete_type_diagnostic): Also support pedwarning. 1682 * typeck.c (complete_type_or_diagnostic): Likewise. 1683 * call.c (build_call): Call require_complete_eh_spec_types. 1684 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting 1685 on an incomplete type. 1686 16872002-09-04 Jakub Jelinek <jakub@redhat.com> 1688 1689 * decl.c (start_cleanup_fn): Clear interface_only before 1690 start_function, restore it afterwards. 1691 16922002-09-02 Nathan Sidwell <nathan@codesourcery.com> 1693 1694 * cp-tree.h (finish_builtin_type): Remove. 1695 * decl2.c (finish_builtin_type): Move to common code. 1696 * decl.c (build_ptrmemfunc_type): Adjust. 1697 * rtti.c (create_pseudo_type_info): Adjust. 1698 (create_tinfo_types): Adjust. 1699 17002002-08-31 Jason Merrill <jason@redhat.com> 1701 1702 * cp-lang.c (cp_expr_size): Allow initialization from a 1703 CONSTRUCTOR. 1704 17052002-08-30 Richard Henderson <rth@redhat.com> 1706 1707 PR opt/7515 1708 * tree.c: Include target.h. 1709 (cp_cannot_inline_tree_fn): Don't auto-inline functions that 1710 don't bind locally. 1711 * Makefile.in (tree.o): Update. 1712 17132002-08-27 Mark Mitchell <mark@codesourcery.com> 1714 1715 * class.c (layout_virtual_bases): Warn about bugs in G++ that 1716 result in incorrect object layouts. 1717 (layout_class_type): Likewise. 1718 17192002-08-24 Matt Austern <austern@apple.com> 1720 1721 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues 1722 are allowable. 1723 (real_lvalue_p): Update caller. 1724 (lvalue_p): Ditto. 1725 (non_cast_lvalue_or_else): New. 1726 * tree.h: Declare it. 1727 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else. 1728 17292002-08-22 Mark Mitchell <mark@codesourcery.com> 1730 1731 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR 1732 and COND_EXPR specially; fix error message output. 1733 17342002-08-22 Jason Merrill <jason@redhat.com> 1735 1736 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR. 1737 * semantics.c (nullify_returns_r): Likewise. 1738 17392002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net> 1740 1741 Fix PR/7621 1742 * typeck.c (finish_class_member_access_expr): Diagnose cases where 1743 name lookup finds nothing. 1744 17452002-08-15 Jason Merrill <jason@redhat.com> 1746 1747 * semantics.c (finish_then_clause): Remove redundant assignment. 1748 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the 1749 extra binding level outside the if/switch statement. 1750 (finish_while_cond, finish_for_cond): Rewrite complex condition 1751 into the loop body. 1752 17532002-08-15 Alexandre Oliva <aoliva@redhat.com> 1754 1755 * parse.y (sizeof, alignof, typeof): New non-terminals to 1756 increment skip_evaluation. Replace terminals with them and 1757 decrement skip_evaluation at the end of rules using them. 1758 * decl2.c (mark_used): Don't assemble_external if 1759 skipping evaluation. 1760 17612002-08-15 Gabriel Dos Reis <gdr@nerim.net> 1762 1763 Fix PR/7504 1764 * parse.y (parse_finish_call_expr): Handle incomplete 1765 type used to name a scope. 1766 17672002-08-15 Nathan Sidwell <nathan@codesourcery.com> 1768 1769 PR c++/7598 1770 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes 1771 regression caused by my 2002-08-08 patch. 1772 17732002-08-13 Mark Mitchell <mark@codesourcery.com> 1774 1775 * decl.c (pushdecl_class_level): Honor requests to bind names to 1776 OVERLOADs. 1777 17782002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1779 1780 * decl2.c (build_call_from_tree): Fix uninitialized variable. 1781 * parse.y (parse_finish_call_expr): Likewise. 1782 * repo.c (old_args, old_dir, old_main): Const-ify. 1783 17842002-08-11 Gabriel Dos Reis <gdr@nerim.net> 1785 1786 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE 1787 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION. 1788 * optimize.c (maybe_clone_body): Likewise. 1789 * pt.c (tsubst_enum): Likewise. 1790 (lookup_template_class): Likewise. 1791 * tree.c (cp_copy_res_decl_for_inlining): Likewise. 1792 17932002-08-10 Neil Booth <neil@daikokuya.co.uk> 1794 1795 * lang-specs.h: Remove -ansi. 1796 17972002-08-10 Nathan Sidwell <nathan@codesourcery.com> 1798 1799 * tree.c (maybe_dummy_object): Replace // with /* */ 1800 18012002-08-09 Mark Mitchell <mark@codesourcery.com> 1802 1803 * call.c (standard_conversion): Use build_ptrmem_type. 1804 * cp-tree.h (build_ptrmem_type): New function. 1805 (adjust_result_of_qualified_name_lookup): Likewise. 1806 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate 1807 static data members. 1808 (build_ptrmem_type): New function. 1809 (grokdeclarator): Do not use build_offset_type when encountering a 1810 qualified name. 1811 * parse.y (parse_finish_call_expr): Use 1812 adjust_result_of_qualified_name_lookup. 1813 * search.c (adjust_result_of_qualified_name_lookup): New function. 1814 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than 1815 accessing OFFSET_TYPEs directly. 1816 18172002-08-08 Mike Stump <mrs@apple.com> 1818 1819 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid. 1820 (type_decays_to): Likewise. 1821 * class.c (find_final_overrider): Likewise. 1822 (maybe_note_name_used_in_class): Likewise. 1823 * decl.c (current_tmpl_spec_kind): Likewise. 1824 (add_binding): Likewise. 1825 (push_class_binding): Likewise. 1826 (duplicate_decls): Likewise. 1827 (layout_var_decl): Likewise. 1828 (grokfndecl): Likewise. 1829 (grokdeclarator): Likewise. 1830 (check_default_argument): Likewise. 1831 * decl2.c (handle_class_head): Likewise. 1832 * error.c (dump_template_decl): Likewise. 1833 * init.c (build_offset_ref): Likewise. 1834 * pt.c (check_specialization_scope): Likewise. 1835 (determine_specialization): Likewise. 1836 (check_explicit_specialization): Likewise. 1837 (maybe_check_template_type): Likewise. 1838 (process_partial_specialization): Likewise. 1839 (check_default_tmpl_args): Likewise. 1840 (push_template_decl_real): Likewise. 1841 (convert_template_argument): Likewise. 1842 (try_class_unification): Likewise. 1843 (get_bindings_real): Likewise. 1844 (do_decl_instantiation): Likewise. 1845 * semantics.c (begin_function_definition): Likewise. 1846 (finish_member_declaration): Likewise. 1847 (check_multiple_declarators): Likewise. 1848 * typeck.c (comp_array_types): Likewise. 1849 (comptypes): Likewise. 1850 (expr_sizeof): Likewise. 1851 (build_binary_op): Likewise. 1852 (dubious_conversion_warnings): Likewise. 1853 (check_return_expr): Likewise. 1854 18552002-08-08 Mark Mitchell <mark@codesourcery.com> 1856 1857 * typeck.c (build_class_member_access_expr): Do not return 1858 error_mark_node when no error has occurred. 1859 18602002-08-08 Nathan Sidwell <nathan@codesourcery.com> 1861 1862 * typeck.c (build_component_addr): Remove. 1863 (build_unary_op): Just check it's not a bitfield, and then build 1864 an ADDR_EXPR. 1865 18662002-08-08 Nathan Sidwell <nathan@codesourcery.com> 1867 1868 * class.c (convert_to_base): Correct check for error_mark_node. 1869 (create_vtable_ptr): Remove unused VFUNS_P parm. 1870 18712002-08-08 Nathan Sidwell <nathan@codesourcery.com> 1872 1873 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files. 1874 18752002-08-07 Mark Mitchell <mark@codesourcery.com> 1876 1877 Rework build_component_ref. 1878 * call.c (build_vfield_ref): Do not go through build_component_ref. 1879 (build_field_call): Use build_class_member_access_expr. 1880 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS. 1881 (build_object_call): Likewise. 1882 * class.c (convert_to_base): New function. 1883 (type_requires_array_cookie): Use BASELINK_FUNCTIONS. 1884 (instantiate_type): Handle BASELINKs. 1885 * cp-tree.def (BASELINK): New tree code. 1886 * cp-tree.h (BASELINK_P): Reimplement. 1887 (SET_BASELINK_P): Remove. 1888 (BASELINK_BINFO): Reimplement. 1889 (BASELINK_FUNCTIONS): Likewise. 1890 (BASELINK_ACCESS_BINFO): Likewise. 1891 (BASELINK_OPTYPE): Likewise. 1892 (convert_to_base): New function. 1893 (name_p): Likewise. 1894 (build_object_ref): Remove. 1895 (build_component_ref_1): Likewise. 1896 (build_component_ref): Likewise. 1897 (build_x_component_ref): Likewise. 1898 (build_class_member_access_expr): New function. 1899 (finish_class_member_access_expr): Likewise. 1900 (build_ptrmemfunc_access_expr): Likewise. 1901 * decl.c (grokdeclarator): Handle BASELINKs. 1902 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using 1903 finish_class_member_access_expr. 1904 (arg_assoc): Handle BASELINKs. 1905 (do_class_using_decl): Likewise. 1906 * error.c (dump_decl): Likewise. 1907 (dump_expr): Use build_ptrmemfunc_access_expr. 1908 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find 1909 destructors. 1910 (build_throw): Use BASELINK_FUNCTIONS. 1911 * init.c (perform_member_init): Use 1912 build_class_member_access_expr. 1913 (build_offset_ref): Handle BASELINKs. Use 1914 build_class_member_access_expr. 1915 * method.c (hack_identifier): Likewise. 1916 * parse.y (do_id): Use BASELINK, not TREE_LIST. 1917 (primary): Remove uses of build_object_ref. 1918 * pt.c (lookup_template_function): Handle BASELINKs. 1919 (resolve_overloaded_unification): Likewise. 1920 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST. 1921 (lookup_field): Use BASELINK, not TREE_LIST. 1922 (lookup_fnfiels): Likewise. 1923 (setup_class_bindings): Likewise. 1924 * semantics.c (finish_object_call_expr): Do not use 1925 build_method_call when we already know what function is being 1926 called. 1927 * spew.c (identifier_type): Use BASELINK, not TREE_LIST. 1928 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not 1929 TREE_CHAIN. 1930 (name_p): New function. 1931 * typeck.c (build_object_ref): Remove. 1932 (build_component_ref_1): Likewise. 1933 (build_x_component_ref): Likewise. 1934 (build_class_member_access_expr): New function. 1935 (finish_class_member_access_expr): Likewise. 1936 (build_ptrmemfunc_access_expr): Likewise. 1937 (get_member_function_from_ptrfunc): Use 1938 build_ptrmemfunc_access_expr. 1939 (build_binary_op): Likewise. 1940 (build_unary_op): Likewise. 1941 (build_ptrmemfunc): Likewise. 1942 (pfn_from_ptrmemfunc): Likewise. 1943 * typeck2.c (build_m_component_ref): Adjust comment. 1944 19452002-08-07 Neil Booth <neil@daikokuya.co.uk> 1946 1947 * Make-lang.in (CXX_C_OBJS): Update. 1948 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. 1949 * cp-tree.h (cxx_decode_option): Remove. 1950 * decl2.c (compare_options, lang_f_options, unsupported_options, 1951 cxx_decode_option): Remove. 1952 19532002-08-06 Gabriel Dos Reis <gdr@nerim.net> 1954 1955 * typeck.c (build_x_unary_op): Handle pointer-to-member. 1956 19572002-08-05 Geoffrey Keating <geoffk@redhat.com> 1958 1959 * class.c: Don't include obstack.h. 1960 (popclass): 1961 * decl2.c: Delete bogus comment. 1962 * error.c: Don't include obstack.h. 1963 * except.c: Likewise. 1964 (dump_type): Correct comment. 1965 * method.c: Don't include obstack.h. 1966 * tree.c: Likewise. 1967 19682002-08-04 Gabriel Dos Reis <gdr@nerim.net> 1969 1970 Fix PR/2213 1971 * cvt.c (cp_convert_to_pointer): Reject conversions from integral 1972 expressions to pointer-to-data-member of pointer-to-member-functions. 1973 19742002-08-04 Geoffrey Keating <geoffk@redhat.com> 1975 1976 * cvt.c (ocp_convert): Delete obsolete code. 1977 * parse.y (permanent_obstack): Delete declaration. 1978 * pt.c (permanent_obstack): Delete declaration. 1979 * repo.c (permanent_obstack): Delete declaration. 1980 (open_repo_file): Use xmalloc instead of permanent_obstack. 1981 (init_repo): Use xstrdup instead of permanent_obstack. 1982 19832002-08-04 Nathan Sidwell <nathan@codesourcery.com> 1984 1985 * cp-tree.h (VF_DERIVED_VALUE): Remove. 1986 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE. 1987 19882002-08-03 Nathan Sidwell <nathan@codesourcery.com> 1989 1990 PR 7470. 1991 C++ ABI change - vfunc ordering. 1992 * class.c (add_virtual_function): Remove. 1993 (dfs_modify_all_vtables): Take list of all declared 1994 virtuals. Assign all that are not in primary base. 1995 (check_for_override): Adjust comments. 1996 (create_vtable_ptr): Take single list of virtuals. Build chain 1997 of declared virtuals here. 1998 (layout_class_type): Take single list of virtuals. Adjust. 1999 (finish_struct_1): Keep virtuals on single list. Adjust. 2000 20012002-08-02 Mark Mitchell <mark@codesourcery.com> 2002 2003 * init.c (build_member_call): Use build_new_method_call, not 2004 build_method_call. 2005 20062002-08-02 Krister Walfridsson <cato@df.lth.se> 2007 2008 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies. 2009 20102002-08-02 Mark Mitchell <mark@codesourcery.com> 2011 2012 * call.c (build_method_call): Issue a more helpful error message 2013 about ambiguous method names. 2014 20152002-08-02 Nathan Sidwell <nathan@codesourcery.com> 2016 2017 * tree.c (build_shared_int_cst): Make cache file scope, and 2018 GTY it. 2019 20202002-08-02 Jason Merrill <jason@redhat.com> 2021 2022 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define. 2023 (cp_expr_size): New fn. 2024 * call.c (build_over_call): Lose empty class hackery. 2025 (convert_arg_to_ellipsis): Promote non-POD warning to error. 2026 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue. 2027 2028 * semantics.c (expand_body): Do tree optimization in the function 2029 context, too. 2030 20312002-08-01 Neil Booth <neil@daikokuya.co.uk> 2032 2033 * cp-tree.h: Move all warning and flag declarations to c-common.h. 2034 * decl.c: Move all warning and flag variables to c-common.c. 2035 * decl2.c: Move all warning and flag variables to c-common.c. 2036 * lex.c (flag_digraphs): Remove. 2037 (warn_traditional): Now in c-common.c. 2038 20392002-07-31 Mark Mitchell <mark@codesourcery.com> 2040 2041 * call.c (build_field_call): Do not look up the field by name. 2042 (build_method_call): Simplify. 2043 (struct z_candidate): Add access_path and conversion_path. Remove 2044 basetype_path. 2045 (convert_class_to_reference): Adjust use of 2046 add_function_candidate. 2047 (add_candidate): Add conversion_path argument. 2048 (add_function_candidate): Use it. 2049 (add_conv_dndidate): Likewise. 2050 (build_builtin_candidate): Likewise. 2051 (add_template_candidate_real): Add conversion_path argument. 2052 (add_template_conv_candidate): Likewise. 2053 (add_template_candidate): Likewise. 2054 (build_user_type_conversion_1): Use it. 2055 (build_new_function_call): Remove name lookup code. Adjust use of 2056 add_template_candidate and add_function_candidate. 2057 (build_new_op): Likewise. 2058 (convert_like_real): Use build_special_member_call. 2059 (build_over_call): Use cand->conversion_path. 2060 (build_special_member_call): New method. 2061 (build_new_method_call): Remove name lookup code. 2062 * cp-tree.def (OFFSET_REF): Update documentation. 2063 (TEMPLATE_ID_EXPR): Likewise. 2064 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro. 2065 (BASELINK_OPTYPE): Likewise. 2066 (build_new_method_call): Adjust prototype. 2067 (build_special_member_call): New method. 2068 (build_baselink): New method. 2069 (build_offset_ref_call_from_tree): Likewise. 2070 (build_call_from_tree): Likewise. 2071 (finish_qualified_call_expr): Remove. 2072 (finish_call_expr): Adjust prototype. 2073 (build_x_function_call): Remove. 2074 * cvt.c (ocp_convert): Use build_special_member_call. 2075 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr. 2076 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and 2077 CALL_EXPR. 2078 (build_offset_ref_call_from_tree): New function. 2079 (build_call_from_tree): Likewise. 2080 * init.c (expand_cleanup): Use build_special_member_call. 2081 (expand_default_init): Likewise. 2082 (build_member_call): Use finish_call_expr. 2083 (build_new_1): Use build_special_member_call. 2084 (push_base_cleanups): Likewise. 2085 * method.c (do_build_assign_ref): Likewise. 2086 * parse.y (template_id): Do not pass a COMPONENT_REF to 2087 lookup_template_function. 2088 (primary): Use parse_finish_call_epxr, not finish_call_expr. 2089 (parse_finish_call_expr): New function. 2090 * pt.c (lookup_template_function): Add assertions. 2091 * search.c (lookup_base): Allow T to be a binfo. 2092 (build_baselink): New function. 2093 (lookup_member): Use it. 2094 * semantics.c (finish_call_expr): Do not do name lookup. 2095 (finish_object_call_expr): Remove #if 0'd code. 2096 (finish_qualified_call_expr): Remove. 2097 * typeck.c (build_x_function_call): Remove. 2098 (build_static_case): Use build_special_member_call. 2099 * typeck2.c (build_functional_cast): Likewise. 2100 21012002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> 2102 2103 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c. 2104 21052002-07-30 Gabriel Dos Reis <gdr@nerim.net> 2106 2107 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion. 2108 21092002-07-30 Nathan Sidwell <nathan@codesourcery.com> 2110 2111 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more 2112 documentation. 2113 21142002-07-29 Alan Modra <amodra@bigpond.net.au> 2115 2116 * cp-tree.h: Comment typo fix. 2117 21182002-07-29 Richard Earnshaw <rearnsha@arm.com> 2119 2120 * spew.c (space_for_token): Allocate zeroed memory for a new token 2121 chunk. 2122 21232002-07-27 Roger Sayle <roger@eyesopen.com> 2124 2125 * decl.c (builtin_function_1): No need to explicitly mark 2126 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn. 2127 21282002-07-27 Roger Sayle <roger@eyesopen.com> 2129 2130 * decl2.c (cxx_decode_option): Support -fno-builtin-foo. 2131 21322002-07-26 Jason Merrill <jason@redhat.com> 2133 2134 * call.c (build_over_call): Likewise. 2135 (cp_convert_parm_for_inlining): New fn. 2136 (convert_for_arg_passing): New fn. 2137 (convert_default_arg, build_over_call): Use it. 2138 (type_passed_as): New fn. 2139 * pt.c (tsubst_decl): Use it. 2140 * decl2.c (cp_build_parm_decl): New fn. 2141 (build_artificial_parm): Use it. 2142 (start_static_storage_duration_function): Likewise. 2143 * decl.c (start_cleanup_fn, grokdeclarater): Likewise. 2144 (grokparms): Don't mess with DECL_ARG_TYPE. 2145 * typeck.c (convert_arguments): Use convert_for_arg_passing. 2146 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): 2147 Define. 2148 * cp-tree.h: Declare new fns. 2149 21502002-07-26 Neil Booth <neil@daikokuya.co.uk> 2151 2152 * cp-tree.h (flag_operator_names): Remove. 2153 * decl2.c (flag_operator_names): Remove. 2154 (lang_f_options): Remove operator-names. 2155 * lex.c (D_OPNAME): Remove. 2156 (reswords): Remove operator names. 2157 (rid_to_yy): Remove operator names. 2158 (init_reswords): No need to handle D_OPNAME. 2159 * spew.c (read_process_identifier): There are no operator 2160 names. 2161 21622002-07-26 Jason Merrill <jason@redhat.com> 2163 2164 * dump.c (cp_dump_tree): Call c_dump_tree. 2165 * Make-lang.in (CXX_C_OBJS): Add c-dump.o. 2166 21672002-07-25 Neil Booth <neil@daikokuya.co.uk> 2168 2169 * error.c (print_whitespace): Remove. 2170 * g++spec.c (LIBUNWIND): Move. 2171 * mangle.c (mangled_position, write_signed_number): Remove. 2172 21732002-07-25 Neil Booth <neil@daikokuya.co.uk> 2174 2175 * decl2.c (cxx_decode_option): Similarly. 2176 21772002-07-25 Gabriel Dos Reis <gdr@nerim.net> 2178 2179 * cp-tree.h (cxx_sizeof_nowarn): Now a macro. 2180 (cxx_sizeof_or_alignof_type): Take a third argument. 2181 (cxx_sizeof): Adjust definition. 2182 (cxx_alignof): Likewise. 2183 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality. 2184 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for 2185 complaining. 2186 (c_sizeof_nowarn): Remove definition. 2187 (build_unary_op): Use cxx_sizeof_nowarn. 2188 21892002-07-24 Geoffrey Keating <geoffk@redhat.com> 2190 2191 * tree.c (cp_build_qualified_type_real): When copying 2192 pointer-to-method types, unshare the record that holds 2193 the cached pointer-to-member-function type. 2194 21952002-07-23 Neil Booth <neil@daikokuya.co.uk> 2196 2197 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove. 2198 21992002-07-23 Gabriel Dos Reis <gdr@nerim.net> 2200 2201 Fix PR/7363: 2202 * typeck.c (cxx_sizeof_or_alignof_type): New function. 2203 (c_sizeof): Remove definition. 2204 (expr_sizeof): Use cxx_sizeof. 2205 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type. 2206 * decl.c (finish_destructor_body): Use cxx_sizeof. 2207 * semantics.c (finish_alignof): Likewise. 2208 (finish_alignof): Use cxx_alignof. 2209 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros. 2210 (cxx_sizeof_or_alignof_type): Declare. 2211 (my_friendly_assert): Move to ../c-common.h. 2212 22132002-07-23 Neil Booth <neil@daikokuya.co.uk> 2214 2215 * class.c, method.c, pt.c, search.c: Don't define obstack macros. 2216 22172002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2218 2219 PR c++/7347, c++/7348 2220 * cp-tree.h (tsubst_flags_t): Add tf_parsing. 2221 * decl.c (make_typename_type): Use it. 2222 (make_unbound_class_template): Likewise. 2223 (lookup_name_real): Don't call type_access_control if scope is 2224 template parameter dependent. 2225 * parse.y (template_arg): Call make_unbound_class_template with 2226 tf_parsing set. 2227 (nest_name_specifier): Call make_typename_type with tf_parsing set. 2228 (typename_sub0): Likewise. 2229 (typename_sub1): Likewise. 2230 (instantiate_decl): Push class scope. 2231 * pt.c (regenerate_decl_from_template): Call pushclass and popclass 2232 for both static variable and member function template. 2233 (instantiate_decl) Call pushclass and popclass when tsubst'ing type 2234 and arguments. 2235 * search.c (type_access_control): Do type access for TEMPLATE_DECL 2236 too. 2237 22382002-07-20 Roger Sayle <roger@eyesopen.com> 2239 2240 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions 2241 test by using positive_option. Make whitespace consistent. 2242 22432002-07-20 Gabriel Dos Reis <gdr@nerim.net> 2244 2245 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno' 2246 members with 'locus'. Adjust use throughout. 2247 (struct feed): Likewise. 2248 (alloc_unparsed_test): Change prototype, take a 'const location_t *'. 2249 Adjust use. 2250 (snarf_defarg): Use error(), not error_with_file_and_line(). 2251 22522002-07-19 Chris Demetriou <cgd@broadcom.com> 2253 2254 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever 2255 cpp_options is included. 2256 22572002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2258 2259 PR c++/2862, c++/2863 2260 * pt.c (determine_specialization): Compare the length of 2261 TYPE_ARG_TYPES. Tidy. 2262 22632002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2264 2265 PR c++/3797 2266 * decl.c (duplicate_decls): Don't propagate inlining parameters from 2267 olddecl to newdecl when newdecl is a specialization of the 2268 instantiation olddecl. 2269 22702002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2271 2272 PR c++/4802, c++/5387 2273 * decl.c (make_typename_type): Use enforce_access. 2274 22752002-07-17 Scott Snyder <snyder@fnal.gov> 2276 2277 PR c++/7320 2278 * rtti.c (get_tinfo_decl): Set DECL_COMDAT. 2279 22802002-07-12 Mark Mitchell <mark@codesourcery.com> 2281 2282 * class.c (add_method): Correct handling of conversion operators. 2283 22842002-07-11 Mark Mitchell <mark@codesourcery.com> 2285 2286 PR c++/7224 2287 * class.c (add_method): Simplify. 2288 22892002-07-11 Jason Merrill <jason@redhat.com> 2290 2291 PR c++/7279 2292 * tree.c (cp_copy_res_decl_for_inlining): Also copy 2293 TREE_ADDRESSABLE. 2294 22952002-07-10 Graham Stott <graham.stott@btinternet.com> 2296 2297 * pt.c (template_parm_this_level_p, push_template_decl_real): 2298 Pass depth as int pointer. 2299 23002002-07-11 Tim Josling <tej@melbpc.org.au> 2301 2302 Remove front end hard coding from gengtype.c. 2303 2304 * config-lang.in (gtfiles): Add files needed for this front end. 2305 23062002-07-10 Mark Mitchell <mark@codesourcery.com> 2307 2308 * cp-tree.h (unqualified_name_lookup_error): Declare it. 2309 (begin_function_definition): Adjust prototype. 2310 * lex.c (unqualified_name_lookup_error): New function, split out 2311 from ... 2312 (do_identifier): ... here. 2313 * parse.y (parse_begin_function_definition): New function. 2314 (fn.def1): Use it. 2315 * semantics.c (begin_function_definition): Accept decl-specifiers 2316 and attributes as separate parameters. 2317 23182002-07-10 Jason Merrill <jason@redhat.com> 2319 2320 PR c++/6255 2321 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than 2322 modifying the old one. 2323 23242002-07-09 Mark Mitchell <mark@codesourcery.com> 2325 2326 * cp-tree.h (constructor_name_p): Declare it. 2327 (check_template_template_default_arg): Likewise. 2328 * class.c (handle_using_decl): Use constructor_name_p. 2329 * decl.c (grokdeclarator): Likewise. 2330 * decl2.c (constructor_name_p): Define it. 2331 * init.c (build_member_call): Use constructor_name_p. 2332 * parse.y (template_parm): Use check_template_template_default_arg. 2333 * pt.c (check_explicit_specialization): Use constructor_name_p. 2334 * semantics.c (check_template_template_default_arg): New function. 2335 23362002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2337 2338 * pt.c (can_complete_type_without_circularity): Add static to 2339 function definition. 2340 23412002-07-08 Mark Mitchell <mark@codesourcery.com> 2342 2343 * cp-tree.h (have_extern_spec): Declare it 2344 * decl.c (have_extern_spec): Define it. 2345 (start_decl): Eliminate use of used_extern_spec. 2346 (start_function): Likewise. 2347 * parse.y (have_extern_spec): Remove declaration. 2348 (used_extern_spec): Likewise. 2349 (frob_specs): Eliminate use of used_extern_spec. 2350 (.hush_warning): Likewise. 2351 23522002-07-07 Mark Mitchell <mark@codesourcery.com> 2353 2354 * Make-lang.in (cp/parse.o): Depend on decl.h. 2355 * cp-tree.h (do_decl_instantiation): Change prototype. 2356 * parse.y: Include decl.h. 2357 (parse_decl_instantiation): New function. 2358 (explicit_instantiation): Use it. 2359 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR 2360 and DECLSPECS. 2361 23622002-07-07 Roger Sayle <roger@eyesopen.com> 2363 2364 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for 2365 constructor and destructor tests when passed a TEMPLATE_DECL. 2366 23672002-07-05 Jason Merrill <jason@redhat.com> 2368 2369 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null 2370 pointers. 2371 2372 PR optimization/7145 2373 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL. 2374 23752002-07-05 Nathan Sidwell <nathan@codesourcery.com> 2376 2377 Repair damage on weak-impared targets caused by my previous patch. 2378 * cp-tree.h (import_export_tinfo): Add parameter. 2379 * decl2.c (import_export_tinfo): Add parameter, post adjust 2380 DECL_COMDAT. 2381 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by 2382 import_export_tinfo. 2383 23842002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2385 2386 PR c++/6944 2387 * init.c (build_aggr_init): Remove qualifiers of init before calling 2388 build_vec_init. 2389 (build_vec_init): Flatten multi-dimensional array during cleanup. 2390 (build_vec_delete_1): Abort if the type of each element is array. 2391 23922002-07-03 Graham Stott <graham.stott@btinternet.com> 2393 2394 * pt.c (instantiate_class_template): Fix typo. 2395 23962002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2397 2398 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused 2399 by CVS conflict in my last patch. 2400 24012002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2402 2403 PR c++/6716 2404 * pt.c (can_complete_type_without_circularity): New function. 2405 (instantiate_class_template): Use it. 2406 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error 2407 message due to incomplete fields. 2408 24092002-07-01 Mark Mitchell <mark@codesourcery.com> 2410 2411 PR c++/7112 2412 * mangle.c (write_expression): Add mangling for sizeof when 2413 applied to a type. 2414 * operators.def: Remove stale comment. 2415 24162002-06-30 Nathan Sidwell <nathan@codesourcery.com> 2417 2418 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ... 2419 (CPTI_TYPE_INFO_PTR_TYPE): ... this. 2420 (tinfo_decl_type): Replace with ... 2421 (type_info_ptr_type): ... this. 2422 (import_export_tinfo): Declare. 2423 (tinfo_decl_p): Rename to ... 2424 (unemitted_tinfo_decl_p): ... this. 2425 * decl2.c (import_export_decl): Break out tinfo handling into ... 2426 (import_export_tinfo): ... here. New function. 2427 (finish_file): Adjust. 2428 * rtti.c (TINFO_REAL_NAME): New macro. 2429 (init_rtti_processing): Create the tinfo types. 2430 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr. 2431 (get_tinfo_decl): Adjust. 2432 (get_tinfo_ptr): New function. 2433 (get_type_id): Use it. 2434 (tinfo_base_init): Create vtable decl here, if it doesn't exist. 2435 (ptr_initializer): Use get_tinfo_ptr. 2436 (ptm_initializer): Likewise. 2437 (synthesize_tinfo_var): Break into ... 2438 (get_pseudo_ti_init): ... this. Just create the initializer. 2439 (get_pseudo_ti_desc): .. and this. 2440 (create_real_tinfo_var): Remove. 2441 (create_pseudo_type_info): Don't create the vtable decl here. 2442 (get_vmi_pseudo_type_info): Remove. 2443 (create_tinfo_types): Adjust. 2444 (tinfo_decl_p): Rename to ... 2445 (unemitted_tinfo_decl_p): ... here. Adjust. 2446 (emit_tinfo_decl): Adjust. Create the initializer. 2447 24482002-06-27 Mark Mitchell <mark@codesourcery.com> 2449 2450 PR c++/6695 2451 * pt.c (tsubst_friend_class): Substitute into the context of the 2452 friend before using it. 2453 24542002-06-26 Mark Mitchell <mark@codesourcery.com> 2455 2456 * cp-tree.h (xref_tag): Change prototype. 2457 (handle_class_head): Likewise. 2458 (build_x_component_ref): Likewise. 2459 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag. 2460 (xref_tag): Take attributes as a separate parameter. 2461 (xref_tag_from_type): Adjust call to xref_tag. 2462 * decl2.c (build_expr_from_tree): Adjust call to 2463 build_x_component_ref. 2464 (handle_class_head): Take attributes as a separate parameter. 2465 * parse.y (parse_xref_tag): New function. 2466 (parse_handle_class_head): Likewise. 2467 (primary): Use parse_xref_tag. 2468 (class_head_decl): Use parse_handle_class_head. 2469 (class_head_defn): Likewise. 2470 * rtti.c (init_rtti_processing): Adjust call to xref_tag. 2471 (build_dynamic_cast_1): Likewise. 2472 (create_pseudo_type_info): Likewise. 2473 (emit_support_tinfos): Likewise. 2474 * typeck.c (build_object_ref): Adjust call to 2475 build_x_component_ref. 2476 (build_x_component_ref): Remove protect parameter. 2477 24782002-06-25 Mark Mitchell <mark@codesourcery.com> 2479 2480 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS. 2481 * class.c (handle_using_decl): Likewise. 2482 (instantiate_type): Likewise. 2483 * cp-tree.h (BASELINK_FUNCTIONS): New macro. 2484 (xref_basetypes): Change prototype. 2485 (begin_mem_initializers): New function. 2486 (get_overloaded_fn): Likewise. 2487 * decl.c (xref_basetypes): Simplify. 2488 * error.c (dump_expr): Use BASELINK_FUNCTIONS. 2489 * init.c (build_offset_ref): Likewise. 2490 * parse.y (base_init): Use begin_mem_initializers(). 2491 (structsp): Adjust call to xref_basetypes. 2492 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS. 2493 (instantiate_class_template): Adjust call to xref_basetypes. 2494 * semantics.c (begin_mem_initializers): New function. 2495 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS. 2496 (really_overloaded_fn): Likewise. 2497 (get_overloaded_fn): New function.' 2498 (get_first_fn): USe BASELINK_FUNCTIONS. 2499 25002002-06-24 Mark Mitchell <mark@codesourcery.com> 2501 2502 * cp-tree.h (SCALAR_TYPE_P): New macro. 2503 (check_for_out_of_scope_variable): New function. 2504 (at_class_scope_p): Likewise. 2505 (finish_fname): Likewise. 2506 * class.c (finish_struct): Use at_function_scope_p. 2507 * decl.c (check_for_out_of_scope_variable): New function, split 2508 out from do_identifier. 2509 (finish_enum): Use at_function_scope_p. 2510 * lex.c (do_identifier): Use check_for_out_of_scope_variable. 2511 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname. 2512 (primary): Use at_function_scope_p. 2513 * search.c (at_class_scope_p): New function. 2514 * semantics.c (finish_fname): Likewise. 2515 (check_multiple_declarators): Use at_function_scope_p. 2516 25172002-06-23 Mark Mitchell <mark@codesourcery.com> 2518 2519 * parse.y (parse_scoped_id): New function. 2520 (primary): Use it. 2521 * cp-tree.h (do_scoped_id): Adjust declaration. 2522 * lex.c (do_scoped_id): Remove call to yylex. 2523 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id. 2524 * typeck2.c (add_exception_specifier): Use tree_cons, rather than 2525 expanding it inline. 2526 25272002-06-23 Matt Thomas <matt@3am-software.com> 2528 2529 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to 2530 "#if VMS_TARGET". 2531 25322002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2533 2534 * mangle.c (integer_type_codes): Const-ify. 2535 25362002-06-20 Richard Henderson <rth@redhat.com> 2537 2538 PR c++/6747 2539 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early. 2540 Call put_var_into_stack. 2541 25422002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2543 2544 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit 2545 array size calculation. 2546 25472002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2548 2549 PR c++/6892 2550 * pt.c (tsubst_expr): Handle FILE_STMT. 2551 25522002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2553 2554 PR c++/6723 2555 * pt.c (lookup_template_class): Don't build complete argument of 2556 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template 2557 argument. 2558 25592002-06-19 Akim Demaille <akim@epita.fr> 2560 2561 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with 2562 decl.h's TYPENAME. 2563 * spew.c, lex.c: Adjust. 2564 * parse.y (explicit_instantiation): Add empty action to override 2565 the default $$ = $1 where it introduces a type clash. 2566 25672002-06-14 Jason Merrill <jason@redhat.com> 2568 2569 * semantics.c (begin_for_stmt): Push the 'for' scope before 2570 adding the FOR_STMT. 2571 2572 C++ ABI changes. 2573 * class.c (build_base_field): Set DECL_PACKED. 2574 (layout_class_type): Don't use tail padding of PODs. 2575 * mangle.c (write_unqualified_name): Fix template conversion op 2576 mangling. 2577 25782002-06-16 Richard Henderson <rth@redhat.com> 2579 2580 PR opt/6793 2581 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test 2582 after template instantiation. 2583 25842002-06-16 Richard Henderson <rth@redhat.com> 2585 2586 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common. 2587 25882002-06-15 Gabriel Dos Reis <gdr@codesourcery.com> 2589 2590 * cp-tree.h (compiler_error): Remove declaration. 2591 * lex.c (compiler_error): Remove definition. 2592 25932002-06-14 Steve Ellcey <sje@cup.hp.com> 2594 2595 * g++spec.c (LIBUNWIND): New. 2596 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set. 2597 25982002-06-13 Jessica Han <jessica@cup.hp.com> 2599 2600 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN. 2601 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE. 2602 (build_vbase_offset_vtbl_entries): Likewise. 2603 * rtti.c (build_headof): Likewise. 2604 (get_tinfo_decl_dynamic): Likewise. 2605 (create_pseudo_type_info): Likewise. 2606 26072002-06-12 Stan Shebs <shebs@apple.com> 2608 2609 * mpw-config.in: Remove file, no longer used. 2610 * mpw-make.sed: Ditto. 2611 26122002-06-07 Zack Weinberg <zack@codesourcery.com> 2613 2614 * decl2.c: Update call to cpp_handle_option. 2615 26162002-06-07 H.J. Lu (hjl@gnu.org) 2617 2618 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT. 2619 26202002-06-06 Gabriel Dos Reis <gdr@codesourcery.com> 2621 2622 * error.c (cp_error_at): Fix typo. 2623 26242002-06-04 Gabriel Dos Reis <gdr@codesourcery.com> 2625 2626 * error.c (cp_diagnostic_starter): Adjust call. 2627 (maybe_print_instantiation_context): Change prototype to take a 2628 'diagnostic_info *'. 2629 (print_instantiation_full_context): Likewise. 2630 (print_instantiation_partial_context): Likewise. 2631 (cp_diagnostic_starter): Likewise. 2632 (cp_diagnostic_finalizer): Likewise. 2633 (cp_print_error_function): Likewise. 2634 (cp_printer): Take a secondary parameter as a 'text_info *'. 2635 Remove output_state savings. Adjust calls. 2636 26372002-06-03 Geoffrey Keating <geoffk@redhat.com> 2638 2639 * pt.c (inline_parm_levels): Mark for GC. 2640 2641 * mangle.c (start_mangling): Allocate G.substitutions here... 2642 (init_mangle): ... rather than here. 2643 (finish_mangling): Clear the varray pointer when done with it. 2644 * spew.c (yylexstring): Don't use VARRAY_FREE. 2645 * search.c (bfs_walk): Don't use VARRAY_FREE. 2646 * decl2.c (pending_statics): Use gengtype to mark. 2647 (deferred_fns): Likewise. 2648 (ssdf_decls): Likewise. 2649 (init_decl2): Delete. 2650 * decl.c (pop_from_top_level): Don't use VARRAY_FREE. 2651 (cxx_init_decl_processing): Don't call init_decl2. 2652 (cxx_pop_function_context): Don't use VARRAY_FREE. 2653 * cp-tree.h (struct saved_scope): No need for special marking 2654 of varrays. 2655 (struct language_function): Likewise. 2656 (local_classes): Use gengtype to mark. 2657 (init_decl2): Delete prototype. 2658 * class.c (init_class_processing): Don't use 2659 ggc_add_tree_varray_root. 2660 (build_vtbl_initializer): Don't use VARRAY_FREE. 2661 2662 * decl.c (typename_compare): Don't use same_type_p. 2663 2664 * decl.c: Include hashtab.h instead of hash.h. 2665 (typename_hash): Update to use htab_h. 2666 (typename_compare): Likewise. 2667 (typename_htab): Use gengtype to mark. 2668 (build_typename_type): Update to use htab_h. 2669 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h. 2670 2671 * Make-lang.in (gt-cp-tree.h): New rule. 2672 (cp/tree.o): Depend on gt-cp-tree.h. 2673 * config-lang.in (gtfiles): Add cp/tree.c. 2674 * tree.c: Include gt-cp-tree.h. 2675 (list_hash_table): Use gengtype to mark. 2676 (init_tree): Use gengtype to mark trees. 2677 2678 * Make-lang.in (cp/decl.o): Add debug.h dependency. 2679 * call.c (struct z_candidate): Use gengtype. 2680 (USER_CONV_CAND): Use WRAPPER_ZC. 2681 (convert_class_to_reference): Use build_zc_wrapper. 2682 (build_type_conversion_1): Likewise. 2683 (build_over_call): Use WRAPPER_ZC. 2684 (add_warning): Use build_zc_wrapper. 2685 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete. 2686 * cp-tree.h (struct lang_identifier): Use gengtype. 2687 (struct template_parm_index_s): Likewise. 2688 (struct ptrmem_cst): Likewise. 2689 (struct tree_binding): Likewise. 2690 (struct tree_overload): Likewise. 2691 (struct tree_srcloc): Likewise. 2692 (struct tree_wrapper): Likewise. Also modify to have a pointer 2693 to struct z_candidate rather than void. 2694 (enum cp_tree_node_structure_enum): New. 2695 (union lang_tree_node): New. 2696 (cxx_mark_tree): Delete prototype. 2697 (cp_tree_node_structure): New prototype. 2698 (build_ptr_wrapper): Delete prototype. 2699 (build_int_wrapper): Delete prototype. 2700 (build_zc_wrapper): New prototype. 2701 * decl.c: Include debug.h 2702 (cxx_mark_tree): Delete. 2703 (cp_tree_node_structure): New. 2704 * tree.c (build_ptr_wrapper): Delete. 2705 (build_int_wrapper): Delete. 2706 (build_zc_wrapper): New. 2707 2708 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK): 2709 Correct typo. Patch from k_fukui@highway.ne.jp. 2710 2711 * semantics.c (current_stmt_tree): Update for change to 2712 struct language_function. 2713 (finish_mem_initializers): Likewise. 2714 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status. 2715 * cp-tree.h (struct language_function): Rename from 2716 cp_language_function. Change all uses. 2717 (cp_function_chain): Don't need to cast. 2718 2719 * class.c (duplicate_tag_error): Reset discriminator. 2720 (check_bases_and_members): Update for data structure changes. 2721 * cp-tree.h (struct lang_id2): Use gengtype. 2722 (flagged_type_tree): Likewise. 2723 (SET_LANG_ID): Use GGC on struct lang_id2. 2724 (struct cp_language_function): Use gengtype. Remove field 2725 'x_vcalls_possible_p'. 2726 (current_vcalls_possible_p): Delete. 2727 (struct lang_type_header): New. 2728 (struct lang_type_class): Rename from struct lang_type. Include 2729 struct lang_type_header. 2730 (struct lang_type_ptrmem): New. 2731 (struct lang_type): New. 2732 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros. 2733 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros. 2734 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes. 2735 (struct lang_decl_flags): Use gengtype. Add discriminators. 2736 (struct lang_decl): Use gengtype. Add and use discriminators. 2737 Update the macros that reference moved fields. 2738 (LANG_DECL_U2_CHECK): New function. Use it when appropriate. 2739 (SET_DECL_THUNK_P): Set discriminator too. 2740 (clear_inline_text_obstack): Delete prototype. 2741 (finish_inline_definitions): Delete prototype. 2742 (mark_pending_inlines): Delete prototype. 2743 (lang_check_failed): New prototype. 2744 * decl.c (struct named_label_use_list): Use gengtype. 2745 (struct named_label_list): Likewise. 2746 (mark_binding_level): Delete. 2747 (mark_named_label_lists): Delete. 2748 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC. 2749 (cxx_init_decl_processing): Use generated marker routine. 2750 (begin_destructor_body): Delete dead set to 2751 current_vcalls_possible_p. 2752 (mark_lang_function): Delete. 2753 (mark_cp_function_context): Delete. 2754 (lang_mark_tree): Use generated marker routines. 2755 * decl2.c (start_objects): Set discriminator when setting 2756 GLOBAL_INIT_PRIORITY. 2757 * lex.c (retrofit_lang_decl): Set discriminators. 2758 (copy_lang_type): Update for changes to lang_type structure. 2759 (cp_make_lang_type): Set discriminator. 2760 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers. 2761 * search.c: Include ggc.h. 2762 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it. 2763 (finish_inline_definitions): Delete. 2764 * spew.c (struct token): Use gengtype. 2765 (struct token_chunk): New. 2766 (struct unparsed_text): Use gengtype. Store tokens in chunks. 2767 (struct feed): Use gengtype. 2768 (feed_obstack): Delete. 2769 (feed): Mark as GC root. 2770 (pending_inlines): Mark as GC root. 2771 (pending_inlines_tail): Likewise. 2772 (processing_these_inlines): Likewise. 2773 (token_obstack): Make static. 2774 (first_token): Likewise. 2775 (init_spew): Don't initialize deleted things; use gengtype for roots. 2776 (clear_inline_text_obstack): Delete. 2777 (feed_input): Use GC for struct feed. Update for changes to 2778 struct unparsed_text. 2779 (mark_pending_inlines): Delete. 2780 (next_token): Rename from add_token. Change all callers. Update 2781 for changes to struct unparsed_text. 2782 (space_for_token): New. 2783 (remove_last_token): New. 2784 (alloc_unparsed_text): New. 2785 (snarf_block): Take an unparsed_text. Update for changes to struct 2786 unparsed_text. 2787 (snarf_method): Update for changes to struct unparsed_text. 2788 (snarf_defarg): Update for changes to struct unparsed_text. 2789 * tree.c (lang_check_failed): New. 2790 2791 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h 2792 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules. 2793 (cp/spew.o): Add dependency on gt-<filename>.h. 2794 (cp/decl2.o): Add dependency on gt-<filename>.h. 2795 (cp/call.o): Add dependency on gt-<filename>.h. 2796 (cp/pt.o): Add dependency on gt-<filename>.h. 2797 (cp/repo.o): Add dependency on gt-<filename>.h. 2798 (cp/parse.o): Add dependency on gt-<filename>.h. 2799 * call.c: Use gengtype for roots. 2800 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c 2801 decl2.c parse.y pt.c repo.c spew.c. 2802 * cp-tree.h: Use gengtype for roots. 2803 (struct saved_scope): Use GGC, gengtype. 2804 (cp_parse_init): Delete prototype. 2805 (init_pt): Delete prototype. 2806 * decl.c: Use gengtype for roots. 2807 (mark_saved_scope): Delete. 2808 (cxx_init_decl_processing): Don't call deleted initilisation 2809 routines. 2810 (signed_size_zero_node): Delete, unused. 2811 * decl.h: Use gengtype for roots. 2812 * decl2.c: Use gengtype for roots. 2813 * lex.h: Use gengtype for roots. 2814 * parse.y: Use gengtype for roots. 2815 (cp_parse_init): Delete. 2816 * pt.c: Use gengtype for roots. 2817 (init_pt): Delete. 2818 * repo.c: Use gengtype for roots. 2819 * spew.c: Use gengtype for roots. 2820 2821 * Make-lang.in: Allow for filename changes. Add gtype-cp.h. 2822 (cp/decl.o): Add dependency on gtype-cp.h. 2823 * decl.c: Remove use of add_deletable_root, use GTY marker instead. 2824 Include gtype-cp.h. Allow for filename changes. 2825 2826 * Make-lang.in (cp/gt-decl.h): Generate using gengtype. 2827 (cp/decl.o): Add cp/gt-decl.h dependency. 2828 * config-lang.in (gtfiles): New. 2829 * tree.h: Rename struct binding_level to struct cp_binding_level. 2830 * decl.c: Rename struct binding_level to struct cp_binding_level. 2831 Include cp/gt-decl.h. 2832 (struct cp_binding_level): Use gengtype. 2833 (make_binding_level): Use GGC on struct cp_binding_level. 2834 (mark_binding_level): Use gt_ggc_m_cp_binding_level. 2835 (cxx_init_decl_processing): Mark free_binding_level as 2836 deletable. 2837 2838 * decl.c (mark_cp_function_context): Update calling sequence. 2839 2840 * decl.c (start_function): Don't free 'struct 2841 cp_language_function'. 2842 (pop_cp_function_context): Likewise. 2843 (save_function_data): Allocate it using GC. 2844 * semantics.c (genrtl_start_function): Don't free 'struct 2845 cp_language_function'. 2846 28472002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk> 2848 2849 * lang-specs.h: Use cpp_debug_options. 2850 28512002-05-28 Zack Weinberg <zack@codesourcery.com> 2852 2853 * mangle.c, tree.c: Include real.h. 2854 * Make-lang.in: Update dependency lists. 2855 28562002-05-25 Neil Booth <neil@daikokuya.demon.co.uk> 2857 2858 * lex.c: Don't include c-lex.h. 2859 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h. 2860 28612002-05-23 Neil Booth <neil@daikokuya.demon.co.uk> 2862 2863 * spew.c (yyungetc, snarf_block): Remove indent_level handling. 2864 28652002-05-22 Richard Henderson <rth@redhat.com> 2866 2867 * decl.c (obscure_complex_init): Check for VAR_DECL 2868 before using DECL_THREAD_LOCAL. 2869 28702002-05-22 Richard Henderson <rth@redhat.com> 2871 2872 * decl.c (check_tag_decl): Handle RID_THREAD. 2873 (obscure_complex_init): Reject run-time init of tls. 2874 (grokvardecl, grokdeclarator): Handle RID_THREAD. 2875 * lex.c (reswords): Add __thread. 2876 (rid_to_yy): Map RID_THREAD to SCSPEC. 2877 28782002-05-22 Neil Booth <neil@daikokuya.demon.co.uk> 2879 2880 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. 2881 * cp-tree.h (cxx_post_options): Kill. 2882 * cp-lex.c (cxx_post_options): Kill. 2883 28842002-05-21 Richard Henderson <rth@redhat.com> 2885 2886 * lex.c (rid_to_yy): Add RID_THREAD. 2887 28882002-05-21 Alexandre Oliva <aoliva@redhat.com> 2889 2890 * init.c (build_vec_init): Test for trivial copy-assignment when 2891 copy-assigning arrays. 2892 28932002-05-20 Andreas Jaeger <aj@suse.de> 2894 2895 * init.c (build_default_init): Remove unused variable. 2896 28972002-05-20 Alexandre Oliva <aoliva@redhat.com> 2898 2899 * call.c (any_strictly_viable): New. 2900 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs. 2901 29022002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2903 2904 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing. 2905 29062002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2907 2908 PR c++/186, DR 259 2909 * pt.c (do_decl_instantiation): Don't complain explicit 2910 instantiation after explicit specialization. 2911 (do_type_instantiation): Likewise. 2912 29132002-05-19 Alexandre Oliva <aoliva@redhat.com> 2914 2915 * cp-tree.h (complete_type_or_diagnostic): Changed prototype, 2916 renamed from... 2917 (complete_type_or_else): ... this. Redefined as macro. 2918 (cxx_incomplete_type_diagnostic): Declare. 2919 (cxx_incomplete_type_error): Define as macro. 2920 * init.c (build_delete): Warn about incomplete types other than 2921 void, and use the built-in operator delete for them. 2922 * typeck.c (complete_type_or_diagnostic): Renamed from 2923 complete_type_or_else. Added warn_only argument, passed to... 2924 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print 2925 warnings or errors depending on new warn_only argument. Renamed 2926 from... 2927 (cxx_incomplete_type_error): ... this. New implementation in 2928 terms of cxx_incomplete_type_diagnostic. 2929 29302002-05-18 Jason Merrill <jason@redhat.com> 2931 2932 PR c++/6611 2933 * decl2.c (import_export_decl): If we clear 2934 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set. 2935 29362002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2937 2938 PR c++/6620 2939 * pt.c (verify_class_unification): Don't check if PARM is template 2940 parameter dependent. Simplify. 2941 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template 2942 parameter dependent expression. 2943 29442002-05-14 Jason Merrill <jason@redhat.com> 2945 2946 * rtti.c (get_tinfo_decl): Don't call comdat_linkage. 2947 Do set DECL_COMDAT. 2948 (synthesize_tinfo_var): Take the public decl. 2949 (create_real_tinfo_var): Likewise. Check DECL_COMDAT. 2950 (emit_tinfo_decl): Adjust. Call import_export_decl. 2951 * decl2.c (import_export_decl): Simplify tinfo decl handling. 2952 29532002-05-14 Alexandre Oliva <aoliva@redhat.com> 2954 2955 * cp-tree.h (struct lang_type): Added non_zero_init. 2956 (CLASSTYPE_NON_ZERO_INIT_P): New macro. 2957 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare. 2958 * class.c (check_field_decls): Test non_zero_init. 2959 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for 2960 zero-to-NULL conversions. 2961 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a 2962 type that needs zero-initialization without zeros. 2963 (check_initializer_decl): Compute zero-initializer for types 2964 that require a non-trivial one. 2965 * init.c (build_forced_zero_init): New function. 2966 (build_default_init): Use it. 2967 * tree.c (zero_init_p): New function. 2968 * typeck2.c (force_store_init_value): New function. 2969 (process_init_constructor): Create non-trivial zero-initializers 2970 for array members and class fields. 2971 29722002-05-14 Neil Booth <neil@daikokuya.demon.co.uk> 2973 2974 * lang-specs.h: Remove redundant -lang-c++. 2975 29762002-05-13 Jason Merrill <jason@redhat.com> 2977 2978 * class.c (build_vtbl_ref_1): Use fixed_type_or_null. 2979 (fixed_type_or_null): See through reference vars. 2980 (build_base_path): Vtable contents are constant. 2981 * typeck.c (get_member_function_from_ptrfunc): Likewise. 2982 29832002-05-12 Jason Merrill <jason@redhat.com> 2984 2985 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created 2986 structs are safe. 2987 29882002-05-09 Neil Booth <neil@daikokuya.demon.co.uk> 2989 2990 * cp-tree.h (flag_ansi): Remove. 2991 * decl2.c (flag_ansi): Remove. 2992 (cxx_decode_option): Set flag_iso and flag_undef. 2993 29942002-05-09 Jason Merrill <jason@redhat.com> 2995 2996 * typeck.c (get_member_function_from_ptrfunc): Reorganize. 2997 Use subtraction rather than a bitmask to get the index. 2998 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node. 2999 3000 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P. 3001 30022002-05-07 Neil Booth <neil@daikokuya.demon.co.uk> 3003 3004 * Make-lang.in (decl2.o): Update. 3005 * cp-tree.h (warn_multichar): Remove. 3006 * decl2.c: Include c-common.h. 3007 (warn_multichar): Remove. 3008 30092002-05-03 Jason Merrill <jason@redhat.com> 3010 3011 * tree.c (build_cplus_array_type): Only const and volatile get 3012 special handling. 3013 3014 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h. 3015 30162002-04-30 Mark Mitchell <mark@codesourcery.com> 3017 3018 ABI change, returning simple classes from functions. 3019 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if 3020 TYPE_HAS_TRIVIAL_INIT_REF is false or 3021 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true. 3022 30232002-04-30 Jason Merrill <jason@redhat.com> 3024 3025 PR debug/6436 3026 * decl.c (grokdeclarator): Don't override TYPE_NAME of an 3027 anonymous class with a typedef if there are attributes. 3028 30292002-04-29 Paul Eggert <eggert@twinsun.com> 3030 3031 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$. 3032 30332002-04-29 Jakub Jelinek <jakub@redhat.com> 3034 3035 PR c++/6477 3036 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is 3037 non-NULL first. 3038 30392002-04-29 Mark Mitchell <mark@codesourcery.com> 3040 3041 PR c++/6492 3042 * pt.c (tsubst_friend_class): If the friend has an explicit scope, 3043 enter that scope before name lookup. 3044 3045 PR c++/6486 3046 * method.c (do_build_copy_constructor): Avoid building 3047 cv-qualified reference types. 3048 30492002-04-29 Nathan Sidwell <nathan@codesourcery.com> 3050 3051 PR c++/5719 3052 * decl.c (grok_op_properties): Assignment ops don't have to return 3053 by value. operator% should. 3054 30552002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> 3056 3057 PR c/6343 3058 * decl.c (duplicate_decls): Call merge_weak. 3059 30602002-04-26 Richard Henderson <rth@redhat.com> 3061 3062 * parse.y (malloced_yyss, malloced_yyvs): New. 3063 (yyoverflow): Re-add. Set them. 3064 (free_parser_stacks): New. 3065 30662002-04-26 Mark Mitchell <mark@codesourcery.com> 3067 3068 PR c++/6497 3069 * method.c (do_build_assign_ref): Pass a derivation to 3070 build_method_call when calling base class assignment operators. 3071 30722002-04-26 Richard Henderson <rth@redhat.com> 3073 3074 * parse.y (yyoverflow): Revert. 3075 30762002-04-26 Richard Henderson <rth@redhat.com> 3077 3078 PR c/3581 3079 * parse.y (string): Remove. Update all uses to use STRING 3080 instead, and not call combine_strings. 3081 * rtti.c (tinfo_name): Use fix_string_type. 3082 * semantics.c (finish_asm_stmt): Don't call combine_strings. 3083 * spew.c (yylexstring): New. 3084 (read_token): Use it. 3085 30862002-04-25 Richard Henderson <rth@redhat.com> 3087 3088 PR c/2161 3089 * parse.y (yyoverflow): New. 3090 30912002-04-25 Jason Merrill <jason@redhat.com> 3092 3093 PR c++/5607 3094 * search.c (check_final_overrider): No longer static. 3095 * class.c (update_vtable_entry_for_fn): Call it. 3096 * cp-tree.h: Adjust. 3097 30982002-04-25 Neil Booth <neil@daikokuya.demon.co.uk> 3099 3100 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. 3101 * cp-tree.h (cxx_set_yydebug): Die. 3102 * lex.c (YYDEBUG): Get from c-lex.h. 3103 (cxx_set_yydebug): Remove. 3104 * parse.y: Include c-lex.h. 3105 (YYDEBUG): Get from c-lex.h. 3106 31072002-04-24 Mark Mitchell <mark@codesourcery.com> 3108 3109 PR c++/6438. 3110 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs 3111 void. 3112 31132002-04-24 Neil Booth <neil@daikokuya.demon.co.uk> 3114 3115 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, 3116 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE): 3117 Redefine. 3118 * cp-tree.h (cp_attribute_table): Rename. 3119 * decl.c (lang_attribute_table): Remove declaration. 3120 (cxx_init_decl_processing): Don't set it. 3121 * tree.c (cp_attribute_table): Rename. 3122 31232002-04-24 Jason Merrill <jason@redhat.com> 3124 3125 PR c++/6331 3126 * method.c (do_build_copy_constructor): Use cp_build_qualified_type. 3127 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals. 3128 The pedwarn for array assignment is now unconditional. 3129 * tree.c (build_cplus_array_type_1): Still process simple array types 3130 normally in templates. 3131 3132 PR c++/6395 3133 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i 3134 stuff for comdats. 3135 31362002-04-23 Jakub Jelinek <jakub@redhat.com> 3137 3138 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class 3139 node with attributes. 3140 31412002-2-23 David O'Brien <obrien@FreeBSD.org> 3142 3143 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add. 3144 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given. 3145 31462002-04-23 Mark Mitchell <mark@codesourcery.com> 3147 3148 PR c++/6256: 3149 * pt.c (tsubst_friend_class): Handle templates with explicit 3150 nested names. 3151 3152 PR c++/6331: 3153 * typeck.c (merge_types): Remember the cv-qualification of pointer 3154 types when merging them. 3155 31562002-04-20 Neil Booth <neil@daikokuya.demon.co.uk> 3157 3158 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT, 3159 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine. 3160 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context, 3161 cxx_mark_function_context): New. 3162 * decl.c (push_cp_function_context, pop_cp_function_context, 3163 mark_cp_function_context): Rename for consistency. 3164 (cxx_init_decl_processing): Don't set old hooks. 3165 31662002-04-19 Neil Booth <neil@daikokuya.demon.co.uk> 3167 3168 * call.c (convert_type_from_ellipsis): Rename, update. 3169 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine. 3170 * cp-tree.h (convert_type_from_ellipsis): Rename. 3171 * decl.c (cxx_init_decl_processing): Don't set hook. 3172 31732002-04-18 Neil Booth <neil@daikokuya.demon.co.uk> 3174 3175 * call.c (build_new_method_call): Update. 3176 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine. 3177 * cp-tree.h (cxx_incomplete_type_error): New. 3178 * decl.c (grokdeclarator, grokparms): Update. 3179 * decl2.c (check_classfn): Update. 3180 * pt.c (tsubst): Update. 3181 * typeck.c (complete_type_or_else, expr_sizeof, 3182 decay_conversion): Update. 3183 * typeck2.c (incomplete_type_error): Rename. 3184 (add_exception_specifier): Update. 3185 31862002-04-18 Jason Merrill <jason@redhat.com> 3187 3188 PR c++/5658 3189 * search.c (setup_class_bindings): A class template qualifies as a 3190 type binding. 3191 31922002-04-17 Jakub Jelinek <jakub@redhat.com> 3193 3194 PR c++/6316 3195 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop 3196 before expanding. 3197 31982002-04-16 Mark Mitchell <mark@codesourcery.com> 3199 3200 * init.c (begin_init_stmts): Remove commented out code. 3201 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE. 3202 * semantics.c (begin_gobal_stmt_expr): Adjust call to 3203 expand_start_stmt_expr. 3204 32052002-04-15 Mark Mitchell <mark@codesourcery.com> 3206 3207 * decl.c (register_dtor_fn): Pass the address of dso_handle, not 3208 dso_handle itself, to __cxa_atexit. 3209 32102002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 3211 3212 * error.c (cxx_print_error_function): Adjust call to macros. 3213 32142002-04-14 Jakub Jelinek <jakub@redhat.com> 3215 3216 * class.c (layout_virtual_bases): Do all dsize computation on trees. 3217 32182002-04-14 Jason Merrill <jason@redhat.com> 3219 3220 * typeck.c (get_member_function_from_ptrfunc): Don't do 3221 gratuitious division and multiplication on 3222 ptrmemfunc_vbit_in_delta targets. 3223 32242002-04-12 Mark Mitchell <mark@codesourcery.com> 3225 3226 PR c++/5373. 3227 * semantics.c (finish_expr_stmt): Remember the type of the 3228 expression before any conversions are performed. 3229 32302002-04-12 Mark Mitchell <mark@codesourcery.com> 3231 3232 PR c++/5189. 3233 * call.c (add_template_candidate_real): Do not treat member 3234 templates as copy constructors. 3235 32362002-04-12 Mark Mitchell <mark@codesourcery.com> 3237 3238 * decl.c (duplicate_decls): Do not copy the RTL for a variable 3239 declaration if the old variable had an incomplete type and the new 3240 variable does not. 3241 (complete_vars): Do not call layout_decl for completed variables. 3242 32432002-04-12 Richard Sandiford <rsandifo@redhat.com> 3244 3245 * decl.c (duplicate_decls): Don't try to unify an implicit typedef 3246 with an explicit one. 3247 (follow_tag_typedef): New. 3248 (lookup_tag): Use it to extract the tag of an explicit typedef. 3249 (xref_tag): Likewise. 3250 32512002-04-11 Andrew Haley <aph@redhat.com> 3252 3253 * typeck.c (type_after_usual_arithmetic_conversions): 3254 If two types have the same variant, return immediately. 3255 When two floating-point operands are the same precision: 3256 convert to float if one of the operands is float; 3257 if neither operand is one of the standard types, return the type 3258 of the first operand. 3259 32602002-04-10 Nathan Sidwell <nathan@codesourcery.com> 3261 3262 PR c++/5507 3263 * decl.c (make_typename_type): Remove implicit typenameness. 3264 32652002-04-09 Jason Merrill <jason@redhat.com> 3266 3267 PR optimization/6189 3268 * semantics.c (genrtl_start_function): Don't free 3269 DECL_SAVED_FUNCTION_DATA for inline functions. 3270 3271 * init.c (build_member_call): For now, don't convert to 3272 intermediate base if it would cause an error. 3273 32742002-04-08 Paolo Carlini <pcarlini@unitus.it> 3275 3276 * parse.y (namespace_qualifier, maybe_identifier, 3277 begin_explicit_instantiation, end_explicit_instantiation, 3278 apparent_template_type, .finish_template_type, 3279 do_id, maybe_init, defarg_again, component_decl_1): 3280 Add ending ';', in accordance with POSIX. 3281 32822002-04-06 Mark Mitchell <mark@codesourcery.com> 3283 3284 PR c++/5571 3285 * class.c (layout_class_type): Remember incomplete static 3286 variables. 3287 (finish_struct_1): Call complete_vars, not 3288 hack_incomplete_structures. 3289 * cp-tree.h (hack_incomplete_structures): Rename to ... 3290 (complete_vars): ... this. 3291 (struct saved_scope): Remove incomplete. 3292 (namespace_scope_incomplete): Remove. 3293 * decl.c (struct binding_level): Remove incomplete. 3294 (incomplete_vars): New variable. 3295 (mark_binding_level): Don't mark incomplete. 3296 (print_binding_level): Don't print it. 3297 (mark_saved_scope): Don't mark incomplete. 3298 (pushdecl): Use maybe_register_incopmlete_var. 3299 (cxx_init_decl_processing): Register incomplete_vars for GC. 3300 (start_decl_1): Clarify error message. 3301 (hack_incomplete_vars): Remove. 3302 (maybe_register_incomplete_var): New function. 3303 (complete_vars): Likewise. 3304 33052002-04-06 Jason Merrill <jason@redhat.com> 3306 3307 PR c++/4934 3308 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is 3309 set before checking it. 3310 3311 PR c++/525 3312 * init.c (build_member_call): Use build_scoped_ref. 3313 (resolve_offset_ref): Likewise. 3314 * call.c (build_scoped_method_call): Likewise. 3315 * tree.c (maybe_dummy_object): Kludge around current_class_type being 3316 wrong. 3317 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm. 3318 * cp-tree.h: Adjust. 3319 3320 * init.c (push_base_cleanups): Just use build_scoped_method_call. 3321 3322 PR c++/6179 3323 * method.c (implicitly_declare_fn): Pass unqualified type to 3324 synthesize_exception_spec. 3325 33262002-04-04 Neil Booth <neil@daikokuya.demon.co.uk> 3327 3328 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. 3329 * cvt.c: Update comment. 3330 * init.c (expand_cleanup_for_base): Update. 3331 * semantics.c (finish_parenthesized_expr): Update. 3332 * typeck.c (cp_truthvalue_conversion): Update. 3333 33342002-04-04 Jason Merrill <jason@redhat.com> 3335 3336 * semantics.c (finish_eh_cleanup): New fn. 3337 * cp-tree.h: Add prototype. 3338 * init.c (perform_member_init, expand_cleanup_for_base): Use 3339 finish_eh_cleanup. 3340 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove. 3341 * cp-tree.h: Remove references. 3342 * decl.c (begin_constructor_body, end_constructor_body): Likewise. 3343 * dump.c (cp_dump_tree): Likewise. 3344 * pt.c (tsubst_expr): Likewise. 3345 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove. 3346 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT. 3347 * tree.c (cp_statement_code_p): Likewise. 3348 3349 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup. 3350 3351 PR c++/5636 3352 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on 3353 cleanup for nrv. 3354 3355 PR c++/5104 3356 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception 3357 specifiers. 3358 [METHOD_TYPE]: Use same code as FUNCTION_TYPE. 3359 33602002-04-03 Richard Henderson <rth@redhat.com> 3361 3362 * cp-lang.c (cxx_warn_unused_global_decl): New. 3363 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. 3364 33652002-04-03 Neil Booth <neil@daikokuya.demon.co.uk> 3366 3367 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine. 3368 * tree.c (init_tree): Don't set hook. 3369 33702002-04-03 Roger Sayle <roger@eyesopen.com> 3371 3372 PR c++/5998: 3373 * decl.c (duplicate_decls): Don't mess with assembler names when 3374 redeclaring builtin functions as static. 3375 33762002-04-01 Neil Booth <neil@daikokuya.demon.co.uk> 3377 3378 * call.c (build_addr_func): Update. 3379 * class.c (resolve_address_of_overloaded_function): Update. 3380 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. 3381 * cp-tree.h (cxx_mark_addressable): New. 3382 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update. 3383 * decl2.c (build_cleanup): Update. 3384 * except.c (build_throw): Update. 3385 * init.c (resolve_offset_ref): Update. 3386 * pt.c (convert_nontype_argument): Update. 3387 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update. 3388 * typeck.c (decay_conversion, build_array_ref, build_unary_op, 3389 unary_complex_lvalue): Update. 3390 (mark_addressable): Rename. 3391 33922002-04-01 Roger Sayle <roger@eyesopen.com> 3393 3394 PR c++/5998: 3395 * decl.c (duplicate_decls): Overwrite the RTL when (and only 3396 when) overwriting a built-in function. Don't use COPY_DECL_RTL, 3397 but follow the SET_DECL_RTL idiom used elsewhere in the function. 3398 33992002-04-01 Neil Booth <neil@daikokuya.demon.co.uk> 3400 3401 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, 3402 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. 3403 * decl.c (grokdeclarator): Update. 3404 * mangle.c (write_integer_cst): Update. 3405 * typeck.c (build_binary_op): Update. 3406 34072002-03-31 Neil Booth <neil@daikokuya.demon.co.uk> 3408 3409 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine. 3410 * lex.c (cxx_init): Don't set hook. 3411 34122002-03-31 Neil Booth <neil@daikokuya.demon.co.uk> 3413 3414 * Make-lang.in (error.o): Update. 3415 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. 3416 * cp-tree.h (struct diagnostic_context): Predeclare. 3417 (cxx_print_error_function): New. 3418 * error.c: Include langhooks-def.h. 3419 (lang_print_error_function): Rename. Update. 3420 (init_error): Don't set hook. 3421 34222002-03-29 Neil Booth <neil@daikokuya.demon.co.uk> 3423 3424 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): 3425 Redefine. 3426 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks. 3427 * decl.c (finish_enum): Similarly. 3428 * error.c (dump_type): Similarly. 3429 * lex.c (cxx_init): Similarly. 3430 * mangle.c (write_builtin_type): Similarly. 3431 * typeck.c (comptypes): Similarly. 3432 34332002-03-28 Roger Sayle <roger@eyesopen.com> 3434 3435 PR c++/5998: 3436 * decl.c (cxx_init_decl_processing): Re-enable built-in functions 3437 in the g++ front-end. 3438 (duplicate_decl): Allow redefinition of anticipated built-ins. 3439 Fix inlining problem by over-writing the old DECL_RTL. 3440 (lookup_namespace_name): Fail to find an identifier in the 3441 specified namespace if its still anticipated. 3442 (builtin_function_1): New function split out from builtin_function 3443 to create a builtin in the current namespace with given context. 3444 (builtin_function): Call builtin_function_1 to define the 3445 appropriate builtins in both the std and global namespaces. 3446 (select_decl): Don't test for anticipated decls here. 3447 (unqualified_namespace_lookup): Instead ignore them whilst 3448 searching through scopes and namespaces. 3449 * decl2.c (do_nonmember_using_decl): If a using declaration 3450 specifies an anticipated built-in function, mark it as no longer 3451 anticipated in that scope. 3452 (ambiguous_decl): Avoid resolving to an anticipated decl. 3453 * lex.c (do_scoped_id): Fail to find an identifier in the global 3454 namespace if its still anticipated. 3455 34562002-03-29 Neil Booth <neil@daikokuya.demon.co.uk> 3457 3458 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine. 3459 * cp-tree.h (cp_make_lang_type): Rename. 3460 * lex.c (cp_make_lang_type): Rename. 3461 (make_aggr_type): Update. 3462 * tree.c (init_tree): Don't set make_lang_type_fn. 3463 34642002-03-29 Jakub Jelinek <jakub@redhat.com> 3465 3466 PR c++/6073 3467 * class.c (finish_struct_1): Update static field's DECL_MODE even 3468 if its type is a variant of t. 3469 34702002-03-27 Neil Booth <neil@daikokuya.demon.co.uk> 3471 3472 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine. 3473 * cp-tree.h (cxx_insert_default_attributes): New. 3474 * decl.c (insert_default_attributes): Rename. 3475 34762002-03-27 Mark Mitchell <mark@codesourcery.com> 3477 3478 PR c++/4884 3479 * call.c (build_op_delete_call): Allow for the fact the placement 3480 may be a COMPOUND_EXPR. 3481 34822002-03-27 Neil Booth <neil@daikokuya.demon.co.uk> 3483 3484 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. 3485 * cp-tree.h (init_cplus_expand): Remove. 3486 (cxx_expand_expr): New. 3487 * expr.c (cplus_expand_expr): Rename cxx_expand_expr, 3488 fix prototype. 3489 (init_cplus_expand): Remove. 3490 * lex.c (cxx_init): Don't call init_cplus_expand. 3491 34922002-03-26 Mark Mitchell <mark@codesourcery.com> 3493 3494 PR c++/4884. 3495 * init.c (build_new_1): Allow for the fact the result of 3496 build_function_call may be a COMPOUND_EXPR. 3497 34982002-03-26 Nathan Sidwell <nathan@codesourcery.com> 3499 3500 PR c++/5682 3501 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better. 3502 (dfs_skip_nonprimary_vbases_unmarkedp): Remove. 3503 (dfs_skip_nonprimary_vbases_markedp): Remove. 3504 * search.c (get_shared_vbase_if_not_primary): Remove. 3505 (dfs_skip_nonprimary_vbases_unmarkedp): Remove. 3506 (dfs_skip_nonprimary_vbases_markedp): Remove. 3507 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo. 3508 (dfs_marked_real_bases_queue_p): Likewise. 3509 35102002-03-26 Neil Booth <neil@daikokuya.demon.co.uk> 3511 3512 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine. 3513 * cp-tree.h (cxx_mark_tree): New. 3514 * decl.c (lang_mark_tree): Rename cxx_mark_tree. 3515 35162002-03-25 Neil Booth <neil@daikokuya.demon.co.uk> 3517 3518 * cp-tree.h (cxx_maybe_build_cleanup): New. 3519 * decl.c (destroy_local_var, hack_incomplete_structures): Update. 3520 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup. 3521 * tree.c (build_target_expr): Update. 3522 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine. 3523 35242002-03-24 Neil Booth <neil@daikokuya.demon.co.uk> 3525 3526 * decl2.c (cxx_decode_option): Handle -E. 3527 * lang-specs.h (default_compilers): Preprocess with cc1plus. 3528 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL. 3529 35302002-03-23 Jakub Jelinek <jakub@redhat.com> 3531 3532 PR c++/6037 3533 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node. 3534 35352002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 3536 3537 * error.c (dump_type): Be careful about implicit typenames. 3538 35392002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 3540 3541 PR C++/3656 3542 * semantics.c (finish_base_specifier): Handle erronous base 3543 classes. 3544 35452002-03-22 Zack Weinberg <zack@codesourcery.com> 3546 3547 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test 3548 REAL_IS_NOT_DOUBLE. 3549 35502002-03-22 Jeff Knaggs <jknaggs@redhat.com> 3551 3552 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to 3553 an index into the vtable_entry array regardless of 3554 TARGET_PTRMEMFUNC_VBIT_LOCATION. 3555 35562002-03-21 Aldy Hernandez <aldyh@redhat.com> 3557 3558 * tree.c (cp_cannot_inline_tree_fn): Same. 3559 35602002-03-21 Neil Booth <neil@daikokuya.demon.co.uk> 3561 3562 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, 3563 insert_block, getdecls, global_bindings_p): New. 3564 35652002-03-20 Nathan Sidwell <nathan@codesourcery.com> 3566 3567 PR c++/4361 3568 * mangle.c (struct globals) Add internal_mangling_p member. 3569 (write_template_param): Do internal mangling, if needed. 3570 (mangle_conv_op_name_for_type): Request internal mangling. 3571 35722002-03-20 Jason Merrill <jason@redhat.com> 3573 3574 PR c++/2136 3575 * init.c (build_delete): Check access for a member op delete here. 3576 * decl2.c (delete_sanity): Not here. 3577 35782002-03-19 Jason Merrill <jason@redhat.com> 3579 3580 PR c++/5118 3581 * class.c (get_vfield_name): Use the constructor_name. 3582 35832002-03-20 Neil Booth <neil@daikokuya.demon.co.uk> 3584 3585 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. 3586 * cp-tree.h (lang_printable_name): Rename. 3587 * error.c (lang_decl_name): Use new hook. 3588 * lex.c (cxx_init): Remove old hook. 3589 * pt.c (tsubst_decl): Use new hook. 3590 * tree.c (lang_printable_name): Rename. 3591 35922002-03-18 Eric Botcazou <ebotcazou@multimania.com> 3593 3594 PR c++/3882 3595 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling... 3596 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer 3597 only after recording the declaration. 3598 35992002-03-18 Jason Merrill <jason@redhat.com> 3600 3601 PR c++/2039 3602 * init.c (resolve_offset_ref): Hand off to build_component_ref. 3603 3604 PR c++/4222, c++/5995 3605 * call.c (build_over_call): Fix empty class logic. 3606 3607 PR c++/3870 3608 * cp-tree.h (struct saved_scope): Add last_parms field. 3609 * decl.c (maybe_push_to_top_level): Save last_function_parms. 3610 (pop_from_top_level): Restore it. 3611 3612 PR c++/4377 3613 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip 3614 NON_LVALUE_EXPRs. 3615 3616 PR c++/4003 3617 * pt.c (tsubst_friend_function): Use decl_namespace_context. 3618 3619 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch. 3620 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a 3621 type with a nontrivial destructor. 3622 36232002-03-17 Jason Merrill <jason@redhat.com> 3624 3625 PR c++/4460 3626 * class.c (build_base_path): Virtual base layout is fixed in 3627 in-charge [cd]tors. 3628 36292002-03-17 Neil Booth <neil@daikokuya.demon.co.uk> 3630 3631 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine. 3632 * parse.y (yyparse): Remove macro. 3633 36342002-03-17 Jason Merrill <jason@redhat.com> 3635 3636 PR c++/5757 3637 * init.c (build_new_1): Pass the right pointer to op delete. 3638 36392002-03-16 Nathan Sidwell <nathan@codesourcery.com> 3640 3641 PR c++/4361 3642 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated 3643 conversion operators go. 3644 (struct lang_decl_flags): Add template_conv_p and unused 3645 bitfields. 3646 (DECL_TEMPLATE_CONV_FN_P): New macro. 3647 * call.c (build_user_type_conversion_1): Don't check second type 3648 conversion of overload set first. 3649 * class.c (add_method): Make sure templated conversion operators 3650 all end up on slot 2. 3651 * lex.c (do_identifier): A conversion operator token might be 3652 satisfied by a templated conversion operator. 3653 * pt.c (check_explicit_specialization): Use 3654 CLASSTYPE_FIRST_CONVERSION_SLOT. 3655 (template_parm_this_level_p): New function. 3656 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P. 3657 * search.c (lookup_fnfields_1): Template conversions will be on 3658 the first slot. 3659 * typeck.c (build_component_ref): Preserve the type of an 3660 conversion operator name on the overload type. 3661 (build_x_function_call): Retrieve the conversion operator name. 3662 36632002-03-15 Richard Henderson <rth@redhat.com> 3664 3665 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op. 3666 36672002-03-15 Mark Mitchell <mark@codesourcery.com> 3668 3669 * cp-tree.h (CLEANUP_DECL): Remove. 3670 (CLEANUP_EXPR): Likewise. 3671 * decl.c (destroy_local_var): Simplify. 3672 (maybe_build_cleanup): Tidy. 3673 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT. 3674 * semantics.c (cp_expand_stmt): Likewise. 3675 * cp/tree.c (cp_statement_code_p): Likewise. 3676 36772002-03-15 Jason Merrill <jason@redhat.com> 3678 3679 PR c++/5857 3680 * decl.c (duplicate_decls): Use merge_types instead of common_type. 3681 * typeck.c (common_type): Just hand off to 3682 type_after_usual_arithmetic_conversions and 3683 composite_pointer_type. 3684 (merge_types): New fn. 3685 (commonparms): Use it instead of common_type. 3686 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE. 3687 (composite_pointer_type): Also handle attributes. 3688 * cp-tree.h: Declare merge_types. 3689 3690 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT 3691 variables. 3692 * decl2.c (maybe_make_one_only): Also mark the decl as needed. 3693 36942002-03-14 Richard Henderson <rth@redhat.com> 3695 3696 * decl.c: Include c-pragma.h. 3697 (start_decl, start_function): Invoke maybe_apply_pragma_weak. 3698 * Make-lang.in: Update dependencies. 3699 37002002-03-14 Jakub Jelinek <jakub@redhat.com> 3701 3702 PR c++/5908 3703 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too. 3704 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING. 3705 37062002-03-12 Richard Sandiford <rsandifo@redhat.com> 3707 3708 * mangle.c (write_builtin_type): Handle 128-bit integers even if 3709 they are not a standard integer type. 3710 37112002-03-12 Richard Sandiford <rsandifo@redhat.com> 3712 3713 * cp-tree.h (init_init_processing): Remove declaration. 3714 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff. 3715 * decl.c (cxx_init_decl_processing): Don't call init_init_processing. 3716 37172002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3718 3719 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name): 3720 Define. 3721 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not 3722 tree_code_length. 3723 * lex.c (cplus_tree_code_type, cplus_tree_code_length, 3724 cplus_tree_code_name): Delete. 3725 (cxx_init): Don't call add_c_tree_codes, instead set 3726 lang_unsafe_for_reeval. Don't try to copy into the various 3727 tree_code arrays. 3728 37292002-03-12 Nathan Sidwell <nathan@codesourcery.com> 3730 3731 PR c++/5659 3732 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here. 3733 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for 3734 definitions. 3735 37362002-03-11 Nathan Sidwell <nathan@codesourcery.com> 3737 3738 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>, 3739 DR209 is now not a defect. 3740 * cp-tree.h (skip_type_access_control): Remove. 3741 * decl.c (grokdeclarator): Do type access control for friend 3742 declarations. 3743 * semantics.c (decl_type_access_control): Don't reset 3744 current_type_lookups. 3745 (save_type_access_control): Always save the lookups. 3746 (skip_type_access_control): Remove. 3747 (finish_class_definition): Don't change type_lookups. 3748 37492002-03-11 Nathan Sidwell <nathan@codesourcery.com> 3750 3751 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>, 3752 It is incorrect. 3753 * typeck.c (build_static_cast): Compare non-qualified types 3754 with pointer to member conversions. 3755 37562002-03-11 Dan Nicolaescu <dann@ics.uci.edu> 3757 Daniel Berlin <dan@dberlin.org> 3758 3759 * cp-lang.c (ok_to_generate_alias_set_for_type): New function. 3760 (cxx_get_alias_set): Use it. 3761 37622002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3763 3764 * cp-tree.h (stabilize_expr): Prototype. 3765 37662002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org> 3767 3768 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of 3769 conditional return void. 3770 37712002-03-08 Neil Booth <neil@daikokuya.demon.co.uk> 3772 3773 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine. 3774 * cp-tree.h (cxx_unsave): New. 3775 * tree.c (cp_unsave): Rename cxx_unsave, update prototype. 3776 (init_tree): Update. 3777 37782002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3779 3780 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of 3781 explicit sizeof/sizeof. 3782 * decl2.c (cxx_decode_option): Likewise. 3783 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise. 3784 37852002-03-02 Nathan Sidwell <nathan@codesourcery.com> 3786 3787 PR c++/775 3788 * decl.c (lookup_tag): Only reject enum/class mismatch, not 3789 class/union mismatch. 3790 * parse.y (check_class_key): New function. 3791 (structsp): Call it. 3792 37932002-03-01 Michael Matz <matz@suse.de> 3794 3795 * typeck.c (cp_pointer_int_sum): Complete inner type which is 3796 used later by size_in_bytes(). 3797 37982002-03-01 Phil Edwards <pme@gcc.gnu.org> 3799 3800 * cp-tree.h: Require __GNUC__ to be #defined. 3801 (build_init): Add missing prototype. 3802 38032002-03-01 Jason Merrill <jason@redhat.com> 3804 3805 * except.c: Don't include decl.h or obstack.h. Do include 3806 tree-inline.h. 3807 (build_throw): Destroy temporaries from the thrown 3808 expression before calling __cxa_throw. Construct a thrown 3809 temporary directly into the exception object. 3810 (stabilize_throw_expr): New function. 3811 (wrap_cleanups_r): New function. 3812 * tree.c (stabilize_expr): New function. 3813 * init.c (build_init): New function. 3814 * Make-lang.in (cp/except.o): Adjust .h deps. 3815 38162002-02-28 Jason Merrill <jason@redhat.com> 3817 3818 * search.c (lookup_base_r): Don't clear is_non_public just because 3819 we found a friendly scope. 3820 3821 * decl.c (finish_function): Only warn about missing return 3822 statement with -Wreturn-type. 3823 38242002-02-28 Neil Booth <neil@daikokuya.demon.co.uk> 3825 3826 * class.c (build_clone): Update. 3827 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine. 3828 * cp-tree.h (cxx_dup_lang_specific_decl): New. 3829 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl. 3830 (copy_decl): Update. 3831 * method.c (make_thunk): Update. 3832 38332002-02-27 Zack Weinberg <zack@codesourcery.com> 3834 3835 * decl2.c: Delete traditional-mode-related code copied from 3836 the C front end but not used, or used only to permit the 3837 compiler to link. 3838 38392002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org> 3840 3841 PR c++/4093 3842 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition 3843 to void. 3844 38452002-02-22 Jakub Jelinek <jakub@redhat.com> 3846 3847 PR other/5746 3848 * semantics.c (finish_switch_cond): Don't call get_unwidened 3849 if error_mark_node. 3850 38512002-02-22 Nathan Sidwell <nathan@codesourcery.com> 3852 3853 PR c++/2645, DR 295 3854 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals, 3855 tf_keep_type_decl. 3856 (make_typename_type): Use tsubst_flags_t. 3857 * decl.c (make_typename_type): Adjust. Return non-artificial 3858 TYPE_DECLs, if required. 3859 (grokdeclarator): Simplify CVR qualification handling. Allow bad 3860 qualifiers on typedef types. 3861 * decl2.c (handle_class_head): Adjust make_typename_type call. 3862 * parse.y (nested_name_specifier): Likewise. 3863 (typename_sub0): Likewise. 3864 (typename_sub1): Likewise. 3865 * pt.c (convert_template_argument): Adjust make_typename_type 3866 return value. 3867 (tsubst): Adjust cp_build_qualified_type_real calls. 3868 (check_cv_quals_for_unify): Cope with allowing bad qualifications 3869 on template type parms. 3870 (instantiate_decl): Recheck substitutions to give warnings on bad 3871 qualifications. 3872 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals. 3873 38742002-02-21 Aldy Hernandez <aldyh@redhat.com> 3875 3876 * cp/decl.c (duplicate_decls): Merge always_inline attribute. 3877 3878 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0 3879 unless DECL_ALWAYS_INLINE. 3880 38812002-02-20 Jakub Jelinek <jakub@redhat.com> 3882 3883 * typeck.c (cp_pointer_int_sum): Renamed from 3884 pointer_int_sum, call pointer_int_sum. 3885 38862002-02-20 Jakub Jelinek <jakub@redhat.com> 3887 3888 * decl.c (duplicate_decls): Return 0 if issued error about 3889 redeclaration. 3890 38912002-02-19 Jason Merrill <jason@redhat.com> 3892 3893 ABI change: Mangle `void (A::*)() const' as 3894 M1AKFvvE, not MK1AFvvE. 3895 * mangle.c (write_function_type): Write cv-quals for member 3896 function type here. 3897 (write_pointer_to_member_type): Not here. 3898 38992002-02-18 Jason Merrill <jason@redhat.com> 3900 3901 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header. 3902 (do_decl_instantiation): Likewise. 3903 39042002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org> 3905 3906 PR c++/5685 3907 * decl.c (duplicate_decls): Make warning unconditional 3908 if duplicate default argument declarations are present. 3909 39102002-02-17 Jakub Jelinek <jakub@redhat.com> 3911 3912 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit 3913 shortening. 3914 39152002-02-15 Nathan Sidwell <nathan@codesourcery.com> 3916 3917 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs, 3918 remove incorrect comment. Move #if 0'd code to common path. Use 3919 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication. 3920 39212002-02-13 Jason Merrill <jason@redhat.com> 3922 3923 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns. 3924 (finish_function): Don't warn if current_function_returns_null. 3925 3926 * typeck2.c (digest_init): Do handle values of vector type. 3927 3928 * typeck2.c (digest_init, process_init_constructor): Treat vectors 3929 like arrays. 3930 39312002-02-11 Jason Merrill <jason@redhat.com> 3932 3933 * parse.y (reserved_declspecs): Don't handle attributes. 3934 (reserved_typespecquals): Handle them here. 3935 * Make-lang.in (parse.c): Adjust expected conflicts. 3936 39372002-02-08 Jakub Jelinek <jakub@redhat.com> 3938 3939 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr 3940 instead of compstmt. 3941 (compstmt_or_stmtexpr): Renamed from compstmt. 3942 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type. 3943 39442002-02-07 Nathan Sidwell <nathan@codesourcery.com> 3945 3946 Rename instantiate_type_flags to tsubst_flags_t & expand use. 3947 * cp-tree.h (instantiate_type_flags): Rename to ... 3948 (tsubst_flags_t): ... here. Rename itf_complain to tf_error, 3949 add tf_warning flag. 3950 (instantiate_type): Adjust prototype. 3951 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class, 3952 do_type_instantiation, cp_build_qualified_type_real): Likewise. 3953 cp_build_qualified_type: Adjust. 3954 * class.c (instantiate_type): Adjust parameter. Rename itf_* to 3955 tf_*. 3956 * call.c (standard_conversion): Rename itf_* to tf_*. 3957 (reference_binding): Likewise. 3958 (convert_like_real): Likewise. 3959 * cvt.c (cp_convert_to_pointer): Likewise. 3960 (convert_to_reference): Likewise. 3961 * decl.c (lookup_namespace_name): Use tf_* flags. 3962 (make_typename_type): Likewise. 3963 (grokdeclarator): Likewise. 3964 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage. 3965 (coerce_template_template_parms, convert_template_argument, 3966 coerce_template_parms, maybe_get_template_decl_from_type_decl, 3967 lookup_template_class, tsubst_friend_function, tsubst_friend_class, 3968 instantiate_class_template, tsubst_template_arg_vector, 3969 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument, 3970 tsubst_decl, tsubst_arg_types, tsubst_function_type, 3971 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr, 3972 instantiate_template, fn_type_unification, 3973 resolve_overloaded_unification, verify_class_unification, 3974 unify, get_bindings_real, do_type_instantiation, 3975 regenerate_decl_from_template, instantiate_decl, 3976 tsubst_initializer_list, tsubst_enum, 3977 get_mostly_instantiated_function_type, 3978 invalid_nontype_parm_type_p): Likewise. 3979 * tree.c (cp_build_qualified_type_real): Likewise. 3980 * typeck.c (build_binary_op): Rename itf_* to tf_*. 3981 (build_ptrmemfunc): Likewise. 3982 (convert_for_assignment): Likewise. 3983 39842002-02-07 Nathan Sidwell <nathan@codesourcery.com> 3985 3986 PR c++/109 3987 * decl.c (grokdeclarator): Allow friend declarations from 3988 dependent types. 3989 * decl2.c (handle_class_head): Don't push into template parm contexts. 3990 * pt.c (push_template_decl_real): Template parm contexts are never 3991 being defined. 3992 39932002-02-05 Alexandre Oliva <aoliva@redhat.com> 3994 3995 * class.c: Include target.h. 3996 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY, 3997 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS 3998 bit-field layout. 3999 * Make-lang.in: Adjust deps. 4000 40012002-02-05 Jason Merrill <jason@redhat.com> 4002 4003 * error.c (dump_type): Be more helpful about VECTOR_TYPE. 4004 40052002-02-04 Jakub Jelinek <jakub@redhat.com> 4006 4007 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE. 4008 (finish_switch_cond): Set SWITCH_TYPE. 4009 40102002-02-04 Richard Henderson <rth@redhat.com> 4011 4012 * method.c (use_thunk): Always initialize the block tree. Reindent. 4013 * semantics.c (expand_body): Emit thunks after function, not before. 4014 40152002-02-04 Jason Merrill <jason@redhat.com> 4016 4017 * decl.c (start_function): Call cplus_decl_attributes immediately 4018 after grokdeclarator. 4019 4020 * decl.c (start_function): Combine DECL_RESULT handling code. 4021 40222002-02-03 Jason Merrill <jason@redhat.com> 4023 4024 * xref.c: Remove. 4025 * Make-lang.in (CXX_OBJS): Remove cp/xref.o 4026 (cp/xref.o): Remove dependencies. 4027 * class.c (finish_struct_1, check_methods): Don't call xref fns. 4028 (finish_struct_1): Likewise. 4029 * friend.c (make_friend_class): Likewise. 4030 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise. 4031 * spew.c (read_process_identifier): Likewise. 4032 40332002-02-01 Jason Merrill <jason@redhat.com> 4034 4035 PR c++/4872 4036 * decl.c (finish_function): Warn about a non-void function with 4037 no return statement and no abnormal exit. 4038 * cp-tree.h (struct cp_language_function): Add returns_abnormally. 4039 (current_function_returns_abnormally): New macro. 4040 * call.c (build_call): Set it. 4041 4042 * typeck.c (build_component_ref): Always complain about offsetof 4043 constructs on non-PODs. Only make it an error for members of 4044 virtual bases. 4045 4046 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS. 4047 (dump_function_decl): Always dump parms. 4048 4049 * decl2.c (finish_static_data_member_decl): Complain about a local 4050 class with a static data member. 4051 4052 PR c++/4286 4053 * search.c (lookup_field_1): Don't xref a static data member 4054 just because we looked it up. 4055 40562002-01-31 Jason Merrill <jason@redhat.com> 4057 4058 * Make-lang.in (parse.c): Handle .output file. 4059 4060 PR c++/3395 4061 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES, 4062 not TREE_TYPE. 4063 * semantics.c (finish_class_definition): Adjust. 4064 4065 Allow attributes in parms and casts. 4066 * parse.y (named_parm): Don't strip attrs. 4067 (declmods): Remove 'attributes' production. 4068 (nonempty_cv_qualifiers): Accept attributes. 4069 (ATTRIBUTE): Give precedence. 4070 * decl.c (groktypename): Handle attributes. 4071 (grokparms): Likewise. 4072 40732002-01-29 Jakub Jelinek <jakub@redhat.com> 4074 4075 * decl2.c (cxx_decode_option): Pass 0 as last argument to 4076 cpp_handle_option. 4077 * lang-specs.h: Use cpp_unique_options instead of cpp_options 4078 when used together with cc1_options. 4079 40802002-01-29 Nathan Sidwell <nathan@codesourcery.com> 4081 4082 PR c++/5132 4083 * typeck2.c (digest_init): Make sure non-array core type is 4084 instantiated. 4085 * decl2.c (reparse_absdcl_as_casts): Just store the type in the 4086 constructor, rather than build a new one. 4087 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the 4088 PURPOSE of constructor elts. 4089 40902002-01-23 Zack Weinberg <zack@codesourcery.com> 4091 4092 * Make-lang.in (parse.c): Adjust expected number of 4093 shift-reduce conflicts. 4094 (decl.o): Depend on diagnostic.h. 4095 * decl.c: Include diagnostic.h. 4096 (grokdeclarator): Check for null pointer. 4097 (finish_function): Don't abort when 4098 current_binding_level->parm_flag != 1, if errors have 4099 occurred; throw away the statement tree and extra binding 4100 levels, and continue. 4101 * lex.c (note_list_got_semicolon): Check for null pointer. 4102 * method.c (hack_identifier): Just return error_mark_node if 4103 value is error_mark_node. 4104 * parse.y (primary: TYPEID(type_id)): No need to use 4105 TYPE_MAIN_VARIANT here. 4106 (handler_seq): Accept an empty list of catch clauses and 4107 generate a fake handler block to avoid later crashes. 4108 (ansi_raise_identifier): Accept the error token too. 4109 * semantics.c (begin_class_definition, 4110 finish_class_definition): Check for error_mark_node. 4111 41122002-01-23 Zack Weinberg <zack@codesourcery.com> 4113 4114 * typeck2.c (friendly_abort): Delete definition. 4115 * cp-tree.h (friendly_abort): Don't prototype. 4116 (my_friendly_assert): Use fancy_abort. 4117 41182002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org> 4119 4120 * cp-tree.h (my_friendly_abort): Remove. 4121 41222002-01-23 Jakub Jelinek <jakub@redhat.com> 4123 4124 * spew.c (pending_inlines, pending_inlines_tail, 4125 processing_these_inlines): Make static. 4126 (mark_pending_inlines): Remove static. 4127 (begin_parsing_inclass_inline): If in function, save pi 4128 for GC to cp_function_chain->unparsed_inlines instead. 4129 (process_next_inline): Likewise. 4130 * cp-tree.h (struct cp_language_function): Add unparsed_inlines. 4131 (mark_pending_inlines): Add prototype. 4132 * decl.c (spew_debug): Remove unused extern. 4133 (mark_lang_function): Call mark_pending_inlines. 4134 41352002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org> 4136 4137 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c, 4138 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c, 4139 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: 4140 Change my_fancy_abort() to abort(). 4141 41422002-01-23 Jason Merrill <jason@redhat.com> 4143 4144 PR c++/5453 4145 * class.c (fixed_type_or_null): Fix thinko. 4146 4147 PR c++/3331 4148 * init.c (resolve_offset_ref): Use build_indirect_ref. 4149 4150 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'. 4151 41522002-01-22 Jason Merrill <jason@redhat.com> 4153 4154 * parse.y (function_body): Suppress the block for the outermost 4155 curly braces. 4156 * decl.c (pushdecl): Don't try to skip it. 4157 (begin_function_body): Keep the block we create, not the next one. 4158 * init.c (emit_base_init): Don't mess with keep_next_level. 4159 4160 * class.c (build_base_path): Tweak formatting. 4161 41622002-01-19 Nathan Sidwell <nathan@codesourcery.com> 4163 4164 Fix regression introduced with patch for c++/775 4165 * parse.y (class_head_defn): Check for template specializations 4166 with a different class-key. 4167 41682002-01-17 Jason Merrill <jason@redhat.com> 4169 4170 * decl.c (begin_constructor_body, begin_destructor_body): New fns. 4171 (begin_function_body): Call them and keep_next_level. 4172 * init.c (emit_base_init): Call keep_next_level. 4173 * semantics.c (setup_vtbl_ptr): Lose. 4174 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p. 4175 (vtbls_set_up_p): Lose. 4176 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init. 4177 * method.c (do_build_copy_constructor): Likewise. 4178 (synthesize_method): Call finish_mem_initializers. 4179 * parse.y (nodecls): Likewise. 4180 4181 * error.c (dump_type_suffix): Print the exception specs before 4182 recursing. 4183 (dump_function_decl): Here, too. 4184 4185 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT. 4186 41872002-01-10 Ira Ruben <ira@apple.com> 4188 4189 PR c++/907 4190 * decl.c (start_method): Handle attrlist. 4191 41922002-01-10 Jakub Jelinek <jakub@redhat.com> 4193 4194 * decl2.c (max_tinst_depth): Increase default limit to 500. 4195 41962002-01-10 Graham Stott <grahams@redhat.com> 4197 4198 * spew.c (YYCHAR): Uppercase macro parameter and add 4199 parenthesis. 4200 (YYCODE): Likewise. 4201 (NAME): Uppercase macro parameter. 4202 42032002-01-09 Graham Stott <grahams@redhat.com> 4204 4205 * decl.h (grokdeclarator): Wrap long line. 4206 4207 * semantics.c (FINISH_COND): Uppercase macro paramaters and 4208 add parenthesis. 4209 42102002-01-08 Graham Stott <grahams@redhat.com> 4211 4212 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis. 4213 (PALLOC): Uppercase macro parameter and whitespace. 4214 (SALLOC): Uppercase macro parameter. 4215 (SFREE): Uppercase macros parameter, add parenthese and 4216 whitespace. 4217 (STREQL): Uppercase macro parameter and whitespace. 4218 (STRNEQ): Likewise. 4219 (STRLSS): Likewise. 4220 (STRLEQ): Likewise. 4221 (STRGTR): Likewise. 4222 (STRGEQ): Likewise. 4223 4224 * call.c (convert_like): Add parenthesis and wrap. 4225 (convert_like_with_context): Likewise. 4226 (ICS_RANK): Whitespace. 4227 (NEED_TEMPORARY_P): Remove parenthesis. 4228 4229 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and 4230 whitespace. 4231 (VTT_MARKED_BINFO_P): Likewise. 4232 4233 * decl.c (BINDING_LEVEL): Add parenthesis. 4234 (DEF_OPERATOR): Likewise. 4235 4236 * mangle.c (MANGLE_TRACE): Add parenthesis. 4237 (MANGLE_TRACE_TREE): Likewise. 4238 (write_signed_number): Likewise. 4239 (write_unsigned_number): Likewise. 4240 4241 * pt.c (ccat): Uppercase macro parameter. 4242 (cat): Likewise 4243 4244 * search.c (SET_BINFO_ACCESS): Add parenthesis. 4245 42462002-01-07 Jason Merrill <jason@redhat.com> 4247 4248 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch 4249 to pedwarn. 4250 4251 PR c++/3536 4252 * method.c (make_thunk): If !flag_weak, give the thunk the 4253 function's linkage. 4254 (use_thunk): Here, too. 4255 42562002-01-07 Graham Stott <grahams@redhat.com> 4257 4258 * error.c: Update copyright date. 4259 (print_scope_operator): Add parenthesis. 4260 (print_left_paren): Likewise. 4261 (print_right_paren): Likewise. 4262 (print_left_bracket): Likewise. 4263 (print_right_bracket): Likewise. 4264 (print_template_argument_list_start): Likewise. 4265 (print_template_argument_list_end): Likewise. 4266 (print_non_consecutive_character): Likewise. 4267 (print_tree_identifier): Likewise. 4268 (print_identifier): Likewise. 4269 (NEXT_CODE): Uppercase macro parameter. 4270 (ident_fndecl): Delete unused. 4271 (GLOBAL_THING): Likewise. 4272 42732002-01-06 Graham Stott <grahams@redhat.com> 4274 4275 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis. 4276 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise. 4277 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise. 4278 (RECORD_OR_UNION_TYPE_CHECK): Likewise. 4279 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise. 4280 (C_IS_RESERVED_WORD): Uppercase macro parameter. 4281 (C_RID_YYCODE) Likewise. 4282 (ptrmem_cst): Use rtx. 4283 (LOCAL_BINDING_P): Add whitespace. 4284 (INHERITED_VALUE_BINDING_P): Likewise. 4285 (BINDING_SCOPE): Wrap long line. 4286 (BINDING_HAS_LEVEL_P): Remove parenthesis. 4287 (BINDING_VALUE): Wrap long line. 4288 (BINDING_TYPE): Whitespace. 4289 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis. 4290 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise. 4291 (IDENTIFIER_NAMESPACE_VALUE): Likewise. 4292 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise. 4293 (same_type_p): Uppercase macro parameters. 4294 (same_type_ignoring_top_level_qualifiers_p): Likewise. 4295 (OVL_FUNCTION): Wrap long line. 4296 (OVL_CHAIN): Whitespace. 4297 (OVL_CURRENT): Add parenthesis and whitespace. 4298 (OVL_NEXT): Whitespace. 4299 (OVL_USED): Likewise. 4300 (IDENTIFIER_TYPE_VALUE): Likewise. 4301 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis. 4302 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace. 4303 (LANG_ID_FIELD): Whitespace. 4304 (SET_LANG_ID(NODE,VALUE,NAME): Likewise. 4305 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap. 4306 (SET_IDENTIFIER_LABEL_VALUE): Whitespace. 4307 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap. 4308 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace. 4309 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap. 4310 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace. 4311 (IDENTIFIER_VIRTUAL_P): Likewise. 4312 (IDENTIFIER_OPNAME_P): Likewise. 4313 (IDENTIFIER_TYPENAME_P): Remove parenthesis. 4314 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters. 4315 (C_SET_EXP_ORIGINAL_CODE): Likewise. 4316 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line. 4317 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise. 4318 (IS_AGGR_TYPE): Uppercase macro parameter. 4319 (CLASS_TYPE_P): Likewise. 4320 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis. 4321 (IS_AGGR_TYPE_2): Whitespace. 4322 (TAGGED_TYPE_P): Uppercase macro parameter. 4323 (TYPE_BUILT_IN): Whitespace. 4324 (TYPE_FOR_JAVA): Likewise. 4325 (FUNCTION_ARG_CHAIN): Remove parenthesis. 4326 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis. 4327 (FUNCTION_FIRST_USER_PARAM): Likewise. 4328 (PROMOTES_TO_AGGR_TYPE): Whitespace. 4329 (DERIVED_FROM_P): Add parenthesis and wrap. 4330 (UNIQUELY_DERIVED_FROM_P): Likewise. 4331 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise. 4332 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise. 4333 (CLASSTYPE_USE_TEMPLATE): Whitespace. 4334 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis. 4335 (TYPE_GETS_DELETE): Add parenthesis. 4336 (TYPE_HAS_CONVERSION): Add parenthesis and wrap. 4337 (TYPE_HAS_ASSIGN_REF): Likewise, 4338 (TYPE_HAS_CONST_ASSIGN_REF): Likewise. 4339 (TYPE_HAS_INIT_REF): Likewise. 4340 (TYPE_HAS_CONST_INIT_REF): Likewise. 4341 (TYPE_BEING_DEFINED): Likewise. 4342 (TYPE_LANG_SPECIFIC): Likewise. 4343 (CLASSTYPE_RTTI): Likewise. 4344 (TYPE_OVERLOADS_CALL_EXPR): Likewise. 4345 (TYPE_OVERLOADS_ARRAY_REF): Likewise. 4346 (TYPE_OVERLOADS_ARROW): Likewise. 4347 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise. 4348 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis. 4349 (CLASSTYPE_METHOD_VEC): Likewise. 4350 (CLASSTYPE_MARKED_N): Likewise. 4351 (CLASSTYPE_MARKED): Likewise. 4352 (CLASSTYPE_MARKED2): Likewise. 4353 (CLASSTYPE_MARKED3): Likewise. 4354 (CLASSTYPE_MARKED4): Likewise. 4355 (CLASSTYPE_MARKED5): Likewise. 4356 (CLASSTYPE_MARKED6): Likewise. 4357 (SET_CLASSTYPE_MARKED): Whitespace. 4358 (CLEAR_CLASSTYPE_MARKED): Likewise. 4359 (SET_CLASSTYPE_MARKED2): Likewise. 4360 (CLEAR_CLASSTYPE_MARKED2): Likewise. 4361 (SET_CLASSTYPE_MARKED3): Likewise. 4362 (CLEAR_CLASSTYPE_MARKED3): Likewise. 4363 (SET_CLASSTYPE_MARKED4): Likewise. 4364 (CLEAR_CLASSTYPE_MARKED4): Likewise. 4365 (SET_CLASSTYPE_MARKED5): Likewise. 4366 (CLEAR_CLASSTYPE_MARKED5): Likewise. 4367 (SET_CLASSTYPE_MARKED6): Likewise. 4368 (CLEAR_CLASSTYPE_MARKED6): Likewise. 4369 (CLASSTYPE_TAGS): Likewise. 4370 (CLASSTYPE_VSIZE): Likewise. 4371 (CLASSTYPE_VBASECLASSES): Likewise. 4372 (CANONICAL_BINFO): Add parenthesis. 4373 (CLASSTYPE_SIZE(NODE): Likewise. 4374 (CLASSTYPE_SIZE_UNIT): Likewise. 4375 (CLASSTYPE_ALIGN(NODE): Likewise. 4376 (CLASSTYPE_USER_ALIGN): Likewise. 4377 (TYPE_JAVA_INTERFACE): Likewise. 4378 (CLASSTYPE_PURE_VIRTUALS): Likewise. 4379 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap. 4380 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise. 4381 (CLASSTYPE_HAS_MUTABLE): Likewise. 4382 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise. 4383 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap. 4384 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise. 4385 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise. 4386 (CLASSTYPE_INTERFACE_ONLY): Likewise. 4387 (CLASSTYPE_INTERFACE_KNOWN): Likewise. 4388 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise. 4389 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise. 4390 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise. 4391 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise. 4392 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap. 4393 (BINFO_UNSHARED_MARKED): Whitespace. 4394 (BINFO_MARKED): Whitespace and wrap. 4395 (SET_BINFO_MARKED): Likewise. 4396 (CLEAR_BINFO_MARKED): Likewise. 4397 (BINFO_VTABLE_PATH_MARKED): Likewise. 4398 (SET_BINFO_VTABLE_PATH_MARKED): Likewise. 4399 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise. 4400 (BINFO_SUBVTT_INDEX): Remove parenthesis. 4401 (BINFO_VPTR_INDEX): Likewise. 4402 (BINFO_PRIMARY_BASE_OF): Likewise, 4403 (CLASSTYPE_VFIELDS): Whitespace. 4404 (VF_DERIVED_VALUE): Wrap long line. 4405 (NAMESPACE_LEVEL): Whitespace. 4406 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis. 4407 (DEFARG_POINTER): Whitespace. 4408 (DECL_NEEDED_P): Remove parenthesis. 4409 (DECL_LANGUAGE): Whitespace. 4410 (SET_DECL_LANGUAGE): Add parenthesis. 4411 (DECL_CONSTRUCTOR_P): Whitespace and wrap. 4412 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis. 4413 (DECL_IN_AGGR_P): Whitespace. 4414 (DECL_FRIEND_P): Likewise. 4415 (DECL_BEFRIENDING_CLASSES): Likewise. 4416 (DECL_STATIC_FUNCTION_P): Whitespace and wrap. 4417 (DECL_NONCONVERTING_P): Whitespace. 4418 (DECL_PURE_VIRTUAL_P): Likewise. 4419 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise. 4420 (DECL_PENDING_INLINE_INFO): Whitespace. 4421 (DECL_SORTED_FIELDS): Likewise. 4422 (DECL_DEFERRED_FN): Likewise. 4423 (DECL_TEMPLATE_INFO): Likewise. 4424 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap. 4425 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise. 4426 (SET_TYPE_TEMPLATE_INFO): Add parenthesis. 4427 (TMPL_ARGS_LEVEL): Likewise. 4428 (SET_TMPL_ARGS_LEVEL): Likewise. 4429 (INNERMOST_TEMPLATE_PARMS): Whitespace. 4430 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter. 4431 (INTEGRAL_CODE_P(CODE): Add parenthesis. 4432 (CP_INTEGRAL_TYPE_P): Remove parenthesis. 4433 (TYPE_HAS_CONSTRUCTOR): Whitespace. 4434 (TREE_HAS_CONSTRUCTOR): Likewise. 4435 (TYPE_HAS_DESTRUCTOR): Likewise. 4436 (TYPE_HAS_REAL_ASSIGN_REF): Likewise. 4437 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise. 4438 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise. 4439 (TYPE_HAS_COMPLEX_INIT_REF): Likewise. 4440 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise. 4441 (TYPE_PTRMEMFUNC_P): Likewise. 4442 (TYPE_PTRMEMFUNC_FLAG): Likewise. 4443 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise. 4444 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise. 4445 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis. 4446 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. 4447 (DECL_ACCESS): Whitespace. 4448 (DECL_GLOBAL_CTOR_P): Remove parenthesis. 4449 (DECL_GLOBAL_DTOR_P): Likewise. 4450 (GLOBAL_INIT_PRIORITY): Likewise. 4451 (DECL_TEMPLATE_PARMS): Likewise. 4452 (DECL_TEMPLATE_RESULT): Likewise. 4453 (DECL_TEMPLATE_INSTANTIATIONS): Likewise. 4454 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise. 4455 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis. 4456 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise. 4457 (PRIMARY_TEMPLATE_P): Add parenthesis. 4458 (DECL_USE_TEMPLATE): Whitespace. 4459 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise. 4460 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise. 4461 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise. 4462 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise. 4463 (CALL_DECLARATOR_PARMS): Remove parenthesis. 4464 (CALL_DECLARATOR_QUALS): Likewise. 4465 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise. 4466 (TEMP_NAME_P): Wrap. 4467 (VFIELD_NAME_P): Likewise. 4468 (B_SET): Uppercase macro parameters and add parenthesis. 4469 (B_CLR): Likewise. 4470 (B_TST): Likewise. 4471 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters. 4472 (LOOKUP_TYPES_ONLY): Uppercase macro parameters. 4473 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters. 4474 (same_or_base_type_p): Likewise. 4475 (cp_deprecated): Likewise. 4476 44772002-01-05 Richard Henderson <rth@redhat.com> 4478 4479 * semantics.c (expand_body): Revert last change. 4480 44812002-01-04 Jason Merrill <jason@redhat.com> 4482 4483 PR c++/4122 4484 * class.c (update_vtable_entry_for_fn): Set delta to zero for a 4485 lost primary. 4486 4487 * class.c (build_vtbl_initializer): Check for a lost primary 4488 before calculating the vtable entry to throw away. 4489 44902002-01-02 Jason Merrill <jason@redhat.com> 4491 4492 * semantics.c (expand_body): Call outlining_inline_function when 4493 emitting an inline function out of line. 4494 44952002-01-02 Nathan Sidwell <nathan@codesourcery.com> 4496 4497 PR c++/5116, c++/764 reversion 4498 * call.c (build_new_op): Revert the instantiations. They are 4499 incorrect. 4500 45012002-01-02 Nathan Sidwell <nathan@codesourcery.com> 4502 4503 PR c++/5089 4504 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void. 4505 45062002-01-02 Nathan Sidwell <nathan@codesourcery.com> 4507 4508 PR c++/3716 4509 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst. 4510 (tsubst, case POINTER_TYPE): Handle pmfs here. 4511 (tsubst, case OFFSET_TYPE): Check it is not an offset to 4512 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE. 4513 45142002-01-02 Nathan Sidwell <nathan@codesourcery.com> 4515 4516 PR c++/35 4517 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too. 4518 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too. 4519 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the 4520 PARM_DECL. 4521 (tsubst_template_parms): Break up loop statements. 4522 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template 4523 parm PARM_DECLs don't get promoted. 4524 45252002-01-02 Nathan Sidwell <nathan@codesourcery.com> 4526 4527 PR c++/5123 4528 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR. 4529 (build_x_function_call): Cope with a COMPONENT_REF containing a 4530 TEMPLATE_ID_EXPR. 4531 45322002-01-02 Nathan Sidwell <nathan@codesourcery.com> 4533 4534 PR c++/5213 4535 * pt.c (convert_template_argument): Be more careful determining 4536 when RECORD_TYPE templates are or are not templates. 4537 45382002-01-02 Nathan Sidwell <nathan@codesourcery.com> 4539 4540 PR c++/775 4541 * cp-tree.h (handle_class_head): Adjust prototype. 4542 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P 4543 parameters. Use for all class heads. 4544 * parse.y (named_class_head_sans_basetype, named_class_head, 4545 named_complex_class_head_sans_basetype, 4546 named_class_head_sans_basetype_defn, 4547 unnamed_class_head): Remove. 4548 (class_head, class_head_apparent_template): Recognize class heads 4549 (class_head_decl, class_head_defn): New reductions. Process class 4550 heads. 4551 (structsp): Adjust class definition and class declaration 4552 reductions. 4553 (maybe_base_class_list): Give diagnostic on empty list. 4554 45552002-01-02 Nathan Sidwell <nathan@codesourcery.com> 4556 4557 PR c++/4379 4558 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a 4559 single non-static member. 4560 (unary_complex_lvalue): If it cannot be a pointer to member, don't 4561 make it so. Check it is not pointer to reference. 4562 45632002-01-02 Nathan Sidwell <nathan@codesourcery.com> 4564 4565 PR c++/5132 4566 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we 4567 are processing a template decl. 4568 45692002-01-02 Nathan Sidwell <nathan@codesourcery.com> 4570 4571 PR c++/5116, c++/764 4572 * call.c (build_new_op): Make sure template class operands are 4573 instantiated. Simplify arglist construction. 4574 4575