ChangeLog revision 102780
12002-08-27 Mark Mitchell <mark@codesourcery.com> 2 3 * cp-tree.h (warn_abi): Declare it. 4 * decl.c (warn_abi): Define it. 5 (cxx_decode_option): Set it. 6 * class.c (layout_virtual_bases): Warn about bugs in G++ that 7 result in incorrect object layouts. 8 (layout_class_type): Likewise. 9 102002-08-22 Jason Merrill <jason@redhat.com> 11 12 PR c++/5607 13 * search.c (check_final_overrider): No longer static. 14 * class.c (update_vtable_entry_for_fn): Call it. 15 * cp-tree.h: Adjust. 16 17 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define. 18 (cp_expr_size): New fn. 19 * call.c (convert_arg_to_ellipsis): Promote non-POD warning to error. 20 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue. 21 222002-08-14 Release Manager 23 24 * GCC 3.2 Released. 25 262002-08-03 Nathan Sidwell <nathan@codesourcery.com> 27 28 PR 7470. 29 C++ ABI change - vfunc ordering. 30 * class.c (add_virtual_function): Remove. 31 (dfs_modify_all_vtables): Take list of all declared 32 virtuals. Assign all that are not in primary base. 33 (check_for_override): Adjust comments. 34 (create_vtable_ptr): Take single list of virtuals. Build chain 35 of declared virtuals here. 36 (layout_class_type): Take single list of virtuals. Adjust. 37 (finish_struct_1): Keep virtuals on single list. Adjust. 38 392002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> 40 41 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c. 42 432002-07-17 Scott Snyder <snyder@fnal.gov> 44 45 PR c++/7320 46 * rtti.c (get_tinfo_decl): Set DECL_COMDAT. 47 482002-07-05 Nathan Sidwell <nathan@codesourcery.com> 49 50 Repair damage on weak-impared targets caused by my previous patch. 51 * cp-tree.h (import_export_tinfo): Add parameter. 52 * decl2.c (import_export_tinfo): Add parameter, post adjust 53 DECL_COMDAT. 54 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by 55 import_export_tinfo. 56 572002-06-30 Nathan Sidwell <nathan@codesourcery.com> 58 59 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ... 60 (CPTI_TYPE_INFO_PTR_TYPE): ... this. 61 (tinfo_decl_type): Replace with ... 62 (type_info_ptr_type): ... this. 63 (import_export_tinfo): Declare. 64 (tinfo_decl_p): Rename to ... 65 (unemitted_tinfo_decl_p): ... this. 66 * decl2.c (import_export_decl): Break out tinfo handling into ... 67 (import_export_tinfo): ... here. New function. 68 (finish_file): Adjust. 69 * rtti.c (TINFO_REAL_NAME): New macro. 70 (init_rtti_processing): Create the tinfo types. 71 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr. 72 (get_tinfo_decl): Adjust. 73 (get_tinfo_ptr): New function. 74 (get_type_id): Use it. 75 (tinfo_base_init): Create vtable decl here, if it doesn't exist. 76 (ptr_initializer): Use get_tinfo_ptr. 77 (ptm_initializer): Likewise. 78 (synthesize_tinfo_var): Break into ... 79 (get_pseudo_ti_init): ... this. Just create the initializer. 80 (get_pseudo_ti_desc): .. and this. 81 (create_real_tinfo_var): Remove. 82 (create_pseudo_type_info): Don't create the vtable decl here. 83 (get_vmi_pseudo_type_info): Remove. 84 (create_tinfo_types): Adjust. 85 (tinfo_decl_p): Rename to ... 86 (unemitted_tinfo_decl_p): ... here. Adjust. 87 (emit_tinfo_decl): Adjust. Create the initializer. 88 892002-06-14 Jason Merrill <jason@redhat.com> 90 91 C++ ABI changes. 92 * class.c (build_base_field): Set DECL_PACKED. 93 (layout_class_type): Don't use tail padding of PODs. 94 * mangle.c (write_unqualified_name): Fix template conversion op 95 mangling. 96 972002-05-18 Jason Merrill <jason@redhat.com> 98 99 PR c++/6611 100 * decl2.c (import_export_decl): If we clear 101 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set. 102 1032002-05-14 Jason Merrill <jason@redhat.com> 104 105 * rtti.c (get_tinfo_decl): Don't call comdat_linkage. 106 Do set DECL_COMDAT. 107 (synthesize_tinfo_var): Take the public decl. 108 (create_real_tinfo_var): Likewise. Check DECL_COMDAT. 109 (emit_tinfo_decl): Adjust. Call import_export_decl. 110 * decl2.c (import_export_decl): Simplify tinfo decl handling. 111 1122002-07-25 Release Manager 113 114 * GCC 3.1.1 Released. 115 1162002-07-12 Mark Mitchell <mark@codesourcery.com> 117 118 * class.c (add_method): Correct handling of conversion operators. 119 1202002-07-11 Mark Mitchell <mark@codesourcery.com> 121 122 PR c++/7224 123 * class.c (add_method): Simplify. 124 1252002-07-11 Jason Merrill <jason@redhat.com> 126 127 PR c++/7279 128 * tree.c (cp_copy_res_decl_for_inlining): Also copy 129 TREE_ADDRESSABLE. 130 1312002-07-10 Jason Merrill <jason@redhat.com> 132 133 PR c++/6255 134 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than 135 modifying the old one. 136 1372002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 138 139 * pt.c (can_complete_type_without_circularity): Add static to 140 function definition. 141 1422002-07-05 Jim Wilson <wilson@redhat.com> 143 144 * decl.c (mark_named_label_lists): Add missing & in call to 145 mark_binding_level. 146 1472002-07-05 Jason Merrill <jason@redhat.com> 148 149 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null 150 pointers. 151 152 PR optimization/7145 153 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL. 154 1552002-05-18 Jason Merrill <jason@redhat.com> 156 157 PR c++/6611 158 * decl2.c (import_export_decl): If we clear 159 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set. 160 1612002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 162 163 PR c++/6944 164 * init.c (build_aggr_init): Remove qualifiers of init before calling 165 build_vec_init. 166 (build_vec_init): Flatten multi-dimensional array during cleanup. 167 (build_vec_delete_1): Abort if the type of each element is array. 168 1692002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 170 171 PR c++/6716 172 * pt.c (can_complete_type_without_circularity): New function. 173 (instantiate_class_template): Use it. 174 * typeck2.c (incomplete_type_error): Improve error message 175 due to incomplete fields. 176 1772002-07-01 Mark Mitchell <mark@codesourcery.com> 178 179 PR c++/7112 180 * mangle.c (write_expression): Add mangling for sizeof when 181 applied to a type. 182 * operators.def: Remove stale comment. 183 1842002-06-27 Mark Mitchell <mark@codesourcery.com> 185 186 PR c++/6695 187 * pt.c (tsubst_friend_class): Substitute into the context of the 188 friend before using it. 189 1902002-06-23 Matt Thomas <matt@3am-software.com> 191 192 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to 193 "#if VMS_TARGET". 194 1952002-06-20 Richard Henderson <rth@redhat.com> 196 197 PR c++/6747 198 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early. 199 Call put_var_into_stack. 200 2012002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 202 203 PR c++/6892 204 * pt.c (tsubst_expr): Handle FILE_STMT. 205 2062002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 207 208 PR c++/6723 209 * pt.c (lookup_template_class): Don't build complete argument of 210 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template 211 argument. 212 2132002-06-16 Richard Henderson <rth@redhat.com> 214 215 PR opt/6793 216 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test 217 after template instantiation. 218 2192002-06-07 H.J. Lu (hjl@gnu.org) 220 221 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT. 222 2232002-05-23 Neil Booth <neil@daikokuya.demon.co.uk> 224 225 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. 226 * cp-tree.h (cxx_post_options): Kill. 227 * cp-lex.c (cxx_post_options): Kill. 228 2292002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 230 231 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing. 232 2332002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 234 235 PR c++/186, DR 259 236 * pt.c (do_decl_instantiation): Don't complain explicit 237 instantiation after explicit specialization. 238 (do_type_instantiation): Likewise. 239 2402002-05-09 Jason Merrill <jason@redhat.com> 241 242 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P. 243 2442002-05-15 Alexandre Oliva <aoliva@redhat.com> 245 246 * cp-tree.h (struct lang_type): Added non_zero_init. 247 (CLASSTYPE_NON_ZERO_INIT_P): New macro. 248 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare. 249 * class.c (check_field_decls): Test non_zero_init. 250 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for 251 zero-to-NULL conversions. 252 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a 253 type that needs zero-initialization without zeros. 254 (check_initializer_decl): Compute zero-initializer for types 255 that require a non-trivial one. 256 * init.c (build_forced_zero_init): New function. 257 (build_default_init): Use it. 258 * tree.c (zero_init_p): New function. 259 * typeck2.c (force_store_init_value): New function. 260 (process_init_constructor): Create non-trivial zero-initializers 261 for array members and class fields. 262 2632002-05-14 Release Manager 264 265 * GCC 3.1 Released. 266 2672002-05-03 Jason Merrill <jason@redhat.com> 268 269 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h. 270 2712002-05-02 Mark Mitchell <mark@codesourcery.com> 272 273 * init.c (perform_base_cleanups): Correct order of base class 274 cleanups. 275 2762002-05-01 Mark Mitchell <mark@codesourcery.com> 277 278 PR c++/6527 279 * init.c (perform_base_cleanups): Emit cleanups in reverse order 280 of construction. 281 2822002-05-01 Gabriel Dos Reis <gdr@codesourcery.com> 283 284 * error.c (dump_type): Be careful about implicit typenames. 285 2862002-04-30 Mark Mitchell <mark@codesourcery.com> 287 288 ABI change, returning simple classes from functions. 289 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if 290 TYPE_HAS_TRIVIAL_INIT_REF is false or 291 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true. 292 2932002-04-30 Jason Merrill <jason@redhat.com> 294 295 PR debug/6436 296 * decl.c (grokdeclarator): Don't override TYPE_NAME of an 297 anonymous class with a typedef if there are attributes. 298 2992002-04-29 Paul Eggert <eggert@twinsun.com> 300 301 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$. 302 3032002-04-29 Jakub Jelinek <jakub@redhat.com> 304 305 PR c++/6477 306 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is 307 non-NULL first. 308 3092002-04-29 Mark Mitchell <mark@codesourcery.com> 310 311 PR c++/6492 312 * pt.c (tsubst_friend_class): If the friend has an explicit scope, 313 enter that scope before name lookup. 314 315 PR c++/6486 316 * method.c (do_build_copy_constructor): Avoid building 317 cv-qualified reference types. 318 3192002-04-29 Nathan Sidwell <nathan@codesourcery.com> 320 321 PR c++/5719 322 * decl.c (grok_op_properties): Assignment ops don't have to return 323 by value. operator% should. 324 3252002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> 326 327 PR c/6343 328 * decl.c (duplicate_decls): Call merge_weak. 329 3302002-04-26 Mark Mitchell <mark@codesourcery.com> 331 332 PR c++/6479 333 * method.c (do_build_assign_ref): Pass a derivation to 334 build_method_call when calling base class assignment operators. 335 3362002-04-24 Mark Mitchell <mark@codesourcery.com> 337 338 * mangle.c (write_type): Don't use TYPE_MAIN_VARIANT when writing 339 out an array type. 340 (write_CV_qualifiers_for_type): Use TYPE_QUALS, not cp_type_quals, 341 to determine qualifiers. 342 343 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs 344 void. 345 3462002-04-24 Jason Merrill <jason@redhat.com> 347 348 PR c++/6331 349 * method.c (do_build_copy_constructor): Use cp_build_qualified_type. 350 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals. 351 The pedwarn for array assignment is now unconditional. 352 * tree.c (build_cplus_array_type_1): Still process simple array types 353 normally in templates. 354 355 PR c++/6395 356 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i 357 stuff for comdats. 358 3592002-04-23 Jason Merrill <jason@redhat.com> 360 361 PR c++/5504 - but re-breaks c++/411 362 * init.c (push_base_cleanups): Rename to perform_base_cleanups. 363 Expand base cleanups now rather than pushing them. 364 * decl.c (begin_destructor_body): Don't call push_base_cleanups. 365 (finish_destructor_body): Call perform_base_cleanups. 366 * cp-tree.h: Adjust prototype. 367 3682002-04-23 Jakub Jelinek <jakub@redhat.com> 369 370 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class 371 node with attributes. 372 3732002-2-23 David O'Brien <obrien@FreeBSD.org> 374 375 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add. 376 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given. 377 3782002-04-23 Mark Mitchell <mark@codesourcery.com> 379 380 PR c++/6256: 381 * pt.c (tsubst_friend_class): Handle templates with explicit 382 nested names. 383 384 PR c++/6331: 385 * typeck.c (merge_types): Remember the cv-qualification of pointer 386 types when merging them. 387 3882002-04-18 Jason Merrill <jason@redhat.com> 389 390 PR c++/5658 391 * search.c (setup_class_bindings): A class template qualifies as a 392 type binding. 393 3942002-04-17 Jakub Jelinek <jakub@redhat.com> 395 396 PR c++/6316 397 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop 398 before expanding. 399 4002002-04-16 Mark Mitchell <mark@codesourcery.com> 401 402 * init.c (begin_init_stmts): Remove commented out code. 403 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE. 404 * semantics.c (begin_gobal_stmt_expr): Adjust call to 405 expand_start_stmt_expr. 406 4072002-04-15 Mark Mitchell <mark@codesourcery.com> 408 409 * decl.c (register_dtor_fn): Pass the address of dso_handle, not 410 dso_handle itself, to __cxa_atexit. 411 4122002-04-14 Jakub Jelinek <jakub@redhat.com> 413 414 * class.c (layout_virtual_bases): Do all dsize computation on trees. 415 4162002-04-12 Mark Mitchell <mark@codesourcery.com> 417 418 PR c++/5373. 419 * semantics.c (finish_expr_stmt): Remember the type of the 420 expression before any conversions are performed. 421 422 PR c++/5189. 423 * call.c (add_template_candidate_real): Do not treat member 424 templates as copy constructors. 425 426 * decl.c (duplicate_decls): Do not copy the RTL for a variable 427 declaration if the old variable had an incomplete type and the new 428 variable does not. 429 (complete_vars): Do not call layout_decl for completed variables. 430 4312002-04-11 Andrew Haley <aph@redhat.com> 432 433 * typeck.c (type_after_usual_arithmetic_conversions): 434 If two types have the same variant, return immediately. 435 When two floating-point operands are the same precision: 436 convert to float if one of the operands is float; 437 if neither operand is one of the standard types, return the type 438 of the first operand. 439 4402002-04-12 Richard Sandiford <rsandifo@redhat.com> 441 442 * decl.c (duplicate_decls): Don't try to unify an implicit typedef 443 with an explicit one. 444 (follow_tag_typedef): New. 445 (lookup_tag): Use it to extract the tag of an explicit typedef. 446 (xref_tag): Likewise. 447 4482002-04-10 Nathan Sidwell <nathan@codesourcery.com> 449 450 PR c++/5507 451 * decl.c (make_typename_type): Remove implicit typenameness. 452 4532002-04-09 Jason Merrill <jason@redhat.com> 454 455 PR optimization/6189 456 * semantics.c (genrtl_start_function): Don't free 457 DECL_SAVED_FUNCTION_DATA for inline functions. 458 4592002-04-08 Paolo Carlini <pcarlini@unitus.it> 460 461 * parse.y (namespace_qualifier, maybe_identifier, 462 begin_explicit_instantiation, end_explicit_instantiation, 463 apparent_template_type, .finish_template_type, 464 do_id, maybe_init, defarg_again, component_decl_1): 465 Add ending ';', in accordance with POSIX. 466 4672002-04-06 Mark Mitchell <mark@codesourcery.com> 468 469 PR c++/5571 470 * class.c (layout_class_type): Remember incomplete static 471 variables. 472 (finish_struct_1): Call complete_vars, not 473 hack_incomplete_structures. 474 * cp-tree.h (hack_incomplete_structures): Rename to ... 475 (complete_vars): ... this. 476 (struct saved_scope): Remove incomplete. 477 (namespace_scope_incomplete): Remove. 478 * decl.c (struct binding_level): Remove incomplete. 479 (incomplete_vars): New variable. 480 (mark_binding_level): Don't mark incomplete. 481 (print_binding_level): Don't print it. 482 (mark_saved_scope): Don't mark incomplete. 483 (pushdecl): Use maybe_register_incopmlete_var. 484 (cxx_init_decl_processing): Register incomplete_vars for GC. 485 (start_decl_1): Clarify error message. 486 (hack_incomplete_vars): Remove. 487 (maybe_register_incomplete_var): New function. 488 (complete_vars): Likewise. 489 4902002-04-06 Jason Merrill <jason@redhat.com> 491 492 PR c++/4934 493 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is 494 set before checking it. 495 496 PR c++/6179 497 * method.c (implicitly_declare_fn): Pass unqualified type to 498 synthesize_exception_spec. 499 5002002-04-03 Jason Merrill <jason@redhat.com> 501 502 PR c++/525 503 * init.c (build_member_call): Convert to intermediate base even 504 with -pedantic. 505 506 PR c++/5636 507 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on 508 cleanup for nrv. 509 510 PR c++/5104 511 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception 512 specifiers. 513 [METHOD_TYPE]: Use same code as FUNCTION_TYPE. 514 5152002-04-03 Roger Sayle <roger@eyesopen.com> 516 517 PR c++/5998: 518 * decl.c (duplicate_decls): Don't mess with assembler names when 519 redeclaring builtin functions as static. 520 5212002-04-01 Roger Sayle <roger@eyesopen.com> 522 523 PR c++/5998: 524 * decl.c (duplicate_decls): Overwrite the RTL when (and only 525 when) overwriting a built-in function. Don't use COPY_DECL_RTL, 526 but follow the SET_DECL_RTL idiom used elsewhere in the function. 527 5282002-03-28 Roger Sayle <roger@eyesopen.com> 529 530 PR c++/5998: 531 * decl.c (cxx_init_decl_processing): Re-enable built-in functions 532 in the g++ front-end. 533 (duplicate_decl): Allow redefinition of anticipated built-ins. 534 Fix inlining problem by over-writing the old DECL_RTL. 535 (lookup_namespace_name): Fail to find an identifier in the 536 specified namespace if its still anticipated. 537 (builtin_function_1): New function split out from builtin_function 538 to create a builtin in the current namespace with given context. 539 (builtin_function): Call builtin_function_1 to define the 540 appropriate builtins in both the std and global namespaces. 541 (select_decl): Don't test for anticipated decls here. 542 (unqualified_namespace_lookup): Instead ignore them whilst 543 searching through scopes and namespaces. 544 * decl2.c (do_nonmember_using_decl): If a using declaration 545 specifies an anticipated built-in function, mark it as no longer 546 anticipated in that scope. 547 (ambiguous_decl): Avoid resolving to an anticipated decl. 548 * lex.c (do_scoped_id): Fail to find an identifier in the global 549 namespace if its still anticipated. 550 5512002-03-29 Jakub Jelinek <jakub@redhat.com> 552 553 PR c++/6073 554 * class.c (finish_struct_1): Update static field's DECL_MODE even 555 if its type is a variant of t. 556 5572002-03-27 Mark Mitchell <mark@codesourcery.com> 558 559 PR c++/4884 560 * call.c (build_op_delete_call): Allow for the fact the placement 561 may be a COMPOUND_EXPR. 562 5632002-03-26 Nathan Sidwell <nathan@codesourcery.com> 564 565 PR c++/5682 566 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better. 567 (dfs_skip_nonprimary_vbases_unmarkedp): Remove. 568 (dfs_skip_nonprimary_vbases_markedp): Remove. 569 * search.c (get_shared_vbase_if_not_primary): Remove. 570 (dfs_skip_nonprimary_vbases_unmarkedp): Remove. 571 (dfs_skip_nonprimary_vbases_markedp): Remove. 572 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo. 573 (dfs_marked_real_bases_queue_p): Likewise. 574 5752002-03-26 Mark Mitchell <mark@codesourcery.com> 576 577 PR c++/4884 578 * init.c (build_new_1): Allow for the fact the result of 579 build_function_call may be a COMPOUND_EXPR. 580 5812002-03-25 Jakub Jelinek <jakub@redhat.com> 582 583 PR c++/6037 584 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node. 585 5862002-03-22 Jeff Knaggs <jknaggs@redhat.com> 587 588 * typeck.c (expand_ptrmemfunc_cst): Scale idx down to an index 589 into the vtable_entry array regardless of 590 TARGET_PTRMEMFUNC_VBIT_LOCATION. 591 5922002-03-21 Aldy Hernandez <aldyh@redhat.com> 593 594 * tree.c (cp_cannot_inline_tree_fn): Same. 595 5962002-03-20 Jason Merrill <jason@redhat.com> 597 598 PR c++/2136 599 * init.c (build_delete): Check access for a member op delete here. 600 * decl2.c (delete_sanity): Not here. 601 6022002-03-19 Jason Merrill <jason@redhat.com> 603 604 PR c++/5118 605 * class.c (get_vfield_name): Use the constructor_name. 606 6072002-03-18 Eric Botcazou <ebotcazou@multimania.com> 608 609 PR c++/3882 610 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling... 611 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer 612 only after recording the declaration. 613 6142002-03-18 Ashif Harji <asharji@uwaterloo.ca> 615 616 * lang-specs.h (compiler default_compilers): Add 617 -no-integrated-cpp flag to invoke an external cpp. 618 6192002-03-18 Jason Merrill <jason@redhat.com> 620 621 PR c++/2039 622 * init.c (resolve_offset_ref): Hand off to build_component_ref. 623 624 PR c++/4222, c++/5995 625 * call.c (build_over_call): Fix empty class logic. 626 627 PR c++/3870 628 * cp-tree.h (struct saved_scope): Add last_parms field. 629 * decl.c (maybe_push_to_top_level): Save last_function_parms. 630 (pop_from_top_level): Restore it. 631 632 PR c++/4377 633 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip 634 NON_LVALUE_EXPRs. 635 636 PR c++/4003 637 * pt.c (tsubst_friend_function): Use decl_namespace_context. 638 639 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch. 640 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a 641 type with a nontrivial destructor. 642 6432002-03-17 Jason Merrill <jason@redhat.com> 644 645 PR c++/4460 646 * class.c (build_base_path): Virtual base layout is fixed in 647 in-charge [cd]tors. 648 649 PR c++/5757 650 * init.c (build_new_1): Pass the right pointer to op delete. 651 6522002-03-15 Richard Henderson <rth@redhat.com> 653 654 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op. 655 6562002-03-15 Richard Henderson <rth@redhat.com> 657 658 * decl.c (finish_function): Reapply accidentally reverted 659 2002-02-28 patch. 660 6612002-03-15 Mark Mitchell <mark@codesourcery.com> 662 663 * cp-tree.h (CLEANUP_DECL): Remove. 664 (CLEANUP_EXPR): Likewise. 665 * decl.c (destroy_local_var): Simplify. 666 (maybe_build_cleanup): Tidy. 667 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT. 668 * semantics.c (cp_expand_stmt): Likewise. 669 * cp/tree.c (cp_statement_code_p): Likewise. 670 6712002-03-15 Richard Henderson <rth@redhat.com> 672 673 * decl.c: Include c-pragma.h. 674 (start_decl, start_function): Invoke maybe_apply_pragma_weak. 675 * Make-lang.in: Update dependencies. 676 6772002-03-15 Jason Merrill <jason@redhat.com> 678 679 PR c++/5857 680 * decl.c (duplicate_decls): Use merge_types instead of common_type. 681 * typeck.c (common_type): Just hand off to 682 type_after_usual_arithmetic_conversions and 683 composite_pointer_type. 684 (merge_types): New fn. 685 (commonparms): Use it instead of common_type. 686 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE. 687 (composite_pointer_type): Also handle attributes. 688 * cp-tree.h: Declare merge_types. 689 690 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT 691 variables. 692 * decl2.c (maybe_make_one_only): Also mark the decl as needed. 693 6942002-03-14 Jakub Jelinek <jakub@redhat.com> 695 696 PR c++/5908 697 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too. 698 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING. 699 7002002-03-12 Richard Sandiford <rsandifo@redhat.com> 701 702 * mangle.c (write_builtin_type): Handle 128-bit integers even if 703 they are not a standard integer type. 704 7052002-03-12 Nathan Sidwell <nathan@codesourcery.com> 706 707 PR c++/5659 708 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here. 709 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for 710 definitions. 711 7122002-03-11 Nathan Sidwell <nathan@codesourcery.com> 713 714 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>, 715 DR209 is now not a defect. 716 * cp-tree.h (skip_type_access_control): Remove. 717 * decl.c (grokdeclarator): Do type access control for friend 718 declarations. 719 * semantics.c (decl_type_access_control): Don't reset 720 current_type_lookups. 721 (save_type_access_control): Always save the lookups. 722 (skip_type_access_control): Remove. 723 (finish_class_definition): Don't change type_lookups. 724 7252002-03-11 Nathan Sidwell <nathan@codesourcery.com> 726 727 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>, 728 It is incorrect. 729 * typeck.c (build_static_cast): Compare non-qualified types 730 with pointer to member conversions. 731 7322002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org> 733 734 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of 735 conditional return void. 736 7372002-03-02 Nathan Sidwell <nathan@codesourcery.com> 738 739 PR c++/775 740 * decl.c (lookup_tag): Only reject enum/class mismatch, not 741 class/union mismatch. 742 * parse.y (check_class_key): New function. 743 (structsp): Call it. 744 7452002-03-01 Michael Matz <matz@suse.de> 746 747 * typeck.c (cp_pointer_int_sum): Complete inner type which is 748 used later by size_in_bytes(). 749 7502002-03-01 Phil Edwards <pme@gcc.gnu.org> 751 752 * cp-tree.h (build_init): Remove prototype. 753 7542002-03-01 Phil Edwards <pme@gcc.gnu.org> 755 756 * cp-tree.h: Require __GNUC__ to be #defined. 757 (build_init): Add missing prototype. 758 7592002-02-28 Jason Merrill <jason@redhat.com> 760 761 * search.c (lookup_base_r): Don't clear is_non_public just because 762 we found a friendly scope. 763 764 * decl.c (finish_function): Only warn about missing return 765 statement with -Wreturn-type. 766 7672002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org> 768 769 PR c++/4093 770 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition 771 to void. 772 7732002-02-22 Jakub Jelinek <jakub@redhat.com> 774 775 PR other/5746 776 * semantics.c (finish_switch_cond): Don't call get_unwidened 777 if error_mark_node. 778 7792002-02-22 Nathan Sidwell <nathan@codesourcery.com> 780 781 PR c++/2645, DR 295 782 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals, 783 tf_keep_type_decl. 784 (make_typename_type): Use tsubst_flags_t. 785 * decl.c (make_typename_type): Adjust. Return non-artificial 786 TYPE_DECLs, if required. 787 (grokdeclarator): Simplify CVR qualification handling. Allow bad 788 qualifiers on typedef types. 789 * decl2.c (handle_class_head): Adjust make_typename_type call. 790 * parse.y (nested_name_specifier): Likewise. 791 (typename_sub0): Likewise. 792 (typename_sub1): Likewise. 793 * pt.c (convert_template_argument): Adjust make_typename_type 794 return value. 795 (tsubst): Adjust cp_build_qualified_type_real calls. 796 (check_cv_quals_for_unify): Cope with alowing bad qualifications 797 on template type parms. 798 (instantiate_decl): Recheck substitutions to give warnings on bad 799 qualifications. 800 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals. 801 8022002-02-21 Aldy Hernandez <aldyh@redhat.com> 803 804 * cp/decl.c (duplicate_decls): Merge always_inline attribute. 805 806 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0 807 unless DECL_ALWAYS_INLINE. 808 8092002-02-20 Jakub Jelinek <jakub@redhat.com> 810 811 * typeck.c (cp_pointer_int_sum): Renamed from 812 pointer_int_sum, call pointer_int_sum. 813 8142002-02-20 Jakub Jelinek <jakub@redhat.com> 815 816 * decl.c (duplicate_decls): Return 0 if issued error about 817 redeclaration. 818 8192002-02-19 Jason Merrill <jason@redhat.com> 820 821 ABI change: Mangle `void (A::*)() const' as 822 M1AKFvvE, not MK1AFvvE. 823 * mangle.c (write_function_type): Write cv-quals for member 824 function type here. 825 (write_pointer_to_member_type): Not here. 826 8272002-02-18 Jason Merrill <jason@redhat.com> 828 829 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header. 830 (do_decl_instantiation): Likewise. 831 8322002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org> 833 834 PR c++/5685 835 * decl.c (duplicate_decls): Make warning unconditional 836 if duplicate default argument declarations are present. 837 8382002-02-17 Jakub Jelinek <jakub@redhat.com> 839 840 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit 841 shortening. 842 8432002-02-15 Nathan Sidwell <nathan@codesourcery.com> 844 845 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs, 846 remove incorrect comment. Move #if 0'd code to common path. Use 847 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication. 848 8492002-02-13 Jason Merrill <jason@redhat.com> 850 851 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns. 852 (finish_function): Don't warn if current_function_returns_null. 853 854 * typeck2.c (digest_init): Do handle values of vector type. 855 856 * typeck2.c (digest_init, process_init_constructor): Treat vectors 857 like arrays. 858 8592002-02-11 Jason Merrill <jason@redhat.com> 860 861 * parse.y (reserved_declspecs): Don't handle attributes. 862 (reserved_typespecquals): Handle them here. 863 * Make-lang.in (parse.c): Adjust expected conflicts. 864 8652002-02-08 Jakub Jelinek <jakub@redhat.com> 866 867 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr 868 instead of compstmt. 869 (compstmt_or_stmtexpr): Renamed from compstmt. 870 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type. 871 8722002-02-07 Nathan Sidwell <nathan@codesourcery.com> 873 874 Rename instantiate_type_flags to tsubst_flags_t & expand use. 875 * cp-tree.h (instantiate_type_flags): Rename to ... 876 (tsubst_flags_t): ... here. Rename itf_complain to tf_error, 877 add tf_warning flag. 878 (instantiate_type): Adjust prototype. 879 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class, 880 do_type_instantiation, cp_build_qualified_type_real): Likewise. 881 cp_build_qualified_type: Adjust. 882 * class.c (instantiate_type): Adjust parameter. Rename itf_* to 883 tf_*. 884 * call.c (standard_conversion): Rename itf_* to tf_*. 885 (reference_binding): Likewise. 886 (convert_like_real): Likewise. 887 * cvt.c (cp_convert_to_pointer): Likewise. 888 (convert_to_reference): Likewise. 889 * decl.c (lookup_namespace_name): Use tf_* flags. 890 (make_typename_type): Likewise. 891 (grokdeclarator): Likewise. 892 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage. 893 (coerce_template_template_parms, convert_template_argument, 894 coerce_template_parms, maybe_get_template_decl_from_type_decl, 895 lookup_template_class, tsubst_friend_function, tsubst_friend_class, 896 instantiate_class_template, tsubst_template_arg_vector, 897 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument, 898 tsubst_decl, tsubst_arg_types, tsubst_function_type, 899 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr, 900 instantiate_template, fn_type_unification, 901 resolve_overloaded_unification, verify_class_unification, 902 unify, get_bindings_real, do_type_instantiation, 903 regenerate_decl_from_template, instantiate_decl, 904 tsubst_initializer_list, tsubst_enum, 905 get_mostly_instantiated_function_type, 906 invalid_nontype_parm_type_p): Likewise. 907 * tree.c (cp_build_qualified_type_real): Likewise. 908 * typeck.c (build_binary_op): Rename itf_* to tf_*. 909 (build_ptrmemfunc): Likewise. 910 (convert_for_assignment): Likewise. 911 9122002-02-07 Nathan Sidwell <nathan@codesourcery.com> 913 914 PR c++/109 915 * decl.c (grokdeclarator): Allow friend declarations from 916 dependent types. 917 * decl2.c (handle_class_head): Don't push into template parm contexts. 918 * pt.c (push_template_decl_real): Template parm contexts are never 919 being defined. 920 9212002-02-05 Alexandre Oliva <aoliva@redhat.com> 922 923 * class.c: Include target.h. 924 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY, 925 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS 926 bit-field layout. 927 * Make-lang.in: Adjust deps. 928 9292002-02-05 Jason Merrill <jason@redhat.com> 930 931 * error.c (dump_type): Be more helpful about VECTOR_TYPE. 932 9332002-02-04 Jakub Jelinek <jakub@redhat.com> 934 935 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE. 936 (finish_switch_cond): Set SWITCH_TYPE. 937 9382002-02-04 Richard Henderson <rth@redhat.com> 939 940 * method.c (use_thunk): Always initialize the block tree. Reindent. 941 * semantics.c (expand_body): Emit thunks after function, not before. 942 9432002-02-04 Jason Merrill <jason@redhat.com> 944 945 * decl.c (start_function): Call cplus_decl_attributes immediately 946 after grokdeclarator. 947 948 * decl.c (start_function): Combine DECL_RESULT handling code. 949 9502002-02-03 Jason Merrill <jason@redhat.com> 951 952 * xref.c: Remove. 953 * Make-lang.in (CXX_OBJS): Remove cp/xref.o 954 (cp/xref.o): Remove dependencies. 955 * class.c (finish_struct_1, check_methods): Don't call xref fns. 956 (finish_struct_1): Likewise. 957 * friend.c (make_friend_class): Likewise. 958 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise. 959 * spew.c (read_process_identifier): Likewise. 960 9612002-02-01 Jason Merrill <jason@redhat.com> 962 963 PR c++/4872 964 * decl.c (finish_function): Warn about a non-void function with 965 no return statement and no abnormal exit. 966 * cp-tree.h (struct cp_language_function): Add returns_abnormally. 967 (current_function_returns_abnormally): New macro. 968 * call.c (build_call): Set it. 969 970 * typeck.c (build_component_ref): Always complain about offsetof 971 constructs on non-PODs. Only make it an error for members of 972 virtual bases. 973 974 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS. 975 (dump_function_decl): Always dump parms. 976 977 * decl2.c (finish_static_data_member_decl): Complain about a local 978 class with a static data member. 979 980 PR c++/4286 981 * search.c (lookup_field_1): Don't xref a static data member 982 just because we looked it up. 983 9842002-01-31 Jason Merrill <jason@redhat.com> 985 986 * Make-lang.in (parse.c): Handle .output file. 987 988 PR c++/3395 989 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES, 990 not TREE_TYPE. 991 * semantics.c (finish_class_definition): Adjust. 992 993 Allow attributes in parms and casts. 994 * parse.y (named_parm): Don't strip attrs. 995 (declmods): Remove 'attributes' production. 996 (nonempty_cv_qualifiers): Accept attributes. 997 (ATTRIBUTE): Give precedence. 998 * decl.c (groktypename): Handle attributes. 999 (grokparms): Likewise. 1000 10012002-01-29 Jakub Jelinek <jakub@redhat.com> 1002 1003 * decl2.c (cxx_decode_option): Pass 0 as last argument to 1004 cpp_handle_option. 1005 * lang-specs.h: Use cpp_unique_options instead of cpp_options 1006 when used together with cc1_options. 1007 10082002-01-29 Nathan Sidwell <nathan@codesourcery.com> 1009 1010 PR c++/5132 1011 * typeck2.c (digest_init): Make sure non-array core type is 1012 instantiated. 1013 * decl2.c (reparse_absdcl_as_casts): Just store the type in the 1014 constructor, rather than build a new one. 1015 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the 1016 PURPOSE of constructor elts. 1017 10182002-01-23 Zack Weinberg <zack@codesourcery.com> 1019 1020 * Make-lang.in (parse.c): Adjust expected number of 1021 shift-reduce conflicts. 1022 (decl.o): Depend on diagnostic.h. 1023 * decl.c: Include diagnostic.h. 1024 (grokdeclarator): Check for null pointer. 1025 (finish_function): Don't abort when 1026 current_binding_level->parm_flag != 1, if errors have 1027 occurred; throw away the statement tree and extra binding 1028 levels, and continue. 1029 * lex.c (note_list_got_semicolon): Check for null pointer. 1030 * method.c (hack_identifier): Just return error_mark_node if 1031 value is error_mark_node. 1032 * parse.y (primary: TYPEID(type_id)): No need to use 1033 TYPE_MAIN_VARIANT here. 1034 (handler_seq): Accept an empty list of catch clauses and 1035 generate a fake handler block to avoid later crashes. 1036 (ansi_raise_identifier): Accept the error token too. 1037 * semantics.c (begin_class_definition, 1038 finish_class_definition): Check for error_mark_node. 1039 10402002-01-23 Zack Weinberg <zack@codesourcery.com> 1041 1042 * typeck2.c (friendly_abort): Delete definition. 1043 * cp-tree.h (friendly_abort): Don't prototype. 1044 (my_friendly_assert): Use fancy_abort. 1045 10462002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org> 1047 1048 * cp-tree.h (my_friendly_abort): Remove. 1049 10502002-01-23 Jakub Jelinek <jakub@redhat.com> 1051 1052 * spew.c (pending_inlines, pending_inlines_tail, 1053 processing_these_inlines): Make static. 1054 (mark_pending_inlines): Remove static. 1055 (begin_parsing_inclass_inline): If in function, save pi 1056 for GC to cp_function_chain->unparsed_inlines instead. 1057 (process_next_inline): Likewise. 1058 * cp-tree.h (struct cp_language_function): Add unparsed_inlines. 1059 (mark_pending_inlines): Add prototype. 1060 * decl.c (spew_debug): Remove unused extern. 1061 (mark_lang_function): Call mark_pending_inlines. 1062 10632002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org> 1064 1065 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c, 1066 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c, 1067 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: 1068 Change my_fancy_abort() to abort(). 1069 10702002-01-23 Jason Merrill <jason@redhat.com> 1071 1072 PR c++/5453 1073 * class.c (fixed_type_or_null): Fix thinko. 1074 1075 PR c++/3331 1076 * init.c (resolve_offset_ref): Use build_indirect_ref. 1077 1078 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'. 1079 10802002-01-22 Jason Merrill <jason@redhat.com> 1081 1082 * parse.y (function_body): Suppress the block for the outermost 1083 curly braces. 1084 * decl.c (pushdecl): Don't try to skip it. 1085 (begin_function_body): Keep the block we create, not the next one. 1086 * init.c (emit_base_init): Don't mess with keep_next_level. 1087 1088 * class.c (build_base_path): Tweak formatting. 1089 10902002-01-19 Nathan Sidwell <nathan@codesourcery.com> 1091 1092 Fix regression introduced with patch for c++/775 1093 * parse.y (class_head_defn): Check for template specializations 1094 with a different class-key. 1095 10962002-01-17 Jason Merrill <jason@redhat.com> 1097 1098 * decl.c (begin_constructor_body, begin_destructor_body): New fns. 1099 (begin_function_body): Call them and keep_next_level. 1100 * init.c (emit_base_init): Call keep_next_level. 1101 * semantics.c (setup_vtbl_ptr): Lose. 1102 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p. 1103 (vtbls_set_up_p): Lose. 1104 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init. 1105 * method.c (do_build_copy_constructor): Likewise. 1106 (synthesize_method): Call finish_mem_initializers. 1107 * parse.y (nodecls): Likewise. 1108 1109 * error.c (dump_type_suffix): Print the exception specs before 1110 recursing. 1111 (dump_function_decl): Here, too. 1112 1113 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT. 1114 11152002-01-10 Ira Ruben <ira@apple.com> 1116 1117 PR c++/907 1118 * decl.c (start_method): Handle attrlist. 1119 11202002-01-10 Jakub Jelinek <jakub@redhat.com> 1121 1122 * decl2.c (max_tinst_depth): Increase default limit to 500. 1123 11242002-01-10 Graham Stott <grahams@redhat.com> 1125 1126 * spew.c (YYCHAR): Uppercase macro parameter and add 1127 parenthesis. 1128 (YYCODE): Likewise. 1129 (NAME): Uppercase macro parameter. 1130 11312002-01-09 Graham Stott <grahams@redhat.com> 1132 1133 * decl.h (grokdeclarator): Wrap long line. 1134 1135 * semantics.c (FINISH_COND): Uppercase macro paramaters and 1136 add parenthesis. 1137 11382002-01-08 Graham Stott <grahams@redhat.com> 1139 1140 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis. 1141 (PALLOC): Uppercase macro parameter and whitespace. 1142 (SALLOC): Uppercase macro parameter. 1143 (SFREE): Uppercase macros parameter, add parenthese and 1144 whitespace. 1145 (STREQL): Uppercase macro parameter and whitespace. 1146 (STRNEQ): Likewise. 1147 (STRLSS): Likewise. 1148 (STRLEQ): Likewise. 1149 (STRGTR): Likewise. 1150 (STRGEQ): Likewise. 1151 1152 * call.c (convert_like): Add parenthesis and wrap. 1153 (convert_like_with_context): Likewise. 1154 (ICS_RANK): Whitespace. 1155 (NEED_TEMPORARY_P): Remove parenthesis. 1156 1157 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and 1158 whitespace. 1159 (VTT_MARKED_BINFO_P): Likewise. 1160 1161 * decl.c (BINDING_LEVEL): Add parenthesis. 1162 (DEF_OPERATOR): Likewise. 1163 1164 * mangle.c (MANGLE_TRACE): Add parenthesis. 1165 (MANGLE_TRACE_TREE): Likewise. 1166 (write_signed_number): Likewise. 1167 (write_unsigned_number): Likewise. 1168 1169 * pt.c (ccat): Uppercase macro parameter. 1170 (cat): Likewise 1171 1172 * search.c (SET_BINFO_ACCESS): Add parenthesis. 1173 11742002-01-07 Jason Merrill <jason@redhat.com> 1175 1176 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch 1177 to pedwarn. 1178 1179 PR c++/3536 1180 * method.c (make_thunk): If !flag_weak, give the thunk the 1181 function's linkage. 1182 (use_thunk): Here, too. 1183 11842002-01-07 Graham Stott <grahams@redhat.com> 1185 1186 * error.c: Update copyright date. 1187 (print_scope_operator): Add parenthesis. 1188 (print_left_paren): Likewise. 1189 (print_right_paren): Likewise. 1190 (print_left_bracket): Likewise. 1191 (print_right_bracket): Likewise. 1192 (print_template_argument_list_start): Likewise. 1193 (print_template_argument_list_end): Likewise. 1194 (print_non_consecutive_character): Likewise. 1195 (print_tree_identifier): Likewise. 1196 (print_identifier): Likewise. 1197 (NEXT_CODE): Uppercase macro parameter. 1198 (ident_fndecl): Delete unused. 1199 (GLOBAL_THING): Likewise. 1200 12012002-01-06 Graham Stott <grahams@redhat.com> 1202 1203 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis. 1204 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise. 1205 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise. 1206 (RECORD_OR_UNION_TYPE_CHECK): Likewise. 1207 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise. 1208 (C_IS_RESERVED_WORD): Uppercase macro parameter. 1209 (C_RID_YYCODE) Likewise. 1210 (ptrmem_cst): Use rtx. 1211 (LOCAL_BINDING_P): Add whitespace. 1212 (INHERITED_VALUE_BINDING_P): Likewise. 1213 (BINDING_SCOPE): Wrap long line. 1214 (BINDING_HAS_LEVEL_P): Remove parenthesis. 1215 (BINDING_VALUE): Wrap long line. 1216 (BINDING_TYPE): Whitespace. 1217 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis. 1218 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise. 1219 (IDENTIFIER_NAMESPACE_VALUE): Likewise. 1220 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise. 1221 (same_type_p): Uppercase macro parameters. 1222 (same_type_ignoring_top_level_qualifiers_p): Likewise. 1223 (OVL_FUNCTION): Wrap long line. 1224 (OVL_CHAIN): Whitespace. 1225 (OVL_CURRENT): Add parenthesis and whitespace. 1226 (OVL_NEXT): Whitespace. 1227 (OVL_USED): Likewise. 1228 (IDENTIFIER_TYPE_VALUE): Likewise. 1229 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis. 1230 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace. 1231 (LANG_ID_FIELD): Whitespace. 1232 (SET_LANG_ID(NODE,VALUE,NAME): Likewise. 1233 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap. 1234 (SET_IDENTIFIER_LABEL_VALUE): Whitespace. 1235 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap. 1236 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace. 1237 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap. 1238 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace. 1239 (IDENTIFIER_VIRTUAL_P): Likewise. 1240 (IDENTIFIER_OPNAME_P): Likewise. 1241 (IDENTIFIER_TYPENAME_P): Remove parenthesis. 1242 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters. 1243 (C_SET_EXP_ORIGINAL_CODE): Likewise. 1244 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line. 1245 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise. 1246 (IS_AGGR_TYPE): Uppercase macro parameter. 1247 (CLASS_TYPE_P): Likewise. 1248 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis. 1249 (IS_AGGR_TYPE_2): Whitespace. 1250 (TAGGED_TYPE_P): Uppercase macro parameter. 1251 (TYPE_BUILT_IN): Whitespace. 1252 (TYPE_FOR_JAVA): Likewise. 1253 (FUNCTION_ARG_CHAIN): Remove parenthesis. 1254 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis. 1255 (FUNCTION_FIRST_USER_PARAM): Likewise. 1256 (PROMOTES_TO_AGGR_TYPE): Whitespace. 1257 (DERIVED_FROM_P): Add parenthesis and wrap. 1258 (UNIQUELY_DERIVED_FROM_P): Likewise. 1259 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise. 1260 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise. 1261 (CLASSTYPE_USE_TEMPLATE): Whitespace. 1262 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis. 1263 (TYPE_GETS_DELETE): Add parenthesis. 1264 (TYPE_HAS_CONVERSION): Add parenthesis and wrap. 1265 (TYPE_HAS_ASSIGN_REF): Likewise, 1266 (TYPE_HAS_CONST_ASSIGN_REF): Likewise. 1267 (TYPE_HAS_INIT_REF): Likewise. 1268 (TYPE_HAS_CONST_INIT_REF): Likewise. 1269 (TYPE_BEING_DEFINED): Likewise. 1270 (TYPE_LANG_SPECIFIC): Likewise. 1271 (CLASSTYPE_RTTI): Likewise. 1272 (TYPE_OVERLOADS_CALL_EXPR): Likewise. 1273 (TYPE_OVERLOADS_ARRAY_REF): Likewise. 1274 (TYPE_OVERLOADS_ARROW): Likewise. 1275 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise. 1276 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis. 1277 (CLASSTYPE_METHOD_VEC): Likewise. 1278 (CLASSTYPE_MARKED_N): Likewise. 1279 (CLASSTYPE_MARKED): Likewise. 1280 (CLASSTYPE_MARKED2): Likewise. 1281 (CLASSTYPE_MARKED3): Likewise. 1282 (CLASSTYPE_MARKED4): Likewise. 1283 (CLASSTYPE_MARKED5): Likewise. 1284 (CLASSTYPE_MARKED6): Likewise. 1285 (SET_CLASSTYPE_MARKED): Whitespace. 1286 (CLEAR_CLASSTYPE_MARKED): Likewise. 1287 (SET_CLASSTYPE_MARKED2): Likewise. 1288 (CLEAR_CLASSTYPE_MARKED2): Likewise. 1289 (SET_CLASSTYPE_MARKED3): Likewise. 1290 (CLEAR_CLASSTYPE_MARKED3): Likewise. 1291 (SET_CLASSTYPE_MARKED4): Likewise. 1292 (CLEAR_CLASSTYPE_MARKED4): Likewise. 1293 (SET_CLASSTYPE_MARKED5): Likewise. 1294 (CLEAR_CLASSTYPE_MARKED5): Likewise. 1295 (SET_CLASSTYPE_MARKED6): Likewise. 1296 (CLEAR_CLASSTYPE_MARKED6): Likewise. 1297 (CLASSTYPE_TAGS): Likewise. 1298 (CLASSTYPE_VSIZE): Likewise. 1299 (CLASSTYPE_VBASECLASSES): Likewise. 1300 (CANONICAL_BINFO): Add parenthesis. 1301 (CLASSTYPE_SIZE(NODE): Likewise. 1302 (CLASSTYPE_SIZE_UNIT): Likewise. 1303 (CLASSTYPE_ALIGN(NODE): Likewise. 1304 (CLASSTYPE_USER_ALIGN): Likewise. 1305 (TYPE_JAVA_INTERFACE): Likewise. 1306 (CLASSTYPE_PURE_VIRTUALS): Likewise. 1307 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap. 1308 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise. 1309 (CLASSTYPE_HAS_MUTABLE): Likewise. 1310 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise. 1311 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap. 1312 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise. 1313 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise. 1314 (CLASSTYPE_INTERFACE_ONLY): Likewise. 1315 (CLASSTYPE_INTERFACE_KNOWN): Likewise. 1316 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise. 1317 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise. 1318 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise. 1319 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise. 1320 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap. 1321 (BINFO_UNSHARED_MARKED): Whitespace. 1322 (BINFO_MARKED): Whitespace and wrap. 1323 (SET_BINFO_MARKED): Likewise. 1324 (CLEAR_BINFO_MARKED): Likewise. 1325 (BINFO_VTABLE_PATH_MARKED): Likewise. 1326 (SET_BINFO_VTABLE_PATH_MARKED): Likewise. 1327 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise. 1328 (BINFO_SUBVTT_INDEX): Remove parenthesis. 1329 (BINFO_VPTR_INDEX): Likewise. 1330 (BINFO_PRIMARY_BASE_OF): Likewise, 1331 (CLASSTYPE_VFIELDS): Whitespace. 1332 (VF_DERIVED_VALUE): Wrap long line. 1333 (NAMESPACE_LEVEL): Whitespace. 1334 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis. 1335 (DEFARG_POINTER): Whitespace. 1336 (DECL_NEEDED_P): Remove parenthesis. 1337 (DECL_LANGUAGE): Whitespace. 1338 (SET_DECL_LANGUAGE): Add parenthesis. 1339 (DECL_CONSTRUCTOR_P): Whitespace and wrap. 1340 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis. 1341 (DECL_IN_AGGR_P): Whitespace. 1342 (DECL_FRIEND_P): Likewise. 1343 (DECL_BEFRIENDING_CLASSES): Likewise. 1344 (DECL_STATIC_FUNCTION_P): Whitespace and wrap. 1345 (DECL_NONCONVERTING_P): Whitespace. 1346 (DECL_PURE_VIRTUAL_P): Likewise. 1347 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise. 1348 (DECL_PENDING_INLINE_INFO): Whitespace. 1349 (DECL_SORTED_FIELDS): Likewise. 1350 (DECL_DEFERRED_FN): Likewise. 1351 (DECL_TEMPLATE_INFO): Likewise. 1352 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap. 1353 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise. 1354 (SET_TYPE_TEMPLATE_INFO): Add parenthesis. 1355 (TMPL_ARGS_LEVEL): Likewise. 1356 (SET_TMPL_ARGS_LEVEL): Likewise. 1357 (INNERMOST_TEMPLATE_PARMS): Whitespace. 1358 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter. 1359 (INTEGRAL_CODE_P(CODE): Add parenthesis. 1360 (CP_INTEGRAL_TYPE_P): Remove parenthesis. 1361 (TYPE_HAS_CONSTRUCTOR): Whitespace. 1362 (TREE_HAS_CONSTRUCTOR): Likewise. 1363 (TYPE_HAS_DESTRUCTOR): Likewise. 1364 (TYPE_HAS_REAL_ASSIGN_REF): Likewise. 1365 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise. 1366 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise. 1367 (TYPE_HAS_COMPLEX_INIT_REF): Likewise. 1368 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise. 1369 (TYPE_PTRMEMFUNC_P): Likewise. 1370 (TYPE_PTRMEMFUNC_FLAG): Likewise. 1371 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise. 1372 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise. 1373 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis. 1374 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. 1375 (DECL_ACCESS): Whitespace. 1376 (DECL_GLOBAL_CTOR_P): Remove parenthesis. 1377 (DECL_GLOBAL_DTOR_P): Likewise. 1378 (GLOBAL_INIT_PRIORITY): Likewise. 1379 (DECL_TEMPLATE_PARMS): Likewise. 1380 (DECL_TEMPLATE_RESULT): Likewise. 1381 (DECL_TEMPLATE_INSTANTIATIONS): Likewise. 1382 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise. 1383 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis. 1384 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise. 1385 (PRIMARY_TEMPLATE_P): Add parenthesis. 1386 (DECL_USE_TEMPLATE): Whitespace. 1387 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise. 1388 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise. 1389 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise. 1390 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise. 1391 (CALL_DECLARATOR_PARMS): Remove parenthesis. 1392 (CALL_DECLARATOR_QUALS): Likewise. 1393 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise. 1394 (TEMP_NAME_P): Wrap. 1395 (VFIELD_NAME_P): Likewise. 1396 (B_SET): Uppercase macro parameters and add parenthesis. 1397 (B_CLR): Likewise. 1398 (B_TST): Likewise. 1399 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters. 1400 (LOOKUP_TYPES_ONLY): Uppercase macro parameters. 1401 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters. 1402 (same_or_base_type_p): Likewise. 1403 (cp_deprecated): Likewise. 1404 14052002-01-05 Richard Henderson <rth@redhat.com> 1406 1407 * semantics.c (expand_body): Revert last change. 1408 14092002-01-04 Jason Merrill <jason@redhat.com> 1410 1411 PR c++/4122 1412 * class.c (update_vtable_entry_for_fn): Set delta to zero for a 1413 lost primary. 1414 1415 * class.c (build_vtbl_initializer): Check for a lost primary 1416 before calculating the vtable entry to throw away. 1417 14182002-01-02 Jason Merrill <jason@redhat.com> 1419 1420 * semantics.c (expand_body): Call outlining_inline_function when 1421 emitting an inline function out of line. 1422 14232002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1424 1425 PR c++/5116, c++/764 reversion 1426 * call.c (build_new_op): Revert the instantiations. They are 1427 incorrect. 1428 14292002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1430 1431 PR c++/5089 1432 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void. 1433 14342002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1435 1436 PR c++/3716 1437 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst. 1438 (tsubst, case POINTER_TYPE): Handle pmfs here. 1439 (tsubst, case OFFSET_TYPE): Check it is not an offset to 1440 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE. 1441 14422002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1443 1444 PR c++/35 1445 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too. 1446 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too. 1447 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the 1448 PARM_DECL. 1449 (tsubst_template_parms): Break up loop statements. 1450 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template 1451 parm PARM_DECLs don't get promoted. 1452 14532002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1454 1455 PR c++/5123 1456 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR. 1457 (build_x_function_call): Cope with a COMPONENT_REF containing a 1458 TEMPLATE_ID_EXPR. 1459 14602002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1461 1462 PR c++/5213 1463 * pt.c (convert_template_argument): Be more careful determining 1464 when RECORD_TYPE templates are or are not templates. 1465 14662002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1467 1468 PR c++/775 1469 * cp-tree.h (handle_class_head): Adjust prototype. 1470 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P 1471 parameters. Use for all class heads. 1472 * parse.y (named_class_head_sans_basetype, named_class_head, 1473 named_complex_class_head_sans_basetype, 1474 named_class_head_sans_basetype_defn, 1475 unnamed_class_head): Remove. 1476 (class_head, class_head_apparent_template): Recognize class heads 1477 (class_head_decl, class_head_defn): New reductions. Process class 1478 heads. 1479 (structsp): Adjust class definition and class declaration 1480 reductions. 1481 (maybe_base_class_list): Give diagnostic on empty list. 1482 14832002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1484 1485 PR c++/4379 1486 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a 1487 single non-static member. 1488 (unary_complex_lvalue): If it cannot be a pointer to member, don't 1489 make it so. Check it is not pointer to reference. 1490 14912002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1492 1493 PR c++/5132 1494 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we 1495 are processing a template decl. 1496 14972002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1498 1499 PR c++/5116, c++/764 1500 * call.c (build_new_op): Make sure template class operands are 1501 instantiated. Simplify arglist construction. 1502 15032001-12-29 Nathan Sidwell <nathan@codesourcery.com> 1504 1505 * call.c (build_user_type_conversion_1): Use my_friendly_assert 1506 rather than if ... abort. 1507 * cvt.c (convert_to_reference): Likewise. 1508 * semantics.c (setup_vtbl_ptr): Likewise. 1509 * pt.c (lookup_template_class): Comment typo. 1510 15112001-12-29 Nathan Sidwell <nathan@codesourcery.com> 1512 1513 PR c++/5125 1514 * pt.c (push_template_decl_real): Make sure DECL has 1515 DECL_LANG_SPECIFIC. 1516 15172001-12-29 Nathan Sidwell <nathan@codesourcery.com> 1518 1519 PR c++/335 1520 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer 1521 for non-reference fields. 1522 * typeck.c (require_complete_type): Use resolve_offset_ref). 1523 15242001-12-26 Nathan Sidwell <nathan@codesourcery.com> 1525 1526 PR c++/196 1527 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF. 1528 15292001-12-24 Nathan Sidwell <nathan@codesourcery.com> 1530 1531 PR c++/160 1532 * typeck.c (build_modify_expr): Remove old unreachable code & tidy 1533 up. Don't stabilize_references when initializing a reference. 1534 15352001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1536 1537 * decl2.c (lang_f_options): Const-ify. 1538 15392001-12-20 Joseph S. Myers <jsm28@cam.ac.uk> 1540 1541 * config-lang.in (diff_excludes): Remove. 1542 15432001-12-19 Nathan Sidwell <nathan@codesourcery.com> 1544 1545 PR c++/90 1546 * typeck.c (build_function_call_real): Use original function 1547 expression for errors. 1548 15492001-12-18 Jason Merrill <jason@redhat.com> 1550 1551 PR c++/3242 1552 * class.c (add_method): Do compare 'this' quals when trying to match a 1553 used function. Don't defer to another used function. 1554 15552001-12-18 Nathan Sidwell <nathan@codesourcery.com> 1556 1557 * pt.c (instantiate_clone): Remove, fold into ... 1558 (instantiate_template): ... here. Simplify by removing mutual 1559 recursion. 1560 * typeck2.c (build_m_component_ref): Don't cv qualify the function 1561 pointed to by a pointer to function. 1562 * class.c (delete_duplicate_fields_1): Typo. 1563 15642001-12-18 Jason Merrill <jason@redhat.com> 1565 1566 C++ ABI change: destroy value arguments in caller. 1567 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't 1568 create an extra binding level for the parameters. 1569 * decl.c (store_parm_decls): Don't do parameter cleanups. 1570 15712001-12-18 Nathan Sidwell <nathan@codesourcery.com> 1572 1573 * call.c (build_new_method_call): Use '%#V'. 1574 * error.c (cv_to_string): Use V parameter to determine padding. 1575 15762001-12-18 Joseph S. Myers <jsm28@cam.ac.uk> 1577 1578 * call.c, decl2.c, init.c: Use "built-in" and "bit-field" 1579 spellings in messages. 1580 15812001-12-17 Zack Weinberg <zack@codesourcery.com> 1582 1583 * cp-tree.h: Delete #defines for cp_error, cp_warning, 1584 cp_pedwarn, and cp_compiler_error. 1585 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c, 1586 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c, 1587 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c, 1588 typeck2.c: Change calls to the above macros to use their 1589 language-independent equivalents: error, warning, pedwarn, and 1590 internal_error respectively. 1591 15922001-12-16 Neil Booth <neil@daikokuya.demon.co.uk> 1593 1594 * decl2.c (finish_file): Remove back_end_hook. 1595 15962001-12-16 Joseph S. Myers <jsm28@cam.ac.uk> 1597 1598 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c, 1599 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c, 1600 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors. 1601 16022001-12-15 Joseph S. Myers <jsm28@cam.ac.uk> 1603 1604 * lang-options.h: Use American spelling in messages. 1605 16062001-12-13 Jason Merrill <jason@redhat.com> 1607 1608 * Make-lang.in (parse.h): Separate rule, just depend on parse.c. 1609 1610 Use cleanups to run base and member destructors. 1611 * init.c (push_base_cleanups): New function, split out from... 1612 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code. 1613 * decl.c (finish_destructor_body): Move vbase destruction code to 1614 push_base_cleanups. 1615 (begin_function_body, finish_function_body): New fns. 1616 (finish_function): Move [cd]tor handling and call_poplevel to 1617 finish_function_body. 1618 (pushdecl): Skip the new level. 1619 * semantics.c (genrtl_try_block): Don't call end_protect_partials. 1620 (setup_vtbl_ptr): Call push_base_cleanups. 1621 * method.c (synthesize_method): Call {begin,end}_function_body. 1622 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK. 1623 * cp-tree.h: Declare new fns. 1624 * parse.y (function_body, .begin_function_body): New nonterminals. 1625 (fndef, pending_inline, function_try_block): Use function_body. 1626 (ctor_initializer_opt, function_try_block): No longer has a value. 1627 (base_init): Remove .set_base_init token. 1628 (.set_base_init, compstmt_or_error): Remove. 1629 * Make-lang.in (parse.c): Expect two fewer s/r conflicts. 1630 1631 * optimize.c (maybe_clone_body): Fix parameter updating. 1632 16332001-12-12 Jason Merrill <jason@redhat.com> 1634 1635 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft. 1636 * semantics.c (genrtl_start_function): Don't pass 1637 parms_have_cleanups or push an extra binding level. 1638 (genrtl_finish_function): Lose cleanup_label cruft. 1639 1640 * cp-tree.h (struct cp_language_function): Remove x_ctor_label. 1641 (ctor_label): Remove. 1642 * semantics.c (finish_return_stmt): Lose ctor_label support. 1643 * decl.c (finish_constructor_body, mark_lang_function): Likewise. 1644 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not 1645 dtor_label. 1646 1647 * call.c (build_new_method_call): Let resolves_to_fixed_type_p 1648 check for [cd]tors. 1649 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix. 1650 1651 * decl.c (finish_function): Check VMS_TARGET, not VMS. 1652 1653 * decl.c (start_cleanup_fn): Remove redundant pushlevel. 1654 (end_cleanup_fn): And poplevel. 1655 1656 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER 1657 if we're in a template. 1658 16592001-12-12 Jakub Jelinek <jakub@redhat.com> 1660 1661 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P, 1662 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT, 1663 THIS_NAME_P): Delete. 1664 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P, 1665 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash 1666 with internal naming scheme. 1667 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use. 1668 16692001-12-12 Nathan Sidwell <nathan@codesourcery.com> 1670 1671 * decl.c (grokdeclarator): Deprecated implicit typename use. 1672 16732001-12-11 Nathan Sidwell <nathan@codesourcery.com> 1674 1675 PR g++/51 1676 * parse.y (frob_specs): Indicate it is a language linkage which 1677 contained the extern. 1678 * decl.c (grokdeclarator): Allow extern language linkage with 1679 other specifiers. 1680 16812001-12-10 Nathan Sidwell <nathan@codesourcery.com> 1682 1683 PR g++/72 1684 * decl.c (add_binding): Don't reject duplicate typedefs involving 1685 template parameters. 1686 16872001-12-10 Neil Booth <neil@daikokuya.demon.co.uk> 1688 1689 * parse.y, semantics.c: Similarly. 1690 16912001-12-09 Nathan Sidwell <nathan@codesourcery.com> 1692 1693 PR g++/87 1694 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p. 1695 (copy_args_p): Rename to ... 1696 (copy_fn_p): ... here. 1697 (grok_special_member_properties): New function. 1698 (grok_op_properties): Lose VIRTUALP parameter. 1699 (copy_assignment_arg_p): Remove. 1700 * call.c (build_over_call): Use copy_fn_p. 1701 * decl.c (grokfndecl): Reformat. Adjust call to 1702 grok_op_properties. 1703 (copy_args_p): Rename to ... 1704 (copy_fn_p): ... here. Reject template functions. Check for pass 1705 by value. 1706 (grok_special_member_properties): Remember special functions. 1707 (grok_ctor_properties): Don't remember them here, just check. 1708 (grok_op_properties): Likewise. 1709 (start_method): Call grok_special_member_properties. 1710 * decl2.c (grokfield): Likewise. 1711 (copy_assignment_arg_p): Remove. 1712 (grok_function_init): Don't remember abstract assignment here. 1713 * pt.c (instantiate_class_template): Call 1714 grok_special_member_properties. 1715 (tsubst_decl): Adjust grok_op_properties call. 1716 17172001-12-08 Aldy Hernandez <aldyh@redhat.com> 1718 1719 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and 1720 RID_TYPES_COMPATIBLE_P. 1721 17222001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca> 1723 1724 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in 1725 call to build_aggr_init. 1726 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND. 1727 17282001-12-08 Neil Booth <neil@daikokuya.demon.co.uk> 1729 1730 * parse.y: Replace uses of the string non-terminal with STRING. 1731 Don't perform string concatentaion here. 1732 (string): Remove non-terminal. 1733 * semantics.c (finish_asm_stmt): Don't concatenate strings here. 1734 17352001-12-05 Jason Merrill <jason@redhat.com> 1736 1737 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define. 1738 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define. 1739 * tree.c (cp_start_inlining, cp_end_inlining): New fns. 1740 * pt.c (push_tinst_level): No longer static. 1741 * cp-tree.h: Declare them. 1742 1743 * init.c (resolve_offset_ref): Don't check access for the base 1744 conversion to access a FIELD_DECL. 1745 1746 * cp-tree.h (TYPE_REFFN_P): New macro. 1747 * decl.c (bad_specifiers): Check it, too. 1748 1749 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY 1750 on the __*_type_info type if we haven't seen a definition. 1751 17522001-12-05 Neil Booth <neil@daikokuya.demon.co.uk> 1753 1754 * decl.c: Include c-common.h. 1755 (shadow_warning): Move to c-common.c. 1756 1757Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 1758 1759 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE. 1760 17612001-12-04 Nathan Sidwell <nathan@codesourcery.com> 1762 1763 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm. 1764 17652001-12-04 Nathan Sidwell <nathan@codesourcery.com> 1766 1767 PR g++/164 1768 * init.c (sort_base_init): Allow binfos to be directly specified. 1769 * method.c (do_build_copy_constructor): Explicitly convert to the 1770 base instance. 1771 (do_build_assign_ref): Likewise. 1772 17732001-12-03 Hans-Peter Nilsson <hp@bitrange.com> 1774 1775 * decl.c (xref_basetypes): Don't use C99 construct in tag_code 1776 declaration and initialization. 1777 17782001-12-03 Neil Booth <neil@daikokuya.demon.co.uk> 1779 1780 * typeck2.c: Remove leading capital from diagnostic messages, as 1781 per GNU coding standards. 1782 17832001-12-03 Mumit Khan <khan@nanotech.wisc.edu> 1784 1785 PR c++/3394 1786 * decl.c (xref_basetypes): Handle attributes between 1787 'class' and name. 1788 17892001-12-03 Nathan Sidwell <nathan@codesourcery.com> 1790 1791 PR g++/3381 1792 * parse.y (named_complex_class_head_sans_basetype): Add new 1793 reduction. 1794 * Make-lang.in (parse.c): Adjust expected conflict count. 1795 17962001-12-03 Jason Merrill <jason@redhat.com> 1797 1798 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the 1799 immediate binfos for our virtual bases. 1800 18012001-12-02 Neil Booth <neil@daikokuya.demon.co.uk> 1802 1803 * call.c (build_java_interface_fn_ref): Similarly. 1804 * except.c (is_admissible_throw_operand): Similarly. 1805 * init.c (build_java_class_ref): Similarly. 1806 * xref.c (open_xref_file): Similarly. 1807 18082001-12-01 Neil Booth <neil@daikokuya.demon.co.uk> 1809 1810 * class.c (finish_struct): Remove trailing periods from messages. 1811 * decl.c (check_tag_decl): Similarly. 1812 * lex.c (cxx_set_yydebug): Similarly. 1813 * typeck2.c (friendly_abort): Similarly. 1814 18152001-11-29 Mark Mitchell <mark@codesourcery.com> 1816 1817 PR c++/3048 1818 * cp-tree.h (ovl_member): Remove. 1819 * decl2.c (merge_functions): Handle extern "C" functions 1820 specially. 1821 * tree.c (ovl_member): Remove. 1822 18232001-11-29 Mark Mitchell <mark@codesourcery.com> 1824 1825 PR c++/4842 1826 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a 1827 FUNCTION_DECL, as input. 1828 (mark_overriders): Remove. 1829 (warn_hidden): Rework for the new ABI. 1830 18312001-11-29 Mark Mitchell <mark@codesourcery.com> 1832 1833 PR c++/3471 1834 * call.c (convert_like_real): Do not build additional temporaries 1835 for rvalues of class type. 1836 18372001-11-28 Nathan Sidwell <nathan@codesourcery.com> 1838 1839 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base. 1840 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise. 1841 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise. 1842 (DERIVED_FROM_P): Likewise. 1843 (enum base_access): Renumber, add ba_quiet bit mask. 1844 (get_binfo): Remove. 1845 (get_base_distance): Remove. 1846 (binfo_value): Remove. 1847 (ACCESSIBLY_DERIVED_FROM_P): Remove. 1848 * call.c (standard_conversion): Use lookup_base. 1849 * class.c (strictly_overrides): Likewise. 1850 (layout_virtual_bases): Likewise. 1851 (warn_about_ambiguous_direct_bases): Likewise. 1852 (is_base_of_enclosing_class): Likewise. 1853 (add_vcall_offset_vtbl_entries_1): Likewise. 1854 * cvt.c (build_up_reference): Adjust comment. 1855 * init.c (build_member_call): Reformat. 1856 * search.c (get_binfo): Remove. 1857 (get_base_distance_recursive): Remove. 1858 (get_base_distance): Remove. 1859 (lookup_base_r): Tweak. 1860 (lookup_base): Add ba_quiet control. Complete the types here. 1861 (covariant_return_p): Use lookup_base. 1862 * tree.c (binfo_value): Remove. 1863 (maybe_dummy_object): Use lookup_base. 1864 * typeck.c (build_static_cast): Use lookup_base. 1865 (get_delta_difference): Likewise. 1866 * typeck2.c (binfo_or_else): Use lookup_base. 1867 (build_scoped_ref): Add back error_mark_check. 1868 (build_m_component_ref): Use lookup_base. 1869 18702001-11-29 Joseph S. Myers <jsm28@cam.ac.uk> 1871 1872 * Make-lang.in (c++.generated-manpages): New dummy target. 1873 1874Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 1875 1876 * Make-lang.in (cp-lang.o): Depends on c-common.h. 1877 * cp-lang.c (c-common.h): Include. 1878 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks. 1879 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p. 1880 * expr.c (init_cplus_expand): Don't set lang_expand_constant. 1881 18822001-11-26 Neil Booth <neil@daikokuya.demon.co.uk> 1883 1884 * decl2.c (c_language): Move to c-common.c. 1885 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c 1886 functions. 1887 (cxx_init): Update. 1888 18892001-11-26 Jason Merrill <jason@redhat.com> 1890 1891 * call.c (joust): Remove COND_EXPR hack. 1892 18932001-11-25 Aldy Hernandez <aldyh@redhat.com> 1894 1895 * search.c (lookup_base_r): Declare bk in variable declaration 1896 space. 1897 18982001-11-25 Nathan Sidwell <nathan@codesourcery.com> 1899 1900 PR g++/3145 1901 * class.c (build_vbase_pointer): Remove. 1902 (build_vbase_path): Remove. 1903 (build_base_path): New function. 1904 * cp-tree.h (base_access, base_kind): New enumerations. 1905 (build_base_path): Declare. 1906 (convert_pointer_to_real): Remove. 1907 (convert_pointer_to): Remove. 1908 (lookup_base): Declare. 1909 (convert_pointer_to_vbase): Remove. 1910 * call.c (build_scoped_method_call): Use lookup_base & 1911 build_base_path instead of convert_pointer_to_real, 1912 get_base_distance & get_binfo. 1913 (build_over_call): Likewise. 1914 * cvt.c (cp_convert_to_pointer): Likewise. 1915 (convert_to_pointer_force): Likewise. 1916 (build_up_reference): Likewise. 1917 (convert_pointer_to_real): Remove. 1918 (convert_pointer_to): Remove. 1919 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path 1920 instead of convert_pointer_to_vbase & build_vbase_path. 1921 (emit_base_init): Use build_base_path instead of 1922 convert_pointer_to_real. 1923 (expand_virtual_init): Lose unrequired conversions. 1924 (resolve_offset_ref): Use lookup_base and build_base_path 1925 instead of convert_pointer_to. 1926 * rtti.c (build_dynamic_cast_1): Use lookup_base & 1927 build_base_path instead of get_base_distance & build_vbase_path. 1928 * search.c (get_vbase_1): Remove. 1929 (get_vbase): Remove. 1930 (convert_pointer_to_vbase): Remove. 1931 (lookup_base_recursive): New function. 1932 (lookup_base): New function. 1933 * typeck.c (require_complete_type): Use lookup_base & 1934 build_base_path instead of convert_pointer_to. 1935 (build_component_ref): Likewise. 1936 (build_x_function_call): Likewise. 1937 (get_member_function_from_ptrfunc): Likewise. 1938 (build_component_addr): Likewise. 1939 * typeck2.c (build_scoped_ref): Likewise. 1940 19412001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 1942 1943 * cp-tree.h (CP_TYPE_QUALS): Removed. 1944 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree. 1945 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and 1946 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN. 1947 * dump.c (cp_dump_tree): Use void* dump_info argument to match 1948 lang-hooks prototype. 1949 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c, 1950 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to 1951 CP_TYPE_QUALS changed to cp_type_quals. 1952 * Make-lang.in: References to c-dump.h changed to tree-dump.h. 1953 (CXX_C_OBJS): Remove c-dump.o. 1954 19552001-11-21 Mark Mitchell <mark@codesourcery.com> 1956 1957 PR c++/3637 1958 * pt.c (lookup_template_class): Ensure that all specializations 1959 are registered on the list corresponding to the most general 1960 template. 1961 19622001-11-20 Mark Mitchell <mark@codesourcery.com> 1963 1964 * call.c (non_reference): Add documentation. 1965 (convert_class_to_reference): Do not strip reference types 1966 from conversion operators. 1967 (maybe_handle_ref_bind): Simplify. 1968 (compare_ics): Correct handling of references. 1969 19702001-11-19 John Wilkinson <johnw@research.att.com> 1971 1972 * dump.c (dump_op): New function. 1973 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use 1974 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs. 1975 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P, 1976 19772001-11-19 Mark Mitchell <mark@codesourcery.com> 1978 1979 PR4629 1980 * semantics.c (finish_sizeof): Make sure that expression created 1981 while processing a template do not have a type. 1982 (finish_alignof): Likewise. 1983 * typeck.c (c_sizeof): Likewise. 1984 (expr_sizeof): Likewise. 1985 19862001-11-18 Neil Booth <neil@daikokuya.demon.co.uk> 1987 1988 * lex.c (cxx_finish): Call c_common_finish. 1989 (finish_parse): Remove. 1990 19912001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1992 1993 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE 1994 when displaying error message about missing array bounds. 1995 19962001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1997 1998 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR, 1999 CONST_CAST_EXPR. 2000 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR. 2001 20022001-11-16 Neil Booth <neil@daikokuya.demon.co.uk> 2003 2004 * cp-tree.h (print_class_statistics): Restore. 2005 20062001-11-15 Jason Merrill <jason@redhat.com> 2007 2008 * method.c (use_thunk): Don't emit debugging information for thunks. 2009 2010 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions. 2011 * decl.c (make_typename_type): Handle getting a class template. 2012 * search.c (lookup_field_r): A class template is good enough for 2013 want_type. 2014 2015 * call.c (convert_like_real): Only use cp_convert for the bad part. 2016 (standard_conversion): Also allow bad int->enum. 2017 * typeck.c (ptr_reasonably_similar): Also allow functions to 2018 interconvert. Pointers to same-size integers are reasonably 2019 similar. 2020 2021 * cvt.c (convert_to_void): If we build a new COND_EXPR, always 2022 give it void type. 2023 20242001-11-15 Nathan Sidwell <nathan@codesourcery.com> 2025 2026 PR g++/3154 2027 * init.c (sort_base_init): Remove unreachable code. 2028 (expand_member_init): Adjust comment to reflect reality. Simplify 2029 and remove unreachable code. 2030 20312001-11-15 Neil Booth <neil@daikokuya.demon.co.uk> 2032 2033 * cp-tree.h (init_reswords, cxx_init_decl_processing): New. 2034 (cxx_init): Update prototype. 2035 * decl.c (init_decl_processing): Rename. Move null node init 2036 to its creation time. 2037 * lex.c (cxx_init_options): Update. 2038 (cxx_init): Combine with old init_parse; also call 2039 cxx_init_decl_processing. 2040 20412001-11-14 Richard Sandiford <rsandifo@redhat.com> 2042 2043 * decl.c (check_initializer): Try to complete the type of an 2044 array element before checking whether it's complete. Don't 2045 complain about arrays with complete element types but an 2046 unknown size. 2047 (cp_finish_decl): Build the hierarchical constructor before 2048 calling maybe_deduce_size_from_array_init. 2049 20502001-11-14 Joseph S. Myers <jsm28@cam.ac.uk> 2051 2052 * Make-lang.in: Change all uses of $(manext) to $(man1ext). 2053 20542001-11-13 Nathan Sidwell <nathan@codesourcery.com> 2055 2056 PR g++/4206 2057 * parse.y (already_scoped_stmt): Remove. 2058 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt. 2059 20602001-11-12 H.J. Lu <hjl@gnu.org> 2061 2062 * cvt.c (ocp_convert): Don't warn the address of a weak 2063 function is always `true'. 2064 20652001-11-09 Neil Booth <neil@daikokuya.demon.co.uk> 2066 2067 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, 2068 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, 2069 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override. 2070 * cp-tree.h (print_class_statistics): Remove. 2071 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type, 2072 cxx_print_identifier, cxx_set_yydebug): New. 2073 * lex.c (set_yydebug): Rename c_set_yydebug. 2074 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier, 2075 lang_print_xnode): Rename. 2076 * tree.c (print_lang_statistics): Rename. 2077 20782001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2079 2080 * class.c (dump_array): Fix format specifier warning. 2081 20822001-11-09 Neil Booth <neil@daikokuya.demon.co.uk> 2083 2084 * cp-lang.c (LANG_HOOKS_NAME): Override. 2085 (struct lang_hooks): Constify. 2086 * lex.c (cxx_init_options): Update. 2087 (lang_identify): Remove. 2088 * parse.y (language_string): Remove. 2089 20902001-11-08 Andreas Franck <afranck@gmx.de> 2091 2092 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME, 2093 DEMANGLER_CROSS_NAME): Handle program_transform_name the way 2094 suggested by autoconf. 2095 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define. 2096 (c++.install-common): Use the transformed target alias names. 2097 20982001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk> 2099 2100 * Make-lang.in: Update. 2101 * cp-lang.c: Include langhooks-def.h. 2102 21032001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2104 2105 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR. 2106 21072001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2108 2109 * lex.c (copy_lang_type): Add static prototype. 2110 21112001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2112 2113 * pt.c (unify): Handle SCOPE_REF. 2114 21152001-11-01 Jakub Jelinek <jakub@redhat.com> 2116 2117 * tree.c (cp_copy_res_decl_for_inlining): Adjust 2118 DECL_ABSTRACT_ORIGIN for the return variable. 2119 21202001-10-31 Zack Weinberg <zack@codesourcery.com> 2121 2122 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated. 2123 21242001-10-28 Joseph S. Myers <jsm28@cam.ac.uk> 2125 2126 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c, 2127 semantics.c, spew.c: Fix spelling errors. 2128 21292001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2130 2131 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL. 2132 21332001-10-25 Zack Weinberg <zack@codesourcery.com> 2134 2135 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to 2136 pop_everything. 2137 2138Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 2139 2140 * cp-lang.c (cxx_get_alias_set): New function. 2141 Point LANG_HOOKS_GET_ALIAS_SET to it. 2142 21432001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2144 2145 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node. 2146 * cp-tree.h (make_unbound_class_template): Prototype new function. 2147 * decl.c (make_unbound_class_template): New function. 2148 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE. 2149 * error.c (dump_type): Likewise. 2150 * mangle.c (write_type): Likewise. 2151 * parse.y (template_parm): Likewise. 2152 (template_argument): Use make_unbound_class_template. 2153 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE. 2154 (tsubst): Likewise. 2155 (tsubst_copy): Likewise. 2156 (unify): Likewise. 2157 * tree.c (walk_tree): Likewise. 2158 * typeck.c (comptypes): Likewise. 2159 21602001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2161 2162 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold 2163 extra calls into fewer ones. 2164 21652001-10-18 Alexandre Oliva <aoliva@redhat.com> 2166 2167 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE. 2168 Warn when merging inline with attribute noinline. 2169 (start_decl, start_function): Warn if inline and attribute 2170 noinline appear in the same declaration. 2171 21722001-10-16 H.J. Lu <hjl@gnu.org> 2173 2174 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined 2175 for tree checking disabled. 2176 21772001-10-16 Hans-Peter Nilsson <hp@axis.com> 2178 2179 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL && 2180 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME. 2181 21822001-10-15 Richard Sandiford <rsandifo@redhat.com> 2183 2184 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define. 2185 (unify): Only handle MINUS_EXPR specially if the above flag is set 2186 and the subtracted constant is 1. Clear the flag on recursive calls. 2187 Set it when unifying the maximum value in an INTEGER_TYPE's range. 2188 21892001-10-15 Richard Sandiford <rsandifo@redhat.com> 2190 2191 * decl.c (bad_specifiers): Don't allow exception specifications 2192 on any typedefs. 2193 21942001-10-14 Neil Booth <neil@daikokuya.demon.co.uk> 2195 2196 * cp/lex.c (init_cp_pragma): Similarly. 2197 21982001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2199 2200 * pt.c (lookup_template_class): Build complete template arguments 2201 for BOUND_TEMPLATE_TEMPLATE_PARM. 2202 22032001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2204 2205 * cp-tree.h (TYPE_BINFO): Update comment. 2206 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro. 2207 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info. 2208 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS. 2209 (copy_type): Prototype new function. 2210 * lex.c (copy_lang_decl): Gather tree node statistics. 2211 (copy_lang_type): New function. 2212 (copy_type): Likewise. 2213 (cp_make_lang_type): Create lang_type for 2214 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE 2215 and BOUND_TEMPLATE_TEMPLATE_PARM. 2216 * pt.c (tsubst): Use copy_type instead of copy_node. 2217 * search.c (lookup_field_1): Ignore TYPENAME_TYPE. 2218 22192001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2220 2221 * pt.c (determine_specialization): Ignore functions without 2222 DECL_TEMPLATE_INFO. 2223 22242001-10-12 Nathan Sidwell <nathan@codesourcery.com> 2225 2226 PR g++/4476 2227 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes. 2228 22292001-10-11 Jason Merrill <jason_merrill@redhat.com> 2230 2231 * typeck2.c (store_init_value): Don't re-digest a bracketed 2232 initializer. 2233 2234 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of 2235 ANON_AGGR_TYPE_P. 2236 22372001-10-11 Richard Henderson <rth@redhat.com> 2238 2239 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead 2240 of an asm statement. 2241 (build_vtbl_ref_1): Split out from build_vtbl_ref. 2242 (build_vfn_ref): Use it to handle vtable descriptors before 2243 calling build_vtable_entry_ref. 2244 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit. 2245 22462001-10-10 Richard Henderson <rth@redhat.com> 2247 2248 * parse.y (asm_operand): Allow named operands. 2249 * semantics.c (finish_asm_stmt): Tweek for changed location 2250 of the operand constrant. 2251 22522001-10-09 Jason Merrill <jason_merrill@redhat.com> 2253 2254 * call.c (standard_conversion): Add bad conversion between 2255 integers and pointers. 2256 (convert_like_real): Don't use convert_for_initialization for bad 2257 conversions; complain here and use cp_convert. 2258 (build_over_call): Don't handle bad conversions specially. 2259 (perform_implicit_conversion): Allow bad conversions. 2260 (can_convert_arg_bad): New fn. 2261 * cp-tree.h: Declare it. 2262 * typeck.c (convert_for_assignment): Use it. 2263 (ptr_reasonably_similar): Any target type is similar to void. 2264 22652001-10-08 Alexandre Oliva <aoliva@redhat.com> 2266 2267 * Make-lang.in (CXX_OBJS): Added cp-lang.o. 2268 (cp/cp-lang.o): New rule. 2269 * cp-tree.h: Declare hooks. 2270 * tree.c: Make hooks non-static. 2271 (init_tree): Don't initialize hooks here. 2272 * lex.c: Likewise. Move definition of lang_hooks to... 2273 * cp-lang.c: ... new file. 2274 22752001-10-08 Richard Henderson <rth@redhat.com> 2276 2277 * cp-tree.h (struct lang_decl_flags): Remove declared_inline. 2278 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl. 2279 22802001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2281 2282 * class.c (build_vtable_entry_ref): Const-ify. 2283 * decl.c (predefined_identifier, 2284 initialize_predefined_identifiers): Likewise. 2285 * init.c (build_new_1): Likewise. 2286 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword): 2287 Likewise. 2288 22892001-10-05 Alexandre Oliva <aoliva@redhat.com> 2290 2291 * optimize.c (struct inline_data): Moved to ../tree-inline.c. 2292 (INSNS_PER_STMT): Likewise. 2293 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise. 2294 (copy_body, initialize_inlined_parameters): Likewise. 2295 (declare_return_variable, inlinable_function_p): Likewise. 2296 (expand_call_inline, expand_calls_inline): Likewise. 2297 (optimize_inline_calls, clone_body): Likewise. 2298 * tree.c (walk_tree): Moved to ../tree-inline.c. 2299 (walk_tree_without_duplicates): Likewise. 2300 (copy_tree_r, remap_save_expr): Likewise. 2301 23022001-10-04 Alexandre Oliva <aoliva@redhat.com> 2303 2304 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h. 2305 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise. 2306 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl. 2307 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h. 2308 (flag_inline_trees): Moved declaration to ../tree-inline.h. 2309 (walk_tree): Moved declaration to ../tree-inline.h. 2310 (walk_tree_without_duplicates, copy_tree_r): Likewise. 2311 (remap_save_expr): Likewise. 2312 * decl.c: Include tree-inline.h. 2313 (lang_mark_tree): Don't mark inlined_fns. 2314 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c. 2315 * optimize.c: Include tree-inline.h. 2316 (optimize_inline_calls): Move declaration to ../tree.h, as 2317 non-static. 2318 (remap_decl): Use language-independent constructs and hooks. 2319 (remap_block, copy_body_r, declare_return_variable): Likewise. 2320 (inlinable_function_p): Likewise. Don't test for 2321 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is 2322 no longer language-specific. 2323 (optimize_inline_calls): Likewise. Make it non-static. Moved 2324 call of dump_function to... 2325 (optimize_function): Here... 2326 (clone_body): New function, extracted from... 2327 (maybe_clone_body): ... here. Build decl_map locally and pass 2328 it on to clone_body. 2329 * pt.c, semantics.c: Include tree-inline.h. 2330 * tree.c: Likewise. 2331 (cp_walk_subtrees): New language-specific hook for tree inlining. 2332 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls, 2333 cp_is_overload_p, cp_auto_var_in_fn_p, 2334 cp_copy_res_decl_for_inlining): Likewise. 2335 (walk_tree): Move language-specific constructs into... 2336 (cp_walk_subtrees): this new function. 2337 (copy_tree_r): Use language-independent constructs and hooks. 2338 (init_tree): Initialize tree inlining hooks. 2339 (remap_save_expr): Adjust prototype so that the declaration 2340 does not require the definition of splay_tree. 2341 23422001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca> 2343 2344 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used 2345 to build the declaration instead of the declaration itself. 2346 23472001-10-02 Jason Merrill <jason_merrill@redhat.com> 2348 2349 * decl2.c (cxx_decode_option): Add 'else'. 2350 2351 * spew.c (end_input): No longer static. 2352 * cp-tree.h: Declare it. 2353 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion. 2354 23552001-10-02 Joseph S. Myers <jsm28@cam.ac.uk> 2356 2357 * call.c (build_over_call), typeck.c (build_function_call_real): 2358 Pass type attributes to check_function_format rather than name or 2359 assembler name. Don't require there to be a name or assembler 2360 name to check formats. 2361 23622001-10-02 Joseph S. Myers <jsm28@cam.ac.uk> 2363 2364 * decl.c (init_decl_processing): Don't call 2365 init_function_format_info. Initialize lang_attribute_table 2366 earlier. 2367 (builtin_function): Call decl_attributes. 2368 (insert_default_attributes): New. 2369 23702001-10-01 Jason Merrill <jason_merrill@redhat.com> 2371 2372 * decl.c (grokdeclarator): Copy array typedef handling from C 2373 frontend. 2374 2375 * decl.c (grokdeclarator): Copy too-large array handling from C 2376 frontend. 2377 23782001-09-29 Alexandre Oliva <aoliva@redhat.com> 2379 2380 * config-lang.in (target_libs): Added target-gperf, so that we 2381 don't try to build it if C++ is disabled. 2382 23832001-09-23 Zack Weinberg <zack@codesourcery.com> 2384 2385 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o. 2386 (cp/errfn.o): Delete rule. 2387 (cp/error.o): Depend on flags.h. 2388 * errfn.c: Delete file. 2389 * cp-tree.h: Declare warn_deprecated. Remove definitions of 2390 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, 2391 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning, 2392 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and 2393 internal_error respectively. Make cp_deprecated into a macro. 2394 Don't define cp_printer typedef or declare cp_printers. 2395 * error.c: Include flags.h. 2396 Delete: struct tree_formatting_info, print_function_argument_list, 2397 print_declaration, print_expression, print_function_declaration, 2398 print_function_parameter, print_type_id, print_cv_qualifier_seq, 2399 print_type_specifier_seq, print_simple_type_specifier, 2400 print_elaborated_type_specifier, print_rest_of_abstract_declarator, 2401 print_parameter_declaration_clause, print_exception_specification, 2402 print_nested_name_specifier, and definition of cp_printers. 2403 (locate_error): New function. 2404 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and 2405 rewritten in terms of locate_error and diagnostic.c. 2406 (cp_tree_printer): Rename cp_printer; wire up to *_to_string 2407 instead of deleted print_* routines. Handle %C, %L, %O, %Q also. 2408 (init_error): Adjust to match. 2409 2410Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 2411 2412 * Make-lang.in (CXX_C_OBJS): Add attribs.o. 2413 24142001-09-21 Richard Henderson <rth@redhat.com> 2415 2416 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS. 2417 (build_vtbl_initializer): Likewise. 2418 (build_vfn_ref): New. 2419 * cp-tree.h: Declare it. 2420 * call.c (build_over_call): Use it. 2421 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR. 2422 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors. 2423 2424Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com> 2425 2426 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration. 2427 24282001-09-21 Joseph S. Myers <jsm28@cam.ac.uk> 2429 2430 Table-driven attributes. 2431 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES. 2432 * decl2.c (cplus_decl_attributes): Only take one attributes 2433 parameter. 2434 * cp-tree.c (cplus_decl_attributes): Update prototype. 2435 * class.c (finish_struct), decl.c (start_decl, start_function), 2436 decl2.c (grokfield), friend.c (do_friend), parse.y 2437 (parse_bitfield): Update calls to cplus_decl_attributes. 2438 * decl.c (grokdeclarator): Take a pointer to a single ordinary 2439 attribute list. 2440 * decl.h (grokdeclarator): Update prototype. 2441 * decl2.c (grokfield): Take a single ordinary attribute list. 2442 * friend.c (do_friend): Likewise. 2443 * decl.c (shadow_tag, groktypename, start_decl, 2444 start_handler_parms, grokdeclarator, grokparms, start_function, 2445 start_method), decl2.c (grokfield, grokbitfield, grokoptypename), 2446 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c 2447 (process_template_parm, do_decl_instantiation): Pass single 2448 ordinary attribute lists around. 2449 * decl.c (grokdeclarator): Correct handling of nested attributes. 2450 Revert the patch 2451 1998-10-18 Jason Merrill <jason@yorick.cygnus.com> 2452 * decl.c (grokdeclarator): Embedded attrs bind to the right, 2453 not the left. 2454 . 2455 * cp-tree.h (cp_valid_lang_attribute): Remove declaration 2456 (cp_attribute_table): Declare. 2457 * decl.c (valid_lang_attribute): Don't define. 2458 (lang_attribute_table): Define. 2459 (init_decl_processing): Initialize lang_attribute_table instead of 2460 valid_lang_attribute. 2461 * tree.c (cp_valid_lang_attribute): Remove. 2462 (handle_java_interface_attribute, handle_com_interface_attribute, 2463 handle_init_priority_attribute): New functions. 2464 (cp_attribute_table): New array. 2465 * decl2.c (import_export_class): Don't use 2466 targetm.valid_type_attribute. 2467 24682001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 2469 2470 * Make-lang.in (cp/error.o): Depend on real.h 2471 * error.c: #include "real.h" 2472 24732001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2474 2475 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of 2476 xmalloc/strcpy/strcat. 2477 24782001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2479 2480 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl): 2481 Const-ification. 2482 * pt.c (tsubst_decl): Likewise. 2483 24842001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2485 2486 * decl2.c (lang_f_options): Const-ification. 2487 * lex.c (cplus_tree_code_name): Likewise. 2488 * spew.c (yyerror): Likewise. 2489 24902001-09-06 Nathan Sidwell <nathan@codesourcery.com> 2491 2492 PR c++/3986 2493 * class.c (force_canonical_binfo_r): Check & move an indirect 2494 primary base first. 2495 (force_canonical_binfo): Check that it's not already 2496 canonical. 2497 (mark_primary_virtual_base): Remove BINFO parameter. 2498 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here. 2499 25002001-09-06 Nathan Sidwell <nathan@codesourcery.com> 2501 2502 Remove TYPE_NONCOPIED_PARTS. 2503 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto 2504 CLASSTYPE_PURE_VIRTUALS. 2505 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO. 2506 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS. 2507 (layout_class_type): Don't call fixup_inline_methods here ... 2508 (finish_struct_1): ... call it here. 2509 25102001-09-04 Mark Mitchell <mark@codesourcery.com> 2511 2512 * decl.c (duplicate_decls): Remove code deadling with 2513 DECL_SAVED_INSNS. 2514 * decl2.c (finish_file): Likewise. 2515 * pt.c (instantiate_decl): Likewise. 2516 * semantics.c (expand_body): Don't defer local functions if 2517 they wouldn't be deferred for some other reason. Don't 2518 generate RTL for functions that will not be emitted. 2519 (genrtl_start_function): Remove code deadling with 2520 DECL_SAVED_INSNS. 2521 (genrtl_finish_function): Likewise. 2522 25232001-09-04 Nathan Sidwell <nathan@codesourcery.com> 2524 2525 PR c++/4203 2526 * call.c (build_over_call): Do not optimize any empty base 2527 construction. 2528 25292001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2530 2531 * error.c (dump_template_decl): Output template parameters 2532 together with their specifiers. 2533 Output `class' prefix for template template parameter. 2534 (dump_decl): Fix formatting. 2535 25362001-08-30 Kurt Garloff <garloff@suse.de> 2537 2538 * optimize.c (inlinable_function_p): Allow only smaller single 2539 functions. Halve inline limit after reaching recursive limit. 2540 25412001-08-30 Joern Rennecke <amylaar@redhat.com> 2542 Jason Merrill <jason_merrill@redhat.com> 2543 2544 * class.c (build_vtable_entry_ref): Subtract in char*, not 2545 ptrdiff_t. 2546 25472001-08-23 Jason Merrill <jason_merrill@redhat.com> 2548 2549 * tree.c (cp_build_qualified_type_real): Use get_qualified_type. 2550 (build_cplus_array_type): Use cp_build_qualified_type, not 2551 TYPE_MAIN_VARIANT, to get an unqualified version. 2552 2553 * decl2.c (grok_alignof): Lose. 2554 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr. 2555 * typeck.c (c_alignof): Lose. 2556 * semantics.c (finish_sizeof, finish_alignof): New. 2557 * parse.y: Use them. 2558 * cp-tree.h: Declare them. 2559 25602001-08-22 Jason Merrill <jason_merrill@redhat.com> 2561 2562 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement. 2563 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK. 2564 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement. 2565 25662001-08-19 Jakub Jelinek <jakub@redhat.com> 2567 2568 * typeck2.c (add_exception_specifier): Only require complete type if 2569 not in processing template declaration. 2570 25712001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2572 2573 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to 2574 GNU_xref_start_scope and GNU_xref_end_scope. 2575 2576 * tree.c (TYPE_HASH): Moved to ../tree.h. 2577 25782001-08-16 Mark Mitchell <mark@codesourcery.com> 2579 2580 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS 2581 on COMPOUND_EXPRs. 2582 25832001-08-14 Richard Henderson <rth@redhat.com> 2584 2585 * class.c, cp-tree.h (build_vfn_ref): Remove. 2586 * call.c, rtti.c: Replace all refernces with build_vtbl_ref. 2587 25882001-08-13 Mark Mitchell <mark@codesourcery.com> 2589 2590 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for 2591 empty class assignment as having side-effects to avoid 2592 spurious warnings. 2593 25942001-08-13 Zack Weinberg <zackw@panix.com> 2595 2596 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies. 2597 * except.c: Include libfuncs.h. 2598 25992001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 2600 2601 * decl.c (grokdeclarator): Clarify diagnostic message. 2602 26032001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2604 2605 * decl2.c (do_nonmember_using_decl): Replace using directive 2606 with using declaration in the error message. 2607 26082001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2609 2610 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the 2611 criterion to avoid rebuilding expression tree instead of 2612 processing_template_decl. 2613 26142001-08-07 Jason Merrill <jason_merrill@redhat.com> 2615 2616 Support named return value optimization for inlines, too. 2617 * decl.c (finish_function): Nullify returns here. 2618 * semantics.c (genrtl_start_function): Not here. 2619 (cp_expand_stmt): Don't mess with CLEANUP_STMTs. 2620 (nullify_returns_r): No longer static. Just clear RETURN_EXPR. 2621 Also nullify the CLEANUP_STMT for the nrv. 2622 * cp-tree.h: Declare it. 2623 * optimize.c (declare_return_variable): Replace the nrv with the 2624 return variable. 2625 * typeck.c (check_return_expr): Be more flexible on alignment check. 2626 Ignore cv-quals when checking for a matching type. 2627 26282001-08-09 Richard Henderson <rth@redhat.com> 2629 2630 * decl2.c (finish_objects): Use target hooks instead of 2631 assemble_constructor and assemble_destructor. 2632 26332001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca> 2634 2635 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'. 2636 26372001-08-07 Nathan Sidwell <nathan@codesourcery.com> 2638 2639 PR c++/3820 2640 Stop using TYPE_NONCOPIED_PARTS. 2641 * call.c (build_over_call): Be careful when copy constructing 2642 or assigning to an empty class. 2643 * class.c (check_bases_and_members): It has a 2644 COMPLEX_ASSIGN_REF if it has a vptr. 2645 (layout_class_type): Don't add empty class padding to 2646 TYPE_NONCOPIED_PARTS. 2647 (finish_struct_1): Don't add the VFIELD either. 2648 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_ 2649 initialization. 2650 26512001-08-07 Jason Merrill <jason_merrill@redhat.com> 2652 2653 * tree.c (walk_tree): Walk siblings even if !walk_subtrees. 2654 26552001-08-06 Richard Henderson <rth@redhat.com> 2656 2657 * decl2.c (finish_objects): Pass a symbol_ref and priority to 2658 assemble_{constructor,destructor}. Remove priority handling. 2659 26602001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 2661 2662 Don't allow template-id in using-declaration. 2663 * decl2.c (validate_nonmember_using_decl): Handle template-ids. 2664 (do_class_using_decl): Likewise. 2665 26662001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk> 2667 2668 * cp/spew.c (read_token): No need to pop buffers. 2669 26702001-08-02 Stan Shebs <shebs@apple.com> 2671 2672 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used. 2673 (fnaddr_from_vtable_entry): Remove decl. 2674 * method.c (use_thunk): Update comment. 2675 26762001-08-01 Andrew Cagney <ac131313@redhat.com> 2677 2678 * repo.c (get_base_filename): Change return value to const char 2679 pointer. 2680 26812001-08-02 Nathan Sidwell <nathan@codesourcery.com> 2682 2683 Kill -fhonor-std. 2684 * NEWS: Document. 2685 * cp-tree.h (flag_honor_std): Remove. 2686 (CPTI_FAKE_STD): Remove. 2687 (std_node): Remove comment about it being NULL. 2688 (fake_std_node): Remove. 2689 * decl.c (in_fake_std): Remove. 2690 (walk_namespaces_r): Remove fake_std_node check. 2691 (push_namespace): Remove in_fake_std code. 2692 (pop_namespace): Likewise. 2693 (lookup_name_real): Remove fake_std_node check. 2694 (init_decl_processing): Always create std_node. Always add 2695 std:: things there. 2696 (builtin_function): Always put non '_' fns in std. 2697 * decl2.c (flag_honor_std): Remove. 2698 (lang_f_options): Remove honor-std. 2699 (unsupported_options): Add honor-std. 2700 (set_decl_namespace): Remove fake_std_node check. 2701 (validate_nonmember_using_decl): Likewise. 2702 (do_using_directive): Likewise. 2703 (handle_class_head): Likewise. 2704 * dump.c (cp_dump_tree): Likewise. 2705 * except.c (init_exception_processing): Adjust. 2706 * init.c (build_member_call): Remove fake_std_node check. 2707 (build_offset_ref): Likewise. 2708 * lang-options.h: Remove -fhonor-std, -fno-honor-std. 2709 * rtti.c (init_rtti_processing): Adjust. 2710 27112001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com> 2712 2713 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second 2714 operand while calling cp_tree_equal. 2715 27162001-07-31 Nathan Sidwell <nathan@codesourcery.com> 2717 2718 The 3.0 ABI no longer has vbase pointer fields. 2719 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P, 2720 FORMAT_VBASE_NAME): Remove. 2721 * method.c (do_build_copy_constructor): Adjust. 2722 (do_build_assign_ref): Adjust. 2723 * search.c (lookup_field_r): Adjust. 2724 * typeck.c (build_component_ref): Adjust. 2725 2726 The 3.0 ABI always has a vtable pointer at the start of every 2727 polymorphic class. 2728 * rtti.c (build_headof_sub): Remove. 2729 (build_headof): Adjust. 2730 (get_tinfo_decl_dynamic): No need to check flag_rtti 2731 here. Adjust. 2732 (create_real_tinfo_var): Explain why we need a hidden name. 2733 27342001-07-31 Nathan Sidwell <nathan@codesourcery.com> 2735 2736 PR c++/3631 2737 * class.c (update_vtable_entry_for_fn): The fixed adjustment 2738 of a virtual thunk should be from declaring base. 2739 27402001-07-31 Nathan Sidwell <nathan@codesourcery.com> 2741 2742 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into 2743 the shared virtual base, so preserving inheritance graph order. 2744 27452001-07-30 Andreas Jaeger <aj@suse.de> 2746 2747 * decl2.c: Remove unused var global_temp_name_counter. 2748 27492001-07-28 Richard Henderson <rth@redhat.com> 2750 2751 * method.c (pending_inlines): Remove. 2752 27532001-07-27 Nathan Sidwell <nathan@codesourcery.com> 2754 2755 * class.c (mark_primary_virtual_base): Don't adjust base 2756 offsets here. 2757 (dfs_unshared_virtual_bases): Adjust them here. 2758 (mark_primary_bases): Explain why we adjust at the end. 2759 27602001-07-27 Nathan Sidwell <nathan@codesourcery.com> 2761 2762 * class.c (finish_struct_1): When copying the primary base's 2763 VFIELD, make sure we find it is at offset zero. 2764 27652001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2766 2767 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and 2768 tsubst_expr for default template arguments. 2769 27702001-07-26 Nathan Sidwell <nathan@codesourcery.com> 2771 2772 PR c++/3621 2773 * spew.c (yylex): Only copy the token's lineno, if it is 2774 non-zero. 2775 27762001-07-26 Nathan Sidwell <nathan@codesourcery.com> 2777 2778 PR c++/3624 2779 * call.c (resolve_args): Simplify, call 2780 convert_from_reference. 2781 (build_new_op): Resolve and convert from reference ARG1 2782 earlier. Adjust ARG2 & ARG3 resolve and conversion. 2783 27842001-07-26 Nathan Sidwell <nathan@codesourcery.com> 2785 2786 * decl.c (last_function_parm_tags): Remove. 2787 (current_function_parm_tags): Remove. 2788 (init_decl_processing): Adjust. 2789 (start_function): Adjust. 2790 (store_parm_decls): Adjust. 2791 2792 PR c++/3152 2793 * decl.c (grokdeclarator): Detect when a function typedef is 2794 declaring a function, and create last_function_parms correctly. 2795 27962001-07-25 Jason Merrill <jason_merrill@redhat.com> 2797 2798 * call.c (joust): Only prefer a non-builtin candidate to a builtin 2799 one if they have the same signature. 2800 2801 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on 2802 it rather than toplevel_bindings_p. Give it a mangled name if static. 2803 (convert_to_reference): Adjust. 2804 * decl2.c (get_temp_name): Lose. 2805 * mangle.c (mangle_ref_init_variable): New fn. 2806 (mangle_guard_variable): Strip the ref-init header. 2807 * cp-tree.h: Adjust. 2808 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the 2809 initializer. 2810 (grok_reference_init): Always use DECL_INITIAL. 2811 28122001-07-25 Nathan Sidwell <nathan@codesourcery.com> 2813 2814 PR c++/3416 2815 * call.c (build_conditional_expr): Recheck args after 2816 conversions. 2817 * cp-tree.h (build_conditional_expr): Move to correct file. 2818 * typeck.c (decay_conversion): Diagnose any unknown types 2819 reaching here. 2820 (build_binary_op): Don't do initial decay or default 2821 conversions on overloaded functions. 2822 (build_static_cast): Don't do a decay conversion here. 2823 28242001-07-25 Nathan Sidwell <nathan@codesourcery.com> 2825 2826 PR c++/3543 2827 * typeck.c (condition_conversion): Resolve an OFFSET_REF. 2828 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here. 2829 28302001-07-25 Nathan Sidwell <nathan@codesourcery.com> 2831 2832 * class.c (build_vtbl_or_vbase_field): Remove, move into ... 2833 (create_vtbl_ptr): ... here. 2834 28352001-07-25 Nathan Sidwell <nathan@codesourcery.com> 2836 2837 * class.c (build_vbase_offset_vbtl_entries): Look for 2838 non-primary base of which we are a sub vtable. 2839 28402001-07-24 Phil Edwards <pme@sources.redhat.com> 2841 2842 * semantics.c (finish_this_expr): Remove unused code. 2843 28442001-07-24 Nathan Sidwell <nathan@codesourcery.com> 2845 2846 Simplify rtti, now we've only one ABI. 2847 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID, 2848 CPTI_TINFO_VAR_ID. 2849 (tinfo_decl_id, tinfo_var_id): Remove. 2850 (get_typeid_1): Remove. 2851 * rtti.c 2852 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id. 2853 (typeid_ok_p): New function. 2854 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl. 2855 (get_tinfo_decl): Remove old abi documentation. 2856 (tinfo_from_decl): Remove. 2857 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1. 2858 (get_typeid_1): Remove. 2859 (get_base_offset): Remove. 2860 (synthesize_tinfo_var): Absorb get_base_offset. 2861 (create_real_tinfo_var): Don't use tinfo_decl_id. 2862 28632001-07-23 Graham Stott <grahams@redhat.com> 2864 2865 * cp/class.c (type_requires_array_cookie): Fix use of uninitialised 2866 variable has_two_argument_delete_p. 2867 28682001-07-21 Nathan Sidwell <nathan@codesourcery.com> 2869 2870 Remove flag_vtable_thunk. It is always on for the 3.0 ABI. 2871 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove. 2872 (CPTI_INDEX_IDENTIFIER): Remove. 2873 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove. 2874 (delta2_identifier): Remove. 2875 (index_identifier): Remove. 2876 (pfn_or_delta2_identifier): Remove. 2877 (flag_vtable_thunks): Remove. 2878 (VTABLE_DELTA2_NAME): Remove. 2879 (VTABLE_INDEX_NAME): Remove. 2880 (FNADDR_FROM_VTABLE_ENTRY): Adjust. 2881 (vfunc_ptr_type_node): Adjust. 2882 (VTABLE_NAME_PREFIX): Adjust. 2883 (build_vfn_ref): Lose first parameter. 2884 (fixup_all_virtual_upcast_offsets): Remove. 2885 * decl.c (initialize_predefined_identifiers): Remove 2886 delta2_identifier, index_identifier, pfn_or_delta2_identifier. 2887 (init_decl_processing): Remove no-vtable-thunk code. 2888 * decl2.c (flag_vtable_thunks): Remove. 2889 (mark_vtable_entries): Remove no-vtable-thunk code. 2890 * error.c (dump_decl): Remove no-vtable-thunk code. 2891 (dump_expr): Adjust ptr to member function code. 2892 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk 2893 code. 2894 * rtti.c (build_headof): Remove no-vtable-thunk code. 2895 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call. 2896 * search.c (get_base_distance): Remove expand_upcast_fixups case. 2897 (virtual_context) Remove. 2898 (expand_upcast_fixups): Remove. 2899 (fixup_virtual_upcast_offsets): Remove. 2900 (fixup_all_virtual_upcast_offsets): Remove. 2901 * typeck.c (get_member_function_from_ptrfunc): Remove 2902 no-vtable-thunk code. 2903 * call.c (build_over_call): Adjust call to build_vfn_ref. 2904 * class.c (build_vfn_ref): Lose first parameter. Remove 2905 no-vtable-thunk code. 2906 (build_rtti_vtbl_entries): Remove no-vtable-thunk code. 2907 (build_vtable_entry): Remove no-vtable-thunk code. 2908 29092001-07-20 Nathan Sidwell <nathan@codesourcery.com> 2910 2911 Remove old-abi remnants. Remove comments about old abi 2912 behaviour. Remove references to 'new-abi' in comments. 2913 * cp-tree.h: Adjust comments. 2914 (vbase_offsets_in_vtable_p): Delete. 2915 (vcall_offsets_in_vtable_p): Delete. 2916 (vptrs_present_everywhere_p): Delete. 2917 (all_overridden_vfuns_in_vtables_p): Delete. 2918 (merge_primary_and_secondary_vtables_p): Delete. 2919 (TYPE_CONTAINS_VPTR_P): Adjust. 2920 (VTT_NAME_PREFIX): Remove. 2921 (CTOR_VTBL_NAME_PREFIX): Remove. 2922 (init_vbase_pointers): Remove. 2923 * class.c: Adjust coments. 2924 (build_vbase_pointer_fields): Delete. 2925 (build_vbase_pointer): Remove old-abi code. 2926 (build_secondary_vtable): Likewise. 2927 (modify_all_vtables): Likewise. 2928 (create_vtable_ptr): Likewise. 2929 (layout_class_type): Likewise. 2930 (finish_struct_1): Likewise. 2931 (finish_vtbls): Likewise. 2932 (dfs_finish_vtbls): Delete. 2933 (build_vbase_offset_vtbl_entries): Remove old-abi code. 2934 * cvt.c: Adjust comments. 2935 * decl.c: Adjust comments. 2936 * decl2.c: Adjust comments. 2937 * init.c: Adjust comments. 2938 (construct_virtual_bases): Remove old-abi code. 2939 * lang-specs.h: Remove -fno-new-abi. 2940 * mangle.c: Adjust comments. 2941 * rtti.c: Adjust comments. 2942 (get_base_offset): Remove old-abi-code. 2943 * search.c: Adjust comments. 2944 (dfs_init_vbase_pointers): Remove. 2945 (dfs_vtable_path_unmark): Remove. 2946 (init_vbase_pointers): Remove. 2947 * semantics.c: Adjust comments. 2948 (emit_associated_thunks): Remove old-abi code. 2949 * typeck.c: Adjust comments. 2950 29512001-07-20 Daniel Berlin <dan@cgsoftware.com> 2952 2953 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not 2954 params.h. 2955 29562001-07-19 Mark Mitchell <mark@codesourcery.com> 2957 2958 * class.c (finish_struct_anon): Forbid nested classes. 2959 29602001-07-19 Neil Booth <neil@daikokuya.demon.co.uk> 2961 2962 * decl2.c: Don't include dwarfout.h and dwarf2out.h. 2963 * optimize.c: Include debug.h. 2964 (maybe_clone_body): Use debug hook. 2965 * semantics.c: Include debug.h. 2966 (expand_body): Use debug hook. 2967 29682001-07-19 Neil Booth <neil@daikokuya.demon.co.uk> 2969 2970 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases. 2971 29722001-07-18 Mark Mitchell <mark@codesourcery.com> 2973 2974 * class.c (type_requires_array_cookie): New function. 2975 (check_methods): Don't try to figure out whether the type needs a 2976 cookie here. 2977 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here. 2978 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove. 2979 (TYPE_VEC_NEW_USES_COOKIE): Reimplement. 2980 * pt.c (instantiate_class_template): Don't set 2981 TYPE_VEC_DELETE_TAKES_SIZE. 2982 * NEWS: Document ABI changes from GCC 3.0. 2983 29842001-07-18 Xavier Delacour <xavier@fmaudio.net>, 2985 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> 2986 2987 * NEWS (Changes in GCC 3.0): Fix typo. 2988 29892001-07-13 Joseph S. Myers <jsm28@cam.ac.uk> 2990 2991 * decl2.c (cplus_decl_attributes): Take a pointer to the node to 2992 which attributes are to be attached, and a flags argument. Update 2993 call to decl_attributes. 2994 (grokfield): Update call to decl_attributes. 2995 * class.c (finish_struct): Update call to cplus_decl_attributes. 2996 * cp-tree.h (cplus_decl_attributes): Update prototype. 2997 * decl.c (start_decl, grokdeclarator, start_function): Update 2998 calls to decl_attributes and cplus_decl_attributes. 2999 * friend.c (do_friend): Update call to cplus_decl_attributes. 3000 * parse.y (parse_bitfield): Update call to cplus_decl_attributes. 3001 30022001-07-12 Mark Mitchell <mark@codesourcery.com> 3003 3004 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER 3005 for `register' variables with an asm-specification. 3006 30072001-07-11 Mark Mitchell <mark@codesourcery.com> 3008 3009 * semantics.c (finish_asm_stmt): Mark the output operands 3010 to an asm addressable, if necessary. 3011 30122001-07-11 Ben Elliston <bje@redhat.com> 3013 3014 * Revert this change -- there is a subtle bug. 3015 3016 PR c++/80 3017 * decl.c (finish_enum): New "attributes" argument; pass it to 3018 cplus_decl_attributes. Use a narrower type if the enum is packed. 3019 * cp-tree.h (finish_enum): Adjust prototype. 3020 * parse.y (enum_head): New non-terminal. 3021 (structsp): Use it. Enums now may be preceded or followed by 3022 optional attributes -- pass their chained tree to finish_enum(). 3023 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument. 3024 30252001-07-10 Mark Mitchell <mark@codesourcery.com> 3026 3027 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope 3028 variables. 3029 30302001-07-10 Jason Merrill <jason_merrill@redhat.com> 3031 3032 * semantics.c (cp_expand_stmt): Fix for null 3033 current_function_return_value. 3034 30352001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl> 3036 3037 * call.c (build_op_delete_call): Initialize fn. 3038 (convert_like_real): Delete conditional. 3039 (joust): Initialize *w and *l. 3040 * class.c: Add prototype for binfo_ctor_vtable. 3041 (get_primary_binfo): Initialize result. 3042 * init.c (build_java_class_ref): Initialize name. 3043 30442001-07-09 Erik Rozendaal <dlr@acm.org> 3045 3046 * typeck.c (unary_complex_lvalue): Do not duplicate the 3047 argument to modify, pre-, or post-increment when used as an 3048 lvalue and when the argument has side-effects. 3049 30502001-07-08 Joseph S. Myers <jsm28@cam.ac.uk> 3051 3052 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES. 3053 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call 3054 cplus_decl_attributes even if attrs is NULL. 3055 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES. 3056 30572001-07-08 Joseph S. Myers <jsm28@cam.ac.uk> 3058 3059 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update 3060 calls to decl_attributes. 3061 30622001-07-06 Ira Ruben <ira@apple.com> 3063 3064 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should 3065 be DECL_TEMPLATE_RESULT. 3066 30672001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3068 3069 * cp-tree.h (copy_template_template_parm): Rename to ... 3070 (bind_template_template_parm): ... here. 3071 * tree.c (copy_template_template_parm): Rename to ... 3072 (bind_template_template_parm): ... here. Remove the case when 3073 NEWARGS is NULL_TREE. 3074 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and 3075 BOUND_TEMPLATE_TEMPLATE_PARM. 3076 * pt.c (lookup_template_class): Adjust. 3077 30782001-07-05 Jason Merrill <jason_merrill@redhat.com> 3079 3080 * cvt.c (convert_lvalue): New fn. 3081 * cp-tree.h: Declare it. 3082 * method.c (do_build_assign_ref): Use it. 3083 (do_build_copy_constructor): Convert parm to base types 3084 before calling base constructors. 3085 3086 * typeck.c (check_return_expr): Check DECL_ALIGN instead of 3087 DECL_USER_ALIGN. Check flag_elide_constructors instead of 3088 optimize. 3089 * semantics.c (cp_expand_stmt): Don't destroy the named return value. 3090 30912001-07-02 Nathan Sidwell <nathan@codesourcery.com> 3092 3093 * optimize.c (optimize_inline_calls): New function, broken out 3094 of ... 3095 (optimize_function): ... here. Call it. Don't inline if it is 3096 a thunk. 3097 (dump_function): Print name of dump flag causing this dump. 3098 * semantics.c (expand_body): Move thunk inline check to 3099 optimize_function. 3100 31012001-06-29 Joseph S. Myers <jsm28@cam.ac.uk> 3102 3103 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define. 3104 (comptypes): Use target.comp_type_attributes. 3105 31062001-06-29 Nathan Sidwell <nathan@codesourcery.com> 3107 3108 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration. 3109 31102001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 3111 3112 * error.c (lang_print_error_function): Add a `diagnostic_context *' 3113 parameter. Tweak. 3114 31152001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk> 3116 3117 * decl2.c (import_export_class): Update. 3118 31192001-06-26 Gabriel Dos Reis <gdr@codesourcery.com> 3120 3121 * error.c (init_error): Adjust settings. 3122 31232001-06-26 Gabriel Dos Reis <gdr@codesourcery.com> 3124 3125 * error.c (init_error): Adjust settings. 3126 31272001-06-19 Richard Sandiford <rsandifo@redhat.com> 3128 3129 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to 3130 return pointers to data members by reference rather than by value. 3131 31322001-06-18 Jason Merrill <jason_merrill@redhat.com> 3133 3134 Implement the Named Return Value optimization. 3135 * cp-tree.h (struct cp_language_function): Add x_return_value. 3136 (current_function_return_value): Now a macro. 3137 * decl.c: Don't define it. 3138 (define_label, finish_case_label): Don't clear it. 3139 (init_decl_processing): Don't register it with GC. 3140 * semantics.c (genrtl_finish_function): Don't check it for 3141 no_return_label. Copy the RTL from the return value to 3142 current_function_return_value and walk, calling... 3143 (nullify_returns_r): ...this new fn. 3144 * typeck.c (check_return_expr): Set current_function_return_value. 3145 31462001-06-15 Jason Merrill <jason_merrill@redhat.com> 3147 3148 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're 3149 sharing a ctor vtable with. Merge code for cases 1 and 2. 3150 (binfo_ctor_vtable): New fn. 3151 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it. 3152 31532001-06-14 Jason Merrill <jason_merrill@redhat.com> 3154 3155 * class.c (dfs_find_final_overrider): Fix logic. 3156 3157 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use 3158 virtual thunk instead of non-virtual. 3159 (get_matching_virtual): Uncomment. 3160 3161 * pt.c (unify): Don't recurse between the POINTER_TYPE and the 3162 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on 3163 PARM, not ARG. 3164 31652001-06-14 Nathan Sidwell <nathan@codesourcery.com> 3166 3167 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure 3168 we've not emerged from the hierarchy of RTTI_BINFO on reaching 3169 a non-virtual base. 3170 31712001-06-13 Mark Mitchell <mark@codesourcery.com> 3172 3173 * NEWS: Update release number. 3174 31752001-06-12 Nathan Sidwell <nathan@codesourcery.com> 3176 3177 PR c++/3130, c++/3131, c++/3132 3178 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define. 3179 * class.c (force_canonical_binfo_r): Move 3180 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move 3181 virtual bases unless they're primary and what they're primary 3182 too has been moved. 3183 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope 3184 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and 3185 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most 3186 derived binfo. 3187 (mark_primary_bases): Use BINFO_UNSHARED_MARKED. 3188 (layout_nonempty_base_or_field): Add most derived type 3189 parameter. Adjust. 3190 (layout_empty_base): Likewise. 3191 (build_base_field): Likewise. 3192 (build_base_fields): Likewise. 3193 (propagate_binfo_offsets): Add most derived type 3194 parameter. Skip non canonical virtual bases too. 3195 (dfs_set_offset_for_unshared_vbases): Don't skip primary 3196 bases. Do skip canonical bases. 3197 (layout_virtual_bases): Adjust. 3198 (layout_class_type): Adjust. 3199 (dfs_get_primary_binfo): Build list of virtual primary base 3200 candidates. 3201 (get_primary_binfo): Check that the shared virtual primary 3202 base candidate was found first. 3203 (accumulate_vtbl_inits): Don't do anything for non-vptr 3204 containing binfos. For case 1 primary virtual bases, keep 3205 checking that we've not emerged from the hierarchy of RTTI_BINFO. 3206 32072001-06-12 Nathan Sidwell <nathan@codesourcery.com> 3208 3209 PR c++/3089 3210 * class.c (dfs_accumulate_vtbl_inits): Always walk down the 3211 hierarchy looking for primary bases for a ctor 3212 vtable. Recursively call oneself, if we meet our primary via 3213 this route and haven't met it yet via inheritance graph order. 3214 32152001-06-11 Mark Mitchell <mark@codesourcery.com> 3216 3217 * lang-options.h: Emit documentation for -fno-honor-std, not 3218 -fhonor-std. 3219 32202001-06-10 Alexandre Oliva <aoliva@redhat.com> 3221 3222 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]: 3223 Don't clobber delta. 3224 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn. 3225 32262001-06-10 Mark Mitchell <mark@codesourcery.com> 3227 Gabriel Dos Reis <gdr@codesourcery.com> 3228 3229 * Make-lang.in (cp/call.o): Depend on diagnostic.h 3230 (cp/typeck.o): Depend on diagnostic.h 3231 (cp/typeck2.o): Depend on diagnostic.h 3232 (cp/repo.o): Depend on dignostic.h 3233 * typeck.c: #include diagnostic.h 3234 (convert_for_initialization): Remove extern declaration for 3235 warningcount and errorcount. 3236 3237 * call.c: #include diagnostic.h 3238 (convert_like_real): Remove extern declaration for warnincount and 3239 errorcount. 3240 3241 * repo.c: #include diagnostic.h 3242 * typeck2.c: #include diagnostic.h 3243 32442001-06-08 Nathan Sidwell <nathan@codesourcery.com> 3245 3246 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko 3247 in previous change. 3248 32492001-06-08 Nathan Sidwell <nathan@codesourcery.com> 3250 3251 PR c++/2929 3252 * friend.c (do_friend): Use push_decl_namespace for classes at 3253 namespace scope. 3254 32552001-06-08 Nathan Sidwell <nathan@codesourcery.com> 3256 Jason Merrill <jason_merrill@redhat.com> 3257 3258 PR c++/3061 3259 * class.c (build_secondary_vtable): Use assert, rather than an error 3260 message. 3261 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL. 3262 (dfs_accumulate_vtbl_inits): A lost primary virtual base may 3263 be between ORIG_BINFO and RTTI_BINFO, but neither of them. 3264 Don't set BINFO_VTABLE for a primary virtual base. 3265 32662001-06-07 Mark Mitchell <mark@codesourcery.com> 3267 3268 * decl.c (duplicate_decls): Update source position information 3269 when a template function is defined. 3270 32712001-06-07 Phil Edwards <pme@sources.redhat.com> 3272 3273 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h. 3274 32752001-06-07 Nathan Sidwell <nathan@codesourcery.com> 3276 3277 PR c++/2914 3278 * decl.c (pushtag): Don't push into a complete type's scope. 3279 32802001-06-06 Jason Merrill <jason_merrill@redhat.com> 3281 3282 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose. 3283 (struct lang_decl_flags): Lose generate_with_vtable_p. 3284 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose. 3285 * class.c (copy_virtuals): Adjust. 3286 * decl2.c (mark_vtable_entries): Adjust. 3287 * method.c (make_thunk, build_vtable_entry): Adjust. 3288 * class.c (update_vtable_entry_for_fn): Only look as far as the 3289 first defining class. 3290 (build_vtbl_initializer): Put nothing in the slot for a function only 3291 defined in a lost primary virtual base. 3292 (add_vcall_offset_vtbl_entries_1): Use the same code for 3293 the lost primary case and the normal case. 3294 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base. 3295 (get_vfield_offset, get_derived_offset): Lose. 3296 (dfs_find_final_overrider): Use look_for_overrides_here. 3297 (get_matching_virtual): New fn. 3298 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P, 3299 not BV_VCALL_INDEX. 3300 * search.c (look_for_overrides_here): Split out from... 3301 (look_for_overrides_r): Here. 3302 3303 * class.c (find_final_overrider): Return error_mark_node on error. 3304 3305 * decl2.c (key_method): #if 0 accidental change. 3306 33072001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca> 3308 3309 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P. 3310 (build_over_call): Likewise. 3311 * decl.c (grokparms): Likewise. 3312 * pt.c (tsubst_decl): Likewise. 3313 * typeck.c (convert_arguments): Likewise. 3314 33152001-06-05 Mark Mitchell <mark@codesourcery.com> 3316 3317 * semantics.c (begin_class_definition): Robustify. 3318 3319 * pt.c (instantiate_decl): Tell the repository code about the 3320 clones, not the cloned functions. 3321 * repo.c (repo_template_used): Explicitly instantiate the cloned 3322 function, not the clones. 3323 33242001-06-05 Nathan Sidwell <nathan@codesourcery.com> 3325 3326 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and 3327 ICS_BAD_FLAG on created conversion. 3328 (compare_ics): Break out rank. 3329 33302001-06-05 Nathan Sidwell <nathan@codesourcery.com> 3331 3332 * decl.c (xref_tag): Remove extraneous %s on dependent name 3333 lookup warning. 3334 33352001-06-05 Nathan Sidwell <nathan@codesourcery.com> 3336 3337 * class.c (layout_vtable_decl): Fix off by one error on 3338 build_index_type. 3339 (build_vtt): Likewise. 3340 (build_ctor_vtbl_group): Likewise. 3341 33422001-06-05 Nathan Sidwell <nathan@codesourcery.com> 3343 3344 * class.c (maybe_indent_hierarchy): New function. 3345 (dump_class_hierarchy_r): Add flags. Dump extra binfo 3346 information, if enabled. Use maybe_indent_hierarchy. Adjust 3347 output format. 3348 (dump_class_hierarchy): Adjust prototype. Adjust output format. 3349 (dump_array, dump_vtable, dump_vtt): New functions. 3350 (finish_struct_1): Adjust hierarchy dumping. 3351 (initialize_vtable): Call dump_vtable. 3352 (build_vtt): Call dump_vtt. 3353 (build_ctor_vtbl_group): Call dump_vtable. 3354 * decl2.c (flag_dump_class_layout): Remove. 3355 (cxx_decode_option): Remove dump translation unit 3356 and dump class hierarchy check. Call dump_switch_p. 3357 (finish_file): Adjust dumping. 3358 (dump.c): Only dump base classes if not TDF_SLIM. 3359 Only dump namespace members if not TDF_SLIM. 3360 * optimize.c (dump_function): New function. 3361 (optimize_function): Call dump_function. 3362 * semantics.c (expand_body): Use dump_enabled_p. 3363 33642001-06-01 Nathan Sidwell <nathan@codesourcery.com> 3365 3366 PR g++/2936 3367 Part missed from first commit 3368 * decl2.c (finish_anon_union): Copy context. 3369 33702001-05-30 Nathan Sidwell <nathan@codesourcery.com> 3371 3372 PR g++/2936 3373 * optimize.c (remap_decl): Remap anonymous aggregate members too. 3374 33752001-05-26 Nathan Sidwell <nathan@codesourcery.com> 3376 3377 PR g++/2823 3378 * semantics.c (expand_body): Don't optimize thunks. 3379 33802001-05-25 Sam TH <sam@uchicago.edu> 3381 3382 * cp-tree.h lex.h: Fix header include guards. 3383 33842001-05-25 Mark Mitchell <mark@codesourcery.com> 3385 3386 * decl.c (init_decl_processing): Tweak. 3387 33882001-05-24 Mark Mitchell <mark@codesourcery.com> 3389 3390 * decl.c (duplicate_decls): Tidy. 3391 (init_decl_processing): Always set flag_no_builtin. 3392 33932001-05-24 Nathan Sidwell <nathan@codesourcery.com> 3394 3395 PR c++/2184 3396 * decl2.c (do_local_using_decl): Push the decls, even in a 3397 template. 3398 33992001-05-22 Mark Mitchell <mark@codesourcery.com> 3400 3401 * optimize.c (initialize_inlined_parameters): Don't set 3402 TREE_READONLY for a VAR_DECL taking the place of an inlined 3403 PARM_DECL. 3404 34052001-05-22 Jason Merrill <jason_merrill@redhat.com> 3406 3407 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support. 3408 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface 3409 attribute. 3410 34112001-05-22 Joseph S. Myers <jsm28@cam.ac.uk> 3412 3413 * parse.y: Refer to compound literals as such, not as 3414 constructor-expressions. 3415 34162001-05-21 Mark Mitchell <mark@codesourcery.com> 3417 3418 * call.c (build_op_delete_call): Ignore exception-specifications 3419 when looking for matching delete operators. 3420 * init.c (build_new_1): Compute whether or not the allocation 3421 function used is a placement allocation function or not, and 3422 communicate this information to build_op_delete_call. 3423 34242001-05-21 Jason Merrill <jason_merrill@redhat.com> 3425 3426 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi. 3427 (build_vtbl_ref): Adjust. 3428 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address. 3429 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks. 3430 Re-add vtable-gc. 3431 (unsupported_options): Correspondingly. 3432 3433 * decl2.c (maybe_make_one_only): Check flag_weak, not 3434 supports_one_only(). 3435 3436 * cp-tree.def (START_CATCH_STMT): Lose. 3437 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS. 3438 * tree.c (cp_statement_code_p): Don't case it. 3439 * semantics.c (cp_expand_stmt): Likewise. 3440 * cp-tree.h (START_CATCH_TYPE): Lose. 3441 (HANDLER_TYPE): New. 3442 * except.c (expand_start_catch_block): Don't start any blocks. 3443 Return the type. 3444 (expand_end_catch_block): Don't end any blocks. 3445 * parse.y (handler): Don't pass anything from finish_handler_parms 3446 to finish_handler. 3447 * pt.c (tsubst_expr): Likewise. 3448 * semantics.c (begin_handler): Call note_level_for_catch here. 3449 (finish_handler_parms): Don't return anything. 3450 (genrtl_catch_block, begin_catch_block): Lose. 3451 (genrtl_handler): Call expand_start_catch here. 3452 34532001-05-18 Jason Merrill <jason_merrill@redhat.com> 3454 3455 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here. 3456 (get_vtable_decl, build_vtt): Not here. 3457 34582001-05-20 Nathan Sidwell <nathan@codesourcery.com> 3459 3460 PR c++/2781 3461 * optimize.c (update_cloned_parm): Copy addressability and other 3462 flags. 3463 34642001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3465 3466 * pt.c (determine_specialization): Ignore artificial functions. 3467 34682001-05-20 Neil Booth <neil@daikokuya.demon.co.uk> 3469 3470 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update. 3471 (C_RID_CODE): Remove. 3472 * lex.c (cxx_init_options): Call set_identifier_size. Update. 3473 (init_parse): Don't do it here. 3474 34752001-05-18 Diego Novillo <dnovillo@redhat.com> 3476 3477 * decl2.c (finish_objects): Use the original SYMBOL_REF from the 3478 function declaration to avoid stripping the symbol's attributes. 3479 34802001-05-18 Nathan Sidwell <nathan@codesourcery.com> 3481 3482 * decl.c (pushdecl): Adjust error string. 3483 (xref_tag): Adjust friend class injection warning. Remove the 3484 inherited name from the class shadowed scope. 3485 34862001-05-17 Mark Mitchell <mark@codesourcery.com> 3487 3488 * except.c (cp_protect_cleanup_actions): New function. 3489 (init_exception_processing): Don't set protect_cleanup_actions 3490 here. Do set lang_protect_cleanup_actions. 3491 34922001-05-16 Nathan Sidwell <nathan@codesourcery.com> 3493 3494 * spew.c (read_token): Call yyerror on all unexpected tokens. 3495 34962001-05-16 Nathan Sidwell <nathan@codesourcery.com> 3497 3498 * init.c (member_init_ok_or_else): Take a tree rather than 3499 string for name. 3500 (expand_member_init): Adjust. 3501 35022001-05-14 Nick Clifton <nickc@cambridge.redhat.com> 3503 3504 * decl.c (duplicate_decls): Suppress warning about duplicate 3505 decls if the first decl is a friend. 3506 35072001-05-12 Zack Weinberg <zackw@stanford.edu> 3508 3509 * except.c (choose_personality_routine): Export. Add 3510 explanatory comment. Take an enum languages, not a boolean. 3511 (initialize_handler_parm): Adjust to match. 3512 * cp-tree.h: Prototype choose_personality_routine. 3513 * lex.c (handle_pragma_java_exceptions): New function. 3514 (init_cp_pragma): Register #pragma GCC java_exceptions. 3515 35162001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk> 3517 3518 * method.c (build_mangled_C99_name): Remove unused prototype. 3519 35202001-05-12 Alexandre Oliva <aoliva@redhat.com> 3521 3522 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type. 3523 * typeck.c (get_member_function_from_ptrfunc, 3524 build_ptrmemfunc, expand_ptrmemfunc_cst): Take 3525 TARGET_PTRMEMFUNC_VBIT_LOCATION into account. 3526 3527 Reverted Geoff Keating's 2001-05-03's patch. 3528 35292001-05-11 Ira Ruben <ira@apple.com> 3530 3531 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h. 3532 35332001-05-11 Neil Booth <neil@daikokuya.demon.co.uk> 3534 3535 * cp-tree.h (finish_label_expr, lookup_label): Delete. 3536 * parse.y: Update for '&&'; don't issue warning here. 3537 * semantics.c (finish_label_expr): Delete. 3538 35392001-05-07 Mark Mitchell <mark@codesourcery.com> 3540 3541 * splay-tree.h (splay_tree_max): New function. 3542 (splay_tree_min): Likewise. 3543 35442001-05-03 Geoffrey Keating <geoffk@redhat.com> 3545 3546 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER. 3547 (pfn_vflag_identifier): Define. 3548 Update comment about layout of pointer functions. 3549 (build_ptrmemfunc1): Update prototype. 3550 (expand_ptrmemfunc_cst): Update prototype. 3551 * decl.c (initialize_predefined_identifiers): Initialize 3552 pfn_vflag_identifier. 3553 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add 3554 an extra field to the type. 3555 * expr.c (cplus_expand_constant): Pass 'flag' between 3556 expand_ptrmemfunc_cst and build_ptrmemfunc1. 3557 * typeck.c (get_member_function_from_ptrfunc): When 3558 FUNCTION_BOUNDARY < 16, look at additional field to determine 3559 if a pointer-to-member is a real pointer or a vtable offset. 3560 (build_ptrmemfunc1): Add new parameter to contain extra field. 3561 (build_ptrmemfunc): Pass the extra field around. 3562 (expand_ptrmemfunc_cst): Add new parameter to return extra field. 3563 (pfn_from_ptrmemfunc): Ignore the extra field. 3564 35652001-05-03 Mark Mitchell <mark@codesourcery.com> 3566 3567 * cp-tree.h (flag_inline_trees): Update documentation. 3568 * decl.c (init_decl_processing): Adjust handling of 3569 flag_inline_functions and flag_inline_trees to support -O3. 3570 (grokfndecl): Set DECL_INLINE on all functions if that's what 3571 the user requested. 3572 (save_function_data): Clear DECL_INLINE in 3573 current_function_cannot_inline is non-NULL. 3574 * decl2.c (flag_inline_trees): Update documentation. 3575 35762001-05-03 Nathan Sidwell <nathan@codesourcery.com> 3577 3578 * dump.c (cp_dump_tree, USING_STMT case): New case. 3579 * tree.c (cp_statement_code_p): Add USING_STMT. 3580 * decl2.c (do_using_directive): Add the using directive statement. 3581 3582 * tree.c (walk_tree): Reformat an if block. 3583 35842001-05-02 Mark Mitchell <mark@codesourcery.com> 3585 3586 * decl.c (compute_array_index_type): Don't try to do anything with 3587 the indices when processing a template. 3588 35892001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3590 3591 * call.c: NULL_PTR -> NULL. 3592 * class.c: Likewise. 3593 * cvt.c: Likewise. 3594 * decl.c: Likewise. 3595 * decl2.c: Likewise. 3596 * except.c: Likewise. 3597 * init.c: Likewise. 3598 * rtti.c: Likewise. 3599 * search.c: Likewise. 3600 * tree.c: Likewise. 3601 * typeck.c: Likewise. 3602 * typeck2.c: Likewise. 3603 36042001-05-02 Mark Mitchell <mark@codesourcery.com> 3605 3606 * decl2.c (do_using_directive): Revert previous patch. 3607 36082001-05-01 Nathan Sidwell <nathan@codesourcery.com> 3609 3610 * cp-tree.def (USING_STMT): New statement node. 3611 * cp-tree.h (USING_STMT_NAMESPACE): New macro. 3612 * decl2.c (do_using_directive): Add USING_STMT to statement 3613 tree. Don't emit errors when processing template decl. 3614 * pt.c (tsubst_expr, USING_STMT case): New case. 3615 * semantics.c (cp_expand_stmt, USING_STMT case): New case. 3616 36172001-05-01 Nathan Sidwell <nathan@codesourcery.com> 3618 3619 * call.c (build_new_op): Convert args from reference here. 3620 (build_conditional_expr): Don't convert here. 3621 36222001-05-01 Nathan Sidwell <nathan@codesourcery.com> 3623 3624 * spew.c (last_token_id): New static variable. 3625 (read_token): Set it here. 3626 (yyerror): Use it here. 3627 36282001-04-30 Richard Henderson <rth@redhat.com> 3629 3630 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations. 3631 * decl.c: Likewise. 3632 36332001-04-30 Mark Mitchell <mark@codesourcery.com> 3634 3635 * gxxint.texi: Remove. 3636 * Make-lang.in: Remove all traces of gxxint.texi. 3637 3638Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com> 3639 3640 * decl2.c (start_static_initialization_or_destruction): Correct 3641 logic to handle the -fno-use-cxa-atexit case. 3642 36432001-04-30 Mark Mitchell <mark@codesourcery.com> 3644 3645 * optimize.c (update_cloned_parm): New function. 3646 (maybe_clone_body): Use it. Update the `this' parameter too. 3647 36482001-04-29 Joseph S. Myers <jsm28@cam.ac.uk> 3649 3650 * decl2.c (unsupported_options): Add new-abi. 3651 * lang-options.h: Remove no longer supported options. 3652 36532001-04-27 Nathan Sidwell <nathan@codesourcery.com> 3654 3655 * except.c (can_convert_eh): Don't check template parms, 3656 typename types etc. 3657 36582001-04-27 Nathan Sidwell <nathan@codesourcery.com> 3659 3660 * optimize.c (maybe_clone_body): Copy parameter names and locations. 3661 36622001-04-27 Nathan Sidwell <nathan@codesourcery.com> 3663 3664 * cp-tree.h (adjust_clone_args): Prototype new function. 3665 * class.c (adjust_clone_args): New function. 3666 * decl.c (start_function): Call it for in charge ctors. 3667 36682001-04-26 Mark Mitchell <mark@codesourcery.com> 3669 3670 * method.c (use_thunk): Make sure that thunks really are emitted 3671 when requested. 3672 36732001-04-26 Nathan Sidwell <nathan@codesourcery.com> 3674 3675 * mangle.c (write_chars): New macro. 3676 (hwint_to_ascii): New function 3677 (write_number): Use it. 3678 (write_integer_cst): Deal with really big numbers. 3679 36802001-04-25 Mark Mitchell <mark@codesourcery.com> 3681 3682 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting 3683 the clone. 3684 36852001-04-25 Nathan Sidwell <nathan@codesourcery.com> 3686 3687 * decl.c (grokdeclarator): Set context of namespace scope 3688 TYPE_DECLS. 3689 36902001-04-24 Zack Weinberg <zackw@stanford.edu> 3691 3692 * cp/optimize.c: Include hashtab.h. 3693 (struct inline_data): Add tree_pruner. 3694 (expand_call_inline, expand_calls_inline): Use it when calling 3695 walk_tree. 3696 (optimize_function): Initialize and free tree_pruner. 3697 36982001-04-24 Nathan Sidwell <nathan@codesourcery.com> 3699 3700 Lazy __FUNCTION__ generation. 3701 * cp-tree.def (FUNCTION_NAME): Remove. 3702 * cp-tree.h (function_name_declared_p): Remove. 3703 (cp_fname_init): Prototype. 3704 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids, 3705 don't call declare_function_name. Call start_fname_decls. 3706 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't 3707 clobber the line number. 3708 (cp_fname_init): New function. 3709 (start_function): Call start_fname_decls. 3710 (finish_function): Call finish_fname_decls. 3711 * lex.c (reswords): Add slots for __FUNCTION__ et al. 3712 (rid_to_yy): Add mappings for __FUNCTION__ et al. 3713 * optimize.c (maybe_clone_body): Remove function_name_declared_p. 3714 * parse.y (VAR_FUNC_NAME): New token. 3715 (primary): Add VAR_FUNC_NAME. 3716 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's 3717 generation. 3718 (tsubst, FUNCTION_NAME case): Remove. 3719 (tsubst_copy, FUNCTION_NAME case): Remove. 3720 (tsubst_expr, DECL_STMT case): Be careful with a 3721 DECL_PRETTY_FUNCTION_P. 3722 (instantiate_decl): Remove function_name_declared_p. 3723 * semantics.c (begin_compound_statement): Don't call 3724 declare_function_name here. 3725 (setup_vtbl_ptr). Don't save & restore function_name_declared_p. 3726 (finish_translation_unit): Call finish_fname_decls. 3727 (expand_body): Remove function_name_declared_p. 3728 * typeck2.c (digest_init): Allow any ERROR_MARK. 3729 37302001-04-24 Nathan Sidwell <nathan@codesourcery.com> 3731 3732 * pt.c (tsubst_decl): Use VOID_TYPE_P. 3733 * semantics.c: Fix some typos. 3734 37352001-04-23 Phil Edwards <pme@sources.redhat.com> 3736 3737 * cp/decl2.c (flag_honor_std): Always initialize to 1. 3738 37392001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3740 3741 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf. 3742 37432001-04-23 Jason Merrill <jason_merrill@redhat.com> 3744 3745 * except.c (build_throw): Wrap the initialization of the exception 3746 object in a MUST_NOT_THROW_EXPR. 3747 (do_free_exception): #if 0. 3748 37492001-04-20 Mark Mitchell <mark@codesourcery.com> 3750 3751 * cp-tree.h (finish_enum): Change prototype. 3752 * decl.c (finish_enum): Reorganize. 3753 * parse.y (structsp): Adjust calls to finish_enum. 3754 37552001-04-20 Nathan Sidwell <nathan@codesourcery.com> 3756 3757 * tree.c (cp_tree_equal): Adjust final switch formatting. Add 3758 't' case. 3759 37602001-04-20 Nathan Sidwell <nathan@codesourcery.com> 3761 3762 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED. 3763 (layout_empty_base): Return at end flag. 3764 (build_base_field): Likewise. 3765 (build_base_fields): Likewise. 3766 (layout_virtual_bases): Don't add 1 to eoc value. 3767 (end_of_class): Use full size for empty bases. 3768 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended 3769 empty bases. Don't add 1 to eoc value. Only add trailing padding 3770 if we're an empty class with no empty bases. 3771 (dump_class_hierarchy): Dump size and alignment. 3772 37732001-04-20 Jakub Jelinek <jakub@redhat.com> 3774 3775 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and 3776 ICS_BAD_FLAG. 3777 37782001-04-20 Jakub Jelinek <jakub@redhat.com> 3779 3780 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL 3781 is found, look first if name does not match the structure name. 3782 37832001-04-19 Mark Mitchell <mark@codesourcery.com> 3784 3785 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is 3786 set. 3787 (SET_DECL_LANGUAGE): New macro. 3788 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE. 3789 (pushdecl): Likewise. 3790 (build_library_fn_1): Likewise. 3791 (build_cp_library_fn): Likewise. 3792 (grokfndecl): Likewise. 3793 (grokvardecl): Mark `extern "C"' variables as having C linkage. 3794 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE. 3795 * lex.c (retrofit_lang_decl): Likewise. 3796 * mangle.c (mangle_decl_string): Don't mangle the names of 3797 variables declared with C language linkage. 3798 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE. 3799 38002001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca> 3801 3802 * semantics.c (simplify_aggr_init_exprs_r): Don't restore 3803 flag_access_control from uninitialized storage. 3804 38052001-04-15 Mark Mitchell <mark@codesourcery.com> 3806 3807 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation. 3808 * mangle.c (write_pointer_to_member_type): Fix mangling of 3809 pointers to cv-qualified member function types. 3810 3811 * init.c (build_delete): Create a SAVE_EXPR for the address if 3812 we're going to use it more than once. 3813 38142001-04-13 Mark Mitchell <mark@codesourcery.com> 3815 3816 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove. 3817 (expand_ptremfunc_cst): Change prototype. 3818 (delta2_from_ptrmemfunc): Remove. 3819 * expr.c (cplus_expand_constant): Adjust call to 3820 expand_ptrmemfunc_cst. 3821 * typeck.c (build_ptrmemfunc1): Simplify. 3822 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still 3823 results in a constant. 3824 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters. 3825 (delta2_from_ptrmemfunc): Remove. 3826 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst. 3827 38282001-04-12 Jason Merrill <jason_merrill@redhat.com> 3829 3830 * cp-tree.h (decl_namespace_list): New macro. 3831 (struct saved_scope): Add decl_ns_list. 3832 * decl.c (mark_saved_scope): Mark it. 3833 * decl2.c: Lose static decl_namespace_list. 3834 (init_decl2): Don't save it. 3835 38362001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3837 3838 * cp-tree.h (warn_return_type, yylex): Delete redundant 3839 declarations. 3840 3841 * decl.c (current_class_depth, global_namespace): Likewise. 3842 3843 * decl2.c (current_class_depth, flag_gnu_xref): Likewise 3844 3845 * repo.c (flag_use_repository): Likewise. 3846 38472001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3848 3849 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block, 3850 set_block, pushdecl, getdecls, gettags, init_decl_processing, 3851 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p, 3852 lvalue_or_else, print_lang_statistics, comp_target_types, 3853 unsigned_type, signed_type, signed_or_unsigned_type, 3854 build_function_call, mark_addressable, incomplete_type_error): 3855 Delete redundant declarations. 3856 38572001-04-11 Jason Merrill <jason_merrill@redhat.com> 3858 3859 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro. 3860 (TYPE_ANONYMOUS_P): New macro. 3861 (TAGGED_TYPE_P): New macro. 3862 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P. 3863 (grokfndecl, grokvardecl, grokdeclarator): Likewise. 3864 * tree.c (no_linkage_helper): Likewise. 3865 * semantics.c (begin_class_definition): Likewise. 3866 * pt.c (convert_template_argument): Likewise. 3867 * lex.c (check_for_missing_semicolon): Likewise. 3868 38692001-04-12 Nathan Sidwell <nathan@codesourcery.com> 3870 3871 * class.c (dfs_unshared_virtual_bases): New function. 3872 (mark_primary_bases): Call it. 3873 (check_bases): Ignore virtual bases when determining 3874 nearly-emptiness. 3875 38762001-04-12 Nathan Sidwell <nathan@codesourcery.com> 3877 3878 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION. 3879 38802001-04-11 Mark Mitchell <mark@codesourcery.com> 3881 3882 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the 3883 cloned function to the clone. 3884 38852001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3886 3887 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H). 3888 3889 * semantics.c: Include expr.h. 3890 38912001-04-11 Nathan Sidwell <nathan@codesourcery.com> 3892 3893 * method.c (implicitly_declare_fn): Commonize code for copy ctor 3894 and assignment op. Set TREE_USED for parameter. 3895 38962001-04-10 Mark Mitchell <mark@codesourcery.com> 3897 3898 * class.c (find_final_overrider_data): Add `candidates'. 3899 (dfs_find_final_overrider): Don't issue error messages 3900 prematurely. 3901 (find_final_overrider): Issue error messages here. 3902 (build_base_field): Don't warn about amgibuous direct bases here. 3903 (warn_about_ambiguous_direct_bases): New function. 3904 (layout_class_type): Use it. 3905 39062001-04-10 Richard Henderson <rth@redhat.com> 3907 3908 * typeck.c (build_array_ref): Push the array reference inside 3909 COMPOUND_EXPR and COND_EXPR. 3910 39112001-04-05 Mark Mitchell <mark@codesourcery.com> 3912 3913 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P. 3914 * decl.c (duplicate_decls): Adjust accordingly. 3915 (maybe_commonize_var): Likewise. 3916 (grokfndecl): Likewise. 3917 (start_function): Likewise. 3918 (start_method): Likewise. 3919 * decl2.c (key_method): Likewise. 3920 (import_export_decl): Likewise. 3921 * method.c (implicitly_declare_fn): Likewise. 3922 * optimize.c (maybe_clone_body): Likewise. 3923 39242001-04-05 Benjamin Kosnik <bkoz@redhat.com> 3925 3926 * lang-specs.h: Add __DEPRECATED. 3927 3928Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com> 3929 3930 * search.c (get_dynamic_cast_base_type): When building a new 3931 constant, set its type to ssizetype. 3932 39332001-04-04 Jakub Jelinek <jakub@redhat.com> 3934 3935 * optimize.c (expand_call_inline): Only add newly inlined statements 3936 into inlined_stmts. 3937 39382001-04-03 Mark Mitchell <mark@codesourcery.com> 3939 3940 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove. 3941 (OPERATOR_FORMAT): Likewise. 3942 (OPERATOR_TYPENAME_FORMAT): Likewise. 3943 * operators.def: Remove old name-mangling information. 3944 * decl.c (grok_op_properties): Adjust accordingly. 3945 * lex.c (init_operators): Likewise. 3946 * rtti.c (get_tinfo_decl): Issue error messages about types that 3947 have variable size. 3948 39492001-04-03 Mark Mitchell <mark@codesourcery.com> 3950 3951 * decl2.c (import_export_decl): Don't call import_export_class 3952 when processing an inline member function. 3953 * semantics.c (expand_body): Call import_export_decl before 3954 emitting inline functions. 3955 39562001-03-28 Richard Henderson <rth@redhat.com> 3957 3958 IA-64 ABI Exception Handling: 3959 * cp-tree.def (EH_SPEC_BLOCK): New. 3960 (MUST_NOT_THROW_EXPR): New. 3961 * cp-tree.h: Update changed function declarations. 3962 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove. 3963 (CPTI_CALL_UNEXPECTED): New. 3964 (struct cp_language_function): Rename x_eh_spec_try_block 3965 to x_eh_spec_block. 3966 (EH_SPEC_STMTS, EH_SPEC_RAISES): New. 3967 * decl.c (current_binding_level): If no current function 3968 bindings, revert to scope_chain. 3969 (initialize_predefined_identifiers): Remove __cp_push_exception. 3970 (store_parm_decls): Use begin_eh_spec_block. 3971 (finish_function): Use finish_eh_spec_block. 3972 (mark_lang_function): Update for name changes. 3973 * decl2.c (finish_file): No mark_all_runtime_matches. 3974 * dump.c (cp_dump_tree): Handle new tree codes. 3975 * error.c (dump_expr) [BIND_EXPR]: Fix typo. 3976 * except.c (catch_language_init, catch_language): Remove. 3977 (init_exception_processing): Don't set language code. 3978 Initialize call_unexpected_node, protect_cleanup_actions, 3979 eh_personality_libfunc, lang_eh_runtime_type. 3980 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove. 3981 (get_eh_type, get_eh_caught, get_eh_handlers): Remove. 3982 (prepare_eh_type): Split out type canonicalizations ... 3983 (build_eh_type_type): ... from here. 3984 (build_eh_type_type_ref): Remove. 3985 (mark_all_runtime_matches): Remove. 3986 (build_exc_ptr): New. 3987 (do_begin_catch, do_end_catch): New. 3988 (do_pop_exception): Remove. 3989 (build_terminate_handler): Remove. 3990 (choose_personality_routine): Split out language choice from ... 3991 (initialize_handler_parm): ... here. 3992 Use MUST_NOT_THROW_EXPR. 3993 (expand_start_catch_block): Use do_begin_catch. Simplify Java 3994 exception object handling. 3995 (expand_start_eh_spec, expand_end_eh_spec): Remove. 3996 (expand_exception_blocks, alloc_eh_object): Remove. 3997 (begin_eh_spec_block, finish_eh_spec_block): New. 3998 (do_allocate_exception, do_free_exception): New. 3999 (expand_throw): Merge into ... 4000 (build_throw): ... here. Update for abi. 4001 * expr.c (cplus_expand_expr): No expand_internal_throw. 4002 Handle MUST_NOT_THROW_EXPR. 4003 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK. 4004 * semantics.c (*) Update for except.h name changes. 4005 (genrtl_try_block): No protect_with_terminate. 4006 (genrtl_eh_spec_block): New. 4007 (genrtl_handler): Don't emit the goto here. 4008 (cp_expand_stmt): Handle EH_SPEC_BLOCK. 4009 (genrtl_finish_function): Don't expand_exception_blocks. 4010 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK. 4011 40122001-03-28 Richard Henderson <rth@redhat.com> 4013 4014 * decl.c (struct named_label_list): Rename eh_region to 4015 in_try_scope, add in_catch_scope. 4016 (struct binding_level): Rename eh_region to is_try_scope, 4017 add is_catch_scope. 4018 (note_level_for_try): Rename from note_level_for_eh. 4019 (note_level_for_catch): New. 4020 (poplevel): Copy both is_try_scope and is_catch_scope to 4021 the named_label_list struct. 4022 (check_previous_goto_1): Don't check for catch block via 4023 DECL_ARTIFICIAL; use in_try_scope instead. 4024 (check_goto): Likewise. 4025 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare. 4026 * except.c (expand_start_catch_block): Call note_level_for_catch. 4027 * semantics.c (begin_compound_stmt): Update for note_level_for_try. 4028 40292001-03-27 Richard Henderson <rth@redhat.com> 4030 4031 * except.c: Use USING_SJLJ_EXCEPTIONS instead of 4032 exceptions_via_longjmp. 4033 40342001-03-27 Phil Edwards <pme@sources.redhat.com> 4035 4036 * pt.c (check_default_tmpl_args): Make error messages clearer. 4037 40382001-03-26 Phil Edwards <pme@sources.redhat.com> 4039 4040 * error.c: Also undefine 'A' macro used for cp_printers definition. 4041 40422001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4043 4044 * Make-lang.in: Depend on $(SYSTEM_H), not system.h. 4045 40462001-03-26 Mike Yang <yang@research.att.com> 4047 Mark Mitchell <mark@codesourcery.com> 4048 4049 * dump.c (dump_access): New function. 4050 (cp_dump_tree): Use it. Dump basetype information for class 4051 types. 4052 40532001-03-26 Mark Mitchell <mark@codesourcery.com> 4054 4055 * Makefile.in (optimize.o): Depend on params.h. 4056 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE. 4057 (init_decl_processing): Set flag_no_inline when doing 4058 inlining-on-trees. 4059 * optimize.c: Include params.h. 4060 (struct inline_data): Improve documentation of FNS. Add 4061 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P. 4062 (INSNS_PER_STMT): New macro. 4063 (remap_block): Use CLONING_P. 4064 (inlinable_function_p): Don't inline big functions. 4065 (expand_call_inline): Keep track of how much inlining we've done. 4066 (optimize_function): Set FIRST_INLINED_FN. 4067 (maybe_clone_body): Set CLONING_P. 4068 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in 4069 tree nodes. 4070 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling 4071 rest_of_compilation. Clear DECL_RTL for local variables 4072 afterwards. 4073 (clear_decl_rtl): New function. 4074 40752001-03-26 Nathan Sidwell <nathan@codesourcery.com> 4076 4077 Implement DR 209 4078 * cp-tree.h (skip_type_access_control, 4079 reset_type_access_control): Prototype. 4080 * decl.c (grokdeclarator): Access of friends is not checked. 4081 * parse.y (component_decl_list): Reset type access control. 4082 * semantics.c (decl_type_access_control): Clear 4083 current_type_lookups. 4084 (save_type_access_control): Don't save if not deferring. 4085 (skip_type_access_control, reset_type_access_control): New 4086 functions. 4087 (begin_class_definition): Do type access control for basetypes. 4088 Start deferred access control. 4089 (finish_class_definition): Resume immediate access control if 4090 this is a local class. 4091 40922001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4093 4094 * class.c (add_method): Use memcpy/memmove, not bcopy. 4095 4096 * decl.c (duplicate_decls): Likewise. 4097 40982001-03-23 Jakub Jelinek <jakub@redhat.com> 4099 4100 * mangle.c (write_discriminator): Use `_0' for discriminator 1, 4101 not `_'. 4102 41032001-03-23 Jakub Jelinek <jakub@redhat.com> 4104 4105 * decl.c (local_names): Define. 4106 (push_local_name): New. 4107 (grok_reference_init): Return init if initializing static reference 4108 variable with non-constant instead of emitting it. 4109 Move expand_static_init call to cp_finish_decl. 4110 (layout_var_decl): Call push_local_name. 4111 (maybe_commonize_var): Allow inlining functions even if they have 4112 static local variables, use comdat_linkage for them if flag_weak. 4113 (check_initializer): Call obscure_complex_init if 4114 grok_reference_init returned non-zero. 4115 (save_function_data): Clear x_local_names. 4116 (pop_cp_function_context): Free x_local_names. 4117 (mark_inlined_fns): Remove. 4118 (mark_lang_function): Mark x_local_names. 4119 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P. 4120 Mark inlined_fns as tree, remove call to mark_inlined_fns. 4121 * class.c (alter_access): Ensure DECL_ACCESS is never set if 4122 DECL_DISCRIMINATOR_P. 4123 * cp-tree.h (cp_language_function): Add x_local_names. 4124 (lang_decl_flags): Add discriminator into u2. 4125 (lang_decl_inlined_fns): Remove. 4126 (lang_decl): inlined_fns is now a TREE_VEC. 4127 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define. 4128 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a 4129 TREE_VEC, not a custom structure. 4130 (optimize_function): Likewise. 4131 * mangle.c (discriminator_for_local_entity): Discriminate among 4132 VAR_DECL local entities. 4133 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS 4134 is not valid. 4135 41362001-03-22 Bryce McKinlay <bryce@albatross.co.nz> 4137 4138 Add support for Java interface method calls. 4139 * cp-tree.h (struct lang_type): Add java_interface flag. 4140 (TYPE_JAVA_INTERFACE): New macro. 4141 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute 4142 by setting TYPE_JAVA_INTERFACE. 4143 * call.c (java_iface_lookup_fn): New static. 4144 (build_over_call): If calling a method declared in a 4145 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the 4146 expression which resolves the function address. 4147 (build_java_interface_fn_ref): New function. 4148 41492001-03-22 Richard Henderson <rth@redhat.com> 4150 4151 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h. 4152 * except.c: Don't include it. 4153 41542001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> 4155 based on an idea from Joe Buck <jbuck@synopsys.com> 4156 4157 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore): 4158 New nonterminals. 4159 (data_def, component_decl): Add reductions to bad_decl. 4160 41612001-03-22 Jakub Jelinek <jakub@redhat.com> 4162 4163 * method.c (do_build_assign_ref): Don't use build_modify_expr for 4164 anonymous aggregates, since they don't have assignment operator 4165 method. 4166 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy 4167 assignment operators for anonymous structure fields. 4168 41692001-03-21 Jason Merrill <jason@redhat.com> 4170 4171 * pt.c (instantiate_decl): Abort if we see a member constant 4172 instantiation that doesn't already have its initializer. 4173 Downgrade explicit instantiation without definition to pedwarn. 4174 4175 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove. 4176 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P. 4177 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P. 4178 4179 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove. 4180 (pending_vtables): Remove. 4181 * decl2.c (pending_vtables): Remove. 4182 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not 4183 CLASSTYPE_VTABLE_NEEDS_WRITING. 4184 (import_export_class): Likewise. 4185 (init_decl2): Don't mark pending_vtables. 4186 * lex.c (handle_pragma_vtable): Just sorry. 4187 * pt.c (instantiate_class_template): Don't mess with 4188 CLASSTYPE_VTABLE_NEEDS_WRITING. 4189 (mark_class_instantiated): Likewise. 4190 * ptree.c (print_lang_type): Don't print it. 4191 * semantics.c (begin_class_definition): Don't set it. 4192 4193 * pt.c (template_tail): Replace with last_pending_template. 4194 (maybe_templates, maybe_template_tail): Remove. 4195 (add_pending_template): Adjust. 4196 (instantiate_pending_templates): Adjust. 4197 4198 * cp-tree.h (struct saved_scope): Remove lang_stack field. 4199 (current_lang_stack): Remove. 4200 * decl.c (maybe_push_to_top_level): Don't initialize it. 4201 (duplicate_decls): Use current_lang_depth. 4202 (xref_basetypes): Likewise. 4203 * class.c (current_lang_depth): New fn. 4204 (push_lang_context): Use more varray functionality. 4205 (pop_lang_context): Likewise. 4206 4207 * error.c (GLOBAL_THING): Always use '__'. 4208 42092001-03-21 Mark Mitchell <mark@codesourcery.com> 4210 4211 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME. 4212 4213 * mangle.c (mangle_decl_string): Mangle the names of overloaded 4214 operators, even when they have `extern "C"' linkage. 4215 42162001-03-19 Mark Mitchell <mark@codesourcery.com> 4217 4218 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME, 4219 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME 4220 where it's not necessary. 4221 (add_method): Remove optimization involving comparison of 4222 DECL_ASSEMBLER_NAME. 4223 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME, 4224 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME 4225 where it's not necessary. 4226 (check_methods): Likewise. 4227 (build_clone): Likewise. 4228 (built_vtt): Likewise. 4229 * cp-tree.h (DECL_NEEDED_P): Likewise. 4230 * decl.c (pushtag): Likewise. 4231 (duplicate_decls): Likewise. 4232 (pushdecl): Likewise. 4233 (builtin_function): Likewise. 4234 (build_library_fn_1): Set DECL_LANGUAGE for library functions. 4235 (build_cp_library_fn): Likewise. 4236 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME, 4237 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME 4238 where it's not necessary. 4239 (make_rtl_for_nonlocal_decl): Likewise. 4240 (cp_finish_decl): Likewise. 4241 (grokfndecl): Likewise. 4242 (grokvardecl): Likewise. 4243 (grokdeclarator): Likewise. 4244 (start_function): Likewise. 4245 (cp_missing_return_ok_p): Likewise. 4246 * decl2.c (grokclassfn): Likewise. 4247 (check_classfn): Likewise. 4248 (finish_static_data_member_decl): Likewise. 4249 (grokfield): Likewise. 4250 * error.c (GLOBAL_IORD_P): Remove. 4251 (dump_global_iord): Improve output. 4252 (dump_decl): Avoid using DECL_ASSEMBLER_NAME. 4253 * except.c (nothrow_libfn_p): Summarily reject any function not in 4254 namespace-scope. 4255 * init.c (build_java_class_ref): Don't explicitly set 4256 DECL_ASSEMBLER_NAME after calling mangle_decl. 4257 * mangle.c (mangle_decl_string): Handle extern "C" functions. 4258 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl. 4259 * method.c (set_mangled_name_for_decl): Don't explicitly set 4260 DECL_ASSEMBLER_NAME after calling mangle_decl. 4261 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and 4262 IDENTIFIER_GLOBAL_VALUE for the thunk. 4263 * pt.c (set_mangled_name_for_template_decl): Remove. 4264 (check_explicit_specialization): Don't use it. 4265 (looup_template_class): Don't set DECL_ASSEMBLER_NAME. 4266 (tsubst_friend_function): Likewise. 4267 (tsubst_decl): Likewise. 4268 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME. 4269 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME, 4270 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME 4271 where it's not necessary. 4272 (tinfo_base_init): Likewise. 4273 (create_real_tinfo_var): Likewise. 4274 * search.c (looup_field_1): Likewise. 4275 * semantics.c (finish_named_return_value): Likewise. 4276 * tree.c (init_tree): Set lang_set_decl_assembler_name. 4277 42782001-03-15 Gabriel Dos Reis <gdr@codesourcery.com> 4279 4280 Correct semantics restrictions checking in throw-expression. 4281 * except.c (is_admissible_throw_operand): New function. 4282 (build_throw): Use it. 4283 42842001-03-14 Mark Mitchell <mark@codesourcery.com> 4285 4286 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__ 4287 and its ilk. 4288 42892001-03-14 Mark Mitchell <mark@codesourcery.com> 4290 4291 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. 4292 * cp-tree.h (DECL_IN_MEMORY_P): Likewise. 4293 * decl.c (duplicate_decls): Likewise. 4294 (builtin_function): Likewise. 4295 (build_library_fn): Likewise. 4296 (build_cp_library_fn): Likewise. 4297 (check_initializer): Likewise. 4298 (cp_finish_decl): Likewise. 4299 * decl2.c (grokfield): Likewise. 4300 (grok_function_init): Remove #if 0'd code. 4301 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. 4302 * friend.c (do_friend): Likewise. 4303 * init.c (get_temp_regvar): Likewise. 4304 * method.c (make_thunk): Likewise. 4305 * pt.c (tsubst_friend_function): Likewise. 4306 (tsubst_decl): Likewise. 4307 (regenerate_decl_from_template): Likewise. 4308 * semantics.c (genrtl_named_return_value): Likewise. 4309 (expand_body): Likewise. 4310 (genrtl_finish_function): Likewise. 4311 * tree.c (cp_tree_equal): Likewise. 4312 43132001-03-12 Nathan Sidwell <nathan@codesourcery.com> 4314 4315 * call.c (convert_like_real): Add extra semantics to INNER 4316 parameter. Don't convert to temporary if a user conversion 4317 gives us an lvalue that we're about to bind to a reference. 4318 Set INNER to indicate pending reference binding on recursive 4319 calls. 4320 43212001-03-10 Neil Booth <neil@daikokuya.demon.co.uk> 4322 4323 * cp/lex.c: Delete duplicate pending_lang_change. 4324 43252001-03-10 Neil Booth <neil@daikokuya.demon.co.uk> 4326 4327 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation): 4328 Similarly. 4329 * cp/repo.c (get_base_filename, open_repo_file): Similarly. 4330 * cp/cp-tree.h: Remove file_name_nondirectory prototype. 4331 43322001-03-09 Zack Weinberg <zackw@stanford.edu> 4333 4334 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. 4335 43362001-03-08 Stan Shebs <shebs@apple.com> 4337 4338 * cp-tree.h (set_identifier_local_value): Remove unused decl. 4339 43402001-03-06 Zack Weinberg <zackw@stanford.edu> 4341 4342 * spew.c: Remove references to CPP_OSTRING. 4343 43442001-03-06 Andrew Haley <aph@redhat.com> 4345 4346 * typeck.c (convert_arguments): Check that we have an fndecl. 4347 43482001-03-05 Andrew Haley <aph@redhat.com> 4349 4350 * typeck.c (convert_arguments): Don't do ellipsis conversion for 4351 __built_in_constant_p. 4352 43532001-03-02 Nathan Sidwell <nathan@codesourcery.com> 4354 4355 * typeck.c (build_static_cast): Allow enum to enum conversions 4356 as per DR 128. 4357 43582001-03-02 Nathan Sidwell <nathan@codesourcery.com> 4359 4360 * class.c (check_field_decls): Pointers to member do not a 4361 non-pod struct make, as per DR 148. 4362 43632001-03-02 Nathan Sidwell <nathan@codesourcery.com> 4364 4365 * call.c (joust): cp_pedwarn when using gnu extension concerning 4366 worst conversion sequences. 4367 43682001-03-01 Zack Weinberg <zackw@stanford.edu> 4369 4370 * decl.c: Replace all uses of 'boolean' with 'bool'. 4371 43722001-03-01 Zack Weinberg <zackw@stanford.edu> 4373 4374 * lang-specs.h: Add zero initializer for cpp_spec field to 4375 all array elements that need one. Don't put an #ifdef inside 4376 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and 4377 use it. 4378 43792001-03-01 Nathan Sidwell <nathan@codesourcery.com> 4380 4381 Implement using decls inside template functions. 4382 * decl2.c (validate_nonmember_using_decl): Don't special case 4383 fake_std_node in the global namespace. Don't reject early when 4384 processing a template. 4385 (do_local_using_decl): Add to statement tree. Don't do further 4386 processing when building a template. 4387 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs. 4388 43892001-03-01 Nathan Sidwell <nathan@codesourcery.com> 4390 4391 * decl2.c (do_nonmember_using_decl): Don't complain if we find 4392 same function. Do complain about ambiguating extern "C" 4393 declarations. 4394 43952001-02-28 Nathan Sidwell <nathan@codesourcery.com> 4396 4397 Remove floating point and complex type template constant parms. 4398 * pt.c (convert_nontype_argument): Remove REAL_TYPE and 4399 COMPLEX_TYPE extensions. 4400 (invalid_nontype_parm_type_p): Likewise. 4401 44022001-02-27 Jeffrey Oldham <oldham@codesourcery.com> 4403 4404 * except.c (call_eh_info): Revert "match_function"'s type. 4405 44062001-02-27 Nathan Sidwell <nathan@codesourcery.com> 4407 4408 Fix ctor vtable vcall offsets. 4409 * class.c (struct vtbl_init_data_s): Add rtti_binfo member. 4410 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter. 4411 (get_matching_base): Remove. 4412 (get_original_base): New function. 4413 (build_vtbl_initializer): Initialize vid.rtti_binfo. 4414 Use a virtual thunk for a ctor vtable with an index 4415 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a 4416 primary base within a constructor vtable. Only set 4417 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset 4418 when primary base has been lost. 4419 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment. 4420 44212001-02-26 Jeffrey Oldham <oldham@codesourcery.com> 4422 4423 * call.c (joust): Ensure more_specialized()'s argument length 4424 parameter has correct value for constructors. 4425 44262001-02-26 Nathan Sidwell <nathan@codesourcery.com> 4427 4428 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct. 4429 4430 * decl.c (mark_inlined_fns): Prototype. 4431 44322001-02-22 Mark Mitchell <mark@codesourcery.com> 4433 4434 * spew.c (yylex): Correct handling of friends. 4435 44362001-02-22 Mark Mitchell <mark@codesourcery.com> 4437 4438 * mangle.c (write_encoding): Pass write_function_type the 4439 FUNCTION_DECL for the function being encoded. 4440 (write_function_type): Pass it along to write_bare_function_type. 4441 (write_bare_function_type): Pass it along to write_method_parms. 4442 (write_method_parms): Don't mangle the compiler-generated 4443 parameters to a constructor or destructor. 4444 44452001-02-22 Andreas Jaeger <aj@suse.de> 4446 4447 * optimize.c: Include toplev.h for 4448 note_deferral_of_defined_inline_function prototype. 4449 44502001-02-22 Jakub Jelinek <jakub@redhat.com> 4451 4452 * cp-tree.h (struct lang_decl_inlined_fns): New. 4453 (struct lang_decls): Add inlined_fns. 4454 (DECL_INLINED_FNS): New macro. 4455 * optimize.c (struct inline_data): Add inlined_fns. 4456 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro. 4457 (inlinable_function_p): Likewise, fix typo in comment, 4458 function is not inlinable if it already inlined function currently 4459 being optimized. 4460 (expand_call_inline): Add fn to inlined_fns if necessary. 4461 (optimize_function): Initialize inlined_fns. 4462 Save inlined_fns into DECL_INLINED_FNS after expanding inlines. 4463 * decl.c (mark_inlined_fns): New function. 4464 (lang_mark_tree): Call it. 4465 44662001-02-21 Jason Merrill <jason@redhat.com> 4467 4468 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag. 4469 (DECL_UNINLINABLE): Move to middle-end. 4470 4471 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn. 4472 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT. 4473 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone. 4474 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the 4475 parms and outer BLOCK. note_deferral_of_defined_inline_function. 4476 4477 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on 4478 second parm of op=. 4479 44802001-02-19 Mark Mitchell <mark@codesourcery.com> 4481 4482 * decl2.c (set_decl_namespace): Allow explicit instantiations in 4483 any namespace. 4484 44852001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 4486 4487 * optimize.c (expand_call_inline): Don't walk subtrees of type 4488 nodes. 4489 44902001-02-18 Mark Mitchell <mark@codesourcery.com> 4491 4492 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry 4493 for a destructor. 4494 44952001-02-18 Jason Merrill <jason@redhat.com> 4496 4497 Do put the VTT parameter in DECL_ARGUMENTS. 4498 * cp-tree.h (struct cp_language_function): Add x_vtt_parm. 4499 (current_vtt_parm): New macro. 4500 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm. 4501 (DECL_HAS_VTT_PARM_P): New macro. 4502 (DECL_VTT_PARM): Remove. 4503 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros. 4504 * decl.c (duplicate_decls): Only copy the operator code if 4505 appropriate. 4506 (start_function): Set current_vtt_parm. 4507 (lang_mark_tree): Don't mark vtt_parm. 4508 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to 4509 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P. 4510 * class.c (build_clone): Maybe remove the VTT parm. 4511 * optimize.c (maybe_clone_body): Set up the VTT parm. 4512 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm. 4513 * call.c (build_over_call): Just allow the VTT arg. 4514 * method.c (make_thunk): Don't set DECL_VTT_PARM. 4515 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM. 4516 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE. 4517 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise. 4518 * error.c (dump_function_decl): Likewise. 4519 * call.c (build_user_type_conversion_1, convert_like_real): Abort 4520 if we try to call a constructor with in-charge or VTT parms. 4521 * method.c (skip_artificial_parms_for): New fn. 4522 * call.c (add_function_candidate, build_over_call): Call it. 4523 * call.c (build_new_method_call): Use current_vtt_parm. 4524 * init.c (expand_virtual_init): Likewise. 4525 * class.c (same_signature_p): No longer static. 4526 * cp-tree.h: Declare it. 4527 * search.c (look_for_overrides_r): Use it. 4528 45292001-02-17 Mark Mitchell <mark@codesourcery.com> 4530 4531 * cp-tree.h (new_abi_rtti_p): Remove. 4532 (name_mangling_version): Likewise. 4533 (flag_do_squangling): Likewise. 4534 * class.c (build_rtti_vtbl_entries): Remove old ABI support. 4535 * decl.c (grokfndecl): Likewise. 4536 * decl2.c (name_mangling_version): Remove. 4537 (flag_do_squangling): Likewise. 4538 (lang_f_options): Remove `squangle'. 4539 (unsupported_options): Add `squangle'. 4540 (cxx_decode_option): Issue a warning about uses of 4541 -fname-mangling-version. 4542 (finish_file): Remove old ABI support. 4543 * pt.c (check_explicit_specialization): Likewise. 4544 (tsubst_decl): Likewise. 4545 * rtti.c (init_rtti_processing): Likewise. 4546 (build_headof): Likewise. 4547 (get_tinfo_decl_dynamic): Likewise. 4548 (tinfo_from_decl): Likewise. 4549 (build_dynamic_cast_1): Likewise. 4550 (synthesize_tinfo_var): Likewise. 4551 * init.c (build_new): Allow enumeration types for the array-bounds 4552 in a direct-new-declarator. 4553 4554 * semantics.c (finish_typeof): Resolve OFFSET_REFs. 4555 4556 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and 4557 TREE_PROTECTED from the template being specialized. 4558 45592001-02-17 Jason Merrill <jason@redhat.com> 4560 4561 * decl2.c (build_artificial_parm): Set TREE_READONLY. 4562 4563 * decl.c (bad_specifiers): Allow throw specs on things with 4564 pointer-to-function or -member-function type. 4565 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize 4566 a pmf. 4567 45682001-02-17 Mark Mitchell <mark@codesourcery.com> 4569 4570 * call.c (check_dtor_name): Handle template names correctly. 4571 45722001-02-16 Jason Merrill <jason@redhat.com> 4573 4574 * cp-tree.h (DECL_USE_VTT_PARM): Remove. 4575 * decl2.c (maybe_retrofit_in_chrg): Don't create it. 4576 * optimize.c (maybe_clone_body): Don't substitute it. 4577 * call.c (build_new_method_call): Check in_chrg instead. 4578 * init.c (expand_virtual_init): Likewise. 4579 45802001-02-16 Gabriel Dos Reis <gdr@codesourcery.com> 4581 4582 * decl.c (check_tag_decl): Make sure a typedef for an anonymous 4583 class-type introduces at least a type-name. 4584 45852001-02-16 Jakub Jelinek <jakub@redhat.com> 4586 4587 * call.c (convert_like_real): Create a temporary for non-lvalue. 4588 45892001-02-16 Jeffrey Oldham <oldham@codesourcery.com> 4590 4591 * cp-tree.h: Fix typos in comments. 4592 45932001-02-16 Jason Merrill <jason@redhat.com> 4594 4595 * optimize.c (remap_block): If we're compiling a clone, pass the 4596 new block to insert_block. 4597 45982001-02-16 Mark Mitchell <mark@codesourcery.com> 4599 4600 * semantics.c (finish_asm_stmt): Robustify. 4601 46022001-02-15 Mark Mitchell <mark@codesourcery.com> 4603 4604 * pt.c (push_template_decl_real): Don't remangle the name of a 4605 class template. 4606 46072001-02-15 Jim Meyering <meyering@lucent.com> 4608 4609 * Make-lang.in (c++.install-common): Depend on installdirs. 4610 (c++.install-info): Likewise. 4611 (c++.install-man): Likewise. 4612 46132001-02-15 Mark Mitchell <mark@codesourcery.com> 4614 4615 * typeck2.c (build_m_component_ref): Robustify. 4616 46172001-02-15 Alexandre Oliva <aoliva@redhat.com> 4618 4619 * friend.c (do_friend): Don't take the nested [template] class 4620 into account when deciding whether to warn about the friend 4621 function not referring to a template function. 4622 46232001-02-14 Jakub Jelinek <jakub@redhat.com> 4624 4625 * typeck.c (build_unary_op): Clarify error message. 4626 46272001-02-08 Aldy Hernandez <aldyh@redhat.com> 4628 4629 * parse.y (component_constructor_declarator): allow optional 4630 parentheses around constructor class name. 4631 46322001-02-14 Nathan Sidwell <nathan@codesourcery.com> 4633 4634 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c 4635 section. 4636 * init.c (emit_base_init): Remove incorrect comment about 4637 virtual bases. 4638 * method.c (make_thunk): Fix comment alignment. 4639 46402001-02-14 Nathan Sidwell <nathan@codesourcery.com> 4641 4642 Kill remnants of this is variable. 4643 * cp-tree.h (flag_this_is_variable): Remove. 4644 * decl2.c (flag_this_is_variable): Remove. 4645 * class.c (fixed_type_or_null): Add cdtor parm. Adjust. 4646 (build_vbase_path): The path is non-static, even in a cdtor. 4647 (resolves_to_fixed_type_p): Add additional return value. 4648 * search.c (init_vbase_pointers): Adjust. 4649 * tree.c (lvalue_p_1): Adjust. 4650 * typeck.c (mark_addressable): Adjust. 4651 46522001-02-14 Nathan Sidwell <nathan@codesourcery.com> 4653 4654 * pt.c (unify): Don't check cv quals of array types. 4655 46562001-02-14 Nathan Sidwell <nathan@codesourcery.com> 4657 4658 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to 4659 check whether we already have the type. 4660 46612001-02-13 Mark Mitchell <mark@codesourcery.com> 4662 4663 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment. 4664 * call.c (build_op_delete_call): Simplify to remove duplicate 4665 code. 4666 * class.c (clone_function_decl): Don't build the deleting variant 4667 of a non-virtual destructor. 4668 * decl.c (finish_destructor_body): Don't call delete if this is a 4669 non-virtual destructor. 4670 * init.c (build_delete): Explicitly call `operator delete' when 4671 deleting an object with a non-virtual destructor. 4672 46732001-02-13 Jason Merrill <jason@redhat.com> 4674 4675 * lang-specs.h: Add more __EXCEPTIONS. 4676 46772001-02-12 Nathan Sidwell <nathan@codesourcery.com> 4678 4679 * typeck2.c (process_init_constructor): Check 4680 TREE_HAS_CONSTRUCTOR before issuing missing init warning. 4681 46822001-02-12 Nathan Sidwell <nathan@codesourcery.com> 4683 4684 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case): 4685 Remove spurious information in comment. Allow further 4686 adjustments of REFERENCE_TYPE args. 4687 46882001-02-12 Nathan Sidwell <nathan@codesourcery.com> 4689 4690 * errfn.c (cp_deprecated): Tweak diagnostic text. 4691 * parse.y (new_initializer): Deprecate initializer lists 4692 extension. 4693 46942001-02-12 Mark Mitchell <mark@codesourcery.com> 4695 4696 Remove old ABI support. 4697 46982001-02-11 Mark Mitchell <mark@codesourcery.com> 4699 4700 * decl2.c (flag_vtable_thunks): Always set it to 1. 4701 (flag_new_abi): Likewise. 4702 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI. 4703 4704 * Makefile.in (g++spec.o): Fix typo. 4705 47062001-02-09 Jason Merrill <jason@redhat.com> 4707 4708 * lang-specs.h: Restore definition of __EXCEPTIONS. 4709 47102001-02-08 Jason Merrill <jason@redhat.com> 4711 4712 * search.c (shared_member_p): New function. 4713 (lookup_field_r): Use it. 4714 * cp-tree.h (SHARED_MEMBER_P): Remove. 4715 4716 * method.c (process_overload_item): Handle template-dependent array 4717 bounds. 4718 * pt.c (type_unification_real): If we end up with undeduced nontype 4719 parms, try again. 4720 4721 * decl.c (lookup_name_real): Tweak warning to refer to decls, not 4722 types. 4723 4724 * typeck2.c (friendly_abort): Don't say anything if we have 4725 earlier errors or sorries. 4726 4727 * decl.c (check_tag_decl): Notice attempts to redefine bool and 4728 wchar_t. Ignore if in_system_header. 4729 4730 * decl.c (maybe_push_cleanup_level): New fn... 4731 (start_decl_1): ...split out from here. 4732 * cvt.c (build_up_reference): Use it. 4733 * cp-tree.h: Declare it. 4734 47352001-02-07 Mark Mitchell <mark@codesourcery.com> 4736 4737 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor 4738 spec. 4739 47402001-02-06 Nathan Sidwell <nathan@codesourcery.com> 4741 4742 * pt.c (lookup_template_class): Make sure it's a primary 4743 template or template_template_parm when called from the parser. 4744 (instantiate_template_class): Add assertion. 4745 47462001-02-05 Alexandre Oliva <aoliva@redhat.com> 4747 4748 * method.c (build_mangled_name) [old abi]: Protect flush_repeats() 4749 from error_mark_node. 4750 47512001-02-05 Nathan Sidwell <nathan@codesourcery.com> 4752 4753 Fix specification and implementation bugs in V3 ABI 4754 construction vtables. 4755 * cp-tree.h (flag_dump_class_layout): New flag. 4756 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove. 4757 (BINFO_LOST_PRIMARY_P): New flag. 4758 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts. 4759 (BINFO_PRIMARY_MARKED_P): Rename to ... 4760 (BINFO_PRIMARY_P): ... here. 4761 (binfo_via_virtual): New prototype. 4762 * decl2.c (flag_dump_class_layout): New flag. 4763 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to 4764 use `=' as a file name separator. 4765 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary 4766 bases. 4767 (build_vtbl_address): If this is a virtual primary base, then 4768 get the vtbl of what it is ultimately primary for. 4769 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust 4770 for BINFO_PRIMARY_P. 4771 (dfs_skip_nonprimary_vbases_markedp): Likewise. 4772 (get_shared_vbase_if_not_primary): Likewise. 4773 (dfs_get_pure_virtuals): Likewise. 4774 (expand_upcast_fixups): Likewise. 4775 (fixup_virtual_upcast_offsets): Likewise. 4776 (dfs_find_vbase_instance): Likewise. 4777 (find_vbase_instance): Likewise. 4778 (binfo_from_vbase): Adjust comment to reflect reality. 4779 (binfo_via_virtual): New function. 4780 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros 4781 for binfo walking during VTT construction. 4782 (dfs_mark_primary_bases): Remove. 4783 (force_canonical_binfo_r): New function. 4784 (force_canonical_binfo): New function. 4785 (mark_primary_virtual_base): New function. 4786 (mark_primary_bases): Walk in inheritance graph order, use 4787 mark_primary_virtual_base. 4788 (determine_primary_base): Use some more intermediate variables. 4789 (dfs_find_final_overrider): Don't check for overriding along a 4790 virtual path. 4791 (dfs_modify_vtables): Walk into primary virtual bases too. 4792 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P. 4793 (build_base_fields): Likewise. 4794 (dfs_set_offset_for_unshared_vbases): Likewise. 4795 (layout_virtual_bases): Likewise. 4796 (end_of_class): Likewise. 4797 (finish_struct_1): Call dump_class_hierarchy, if requested. 4798 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos. 4799 (dump_class_hierarchy_r): Add stream parameter. Emit more information. 4800 (dump_class_hierarchy): Add file parameter. Append to file, if 4801 required. 4802 (finish_vtbls): Adjust accumulate_vtbl_inits call. 4803 Use canonical base for virtual bases. 4804 (build_vtt): Add more comments. Adjust build_vtt_inits call. 4805 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm. 4806 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P, 4807 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for 4808 virtual VTTs. 4809 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P 4810 from DATA. We want virtual primary bases and all bases via virtual. 4811 Only set BINFO_VPTR_INDEX for top level. Look up from a primary 4812 virtual base when not a construction vtable. 4813 (dfs_ctor_vtable_bases_queue_p): New DFS predicate. 4814 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call. 4815 Use canonical bases when processing virtual bases. 4816 (accumulate_vtbl_inits): We're interested in any base via a 4817 virtual path. 4818 (dfs_accumulate_vtbl_inits): If this is a primary virtual base 4819 within a construction vtable, determine what is being overridden. 4820 (build_vtbl_initializer): Add more comments 4821 (add_vcall_offset_vtbl_entries_1): Adjust comment. 4822 (build_rtti_vtbl_entries): Check if the base has lost its 4823 primary. 4824 48252001-02-05 Mark Mitchell <mark@codesourcery.com> 4826 4827 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES. 4828 4829Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 4830 4831 * decl.c (pushdecl): Call abort instead of fatal. 4832 * except.c (decl_is_java_type): Call fatal_error instead of fatal. 4833 * init.c (build_new_1): Likewise. 4834 (build_java_class_ref): Call internal_error and fatal_error, not fatal. 4835 * decl.c (build_typename_type): hash_table_init now returns void. 4836 decl.c (init_decl_processing): Make an error non-fatal. 4837 48382001-02-04 Mark Mitchell <mark@codesourcery.com> 4839 4840 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting. 4841 Document. 4842 (CLASSTYPE_INTERFACE_KNOWN): Likewise. 4843 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise. 4844 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise. 4845 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise. 4846 * decl.c (maybe_commonize_var): Use the new name-mangling where 4847 appropriate. 4848 * decl2.c (comdat_linkage): Enhance comments. Make all 4849 compiler-generated things static, if COMDAT is not available. 4850 (get_tinfo_decl): Do not make typeinfo objects that belong in the 4851 library COMDAT. 4852 (tinfo_base_init): Use the correct mangled name for typeinfo 4853 strings, and push them into the global scope. 4854 (typeinfo_in_lib_p): New function. 4855 (synthesize_tinfo_var): Use it. 4856 (create_real_tinfo_var): Likewise. 4857 48582001-02-03 Jakub Jelinek <jakub@redhat.com> 4859 4860 * decl.c (push_class_binding): Use context_for_name_lookup instead 4861 of CP_DECL_CONTEXT. 4862 * search.c (context_for_name_lookup): Remove static. Check for NULL 4863 context in the loop. 4864 * cp-tree.h (context_for_name_lookup): Add prototype. 4865 48662001-02-02 Jakub Jelinek <jakub@redhat.com> 4867 4868 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove. 4869 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack): 4870 Remove. 4871 * call.c (convert_class_to_reference, build_user_type_conversion_1, 4872 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper. 4873 48742001-02-02 Mark Mitchell <mark@codesourcery.com> 4875 4876 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list 4877 of macros used when compiling g++spec.c. 4878 * g++spec.c (lang_specific_driver): Link with the shared 4879 libgcc by default. 4880 48812001-01-29 Joseph S. Myers <jsm28@cam.ac.uk> 4882 4883 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator, 4884 make_reference_declarator, make_call_declarator), method.c 4885 (implicitly_declare_fn), parse.y (namespace_using_decl, 4886 notype_unqualified_id, expr_or_declarator, new_type_id, 4887 after_type_declarator, direct_after_type_declarator, 4888 notype_declarator, complex_notype_declarator, 4889 complex_direct_notype_declarator, qualified_id, 4890 notype_qualified_id, overqualified_id, direct_new_declarator, 4891 absdcl, direct_abstract_declarator, conversion_declarator), pt.c 4892 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt 4893 instead of build_parse_node. 4894 48952001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4896 4897 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE. 4898 (minus_one_node): Moved to top level gcc directory. Renamed 4899 to integer_minus_one_node. 4900 4901 * init.c (init_init_processing): Don't set minus_one_node. 4902 (build_vec_init): Use integer_minus_one_node. 4903 4904 * rtti.c (get_tinfo_decl_dynamic): Likewise. 4905 49062001-01-28 Jakub Jelinek <jakub@redhat.com> 4907 4908 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments 4909 identical and they would be replaced with constant, remove 4910 MODIFY_EXPR from the tree. 4911 49122001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4913 4914 * Make-lang.in: Remove all dependencies on defaults.h. 4915 * call.c: Don't include defaults.h. 4916 * decl.c: Likewise. 4917 * decl2.c: Likewise. 4918 * except.c: Likewise. 4919 * pt.c: Likewise. 4920 * rtti.c: Likewise. 4921 * tree.c: Likewise. 4922 * typeck.c: Likewise. 4923 49242001-01-25 Jakub Jelinek <jakub@redhat.com> 4925 4926 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded 4927 operators even in "C" linkage. 4928 * method.c (set_mangled_name_for_decl): Likewise. 4929 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for 4930 overloaded operators in "C" linkage. 4931 49322001-01-24 Nathan Sidwell <nathan@codesourcery.com> 4933 4934 * pt.c (tsubst_decl): Remove IN_DECL parameter. 4935 (tsubst_arg_types): Check parameter is not void. 4936 (tsubst): Adjust tsubst_decl call. 4937 49382001-01-24 Nathan Sidwell <nathan@codesourcery.com> 4939 4940 * call.c (add_builtin_candidate): Quote std properly, from 4941 previous change. 4942 49432001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 4944 4945 * pt.c (check_explicit_specialization): Clone constructors and 4946 destructors. 4947 49482001-01-23 Nathan Sidwell <nathan@codesourcery.com> 4949 4950 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC 4951 indicates anything special about template depth. Make sure we 4952 only count the user visible template classes. 4953 49542001-01-23 Nathan Sidwell <nathan@codesourcery.com> 4955 4956 * call.c (build_conv): Typo in comment. 4957 (add_builtin_candidate): Add more explanation. 4958 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR. 4959 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates 4960 when we have enumeral types. 4961 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE 4962 candidates for relops and eqops. 4963 (joust): Simplify control flow. Allow a non-template user 4964 function to hide a builtin. 4965 49662001-01-22 Nathan Sidwell <nathan@codesourcery.com> 4967 4968 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER. 4969 (more_specialized): Add deduction parameter. 4970 * call.c (joust): Adjust more_specialized call. 4971 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL, 4972 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags. 4973 (get_bindings_order): Remove. 4974 (get_bindings_real): Add DEDUCE parameter. 4975 (maybe_adjust_types_for_deduction): Return extra unify flags. Do 4976 REFERENCE_TYPE jig for DEDUCE_ORDER. 4977 (type_unification_real): Deal with DEDUCE_ORDER. Use result of 4978 maybe_adjust_types_for_deduction. 4979 (more_specialized): Add DEDUCE parameter. Call get_bindings_real 4980 directly. 4981 (try_one_overload): Use result of maybe_adjust_types_for_deduction. 4982 (check_cv_quals_for_unify): Use new unify qualifier flags. 4983 (unify): Clear new unify qualifier flags. 4984 (get_bindings_real): Add DEDUCE parameter. 4985 (get_bindings): Adjust call to get_bindings_real. 4986 (get_bindings_overload): Likewise. 4987 (most_specialized_instantiation): Adjust call to 4988 more_specialized. 4989 49902001-01-19 Jason Merrill <jason@redhat.com> 4991 4992 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI. 4993 4994 * decl.c (init_decl_processing): Just force -fvtable-thunks on if 4995 -fnew-abi. 4996 49972001-01-19 Ute Pelkmann <scope.muc@t-online.de> 4998 4999 * decl2.c (arg_assoc_class): Fix double iteration logic. 5000 50012001-01-19 Jason Merrill <jason@redhat.com> 5002 5003 * init.c (build_delete): Always call convert_force to strip cv-quals. 5004 5005 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI. 5006 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI. 5007 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI. 5008 50092001-01-19 Nathan Sidwell <nathan@codesourcery.com> 5010 5011 * search.c (get_vbase_1): Count only virtual bases. 5012 50132001-01-19 Nathan Sidwell <nathan@codesourcery.com> 5014 5015 * class.c (duplicate_tag_error): Robustify flag clearing. 5016 50172001-01-19 Nathan Sidwell <nathan@codesourcery.com> 5018 5019 * cp-tree.h (lookup_template_class): Add complain parm. 5020 * decl.c (lookup_namespace_name): Adjust call to 5021 lookup_template_class. 5022 (make_typename_type): Likewise. 5023 * semantics.c (finish_template_type): Likewise. 5024 * pt.c (lookup_template_class): Add complain parm. Adjust. 5025 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class. 5026 (tsubst): Likewise. 5027 50282001-01-19 Nathan Sidwell <nathan@codesourcery.com> 5029 5030 * pt.c (copy_default_args_to_explicit_spec): Preserve 5031 object's CV quals. Reorganize. 5032 50332001-01-18 Nathan Sidwell <nathan@codesourcery.com> 5034 5035 * typeck.c (build_modify_expr): Say `initialization' for 5036 INIT_EXPRs. 5037 * init.c (build_default_init): Convert to enumeral type, if 5038 needed. 5039 50402001-01-18 Jakub Jelinek <jakub@redhat.com> 5041 5042 * parse.y (nomods_initdcl0): Properly set things up for 5043 initdcl0_innards. 5044 50452001-01-18 Nathan Sidwell <nathan@codesourcery.com> 5046 5047 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag. 5048 (type_unification_real): Set it. 5049 (unify): Use it. 5050 50512001-01-18 Nathan Sidwell <nathan@codesourcery.com> 5052 5053 * decl.c (finish_destructor_body): Convert to vbase pointer here. 5054 50552001-01-18 Nathan Sidwell <nathan@codesourcery.com> 5056 5057 * semantics.c (begin_class_definition): Check we're not inside a 5058 template parm list. 5059 50602001-01-18 Nathan Sidwell <nathan@codesourcery.com> 5061 5062 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of 5063 BASELINK_P. 5064 50652001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5066 5067 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR. 5068 * call.c (build_over_call): Add comment. 5069 50702001-01-16 Daniel Berlin <dberlin@redhat.com> 5071 5072 * cvt.c (ocp_convert): Handle vector type conversion 5073 * typeck2.c (digest_init): Handle vector type initializations 5074 50752001-01-16 Phil Edwards <pme@sources.redhat.com> 5076 5077 * g++spec.c: Don't add libraries needlessly if -fsyntax-only 5078 was given. 5079 50802001-01-15 Nathan Sidwell <nathan@codesourcery.com> 5081 5082 * pt.c (check_nontype_parm): Rename to ... 5083 (invalid_nontype_parm_type_p): ... here. 5084 (process_template_parm): Adjust. 5085 (convert_template_argument): Adjust. 5086 50872001-01-15 Nathan Sidwell <nathan@codesourcery.com> 5088 5089 * pt.c (check_nontype_parm): New function. 5090 (process_template_parm): Use it. 5091 (convert_template_argument): Use it. 5092 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to 5093 member. 5094 50952001-01-14 Jeffrey Oldham <oldham@codesourcery.com> 5096 5097 * tree.c: Add defaults.h 5098 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY. 5099 * Make-lang.in (cp/tree.o): Add defaults.h. 5100 51012001-01-13 Joseph S. Myers <jsm28@cam.ac.uk> 5102 5103 * Make-lang.in (CXX_C_OBJS): Add c-format.o. 5104 51052001-01-13 Joseph S. Myers <jsm28@cam.ac.uk> 5106 5107 * g++.1: Change to be ".so man1/gcc.1". 5108 51092001-01-13 Joseph S. Myers <jsm28@cam.ac.uk> 5110 5111 * Make-lang.in (c++.info, c++.install-info): Build and install g++ 5112 internals info. 5113 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info. 5114 ($(srcdir)/cp/g++int.info): New target. 5115 * gxxint.texi: Add info directory entry. Use @@ in email address. 5116 * .cvsignore: Update. 5117 51182001-01-12 Nathan Sidwell <nathan@codesourcery.com> 5119 5120 * typeck.c (build_c_cast): Do template processing earlier. 5121 Always pedwarn on array casts. 5122 51232001-01-12 Nathan Sidwell <nathan@codesourcery.com> 5124 5125 * friend.c (make_friend_class): Make sure a templated class is 5126 actually a template. 5127 51282001-01-11 Nathan Sidwell <nathan@codesourcery.com> 5129 5130 * decl2.c (get_guard): Set linkage from guarded decl. 5131 51322001-01-11 Nathan Sidwell <nathan@codesourcery.com> 5133 5134 * call.c (convert_default_arg): Check for unprocessed 5135 DEFAULT_ARG. 5136 * cp-tree.h (replace_defarg): Move to spew.c. 5137 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to 5138 spew.c, which is where they really are. 5139 (done_pending_defargs): Declare. 5140 (unprocessed_defarg_fn): Declare. 5141 * decl.c (replace_defarg): Move to spew.c 5142 * parse.y (structsp): Call done_pending_defargs. 5143 * spew.c (defarg_fns): Rearrange list structure. 5144 (defarg_fnsdone): New static variable. 5145 (defarg_depfns): New static variable. 5146 (init_spew): Adjust. 5147 (add_defarg_fn): Store the type in TREE_TYPE. 5148 (do_pending_defargs): Detect and deal with ordering constraints 5149 and circularity. 5150 (done_pending_defargs): New function. 5151 (unprocessed_defarg_fn): New function. 5152 (replace_defarg): Moved from decl.c. Robustify. Don't save 5153 if circularity detected. 5154 51552001-01-11 Nathan Sidwell <nathan@codesourcery.com> 5156 5157 * pt.c (unify): Check array has a domain, before checking 5158 whether it is variable sized. 5159 51602001-01-11 Nathan Sidwell <nathan@codesourcery.com> 5161 5162 * decl.c (grokparms): Unobfuscate and get correct diagnostic for 5163 parameters with pointers to arrays of unknown bound. 5164 51652001-01-11 Nathan Sidwell <nathan@codesourcery.com> 5166 5167 * parse.y (template_parm_header, template_spec_header): New 5168 reductions. Split out from ... 5169 (template_header): ... here. Use them. 5170 (template_template_parm): Use template_parm_header. 5171 * semantics.c (finish_template_template_parm): Add assert. 5172 51732001-01-10 Mark Mitchell <mark@codesourcery.com> 5174 5175 * mangle.c (write_builtin_type): Fix thinko. 5176 5177 * pt.c (copy_default_args_to_explicit_spec_1): New function. 5178 (copy_default_args_to_explicit_spec): Likewise. 5179 (check_explicit_specialization): Use it. 5180 5181 * class.c (finish_struct_1): Remove last argument in call to 5182 make_decl_rtl; use make_function_rtl instead of make_decl_rtl. 5183 * decl.c (builtin_function): Likewise. 5184 (build_cp_library_fn): Likewise. 5185 (check_initializer): Likewise. 5186 (make_rtl_for_nonlocal_decl): Likewise. 5187 (cp_finish_decl): Likewise. 5188 (start_function): Likewise. 5189 * decl2.c (finish_anon_union): Likewise. 5190 * friend.c (do_friend): Likewise. 5191 * init.c (build_java_class_ref): Likewise. 5192 * method.c (make_thunk): Likewise. 5193 * pt.c (tsubst_friend_function): Likewise. 5194 * semantics.c (expand_body): Likewise. 5195 51962001-01-10 Mark Mitchell <mark@codesourcery.com> 5197 5198 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not 5199 looking at DECL_CLONED_FUNCTION for non-functions. 5200 52012001-01-10 Nathan Sidwell <nathan@codesourcery.com> 5202 5203 * error.c (dump_template_parameter): Use parm to determine how 5204 to print default value. 5205 52062001-01-10 Nathan Sidwell <nathan@codesourcery.com> 5207 5208 * class.c (duplicate_tag_error): Clear more flags. 5209 52102001-01-10 Nathan Sidwell <nathan@codesourcery.com> 5211 5212 * call.c (build_new_method_call): Use binfo_for_vbase. 5213 52142001-01-10 Joseph S. Myers <jsm28@cam.ac.uk> 5215 5216 * cp-tree.h (flag_cond_mismatch): Don't declare. 5217 * decl2.c (flag_cond_mismatch): Don't define. 5218 (lang_f_options): Remove cond-mismatch. 5219 (unsupported_options): Add cond-mismatch. 5220 52212001-01-09 Nathan Sidwell <nathan@codesourcery.com> 5222 5223 * class.c (handle_using_decl): Reject using of constructor name 5224 of sourcing class. Allow injecting of a method with same name as 5225 nested class. Fixup error messages. 5226 52272001-01-09 Joseph S. Myers <jsm28@cam.ac.uk> 5228 5229 * decl2.c (lang_decode_option): Handle -Wformat=2. 5230 52312001-01-08 Nathan Sidwell <nathan@codesourcery.com> 5232 5233 * cp-tree.h (lang_decl_flags): Rename defined_in_class to 5234 initialized_in_class. 5235 (DECL_DEFINED_IN_CLASS_P): Rename to ... 5236 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning. 5237 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P. 5238 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P. 5239 * pt.c (check_default_tmpl_args): Adjust for 5240 DECL_INITIALIZED_IN_CLASS_P. 5241 (instantiate_class_template): Likewise. 5242 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P. 5243 5244 * class.c (finish_struct): Constify saved_filename. 5245 52462001-01-08 Nathan Sidwell <nathan@codesourcery.com> 5247 5248 * class.c (duplicate_tag_error): Adjust diagnostic. 5249 (finish_struct): Locally set location to start of struct. 5250 * decl.c (fixup_anonymous_aggr): Use cp_error_at. 5251 52522001-01-08 Nathan Sidwell <nathan@codesourcery.com> 5253 5254 * decl.c (struct binding_level): Adjust class_shadowed comments 5255 to reflect reality. 5256 (push_class_level_binding): Adjust comments to reflect reality. 5257 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding. 5258 Don't set TREE_VALUE on the class_shadowed list. 5259 52602001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 5261 5262 * decl2.c (acceptable_java_type): Allow references too. 5263 * init.c (build_java_class_ref): When using the new ABI, search 5264 `class$' and have it mangled with `mangle_decl.' 5265 * mangle.c (write_java_integer_type_codes): New function. 5266 (write_builtin_type): Detect and mangle Java integer and real 5267 types. 5268 52692001-01-07 Mark Mitchell <mark@codesourcery.com> 5270 5271 * decl2.c (grokfield): Don't accept `asm' specifiers for 5272 non-static data members. 5273 52742001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5275 5276 * expr.c (cplus_expand_expr): Don't reset `target'. 5277 52782001-01-07 Neil Booth <neil@daikokuya.demon.co.uk> 5279 5280 * cp/decl2.c (cxx_post_options): Call cpp_post_options. 5281 52822001-01-05 Nathan Sidwell <nathan@codesourcery.com> 5283 5284 * parse.y (template_datadef): Check for error_mark_node. 5285 52862001-01-05 Nathan Sidwell <nathan@codesourcery.com> 5287 5288 * cp-tree.def (DEFAULT_ARG): Make `x' class. 5289 52902001-01-04 Joseph S. Myers <jsm28@cam.ac.uk> 5291 5292 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define. 5293 (record_builtin_type): Make non-static. 5294 (flag_short_double): Don't declare. 5295 (init_decl_processing): Remove the creation of many tree nodes now 5296 in c_common_nodes_and_builtins. 5297 (build_void_list_node): New function. 5298 * decl2.c (flag_short_double, flag_short_wchar): Don't define. 5299 * cp-tree.h (flag_short_wchar): Don't declare. 5300 53012001-01-04 Mark Mitchell <mark@codesourcery.com> 5302 5303 * call.c (build_conv): Don't use build1 for USER_CONV. 5304 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes. 5305 53062001-01-03 Joseph S. Myers <jsm28@cam.ac.uk> 5307 5308 * lex.c (lang_init): Call c_common_lang_init. 5309 53102001-01-03 Nathan Sidwell <nathan@codesourcery.com> 5311 5312 * search.c (lookup_fnfields_here): Remove. 5313 (look_for_overrides_r): Use lookup_fnfields_1. 5314 Ignore functions from using declarations. 5315 53162001-01-03 Nathan Sidwell <nathan@codesourcery.com> 5317 5318 Implement exceptions specifiers for implicit member functions. 5319 * cp-tree.h (merge_exceptions_specifiers): Declare new function. 5320 * method.c (synthesize_exception_spec): New function. 5321 (locate_dtor, locate_ctor, locate_copy): New functions. 5322 (implicitly_declare_fn): Generate the exception spec too. 5323 * search.c (check_final_overrider): Check artificial functions 5324 too. 5325 * typeck2.c (merge_exception_specifiers): New function. 5326 53272001-01-03 Jason Merrill <jason@redhat.com> 5328 5329 * init.c (build_default_init): New fn. 5330 (perform_member_init): Split out from here. 5331 (build_new_1): Use it. Simplify initialization logic. 5332 (build_vec_init): Take an array, rather than a pointer and maxindex. 5333 Speed up simple initializations. Don't clean up if we're assigning. 5334 * cp-tree.h: Adjust. 5335 * decl2.c (do_static_initialization): Remove TREE_VEC case. 5336 * parse.y (new_initializer): Return void_zero_node for (). 5337 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR. 5338 * typeck2.c (digest_init): Only complain about user-written 5339 CONSTRUCTORs. 5340 53412000-12-22 Mike Stump <mrs@wrs.com> 5342 5343 * decl2.c: (max_tinst_depth): Increase to 50. 5344 53452001-01-02 Mark Mitchell <mark@codesourcery.com> 5346 5347 * class.c (invalidate_class_lookup_cache): Zero the 5348 previous_class_values. 5349 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not 5350 TREE_INT_CST_HIGH. 5351 (CLASSTYPE_TEMPLATE_LEVEL): Likewise. 5352 * decl.c (free_bindings): New variable. 5353 (push_binding): Don't create a new binding if we have one on the 5354 free list. 5355 (pop_binding): Put old bindings on the free list. 5356 (init_decl_processing): Use size_int, not build_int_2. 5357 Register free_bindings as a GC root. 5358 (cp_make_fname_decl): Use size_int, not build_int_2. 5359 (push_inline_template_parms_recursive): Likewise. 5360 (end_template_parm_list): Likewise. 5361 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates. 5362 (tsubst_template_parms): Use size_int, not build_int_2. 5363 (tsubst): Likewise. 5364 * rtti.c (get_vmi_pseudo_type_info): Likewise. 5365 53662001-01-02 Richard Henderson <rth@redhat.com> 5367 5368 * parse.y (asm): Set ASM_INPUT_P. 5369 53702001-01-02 Jason Merrill <jason@redhat.com> 5371 5372 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE 5373 for v3 ABI. 5374 5375 * typeck.c (cp_truthvalue_conversion): New fn. 5376 * cvt.c (ocp_convert): Use it. 5377 5378 * cp-tree.h: Lose c-common.c decls. 5379 5380 * typeck.c (build_unary_op): Restore old &a.f diagnostic code. 5381 * cvt.c (convert_to_void): Use type_unknown_p. 5382 5383 * typeck.c (strip_all_pointer_quals): Also strip quals from 5384 pointer-to-member types. 5385 5386 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat 5387 parse.y as C. 5388 5389 * call.c (build_new_method_call): Do evaluate the object parameter 5390 when accessing a static member. 5391 * typeck.c (build_component_ref): Likewise. 5392 53932001-01-02 Andreas Jaeger <aj@suse.de> 5394 5395 * decl.c (cp_missing_noreturn_ok_p): New. 5396 (init_decl_processing): Set lang_missing_noreturn_ok_p. 5397 53982000-12-29 Jakub Jelinek <jakub@redhat.com> 5399 5400 * decl.c (init_decl_processing): Fix sign of wchar_type_node. 5401 54022000-12-29 Mark Mitchell <mark@codesourcery.com> 5403 5404 * class.c (pushclass): Remove #if 0'd code. 5405 * cp-tree.h (overload_template_name): Remove. 5406 * decl.c (store_bindings): Simplify. 5407 (pop_from_top_level): Likewise. 5408 * pt.c (overload_template_name): Remove. 5409 (instantiate_decl): Don't call push_to_top_level if it's not 5410 needed. 5411 54122000-12-28 Mark Mitchell <mark@codesourcery.com> 5413 5414 * pt.c (register_local_specialization): Don't return a value. 5415 (lookup_template_class): Use move-to-front heuristic when looking 5416 up template instantiations. 5417 (instantiate_decl): Only push_to_top_level when we're actually 5418 going to instantiate the template. 5419 54202000-12-29 Hans-Peter Nilsson <hp@bitrange.com> 5421 5422 * search.c (binfo_for_vtable): Return least derived class, not 5423 most. Handle secondary vtables. 5424 54252000-12-22 Jason Merrill <jason@redhat.com> 5426 5427 * pt.c (more_specialized): Don't optimize len==0. 5428 (fn_type_unification): If we're adding the return type, increase len. 5429 5430 * typeck.c (build_binary_op): Fix pmf comparison logic. 5431 5432 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not 5433 DECL_STATIC_FUNCTION_P. 5434 5435 * semantics.c (genrtl_finish_function): Don't try to jump to 5436 return_label unless it exists. 5437 5438 In partial ordering for a call, ignore parms for which we don't have 5439 a real argument. 5440 * call.c (joust): Pass len to more_specialized. 5441 (add_template_candidate_real): Strip 'this', pass len. 5442 * pt.c (more_specialized): Pass len down. Lose explicit_args parm. 5443 (get_bindings_order): New fn. Pass len down. 5444 (get_bindings_real): Strip 'this', pass len. 5445 (fn_type_unification): Likewise. 5446 (type_unification_real): Succeed after checking 'len' args. 5447 (most_specialized_instantiation): Lose explicit_args parm. 5448 * class.c (resolve_address_of_overloaded_function): Strip 'this', 5449 pass len. 5450 54512000-12-21 Jason Merrill <jason@redhat.com> 5452 5453 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not 5454 DECL_TEMPLATE_RESULT. 5455 5456 * search.c (lookup_field_r): Call lookup_fnfields_1, not 5457 lookup_fnfields_here. 5458 5459 * parse.y (typename_sub2): Return the TYPE_DECL, not the type. 5460 5461 * call.c (build_object_call): Also allow conversions that return 5462 reference to pointer to function. 5463 (add_conv_candidate): Handle totype being ref to ptr to fn. 5464 (build_field_call): Also allow members of type reference to function. 5465 Lose support for calling pointer to METHOD_TYPE fields. 5466 5467 * error.c (dump_expr): Handle *_CAST_EXPR. 5468 5469 * typeck2.c (build_scoped_ref): Always convert to the naming class. 5470 5471 * tree.c (break_out_cleanups): Lose. 5472 * cp-tree.h: Remove prototype. 5473 * typeck.c (build_component_ref): Don't break_out_cleanups. 5474 (build_compound_expr): Likewise. 5475 * semantics.c (finish_expr_stmt): Likewise. 5476 54772000-12-20 Richard Henderson <rth@redhat.com> 5478 5479 * cp-tree.h: Update declarations. 5480 * decl.c (finish_case_label): Return the new stmt node. 5481 * semantics.c (finish_goto_stmt): Likewise. 5482 (finish_expr_stmt, finish_return_stmt): Likewise. 5483 (finish_break_stmt, finish_continue_stmt): Likewise. 5484 (finish_asm_stmt): Likewise. 5485 * parse.y (already_scoped_stmt): Set STMT_LINENO. 5486 (compstmt, implicitly_scoped_stmt, stmt): Likewise. 5487 (simple_if, simple_stmt): Return the new stmt node. 5488 (save_lineno): New. 5489 54902000-12-18 Joseph S. Myers <jsm28@cam.ac.uk> 5491 5492 * cp-tree.h: Don't declare warn_long_long. 5493 54942000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5495 5496 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of 5497 IS_AGGR_TYPE. 5498 54992000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5500 5501 * pt.c (unify): Handle when both ARG and PARM are 5502 BOUND_TEMPLATE_TEMPLATE_PARM. 5503 55042000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5505 5506 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and 5507 DECL_TEMPLATE_PARM_P. 5508 55092000-12-15 Jason Merrill <jason@redhat.com> 5510 5511 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs! 5512 5513 * init.c (build_new_1): Don't strip quals from type. 5514 5515 * decl.c (pushdecl): Don't check for linkage on a non-decl. 5516 5517 * call.c (build_op_delete_call): See through ARRAY_TYPEs. 5518 5519 * call.c (build_new_function_call): Lose space before paren in 5520 error message. 5521 (build_new_method_call): Likewise. 5522 5523 * typeck2.c (build_m_component_ref): Propagate quals from datum. 5524 55252000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5526 5527 * pt.c (check_explicit_specialization): Propagate default 5528 function arguments to explicit specializations. 5529 55302000-12-13 DJ Delorie <dj@redhat.com> 5531 5532 * typeck.c (build_binary_op): Do signed/unsigned warnings for >? 5533 and <? operators. 5534 55352000-12-08 Jason Merrill <jason@redhat.com> 5536 5537 * error.c (dump_function_name): Don't let the user see __comp_ctor. 5538 5539 Clean up copy-initialization in overloading code. 5540 * call.c (build_user_type_conversion_1): Die if we are asked to 5541 convert to the same or a base type. 5542 (implicit_conversion): Avoid doing so. Lose reference binding code. 5543 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit 5544 direct-initialization. Also do direct-init part of copy-init. 5545 (build_user_type_conversion): Don't provide context to convert_like. 5546 * cvt.c (ocp_convert): build_user_type_conversion will now provide 5547 the constructor call for copy-init. 5548 5549 * pt.c (tsubst_decl): Call clone_function_decl here if this is an 5550 instantiation of a member template. 5551 (do_decl_instantiation): Not here. 5552 55532000-12-07 Nathan Sidwell <nathan@codesourcery.com> 5554 5555 * class.c (check_field_decls): Don't special case anonymous 5556 fields in error messages. 5557 (note_name_declared_in_class): Use %D on diagnostic. 5558 5559 * tree.c (pod_type_p): Use strip_array_types. 5560 (cp_valid_lang_attribute): Likewise. 5561 * typeck.c (cp_type_quals): Strip arrays separately, to avoid 5562 multiple evaluations. 5563 (cp_has_mutable_p): Use strip_array_types. 5564 55652000-12-07 Nathan Sidwell <nathan@codesourcery.com> 5566 5567 * cp-tree.h (sufficient_parms_p): Declare new function. 5568 * call.c (sufficient_parms_p): New function, broken out of ... 5569 (add_function_candidate): ... here. Use it. 5570 (add_conv_candidate): Use it. 5571 * decl.c (grok_ctor_properties): Use it. 5572 55732000-12-07 Jakub Jelinek <jakub@redhat.com> 5574 5575 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT. 5576 55772000-12-07 Joseph S. Myers <jsm28@cam.ac.uk> 5578 5579 * decl2.c (lang_decode_option): Handle -Wformat-security. 5580 55812000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5582 5583 * pt.c (verify_class_unification): New function. 5584 (get_class_bindings): Use it. 5585 (try_class_unification): Tidy. 5586 (unify): Handle when argument of a template-id is not 5587 template parameter dependent. 5588 (template_args_equal): Handle when TREE_CODE's do not match. 5589 55902000-12-06 Alexandre Oliva <aoliva@redhat.com> 5591 5592 * lang-specs.h (c++): When invoking the stand-alone preprocessor 5593 for -save-temps, pass all relevant -Defines to it, and then don't 5594 pass them to cc1plus. 5595 55962000-12-05 Will Cohen <wcohen@redhat.com> 5597 5598 * decl.c (finish_case_label): Cleared 5599 more_cleanups_ok in surrounding function scopes. 5600 (define_label): Likewise. 5601 56022000-12-05 Nathan Sidwell <nathan@codesourcery.com> 5603 5604 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document. 5605 (get_matching_virtual): Remove. 5606 (look_for_overrides): Declare new function. 5607 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or 5608 DECL_VINDEX here. 5609 * class.c (check_for_override): Move base class iteration code 5610 to look_for_overrides. 5611 * search.c (next_baselink): Remove. 5612 (get_virtuals_named_this): Remove. 5613 (get_virtual_destructor): Remove. 5614 (tree_has_any_destructors_p): Remove. 5615 (struct gvnt_info): Remove. 5616 (check_final_overrider): Remove `virtual' from error messages. 5617 (get_matching_virtuals): Remove. Move functionality to ... 5618 (look_for_overrides): ... here, and ... 5619 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found 5620 to be overriding. 5621 56222000-12-05 Nathan Sidwell <nathan@codesourcery.com> 5623 5624 * typeck.c (get_delta_difference): If via a virtual base, 5625 return zero. 5626 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no 5627 adjustment. 5628 56292000-12-04 Richard Henderson <rth@redhat.com> 5630 5631 * error.c (dump_tree): Use output_add_string not OB_PUTS. 5632 56332000-12-04 Jason Merrill <jason@redhat.com> 5634 5635 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector". 5636 (write_builtin_type): Pass intSI_type_node and the like through 5637 type_for_mode. 5638 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'. 5639 Pass intSI_type_node and the like through type_for_mode. 5640 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE. 5641 * pt.c (tsubst, unify): Likewise. 5642 * tree.c (walk_tree): Likewise. 5643 * error.c (dump_type): Likewise. 5644 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE. 5645 5646 * Make-lang.in: Tweak top comment for emacs. 5647 (cp/TAGS): Restore. 5648 5649 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw. 5650 5651 * class.c (clone_function_decl): Robustify. 5652 56532000-12-04 Michael Matz <matzmich@cs.tu-berlin.de> 5654 5655 * decl.c (store_bindings): Only search in the non modified 5656 old_bindings for duplicates. 5657 56582000-12-04 Nathan Sidwell <nathan@codesourcery.com> 5659 5660 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not 5661 TYPE_POLYMORPHIC_P. 5662 5663 * typeck.c (build_static_cast): Remove unused variable. 5664 56652000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5666 5667 * pt.c: Fix typo in comment. 5668 56692000-12-01 Joseph S. Myers <jsm28@cam.ac.uk> 5670 5671 * decl2.c (warn_format): Remove definition. 5672 (lang_decode_option): Handle -Wformat-nonliteral, 5673 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat. 5674 56752000-12-01 Joseph S. Myers <jsm28@cam.ac.uk> 5676 5677 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define. 5678 (init_decl_processing): Don't create string_type_node, 5679 const_string_type_node, wint_type_node, intmax_type_node, 5680 uintmax_type_node, default_function_type, ptrdiff_type_node and 5681 unsigned_ptrdiff_type_node. Adjust position of call to 5682 c_common_nodes_and_builtins. 5683 (identifier_global_value): New function. 5684 56852000-12-01 Nathan Sidwell <nathan@codesourcery.com> 5686 5687 * call.c (standard_conversion): Reject pointer to member 5688 conversions from ambiguous, inaccessible or virtual bases. 5689 * typeck.c (build_static_cast): Don't check pointers to members 5690 specially. 5691 56922000-11-30 Nathan Sidwell <nathan@codesourcery.com> 5693 5694 * method.c (do_build_copy_constructor): Preserve cv 5695 qualifications when accessing source object members. 5696 (do_build_assign_ref): Likewise. Remove separate diagnostics for 5697 unnamed fields. 5698 56992000-11-30 Nathan Sidwell <nathan@codesourcery.com> 5700 5701 * method.c (do_build_assign_ref): Construct appropriately 5702 CV-qualified base reference. Don't allow const casts in base 5703 conversion. 5704 57052000-11-30 Nathan Sidwell <nathan@codesourcery.com> 5706 5707 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on 5708 incomplete return type. 5709 57102000-11-28 Nathan Sidwell <nathan@codesourcery.com> 5711 5712 * parse.y (base_class.1): Produce a _TYPE not a _DECL. 5713 * semantics.c (finish_base_specifier): Accept a _TYPE not a 5714 _DECL. 5715 57162000-11-28 Nathan Sidwell <nathan@codesourcery.com> 5717 5718 * spew.c (yyerror): Cope if yylval.ttype is NULL. 5719 57202000-11-28 Nathan Sidwell <nathan@codesourcery.com> 5721 5722 * decl.c (grokdeclarator): Diagnose undefined template contexts. 5723 57242000-11-28 Nathan Sidwell <nathan@codesourcery.com> 5725 5726 * decl.c (grokdeclarator): Do type access control on friend 5727 class. 5728 57292000-11-27 Nathan Sidwell <nathan@codesourcery.com> 5730 5731 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by 5732 bison parser ickiness. 5733 * pt.c (tsubst_friend_function): Enter namespace scope when 5734 tsubsting the function name. 5735 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality. 5736 57372000-11-27 Nathan Sidwell <nathan@codesourcery.com> 5738 5739 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo. 5740 * cvt.c (cp_convert_to_pointer): Add force parameter. 5741 Allow conversions via virtual base if forced. 5742 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer. 5743 (ocp_convert): Likewise. 5744 * search.c (binfo_from_vbase): Return the virtual base's binfo. 5745 * typeck.c (get_delta_difference): Adjust handling of virtual 5746 bases. 5747 57482000-11-26 Mark Mitchell <mark@codesourcery.com> 5749 5750 * tree.c (struct list_hash): Remove. 5751 (list_hash_table): Make it be an htab. 5752 (struct list_proxy): New type. 5753 (list_hash_eq): New function. 5754 (list_hash_pieces): Renamed from ... 5755 (list_hash): ... this. 5756 (list_hash_lookup): Remove. 5757 (list_hash_add): Remove. 5758 (hash_tree_cons): Use the generic hashtable. 5759 (mark_list_hash): Remove. 5760 (init_tree): Create the hashtable. 5761 57622000-11-25 Joseph S. Myers <jsm28@cam.ac.uk> 5763 5764 * method.c (build_mangled_C9x_name): Rename to 5765 build_mangled_C99_name. Change C9X references in comments to 5766 refer to C99. 5767 57682000-11-24 Nathan Sidwell <nathan@codesourcery.com> 5769 5770 * parse.y (unary_expr): Move VA_ARG from here ... 5771 (primary): ... to here. 5772 57732000-11-24 Nathan Sidwell <nathan@codesourcery.com> 5774 5775 * semantics.c (finish_id_expr): If type is error_mark, return 5776 error_mark. 5777 57782000-11-23 Nathan Sidwell <nathan@codesourcery.com> 5779 5780 * pt.c (lookup_template_class): Simplify loop exit constructs. 5781 Cope when there is no partial instantiation of a template 5782 template member. 5783 5784Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com> 5785 5786 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H). 5787 57882000-11-22 Mark Mitchell <mark@codesourcery.com> 5789 5790 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op' 5791 prefix. 5792 5793 * pt.c (do_decl_instantiate): Explicitly clone constructors and 5794 destructors that haven't already been cloned. 5795 57962000-11-20 Richard Henderson <rth@redhat.com> 5797 5798 * parse.y (yyparse_1): Rename the parser entry point. 5799 58002000-11-20 Alex Samuel <samuel@codesourcery.com> 5801 5802 * mangle.c (write_name): Use <unscoped-name> for names directly in 5803 function scope. 5804 (write_unscoped_name): Accept names directly in function scope. 5805 58062000-11-20 Nathan Sidwell <nathan@codesourcery.com> 5807 5808 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword. 5809 * parse.y (extdef): Add EXPORT reduction. 5810 * spew.c (yylex): Don't skip export here. 5811 58122000-11-19 Mark Mitchell <mark@codesourcery.com> 5813 5814 * decl.c (init_decl_processing): Correct name of pure virtual 5815 function under the new ABI. 5816 * rtti.c (throw_bad_cast): Likewise, for bad cast function. 5817 (throw_bad_typeid): Likewise for bad typeid function. 5818 58192000-11-18 Mark Mitchell <mark@codesourcery.com> 5820 5821 * decl.c (grokparms): Don't even function types of `void' type, 5822 either. 5823 * mangle.c (write_type): Don't crash when confronted with the 5824 error_mark_node. 5825 5826 * decl.c (grokparms): Don't create parameters of `void' type. 5827 58282000-11-17 Zack Weinberg <zack@wolery.stanford.edu> 5829 5830 * lex.c (mark_impl_file_chain): Delete. 5831 (init_parse): Remove call to ggc_add_string_root. No need to 5832 ggc_strdup a string constant. Do not add impl_file_chain to GC 5833 roots. 5834 (handle_pragma_implementation): No need to ggc_strdup main_filename. 5835 58362000-11-17 Nathan Sidwell <nathan@codesourcery.com> 5837 5838 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type. 5839 58402000-11-17 Nathan Sidwell <nathan@codesourcery.com> 5841 5842 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro. 5843 * decl.c (grokdeclarator): Don't reject void parms here. 5844 (require_complete_types_for_parms): Simplify, use 5845 complete_type_or_else. 5846 (grokparms): Remove bitrot. Remove funcdef parm. 5847 Deal with ellipsis parm lists here. 5848 * semantics.c (finish_parmlist): Don't append void_list_node 5849 here. Set PARMLIST_ELLIPSIS_P. 5850 58512000-11-17 Nathan Sidwell <nathan@codesourcery.com> 5852 5853 * typeck2.c (incomplete_type_error): Reorganise to avoid 5854 excessive diagnostics. 5855 58562000-11-16 Zack Weinberg <zack@wolery.stanford.edu> 5857 5858 * lex.c (struct impl_files, internal_filename): Constify a char *. 5859 58602000-11-16 Mark Mitchell <mark@codesourcery.com> 5861 5862 * mangle.c (write_special_name_constructor): Don't generate 5863 assembler junk when confronted with an old-style constructor. 5864 (write_special_name_destructor): Likewise. 5865 (mangle_decl_string): Do it here instead. 5866 58672000-11-16 Nathan Sidwell <nathan@codesourcery.com> 5868 5869 * call.c (op_error): Make error messages clearer. 5870 58712000-11-15 Mark Mitchell <mark@codesourcery.com> 5872 5873 * decl.c (wrapup_globals_for_namespace): Don't mark things 5874 TREE_ASM_WRITTEN when they're not. 5875 58762000-11-15 Jason Merrill <jason@redhat.com> 5877 5878 * typeck2.c (friendly_abort): Uncount the error before handing 5879 off to fancy_abort. 5880 58812000-11-15 Nathan Sidwell <nathan@codesourcery.com> 5882 5883 * typeck.c (lookup_anon_field): Cope with qv qualifiers. 5884 58852000-11-14 Mark Mitchell <mark@codesourcery.com> 5886 5887 * class.c (build_vtbl_initializer): Fix typo in comment. 5888 * typeck.c (expr_sizeof): Don't crash on errors. 5889 58902000-11-14 Jim Wilson <wilson@redhat.com> 5891 5892 * lang-specs.h: Add %2 after %(cc1_options). 5893 58942000-11-14 Richard Henderson <rth@redhat.com> 5895 5896 * typeck.c (c_sizeof): Be strict about casting result value 5897 back to c_size_type_node. 5898 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise. 5899 59002000-11-13 Joseph S. Myers <jsm28@cam.ac.uk> 5901 5902 * typeck.c (build_unary_op): Use boolean_increment from 5903 c-common.c, moving the relevant code there. 5904 59052000-11-11 Jason Merrill <jason@redhat.com> 5906 5907 * typeck.c (mark_addressable): Don't call put_var_into_stack. 5908 5909 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics 5910 in inlines. 5911 59122000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5913 5914 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy. 5915 * lex.c (copy_lang_decl): Likewise. 5916 59172000-11-09 Mark Mitchell <mark@codesourcery.com> 5918 5919 * dump.c (cp_dump_tree): Don't dump function bodies here. 5920 5921 * Make-lang.in (CXX_C_OBJS): Add c-dump.o. 5922 (dump.o): Update dependency list. 5923 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove. 5924 (flag_dump_translation_unit): Likewise. 5925 (CP_TYPE_QUALS): Adjust definition. 5926 (DECL_C_BIT_FIELD): Remove. 5927 (SET_DECL_C_BIT_FIELD): Likewise. 5928 (CLEAR_DECL_C_BIT_FIELD): Likewise. 5929 (add_maybe_template): Likewise. 5930 (strip_array_types): Likewise. 5931 (dump_node_to_file): Likewise. 5932 (cp_dump_tree): New function. 5933 * decl.c (init_decl_processing): Set lang_dump_tree. 5934 * decl2.c (flag_dump_translation_unit): Remove. 5935 * dump.c: Move most of it to ../c-dump.c. 5936 (cp_dump_tree): New function. 5937 * pt.c (add_maybe_template): Remove. 5938 * typeck.c (strip_array_types): Likewise. 5939 59402000-11-07 Eric Christopher <echristo@redhat.com> 5941 5942 * decl.c (init_decl_processing): Change definition of 5943 __wchar_t to wchar_t. Remove artificial declaration of 5944 wchar_t. 5945 * lex.c: Change instances of __wchar_t to wchar_t. 5946 59472000-11-09 Nathan Sidwell <nathan@codesourcery.com> 5948 5949 * lex.c (do_identifier): Don't lookup_name for operators. 5950 * parse.y (operator): Save looking_for_typename. 5951 (unoperator): Restore it. 5952 * spew.c (frob_opname): Use nth_token for lookahead. 5953 59542000-11-08 Nathan Sidwell <nathan@codesourcery.com> 5955 5956 * decl.c (grok_op_properties): Always use coerce_new_type and 5957 coerce_delete_type. 5958 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve 5959 exception specification. Tidy up. 5960 (coerce_delete_type): Preserve exception specification. Tidy up. 5961 59622000-11-07 Joseph S. Myers <jsm28@cam.ac.uk> 5963 5964 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c 5965 (push_binding_level), error.c (cp_tree_printer), pt.c 5966 (process_partial_specialization, tsubst_template_arg_vector), 5967 search.c (lookup_member): Use memset () instead of bzero (). 5968 59692000-11-07 Nathan Sidwell <nathan@codesourcery.com> 5970 5971 * decl.c (build_ptrmemfunc_type): Allow error_mark_node. 5972 59732000-11-05 Joseph S. Myers <jsm28@cam.ac.uk> 5974 5975 * Make-lang.in (c++.distdir): Remove. 5976 59772000-11-04 Mark Mitchell <mark@codesourcery.com> 5978 5979 * decl2.c (do_nonmember_using_decl): Allow `extern "C"' 5980 declarations from different namespaces to be combined. 5981 59822000-11-03 Zack Weinberg <zack@wolery.stanford.edu> 5983 5984 * decl.c: Include tm_p.h. 5985 59862000-11-03 Joseph S. Myers <jsm28@cam.ac.uk> 5987 5988 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp (). 5989 59902000-11-02 Joseph S. Myers <jsm28@cam.ac.uk> 5991 5992 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c 5993 (build_overload_value), repo.c (open_repo_file), xref.c 5994 (open_xref_file): Use strchr () and strrchr () instead of index () 5995 and rindex (). 5996 59972000-11-01 Bernd Schmidt <bernds@redhat.co.uk> 5998 5999 * call.c (build_over_call): Call fold on the CALL_EXPR. 6000 60012000-11-01 Gabriel Dos Reis <gdr@codesourcery.com> 6002 6003 * error.c (dump_template_decl): Separate template hearders with 6004 space not comma. 6005 60062000-10-31 Gabriel Dos Reis <gdr@codesourcery.com> 6007 6008 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace 6009 TS_* flags with corresponding TFF_*. Adjust prototypes of 6010 functions (which used to take a tree_string_flags) to take an int. 6011 6012 * cp-tree.h (enum tree_string_flags): Remove 6013 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, 6014 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS, 6015 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, 6016 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, 6017 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, 6018 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros. 6019 (type_as_string, decl_as_string, expr_as_string, 6020 context_as_string): Adjust prototype. 6021 6022 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER 6023 instead of TS_PLAIN. 6024 6025 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF 6026 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of 6027 plain `0'. 6028 60292000-10-30 Mark Mitchell <mark@codesourcery.com> 6030 6031 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro. 6032 (linkage_kind): New enumeration. 6033 (decl_linkage): New function. 6034 * decl2.c (comdat_linkage): Extend comment. 6035 * error.c (dump_function_decl): Print the arguments used to 6036 instantiate a template, even when not printing the type of the 6037 function. 6038 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P, 6039 not TREE_PUBLIC, to test for external linkage. 6040 * tree.c (decl_linkage): New function. 6041 60422000-10-28 Mark Mitchell <mark@codesourcery.com> 6043 6044 * pt.c (instantiate_decl): Always instantiate static data members 6045 initialized in-class. 6046 60472000-10-27 Zack Weinberg <zack@wolery.stanford.edu> 6048 6049 * Make-lang.in: Move all build rules here from Makefile.in, 6050 adapt to new context. Wrap all rules that change the current 6051 directory in parentheses. Expunge all references to $(P). 6052 When one command depends on another and they're run all at 6053 once, use && to separate them, not ;. Add OUTPUT_OPTION to 6054 all object-file generation rules. Delete obsolete variables. 6055 6056 * Makefile.in: Delete. 6057 * config-lang.in: Delete outputs= line. 6058 60592000-10-26 Gabriel Dos Reis <gdr@codesourcery.com> 6060 6061 * error.c (dump_function_decl): Print no space between 6062 `ptr-operator' the `type-specifier' of the return type. 6063 (dump_type_prefix): Make sure we put space at the appropriate 6064 place. 6065 60662000-10-23 Jason Merrill <jason@redhat.com> 6067 6068 * call.c (equal_functions): Also call decls_match for extern "C" fns. 6069 60702000-10-22 Jason Merrill <jason@redhat.com> 6071 6072 * call.c (build_conditional_expr): Use ocp_convert to force 6073 rvalue conversion. 6074 60752000-10-22 Mark Mitchell <mark@codesourcery.com> 6076 6077 * call.c (standard_conversion): Use RVALUE_CONVs for all 6078 expressions that satisfy lvalue_p, not just those that satisfy 6079 real_lvalue_p. 6080 6081 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially. 6082 6083 * typeck.c (c_sizeof): Return an expression of `size_t' type, 6084 not one with TYPE_IS_SIZETYPE set. 6085 (dubious_conversion_warnings): Remove special-case code. 6086 60872000-10-21 Geoffrey Keating <geoffk@cygnus.com> 6088 6089 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE. 6090 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE. 6091 (dump_type_prefix): Print vector-of-int as 'int vector'. 6092 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE. 6093 * tree.c (walk_tree): Handle VECTOR_TYPE. 6094 6095 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS. 6096 60972000-10-21 Jason Merrill <jason@redhat.com> 6098 6099 * parse.y (operator): Set got_object from got_scope. 6100 Set looking_for_typename. 6101 * decl.c (lookup_name_real): Clear val after setting from_obj. 6102 Reorganize diagnostic. 6103 61042000-10-20 Jason Merrill <jason@redhat.com> 6105 6106 * tree.c (walk_tree): Don't walk into default args. 6107 6108 * error.c (dump_expr): Use host_integerp. 6109 61102000-10-20 David Edelsohn <edelsohn@gnu.org> 6111 6112 * typeck2.c (abstract_virtuals_error): Use "because" instead of 6113 "since" in error message. 6114 6115Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 6116 6117 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE. 6118 61192000-10-20 Jeffrey Oldham <oldham@codesourcery.com> 6120 6121 * decl.c (revert_static_member_fn): Fixed typo. 6122 61232000-10-19 Mark Mitchell <mark@codesourcery.com> 6124 6125 * class.c (subobject_offset_fn): New type. 6126 (dfs_record_base_offsets): Remove. 6127 (record_base_offsets): Likewise. 6128 (dfs_search_base_offsets): Likewise. 6129 (record_subobject_offset): New function. 6130 (check_subobject_offset): Likewise. 6131 (walk_subobject_offsets): Likewise. 6132 (record_subobject_offsets): Likewise. 6133 (layout_conflict_p): Reimplement. 6134 (layout_nonempty_base_or_field): Correct handling of type 6135 conflicts during layout. 6136 (layout_empty_base): Likewise. 6137 (build_base_field): Adjust to handle new representation of empty 6138 base offset table. 6139 (build_base_fields): Likewise. 6140 (layout_virtual_bases): Likewise. 6141 (splay_tree_compare_integer_csts): New function. 6142 (layout_class_type): Use a splay_tree, rather than a varray, to 6143 represent the offsets of empty bases. 6144 6145 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL. 6146 * decl.c (select_decl): Don't return declarations that are 6147 DECL_ANTICIPATED. 6148 61492000-10-18 Mark Mitchell <mark@codesourcery.com> 6150 6151 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD. 6152 (fake_std_node): New macro. 6153 * decl.c (in_std): Rename to ... 6154 (in_fake_std): ... this. 6155 (flag_no_builtin): Remove. 6156 (flag_no_nonansi_builtin): Likewise. 6157 (walk_namespaces_r): Use fake_std_node. 6158 (push_namespace): Use std_identifier. 6159 (pop_namespace): Use in_fake_std. 6160 (lookup_name_real): Use fake_std_node. 6161 (init_decl_processing): When -fhonor-std, create the `std' 6162 namespace. Don't create a dummy fake_std_node in that case. 6163 Adjust call to c_common_nodes_and_builtins. Use std_identifier. 6164 (builtin_function): Put builtins whose names don't begin 6165 with `_' in the std namespace. 6166 * decl2.c (flag_no_builtin): Remove. 6167 (flag_no_nonansi_builtin): Likewise. 6168 (set_decl_namespace): Use fake_std_node. 6169 (validate_nonmember_using_decl): Likewise. 6170 (do_using_directive): Likewise. 6171 (handle_class_head): Likewise. 6172 * dump.c (dequeue_and_dump): Likewise. 6173 * except.c (init_exception_processing): Use std_identifier. 6174 * init.c (build_member_call): Use fake_std_node. 6175 * rtti.c (init_rtti_processing): Use std_identifier. 6176 61772000-10-17 Mark Mitchell <mark@codesourcery.com> 6178 6179 * cp-tree.h (back_end_hook): Remove declaration. 6180 * decl2.c (back_end_hook): Remove definition. 6181 6182 * dump.c (dequeue_and_dump): Dump TREE_USED. 6183 6184Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu> 6185 6186 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int). 6187 61882000-10-17 Joseph S. Myers <jsm28@cam.ac.uk> 6189 6190 * decl.c (WINT_TYPE): Define. 6191 (init_decl_processing): Create types unsigned_ptrdiff_type_node, 6192 c_size_type_node, signed_size_type_node and wint_type_node. 6193 61942000-10-17 Joseph S. Myers <jsm28@cam.ac.uk> 6195 6196 * decl2.c (warn_missing_format_attribute): New variable. 6197 (lang_decode_option): Decode -Wmissing-format-attribute. 6198 61992000-10-16 Mark Mitchell <mark@codesourcery.com> 6200 6201 * typeck.c (qualify_type): Remove. 6202 (composite_pointer_type): Fix handling of conversions to `cv void*'. 6203 62042000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6205 6206 * Makefile.in (parse.c, parse.h): Fix think-o in last patch. 6207 62082000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6209 6210 * Makefile.in (parse.c, parse.h): Create atomically. 6211 62122000-10-12 Mark Mitchell <mark@codesourcery.com> 6213 6214 * class.c (current_obstack): Remove. 6215 * decl.c (ggc_p): Remove. 6216 (start_decl): Don't use decl_tree_cons. 6217 (grokdeclarator): Don't use build_decl_list. 6218 (start_function): Don't use decl_tree_cons. 6219 (finish_function): Don't mess with obstacks. 6220 * decl2.c (grok_x_components): Don't use build_decl_list. 6221 * lex.c (make_call_declarator): Don't call decl_tree_cons. 6222 (implicitly_declare_fn): Don't call build_decl_list. 6223 * parse.y (frob_specs): Don't call build_decl_list or 6224 decl_tree_cons. 6225 (expr_or_declarator_intern): Don't call decl_tree_cons. 6226 (primary): Don't call build_decl_list. 6227 (fcast_or_absdcl): Likewise. 6228 (typed_declspecs): Don't call decl_tree_cons. 6229 (reserved_declspecs): Don't call build_decl_list. 6230 (declmods): Likewise. 6231 (reserved_typespecquals): Likewise. 6232 (aggr): Likewise. 6233 (new_type_id): Likewise. 6234 (cv_qualifiers): Likewise. 6235 (after_type_declarator_intern): Likewise. 6236 (notype_declarator_intern): Likewise. 6237 (absdcl_intern): Likewise. 6238 (named_parm): Likewise. 6239 * pt.c (most_specialized_class): Likewise. 6240 * repo.c (temporary_obstack): Make it a structure, not a pointer. 6241 (init_repo): Initialize it. 6242 * search.c (current_obstack): Remove. 6243 * typeck2.c (add_exception_specifier): Don't call build_decl_list. 6244 62452000-10-09 Richard Henderson <rth@cygnus.com> 6246 6247 * Make-lang.in (CXX_EXTRA_HEADERS): Remove. 6248 (c++ language support bits for libgcc): Remove. 6249 (c++.clean): Remove cplib2.txt cleanup. 6250 * config-lang.in (headers, lib2funcs): Remove. 6251 6252 * exception.cc, new.cc, new1.cc, new2.cc: Remove files. 6253 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files. 6254 * inc/cxxabi.h, inc/exception, inc/new: Remove files. 6255 * inc/new.h, inc/typeinfo: Remove files. 6256 62572000-10-08 Joseph S. Myers <jsm28@cam.ac.uk> 6258 6259 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already 6260 defined. 6261 (init_decl_processing): Initialize intmax_type_node and 6262 uintmax_type_node. 6263 62642000-10-06 Richard Henderson <rth@cygnus.com> 6265 6266 * cp-tree.h (struct cp_language_function): Remove x_result_rtx. 6267 (original_result_rtx): Remove. 6268 * decl.c (save_function_data): Don't clear x_result_rtx. 6269 (mark_lang_function): Don't mark it either. 6270 * expr.c (fixup_result_decl): Remove. 6271 * semantics.c (genrtl_named_return_value): Frob the return decl 6272 before calling emit_local_var. 6273 (genrtl_finish_function): Don't call fixup_result_decl. 6274 Always emit the jump to return_label. 6275 62762000-10-06 Nathan Sidwell <nathan@codesourcery.com> 6277 6278 * pt.c (lookup_template_class): Set current access for enum. 6279 (tsubst_enum): Set file & line for enum decl. 6280 6281 * spew.c (yylex): Remove unused variable. 6282 62832000-10-05 Richard Henderson <rth@cygnus.com> 6284 6285 * semantics.c (genrtl_finish_function): Don't init or check 6286 can_reach_end; remove noreturn and return value checks. 6287 62882000-10-05 Tom Tromey <tromey@cygnus.com> 6289 6290 * init.c (build_java_class_ref): Use `build_static_name' with a 6291 suffix, not a prefix, to build the class object's name. 6292 62932000-10-05 Nathan Sidwell <nathan@codesourcery.com> 6294 6295 * cp-tree.h (access_kind): Fix comment typo. 6296 * decl2.c (grokfield): Fix diagnostic typo. 6297 * semantics.c (finish_template_type): Fix comment typo. 6298 (finish_qualified_object_call_expr): Likewise. 6299 63002000-10-05 Nathan Sidwell <nathan@codesourcery.com> 6301 6302 * pt.c (tsubst_expr, DECL_STMT case): Don't process if 6303 tsubsting fails. 6304 63052000-10-05 Nathan Sidwell <nathan@codesourcery.com> 6306 6307 * spew.c (frob_id): New static function. 6308 (frob_opname): Use it. 6309 (yylex): Use it. 6310 63112000-10-01 Mark Mitchell <mark@codesourcery.com> 6312 6313 * decl.c (lang_mark_false_label_stack): Remove. 6314 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared. 6315 63162000-09-30 Joseph S. Myers <jsm28@cam.ac.uk> 6317 6318 * gxxint.texi: Use @email for formatting email addresses. 6319 63202000-09-29 Gabriel Dos Reis <gdr@codesourcery.com> 6321 6322 * error.c: Remove direct obstack manipulation. Replace with 6323 output_buffer-based formatting. Adjust calls to removed macros. 6324 (obstack_chunk_alloc, obstack_chunk_free): Remove. 6325 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP, 6326 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise. 6327 63282000-09-24 Mark Mitchell <mark@codesourcery.com> 6329 6330 * ir.texi: Move to ../c-tree.texi. 6331 63322000-09-20 Jason Merrill <jason@redhat.com> 6333 6334 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P. 6335 63362000-09-21 Andreas Jaeger <aj@suse.de> 6337 6338 * errfn.c: Move declaration of cp_printer and cp_printers to ... 6339 * cp-tree.h: ... here. 6340 6341 * error.c: Remove declaration of cp_printer. 6342 63432000-09-20 Mark Mitchell <mark@codesourcery.com> 6344 6345 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs. 6346 63472000-09-20 Hans-Peter Nilsson <hp@axis.com> 6348 6349 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and 6350 users. 6351 63522000-09-18 Mark Mitchell <mark@codesourcery.com> 6353 6354 * decl.c (start_function): Robustify. 6355 63562000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6357 6358 * cp-tree.h (check_function_format): Accept a `status' parameter. 6359 6360 * call.c, typeck.c: Updates calls to `check_function_format'. 6361 63622000-09-17 Geoffrey Keating <geoffk@cygnus.com> 6363 6364 * decl2.c (handle_class_head): Always push some scope even 6365 in the error case. 6366 63672000-09-16 Mark Mitchell <mark@codesourcery.com> 6368 6369 * cp-tree.h (struct cp_language_function): Remove 6370 x_scope_stmt_stack and name_declared. 6371 (current_scope_stmt_stack): Remove. 6372 (function_name_declared_p): New macro. 6373 (struct lang_decl_flags): Use c_lang_decl as a base class. 6374 (context): Remove. 6375 (struct lang_decl): Replace saved_tree with context. 6376 (DECL_FRIEND_CONTEXT): Adjust accordingly. 6377 (SET_DECL_FRIEND_CONTEXT): Likewise. 6378 (DECL_VIRTUAL_CONTEXT): Likewise. 6379 (DECL_SAVED_TREE): Remove. 6380 (C_DECLARED_LABEL_FLAG): Likewise. 6381 (cplus_expand_expr_stmt): Don't declare. 6382 (add_decl_stmt): Likewise. 6383 (add_scope_stmt): Likewise. 6384 * decl.c (mark_stmt_tree): Remove. 6385 (case_compare): Likewise. 6386 (finish_case_label): Use c_add_case_label. 6387 (init_decl_processing): Set more language-specific hooks. 6388 (build_enumerator): Fix typo in comment. 6389 (cplus_expand_expr_stmt): Remove. 6390 (mark_lang_function): Use mark_c_language_function. 6391 (lang_mark_tree): Use c_mark_lang_decl. 6392 * decl2.c: Change order of inclusion. 6393 * except.c: Likewise. 6394 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall 6395 back on c_expand_expr. 6396 * friend.c: Include expr.h. 6397 * init.c: Change order of inclusion. 6398 * Makefile.in: Update dependencies. 6399 * lex.h (free_lang_decl_chain): Remove. 6400 * optimize.c (maybe_clone_body): Use function_name_declared_p. 6401 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if 6402 it doesn't exist. 6403 (instantiate_decl): Use function_name_declared_p. 6404 * semantics.c (lang_expand_expr_stmt): Remove. 6405 (set_current_function_name_declared): Likewise. 6406 (current_function_name_declared): Likewise. 6407 (begin_compound_stmt): Use function_name_declared_p. 6408 (add_decl_stmt): Remove. 6409 (setup_vtbl_ptr): Use function_name_declared_p. 6410 (add_scope_stmt): Remove. 6411 (current_scope_stmt_stack): New function. 6412 (cp_expand_stmt): Don't handle SCOPE_STMTs. 6413 (expand_body): Use function_name_declared_p. 6414 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT. 6415 * typeck.c: Change order of includes. 6416 (convert_sequence): Remove. 6417 64182000-09-14 Joseph S. Myers <jsm28@cam.ac.uk> 6419 6420 * lex.c (reswords): Add _Complex. 6421 6422Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 6423 6424 * Make-lang.in (cplib2.txt): Depend on cp/Makefile. 6425 64262000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca> 6427 6428 * init.c (begin_init_stmts): Don't use // comments. 6429 64302000-09-12 Jason Merrill <jason@redhat.com> 6431 6432 * decl.c (maybe_deduce_size_from_array_init): Set do_default for 6433 all non-extern arrays. 6434 6435 * decl.c (grokdeclarator): Complain about 'friend T' for implicit 6436 typenames, too. Downgrade complaint to pedwarn. 6437 (xref_tag): Warn about surprising behavior of 'friend struct T'. 6438 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for 6439 'class This::Inherited'. 6440 64412000-09-12 Mark Mitchell <mark@codesourcery.com> 6442 6443 * decl.c (finish_case_label): Given the LABEL_DECL a 6444 DECL_CONTEXT. 6445 64462000-09-12 Gabriel Dos Reis <gdr@codesourcery.com> 6447 6448 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, 6449 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF, 6450 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, 6451 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, 6452 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE): 6453 New macros. 6454 (sorry_for_unsupported_tree, print_scope_operator, 6455 print_left_paren, print_right_paren, print_left_bracket, 6456 print_right_bracket, print_whitespace): Likewise. 6457 (aggr_variety): Rename to class_key_or_enum. 6458 (print_type): Rename to print_type_id. 6459 (print_type_specifier_seq, print_simple_type_specifier, 6460 print_elaborated_type_specifier, 6461 print_rest_of_abstract_declarator, 6462 print_parameter_declaration_clause, print_exception_specification, 6463 print_nested_name_specifier, print_template_id, 6464 typedef_original_name, print_template_argument_list_start, 6465 print_template_argument_list_end): New functions. 6466 64672000-09-11 Gabriel Dos Reis <gdr@codesourcery.com> 6468 6469 * ir.texi: Add more documentation. 6470 64712000-09-11 Mark Mitchell <mark@codesourcery.com> 6472 6473 * cp-tree.h (struct saved_scope): Remove x_function_parms. 6474 (current_function_parms): Don't define. 6475 (struct cp_language_function): Remove parms_stored. 6476 (current_function_just_assigned_this): Don't define. 6477 (current_function_parms_stored): Likewise. 6478 (static_ctors): Declare. 6479 (static_dtors): Likewise. 6480 (SF_EXPAND): Don't define. 6481 (expand_start_early_try_stmts): Remove declaration. 6482 (store_parm_decls): Likewise. 6483 * decl.c (static_ctors): Don't declare. 6484 (static_dtors): Likewise. 6485 (struct binding_level): Remove this_block. 6486 (poplevel): Remove dead code. 6487 (set_block): Likewise. 6488 (mark_binding_level): Don't mark this_block. 6489 (mark_saved_scope): Don't mark x_function_parms. 6490 (init_decl_processing): Don't add current_function_parms as a GC 6491 root. 6492 (check_function_type): Change prototype. 6493 (start_function): Remove RTL-generation code. 6494 (expand_start_early_try_stmts): Remove. 6495 (store_parm_decls): Give it internal linkage. Remove 6496 RTL-generation code. 6497 (finish_function): Remove RTL-generation code. 6498 * decl2.c (static_ctors): Fix formatting. 6499 (static_dtors): Likewise. 6500 * method.c (use_thunk): Don't call store_parm_decls. 6501 (synthesize_method): Likewise. 6502 * optimize.c (maybe_clone_body): Likewise. 6503 * parse.y (fn.def2): Likewise. 6504 (.set_base_init): Likewise. 6505 (nodecls): Likewise. 6506 * pt.c (instantiate_decl): Likewise. 6507 * rtti.c (synthesize_tinfo_fn): Likewise. 6508 * semantics.c (genrtl_try_block): Simplify. 6509 (expand_body): Use genrtl_start_function and 6510 genrtl_finish_function. 6511 (genrtl_start_function): New function. 6512 (genrtl_finish_function): Likewise. 6513 65142000-09-11 Nathan Sidwell <nathan@codesourcery.com> 6515 6516 * error.c (cp_tree_printer, case 'P'): Append break. 6517 65182000-09-11 Nathan Sidwell <nathan@codesourcery.com> 6519 6520 * cp-tree.h (frob_opname): Declare. 6521 * parse.y (saved_scopes): New static variable. 6522 (cp_parse_init): Adjust. 6523 (do_id): If lastiddecl is NULL, do do_identifier. 6524 (operator): Save scope information. 6525 (unoperator): New reduction. Restore scope information. 6526 (operator_name): Append unoperator. Call frob_opname. 6527 * spew.c (frob_opname): Define. 6528 65292000-09-10 Zack Weinberg <zack@wolery.cumb.org> 6530 6531 * decl.c, rtti.c: Include defaults.h if not already included. 6532 Don't define the *_TYPE_SIZE macros. 6533 65342000-09-09 Mark Mitchell <mark@codesourcery.com> 6535 6536 * cp-tree.h (push_switch): Change prototype. 6537 (check_cp_case_value): Remove declaration. 6538 (decl_constant_value): Likewise. 6539 * decl.c (struct cp_switch): Add switch_stmt and cases. 6540 (case_compare): New function. 6541 (push_switch): Set switch_stmt. Initialize cases. 6542 (pop_switch): Clean up cases. 6543 (define_case_label): Rename to ... 6544 (finish_case_label): ... this. Do semantic analysis for case 6545 labels here. 6546 (start_function): Correct comment. 6547 * decl2.c (check_cp_case_value): Remove. 6548 * expr.c (do_case): Remove. 6549 * pt.c (tsubst_expr): Adjust call to finish_case_label. 6550 * semantics.c (genrtl_do_poplevel): Remove declaration. 6551 (RECHAIN_STMTS): Remove. 6552 (finish_break_stmt): Use build_break_stmt. 6553 (finish_continue_stmt): Use build_continue_stmt. 6554 (finish_switch_cond): Adjust condition here, rater than in 6555 c_expand_start_case. 6556 (finish_case_label): Remove. 6557 * typeck.c (c_expand_return): Remove. 6558 (c_expand_start_case): Likewise. 6559 65602000-09-07 Gabriel Dos Reis <gdr@codesourcery.com> 6561 6562 * ir.texi: Document type nodes. 6563 65642000-09-06 Mark Mitchell <mark@codesourcery.com> 6565 6566 * cp-tree.h (init_cp_semantics): Declare. 6567 (genrtl_try_block): Don't declare. 6568 (genrtl_handler): Likewise. 6569 (genrtl_catch_block): Likewise. 6570 (genrtl_ctor_stmt): Likewise. 6571 (genrtl_subobject): Likewise. 6572 (genrtl_do_poplevel): Likewise. 6573 (genrtl_named_return_value): Likewise. 6574 * lex.c (init_parse): Call init_cp_semantics. 6575 * semantics.c (genrtl_try_block): Give it internal linkage. 6576 (genrtl_handler): Likewise. 6577 (genrtl_catch_block): Likewise. 6578 (genrtl_ctor_stmt): Likewise. 6579 (genrtl_subobject): Likewise. 6580 (genrtl_do_poplevel): Likewise. 6581 (genrtl_named_return_value): Likewise. 6582 (lang_expand_stmt): Rename to ... 6583 (cp_expand_stmt): ... this. Only handle C++-specific nodes. 6584 (init_cp_semantics): Define. 6585 6586 * decl.c (initialize_local_var): Remove RTL-generating code. 6587 * semantics.c (genrtl_try_block): Fix formatting. 6588 6589 Move statement-tree facilities from C++ to C front-end. 6590 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO. 6591 (void_zero_node): Remove. 6592 (stmt_tree): Likewise. 6593 (scope_chain): Adjust. 6594 (language_function): Rename to cp_language_function. 6595 (cp_function_chain): Adjust. 6596 (current_stmt_tree): Remove. 6597 (last_tree): Likewise. 6598 (last_expr_type): Likewise. 6599 (struct lang_decl): Adjust. 6600 (STMT_IS_FULL_EXPR_P): Remove. 6601 (add_tree): Remove. 6602 (begin_stmt_tree): Likewise. 6603 (finish_stmt_tree): Likewise. 6604 (walk_tree_fn): Likewise. 6605 (walk_stmt_tree): Likewise. 6606 * class.c (finish_struct): Replace use of add_tree with add_stmt. 6607 * decl.c (mark_stmt_tree): Adjust type. 6608 (init_decl_processing): Don't build void_zero_node. 6609 (initialize_local_var): Adjust usage of current_stmt_tree. 6610 (finish_enum): Use add_stmt, not add_tree. 6611 (save_function_data): Adjust use of language_function. 6612 (finish_constructor_body): Use add_stmt, not add_tree. 6613 (finish_destructor_body): Likewise. 6614 (push_cp_function_context): Adjust use of language_function. 6615 (pop_cp_function_context): Likewise. 6616 (mark_lang_function): Likewise. 6617 (mark_cp_function_context): Likewise. 6618 * init.c (build_aggr_init): Adjust use of current_stmt_tree. 6619 (build_vec_init): Likewise. 6620 * semantics.c (SET_LAST_STMT): Remove. 6621 (RECHAIN_STMTS): Don't use it. 6622 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree. 6623 (current_stmt_tree): Define. 6624 (add_tree): Remove. 6625 (finish_goto_stmt): Use add_stmt, not add_tree. 6626 (finish_expr_stmt): Likewise. 6627 (begin_if_stmt): Likewise. 6628 (finish_then_clause): Likewise. 6629 (begin_while_stmt): Likewise. 6630 (begin_do_stmt): Likewise. 6631 (finish_return_stmt): Likewise. 6632 (begin_for_stmt): Likewise. 6633 (finish_break_stmt): Likewise. 6634 (finish_continue_stmt): Likewise. 6635 (begin_switch_stmt): Likewise. 6636 (finish_case_label): Likewise. 6637 (begin_try_block): Likewise. 6638 (begin_function_try_block): Likewise. 6639 (begin_handler): Likewise. 6640 (begin_catch_block): Likewise. 6641 (begin_compound_stmt): Likewise. 6642 (begin_asm_stmt): Likewise. 6643 (finish_asm_stmt): Likewise. 6644 (finish_label_stmt): Likewise. 6645 (add_decl_stmt): Likewise. 6646 (finish_subobject): Likewise. 6647 (finish_decl_cleanup): Likewise. 6648 (finish_named_return_value): Likewise. 6649 (setup_vtbl_ptr): Likewise. 6650 (add_scope_stmt): Likewise. 6651 (finish_stmt_expr): Likewise. 6652 (prune_unused_decls): Remove. 6653 (begin_stmt_tree): Likewise. 6654 (finish_stmt_tree): Likewise. 6655 (prep_stmt): Adjust use of current_stmt_tree. 6656 (lang_expand_stmt): Likewise. 6657 * tree.c (statement_code_p): Remove. 6658 (cp_statement_code_p): New function. 6659 (walk_stmt_tree): Remove. 6660 (init_tree): Set lang_statement_code_p. 6661 66622000-09-06 Zack Weinberg <zack@wolery.cumb.org> 6663 6664 Integrated preprocessor. 6665 6666 * Make-lang.in, Makefile.in: Remove all references to input.c, 6667 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS. 6668 * gxx.gperf, hash.h, input.c: Delete. 6669 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is 6670 initialized properly. 6671 6672 * class.c (fixup_pending_inline): Take a tree, not a 6673 struct pending_inline *. All callers changed. 6674 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE, 6675 RID_PROTECTED entries in ridpointers[] array here. 6676 * decl.c (duplicate_decls): Do not refer to struct 6677 pending_inline. 6678 (record_builtin_type, init_decl_processing): Use RID_MAX not 6679 CP_RID_MAX. 6680 (grokdeclarator): Use C_IS_RESERVED_WORD. 6681 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of 6682 cpplib. 6683 (grok_x_components): Do not inspect pending_inlines chain. 6684 6685 * cp-tree.h (struct lang_identifier): Add rid_code entry. 6686 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New. 6687 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare. 6688 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME, 6689 TIME_IDENTIFIER_FILEINFO): Kill. 6690 Update prototypes. 6691 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a 6692 single 32-bit word. 6693 * parse.y: Call do_pending_inlines unconditionally. 6694 reinit_parse_for_method is now snarf_method. fn.defpen is no 6695 longer necessary. Remove unnecessary <itype> annotation on 6696 SCOPE. Do not refer to end_of_file or struct pending_inline. 6697 * semantics.c (begin_inline_definitions): Call 6698 do_pending_inlines unconditionally. 6699 6700 * lex.c: Remove all code now shared with C front end. 6701 Initialize cpplib properly if USE_CPPLIB. Put reserved words 6702 into the get_identifier table. Rewrite pragma handling to 6703 work with the registry. Move code to save tokens for later 6704 processing to spew.c. 6705 6706 * spew.c: Rewrite everything in terms of token streams instead 6707 of text. Move routines here from lex.c / input.c as 6708 appropriate. GC-mark trees hanging off the pending inlines 6709 chain. 6710 67112000-09-06 Mark Mitchell <mark@codesourcery.com> 6712 6713 * NEWS: Mention that the named return value extension has been 6714 deprecated. 6715 * cp-tree.h (original_result_rtx): Define. 6716 (TREE_REFERENCE_EXPR): Remove. 6717 (DECL_VPARENT): Likewise. 6718 (pushdecl_nonclass_level): Likewise. 6719 (store_return_init): Likewise. 6720 (reinit_lang_specific): Likewise. 6721 (genrtl_named_return_value): Change prototype. 6722 * decl.c (original_result_rtx): Remove. 6723 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs. 6724 Do not generate RTL for local variables here. 6725 (store_return_init): Remove. 6726 * semantics.c (genrtl_named_return_value): Simplify. Fold in 6727 store_return_init. 6728 (finish_named_return_value): Adjust accordingly. Warn that this 6729 extension is deprecated. 6730 (lang_expand_stmt): Adjust call to genrtl_named_return_value. 6731 67322000-09-06 Nathan Sidwell <nathan@codesourcery.com> 6733 6734 * pt.c (type_unification_real): Replace switch with if. 6735 (unify): Tsubst non-type parms before comparing. 6736 67372000-09-06 Nathan Sidwell <nathan@codesourcery.com> 6738 6739 * error.c (dump_typename): New function, broken out of ... 6740 (dump_type): ... here. Use it. 6741 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE. 6742 67432000-09-06 Nathan Sidwell <nathan@codesourcery.com> 6744 6745 * init.c (build_offset_ref): Deal with namespace scoped 6746 TEMPLATE_ID_EXPRs. 6747 67482000-09-06 Nathan Sidwell <nathan@codesourcery.com> 6749 6750 * class.c (resolve_address_of_overloaded_function): Add 6751 explanation message. 6752 * decl.c (define_case_label): Reformat explanation. 6753 * decl2.c (finish_static_data_member_decl): Likewise. 6754 (grokfield): Likewise. 6755 * friend.c (do_friend): Likewise. 6756 67572000-09-05 Zack Weinberg <zack@wolery.cumb.org> 6758 6759 * tree.c (walk_tree): Expose tail recursion. 6760 (walk_stmt_tree): New function. 6761 * cp-tree.h: Prototype walk_stmt_tree. 6762 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not 6763 the BLOCKs directly. If a BLOCK has no variables after 6764 pruning, discard it. 6765 (finish_stmt_tree): Use walk_stmt_tree. No need to save and 6766 restore the line number. 6767 67682000-09-05 Mark Mitchell <mark@codesourcery.com> 6769 6770 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H. 6771 (pt.o): Remove dependency on HTAB_H. 6772 * cp-tree.h: Include hashtab.h. 6773 (walk_tree): Change prototype. 6774 (walk_tree_without_duplicates): New function. 6775 * decl.c (check_default_argument): Use it. 6776 * optimize.c (remap_decl): Adjust calls to walk_tree. 6777 (copy_body): Likewise. 6778 (expand_calls_inline): Likewise. 6779 (calls_setjmp_p): Use walk_tree_without_duplicates. 6780 * pt.c: Don't include hashtab.h. 6781 (for_each_template_parm): Use walk_tree_without_duplicates. 6782 * semantics.c (finish-stmt_tree): Likewise. 6783 (expand_body): Likewise. 6784 * tree.c (walk_tree): Add additional parameter. 6785 (walk_tree_without_duplicates): New function. 6786 (count_trees): Use it. 6787 (verify_stmt_tree): Adjust call to walk_tree. 6788 (find_tree): Use walk_tree_without_duplicates. 6789 (no_linkage_check): Likewise. 6790 (break_out_target_exprs): Adjust call to walk_tree. 6791 (cp_unsave): Likewise. 6792 67932000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 6794 6795 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code. 6796 (TEMPLATE_TEMPLATE_PARM): Adjust comment. 6797 * cp-tree.h (TYPE_BINFO): Adjust comment. 6798 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise. 6799 (TEMPLATE_TYPE_PARM_INDEX): Likewise. 6800 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead. 6801 (TYPE_TEMPLATE_INFO): Likewise. 6802 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise. 6803 * class.c (push_nested_class): Likewise. 6804 * decl.c (lookup_name_real): Likewise. 6805 (grokdeclarator): Likewise. 6806 (grok_op_properties): Likewise. 6807 (xref_tag): Likewise. 6808 (xref_basetypes): Likewise. 6809 * decl2.c (constructor_name_full): Likewise. 6810 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case. 6811 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead. 6812 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case. 6813 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM. 6814 (dump_type_suffix): Likewise. 6815 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM 6816 instead. 6817 (get_aggr_from_typedef): Likewise. 6818 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case. 6819 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM. 6820 (write_template_parm): Likewise. 6821 (write_template_template_parm): Check tree code instead of 6822 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. 6823 * method.c (build_overload_nested_name): Add 6824 BOUND_TEMPLATE_TEMPLATE_PARM. 6825 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case. 6826 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM. 6827 * pt.c (convert_template_argument): Check tree code instead of 6828 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. 6829 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case. 6830 (for_each_template_parm): Adjust comment. 6831 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. 6832 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM. 6833 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use 6834 template_args_equal to compare template template parameter cases. 6835 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM. 6836 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM 6837 instead. 6838 * tree.c (copy_template_template_parm): Decide whether to create 6839 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node. 6840 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM. 6841 (copy_tree_r): Likewise. 6842 * typeck.c (comptypes): Likewise. Check tree code instead of 6843 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. 6844 68452000-09-04 Mark Elbrecht <snowball3@bigfoot.com> 6846 6847 * decl.c (finish_function): Move the code for handling functions 6848 marked with the constructor and destructor attributes inside the 6849 expand_p block. 6850 68512000-09-04 Nathan Sidwell <nathan@codesourcery.com> 6852 6853 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR. 6854 68552000-09-04 Nathan Sidwell <nathan@codesourcery.com> 6856 6857 * pt.c (lookup_template_class): Remove abort. 6858 * tree.c (get_type_decl): Allow error_mark_node. 6859 68602000-09-04 Nathan Sidwell <nathan@codesourcery.com> 6861 6862 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside 6863 TEMPLATE_ID_EXPRs. 6864 68652000-09-03 Mark Mitchell <mark@codesourcery.com> 6866 6867 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change 6868 new ABI mangling. 6869 68702000-09-01 Nathan Sidwell <nathan@codesourcery.com> 6871 6872 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify 6873 union tag mismatch error reporting. 6874 68752000-09-01 Nathan Sidwell <nathan@codesourcery.com> 6876 6877 * call.c (build_scoped_method_call): Check it is not a namespace. 6878 68792000-08-30 Jason Merrill <jason@redhat.com> 6880 6881 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context. 6882 6883 * tree.c (bot_manip): Check TREE_CONSTANT rather than 6884 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and 6885 build_target_expr_with_type for the non-AGGR_INIT_EXPR case. 6886 6887 * decl.c (start_function): Always call make_function_rtl. 6888 68892000-08-29 Zack Weinberg <zack@wolery.cumb.org> 6890 6891 * semantics.c (prune_unused_decls): New function. 6892 (finish_stmt_tree): Call it via walk_tree. 6893 68942000-08-29 Zack Weinberg <zack@wolery.cumb.org> 6895 6896 * class.c (build_secondary_vtable): Constify a char *. 6897 * decl.c (init_decl_processing): Initialize function_id_node, 6898 pretty_function_id_node, and func_id_node. 6899 * input.c (struct input_source): Constify 'str'. 6900 (feed_input): Constify first argument. 6901 * mangle.c (write_identifier): Constify argument. 6902 * pt.c (mangle_class_name_for_template): Constify argument. 6903 69042000-08-29 Mark Mitchell <mark@codesourcery.com> 6905 6906 * typeck.c (mark_addressable): Remove code that pokes around in 6907 RTL. 6908 69092000-08-28 Jason Merrill <jason@redhat.com> 6910 6911 * lex.c (file_name_nondirectory): Move to toplev.c. 6912 6913 * cp-tree.h (LOCAL_CLASS_P): New macro. 6914 * class.c (finish_struct_1): Use it. 6915 69162000-08-27 Alex Samuel <samuel@codesourcery.com> 6917 6918 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo. 6919 (write_encoding): Pass another argument to write_name. 6920 (write_name): Add ignore_local_scope parameter. Fix handling of 6921 local names. 6922 (write_nested_name): Use write_unqualified_name. 6923 (write_prefix): Likewise. Skip out on FUNCTION_DECLs. 6924 (write_template_prefix): Use write_unqualified_name. 6925 (write_component): Remove. 6926 (write_local_name): Add parameter. Use direct local entity to 6927 discriminator calculation. 6928 (write_class_enum_type): Pass another argument to write_name. 6929 (write_template_template_arg): Likewise. 6930 (make_guard_variable): Likewise. 6931 69322000-08-27 Jason Merrill <jason@redhat.com> 6933 6934 * decl.c (pushdecl): Matching decls for local externs are found in 6935 the current level. Propagate linkage information from previous 6936 declarations. 6937 69382000-08-26 Gabriel Dos Reis <gdr@codesourcery.com> 6939 6940 * ir.texi (Expressions): Fix typo. 6941 69422000-08-25 Greg McGary <greg@mcgary.org> 6943 6944 * tree.c (init_tree): Use ARRAY_SIZE. 6945 69462000-08-25 Gabriel Dos Reis <gdr@codesourcery.com> 6947 6948 * error.c (cp_tree_printer): Rework. 6949 69502000-08-25 Mark Mitchell <mark@codesourcery.com> 6951 6952 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and 6953 dyn-string.o. 6954 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c. 6955 (cp-demangle.o): Remove target. 6956 (dyn-string.o): Likewise. 6957 6958 * decl.c (grokfndecl): Require that `main' return an `int'. 6959 * mangle.c (write_encoding): Don't mangle return types for 6960 conversion functions. 6961 69622000-08-25 Gabriel Dos Reis <gdr@codesourcery.com> 6963 6964 * error.c (tree_formatting_info): New data type. 6965 (tree_being_formatted): New macro. 6966 (tree_formatting_flags): Likewise. 6967 (put_whitespace): Likewise. 6968 (print_tree_identifier): Likewise. 6969 (print_identifier): Likewise. 6970 (cp_tree_printer, print_function_argument_list, print_declaration, 6971 print_expression, print_function_declaration, 6972 print_function_parameter, print_type, print_cv_qualifier): New 6973 functions. 6974 (init_error): Initialize lang_printer. 6975 69762000-08-24 Jason Merrill <jason@redhat.com> 6977 6978 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no 6979 adjustment necessary. 6980 69812000-08-24 Greg McGary <greg@mcgary.org> 6982 6983 * cp-tree.h (MAIN_NAME_P): Remove macro. 6984 69852000-08-24 Gabriel Dos Reis <gdr@codesourcery.com> 6986 6987 * error.c (print_instantiation_context): Don't forget to flush the 6988 buffer. 6989 69902000-08-23 Jason Merrill <jason@redhat.com> 6991 6992 * typeck.c (build_ptrmemfunc): Save the input pmf. 6993 6994 * method.c (process_modifiers): Use same_type_p. 6995 69962000-08-23 Mark Mitchell <mark@codesourcery.com> 6997 6998 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC. 6999 * mangle.c (write_function_type): Change prototype. 7000 (write_encoding): Don't mangle return types for 7001 constructors or destructors. 7002 (write_type): Adjust call to write_function_type. 7003 * pt.c (instantiate_template): Instantiate alternate entry points 7004 when instantiating the main function. 7005 70062000-08-23 Gabriel Dos Reis <gdr@codesourcery.com> 7007 7008 * error.c (cp_print_error_function): Don't use embedded '\n' in 7009 output_printf. 7010 70112000-08-23 Gabriel Dos Reis <gdr@codesourcery.com> 7012 7013 * decl.c (init_decl_processing): Remove bogus initialization. 7014 * error.c (lang_print_error_function): Restore here. 7015 (init_error): Initialize print_error_function. 7016 70172000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 7018 7019 * decl2.c (arg_assoc): Revert my 2000-08-11 change. 7020 70212000-08-22 Gabriel Dos Reis <gdr@codesourcery.com> 7022 7023 * Makefile.in (error.o): Depends on diagnostic.h 7024 7025 * cp-tree.h (problematic_instantiation_changed, 7026 record_last_problematic_instantiation, current_instantiation, 7027 print_instantiation_context): Declare. 7028 (maybe_print_template_context): Remove. 7029 7030 * decl.c (init_decl_processing): Set print_error_function to NULL. 7031 (lang_print_error_function): Remove, since we're using a new 7032 machinery. 7033 7034 * error.c: #include diagnostic.h 7035 (function_category): New function. 7036 (cp_diagnostic_starter): Likewise. 7037 (cp_diagnostic_finalizer): Likewise. 7038 (cp_print_error_function): Likewise. 7039 (maybe_print_instantiation_context): Likewise. 7040 (print_instantiation_full_context): Likewise. 7041 (print_instantiation_partial_context): Likewise. 7042 (print_instantiation_context): Define. 7043 (init_error): Initialize diagnostic pager and finalizer. 7044 7045 * pt.c (problematic_instantiation_changed): Define. 7046 (record_last_problematic_instantiation): Likewise. 7047 (current_instantiation): Likewise. 7048 (maybe_print_template_context): Remove. 7049 (print_template_context): Likewise. 7050 (current_tinst_level): Make static to reflect Brendan Kehoe's 7051 change of 1995-04-13. 7052 (push_tinst_level): Call print_instantiation_context. 7053 70542000-08-21 Nix <nix@esperi.demon.co.uk> 7055 7056 * lang-specs.h: Do not process -o or run the assembler if 7057 -fsyntax-only. 7058 70592000-08-21 Joseph S. Myers <jsm28@cam.ac.uk> 7060 7061 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New 7062 variables. 7063 * decl2.c (lang_decode_option): Disable gettext attributes for 7064 -ansi. 7065 70662000-08-21 Gabriel Dos Reis <gdr@codesourcery.com> 7067 7068 * lex.c (lang_init_options): Default diagnostic message maximum 7069 length to 80, when line-wrapping. 7070 70712000-08-20 Mark Mitchell <mark@codesourcery.com> 7072 7073 * class.c (build_vtbl_initializer): Clear the entire 7074 vtbl_init_data. Start keeping track of the functions for which we 7075 have created vcall offsets here. 7076 (dfs_build_vcall_offset_vtbl_entries): Remove. 7077 (build_vcall_offset_vtbl_entries): Reimplement. 7078 (add_vcall_offset_vtbl_entries_r): New function. 7079 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for 7080 computing when vcall offsets are necessary. 7081 70822000-08-18 Nathan Sidwell <nathan@codesourcery.com> 7083 7084 * decl.c (member_function_or_else): Use cp_error ... %T. 7085 (grokdeclarator): Likewise. 7086 (start_method): Likewise. 7087 * friend.c (make_friend_class): Use cp_pedwarn ... %T. 7088 70892000-08-18 Nathan Sidwell <nathan@codesourcery.com> 7090 7091 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class 7092 TYPE_DECLs. 7093 70942000-08-18 Nathan Sidwell <nathan@codesourcery.com> 7095 7096 * cp-tree.h (PTRMEM_OK_P): New macro. 7097 (itf_ptrmem_ok): New enumeration value. 7098 * class.c (resolve_address_of_overloaded_function): Add PTRMEM 7099 argument. Diagnose implicit pointer to member. 7100 (instantiate_type): Don't diagnose implicit pointer to member 7101 here. Pass itf_ptrmem_ok if ok. Adjust calls to 7102 resolve_address_of_overloaded_function. 7103 * init.c (build_offset_ref): Set PTRMEM_OK_P. 7104 (resolve_offset_ref): Don't diagnose implicit pointer to member here. 7105 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here. 7106 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P. 7107 (build_unary_op): Deal with single non-static member in 7108 microsoft-land. 7109 71102000-08-18 Nathan Sidwell <nathan@codesourcery.com> 7111 7112 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE. 7113 71142000-08-18 Nathan Sidwell <nathan@codesourcery.com> 7115 7116 * cp-tree.h (enum_name_string): Remove prototype. 7117 (report_case_error): Remove prototype. 7118 * cp/typeck2.c (enum_name_string): Remove. 7119 (report_case_error): Remove. 7120 * error.c (dump_expr): Deal with enum values directly. 7121 Correctly negate integer constant. 7122 71232000-08-17 Nathan Sidwell <nathan@codesourcery.com> 7124 7125 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare. 7126 (__cxa_vec_delete2, __cxa_vec_delete3): Declare. 7127 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement. 7128 (__cxa_vec_delete2, __cxa_vec_delete3): Implement. 7129 (__cxa_vec_new): Use __cxa_vec_new2. 7130 (__cxa_vec_delete): Use __cxa_vec_delete2. 7131 71322000-08-17 Nathan Sidwell <nathan@codesourcery.com> 7133 7134 * vec.cc (__cxa_vec_new): Set "C" linkage. 7135 (__cxa_vec_ctor): Likewise. 7136 (__cxa_vec_cctor): Likewise. 7137 (__cxa_vec_dtor): Likewise. 7138 (__cxa_vec_delete): Likewise. 7139 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage. 7140 (__cxa_vec_ctor): Likewise. 7141 (__cxa_vec_cctor): Likewise. 7142 (__cxa_vec_dtor): Likewise. 7143 (__cxa_vec_delete): Likewise. 7144 71452000-08-17 Nathan Sidwell <nathan@codesourcery.com> 7146 7147 * class.c (instantiate_type): Reinstate local variable 7148 deleted in previous change. 7149 7150 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not 7151 itf_no_attributes. 7152 71532000-08-17 Nathan Sidwell <nathan@codesourcery.com> 7154 7155 * cp-tree.h (instantiate_type_flags): New enumeration. 7156 (instantiate_type): Change parameter. 7157 * class.c (instantiate_type): Adjust prototype. Adjust. 7158 * call.c (standard_conversion): Adjust instantiate_type call. 7159 (reference_binding): Likewise. 7160 (build_op_delete_call): Likewise. 7161 (convert_like_real): Likewise. 7162 * cvt.c (cp_convert_to_pointer): Likewise. 7163 (convert_to_reference): Likewise. 7164 * pt.c (convert_nontype_argument): Likewise. 7165 * typeck.c (build_binary_op): Likewise. 7166 (build_ptrmemfunc): Likewise. 7167 (convert_for_assignment): Likewise. 7168 71692000-08-17 Nathan Sidwell <nathan@codesourcery.com> 7170 7171 * cp-tree.h (CPTR_AGGR_TAG): New global tree node. 7172 (current_aggr): Define. 7173 * decl.c (grokdeclarator): Make sure a friend class is an 7174 elaborated type specifier. 7175 * parse.y (current_aggr): Remove static definition. 7176 (cp_parse_init): Adjust. 7177 (structsp): Clear and restore current_aggr. 7178 (component_decl_list): Clear current_aggr. 7179 7180 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the 7181 aggregate tag on the typename's context. 7182 7183 * pt.c (tsubst_friend_class): Return error_mark_node, if 7184 parms becomes NULL. 7185 (instantiate_class_template): Ignore error_mark_node friend types. 7186 71872000-08-14 Nathan Sidwell <nathan@codesourcery.com> 7188 7189 * cvt.c (warn_ref_binding): New static function, broken out of ... 7190 (convert_to_reference): ... here. Use it. 7191 71922000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu> 7193 7194 * parse.y (template_arg): Add rule for template qualified with 7195 global scope. 7196 71972000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 7198 7199 * decl2.c (add_function): Reorganize. 7200 (arg_assoc): Do not consider function template decls. 7201 72022000-08-11 Jason Merrill <jason@redhat.com> 7203 7204 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're 7205 looking inside. 7206 72072000-08-11 Nathan Sidwell <nathan@codesourcery.com> 7208 7209 * cp-tree.h (resolve_scope_to_name): Remove unused prototype. 7210 (lookup_nested_tag): Likewise. 7211 7212 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs 7213 can be produced. 7214 72152000-08-11 Nathan Sidwell <nathan@codesourcery.com> 7216 7217 * parse.y (named_complex_class_head_sans_basetype): Remove 7218 always true if. 7219 72202000-08-11 Nathan Sidwell <nathan@codesourcery.com> 7221 7222 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build 7223 explicit TEMPLATE_ID_EXPR args. 7224 (build_expr_from_tree, case CALL_EXPR): Likewise. 7225 72262000-08-11 Nathan Sidwell <nathan@codesourcery.com> 7227 7228 * decl.c (check_tag_decl): Diagnose typename's which don't 7229 declare anything. 7230 72312000-08-10 Nathan Sidwell <nathan@codesourcery.com> 7232 7233 * init.c (build_aggr_init): Reject bogus array initializers 7234 early. 7235 72362000-08-09 Nathan Sidwell <nathan@codesourcery.com> 7237 7238 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi 7239 runtime. 7240 * cp/tinfo.cc (__dynamic_cast): Likewise. 7241 * cp/inc/cxxabi.h (__dynamic_cast): Likewise. 7242 72432000-08-09 Nathan Sidwell <nathan@codesourcery.com> 7244 7245 * cvt.c (convert_to_pointer_force): Fix error message when 7246 attempting to cast from ambiguous base. 7247 72482000-08-08 Jason Merrill <jason@redhat.com> 7249 7250 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails. 7251 (tsubst_template_arg_vector): Likewise. 7252 7253 * decl2.c (build_anon_union_vars): Choose the largest field; don't 7254 assume that one will be as large as the union. 7255 72562000-08-07 Kazu Hirata <kazu@hxi.com> 7257 7258 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo. 7259 * decl.c (pop_labels): Likewise. 7260 72612000-08-04 Jeffrey Oldham <oldham@codesourcery.com> 7262 7263 * inc/cxxabi.h (__pbase_type_info): Changed member names to match 7264 specifications. 7265 (__pointer_to_member_type_info): Likewise. 7266 (__base_class_info): Likewise. 7267 (__class_type_info): Likewise. 7268 (__si_class_type_info): Likewise. 7269 (__vmi_class_type_info): Likewise. 7270 * tinfo.cc (__si_class_type_info::__do_find_public_src): 7271 Changed member names to match specifications. 7272 (__vmi_class_type_info::__do_find_public_src): Likewise. 7273 (__si_class_type_info::__do_dyncast): Likewise. 7274 (__vmi_class_type_info::__do_dyncast): Likewise. 7275 (__si_class_type_info::__do_upcast): Likewise. 7276 (__vmi_class_type_info::__do_upcast): Likewise. 7277 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise. 7278 (__pbase_type_info::__pointer_catch): Likewise. 7279 (__pointer_type_info::__pointer_catch): Likewise. 7280 (__pointer_to_member_type_info::__pointer_catch): Likewise. 7281 72822000-08-04 Zack Weinberg <zack@wolery.cumb.org> 7283 7284 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist. 7285 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS. 7286 (cc1plus): Link with $(BACKEND) and $(C_OBJS). 7287 72882000-08-04 Mark Mitchell <mark@codesourcery.com> 7289 7290 * cp-tree.h (add_method): Change prototype. 7291 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P. 7292 Don't double the size of the method vector in the error case. 7293 (handle_using_decl): Adjust call to add_method. 7294 (add_implicitly_declared_members): Likewise. 7295 (clone_function_decl): Likewise. 7296 * decl2.c (check_classfn): Likewise. 7297 * semantics.c (finish_member_declaration): Likewise. 7298 72992000-08-04 Joseph S. Myers <jsm28@cam.ac.uk> 7300 7301 * decl.c (flag_isoc94): New variable. 7302 73032000-08-02 Jason Merrill <jason@redhat.com> 7304 7305 * pt.c (do_type_instantiation): Add complain parm; don't complain 7306 if called recursively. 7307 * cp-tree.h, parse.y: Adjust. 7308 73092000-08-02 Zack Weinberg <zack@wolery.cumb.org> 7310 7311 * decl2.c: Silently ignore -Wstrict-prototypes; warn about 7312 -Wno-strict-prototypes. 7313 7314 * g++spec.c: Adjust type of second argument to 7315 lang_specific_driver, and update code as necessary. 7316 7317 * cp-tree.h: Don't prototype min_precision here. 7318 (my_friendly_assert): Cast expression to void. 7319 * semantics.c (do_poplevel): Initialize scope_stmts. 7320 73212000-08-02 Mark Mitchell <mark@codesourcery.com> 7322 7323 * cp-tree.h (DECL_NEEDED_P): Tweak. 7324 73252000-07-28 Jason Merrill <jason@redhat.com> 7326 7327 * lang-specs.h: Use %i in rule for .ii files. 7328 73292000-07-31 Zack Weinberg <zack@wolery.cumb.org> 7330 7331 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0. 7332 73332000-07-30 Mark Mitchell <mark@codesourcery.com> 7334 7335 Allow indirect primary bases. 7336 * cp-tree.h (struct lang_type): Remove vfield_parent. Add 7337 primary_base. 7338 (CLASSTYPE_VFIELD_PARENT): Remove. 7339 (CLASSTYPE_PRIMARY_BINFO): Reimplement. 7340 (BINFO_PRIMARY_BINFO): Remove. 7341 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement. 7342 (BINFO_VBASE_PRIMARY_P): Likewise. 7343 (BINFO_PRIMARY_BASE_OF): New macro. 7344 (BINFO_INDIRECT_PRIMARY_P): Likewise. 7345 (get_primary_binfo): New function. 7346 * decl.c (lang_mark_tree): Make lang_type::primary_base. 7347 * class.c (vcall_offset_data_s): Rename to ... 7348 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p, 7349 and add ctor_vtbl_p. 7350 (get_derived_offset): Use get_primary_binfo. 7351 (dfs_mark_primary_bases): Adjust handling of virtual primary 7352 bases. 7353 (mark_primary_bases): Likewise. 7354 (set_primary_base): Take a binfo, not an integer, as a 7355 representation of the primary base. 7356 (indirect_primary_base_p): Remove. 7357 (determine_primary_base): Adjust for indirect primary bases. 7358 (dfs_find_final_overrider): Fix typo in coment. 7359 (update_vtable_entry_for_fn): Use get_primary_binfo. 7360 (layout_nonempty_base_or_field): Tweak. 7361 (build_base_fields): Adjust for new primary base semantics. 7362 (dfs_propagate_binfo_offsets): Remove. 7363 (propagate_binfo_offsets): Rewrite. 7364 (dfs_set_offset_for_shared_vbases): Remove. 7365 (layout_virtual_bases): Don't use it. 7366 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new 7367 ABI. 7368 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not 7369 CLASSTYPE_VFIELD_PARENT. 7370 (dfs_get_primary_binfo): New function. 7371 (get_primary_binfo): Likewise. 7372 (dump_class_hierarchy_r): Tweak printing of primary bases. 7373 (build_vtbl_initializer): Fix typo in comments. Use 7374 vtbl_init_data. 7375 (build_vcall_and_vbase_vtbl_entries): Likewise. 7376 (build_vbaes_offset_vtbl_entries): Likewise. 7377 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of 7378 BV_VCALL_INDEX to handle indirect primary bases. 7379 (build_vcall_offset_vtbl_entries): Use vtbl_init_data. 7380 (build_rtti_vtbl_entries): Likewise. 7381 * search.c (get_shared_vbase_if_not_primary): Tweak. 7382 (find_vbase_instance): Likewise. 7383 (binfo_for_vtable): Simplify. 7384 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF. 7385 (make_binfo): Make it have 11 entries. 7386 73872000-07-30 Alex Samuel <samuel@codesourcery.com> 7388 7389 * mangle.c (DECL_TEMPLATE_ID_P): Remove. 7390 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when 7391 ascertaining primaryness. 7392 (G): Remove template_args. 7393 (decl_is_template_id): New function. 7394 (write_encoding): Use decl_is_template_id. 7395 (write_name): Likewise. Handle type_decls. Get main variant of 7396 type decls. 7397 (write_nested_name): Likewise. 7398 (write_prefix): Likewise. 7399 (write_template_prefix): Likewise. 7400 (write_special_name_constructor): Remove defunct production from 7401 comment. 7402 (write_bare_function_type): Remove comment about absent parameter. 7403 (write_template_template_arg): Add missing grammar production to 7404 comment. 7405 74062000-07-27 Jason Merrill <jason@redhat.com> 7407 7408 * decl.c (duplicate_decls): If common_type produces a non-typedef 7409 type for a typedef, just use the old type. 7410 74112000-07-27 Mark Mitchell <mark@codesourcery.com> 7412 7413 * cp-tree.h (function_depth): Declare. 7414 (verify_stmt_tree): Likewise. 7415 (find_tree): Likewise. 7416 * decl.c (function_depth): Give it external linkage. 7417 * optimize.c (optimize_function): Increment and decrement it. 7418 * tree.c (verify_stmt_tree_r): New function. 7419 (verify_stmt_tree): Likewise. 7420 (find_tree_r): Likewise. 7421 (find_tree): Likewise. 7422 74232000-07-27 Jason Merrill <jason@redhat.com> 7424 7425 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use 7426 TYPE_PTRMEMFUNC_P. 7427 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC. 7428 74292000-07-26 Mark Mitchell <mark@codesourcery.com> 7430 7431 * decl.c (start_cleanup_fn): Mark the function as `inline'. 7432 * decl2.c (get_guard): Call cp_finish_decl, not 7433 rest_of_decl_compilation, for local guards. 7434 * lex.c (do_identifier): Remove unused variable. 7435 7436Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org> 7437 7438 * parse.y: Add missing ';'. 7439 74402000-07-26 Mark Mitchell <mark@codesourcery.com> 7441 7442 * parse.y (empty_parms): Use `()', not `(...)', when in the scope 7443 of `extern "C++"'. 7444 74452000-07-25 Nathan Sidwell <nathan@codesourcery.com> 7446 7447 Kill strict_prototype. Backwards compatibility only for 7448 non NO_IMPLICIT_EXTERN_C systems. 7449 * cp-tree.h (flag_strict_prototype): Remove. 7450 (strict_prototype): Remove. 7451 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove. 7452 * decl.c (maybe_push_to_top_level): Adjust. 7453 (pop_from_top_level): Adjust. 7454 (decls_match): Only allow sloppy parm matching for ancient 7455 system headers. 7456 (init_decl_processing): Adjust. 7457 (grokdeclarator): Adjust. 7458 * decl2.c (flag_strict_prototype): Remove. 7459 (strict_prototype): Remove. 7460 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove. 7461 (lang_f_options): Remove "strict-prototype". 7462 (unsupported-options): Add "strict-prototype". 7463 * lex.c (do_identifier): Adjust. 7464 (do_scoped_id): Adjust. 7465 * parse.y (empty_parms): Adjust. 7466 * class.c (push_lang_context): Adjust. 7467 (pop_lang_context): Adjust. 7468 * typeck.c (comp_target_parms): Adjust. 7469 74702000-07-25 Nathan Sidwell <nathan@codesourcery.com> 7471 7472 * decl.c (poplevel): Deal with anonymous variables at for scope. 7473 (maybe_inject_for_scope_var): Likewise. 7474 74752000-07-25 Zack Weinberg <zack@wolery.cumb.org> 7476 7477 * decl.c: Remove all signal handling code, now done in toplev.c. 7478 74792000-07-23 Mark Mitchell <mark@codesourcery.com> 7480 7481 * decl.c (make_rtl_for_nonlocal_decl): Rework. 7482 7483 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set 7484 correctly. 7485 74862000-07-20 Zack Weinberg <zack@wolery.cumb.org> 7487 7488 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__. 7489 Define my_friendly_assert and my_friendly_abort as macros 7490 which may call friendly_abort. Prototype friendly abort, not 7491 my_friendly_abort or my_friendly_assert. 7492 * decl.c (signal_catch): Report the signal caught in the error 7493 message. Call fatal directly. 7494 * typeck2.c (ack, my_friendly_assert): Delete. 7495 (my_friendly_abort): Rename to friendly_abort. Expect file, 7496 line, and function parameters. Report the abort code, then 7497 call fancy_abort. Do not mask an abort if errors have 7498 already occurred. 7499 75002000-07-18 Nathan Sidwell <nathan@codesourcery.com> 7501 7502 * typeck.c (comp_target_parms): Remove obsolete parameter. 7503 (comp_target_types): Adjust. 7504 75052000-07-17 Jason Merrill <jason@redhat.com> 7506 7507 * typeck.c (mark_addressable): Never set TREE_USED. 7508 * call.c (build_call): Don't abort on calls to library functions 7509 that have been declared normally. 7510 7511 * typeck.c (build_binary_op): Fix grammar in warning. 7512 7513 * exception.cc (__eh_free): Fix prototype. 7514 7515 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR. 7516 7517 * decl.c (pushdecl): Handle seeing an OVERLOAD in 7518 IDENTIFIER_NAMESPACE_VALUE. 7519 75202000-07-16 Mark Mitchell <mark@codesourcery.com> 7521 7522 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation. 7523 * method.c (use_thunk): Correct handling of vcall offsets. 7524 75252000-07-14 Zack Weinberg <zack@wolery.cumb.org> 7526 7527 * .cvsignore: parse.h and parse.c have no cp- prefix. 7528 75292000-07-13 Mark Mitchell <mark@codesourcery.com> 7530 7531 * .cvsignore: New file. 7532 75332000-07-13 Zack Weinberg <zack@wolery.cumb.org> 7534 7535 * lang-specs.h: Use the new named specs. Remove unnecessary braces. 7536 75372000-07-12 Mark Mitchell <mark@codesourcery.com> 7538 7539 * Makefile.in ($(PARSE_H)): Depend directly on parse.y. 7540 * parse.c: Remove. 7541 * parse.h: Likewise. 7542 75432000-07-11 Mark Mitchell <mark@codesourcery.com> 7544 7545 * class.c (layout_class_type): Add pointers to virtual bases after 7546 base classes under the old ABI. 7547 75482000-07-10 Benjamin Chelf <chelf@codesourcery.com> 7549 7550 * semantics.c (finish_for_stmt): Remove call to emit_line_note. 7551 (finish_continue_stmt): Likewise. 7552 (begin_for_stmt): Remove call to note_level_for_for. 7553 (finish_goto_stmt): Change call from build_min_nt 7554 to build_stmt. 7555 (finish_expr_stmt): Likewise. 7556 (begin_if_stmt): Likewise. 7557 (begin_while_stmt): Likewise. 7558 (finish_while_stmt): Likewise. 7559 (finish_return_stmt): Likewise. 7560 (begin_for_stmt): Likewise. 7561 (finish_for_stmt): Likewise. 7562 (finish_break_stmt): Likewise. 7563 (begin_switch_stmt): Likewise. 7564 (finish_case_label): Likewise. 7565 (genrtl_try_block): Likewise. 7566 (begin_try_block): Likewise. 7567 (begin_handler): Likewise. 7568 (begin_compound_stmt): Likewise. 7569 (finish_asm_stmt): Likewise. 7570 (finish_label_stmt): Likewise. 7571 (add_decl_stmt): Likewise. 7572 (finish_subobject): Likewise. 7573 (finish_decl_cleanup): Likewise. 7574 (finish_named_return_value): Likewise. 7575 (setup_vtbl_ptr): Likewise. 7576 (add_scope_stmt): Likewise. 7577 * decl.c (finish_constructor_body): Likewise. 7578 (finish_destructor_body): Likewise. 7579 * optimize.c (copy_body_r): Likewise. 7580 (initialize_inlined_parameters): Likewise. 7581 (declare_return_variable): Likewise. 7582 (expand_call_inline): Likewise. 7583 75842000-07-10 Jakub Jelinek <jakub@redhat.com> 7585 7586 * semantics.c (expand_body): Sync interface information 7587 at the end of function body expansion. 7588 75892000-07-09 Jason Merrill <jason@redhat.com> 7590 7591 * init.c (build_new_1): Bail early if the call to new fails. 7592 7593 * decl.c (compute_array_index_type): Check specifically for 7594 an INTEGER_CST, not just TREE_CONSTANT. 7595 7596 * decl.c (duplicate_decls): Don't call duplicate_decls on 7597 the DECL_TEMPLATE_RESULT. 7598 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different 7599 codes. 7600 7601 * error.c (dump_template_bindings): Don't crash if we had an 7602 invalid argument list. 7603 7604 * typeck.c (c_expand_start_case): Do narrowing here. 7605 * semantics.c (finish_switch_cond): Not here. 7606 76072000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com> 7608 7609 * parse.y (asm_clobbers): Do string concatenation. 7610 76112000-07-09 Mark Mitchell <mark@codesourcery.com> 7612 7613 * decl.c (pushtag): Don't put local classes in template functions 7614 on the local_classes list. 7615 76162000-07-04 Scott Snyder <snyder@fnal.gov> 7617 7618 * decl2.c (get_guard): Add missing return for old ABI local 7619 variable case. 7620 76212000-07-09 Mark Mitchell <mark@codesourcery.com> 7622 7623 * cp-tree.h (char_type_p): New function. 7624 * decl.c (init_decl_processing): Don't initialize 7625 signed_wchar_type_node or unsigned_wchar_type_node. 7626 (complete_array_type): Handle brace-enclosed string-constants. 7627 * rtti.c (emit_support_tinfos): Remove #if 0'd code. 7628 * tree.c (char_type_p): New function. 7629 * typeck2.c (digest_init): Use char_type_p. 7630 76312000-07-06 Nathan Sidwell <nathan@codesourcery.com> 7632 7633 * pt.c (tsubst): Don't layout type, if it's error_mark. 7634 76352000-07-06 Nathan Sidwell <nathan@codesourcery.com> 7636 7637 * pt.c (instantiate_pending_templates): Reset template level. 7638 76392000-07-05 Jason Merrill <jason@redhat.com> 7640 7641 * call.c (joust): Don't complain about `operator char *()' beating 7642 `operator const char *() const'. 7643 76442000-07-04 scott snyder <snyder@fnal.gov> 7645 Jason Merrill <jason@redhat.com> 7646 7647 * repo.c (repo_get_id): Handle the case where a class with virtual 7648 bases has a null TYPE_BINFO_VTABLE. 7649 76502000-07-04 Kevin Buhr <buhr@stat.wisc.edu> 7651 Jason Merrill <jason@redhat.com> 7652 7653 * parse.y (member_init): Just pass in the type. 7654 * init.c (expand_member_init): Handle getting a type. 7655 76562000-07-04 Martin v. L�wis <loewis@informatik.hu-berlin.de> 7657 Jason Merrill <jason@redhat.com> 7658 7659 * decl.c (finish_function): Warn if a function has no return 7660 statement. 7661 Suggested by Andrew Koenig. 7662 * typeck.c (check_return_expr): Do set current_function_returns_value 7663 if we got an error_mark_node. 7664 76652000-07-03 Nathan Sidwell <nathan@codesourcery.com> 7666 7667 * decl2.c (push_decl_namespace): Push the original namespace. 7668 76692000-07-03 Nathan Sidwell <nathan@codesourcery.com> 7670 7671 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES. 7672 * semantics.c (begin_class_definition): Clear it. 7673 76742000-07-02 Benjamin Chelf <chelf@codesourcery.com> 7675 7676 * cp-tree.h (genrtl_goto_stmt): Remove declaration. 7677 (genrtl_expr_stmt): Likewise. 7678 (genrtl_decl_stmt): Likewise. 7679 (genrtl_if_stmt): Likewise. 7680 (genrtl_while_stmt): Likewise. 7681 (genrtl_do_stmt): Likewise. 7682 (genrtl_return_stmt): Likewise. 7683 (genrtl_for_stmt): Likewise. 7684 (genrtl_break_stmt): Likewise. 7685 (genrtl_continue_stmt): Likewise. 7686 (genrtl_scope_stmt): Likewise. 7687 (genrtl_switch_stmt): Likewise. 7688 (genrtl_case_label): Likewise. 7689 (genrtl_begin_compound_stmt): Likewise. 7690 (genrtl_finish_compound_stmt): Likewise. 7691 (genrtl_compound_stmt): Likewise. 7692 (genrtl_asm_stmt): Likewise. 7693 7694 * init.c (begin_init_stmts): Remove call to 7695 genrtl_begin_compound_stmt. 7696 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt. 7697 7698 * semantics.c (lang_expand_stmt): Changed call to 7699 genrtl_compound_stmt to ignore return value. 7700 77012000-07-02 Mark Mitchell <mark@codesourcery.com> 7702 7703 * mangle.c (canonicalize_for_substitution): Return the canonical 7704 variant of a type. 7705 7706 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a 7707 TYPE_DECL. 7708 * typeck.c (commonparms): Remove obstack manipulations. 7709 77102000-07-01 Benjamin Chelf <chelf@codesourcery.com> 7711 7712 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o. 7713 7714 * Makefile.in (OBJS): Added ../c-semantics.o. 7715 (OBJDEPS): Likewise. 7716 7717 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to 7718 ../c-common.h. 7719 (struct stmt_tree): Added comment. 7720 (current_function_name_declared): Removed. 7721 (stmts_are_full_exprs_p): Likewise. 7722 (genrtl_do_pushlevel): Likewise. 7723 (genrtl_clear_out_block): Likewise. 7724 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h. 7725 (DECL_ANON_UNION_ELEMS): Likewise. 7726 (emit_local_var): Likewise. 7727 (make_rtl_for_local_static): Likewise. 7728 (do_case): Likewise. 7729 (expand_stmt): Likewise. 7730 (genrtl_decl_cleanup): Likewise. 7731 (c_expand_asm_operands): Likewise. 7732 (c_expand_return): Likewise. 7733 (c_expand_start_case): Likewise. 7734 7735 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c. 7736 (emit_local_var): Likewise. 7737 (initialize_local_var): Change reference to 7738 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p(). 7739 Change reference to stmts_are_full_exprs_p to 7740 current_stmt_tree->stmts_are_full_exprs_p. 7741 (push_cp_function_context): Likewise. 7742 7743 * expect.c (expand_throw): Change reference to 7744 stmts_are_full_exprs_p. 7745 7746 * init.c (build_aggr_init): Change reference to 7747 stmts_are_full_exprs_p. 7748 (build_vec_init): Likewise. 7749 7750 * optimize.c (maybe_clone_body): Change reference to 7751 current_function_name_declared to 7752 cp_function_chain->name_declared. 7753 7754 * pt.c (instantiate_decl): Change reference to 7755 current_function_name_declared to 7756 cp_function_chain->name_declared. 7757 7758 * semantics.c (expand_cond): Moved declaration to c-common.h. 7759 (genrtl_do_pushlevel): Moved to c-semantics.c. 7760 (genrtl_clear_out_block): Likewise. 7761 (genrtl_goto_stmt): Likewise. 7762 (genrtl_expr_stmt): Likewise. 7763 (genrtl_decl_stmt): Likewise. 7764 (gerntl_if_stmt): Likewise. 7765 (genrtl_while_stmt): Likewise. 7766 (genrtl_do_stmt): Likewise. 7767 (genrtl_return_stmt): Likewise. 7768 (genrtl_for_stmt): Likewise. 7769 (genrtl_break_stmt): Likewise. 7770 (genrtl_continue_stmt): Likewise. 7771 (genrtl_scope_stmt): Likewise. 7772 (genrtl_switch_stmt): Likewise. 7773 (genrtl_case_label): Likewise. 7774 (genrtl_begin_compound_stmt): Likewise. 7775 (genrtl_finish_compound_stmt): Likewise. 7776 (genrtl_compound_stmt): Likewise. 7777 (genrtl_asm_stmt): Likewise. 7778 (genrtl_decl_cleanup): Likewise. 7779 (expand_cond): Likewise. 7780 (expand_stmt): Renamed to ... 7781 (lang_expand_stmt): ... this. 7782 (lang_expand_expr_stmt): Initialize. 7783 (set_current_function_name_declared): Likewise. 7784 (stmts_are_full_exprs_p): Likewise. 7785 (current_function_name_declared): Likewise. 7786 (anon_aggr_type_p): Likewise. 7787 (do_poplevel): Change reference to 7788 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p(). 7789 Change reference to stmts_are_full_exprs_p to 7790 current_stmt_tree->stmts_are_full_exprs_p. 7791 (add_tree): Likewise. 7792 (finish_expr_stmt): Likewise. 7793 (prep_stmt): Likewise. 7794 (lang_expand_stmt): Likewise. 7795 (begin_compound_stmt): Change reference to 7796 current_function_name_declared to 7797 cp_function_chain->name_declared and call to 7798 current_function_name_declared(). 7799 (setup_vtbl_ptr): Likewise. 7800 (genrtl_do_poplevel): Removed. 7801 78022000-06-30 Jason Merrill <jason@redhat.com> 7803 7804 * init.c (init_init_processing): Go back to aligning like 7805 double_type_node for old ABI. 7806 (get_cookie_size): Make cookie larger if we get a type that needs 7807 more alignment. 7808 (build_vec_delete): Call it. 7809 7810 * typeck.c (qualify_type_recursive): New fn. 7811 (composite_pointer_type): Use it. 7812 (build_binary_op): Use composite_pointer_type. 7813 78142000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu> 7815 Jason Merrill <jason@redhat.com> 7816 7817 * typeck.c (check_return_expr): Don't complain about returning 7818 NULL from operator new if -fcheck-new. 7819 * cp-tree.h: Declare flag_check_new here. 7820 * init.c: Not here. 7821 78222000-06-28 Alex Samuel <samuel@codesourcery.com> 7823 7824 * mangle.c (find_substitution): Use same_type_p. 7825 (write_encoding): Don't check for substitutions. 7826 78272000-06-30 Nathan Sidwell <nathan@codesourcery.com> 7828 7829 * parse.y (expr_no_comma_rangle): New non-terminal. 7830 (template_parm): Use it for default parameter case. 7831 (template_arg): Use it. 7832 (expr_no_commas): Remove commented out undefined extensions. 7833 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r. 7834 * parse.h, parse.c: Rebuilt. 7835 78362000-06-30 Mark Mitchell <mark@codesourcery.com> 7837 7838 * semantics.c (genrtl_asm_stmt): Don't decay input operands here. 7839 (finish_asm_stmt): Do it here, instead. 7840 7841 * cp-tree.h (ridpointers): Don't declare. 7842 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX. 7843 (record_builtin_java_type): Likewise. 7844 (init_decl_processing): Likewise. 7845 * lex.c: Move inclusion of lex.h. 7846 (ridpointers): Don't define. 7847 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of 7848 RID_MAX. 7849 * lex.h (enum rid): Rename to ... 7850 (enum cp_rid): ... this. 7851 (ridpointers): Don't declare. 7852 * parse.y: Move inclusion of lex.h. 7853 * parse.c: Regenerated. 7854 * spew.c: Move inclusion of lex.h. 7855 7856 * cp-tree.h (struct language_function): Remove temp_name_counter. 7857 (temp_name_counter): Remove. 7858 (get_temp_name): Change prototype. 7859 (get_guard): New function. 7860 (get_guard_cond): Likewise. 7861 (set_guard): Likewise. 7862 * cvt.c (build_up_reference): Adjust call to get_temp_name. 7863 * decl.c (expand_static_init): Use get_guard and friends to 7864 implement guard variables. 7865 * decl2.c (get_temp_name): Assume that the variables created are 7866 always static. 7867 (get_sentry): Rename to ... 7868 (get_guard): ... this. Implement new ABI guard variables. 7869 (get_guard_bits): New function. 7870 (get_guard_cond): Likewise. 7871 (set_guard): Likewise. 7872 (start_static_initialization_or_destruction): Use them. 7873 (do_static_initialization): Replace sentry with guard throughout. 7874 (do_static_destruction): Likewise. 7875 * init.c (create_temporary_var): Add comment. 7876 78772000-06-28 Alex Samuel <samuel@codesourcery.com> 7878 7879 * mangle.c (find_substitution): Use same_type_p. 7880 (write_encoding): Don't check for substitutions. 7881 78822000-06-30 Nathan Sidwell <nathan@codesourcery.com> 7883 7884 * parse.y (expr_no_comma_rangle): New non-terminal. 7885 (template_parm): Use it for default parameter case. 7886 (template_arg): Use it. 7887 (expr_no_commas): Remove commented out undefined extensions. 7888 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r. 7889 * parse.h, parse.c: Rebuilt. 7890 78912000-06-29 Mark Mitchell <mark@codesourcery.com> 7892 7893 * cp-tree.h (flag_const_strings): Remove. 7894 (warn_parentheses): Likewise. 7895 (warn_format): Likewise. 7896 (common_type): Likewise. 7897 (default_conversion): Likewise. 7898 (build_binary_op): Likewise. 7899 (cp_build_binary_op): New macro. 7900 * call.c (build_new_op): Use cp_build_binary_op instead of 7901 build_binary_op. 7902 * class.c (build_vtable_entry_ref): Likewise. 7903 * decl.c (expand_static_init): Likewise. 7904 (compute_array_index_type): Likewise. 7905 (build_enumerator): Likewise. 7906 * decl2.c (delete_sanity): Likewise. 7907 (start_static_initialization_or_destruction): Likewise. 7908 * error.c (dump_type_suffix): Likewise. 7909 * init.c (resolve_offset_ref): Likewise. 7910 (build_new): Likewise. 7911 (build_new_1): Likewise. 7912 (build_vec_delete_1): Likewise. 7913 (build_vec_init): Likewise. 7914 (build_delete): Likewise. 7915 * rtti.c (synthesize_tinfo_fn): Likewise. 7916 (synthesize_tinfo_var): Likewise. 7917 * search.c (expand_upcast_fixups): Likewise. 7918 (fixup_all_virtual_upcast_offsets): Likewise. 7919 * typeck.c (build_array_ref): Likewise. 7920 (get_member_function_from_ptrfunc): Likewise. 7921 (build_binary_op): Add parameter. 7922 (pointer_int_sum): Use cp_build_binary_op. 7923 (pointer_diff): Likewise. 7924 (build_modify_expr): Likewise. 7925 (get_delta_difference): Likewise. 7926 (build_ptrmemfunc): Likewise. 7927 79282000-06-29 Nathan Sidwell <nathan@codesourcery.com> 7929 7930 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove. 7931 * decl.c (create_implicit_typedef): Adjust. 7932 * decl2.c (build_artificial_parm): Adjust. 7933 * method.c (implicitly_declare_fn): Adjust. 7934 * pt.c (push_inline_template_parms_recursive): Adjust. 7935 (process_template_parm): Adjust. 7936 (overloaded_template_name): Adjust. 7937 * semantics.c (finish_template_template_parm): Adjust. 7938 79392000-06-28 Mark Mitchell <mark@codesourcery.com> 7940 7941 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove. 7942 * class.c (update_vtable_entry_for_fn): Correct logic for deciding 7943 where to emit thunks. 7944 (build_vtt): Adjust call to build_vtt_inits. 7945 (build_vtt_inits): Add parameter to indicate whether or not 7946 sub-VTTs for virtual bases should be included. Adjust handling of 7947 construction vtables. 7948 (get_matching_base): New function. 7949 (dfs_build_vtt_inits): Rename to ... 7950 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of 7951 construction vtables. 7952 (dfs_fixup_binfo_vtbls): Likewise. 7953 (build_ctor_vtbl_groups): Build construction vtables for virtual 7954 bases, too. 7955 (accumulate_vtbl_inits): Tweak logic for deciding whether or not 7956 to build construction vtbls. 7957 (dfs_accumulate_vtbl_inits): Adjust handling of 7958 construction vtables. 7959 7960 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified 7961 types correctly. 7962 79632000-06-27 Mark Mitchell <mark@codesourcery.com> 7964 7965 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too. 7966 79672000-06-26 Nathan Sidwell <nathan@codesourcery.com> 7968 7969 * search.c (hides): Remove. 7970 (is_subobject_of_p): Add most_derived parameter. Use 7971 CANONICAL_BINFO. 7972 (lookup_field_queue_p): Adjust. 7973 (lookup_field_r): Adjust. 7974 79752000-06-26 Nathan Sidwell <nathan@codesourcery.com> 7976 7977 * decl2.c (handle_class_head): Bash typedefs to the type's main 7978 decl. 7979 79802000-06-25 Mark Mitchell <mark@codesourcery.com> 7981 7982 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ... 7983 (begin_global_stmt_expr): ... this. 7984 (genrtl_finish_stmt_expr): Rename to ... 7985 (finish_global_stmt_expr): ... this. 7986 * init.c (begin_init_stmts): Adjust calls. 7987 (finish_init_stmts): Likewise. 7988 * semantics.c (genrtl_begin_stmt_expr): Rename to ... 7989 (begin_global_stmt_expr): ... this. 7990 (genrtl_finish_stmt_expr): Rename to ... 7991 (finish_global_stmt_expr): ... this. 7992 79932000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 7994 7995 * search.c (lookup_member): Fix typo in comment. 7996 79972000-06-24 Jason Merrill <jason@redhat.com> 7998 7999 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace. 8000 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL. 8001 80022000-06-24 Martin v. L�wis <loewis@informatik.hu-berlin.de> 8003 8004 * parse.y (complex_direct_notype_declarator): Support global_scope. 8005 * Makefile.in: Adjust conflict count. 8006 80072000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu> 8008 8009 * parse.y (template_arg): Convert TEMPLATE_DECL 8010 that is a template template parameter to 8011 TEMPLATE_TEMPLATE_PARM here. 8012 8013 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment. 8014 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro. 8015 (copy_template_template_parm): Adjust prototype. 8016 * decl.c (grokdeclarator): Remove dead code. 8017 * pt.c (process_template_parm): Tidy. 8018 (lookup_template_class): Construct nodes in 8019 copy_template_template_parm. 8020 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to 8021 lookup_template_class. Use TYPE_TI_TEMPLATE. 8022 * tree.c (copy_template_template_parm): Add NEWARGS 8023 parameter. 8024 (mapcar): Adjust call to copy_template_template_parm. 8025 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL. 8026 * method.c (build_template_template_parm_names): Change error 8027 code to avoid compilation warning. 8028 8029 * gxxint.texi: Document template template parameter 8030 name mangling. 8031 80322000-06-21 Alex Samuel <samuel@codesourcery.com> 8033 8034 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o. 8035 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c. 8036 (cp-demangle.o): New rule. 8037 (dyn-string.o): Likewise. 8038 * inc/cxxabi.h (__cxa_demangle): New declaration. 8039 80402000-06-22 Mark Mitchell <mark@codesourcery.com> 8041 8042 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro. 8043 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise. 8044 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset 8045 a tree, not an int. 8046 (THUNK_GENERATE_WITH_VTABLE_P): New macro. 8047 (make_thunk): Change prototype. 8048 (emit_thunk): Rename to use_thunk. 8049 (mangle_thunk): Change prototype. 8050 * class.c (get_derived_offset): Simplify. 8051 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and 8052 BV_GENERATE_THUNK_WITH_VTABLE_P. 8053 (build_primary_vtable): Simplify. 8054 (add_virtual_function): Use BV_FN, rather than TREE_VALUE. 8055 (dfs_find_base): Remove. 8056 (update_vtable_entry_for_fn): Correct bug in finding the base 8057 where a virtual function was first declared. Figure out whether 8058 or not to emit a vcall-thunk with the vtables in which it appears. 8059 Correct logic for deciding whether to use an ordinary thunk, or a 8060 vcall thunk. 8061 (finish_struct_1): Remove unnecssary code. 8062 (build_vtbl_initializer): Use ssize_int for the running counter of 8063 negative indices. 8064 (build_vtbl_initializer): Only use vcall thunks where necessary. 8065 Mark thunks as needing to be emitted with their vtables, or not. 8066 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in 8067 indices. Use size_binop. 8068 (dfs_build_vcall_offset_vtbl_entries): Don't rely on 8069 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use 8070 size_binop. 8071 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry. 8072 (build_vtable_entry): Mark thunks as needing to be emitted with 8073 their vtables, or not. 8074 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk. 8075 * decl2.c (mark_vtable_entries): Use use_thunk instead of 8076 emit_thunk. 8077 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk 8078 information. 8079 * error.c (dump_expr): Use BV_FN. 8080 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree, 8081 not an int. 8082 * method.c (make_thunk): Likewise. 8083 (emit_thunk): Rename to use_thunk. Allow callers to decide 8084 whether or not to actually emit the thunk. Adjust for changes in 8085 representation of vcall offsets. 8086 * search.c (dfs_get_pure_virtuals): Use BV_FN. 8087 * semantics.c (emit_associated_thunks): New function. 8088 (expand_body): Use it. 8089 * ir.texi: Adjust decriptions of thunks. 8090 80912000-06-22 Jason Merrill <jason@redhat.com> 8092 8093 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE. 8094 (tsubst_friend_function): Copy it here. 8095 8096 * decl.c (grok_op_properties): Fix typo. 8097 8098 * decl2.c (delete_sanity): Clarify warning, avoid failure on 8099 deleting void*. 8100 8101 * pt.c (check_explicit_specialization): Clarify error. 8102 8103 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from 8104 an old OVERLOAD when we're declaring a non-function. 8105 (pushdecl, destroy_local_var): Check for error_mark_node. 8106 (warn_extern_redeclared_static): Also bail early if 8107 we're a CONST_DECL. 8108 (push_overloaded_decl): Ignore an old error_mark_node. 8109 81102000-06-22 Nathan Sidwell <nathan@codesourcery.com> 8111 8112 * call.c (build_x_va_arg): Check if in a template decl. 8113 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg. 8114 81152000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com> 8116 8117 * class.c (push_lang_context): TYPE_NAME gets you to the Java 8118 types DECLs. 8119 * decl.c (check_goto): Computed gotos assumed OK. 8120 81212000-06-20 Jason Merrill <jason@redhat.com> 8122 8123 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs 8124 for which we don't need to look for instantiations. 8125 81262000-06-21 Nathan Sidwell <nathan@codesourcery.com> 8127 8128 * parse.y (program): Always call finish_translation_unit. 8129 * parse.c, parse.h: Rebuilt. 8130 81312000-06-20 Zack Weinberg <zack@wolery.cumb.org> 8132 8133 * method.c: Don't include hard-reg-set.h. 8134 81352000-06-20 Nathan Sidwell <nathan@codesourcery.com> 8136 8137 * rtti.c (get_base_offset): Cope when vbase field is in a base. 8138 81392000-06-20 Nathan Sidwell <nathan@codesourcery.com> 8140 8141 * call.c (build_conditional_expr): Use VOID_TYPE_P. 8142 * cvt.c (cp_convert_to_pointer): Likewise. 8143 (convert_to_void): Likewise. 8144 * error.c (dump_expr): Likewise. 8145 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise. 8146 * init.c (build_delete): Likewise. 8147 * method.c (emit_thunk): Likewise. 8148 * optmize.c (declare_return_variable): Likewise. 8149 * rtti.c (get_tinfo_decl_dynamic): Likewise. 8150 (get_typeid): Likewise. 8151 (build_dynamic_cast_1): Likewise. 8152 * typeck.c (composite_pointer_type): Likewise. 8153 (common_type): Likewise. 8154 (build_indirect_ref): Likewise. 8155 (build_binary_op): Likewise. 8156 (build_x_compound_expr): Likewise. 8157 (check_return_expr): Likewise. 8158 * typeck2.c (add_exception_specifier): Likewise. 8159 8160 * mangle.c (write_method_parms): Use direct comparison for end 8161 of parmlist. 8162 81632000-06-19 Benjamin Chelf <chelf@codesourcery.com> 8164 8165 * cp-tree.h (genrtl_try_block): Declare function. 8166 (genrtl_handler): Likewise. 8167 (genrtl_catch_block): Likewise. 8168 (genrtl_ctor_stmt): Likewise. 8169 (genrtl_subobject): Likewise. 8170 (genrtl_decl_cleanup): Likewise. 8171 (genrtl_do_poplevel): Likewise. 8172 (genrtl_do_pushlevel): Likewise. 8173 (genrtl_clear_out_block): Likewise. 8174 (genrtl_goto_stmt): Likewise. 8175 (genrtl_expr_stmt): Likewise. 8176 (genrtl_decl_stmt): Likewise. 8177 (genrtl_if_stmt): Likewise. 8178 (genrtl_while_stmt): Likewise. 8179 (genrtl_do_stmt): Likewise. 8180 (genrtl_return_stmt): Likewise. 8181 (genrtl_for_stmt): Likewise. 8182 (genrtl_break_stmt): Likewise. 8183 (genrtl_continue_stmt): Likewise. 8184 (genrtl_scope_stmt): Likewise. 8185 (genrtl_switch_stmt): Likewise. 8186 (genrtl_case_label): Likewise. 8187 (genrtl_begin_compound_stmt): Likewise. 8188 (genrtl_finish_compound_stmt): Likewise. 8189 (genrtl_compound_stmt): Likewise. 8190 (genrtl_asm_stmt): Likewise. 8191 (genrtl_named_return_value): Likewise. 8192 (genrtl_begin_stmt_expr): Likewise. 8193 (genrtl_finish_stmt_expr): Likewise. 8194 (finish_for_stmt): Removed first argument. 8195 (finish_switch_stmt): Likewise. 8196 8197 * semantics.c (genrtl_try_block): Define function. 8198 (genrtl_handler): Likewise. 8199 (genrtl_catch_block): Likewise. 8200 (genrtl_ctor_stmt): Likewise. 8201 (genrtl_subobject): Likewise. 8202 (genrtl_decl_cleanup): Likewise. 8203 (genrtl_do_poplevel): Likewise. 8204 (genrtl_do_pushlevel): Likewise. 8205 (genrtl_clear_out_block): Likewise. 8206 (genrtl_goto_stmt): Likewise. 8207 (genrtl_expr_stmt): Likewise. 8208 (genrtl_decl_stmt): Likewise. 8209 (genrtl_if_stmt): Likewise. 8210 (genrtl_while_stmt): Likewise. 8211 (genrtl_do_stmt): Likewise. 8212 (genrtl_return_stmt): Likewise. 8213 (genrtl_for_stmt): Likewise. 8214 (genrtl_break_stmt): Likewise. 8215 (genrtl_continue_stmt): Likewise. 8216 (genrtl_scope_stmt): Likewise. 8217 (genrtl_switch_stmt): Likewise. 8218 (genrtl_case_label): Likewise. 8219 (genrtl_begin_compound_stmt): Likewise. 8220 (genrtl_finish_compound_stmt): Likewise. 8221 (genrtl_compound_stmt): Likewise. 8222 (genrtl_asm_stmt): Likewise. 8223 (genrtl_named_return_value): Likewise. 8224 (genrtl_begin_stmt_expr): Likewise. 8225 (genrtl_finish_stmt_expr): Likewise. 8226 (finish_for_stmt): Removed first argument and generate rtl 8227 specific code. 8228 (finish_switch_stmt): Likewise. 8229 (do_poplevel): Removed generate rtl specific code. 8230 (do_pushlevel): Likewise. 8231 (add_tree): Likewise. 8232 (finish_goto_stmt): Likewise. 8233 (finish_expr_stmt): Likewise. 8234 (begin_if_stmt): Likewise. 8235 (finish_if_stmt_cond): Likewise. 8236 (finish_then_clause): Likewise. 8237 (begin_else_clause): Likewise. 8238 (finish_else_clause): Likewise. 8239 (finish_if_stmt): Likewise. 8240 (clear_out_block): Likewise. 8241 (begin_while_stmt): Likewise. 8242 (finish_while_stmt_cond): Likewise. 8243 (finish_while_stmt): Likewise. 8244 (begin_do_stmt): Likewise. 8245 (finish_do_body): Likewise. 8246 (finish_do_stmt): Likewise. 8247 (finish_return_stmt): Likewise. 8248 (begin_for_stmt): Likewise. 8249 (finish_for_init_stmt): Likewise. 8250 (finish_for_cond): Likewise. 8251 (finish_for_expr): Likewise. 8252 (finish_break_stmt): Likewise. 8253 (finish_continue_stmt): Likewise. 8254 (begin_switch_stmt): Likewise. 8255 (finish_switch_cond): Likewise. 8256 (finish_case_label): Likewise. 8257 (begin_try_block): Likewise. 8258 (begin_function_try_block): Likewise. 8259 (finish_try_block): Likewise. 8260 (finish_cleanup_try_block): Likewise. 8261 (finish_cleanup): Likewise. 8262 (finish_function_try_block): Likewise. 8263 (finish_handler_sequence): Likewise. 8264 (finish_function_handler_sequence): Likewise. 8265 (begin_handler): Likewise. 8266 (finish_handler_parms): Likewise. 8267 (begin_catch_block): Likewise. 8268 (finish_handler): Likewise. 8269 (begin_compound_stmt): Likewise. 8270 (finish_compound_stmt): Likewise. 8271 (finish_asm_stmt): Likewise. 8272 (finish_label_stmt): Likewise. 8273 (finish_label_decl): Likewise. 8274 (finish_subobject): Likewise. 8275 (finish_decl_cleanup): Likewise. 8276 (finish_named_return_value): Likewise. 8277 (begin_stmt_expr): Likewise. 8278 (finish_stmt_expr): Likewise. 8279 8280 * decl.c (initialize_local_var): Changed call to finish_expr_stmt 8281 to call genrtl_expr_stmt when appropriate. 8282 8283 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and 8284 begin_compound_expr to call genrtl_begin_stmt_expr and 8285 genrtl_begin_compound_expr when appropriate. 8286 (finish_init_stmts): Changed calls to finish_compound_expr and 8287 finish_stmt_expr to call genrtl_finish_compound_expr and 8288 genrtl_finish_stmt_expr when appropriate. 8289 (expand_default_init): Changed call to finish_expr_stmt to call 8290 genrtl_expr_stmt when appropriate. 8291 (build_vec_init): Likewise. 8292 8293 * parse.y (simple_stmt): Removed first argument from call to 8294 finish_for_stmt. Removed first argument from call to 8295 finish_switch_stmt. 8296 8297 * parse.c: Regenerated. 8298 8299 * pt.c (tsubst_expr): Removed first argument from call to 8300 finish_for_stmt. Removed first argument from call to 8301 finish_switch_stmt. 8302 83032000-06-16 Benjamin Chelf <chelf@codesourcery.com> 8304 8305 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to 8306 CP_DUMMY_TREE_CODE. Remove #include "c-common.def". 8307 8308 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def". 8309 (cplus_tree_code_length[]): Likewise. 8310 (cplus_tree_code_name[]): Likewise. 8311 (init_parse): Added call to add_c_tree_codes. Changed 8312 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE. 8313 83142000-06-16 Mark Mitchell <mark@codesourcery.com> 8315 8316 * cp-tree.h (finish_mem_initializers): Declare. 8317 (count_trees): Likewise. 8318 * parse.y (base_init): Use finish_mem_initializers. 8319 * semantics.c (finish_mem_initializers): New function. 8320 8321 * tree.c (count_trees_r): Prototype. Use DATA parameter to store 8322 the number of trees. 8323 (n_trees): Remove. 8324 (count_trees): Don't use it. 8325 83262000-06-15 Jason Merrill <jason@redhat.com> 8327 8328 * tree.c (count_trees): New debugging function. 8329 8330 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P. 8331 * init.c (build_member_call): Pull out the name of a DECL. 8332 8333 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H. 8334 * semantics.c (expand_body): Push to TV_INTEGRATION here. 8335 * optimize.c (optimize_function): Not here. 8336 * pt.c (instantiate_decl): Push to TV_PARSE. 8337 83382000-06-15 Mark Mitchell <mark@codesourcery.com> 8339 8340 * cp-tree.h (struct language_function): Remove x_base_init_list 8341 and x_member_init_list. 8342 (current_base_init_list): Remove. 8343 (current_member_init_list): Likewise. 8344 (setup_vtbl_ptr): Change prototype. 8345 (emit_base_init): Likewise. 8346 (expand_member_init): Likewise. 8347 (reinit_parse_for_function): Remove. 8348 * decl.c (save_function_data): Don't clear x_base_init_list and 8349 x_member_init_list. 8350 (mark_language_function): Don't mark them. 8351 * init.c (perform_member_init): Tweak comment. 8352 (sort_member_init): Take the list of initializers as an argument. 8353 (sort_base_init): Likewise. 8354 (emit_base_init): Likewise. 8355 (expand_member_init): Return the initializer. Don't use global 8356 variables. 8357 * lex.c (reinit_parse_for_function): Remove. 8358 * method.c (build_template_parm_names): Correct substitution. 8359 (do_build_copy_constructor): Don't use current_member_init_list 8360 and current_base_init_list. 8361 (synthesize_method): Likewise. 8362 * parse.y (base_init): Split mem-initializers into 8363 base-initializers and field-initializers. 8364 (member_init_list): Build up the list here. 8365 (member_init): Return the initializer. 8366 (fn.depfn): Don't use reinit_parse_for_function. 8367 * parse.c: Regenerated. 8368 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the 8369 ERROR_MARK. 8370 (tsubst_expr): Don't use current_member_init_list 8371 and current_base_init_list. 8372 (tsubst_expr_values): Rename to ... 8373 (tsubst_initializer_list): ... this. Use convert_from_reference. 8374 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list 8375 and current_base_init_list. 8376 (begin_function_definition): Don't call reinit_parse_for_function. 8377 8378 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors. 8379 8380 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE 8381 correctly. 8382 8383 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking. 8384 83852000-06-14 Benjamin Chelf <chelf@codesourcery.com> 8386 8387 * cp-tree.h (IF_COND): Move to c-common.h. 8388 (THEN_CLAUSE): Likewise. 8389 (ELSE_CLAUSE): Likewise. 8390 (WHILE_COND): Likewise. 8391 (WHILE_BODY): Likewise. 8392 (DO_COND): Likewise. 8393 (DO_BODY): Likewise. 8394 (RETURN_EXPR): Likewise. 8395 (EXPR_STMT_EXPR): Likewise. 8396 (FOR_INIT_STMT): Likewise. 8397 (FOR_COND): Likewise. 8398 (FOR_EXPR): Likewise. 8399 (FOR_BODY): Likewise. 8400 (SWITCH_COND): Likewise. 8401 (SWITCH_BODY): Likewise. 8402 (CASE_LOW): Likewise. 8403 (CASE_HIGH): Likewise. 8404 (GOTO_DESTINATION): Likewise. 8405 (COMPOUND_BODY): Likewise. 8406 (ASM_CV_QUAL): Likewise. 8407 (ASM_STRING): Likewise. 8408 (ASM_OUTPUTS): Likewise. 8409 (ASM_INPUTS): Likewise. 8410 (ASM_CLOBBERS): Likewise. 8411 (DECL_STMT_DECL): Likewise. 8412 (STMT_EXPR_STMT): Likewise. 8413 (LABEL_STMT_LABEL): Likewise. 8414 (SCOPE_BEGIN_P): Likewise. 8415 (SCOPE_END_P): Likewise. 8416 (SCOPE_STMT_BLOCK): Likewise. 8417 (SCOPE_NULLIFIED_P): Likewise. 8418 (SCOPE_NO_CLEANUPS_P): Likewise. 8419 (SCOPE_PARTIAL_P): Likewise. 8420 (ASM_VOLATILE_P): Likewise. 8421 (STMT_LINENO): Likewise. 8422 (STMT_LINENO_FOR_FN_P): Likewise. 8423 8424 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR, 8425 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT, 8426 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT, 8427 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT, 8428 SCOPE_STMT, CASE_LABEL, STMT_EXPR. 8429 8430 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def. 8431 8432 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def. 8433 (cc1plus$(exeext)): Added $(srcdir)/c-common.def. 8434 8435 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'. 8436 (cplus_tree_code_length[]): Added '#include "c-common.def"'. 8437 (cplus_tree_code_name[]): Added '#include "c-common.def"'. 8438 84392000-06-14 Mark Mitchell <mark@codesourcery.com> 8440 8441 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro. 8442 * class.c (dfs_find_final_overrider): Set it appropriately. 8443 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to 8444 avoid unneeded secondary vptrs. 8445 84462000-06-13 Jakub Jelinek <jakub@redhat.com> 8447 8448 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN. 8449 (check_bitfield_decl, check_field_decl): Likewise. 8450 (build_vtbl_or_vbase_field, build_base_field): Likewise. 8451 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN. 8452 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN. 8453 (xfer_tag, finish_enum): Likewise. 8454 * decl2.c (finish_builtin_type): Likewise. 8455 * init.c (init_init_processing): Likewise. 8456 * pt.c (instantiate_class_template): Likewise. 8457 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN. 8458 * cp-tree.h (struct lang_type): Add user_align member. 8459 (CLASSTYPE_USER_ALIGN): Define. 8460 8461Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl> 8462 8463 * Make-lang.in (c++.install-common): Install g++-cross in 8464 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as 8465 $(target_alias)-g++ and $(target_alias)-c++. 8466 84672000-06-12 Mark Mitchell <mark@codesourcery.com> 8468 8469 * class.c (vcall_offset_data_s): Add last_init and fns. 8470 (overrides): Rename to same_signature_p. 8471 (dfs_find_final_overrider): Adjust accordingly. 8472 (mark_overriders): Likewise. 8473 (warn_hidden): Likewise. 8474 (build_vtbl_initializer): Reorganize machinery for building things 8475 at negative offsets. 8476 (build_vcall_and_vbase_vtbl_entries): Likewise. 8477 (build_vbase_offset_vtbl_entries): Likewise. 8478 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall 8479 offset entries. Do not create two entries for functions with the 8480 same signature. 8481 (build_vcall_offset_vtbl_entries): Initialize vod->fns. 8482 (build_rtti_vtbl_entries): Reorganize machinery for building things 8483 at negative offsets. 8484 8485 * optimize.c (expand_call_inline): Don't recurse into the code 8486 used to initialize the parameters more than once. 8487 84882000-06-11 Mark Mitchell <mark@codesourcery.com> 8489 8490 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment. 8491 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here. 8492 (find_substitution): Only use the `Sa' substitution for 8493 std::allocator, not instantiations of it. 8494 (write_template_prefix): Move comment. Only use a TREE_LIST to 8495 represent substitutions for a member template. 8496 (write_array_type): Mangle array dimensions correctly. 8497 * optimize.c (maybe_clone_body): Copy more information from the 8498 cloned function. 8499 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE 8500 on the regenerated declaration. 8501 85022000-06-11 Chip Salzenberg <chip@valinux.com> 8503 Mark Mitchell <mark@codesourcery.com> 8504 8505 * class.c (build_vtable): Clarify comment. 8506 (build_ctor_vtbl_group): Pass the most derived type to 8507 build_vtable. 8508 85092000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8510 8511 * decl2.c (compare_options): Don't needlessly cast away const-ness. 8512 85132000-06-10 Mark Mitchell <mark@codesourcery.com> 8514 8515 * decl.c (add_binding): Handle duplicate declarations of external 8516 variables. 8517 85182000-06-09 Chip Salzenberg <chip@valinux.com> 8519 Mark Mitchell <mark@codesourcery.com> 8520 8521 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an 8522 argument. 8523 (write_signed_number): New macro. 8524 (write_unsigned_number): Likewise. 8525 (write_source_name): Use them. 8526 (write_number): Handle signed and unsigned values. 8527 (write_integer_cst): Use tree_int_cst_sgn, and use 8528 write_unsigned_number or write_signed_number as appropriate. 8529 (write_discriminator): Use write_unsigned_number or 8530 write_signed_number as appropriate. 8531 (write_template_arg_literal): Likewise. 8532 (write_array_type): Use tree_low_cst. 8533 (write_template_parm): Use write_unsigned_number or 8534 write_signed_number as appropriate. 8535 (write_substitution): Adjust call to write_number. 8536 (write_type): Get the TYPE_MAIN_VARIANT before mangling it. 8537 (write_expression): Handle non-type template arguments of 8538 reference type correctly. 8539 (mangle_thunk): Use write_signed_number. 8540 85412000-06-09 Chip Salzenberg <chip@valinux.com> 8542 8543 * mangle.c (find_substition): Don't mangle objects with typename 8544 substitutions (e.g. "cin" as "Si"). 8545 85462000-06-09 Zack Weinberg <zack@wolery.cumb.org> 8547 8548 * call.c (add_candidate): Use ggc_alloc_cleared. 8549 * decl.c (lookup_label): Likewise. 8550 * lex.c (retrofit_lang_decl): Likewise. 8551 85522000-06-09 Jason Merrill <jason@casey.soma.redhat.com> 8553 8554 * semantics.c (expand_body): Push to TV_EXPAND. 8555 * optimize.c (optimize_function): Push to TV_INTEGRATION. 8556 * decl.c (start_function): Always call announce_function. 8557 8558 * tinfo2.cc: Just declare abort. 8559 85602000-06-09 Gabriel Dos Reis <gdr@codesourcery.com> 8561 8562 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @' 8563 whenever @ is a symbolic name. 8564 85652000-06-08 Jakub Jelinek <jakub@redhat.com> 8566 8567 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk. 8568 85692000-06-07 Mark Mitchell <mark@codesourcery.com> 8570 8571 * decl.c (pushdecl): Look up functions by DECL_NAME, not 8572 DECL_ASSEMBLER_NAME. 8573 85742000-06-06 Mark Mitchell <mark@codesourcery.com> 8575 8576 * decl2.c (c_language): Define. 8577 85782000-06-06 Gabriel Dos Reis <gdr@codesourcery.com> 8579 8580 * lex.c (lang_init_options): Tweak. 8581 8582 * decl2.c: Remove #inclusion of diagnostic.h 8583 (lang_decode_option): Move diagnostic formatting options to 8584 toplevel. 8585 8586 * lang-options.h: Remove documentation for diagnostic options. 8587 8588 * Makefile.in (lex.o): Depends upon diagnostic.h 8589 85902000-06-06 Mark Mitchell <mark@codesourcery.com> 8591 8592 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have 8593 the same DECL_RESULT, it's not a redefinition. 8594 * pt.c (tsubst_decl): Remove code to handle illegal 8595 specializations. 8596 85972000-06-06 Nathan Sidwell <nathan@codesourcery.com> 8598 8599 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c 8600 86012000-06-05 Jason Merrill <jason@casey.soma.redhat.com> 8602 8603 * search.c (maybe_suppress_debug_info): Don't check 8604 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set. 8605 8606 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION 8607 here if extern_p. 8608 8609 Remember instantiation context in deferred instantiations. 8610 * cp-tree.h (struct tinst_level): Remove. 8611 (TINST_DECL, TINST_LINE, TINST_FILE): New macros. 8612 * pt.c (current_tinst_level): Now a tree. 8613 (print_template_context, push_tinst_level, pop_tinst_level, 8614 tinst_for_decl): Adjust. 8615 (reopen_tinst_level): New fn. 8616 (init_pt): Register current_tinst_level as a root. 8617 (add_pending_template): Put current_tinst_level in TREE_PURPOSE 8618 of the pending templates list. 8619 (instantiate_pending_templates): Adjust. Call reopen_tinst_level. 8620 * lex.c (extract_interface_info): Adjust. 8621 * decl2.c (warn_if_unknown_interface): Adjust. 8622 86232000-06-05 Mark Mitchell <mark@codesourcery.com> 8624 8625 * class.c (indirect_primary_base_p): New function. 8626 (determine_primary_base): Use it. 8627 86282000-06-05 Nathan Sidwell <nathan@codesourcery.com> 8629 8630 Update new-abi dynamic cast algorithm. 8631 * tinfo.cc (__class_type_info::__dyncast_result): Add 8632 whole_details. Adjust constructor. 8633 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags. 8634 Avoid unnecessary searching. 8635 (__dynamic_cast): Adjust for __dyncast_result::whole_details. 8636 8637Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 8638 8639 * decl.c (init_decl_processing): Don't call record_component_aliases. 8640 * tree.c (build_cplus_array_type_1): Likewise. 8641 86422000-06-04 Mark Mitchell <mark@codesourcery.com> 8643 8644 * ir.texi: Correct typo. 8645 * mangle.c (write_expression): Handle non-type template arguments 8646 with reference type. 8647 * method.c (build_overload_value): Likewise. 8648 * pt.c (convert_nontype_argument): Explicitly represent conversion 8649 to a reference with an ADDR_EXPR. 8650 (unify): Always unify arguments in left-to-right order. 8651 86522000-06-03 Alex Samuel <samuel@codesourcery.com> 8653 Mark Mitchell <mark@codesourcery.com> 8654 8655 * Make-lang.in (CXX_SRCS): Add mangle.c. 8656 * Makefile.in (CXX_OBJS): Add mangle.o. 8657 (mangle.o): New rule. 8658 8659 * class.c (local_classes): New variable. 8660 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI. 8661 (get_vtt_name): Use mangle_vtt_name for new ABI. 8662 (init_class_processing): Initialize local_classes. 8663 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI. 8664 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER. 8665 (std_identifier): New macro. 8666 (DECL_VOLATILE_MEMFUNC_P): New macro. 8667 (DECL_NAMESPACE_STD_P): Likewise. 8668 (local_classes): Declare. 8669 (get_mostly_instantiated_function_type): Declare. 8670 (init_mangle): Declare. 8671 (mangle_decl): Likewise. 8672 (mangle_type_string): Likewise. 8673 (mangle_type): Likewise. 8674 (mangle_typeinfo_for_type): Likewise. 8675 (mangle_typeinfo_string_for_type): Likewise. 8676 (mangle_vtbl_for_type): Likewise. 8677 (mangle_vtt_for_type): Likewise. 8678 (mangle_ctor_vtbl_for_type): Likewise. 8679 (mangle_thunk): Likewise. 8680 (mangle_conv_op_name_for_type): Likewise. 8681 (mangle_guard_variable): Likewise. 8682 * decl.c (pushtag): Keep track of local classes. 8683 (initialize_predefined_identifiers): Initialize std_identifier. 8684 (init_decl_processing): Use std_identifier. 8685 (start_decl): Don't treat instantiations as specializations. 8686 (grokdeclarator): Likewise. 8687 (grokvardecl): Call mangle_decl for new ABI. Only set mangled 8688 name for fully-instantiated templates. 8689 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for 8690 destructors with the new ABI. 8691 (finish_static_data_member_decl): Use mangle_decl under the new ABI. 8692 (grokfield): Use mangle_type for new ABI. 8693 (grokoptypename): Use mangle_conv_op_for_type for new ABI. 8694 (get_sentry): Use mangle_guard_variable for new ABI. 8695 (start_static_initialization_or_destruction): Likewise. 8696 * expr.c (extract_aggr_init): Remove. 8697 (extract_scalar_init): Likewise. 8698 (extract_init): Remove #if 0'd code. 8699 * mangle.c: New function. 8700 * method.c (build_mangled_name): Assert not flag_new_abi. 8701 (build_static_name): Likewise. 8702 (build_decl_overload_real): Likewise. 8703 (build_typename_overload): Likewise. 8704 (build_overload_with_type): Likewise. 8705 (build_overload_name): Likewise. 8706 (get_ctor_vtbl_name): Likewise. 8707 (start_squangling): Likewise. 8708 (get_id_2): Likewise. 8709 (set_mangled_name_for_decl): Call mangle_decl for new ABI. 8710 (init_method): Call init_mangle for new ABI. 8711 (make_thunk): Call mangle_thunk for new ABI. 8712 * operators.def: Correct new ABI manglings for the `%' operator. 8713 Add `::' operator. 8714 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and 8715 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL. 8716 (lookup_template_class): Call mangle_decl for new ABI. 8717 (get_mostly_instantiated_function_type): New function. 8718 (set_mangled_name_for_template_decl): Use it. 8719 (tsubst_decl): Use set_mangled_name_for_decl for destructors with 8720 the new ABI. Use mangle_conv_op_name_for_type for instantiated 8721 conversion op names. 8722 * rtti.c (tinfo_name): Call mangle_type_string for new ABI. 8723 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI. 8724 (tinfo_base_init): Likewise. Mangle typeinfo string name with 8725 mangle_typeinfo_string_for_type. 8726 87272000-06-03 Mark Mitchell <mark@codesourcery.com> 8728 8729 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment. 8730 (INNERMOST_TEMPLATE_ARGS): New macro. 8731 (innermost_args): Remove. 8732 (get_innermost_template_args): New function. 8733 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS. 8734 * error.c (dump_function_decl): Be caution when using 8735 most_general_template. 8736 * method.c (build_template_parm_names): Use 8737 INNERMOST_TEMPLATE_ARGS. 8738 * pt.c (add_to_template_args): Tidy comment 8739 (get_innermost_template_args): New function. 8740 (check_explicit_specialization): Clear DECL_INITIAL for a new 8741 specialization. 8742 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS. 8743 Tidy. 8744 (push_template_decl): Always register specializations of the most 8745 general template. 8746 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS. 8747 (coerce_template_parms): Likewise. 8748 (lookup_template_class): Likewise. 8749 (innermost_args): Remove. 8750 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS. 8751 (tsubst_decl): Handle tricky specializations. Use 8752 get_innermost_template_args. 8753 (instantiate_template): Simplify handling of partial 8754 instantiations. 8755 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS. 8756 (most_general_template): Reimplement, in a more straightforward 8757 manner. 8758 (regenerate_decl_from_template): Tweak formatting. Use 8759 TMPL_ARGS_DEPTH for clarity. 8760 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS. 8761 8762 * dump.c (dequeue_and_dump): Dump information about thunks. 8763 87642000-06-01 Richard Henderson <rth@cygnus.com> 8765 8766 * decl.c (init_decl_processing): Set lang_get_alias_set first thing. 8767 87682000-06-01 Richard Henderson <rth@cygnus.com> 8769 8770 * decl2.c (unsupported_options): Fix typo, make const. 8771 (lang_decode_option): Fix bsearch argument order. 8772 87732000-06-01 Mark Mitchell <mark@codesourcery.com> 8774 8775 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE 8776 on FIELD_DECLs. 8777 8778Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 8779 8780 * cp-tree.h (c_get_alias_set): Deleted. 8781 * Makefile.in (decl.o): Include ../expr.h. 8782 * decl.c (expr.h): Include. 8783 (init_decl_processing): Call record_component_aliases for arrays. 8784 (grokdeclarator): Likewise. 8785 Set TREE_ADDRESSABLE for fields that aren't bitfields. 8786 * tree.c (build_cplus_array_type_1): Call record_component_aliases. 8787 87882000-05-31 Mark Mitchell <mark@codesourcery.com> 8789 8790 Remove guiding declaration support. 8791 * cp/cp-tree.h (flag_dump_translation_unit): Make it const. 8792 (flag_guiding_decls): Remove. 8793 * call.c (build_user_type_conversion_1): Remove support for 8794 guiding decls. 8795 (build_new_function_call): Likewise. 8796 (build_new_op): Likewise. 8797 (build_new_method_call): Likewise. 8798 * decl.c (start_function): Likewise. 8799 * friend.c (is_friend): Likewise. 8800 (do_friend): Likewise. 8801 * decl2.c ((flag_dump_translation_unit): Make it const. 8802 (flag_guiding_decls): Remove. 8803 (unsupported_options): New variable 8804 (compare_options): New function. 8805 (lang_decode_option): Use them. 8806 8807 * decl.c (build_cp_library_fn): Set DECL_CONTEXT. 8808 8809 * method.c (mangle_expression): Adjust test for legal expression 8810 operators. 8811 8812 * pt.c (instantiate_decl): Save and restore the local 8813 specializations list. 8814 88152000-05-30 Jason Merrill <jason@decepticon.cygnus.com> 8816 8817 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING. 8818 88192000-05-30 Mark Mitchell <mark@codesourcery.com> 8820 8821 * call.c (add_template_candidate_real): Handle member template 8822 constructors for classes with virtual bases. 8823 (build_user_type_conversion_1): Use in_charge_arg_for_name. 8824 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P. 8825 8826 * ir.texi: Update thunk documentation. 8827 8828 * call.c (joust): Fix handling of overloaded builtin operators. 8829 88302000-05-30 Zack Weinberg <zack@wolery.cumb.org> 8831 8832 * cp-tree.h (DECL_ANTICIPATED): New macro. 8833 Document new use of DECL_LANG_FLAG_7. 8834 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins 8835 in the user namespace. 8836 * lex.c (do_identifier): If the identifier's declaration has 8837 DECL_ANTICIPATED on, it has not yet been declared. But do not 8838 replace it with an ordinary implicit declaration. 8839 8840 * tinfo2.cc: Include stdlib.h. 8841 88422000-05-29 Mark Mitchell <mark@codesourcery.com> 8843 8844 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro. 8845 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not 8846 CLASSTYPE_ALIGN. 8847 88482000-05-28 Gabriel Dos Reis <gdr@codesourcery.com> 8849 8850 * decl2.c (lang_decode_option): Use skip_leading_substring instead 8851 of plain strncmp. 8852 88532000-05-28 Alexandre Oliva <aoliva@cygnus.com> 8854 8855 * operators.def (<?): Duplicated, should have been... 8856 (>?): this. Fixed. 8857 88582000-05-27 Alex Samuel <samuel@codesourcery.com> 8859 Mark Mitchell <mark@codesourcery.com> 8860 8861 * cp-tree.h (ansi_opname): Make it a macro. 8862 (ansi_assopname): Likewise. 8863 (struct lang_decl_flags): Add assignment_operator_p. 8864 (struct lang_decl): Add operator_code. 8865 (DECL_VTT_PARM): Adjust. 8866 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an 8867 overloaded operator. 8868 (SET_OVERLOADED_OPERATOR_CODE): New macro. 8869 (DECL_ASSIGNMENT_OPERATOR_P): New macro. 8870 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust. 8871 (opname_tab): Remove. 8872 (assignop_tab): Likewise. 8873 (operator_name_info_t): New type. 8874 (operator_name_info): New variable. 8875 (assignment_operator_name_info): Likewise. 8876 (build_cp_library_fn): Remove declaration. 8877 (push_cp_library_fn): Likewise. 8878 (operator_name_string): Likewise. 8879 (build_decl_overload): Likewise. 8880 * call.c (print_z_candidates): Simplify. 8881 (build_object_call): Adjust usage of ansi_opname. Use 8882 DECL_OVERLOADED_OPERATOR_P. 8883 (op_error): Adjust operator name lookup. 8884 (build_conditional_expr): Adjust usage of ansi_opname. 8885 (build_new_op): Likewise. 8886 (build_op_delete_call): Likewise. 8887 (build_over_call): Likewise. 8888 (joust): Use DECL_OVERLOADED_OPERATOR_P. 8889 * decl.c (duplicate_decls): Copy operator_code. 8890 (init_decl_processing): Adjust parameters to push_cp_library_fn. 8891 (builtin_function): Adjust parameters to build_library_fn_1. 8892 (build_library_fn_1): Accept an overloaded operator code. 8893 (build_library_fn): Pass ERROR_MARK. 8894 (build_cp_library_fn): Accept an overloaded operator code. 8895 (push_cp_library_fn): Likewise. 8896 (grokfndecl): Tweak. 8897 (grokdeclarator): Simplify code to compute names of overloaded 8898 operators. Adjust use of ansi_opname. 8899 (ambi_op_p): Work on tree_codes, not identifiers. 8900 (unary_op_p): Likewise. 8901 (grok_op_properties): Likewise. 8902 (start_function): Use DECL_OVERLOADED_OPERATOR_P. 8903 (lang_mark_tree): Don't try to mark the operator_code. 8904 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P. 8905 * error.c (dump_decl): Remove special handling for operator 8906 names. 8907 (dump_function_name): Likewise. 8908 (dump_expr): Adjust name lookup of operators. 8909 (op_to_string): Simplify. 8910 (assop_to_string): Likewise. 8911 * init.c (build_new_1): Adjust use of ansi_opname. 8912 * lex.c (opname_tab): Remove. 8913 (assignop_tab): Likewise. 8914 (ansi_opname): Likewise. 8915 (ansi_assopname): Likewise. 8916 (operator_name_string): Likewise. 8917 (reinit_lang_specific): Likewise. 8918 (operator_name_info): New variable. 8919 (assignment_operator_name_info): Likewise. 8920 (init_operators): New function. 8921 (init_parse): Use it. 8922 (do_identifier): Adjust use of ansi_opname. 8923 * method.c (mangle_expression): Don't use ansi_opname for 8924 mangling. 8925 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P. 8926 (build_decl_overload): Remove. 8927 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly. 8928 (do_build_assign_ref): Adjust use of ansi_opname. 8929 (synthesize_method): Likewise. 8930 (implicitly_declare_fn): Likewise. 8931 * operators.def: New file. 8932 * parse.y (operator): Adjust use of ansi_opname. 8933 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P. 8934 (set_mangled_name_for_template_decl): Don't play games with 8935 current_namespace. 8936 (special_function_p): Adjust use of ansi_opname. 8937 * typeck.c (check_return_expr): Likewise. 8938 * Make-lang.in (cc1plus): Depend on operators.def. 8939 * Makefile.in (lex.o): Likewise. 8940 (decl.o): Likewise. 8941 89422000-05-27 Zack Weinberg <zack@wolery.cumb.org> 8943 8944 * Make-lang.in (cplib2.ready): Eradicate. 8945 8946Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 8947 8948 * method.c (mangle_expression): Use TREE_CODE_LENGTH. 8949 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH. 8950 (built_min, cp_tree_equal): Likewise. 8951 89522000-05-26 Mark Mitchell <mark@codesourcery.com> 8953 8954 * class.c (layout_nonempty_base_or_field): Replace 8955 `record_layout_info' with `record_layout_info_s'. 8956 89572000-05-26 Jason Merrill <jason@casey.soma.redhat.com> 8958 8959 Fix goto checking. 8960 * cp-tree.h (struct language_function): x_named_labels is now 8961 a struct named_label_list*. 8962 * decl.c (struct named_label_use_list): Renamed from... 8963 (struct named_label_list): ...this. New struct. 8964 (push_binding_level): Don't set eh_region. 8965 (note_level_for_eh): New fn. 8966 (pop_label): Take label and old value directly. 8967 (pop_labels): Adjust for new named_labels format. 8968 (lookup_label): Likewise. 8969 (poplevel): Note characteristics of a binding level containing a 8970 named label. Mess with named label lists earlier. 8971 (mark_named_label_lists): New fn. 8972 (mark_lang_function): Call it. 8973 (use_label): New fn, split out from... 8974 (make_label_decl): ...here. Don't call it. 8975 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1, 8976 check_previous_gotos): New fns, split out from... 8977 (define_label): ...here. 8978 (check_switch_goto): New fn. 8979 (define_case_label): Call it. 8980 (check_goto): New fn. 8981 * semantics.c (finish_goto_stmt): Call it and use_label. 8982 (begin_compound_stmt): If we're a try block, call note_level_for_eh. 8983 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings. 8984 89852000-05-26 Mark Mitchell <mark@codesourcery.com> 8986 8987 * class.c (build_vtable_entry_ref): Correct usage of 8988 get_vtbl_decl_for_binfo. 8989 8990 * decl2.c (grokclassfn): Set DECL_LANGUAGE here. 8991 * method.c (implicitly_declare_fn): Not here. 8992 89932000-05-26 Nathan Sidwell <nathan@codesourcery.com> 8994 8995 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ... 8996 (CPTI_PTMD_DESC_TYPE): ... here. 8997 (ptmd_desc_type_node): Rename to ... 8998 (ptm_desc_type_node): ... here. 8999 * decl.c: Likewise. 9000 * rtti.c (ptmd_initializer): Rename to ... 9001 (ptm_initializer): ... here. 9002 (sythesize_tinfo_var): Adjust. Deal with pointer to member 9003 function. 9004 (create_tinfo_types): Adjust. 9005 90062000-05-25 Mark Mitchell <mark@codesourcery.com> 9007 9008 Finish implementation of VTTs. 9009 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and 9010 CPTI_VTT_PARM_IDENTIFIER. 9011 (vtt_parm_identifier): New macro. 9012 (vtt_parm_type): Likewise. 9013 (BINFO_SUBVTT_INDEX): Likewise. 9014 (BINFO_VPTR_INDEX): Likewise. 9015 (struct lang_decl): Add vtt_parm. 9016 (DECL_VTT_PARM): New macro. 9017 (DECL_USE_VTT_PARM): Likewise. 9018 (DECL_NEEDS_VTT_PARM_P): Likewise. 9019 (get_vtt_name): Declare. 9020 (build_artificial_parm): Likewise. 9021 (fixup_all_virtual_upcast_offsets): Likewise. 9022 (expand_indirect_vtbls_init): Remove. 9023 * call.c (build_new_method_call): Pass the vtt to subobject 9024 constructors and destructors. 9025 * class.c (get_vtt_name): Give it external linkage. 9026 (build_clone): Handle the magic VTT parameters for clones. 9027 (clone_function_decl): Fix typo in comment. 9028 (build_vtt): Keep track of the indices in the VTTs where various 9029 entities are stored. 9030 (build_vtt_inits): Likewise. 9031 (dfs_build_vtt_inits): Likewise. 9032 (build_ctor_vtbl_group): Tweak type of construction vtables. 9033 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even 9034 primary bases, when building construction vtables. 9035 * decl.c (duplicate_decls): Handle DECL_VTT_PARM. 9036 (initialize_predefined_identifiers): Add vtt_parm_identifier. 9037 (init_decl_processing): Initialize vtt_parm_type. 9038 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P. 9039 (lang_mark_tree): Make vtt_parm. 9040 * decl2.c (build_artificial_parm): New function. 9041 (maybe_retrofit_in_chrg): Use it. Add VTT parameters. 9042 (grokclassfn): Use build_artificial_parm. 9043 * init.c (initialize_vtbl_ptrs): Call 9044 fixup_all_virtual_upcast_offsets directly. 9045 (perform_member_init): Use the complete subobject destructor for 9046 member cleanups. 9047 (build_vtbl_address): New function. 9048 (expand_virtual_init): Handle VTTs. 9049 * optimize (maybe_clone_body): Likewise. 9050 * search.c (fixup_all_virtual_upcast_offsets): Give it external 9051 linkage. 9052 (expand_indirect_vtbls_init): Remove. 9053 * semantics.c (setup_vtbl_ptr): Fix typos in comment. 9054 * tree.c (make_binfo): Make them bigger. 9055 90562000-05-25 Nathan Sidwell <nathan@codesourcery.com> 9057 9058 * inc/cxxabi.h (__pbase_type_info): Define, based on 9059 __pointer_type_info. 9060 (__pointer_type_info): Derive from __pbase_type_info. Adjust. 9061 (__pointer_to_member_type_info): Likewise. 9062 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement. 9063 (__pointer_to_member_type_info::__is_pointer_p): Remove. 9064 (__pointer_type_info::__do_catch): Rename to ... 9065 (__pbase_type_info::__do_catch): ... here. Adjust. 9066 (__pbase_type_info::__pointer_catch): Implement. 9067 (__pointer_type_info::__pointer_catch): Adjust. 9068 (__pointer_to_member_type_info::__pointer_catch): Adjust. 9069 90702000-05-25 Nathan Sidwell <nathan@codesourcery.com> 9071 9072 * tinfo.h (__user_type_info::contained_virtual_p): New 9073 predicate. 9074 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond 9075 shaped hierarchy. 9076 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to 9077 diamond shaped hierarchy. Add early out for mixed diamond and 9078 duplicate shaped hierarchy. 9079 90802000-05-24 Mark Mitchell <mark@codesourcery.com> 9081 9082 * cp-tree.h (build_delete): Change prototype. 9083 (build_vec_delete): Likewise. 9084 * call.c (build_scoped_method_call): Use special_function_kind 9085 values to indicate the kind of destruction to be done. 9086 (build_method_call): Likewise. 9087 * decl.c (finish_destructor_body): Likewise. 9088 (maybe_build_cleanup_1): Likewise. Rename to ... 9089 (maybe_build_cleanup): ... this. 9090 * decl2.c (delete_sanity): Use special_function_kind 9091 values to indicate the kind of destruction to be done. 9092 (build_cleanup): Likewise. 9093 * init.c (perform_member_init): Likewise. 9094 (build_vec_delete_1): Likewise. 9095 (build_dtor_call): Simplify. 9096 (build_delete): Use special_function_kind 9097 values to indicate the kind of destruction to be done. 9098 (build_vbase_delete): Likewise. 9099 (build_vec_delete): Likewise. 9100 9101 * init.c (sort_member_init): Fix typo in error message generation 9102 code. 9103 9104Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com> 9105 9106 * semantics.c (begin_class_definition): make the packed 9107 attribute be sensitive to the "-fpack-struct" command line flag 9108 91092000-05-24 Nathan Sidwell <nathan@codesourcery.com> 9110 9111 Update new-abi upcast algorithm. 9112 * inc/cxxabi.h (__class_type_info::__do_upcast): Change 9113 prototype and meaning of return value. 9114 (__si_class_type_info::__do_upcast): Likewise. 9115 (__vmi_class_type_info::__do_upcast): Likewise. 9116 * tinfo.cc (__class_type_info::__upcast_result): Replace 9117 whole2dst with part2dst. Adjust ctor. 9118 (__class_type_info::__do_upcast): Adjust call of worker function. 9119 (__class_type_info::__do_upcast): Adjust. 9120 (__si_class_type_info::__do_upcast): Adjust. Use parent's 9121 __do_upcast. 9122 (__vmi_class_type_info::__do_upcast): Likewise. Fix private 9123 virtual base in diamond hierarchy bug. 9124 91252000-05-23 Mark Mitchell <mark@codesourcery.com> 9126 9127 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable 9128 and bitfield to tinfo_fn_p. 9129 (DECL_TINFO_FN_P): Adjust. 9130 (SET_DECL_TINFO_FN_P): Likewise. 9131 (DECL_MUTABLE_P): Likewise. 9132 (DECL_C_BIT_FIELD): Likewise. 9133 (SET_DECL_C_BIT_FIELD): Likewise. 9134 (CLEAR_DECL_C_BIT_FIELD): Likewise. 9135 (DECL_UNINLINABLE): Likewise. 9136 * class.c (alter_access): Call retrofit_lang_decl if ncessary. 9137 (handle_using_decl): Remove assertion. 9138 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl, 9139 to build FIELD_DECLs. 9140 (build_base_field): Likewise. 9141 (layout_class_type): Likewise. 9142 * decl.c (init_decl_processing): Likewise. 9143 (build_ptrmemfunc_type): Likewise. 9144 (grokdeclarator): Likewise. 9145 * decl2.c (grok_x_components): Likewise. 9146 * except.c (call_eh_info): Likewise. 9147 * init.c (init_init_processing): Likewise. 9148 * rtti.c (expand_class_desc): Likewise. 9149 (create_pseudo_type_info): Likewise. 9150 (get_vmi_pseudo_type_info): Likewise. 9151 (create_tinfo_types): Likewise. 9152 * ptree.c (print_lang_decl): Adjust. 9153 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC 9154 before checking DECL_MUTABLE_P. 9155 9156 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge 9157 parameters for template functions. 9158 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for 9159 destructors as well as constructors. 9160 91612000-05-22 Mark Mitchell <mark@codesourcery.com> 9162 9163 * class.c (build_ctor_vtbl_group): Set inits. 9164 * optimize.c (maybe_clone_body): Set DECL_INLINE and 9165 DECL_THIS_INLINE appropriately for clones. 9166 9167 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp. 9168 (DECL_CONV_FN_P): Simplify. 9169 (DECL_OPERATOR): Remove. 9170 (language_to_string): Declare. 9171 * decl.c (duplicate_decls): Fix typo in comment. 9172 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P. 9173 (grok_op_properties): Use DECL_CONV_FN_P instead of 9174 IDENTIFIER_TYPENAME_P. 9175 * dump.c (dequeue_and_dump): Dump the language linkage of 9176 declarations. 9177 * error.c (language_to_string): Give it external linkage. 9178 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P. 9179 (implicitly_declare_fn): Set DECL_LANGUAGE. 9180 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not 9181 IDENTIFIER_TYPENAME_P. 9182 (tsubst_decl): Likewise. 9183 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P. 9184 * semantics.c (finish_member_declaration): Don't mark members of 9185 classes declared in an extern "C" region as extern "C". 9186 91872000-05-22 Martin v. L�wis <loewis@informatik.hu-berlin.de> 9188 9189 * decl2.c (qualified_lookup_using_namespace): Look through 9190 namespace aliases. 9191 9192 * decl.c (push_using_decl): Return the old decl on namespace level. 9193 91942000-05-21 Mark Mitchell <mark@codesourcery.com> 9195 9196 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks. 9197 (VTT_NAME_PREFIX): New macro. 9198 (CTOR_VTBL_NAME_PREFIX): Likewise. 9199 (get_ctor_vtbl_name): New function. 9200 * class.c (get_vtable_name): Simplify. 9201 (get_vtt_name): New function. 9202 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE. 9203 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list 9204 when a virtual base becomes primary. 9205 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build 9206 VTTs. 9207 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in 9208 additional parameters. 9209 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED. 9210 (initialize_array): New function. 9211 (build_vtt): Likewise. 9212 (build_vtt_inits): Likewise. 9213 (dfs_build_vtt_inits): Likewise. 9214 (dfs_fixup_binfo_vtbls): Likewise. 9215 (build_ctor_vtbl_group): Likewise. 9216 (initialize_vtable): Use initialize_array. 9217 (accumulate_vtbl_inits): Reimplement to handle construction 9218 vtables. 9219 (dfs_accumulate_vtbl_inits): Likewise. 9220 (bulid_vtbl_initializer): Adjust parameter name. 9221 * method.c (build_typename_overload): Remove #if 0'd code. 9222 (get_ctor_vtbl_name): New function. 9223 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES. 9224 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo. 9225 9226 * cp-tree.h (struct lang_type): Remove search_slot. 9227 (CLASSTYPE_SEARCH_SLOT): Remove. 9228 (emit_base_init): Change prototype. 9229 (initialize_vtbl_ptrs): Likewise. 9230 (expand_indirect_vtbls_init): Likewise. 9231 (clear_search_slots): Remove. 9232 * decl.c (lang_mark_tree): Don't mark search_slot. 9233 * init.c (initialize_vtbl_ptrs): Simplify. 9234 (emit_base_init): Likewise. 9235 * search.c (struct vbase_info): Document decl_ptr. 9236 (convert_pointer_to_single_level): Remove. 9237 (dfs_find_vbases): Remove. 9238 (dfs_init_base_pointers): Simplify. 9239 (dfs_clear_vbase_slots): Remove. 9240 (dfs_vtable_path_unmark): New function. 9241 (init_vbase_pointers): Simplify. 9242 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT. 9243 (expand_indirect_vtbls_init): Simplify. Don't call 9244 mark_all_temps_used. 9245 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and 9246 initialize_vtbl_ptrs. 9247 92482000-05-20 Zack Weinberg <zack@wolery.cumb.org> 9249 9250 * except.c: Add static prototypes. 9251 92522000-05-20 H.J. Lu <hjl@gnu.org> 9253 9254 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext). 9255 92562000-05-19 Mark Mitchell <mark@codesourcery.com> 9257 9258 Don't create a separate copy of virtual bases for the 9259 CLASSTYPE_VBASECLASSES list. 9260 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation. 9261 (BINFO_FOR_VBASE): Remove. 9262 (CANONICAL_BINFO): Adjust. 9263 (binfo_for_vbase): New function. 9264 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase 9265 instead of BINFO_FOR_VBASE. 9266 (build_vbase_pointer): Likewise. 9267 (build_secondary_vtable): Likewise. 9268 (dfs_mark_primary_bases): Likewise. 9269 (mark_primary_bases): Likewise. 9270 (layout_nonempty_base_or_field): Likewise. 9271 (dfs_set_offset_for_shared_vbases): Likewise. 9272 (dfs_set_offset_for_unshared_vbases): Likewise. 9273 (layout_virtual_bases): Likewise. Adjust for changes to the 9274 CLASSTYPE_VBASECLASSES list. 9275 (dump_class_hierarchy_r): Use binfo_for_vbase 9276 instead of BINFO_FOR_VBASE. 9277 (dump_class_hierarchy): Likewise. 9278 (finish_vtbls): Likewise. 9279 (build_vtbl_initializer): Adjust for changes to the 9280 CLASSTYPE_VBASECLASSES list. 9281 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase. 9282 * decl.c (finish_destructor_body): Adjust for changes to the 9283 CLASSTYPE_VBASECLASSES list. 9284 * init.c (sort_base_init): Use binfo_for_vbase. 9285 (construct_virtual_bases): Adjust for changes to the 9286 CLASSTYPE_VBASECLASSES list. 9287 (expand_member_init): Use binfo_for_vbase. 9288 (build_vbase_delete): Adjust for changes to the 9289 CLASSTYPE_VBASECLASSES list. 9290 * method.c (do_build_copy_constructor): Likewise. 9291 * rtti.c (get_base_offset): Use binfo_for_vbase. 9292 (expand_class_desc): Remove #if 0'd code. 9293 * search.c (struct vbase_info): Remove vbase_types. 9294 (get_base_distance): Use binfo_for_vbase. 9295 (lookup_field_queue_p): Use CANONICAL_BINFO. 9296 (get_shared_vbase_if_not_primary): Use binfo_for_vbase. 9297 (get_pure_virtuals): Adjust for changes to the 9298 CLASSTYPE_VBASECLASSES list. 9299 (dfs_find_vbases): Use binfo_for_vbase. 9300 (dfs_init_vbase_pointers): Likewise. 9301 (init_vbase_pointers): Don't initialize vi.vbase_types. 9302 (virtual_context): Use binfo_for_vbase. 9303 (fixup_all_virtual_upcast_offsets): Adjust for changes to the 9304 CLASSTYPE_VBASECLASSES list. 9305 (expand_indirect_vtbls_init): Simplify. 9306 (dfs_get_vbase_types): Don't replicate virtual bases. 9307 (find_vbase_instance): Use binfo_for_vbase. 9308 (binfo_for_vbase): New function. 9309 * typeck.c (get_delta_difference): Use binfo_for_vbase. 9310 93112000-05-17 Mark Mitchell <mark@codesourcery.com> 9312 9313 * decl2.c (finish_anon_union): Generalize error messages to handle 9314 anonymous structures. 9315 * init.c (perform_member_init): Remove `name' parameter. 9316 (build_field_list): New function. 9317 (sort_member_init): Handle anonymous union initialization order 9318 correctly. Check for multiple initializations of the same union. 9319 (emit_base_init): Don't look up fields by name here. 9320 (expand_member_init): Record the result of name lookup for future 9321 reference. 9322 * typeck.c (build_component_ref): Fix formatting. 9323 9324Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com> 9325 9326 * decl.c (pop_label): Replace warn_unused with warn_unused_label. 9327 * typeck.c (build_x_compound_expr): Replace warn_unused with 9328 warn_unused_value. 9329 9330 * decl2.c (lang_decode_option): Update -Wall unused flags by 9331 calling set_Wunused. 9332 93332000-05-16 Mark Mitchell <mark@codesourcery.com> 9334 9335 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation. 9336 * init.c (dfs_vtable_path_unmark): Remove. 9337 * search.c (marked_new_vtable_p): Likewise. 9338 (unmarked_new_vtable_p): Likewise. 9339 (dfs_search_slot_nonempty_p): Likewise. 9340 (dfs_mark): Likewise. 9341 (dfs_vtable_path_unmark): Likewise. 9342 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED. 9343 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED. 9344 (dfs_init_vbase_pointers): Remove special-case new ABI code. 9345 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED. 9346 (init_vbase_pointers): Simplify. 9347 (expand_indirect_vtbls_init): Likewise. 9348 9349 * class.c (copy_virtuals): New function. 9350 (build_primary_table): Use it. 9351 (build_secondary_vtable): Likewise. 9352 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to 9353 indicate that no vcall offset is required. 9354 (add_virtual_function): Likewise. 9355 (modify_all_vtables): Likewise. 9356 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer. 9357 (dfs_accumulate_vtbl_inits): Likewise. 9358 (build_vtbl_initializer): Make changes to handle construction 9359 vtables. 9360 (dfs_build_vcall_offset_vtbl_entries): Likewise. 9361 (build_rtti_vtbl_entries): Likewise. 9362 (build_vtable_entries): Handle a NULL vcall_index. 9363 93642000-05-15 Gabriel Dos Reis <gdr@codesourcery.com> 9365 9366 * decl2.c (lang_decode_option): Fix thinko. 9367 93682000-05-14 Jason Merrill <jason@casey.cygnus.com> 9369 9370 * except.c (check_handlers): New fn. 9371 * cp-tree.h: Declare it. 9372 * semantics.c (finish_handler_sequence): Call it. 9373 (finish_function_handler_sequence): Likewise. 9374 (finish_handler_parms): Set TREE_TYPE on the handler. 9375 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro. 9376 * search.c (get_base_distance_recursive): If protect>1, ignore 9377 special access. 9378 (get_base_distance): Don't reduce watch_access. 9379 93802000-05-13 Gabriel Dos Reis <gdr@codesourcery.com> 9381 9382 * lex.c: #include diagnostic.h. 9383 (lang_init_options): Set default prefixing rules. 9384 9385 * lang-options.h: Add -fdiagnostics-show-location=. 9386 9387 * decl2.c: #include diagnostic.h. 9388 (lang_decode_option): Handle -fdiagnostics-show-location=. 9389 93902000-05-12 Nathan Sidwell <nathan@codesourcery.com> 9391 9392 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes. 9393 * vec.cc: Revert my 2000-05-07 change. 9394 93952000-05-11 Jason Merrill <jason@casey.cygnus.com> 9396 9397 * class.c (check_field_decls): Complain about non-static data 9398 members with same name as class in class with constructor. 9399 94002000-05-10 Jason Merrill <jason@casey.cygnus.com> 9401 9402 * decl.c (grokdeclarator): Allow non-static data members with 9403 same name as class. 9404 94052000-05-09 Zack Weinberg <zack@wolery.cumb.org> 9406 9407 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file, 9408 and pending_inline.filename. Update prototypes. 9409 * decl.c (define_label): Constify filename parameter. 9410 * decl2.c (warn_if_unknown_interface): Constify local char *. 9411 * input.c Constify input_source.filename. Don't declare 9412 input_filename or lineno. Constify filename parameter to feed_input. 9413 * lex.c (init_parse): Constify parameter and return value. 9414 (cp_pragma_interface, cp_pragma_implementation): Constify 9415 filename argument. 9416 (reinit_parse_for_method, reinit_parse_for_block, 9417 reinit_parse_for_expr, feed_defarg, handle_cp_pragma): 9418 Constify local char *. 9419 * pt.c: Don't declare lineno or input_filename. 9420 (print_template_context, tsubst_friend_function, tsubst_decl, 9421 tsubst, instantiate_decl): Constify local char *. 9422 * semantics.c (expand_body): Constify local char *. 9423 * tree.c (build_srcloc): Constify filename parameter. 9424 * typeck.c (c_expand_asm_operands): Constify filename 9425 parameter. 9426 94272000-05-08 Nathan Sidwell <nathan@codesourcery.com> 9428 9429 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix 9430 offsetof expansion. 9431 94322000-05-08 Branko Cibej <branko.cibej@hermes.si> 9433 9434 * inc/cxxabi.h: Fix typos in comment. 9435 (__base_class_info::__offset): Use a static_cast. 9436 94372000-05-07 Nathan Sidwell <nathan@codesourcery.com> 9438 9439 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place 9440 of std::size_t and std::ptrdiff_t respectively. 9441 * tinfo.cc: Likewise. 9442 * vec.cc: Likewise. 9443 94442000-05-06 Richard Henderson <rth@cygnus.com> 9445 9446 * typeck.c (build_c_cast): Don't warn integer->pointer size 9447 mismatch for constants. 9448 94492000-05-06 Nathan Sidwell <nathan@codesourcery.com> 9450 9451 * rtti.c (ptmd_initializer): Set non-public, if class is 9452 incomplete. 9453 9454 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++". 9455 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, 9456 __cxa_vec_delete): Likewise. 9457 * tinfo.cc (__dynamic_cast): Likewise. 9458 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, 9459 __cxa_vec_delete): Likewise. 9460 94612000-05-04 Mark Mitchell <mark@codesourcery.com> 9462 9463 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove. 9464 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise. 9465 (lang_decl_flags): Add vcall_offset. 9466 (THUNK_VCALL_OFFSET): Use it. 9467 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk. 9468 * method.c (make_thunk): Create the lang_decl here, not in 9469 emit_thunk. 9470 (emit_thunk): Make generic thunks into ordinary functions once 9471 they have been fed to expand_body. 9472 * semantics.c (expand_body): Set current_function_is_thunk here. 9473 94742000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 9475 9476 * class.c (update_vtable_entry_for_fn): Prototype. 9477 9478 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl' 9479 and `tmpl'. 9480 9481 * search.c (dfs_build_inheritance_graph_order): Prototype. 9482 94832000-05-04 Mark Mitchell <mark@codesourcery.com> 9484 9485 * cp-tree.h (special_function_kind): Add various kinds of 9486 destructors. 9487 (special_function_p): New function. 9488 * class.c (overrides): Don't let one kind of destructor override 9489 another. 9490 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding 9491 whether or not to instantiate a template. 9492 * tree.c (special_function_p): Define. 9493 94942000-05-03 Mark Mitchell <mark@codesourcery.com> 9495 9496 * cp-tree.def (THUNK_DECL): Remove. 9497 * cp-tree.h (DECL_THUNK_P): New macro. 9498 (DECL_NON_THUNK_FUNCTION_P): Likewise. 9499 (DECL_EXTERN_C_FUNCTION_P): Likewise. 9500 (SET_DECL_THUNK_P): Likewise. 9501 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P. 9502 (FNADDR_FROM_VTABLE_ENTRY): Likewise. 9503 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P. 9504 * decl.c (decls_match): Use DECL_EXTERN_C_P. 9505 (duplicate_decls): Likewise. 9506 (pushdecl): Likewise. Adjust thunk handling. 9507 (grokfndecl): Use DECL_EXTERN_C_P. 9508 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P. 9509 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling. 9510 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P. 9511 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling. 9512 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set 9513 DECL_NO_STATIC_CHAIN. 9514 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't 9515 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk. 9516 * search.c (covariant_return_p): Remove THUNK_DECL handling. 9517 * ir.texi: Update. 9518 95192000-05-01 Jason Merrill <jason@casey.cygnus.com> 9520 9521 * tree.c (walk_tree): Set lineno. 9522 95232000-05-01 Mark Mitchell <mark@codesourcery.com> 9524 9525 * exception.cc: Update license notice. 9526 * new.cc: Likewise. 9527 * new1.cc: Likewise. 9528 * new2.cc: Likewise. 9529 * tinfo.cc: Likewise. 9530 * tinfo2.cc: Likewise. 9531 * vec.cc: Likewise. 9532 * inc/cxxabi.h: Likewise. 9533 * inc/exception: Likewise. 9534 * inc/new: Likewise. 9535 * inc/new.h: Likewise. 9536 * inc/typeinfo: Likewise. 9537 95382000-05-01 Jason Merrill <jason@casey.cygnus.com> 9539 9540 * tree.c (build_target_expr_with_type): If we already have a 9541 TARGET_EXPR, just return it. 9542 9543 * optimize.c (initialize_inlined_parameters): Don't generate an 9544 EXPR_STMT if we can just use DECL_INITIAL. 9545 * decl.c (emit_local_var): Only make the initialization a 9546 full-expression if stmts_are_full_exprs_p. 9547 95482000-05-01 Mark Mitchell <mark@codesourcery.com> 9549 9550 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New 9551 macro. 9552 * call.c (standard_conversion): Use it. 9553 (direct_reference_binding): Likewise. 9554 (build_over_call): Likewise. 9555 (is_properly_derived_from): Likewise. 9556 (compare_ics): Likewise. 9557 * class.c (resolves_to_fixed_type_p): Likewise. 9558 * optimize.c (declare_return_variable): Likewise. 9559 * pt.c (is_specialization_of): Likewise. 9560 (unify): Likewise. 9561 * typeck.c (comp_target_parms): Likeiwse. 9562 (build_static_cast): Likewise. 9563 (build_reinterpret_cast): Likewise. 9564 (build_const_cast): Likewise. 9565 (comp_ptr_ttypes_real): Likewise. 9566 (comp_ptr_ttypes_const): Likewise. 9567 * typeck2.c (process_init_constructor): Likewise. 9568 95692000-04-30 Scott Snyder <snyder@fnal.gov> 9570 9571 * decl.c (finish_destructor_body): Use the base destructor when 9572 destroying virtual bases. 9573 95742000-04-30 Mark Mitchell <mark@codesourcery.com> 9575 9576 * expr.c (cplus_expand_expr): Preserve temporaries when expanding 9577 STMT_EXPRs. 9578 * optimize.c (struct inline_data): Add target_exprs field. 9579 (declare_return_variable): When a function returns an aggregate, 9580 use the variable declared in the TARGET_EXPR as the remapped 9581 DECL_RESULT. 9582 (expand_call_inline): Update the pending target_exprs stack. 9583 (optimize_function): Initialize the stack. 9584 9585 * decl2.c (finish_file): Fix typo in comment. 9586 9587 * method.c (emit_thunk): Don't try to return a `void' value. 9588 9589 * optimize.c (initialize_inlined_parameters): If the parameter is 9590 addressable, we need to make a new VAR_DECL, even if the 9591 initializer is constant. 9592 95932000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro> 9594 9595 * decl.c (grok_op_properties): Add an extra check of argtypes. 9596 95972000-04-27 Mark Mitchell <mark@codesourcery.com> 9598 9599 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying 9600 variables. 9601 (initialize_inlined_parameters): Try to avoid creating new 9602 VAR_DECLs. 9603 96042000-04-27 Alex Samuel <samuel@codesourcery.com> 9605 9606 * lex.c (my_get_run_time): Remove. 9607 (init_filename_times): Use get_run_time instead of my_get_run_time. 9608 (check_newline): Likewise. 9609 (dump_time_statistics): Likewise. 9610 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead 9611 of computing elapsed time explicitly. 9612 96132000-04-26 Mark Mitchell <mark@codesourcery.com> 9614 9615 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P. 9616 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P. 9617 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P 9618 before calling decl_constant_value. 9619 * class.c (check_bitfield_decl): Likewise. 9620 * cvt.c (ocp_convert): Likewise. 9621 (convert): Likewise. 9622 * decl.c (compute_array_index_type): Likewise. 9623 (build_enumerator): Likewise. 9624 * decl2.c (check_cp_case_value): Likewise. 9625 * pt.c (convert_nontype_argument): Likewise. 9626 (tsubst): Likewise. 9627 * typeck.c (decay_conversion): Likewise. 9628 (build_compound_expr): Likewise. 9629 (build_reinterpret_cast): Likewise. 9630 (build_c_cast): Likewise. 9631 (convert_for_assignment): Likewise. 9632 96332000-04-26 Jason Merrill <jason@casey.cygnus.com> 9634 9635 * decl.c (finish_function): Don't play games with DECL_INLINE. 9636 96372000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr> 9638 9639 * ir.texi: Correct typo. 9640 96412000-04-25 Martin v. L�wis <loewis@informatik.hu-berlin.de> 9642 9643 * decl.c (grokdeclarator): Reject VLAs as members. 9644 96452000-04-24 Gabriel Dos Reis <gdr@codesourcery.com> 9646 9647 * call.c (standard_conversion): Accept conversion between 9648 COMPLEX_TYPEs. 9649 9650 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE. 9651 96522000-04-24 Zack Weinberg <zack@wolery.cumb.org> 9653 9654 * decl2.c (finish_file): Remove double setup for accounting 9655 compile time. 9656 96572000-04-24 Robert Lipe <robertlipe@usa.net> 9658 9659 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD. 9660 96612000-04-23 Benjamin Kosnik <bkoz@cygnus.com> 9662 9663 * new.cc (set_new_handler): Needs to be in std::. 9664 96652000-04-23 Mark Mitchell <mark@codesourcery.com> 9666 9667 * cp-tree.h (lang_decl): Remove pretty_function_p. 9668 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the 9669 language-specific node. 9670 * decl.c (cp_make_fname_decl): Use build_decl, not 9671 build_lang_decl, to build the variables. 9672 (grokvardecl): Don't call build_lang_decl for local variables in 9673 templates. 9674 (grokdeclarator): Don't call build_lang_decl for local type 9675 declarations in templates. 9676 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated 9677 zero'd memory, rather than calling memset. 9678 * pt.c: Include hashtab.h. 9679 (local_specializations): New variable. 9680 (retrieve_local_specialization): Use it. 9681 (register_local_specialization): Likewise. 9682 (tsubst_decl): Don't assume local variables have 9683 DECL_LANG_SPECIFIC. 9684 (instantiate_decl): Set up local_specializations. 9685 * Makefile.in (HTAB_H): New variable. 9686 96872000-04-23 Richard Henderson <rth@cygnus.com> 9688 9689 * typeck.c (c_expand_asm_operands): Restore the original 9690 contents of the output list. 9691 96922000-04-22 Gabriel Dos Reis <gdr@codesourcery.com> 9693 9694 * ir.texi: Document complex number representation. 9695 96962000-04-20 Nathan Sidwell <nathan@codesourcery.com> 9697 9698 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi. 9699 (target_incomplete_p): New function. 9700 (tinfo_base_init): Create comdat NTBS name variable. 9701 (ptr_initializer): Add non_public parameter. Calculate it. 9702 (ptmd_initializer): Likewise. 9703 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo. 9704 (create_real_tinfo_var): Add non_public parameter. Use it. 9705 Push proxy into global namespace. 9706 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask): 9707 New enumeration. 9708 * inc/typeinfo (type_info::before, type_info::operator==): 9709 Compare __name addresses. 9710 9711 * tinfo2.cc: Remove new-abi builtins comment. 9712 97132000-04-20 Jason Merrill <jason@casey.cygnus.com> 9714 9715 * typeck.c (build_x_function_call): Resolve an OFFSET_REF. 9716 9717 * call.c (joust): Exit early if we get the same function, too. 9718 9719 * decl2.c (key_method): Return NULL_TREE for template classes. 9720 (import_export_class): Don't need to check for template classes. 9721 97222000-04-18 Zack Weinberg <zack@wolery.cumb.org> 9723 9724 * lex.c: Remove references to cccp.c. 9725 97262000-04-18 Mark Mitchell <mark@codesourcery.com> 9727 9728 * cp-tree.h (lang_decl_flags): Remove const_memfunc and 9729 volatile_memfunc. Add destructor_attr. Adjust dummy. 9730 (DECL_DESTRUCTOR_P): Use destructor_attr. 9731 (DECL_CONST_MEMFUNC_P): Reimplement. 9732 (DECL_VOLATILE_MEMFUNC_P): Remove. 9733 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS. 9734 (overrides): Use DECL_DESTRUCTOR_P. 9735 (check_for_override): Likewise. 9736 * decl.c (start_function): Likewise. 9737 * decl2.c (grokfclassfn): Likewise. 9738 (check_classfn): Likewise. 9739 (grok_function_init): Likewise. 9740 97412000-04-17 Mark Mitchell <mark@codesourcery.com> 9742 9743 * decl2.c (grokfield): Issue error on illegal data member 9744 declaration. 9745 9746Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com> 9747 9748 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL. 9749 97502000-04-16 Mark Mitchell <mark@codesourcery.com> 9751 9752 * class.c (build_vtable_entry): Don't build thunks for type-info 9753 functions. 9754 97552000-04-16 Jason Merrill <jason@casey.cygnus.com> 9756 9757 * decl.c (decls_match): Allow a redeclaration of a builtin to 9758 specify args while the builtin did not. 9759 97602000-04-15 Mark Mitchell <mark@codesourcery.com> 9761 9762 * cp-tree.def (THUNK_DECL): Add to documentation. 9763 * cp-tree.h (flag_huge_objects): Declare. 9764 * class.c (modify_vtable_entry): Tidy. 9765 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables. 9766 Calculate delta appropriately for the new ABI. 9767 (dfs_modify_vtables): Use it. 9768 (modify_all_vtables): Fix thinko in code to add overriding copies 9769 of functions to primary vtables. 9770 (build_clone): Fix typo in comment. 9771 (clone_function_decl): Correct order of destructors in vtable. 9772 (build_vbase_offset_vtbl_entries): Adjust comment. 9773 (dfs_vcall_offset_queue_p): Remove. 9774 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX. 9775 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases. 9776 (build_vtable_entry): Correct check for pure virtual functions. 9777 Don't declare flag_huge_objects. 9778 * decl.c (flag_huge_objects): Remove declaration. 9779 * method.c (make_thunk): Tweak mangling for vcall offset thunks. 9780 Use int_size_in_bytes. 9781 (emit_thunk): Handle vcall offset thunks. 9782 9783Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 9784 9785 * decl2.c (parse_time, varconst_time): Delete declarations. 9786 (finish_file): Delete LINENO declaration. 9787 START_TIME and THIS_TIME now long. 9788 97892000-04-13 Nathan Sidwell <nathan@codesourcery.com> 9790 9791 * class.c (build_base_field): Reformat comment. 9792 9793 * inc/cxxabi.h (stddef.h): Comment inclusion. 9794 (__base_class_info::__offset): Comment shift. 9795 97962000-04-12 Mark Mitchell <mark@codesourcery.com> 9797 9798 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro. 9799 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER. 9800 (cp_push_exception_identifier): New macro. 9801 (DECL_COMPLETE_DESTRUCTOR_P): New macro. 9802 (DECL_BASE_DESTRUCTOR_P): Likewise. 9803 (DECL_DELETING_DESTRUCTOR_P): Likewise. 9804 (get_vtbl_decl_for_binfo): Fix formatting. 9805 (in_charge_arg_for_name): New macro. 9806 (maybe_build_cleanup_and_delete): Remove declaration. 9807 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P. 9808 (in_charge_arg_for_name): New function. 9809 (build_new_method_call): Use it. Handle cloned destructors. 9810 (build_clone): Don't make the base constructor virtual. 9811 Automatically defer generated functions. 9812 (clone_function_decl): Handle destructors, too. 9813 (clone_constructors_and_destructors): Likewise. 9814 (create_vtable_ptr): Don't create a vtable entry for a cloned 9815 function. 9816 * decl.c (predefined_identifier): Add ctor_or_dtor_p. 9817 (initialize_predefined_identifiers): Update appropriately. 9818 (finish_destructor_body): Simplify. 9819 (maybe_build_cleanup_and_delete): Remove. 9820 * except.c (expand_throw): Handle new-ABI destructors. 9821 * init.c (expand_cleanup_for_base): Use base_dtor_identifier. 9822 (build_dtor_call): New function. 9823 (build_delete): Use it. Simplify. 9824 * optimize.c (maybe_clone_body): Handle destructors. 9825 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P. 9826 9827 * exception.cc (cleanup_fn): New typedef. 9828 (CALL_CLEANUP): New macro. 9829 (cp_eh_info): Use them. 9830 (__cp_push_exception): Likewise. 9831 (__cp_pop_exception): Likewise. 9832 98332000-04-11 Mark Mitchell <mark@codesourcery.com> 9834 9835 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER. 9836 (complete_dtor_identifier): New macro. 9837 (CLASSTYPE_FIRST_CONVERSION): Remove. 9838 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro. 9839 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise. 9840 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise. 9841 (CLASSTYPE_CONSTRUCTORS): Likewise. 9842 (CLASSTYPE_DESTRUCTORS): Likewise. 9843 (lang_decl): Add cloned_function. 9844 (DECL_COMPLETE_CONSTRUCTOR_P): New macro. 9845 (DECL_BASE_CONSTRUCTOR_P): Likewise. 9846 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise. 9847 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise. 9848 (DECL_CLONED_FUNCTION_P): Likewise. 9849 (DECL_CLONED_FUNCTION): Likewise. 9850 (clone_function_decl): Declare. 9851 (maybe_clone_body): Likewise. 9852 * call.c (build_user_type_conversion_1): Call complete object 9853 constructors in the new ABI. 9854 (build_new_method_call): Don't add in-charge parameters under the 9855 new ABI. 9856 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P, 9857 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and 9858 CLASSTYPE_DESTRUCTOR_SLOT. 9859 (build_clone): New function. 9860 (clone_function_decl): Likewise. 9861 (clone_constructors_and_destructors): Likewise. 9862 (check_bases_and_members): Use it. 9863 * decl.c (iniitialize_predefined_identifiers): Initialize 9864 complete_dtor_identifier. 9865 (finish_function): Don't add extra code to a clone. 9866 (lang_mark_tree): Mark cloned_function. 9867 * decl2.c (mark_used): Don't bother trying to instantiate things 9868 we synthesized. 9869 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice. 9870 * method.c (set_mangled_name_for_decl): Don't treat clones as 9871 constructors. 9872 (synthesize_method): Sythesize cloned functions, not the clones. 9873 * optimize.c (inline_data): Update comment on ret_label. 9874 (remap_block): Don't assume DECL_INITIAL exists. 9875 (copy_body_r): Allow ret_label to be NULL. 9876 (maybe_clone_body): Define. 9877 * pt.c (tsubst_decl): Handle clones. 9878 (instantiate_clone): New function. 9879 (instantiate_template): Use it. 9880 (set_mangled_name_for_template_decl): Don't treat clones as 9881 constructors. 9882 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT, 9883 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT. 9884 * semantics.c (expand_body): Clone function bodies as necessary. 9885 9886 * optimize.c (remap_decl): Avoid sharing structure for arrays 9887 whose size is only known at run-time. 9888 * tree.c (copy_tree_r): Don't copy PARM_DECLs. 9889 9890 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr 9891 to has_in_charge_parm_p. 9892 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ... 9893 (DECL_HAS_IN_CHARGE_PARM_P): ... this. 9894 (DECL_COPY_CONSTRUCTOR_P): New macro. 9895 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P. 9896 (build_user_type_conversion_1): Likewise. 9897 (convert_like_real): Likewise. 9898 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P. 9899 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P. 9900 (copy_args_p): Likewise. 9901 (grok_ctor_properties): Likewise. 9902 (start_function): Likewise. 9903 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it. 9904 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P. 9905 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P. 9906 * method.c (do_build_copy_constructor): Use 9907 DECL_HAS_IN_CHARGE_PARM_P. 9908 (synthesize_method): Likewise. 9909 * pt.c (instantiate_template): Remove goto. 9910 * tree.c (build_cplus_method_type): Remove mention of obstacks in 9911 comment. 9912 9913 * cp-tre.h (finish_function): Change prototype. 9914 * decl.c (end_cleanup_fn): Adjust caller. 9915 (finish_function): Take only one parameter. 9916 * decl2.c (finish_objects): Adjust caller. 9917 (finish_static_storage_duration_function): Likewise. 9918 * method.c (emit_thunk): Likewise. 9919 * parse.y: Likewise. 9920 * parse.c: Regenerated. 9921 * pt.c (instantiate_decl): Likewise. 9922 * rtti.c (synthesize_tinfo_fn): Likewise. 9923 * semantics.c (expand_body): Likewise. 9924 9925 * cp-tree.h (copy_decl): New function. 9926 * class.c (finish_struct_1): Use it. 9927 * lex.c (copy_decl): Define it. 9928 * pt.c (tsubst_decl): Likewise. 9929 * tree.c (copy_template_template_parm): Likewise. 9930 9931 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and 9932 has_nonpublic_assign_ref. 9933 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare. 9934 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise. 9935 * class.c (finish_struct_methods): Don't set 9936 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF. 9937 (interface_only): Don't declare. 9938 (interface_unknown): Likewise. 9939 99402000-04-11 Martin v. L�wis <loewis@informatik.hu-berlin.de> 9941 9942 * tree.h (HAVE_TEMPLATES): Remove definition. 9943 * lang-options.h (-fthis-is-variable): Remove documentation. 9944 99452000-04-10 Jason Merrill <jason@casey.cygnus.com> 9946 9947 * class.c (instantiate_type): Handle object-relative template-id. 9948 9949 * semantics.c (finish_expr_stmt): Call convert_to_void here. 9950 * decl.c (cplus_expand_expr_stmt): Not here. 9951 9952 * rtti.c (build_dynamic_cast_1): Call non_lvalue. 9953 Initialize exprtype earlier. 9954 9955 * parse.y (fn.def1): Check for defining types in return types. 9956 9957 * decl.c (check_tag_decl): Notice extra fundamental types. 9958 Diagnose empty decls in classes, too. 9959 9960 * decl.c (grokdeclarator): Don't override an anonymous name if no 9961 declarator was given. 9962 9963 * cvt.c (convert_to_void): Call resolve_offset_ref. 9964 9965 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF. 9966 9967 * decl2.c (decl_namespace): Handle getting a type. 9968 9969 * typeck.c (build_c_cast): Re-enable warning for cast between 9970 pointer and integer of different size. 9971 99722000-04-10 Nathan Sidwell <nathan@codesourcery.com> 9973 9974 * inc/cxxabi.h (__pointer_type_info): Add restrict and 9975 incomplete flags. 9976 (__pointer_type_info::__pointer_catch): New virtual function. 9977 (__pointer_to_member_type_info): Derive from 9978 __pointer_type_info. Adjust. 9979 (__pointer_to_member_type_info::__do_catch): Remove. 9980 (__pointer_to_member_type_info::__is_pointer_p): Declare. 9981 (__pointer_to_member_type_info::__pointer_catch): Declare. 9982 * rtti.c (qualifier_flags): Add restrict flag. 9983 (ptmd_initializer): Reorder members. 9984 (create_tinfo_types): Expand comments. Reorder 9985 ptmd_desc_type_node members. 9986 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p): 9987 Implement. 9988 (__pointer_type_info::__do_catch): Move specific code into 9989 __pointer_catch. Call it. 9990 (__pointer_type_info::__pointer_catch): Non-pointer-to-member 9991 specific catch checking. Fix void conversion check. 9992 (__pointer_to_member_type_info::__do_catch): Remove. 9993 (__pointer_to_member_type_info::__pointer_catch): Implement. 9994 99952000-04-10 Martin v. L�wis <loewis@informatik.hu-berlin.de> 9996 9997 * lex.c (init_parse): Remove traces of classof and headof. 9998 * decl2.c (flag_operator_names): Default to 1. 9999 (lang_decode_option): Do not set it for -ansi. 10000 100012000-04-09 Mark Mitchell <mark@codesourcery.com> 10002 10003 * cp-tree.h (struct lang_decl): Remove main_decl_variant. 10004 (DECL_MAIN_VARIANT): Remove. 10005 * decl.c (duplicate_decls): Don't set it. 10006 (start_function): Likewise. 10007 (lang_mark_tree): Don't mark it. 10008 * decl2.c (defer_fn): Don't use it. 10009 * lex.c (retrofit_lang_decl): Don't set it. 10010 * pt.c (tsubst_decl): Likewise. 10011 * ptree.c (print_lang_decl): Don't print it. 10012 * typeck.c (mark_addressable): Don't use it. 10013 100142000-04-09 Nathan Sidwell <nathan@codesourcery.com> 10015 10016 * vec.cc: Include <new> and <exception>. 10017 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup. 10018 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or 10019 terminate. 10020 (__cxa_vec_delete): Catch dtor exceptions. 10021 100222000-04-09 Nathan Sidwell <nathan@codesourcery.com> 10023 10024 Prepend __ to implementation defined names. 10025 * inc/typeinfo (type_info): Rename _name to __name. 10026 (type_info::type_info): Rename parameter. 10027 (type_info::operator==, type_info::operator!=, 10028 type_info::before): Likewise. 10029 (type_info::is_pointer_p, type_info::is_function_p, 10030 type_info::do_catch, type_info::do_upcast): Prepend __. Rename 10031 parameters. 10032 * inc/cxxabi.h 10033 (__fundamental_type_info::__fundamental_type_info) Rename parameters. 10034 (__pointer_type_info::__pointer_type_info): Likewise. 10035 (__pointer_type_info::is_pointer_p, 10036 __pointer_type_info::do_catch): Prepend __. Rename parameters. 10037 (__array_type_info::__array_type_info): Rename parameters. 10038 (__function_type_info::__function_type_info): Likewise. 10039 (__function_type_info::is_function_p): Prepend __. 10040 (__enum_type_info::__enum_type_info): Rename parameters. 10041 (__pointer_to_member_type_info::__pointer_to_member_type_info): 10042 Likewise. 10043 (__pointer_to_member_type_info::do_catch): Prepend __. Rename 10044 parameters. 10045 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __. 10046 (__class_type_info::__class_type_info): Rename parameters. 10047 (__class_type_info::sub_kind): Prepend __. Adjust member names. 10048 (__class_type_info::upcast_result, 10049 __class_type_info::dyncast_result): Prepend __. Move definition 10050 into tinfo.cc. 10051 (__class_type_info::do_upcast, __class_type_info::do_catch, 10052 __class_type_info::find_public_src, 10053 __class_type_info::do_dyncast, 10054 __class_type_info::do_find_public_src): Prepend __. Rename 10055 parameters. 10056 (__si_class_type_info::__si_class_type_info): Rename parameters. 10057 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast, 10058 __si_class_type_info::do_find_public_src): Prepent __. Rename 10059 parameters. 10060 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters. 10061 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast, 10062 __vmi_class_type_info::do_find_public_src): Prepent __. Rename 10063 parameters. 10064 (__dynamic_cast): Rename parameters. 10065 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p, 10066 type_info::do_catch, type_info::do_upcast): Prepend __. 10067 (contained_p, public_p, virtual_p, contained_public_p, 10068 contained_nonpublic_p, contained_nonvirtual_p): Adjust. 10069 (__class_type_info::do_catch, 10070 __class_type_info::do_upcast): Prepend __. Adjust. 10071 (__class_type_info::__upcast_result, 10072 __class_type_info::__dyncast_result): Move from inc/cxxabi.h. 10073 Adjust. 10074 (__class_type_info::find_public_src): Prepend __. Adjust. 10075 (__class_type_info::do_find_public_src, 10076 __si_class_type_info::do_find_public_src, 10077 __vmi_class_type_info::do_find_public_src): Likewise. 10078 (__class_type_info::do_dyncast, 10079 __si_class_type_info::do_dyncast, 10080 __vmi_class_type_info::do_dyncast): Likewise. 10081 (__class_type_info::do_upcast, 10082 __si_class_type_info::do_upcast, 10083 __vmi_class_type_info::do_upcast): Likewise. 10084 (__dynamic_cast): Adjust. 10085 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __. 10086 (__function_type_info::is_function_p): Likewise. 10087 (__pointer_type_info::do_catch): Likewise. Adjust. 10088 (__pointer_to_member_type_info::do_catch): Likewise. Adjust. 10089 (__throw_type_match_rtti_2): Adjust. 10090 (__is_pointer): Adjust. 10091 100922000-04-08 Mark Mitchell <mark@codesourcery.com> 10093 10094 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER. 10095 (complete_ctor_identifier): New macro. 10096 (special_function_kind): Add sfk_copy_constructor and 10097 sfk_assignment_operator. 10098 (LOOKUP_HAS_IN_CHARGE): Remove. 10099 (cons_up_default_function): Rename to ... 10100 (implicitly_declare_fn): ... this. 10101 * call.c (build_new_method_call): Add in-charge parameters for 10102 constructors here. 10103 * class.c (add_implicitly_declared_members): Change parameter name 10104 from cant_have_assignment to cant_have_const_assignment. 10105 Replace calls to cons_up_default_function to implicitly_declare_fn. 10106 * cvt.c (ocp_convert): Use complete_ctor_identifier. 10107 * decl.c (initialize_predefined_identifiers): Initialize it. 10108 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of 10109 complex expression. 10110 * init.c (expand_default_init): Don't calculate the in-charge 10111 parameter here. 10112 (build_new_1): Likewise. 10113 * lex.c (cons_up_default_function): Move to method.c. 10114 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P. 10115 (implicitly_declare_fn): New function. 10116 * typeck.c (build_static_cast): Use complete_ctor_identifier. 10117 (build_modify_expr): Likewise. 10118 * typeck2.c (build_functional_cast): Likewise. 10119 10120 Under the new ABI, constructors don't return `this'. 10121 * cp-tree.h (warn_reorder): Declare. 10122 (special_function_kind): New enum. 10123 (global_base_init_list): Remove declaration. 10124 (emit_base_init): Don't return a value. 10125 (check_base_init): Don't declare. 10126 (is_aggr_typedef): Likewise. 10127 * decl.c (check_special_function_return_type): New function. 10128 (return_types): Remove. 10129 (grokdeclarator): Use check_special_function_return_type. 10130 (start_function): Don't initialize ctor_label under the new ABI. 10131 (finish_construtor_body): Don't create a corresponding LABEL_STMT. 10132 * init.c (begin_init_stmts): Move to top of file. 10133 (finish_init_stmts): Likewise. 10134 (warn_reorder): Don't declare. 10135 (emit_base_init): Don't create a STMT_EXPR here. Don't return a 10136 value. 10137 (check_base_init): Remove. 10138 (is_aggr_typedef): Likewise. 10139 (build_new_1): Don't use the return value of a constructor. 10140 * semantics.c (setup_vtbl_ptr): Don't use the return value 10141 of emit_base_init. 10142 * typeck.c (check_return_expr): Don't magically convert return 10143 statements into `return this' in constructors under the new ABI. 10144 10145 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER, 10146 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER. 10147 (base_ctor_identifier): New macro. 10148 (base_dtor_identifier): Likewise. 10149 (deleting_dtor_identifier): Likewise. 10150 * decl.c: Don't include obstack.h. 10151 (obstack_chunk_alloc): Don't define. 10152 (obstack_chunk_free): Likewise. 10153 (struct predefined_identifier): New type. 10154 (initialize_predefined_identifiers): New function. 10155 (init_decl_processing): Use it. 10156 (debug_temp_inits): Remove. 10157 (start_method): Don't call preserve_data. 10158 (hack_incomplete_structures): Update comment. 10159 * init.c (init_init_processing): Don't initialize 10160 nelts_identifier. 10161 (build_offset_rf): Remove dead code. 10162 (build_delete): Use CLASSTYPE_N_BASECLASSES. 10163 * search.c (init_search_processing): Don't initialize 10164 vptr_identifier. 10165 101662000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 10167 10168 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide 10169 some sign_compare warnings. 10170 101712000-04-07 Nathan Sidwell <nathan@codesourcery.com> 10172 10173 Rename abi::__vmi_class_type_info members. 10174 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases, 10175 base_list, detail_masks members to vmi_flags, vmi_base_count, 10176 vmi_bases and vmi_flags_masks respectively. 10177 (__vmi_class_type_info::vmi_flags_masks): Rename 10178 details_unknown_mask to flags_unknown_mask. 10179 * tinfo.cc (__class_type_info::do_upcast): Adjust. 10180 (__vmi_class_type_info::do_find_public_src): Adjust. 10181 (__vmi_class_type_info::do_dyncast): Adjust. 10182 (__vmi_class_type_info::do_upcast): Adjust. 10183 101842000-04-07 Nathan Sidwell <nathan@codesourcery.com> 10185 10186 * tinfo.cc (convert_to_base): New function. 10187 (get_vbase_offset): Remove. Move into convert_to_base. 10188 (__vmi_class_type_info::do_find_public_src): Adjust. 10189 (__vmi_class_type_info::do_dyncast): Adjust. 10190 (__vmi_class_type_info::do_upcast): Adjust. 10191 101922000-04-06 Jason Merrill <jason@yorick.cygnus.com> 10193 10194 * tinfo.cc (operator=): Use __builtin_strcmp. 10195 * tinfo2.cc (before): Likewise. 10196 101972000-04-06 Mark Mitchell <mark@codesourcery.com> 10198 10199 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred. 10200 (DECL_SAVED_INLINE): Rename to ... 10201 (DECL_DEFERRED_FN): ... this. 10202 (in_function_p): Remove declaration. 10203 (mark_inline_for_output): Rename to ... 10204 (defer_fn): ... this. 10205 * decl.c (finish_function): Adjust call to mark_inline_for_output. 10206 (in_function_p): Remove definition. 10207 * decl2.c (saved_inlines): Rename to ... 10208 (deferred_fns): ... this. 10209 (saved_inlines_used): Rename to ... 10210 (deferred_fns_used): ... this. 10211 (mark_inline_for_output): Rename to ... 10212 (defer_fn): ... this. 10213 (finish_file): Adjust accordingly. 10214 (init_decl2): Likewise. 10215 * lex.c (cons_up_default_function): Likewise. 10216 * pt.c (mark_decl_instantiated): Likewise. 10217 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any 10218 circumstances. 10219 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output. 10220 * semantics.c (expand_body): Defer more functions. 10221 102222000-04-06 Nathan Sidwell <nathan@codesourcery.com> 10223 10224 * vec.cc: New file. 10225 * Make-lang.in (CXX_LIB2FUNCS): Add it. 10226 (vec.o): Build it. 10227 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, 10228 __cxa_vec_delete): Declare. 10229 102302000-04-06 Nathan Sidwell <nathan@codesourcery.com> 10231 10232 * rtti.c (dfs_class_hint_mark): New static function. 10233 (dfs_class_hint_unmark): New static function. 10234 (class_hint_flags): Use them. 10235 102362000-04-05 Benjamin Kosnik <bkoz@cygnus.com> 10237 10238 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE. 10239 102402000-04-05 Mark Mitchell <mark@codesourcery.com> 10241 10242 * cp-tree.h (instantiate_decl): Change prototype. 10243 * decl2.c (mark_used): Adjust call. 10244 * optimize.c (inlinable_function_p): Adjust handling of templates. 10245 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl. 10246 (do_type_instantiation): Likewise. 10247 (instantiate_decl): Defer more templates. 10248 (instantiate_pending_templates): Adjust logic to handle inline 10249 friend functions. 10250 10251 * Makefile.in (GGC_H): New variable. Use it throughout in place 10252 of ggc.h. 10253 10254 * call.c: Don't include obstack.h. Include ggc.h. 10255 (obstack_chunk_alloc): Don't define. 10256 (obstack_chunk_free): Likewise. 10257 (add_candidate): Allocate the z_candidate with ggc_alloc_obj. 10258 * decl.c (push_switch): Use xmalloc to allocate the cp_switch. 10259 (pop_switch): Free it. 10260 10261 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs. 10262 10263 * dump.c (dequeue_and_dump): Don't try to print the bit_position 10264 if we don't have a DECL_FIELD_OFFSET. 10265 10266Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz> 10267 10268 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of 10269 special_function_p. 10270 102712000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 10272 10273 * cfns.gperf (hash, libc_name_p): Prototype. 10274 10275 * rtti.c (build_dynamic_cast_1): Constification. 10276 10277 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes. 10278 10279 * semantics.c (deferred_type_access_control): Prototype. 10280 102812000-04-04 Mark Mitchell <mark@codesourcery.com> 10282 10283 Correct many new ABI issues regarding vbase and vcall offset 10284 layout. 10285 * cp-tree.h (BINFO_VTABLE): Document. 10286 (struct lang_type): Tweak formatting. 10287 (BINFO_PRIMARY_BINFO): Add to documentation. 10288 (CLASSTYPE_VSIZE): Fix typo in comment. 10289 (CLASSTYPE_VBASECLASSES): Update documentation. 10290 (BINFO_VBASE_MARKED): Remove. 10291 (SET_BINFO_VBASE_MARKED): Likewise. 10292 (CLEAR_BINFO_VBASE_MARKED): Likewise. 10293 (BINFO_FIELDS_MARKED): Remove. 10294 (SET_BINFO_FIELDS_MARKED): Likewise. 10295 (CLEAR_BINFO_FIELDS_MARKED): Likewise. 10296 (enum access_kind): New enumeration. 10297 (num_extra_vtbl_entries): Remove declaration. 10298 (size_extra_vtbl_entries): Likewise. 10299 (get_vtbl_decl_for_binfo): New function. 10300 (dfs_vbase_unmark): Remove declaration. 10301 (mark_primary_bases): Likewise. 10302 * class.c (SAME_FN): Remove. 10303 (struct vcall_offset_data_s): Move definition. 10304 (build_vbase_pointer): Use `build', not `build_binary_op', to 10305 access the vbase pointer under the new ABI. 10306 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo. 10307 (build_primary_vtable): Likewise. 10308 (dfs_mark_primary_bases): Move here from search.c. 10309 (mark_primary_bases): Likewise. 10310 (determine_primary_bases): Under the new ABI, don't make a base 10311 class a primary base just because we don't yet have any virtual 10312 functions. 10313 (layout_vtable_decl): Use get_vtbl_decl_for_binfo. 10314 (num_vfun_entries): Remove. 10315 (dfs_count_virtuals): Likewise. 10316 (num_extra_vtbl_entries): Likewise. 10317 (size_extra_vtbl_entries): Likewise. 10318 (layout_virtual_bases): Iterate in inheritance graph order under 10319 the new ABI. 10320 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to 10321 indicate that a vfield is present. 10322 (init_class_processing): Initialize access_public_node, etc., from 10323 ak_public, etc. 10324 (get_vtbl_decl_for_binfo): New function. 10325 (dump_class_hierarchy_r): Likewise. 10326 (dump_class_hierarchy): Use it. 10327 (finish_vtbls): Build the vtbls in inheritance graph order. 10328 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer. 10329 (initialize_vtable): Use get_vtbl_decl_for_binfo. 10330 (accumulate_vtbl_inits): Add comments explaining why a pre-order 10331 walk is required. 10332 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location 10333 where the vptr points, even for primary vtables. 10334 (build_vtbl_initializer): Adjust handling of vbase and vcall 10335 offsets. 10336 (build_vcall_and_vbase_vtable_entries): New function. 10337 (dfs_build_vbase_offset_vtbl_entries): Remove. 10338 (build_vbase_offset_vtbl_entries): Reimplement. 10339 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that 10340 were already handled in a primary base class vtable. 10341 (build_vcall_offset_vtbl_entries): Adjust. 10342 (build_rtti_vtbl_entries): Adjust. 10343 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo. 10344 * init.c (expand_virtual_init): Simplify. 10345 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo. 10346 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr. 10347 * search.c (BINFO_ACCESS): New macro. 10348 (SET_BINFO_ACCESS): Likewise. 10349 (dfs_access_in_type): Manipulate access_kinds, not access nodes. 10350 (access_in_type): Likewise. 10351 (dfs_accessible_p): Likewise. 10352 (protected_accessible_p): Likewise. 10353 (lookup_fnfields_1): Adjust documentation. 10354 (dfs_mark_primary_bases): Move to class.c 10355 (mark_primary_bases): Likewise. 10356 (dfs_vbase_unmark): Remove. 10357 (virtual_context): Use BINFO_FOR_VBASE. 10358 (dfs_get_vbase_types): Simplify. 10359 (dfs_build_inheritance_graph_order): New function. 10360 (get_vbase_types): Use it. 10361 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo. 10362 10363 * tinfo.cc (get_vbase_offset): New function. 10364 (__vmi_class_type_info::do_find_public_src): Use it. 10365 (__vmi_class_type_info::do_dyncast): Likewise. 10366 (__vmi_class_type_info::do_upcast): Likewise. 10367 103682000-04-03 Zack Weinberg <zack@wolery.cumb.org> 10369 10370 * lang-specs.h: Pass -fno-show-column to the preprocessor. 10371 103722000-03-30 Nathan Sidwell <nathan@codesourcery.com> 10373 10374 * rtti.c (class_hint_flags): Rename flags. 10375 (class_initializer): Remove flags. 10376 (synthesize_tinfo_var): Combine offset and flags. Add flags 10377 for __vmi_class_type_info. 10378 (create_tinfo_types): Remove flags from __class_type_info and 10379 __si_class_type_info. Merge flags and offset from 10380 base_class_type_info. 10381 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags. 10382 (__base_class_info::is_virtual_p): Adjust. 10383 (__base_class_info::is_public_p): Adjust. 10384 (__base_class_info::offset): New accessor. 10385 (__class_type_info::details): Remove member. 10386 (__class_type_info::__class_type_info): Lose details. 10387 (__class_type_info::detail_masks): Remove. 10388 (__si_class_type_info::__si_class_type_info): Lose details. 10389 (__vmi_class_type_info::details): New member. 10390 (__vmi_class_type_info::__vmi_class_type_info): Adjust. 10391 (__vmi_class_type_info::detail_masks): New member. 10392 * tinfo.cc (__class_type_info::do_upcast): Initialize result 10393 with unknown_details_mask. 10394 (__vmi_class_type_info::do_find_public_src): Adjust 10395 (__vmi_class_type_info::do_dyncast): Adjust. 10396 (__vmi_class_type_info::do_upcast): Set result details, if 10397 needed. Adjust. 10398 (__dynamic_cast): Temporarily #if out optimization. 10399 104002000-03-29 Nathan Sidwell <nathan@codesourcery.com> 10401 10402 * rtti.c (get_tinfo_decl): Mark used. 10403 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only 10404 mark as dealt with, if we output it. 10405 104062000-03-28 Mark Mitchell <mark@codesourcery.com> 10407 10408 * class.c: Reorganize to put virtual function table initialization 10409 machinery at the end of the file. 10410 104112000-03-28 Jason Merrill <jason@casey.cygnus.com> 10412 10413 * class.c (finish_struct): Use bitsize_zero_node. 10414 * pt.c (instantiate_class_template): Likewise. 10415 104162000-03-28 Mark Mitchell <mark@codesourcery.com> 10417 10418 Put RTTI entries at negative offsets in new ABI. 10419 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first 10420 vbase offset at index -3, not -1. 10421 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not 10422 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases. 10423 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff. 10424 (build_rtti_vtbl_entries): New function. 10425 (set_rtti_entry): Remove. 10426 (build_primary_vtable): Don't use it. 10427 (build_secondary_vtable): Likewise. 10428 (start_vtable): Remove. 10429 (first_vfun_index): New function. 10430 (set_vindex): Likewise. 10431 (add_virtual_function): Don't call start_vtable. Do call 10432 set_vindex. 10433 (set_primary_base): Rename parameter. 10434 (determine_primary_base): Likewise. 10435 (num_vfun_entries): Don't use skip_rtti_stuff. 10436 (num_extra_vtbl_entries): Include RTTI information. 10437 (build_vtbl_initializer): Use build_rtti_vtbl_entries. 10438 (skip_rtti_stuff): Remove. 10439 (dfs_modify_vtables): Don't use it. 10440 (modify_all_vtables): Don't use start_vtable. Do use set_vindex. 10441 (layout_nonempty_base_or_field): Update size handling. 10442 (create_vtable_ptr): Tweak. 10443 (layout_class_type): Adjust parameter names. 10444 (finish_struct_1): Simplify. 10445 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation. 10446 (skip_rtti_stuff): Remove. 10447 (first_vfun_index): New function. 10448 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove. 10449 (dfs_vtable_path_marked_real_bases_queue_p): Remove. 10450 (marked_vtable_pathp): Declare. 10451 (unmarked_vtable_pathp): Likewise. 10452 * error.c (dump_expr): Use first_vfun_index to calculate vtable 10453 offsets. 10454 * rtti.c (build_headof): Look for RTTI at negative offsets. 10455 (get_tinfo_decl_dynamic): Likewise. 10456 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL 10457 here. 10458 (create_pseudo_type_info): Do it here instead. Adjust so that 10459 vptr points at first virtual function. 10460 * search.c (marked_vtable_pathp): Make it global. 10461 (unmarked_vtable_pathp): Likewise. 10462 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove. 10463 (dfs_vtable_path_marked_real_bases_queue_p): Likewise. 10464 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff. 10465 (get_pure_virtuals): Likewise. 10466 (expand_upcast_fixups): Likewise. 10467 * tree.c (debug_binfo): Likewise. 10468 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate 10469 negative offset. 10470 10471Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 10472 10473 * class.c (check_field_decl): Fix typo. 10474 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS. 10475 (check_methods): Likewise. 10476 (check_field_decls): Likewise. 10477 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT. 10478 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT): 10479 Use DECL_RESULT_FLD, not DECL_RESULT. 10480 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT. 10481 * lex.c (identifier_type): Likewise. 10482 * pt.c (determine_specialization, lookup_template_class): Likewise. 10483 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise. 10484 (resolve_overloaded_unification, more_specialized): Likewise. 10485 * semantics.c (finish_member_declaration): Likewise. 10486 * typeck.c (build_x_function_call): Likewise. 10487 104882000-03-26 Mark Mitchell <mark@codesourcery.com> 10489 10490 * class.c (layout_empty_base): Handle empty bases with non-byte 10491 alignment. 10492 (build_base_field): Likewise. 10493 (layout_virtual_bases): Likewise. 10494 10495 * class.c (finish_struct_1): Fix typo in this change: 10496 10497 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 10498 104992000-03-25 Mark Mitchell <mark@codesourcery.com> 10500 10501 * decl.c (grokdeclarator): Count partial specializations when 10502 keeping track of how many template classes have been seen. 10503 10504 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT. 10505 10506Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 10507 10508 * class.c (build_vbase_pointer_fields): layout_field now place_field. 10509 (get_vfield_offset): Use byte_position. 10510 (set_rtti_entry): Set OFFSET to ssizetype zero. 10511 (get_binfo_offset_as_int): Deleted. 10512 (dfs_record_base_offsets): Use tree_low_cst. 10513 (dfs_search_base_offsets): Likewise. 10514 (layout_nonempty_base_or_field): Reflect changes in RLI format 10515 and call byte_position. 10516 (layout_empty_base): Convert offset to ssizetype. 10517 (build_base_field): use rli_size_unit_so_far. 10518 (dfs_propagate_binfo_offsets): Do computation in proper type. 10519 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. 10520 (layout_class_type): Reflect changes in RLI names and fields. 10521 (finish_struct_1): Set DECL_FIELD_OFFSET. 10522 * dump.c (dequeue_and_dump): Call bit_position. 10523 * expr.c (cplus_expand_constant): Use byte_position. 10524 * rtti.c (expand_class_desc): Use bitsize_one_node. 10525 * typeck.c (build_component_addr): Use byte_position and don't 10526 special case for zero offset. 10527 105282000-03-24 Nathan Sidwell <nathan@codesourcery.com> 10529 10530 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P. 10531 10532 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi 10533 tinfo object. 10534 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting 10535 vtable. 10536 105372000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 10538 10539 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and 10540 DECL_P macros. 10541 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name, 10542 make_typename_type, check_initializer, cp_finish_decl, 10543 xref_tag): Likewise. 10544 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree, 10545 decl_namespace, arg_assoc_template_arg, arg_assoc, 10546 validate_nonmember_using_decl, do_class_using_decl): Likewise. 10547 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of, 10548 args_to_string): Likewise. 10549 * friend.c (is_friend): Likewise. 10550 * lex.c (note_got_semicolon, note_list_got_semicolon, 10551 is_global): Likewise. 10552 * method.c (build_overload_nested_name, build_overload_value, 10553 build_qualified_name, build_qualified_name, hack_identifier): Likewise. 10554 * parse.y (typename_sub, typename_sub1): Likewise. 10555 * pt.c (push_inline_template_parms_recursive, check_template_shadow, 10556 process_partial_specialization, convert_template_argument, 10557 template_args_equal, add_pending_template, lookup_template_class, 10558 for_each_template_parm_r, maybe_fold_nontype_arg, 10559 tsubst, instantiate_template, type_unification_real, unify, 10560 instantiate_pending_templates, set_mangled_name_for_template_decl): 10561 Likewise. 10562 * repo.c (repo_get_id, repo_template_used): Likewise. 10563 * search.c (lookup_field_1): Likewise. 10564 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise. 10565 * xref.c (classname): Likewise. 10566 105672000-03-22 Mark Mitchell <mark@codesourcery.com> 10568 10569 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation. 10570 (CANONICAL_BINFO): New macro. 10571 (BINFO_NEW_VTABLE_MARKED): Use it. 10572 (SET_BINFO_NEW_VTABLE_MARKED): Likewise. 10573 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise. 10574 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE, 10575 not TREE_TYPE. 10576 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED. 10577 (build_secondary_vtable): Likewise. 10578 (dfs_finish_vtbls): Likewise. 10579 (dfs_accumulate_vtbl_inits): Likewise. 10580 (accumulate_vtbl_inits): New function. 10581 (finish_vtbls): Make sure that virtual bases come after 10582 non-virtual bases in the vtable group. 10583 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL. 10584 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED. 10585 * search.c (struct vbase_info): Move definition. 10586 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED. 10587 (unmarked_new_vtable_p): Likewise. 10588 (dfs_mark_vtable_path): Remove. 10589 (dfs_mark_new_vtable): Remove. 10590 (dfs_unmark_new_vtable): Likewise. 10591 (dfs_clear_search_slot): Likewise. 10592 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED. 10593 (dfs_clear_vbase_slots): Likewise. 10594 (init_vbase_pointers): LIkewise. 10595 105962000-03-22 Jason Merrill <jason@casey.cygnus.com> 10597 10598 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a 10599 SIZETYPE to a non-SIZETYPE. 10600 106012000-03-21 Mark Mitchell <mark@codesourcery.com> 10602 10603 * class.c (layout_virtual_bases): Adjust names in conditionally 10604 compiled code. 10605 10606 * class.c (record_base_offsets): New function. 10607 (layout_conflict_p): Likewise. 10608 (layout_nonempty_base_or_field): Use it. 10609 (layout_empty_base): New function. 10610 (build_base_field): Use it. 10611 (build_base_fields): Update comment. 10612 (layout_virtual_bases): Fold in a little code form 10613 layout_basetypes. Use layout_empty_base. 10614 (layout_basetypes): Remove. 10615 (end_of_class): New function. 10616 (layout_class_type): Use it. Adjust. 10617 10618 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment. 10619 (fntype_p): Remove. 10620 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in 10621 comment. 10622 (dfs_skip_nonprimary_vbases_markedp): Likewise. 10623 * typeck.c (fntype_p): Remove. 10624 10625 * cp-tree.h (TI_SPEC_INFO): Remove. 10626 (CLASSTYPE_TI_SPEC_INFO): Likewise. 10627 * pt.c (process_partial_specialization): Likewise. 10628 10629 * class.c (build_base_field): Fix thinko in computation of binfo 10630 offsets. 10631 10632 * tree.c (mark_local_for_remap_p): Mark variables declared in 10633 TARGET_EXPRs as well. 10634 106352000-03-21 Nathan Sidwell <nathan@codesourcery.com> 10636 10637 * typeck.c (require_complete_type, complete_type, 10638 complete_type_or_else, c_sizeof, c_sizeof_nowarn, 10639 build_array_ref, convert_arguments, pointer_diff, 10640 build_x_unary_op, build_unary_op, build_c_cast, 10641 build_modify_expr): Use COMPLETE_TYPE_P etc. 10642 * call.c (is_complete, convert_like_real, 10643 build_new_method_call): Likewise. 10644 * class.c (build_vbase_pointer_fields, check_bases, 10645 build_base_field, finish_struct_1, pushclass): Likewise. 10646 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise. 10647 * decl.c (maybe_process_template_type_declaration, pushtag, 10648 pushdecl, redeclaration_error_message, start_decl, start_decl_1, 10649 layout_var_decl, check_initializer, cp_finish_decl, 10650 grokdeclarator, require_complete_types_for_parms, 10651 grok_op_properties, xref_tag, xref_basetypes, 10652 check_function_type): Likewise. 10653 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise. 10654 * friend.c (do_friend): Likewise. 10655 * init.c (build_offset_ref): Likewise. 10656 * parse.y (structsp): Likewise. 10657 * pt.c (maybe_process_partial_specialization, 10658 tsubst_friend_function, instantiate_class_template, tsubst, 10659 do_type_instantiation, instantiate_pending_templates): Likewise. 10660 * repo.c (repo_get_id): Likewise. 10661 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1, 10662 synthesize_tinfo_var, emit_support_tinfos): Likewise. 10663 * search.c (lookup_fnfields_1, lookup_conversions): Likewise. 10664 * semantics.c (begin_class_definition): Likewise. 10665 * tree.c (build_cplus_method_type): Likewise. 10666 * typeck2.c (digest_init, build_functional_cast, 10667 add_exception_specifier): Likewise. 10668 * parse.h, parse.c: Regenerated. 10669 106702000-03-21 Nathan Sidwell <nathan@codesourcery.com> 10671 10672 * inc/cxxabi.h: New header file. Define new-abi entry points. 10673 (__pointer_type_info::target): Rename member to ... 10674 (__pointer_type_info::type): ... here. 10675 (__base_class_info::type): Rename member to ... 10676 (__base_class_info::base): ... here. 10677 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h 10678 * cp-tree.h (CPTI_ABI): New global tree enumeration. 10679 (abi_node): New global tree node. 10680 * decl.c (abi_node): Document. 10681 (init_decl_processing): Initialize abi_node. 10682 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi. 10683 (get_vmi_pseudo_type_info): Likewise. 10684 (create_tinfo_types): Likewise. 10685 (emit_support_tinfos): Likewise. 10686 * tinfo.h (cxxabi.h): Include for new-abi. 10687 Move rtti class definitions to new header file. 10688 * tinfo.cc (abi): Use the namespace. 10689 (std): Move new abi rtti classes from here ... 10690 (__cxxabiv1): ... to here. 10691 * tinfo2.cc (cxxabi.h): Include for new-abi. 10692 Move rtti class definitions to new header file. 10693 (std): Move new abi rtti classes from here ... 10694 (__cxxabiv1): ... to here. 10695 * inc/typeinfo (__class_type_info): Move into __cxxabiv1 10696 namespace. 10697 106982000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu> 10699 Jason Merrill <jason@casey.cygnus.com> 10700 10701 * method.c (build_overload_int): Use host_integerp. 10702 107032000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 10704 10705 * init.c (build_offset_ref): Handle the case of a templated member 10706 function. 10707 107082000-03-19 Martin v. L�wis <loewis@informatik.hu-berlin.de> 10709 10710 * except.c (expand_exception_blocks): Clear catch_clauses_last. 10711 107122000-03-18 Mark Mitchell <mark@codesourcery.com> 10713 10714 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro. 10715 * class.c (check_bitfield_decl): Turn illegal bitfields into 10716 non-bitfields. 10717 (dfs_propagate_binfo_offsets): Adjust for new size_binop 10718 semantics. 10719 (dfs_offset_for_unshared_vbases): Likewise. 10720 * cvt.c (cp_convert_to_pointer): Convert NULL to a 10721 pointer-to-member correctly under the new ABI. 10722 * expr.c (cplus_expand_constant): Don't use cp_convert when 10723 turning an offset into a pointer-to-member. 10724 * init.c (resolve_offset_ref): Don't adjust pointers-to-members 10725 when dereferencing them under the new ABI. 10726 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation 10727 of pointers-to-members under the new ABI. 10728 10729 * class.c (check_bitfield_decl): Remove restriction on really long 10730 bitfields. 10731 (layout_class_type): Implement new ABI handling of bitfields 10732 longer than their types. 10733 107342000-03-18 Martin v. L�wis <loewis@informatik.hu-berlin.de> 10735 10736 * parse.y (extdefs): Call ggc_collect. 10737 * parse.c: Regenerated. 10738 107392000-03-18 Nathan Sidwell <nathan@codesourcery.com> 10740 10741 * class.c (build_base_field): Use TYPE_ALIGN to examine a type. 10742 (note_name_declared_in_class): Use OVL_CURRENT to get at a 10743 potential overload. 10744 10745Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 10746 10747 * class.c (build_vbase_path): Use integer_zerop. 10748 (build_vtable_entry): Use tree_low_cst. 10749 (get_vfield_offset): Use bit_position. 10750 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT. 10751 Use tree_low_cst. 10752 (check_bitfield_decl): Set DECL_SIZE using convert. 10753 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop. 10754 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT. 10755 Use tree_low_cst. 10756 (finish_struct_1): Use bit_position. 10757 (dump_class_hierarchy): Use tree_low_cst. 10758 * cp-tree.h (min_precision): Add declaration. 10759 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst. 10760 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst. 10761 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst. 10762 * expr.c (cplus_expand_constant): Use bit_position. 10763 * init.c (build_vec_init): Use host_integerp and tree_low_cst. 10764 * rtti.c (get_base_offset): Use bit_position. 10765 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int, 10766 host_integerp, and tree_low_cst. 10767 (pointer_int_sum): Use integer_zerop. 10768 (build_component_addr): Use bit_position. 10769 107702000-03-17 Nathan Sidwell <nathan@codesourcery.com> 10771 10772 * typeck.c (require_complete_type): Don't assume size_zero_node. 10773 (complete_type_or_else): Likewise. 10774 107752000-03-16 Steven Grady <grady@digitaldeck.com> 10776 Jason Merrill <jason@casey.cygnus.com> 10777 10778 * rtti.c (build_dynamic_cast_1): Improve diagnostics. 10779 107802000-03-16 Nathan Sidwell <nathan@codesourcery.com> 10781 10782 * decl2.c (grokfield): Bail out if type is error_mark_node. 10783 107842000-03-15 Nathan Sidwell <nathan@codesourcery.com> 10785 10786 * tinfo2.cc (__ptr_to_member_data): Rename to ... 10787 (__pointer_to_member_data): ... here. Adjust. 10788 * rtti.c (create_tinfo_types): Adjust. 10789 107902000-03-15 Nathan Sidwell <nathan@codesourcery.com> 10791 10792 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove. 10793 * decl.c (ref_desc_type_node): Undocument. 10794 * rtti.c (ptr_ref_initializer): Rename to ... 10795 (ptr_initializer): ... here. Adjust comments. 10796 (ptmd_initializer): Fix comment thinko. 10797 (synthesize_tinfo_var): Remove REFERENCE_TYPE case. 10798 (create_tinfo_types): Remove ref_desc_type_node init. 10799 * tinfo2.cc (__reference_type_info): Remove. 10800 108012000-03-15 Nathan Sidwell <nathan@codesourcery.com> 10802 10803 * decl.c (cp_finish_decl): Remove obsolete comment. 10804 10805 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning. 10806 108072000-03-14 Mark Mitchell <mark@codesourcery.com> 10808 10809 * cp-tree.h: Tweak documentation. 10810 * class.c (build_vbase_pointer_fields): Layout the fields, too. 10811 (avoid_overlap): Remove. 10812 (get_binfo_offset_as_int): New function. 10813 (dfs_serach_base_offsets): Likewise. 10814 (layout_nonempty_base_or_field): Likewise. 10815 (build_base_field): Layout fields here. Avoid placing two objects 10816 of the same type at the same address, under the new ABI. 10817 (build_base_fields): Adjust accordingly. 10818 (create_vtable_ptr): Return the new field, but don't attach it to 10819 TYPE_FIELDS. 10820 (remove_base_field): Remove. 10821 (remove_base_fields): Remove. 10822 (layout_basetypes): Adjust accordingly. 10823 (layout_class_type): Call layout_field for each field, rather than 10824 just making a wholesale call to layout_type. 10825 108262000-03-14 Jeff Sturm <jsturm@sigma6.com> 10827 10828 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw. 10829 108302000-03-13 Jason Merrill <jason@casey.cygnus.com> 10831 10832 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P. 10833 10834 * except.c (dtor_nothrow): New fn. 10835 (do_pop_exception): Use it. Take type parm. 10836 (push_eh_cleanup): Take type parm. 10837 (expand_start_catch_block): Pass it. 10838 (build_eh_type_type_ref): Accept null type. 10839 108402000-03-12 Mark Mitchell <mark@codesourcery.com> 10841 10842 * cp-tree.h (revert_static_member_fn): Change prototype. 10843 * decl.c (grokfndecl): Adjust call to revert_static_member_fn. 10844 (grok_op_properties): Likewise. 10845 (start_function): Likewise. 10846 (revert_static_member_fn): Simplify. 10847 * pt.c (check_explicit_specialization): Adjust call to 10848 revert_static_member_fn. 10849 108502000-03-11 Mark Mitchell <mark@codesourcery.com> 10851 10852 * cp-tree.h (scope_kind): New type. 10853 (tmpl_spec_kind): Likewise. 10854 (declare_pseudo_global_level): Remove. 10855 (pseudo_global_level_p): Rename to template_parm_scope_p. 10856 (pushlevel): Remove declaration. 10857 (begin_scope): New function. 10858 (finish_scope): Likewise. 10859 (current_tmpl_spec_kind): Likewise. 10860 * decl.c (struct binding_level): Shorten parm_flag to 2 bits. 10861 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p. 10862 Add template_spec_p. 10863 (toplevel_bindings_p): Adjust. 10864 (declare_pseudo_global_level): Remove. 10865 (pseudo_global_level_p): Rename to template_parm_scope_p. 10866 (current_tmpl_spec_kind): New function. 10867 (begin_scope): Likewise. 10868 (finish_scope): Likewise. 10869 (maybe_push_to_top_level): Adjust. 10870 (maybe_process_template_type_declaration): Likewise. 10871 (pushtag): Likewise. 10872 (pushdecl_nonclass_level): Likewise. 10873 (lookup_tag): Likewise. 10874 (grokfndecl): Handle member template specializations. Share 10875 constructor and non-constructor code. 10876 * decl2.c (check_classfn): Handle member template specializations. 10877 * pt.c (begin_template_parm_list): Use begin_scope. 10878 (begin_specialization): Likewise. 10879 (end_specialization): Likewise. 10880 (check_explicit_specialization): Use current_tmpl_spec_kind. 10881 Handle member template specializations. 10882 (end_template_decl): Use finish_scope. Remove call to 10883 get_pending_sizes. 10884 (push_template_decl_real): Remove bogus error message. 10885 (tsubst_decl): Fix typo in code contained in comment. 10886 (instantiate_template): Handle member template specializations. 10887 (most_general_template): Likewise. 10888 108892000-03-11 Gabriel Dos Reis <gdr@codesourcery.com> 10890 10891 * lex.c (whitespace_cr): Compress consecutive calls to warning(). 10892 (do_identifier): Ditto for error(). 10893 10894 * pt.c (convert_nontype_argument): Ditto for cp_error(). 10895 (convert_template_argument): Ditto for cp_pedwarn(). 10896 108972000-03-11 Jason Merrill <jason@casey.cygnus.com> 10898 10899 * exception.cc (__check_null_eh_spec): New fn. 10900 * except.c (expand_end_eh_spec): Call it if the spec is throw(). 10901 109022000-03-10 Jason Merrill <jason@casey.cygnus.com> 10903 10904 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE. 10905 * except.c (expand_end_eh_spec): Add the return type. 10906 * rtti.c (throw_bad_cast): Add the parmtypes. 10907 (throw_bad_typeid): Likewise. 10908 10909 * semantics.c (expand_stmt): Only leave out rtl for unused 10910 artificials, and set DECL_IGNORED_P on them as well. 10911 * decl.c (wrapup_globals_for_namespace): Likewise. 10912 109132000-03-09 Nathan Sidwell <nathan@codesourcery.com> 10914 10915 * decl.c (maybe_commonize_var): Skip all artificial decls. 10916 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN. 10917 109182000-03-10 Jason Merrill <jason@casey.cygnus.com> 10919 10920 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs. 10921 * cp-tree.h: Declare flag_enforce_eh_specs. 10922 * decl.c (store_parm_decls, finish_function): Check it. 10923 10924 C library functions don't throw. 10925 * Makefile.in (cfns.h): New target. 10926 (except.o): Depend on it. 10927 * Make-lang.in (cc1plus): Depend on cfns.gperf. 10928 * cfns.gperf: New file. 10929 * cfns.h: Generated. 10930 * except.c: Include it. 10931 (nothrow_libfn_p): New fn. 10932 * decl.c (grokfndecl): Use it. 10933 * cp-tree.h: Declare it. 10934 10935 * decl.c (push_overloaded_decl_1, auto_function, 10936 define_function): Lose. 10937 (build_library_fn_1): New static fn. 10938 (builtin_function): Use it. 10939 (get_atexit_node): Use build_library_fn_ptr. 10940 (build_library_fn, build_cp_library_fn, build_library_fn_ptr, 10941 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn, 10942 push_void_library_fn, push_throw_library_fn): New fns. 10943 * cp-tree.h: Declare them. 10944 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID. 10945 (throw_bad_cast_node, throw_bad_typeid_node): Lose. 10946 * except.c (init_exception_processing, call_eh_info, do_pop_exception, 10947 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns. 10948 * rtti.c (build_runtime_decl): Lose. 10949 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, 10950 build_dynamic_cast_1, expand_si_desc, expand_class_desc, 10951 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns. 10952 10953 * call.c (build_call): Remove result_type parm. 10954 Call mark_used on unused artificial fns. 10955 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust. 10956 109572000-03-09 Jason Merrill <jason@casey.cygnus.com> 10958 10959 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as 10960 appropriate. 10961 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL. 10962 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set 10963 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate. 10964 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1, 10965 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc, 10966 expand_generic_desc): Likewise. 10967 109682000-03-08 Nathan Sidwell <nathan@codesourcery.com> 10969 10970 * exception.cc (__cp_pop_exception): Cleanup the original object. 10971 109722000-03-08 Nathan Sidwell <nathan@codesourcery.com> 10973 10974 * decl.c (grok_op_properties): Merge conversion to void warning 10975 with other silly op warnings. 10976 109772000-03-08 Jason Merrill <jason@casey.cygnus.com> 10978 10979 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of 10980 array CONSTRUCTOR elements. Don't use expr_tree_cons. 10981 109822000-03-08 Nathan Sidwell <nathan@codesourcery.com> 10983 10984 * decl.c (cp_make_fname_decl): New function. 10985 (wrapup_globals_for_namespace): Don't emit unused static vars. 10986 (init_decl_processing): Remove comment about use of 10987 array_domain_type. Set make_fname_decl. 10988 (cp_finish_decl): Remove __FUNCTION__ nadgering. 10989 * semantics.c (begin_compound_stmt): Remove 10990 current_function_name_declared flagging. 10991 (expand_stmt): Don't emit unused local statics. 10992 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls 10993 specially. 10994 109952000-03-08 Nathan Sidwell <nathan@codesourcery.com> 10996 10997 * typeck.c (convert_for_assignment): Don't look at array 10998 initializer. 10999 * call.c (convert_like_real): Likewise. 11000 110012000-03-07 Jason Merrill <jason@casey.cygnus.com> 11002 11003 Add initial support for '\uNNNN' specifier. 11004 * lex.c (read_ucs): New fn. 11005 (readescape, skip_white_space): Call it. 11006 (is_extended_char, is_extended_char_1): New fns. 11007 (utf8_extend_token): New fn, #if 0'd out. 11008 (real_yylex): Treat extended chars like letters. 11009 11010 * search.c (note_debug_info_needed): Walk the bases even if we 11011 weren't deferring the type itself. 11012 110132000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 11014 11015 * decl2.c (finish_objects): Constify a char*. 11016 11017 * method.c (emit_thunk): Likewise. 11018 110192000-03-06 Nathan Sidwell <nathan@codesourcery.com> 11020 11021 * typeck.c (dubious_conversion_warnings): Look through 11022 REFERENCE_TYPE. 11023 11024Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 11025 11026 * class.c (dfs_modify_vtables): I is now unsigned. 11027 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int. 11028 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT. 11029 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned. 11030 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. 11031 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned. 11032 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR): 11033 Call integer_all_onesp. 11034 * typeck2.c (process_init_constructor): Use compare_tree_int. 11035 11036 * lang-specs.h (as): Don't call if -syntax-only. 11037 110382000-03-06 Mark Mitchell <mark@codesourcery.com> 11039 11040 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set 11041 RTL_EXPR_HAS_NO_SCOPE after all. 11042 110432000-03-05 Mark Mitchell <mark@codesourcery.com> 11044 11045 * expr.c (cplus_expand_expr, case STMT_EXPR): Use 11046 expand_start_stmt_expr and expand_end_stmt_expr directly. Set 11047 RTL_EXPR_HAS_NO_SCOPE. 11048 11049 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little 11050 later. 11051 11052 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P. 11053 110542000-03-05 Nathan Sidwell <nathan@codesourcery.com> 11055 11056 * call.c (convert_like): Macrofy. 11057 (convert_like_with_context): New macro. 11058 (convert_like_real): Renamed from convert_like. Add calling 11059 context parameters, for diagnostics. Add recursive flag. Call 11060 dubious_conversion_warnings for outer conversion. 11061 (build_user_type_conversion): Use convert_like_with_context. 11062 (build_over_call): Likewise. Don't warn about dubious 11063 conversions here. Adjust convert_default_arg calls. 11064 (convert_default_arg): Add context parameters for diagnostics. 11065 Pass through to convert_like_with_context. 11066 * cp-tree.h (convert_default_arg): Add context parameters. 11067 (dubious_conversion_warnings): Prototype new function. 11068 * typeck.c (convert_arguments): Adjust convert_default_arg call. 11069 (dubious_conversion_warnings): New function, broken 11070 out of convert_for_assignment. 11071 (convert_for_assignment): Adjust. 11072 110732000-03-03 Jason Merrill <jason@casey.cygnus.com> 11074 11075 * decl2.c (key_method): Break out from... 11076 (import_export_vtable, import_export_class): ...here. 11077 11078 * decl.c (finish_function): Don't mess with flag_keep_inline_functions. 11079 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context. 11080 11081 * search.c (note_debug_info_needed, dfs_debug_mark, 11082 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme. 11083 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed. 11084 110852000-03-03 Nathan Sidwell <nathan@codesourcery.com> 11086 11087 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix 11088 typos. 11089 110902000-03-02 Mark Mitchell <mark@codesourcery.com> 11091 11092 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ... 11093 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this. 11094 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro. 11095 (lang_type): Split gets_new into has_new and has_array_new. 11096 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 11097 (TYPE_GETS_NEW): Split into ... 11098 (TYPE_HAS_NEW_OPERATOR): ... this, and ... 11099 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this. 11100 (DECL_ARRAY_DELETE_OPERATOR_P): New macro 11101 (build_op_new_call): Don't declare. 11102 (build_new_1): Likewise. 11103 * call.c (build_op_new_call): Remove. 11104 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR 11105 instead of TYPE_NEEDS_DESTRUCTOR. 11106 (finish_struct_bits): Likewise. 11107 (add_implicitly_declared_members): Likewise. 11108 (check_field_decl): Likewise. 11109 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it 11110 correctly under the new ABI. 11111 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR 11112 instead of TYPE_NEEDS_DESTRUCTOR. 11113 (initialize_local_var): Likewise. 11114 (destroy_local_var): Likewise. 11115 (cp_finish_decl): Likewise. 11116 (register_dtor_fn): Likewise. 11117 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and 11118 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set 11119 TYPE_VEC_DELETE_TAKES_SIZE here. 11120 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and 11121 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. 11122 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 11123 (finish_destructor_body): Likewise. 11124 (maybe_build_cleanup_1): Likewise. 11125 * decl2.c (do_static_destruction): Likewise. 11126 * init.c (build_new_1): Make it static. 11127 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 11128 (expand_cleanup_for_base): Likewise. 11129 (get_cookie_size): New function. 11130 (build_new_1): Handle array-new cookies correctly under the new 11131 ABI. 11132 (build_vec_delete_1): Likewise. 11133 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 11134 (build_delete): Likewise. 11135 (build_vec_delete): Handle array-new cookies correctly under the new 11136 ABI. 11137 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 11138 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and 11139 TYPE_HAS_ARRAY_NEW_OPERATOR. 11140 * ptree.c (print_lang_type): Check them. 11141 * search.c (context_for_name_lookup): Fix typo in comment. 11142 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 11143 * tree.c (break_out_cleanups): Likewise. 11144 (build_cplus_array_test_1): Likewise. 11145 (cp_build_qualified_type_real): Likewise. 11146 * typeck.c (complete_type): Likewise. 11147 11148 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of 11149 the command-line, not the end. 11150 111512000-03-01 Jason Merrill <jason@casey.cygnus.com> 11152 11153 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG. 11154 111552000-03-02 Tom Tromey <tromey@cygnus.com> 11156 11157 * cp-tree.h (build_java_class_ref): Declare. 11158 * init.c (build_java_class_ref): No longer static. 11159 * except.c (expand_throw): Generate a Java-style `throw' if the 11160 thrown object is a "Java" object. 11161 (initialize_handler_parm): Generate a Java-style lookup of 11162 exception info if the caught object is a "Java" object. 11163 (catch_language, catch_language_init): New globals. 11164 (decl_is_java_type): New function. 11165 (expand_start_catch_block): Don't call push_eh_info() or 11166 push_eh_cleanup() when handling a Java-style "catch". Pass Java 11167 class reference to build_catch_block. 11168 11169Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 11170 11171 * typeck.c (comptypes): Treat sizetype like its language equivalent. 11172 111732000-03-01 Bernd Schmidt <bernds@cygnus.co.uk> 11174 11175 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize 11176 to merge reference/pointer code and fix incorrect warnings. 11177 111782000-02-29 Jason Merrill <jason@casey.cygnus.com> 11179 11180 * search.c (protected_accessible_p): Use context_for_name_lookup. 11181 11182 * init.c (construct_virtual_bases): Fix thinko. 11183 * typeck.c (expand_ptrmemfunc_cst): Fix thinko. 11184 111852000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de> 11186 11187 * decl.c (current_function_decl): Move to toplev.c. 11188 111892000-02-29 Nathan Sidwell <nathan@codesourcery.com> 11190 11191 * pt.c (fn_type_unification): Unify return type, whenever 11192 provided. 11193 (get_bindings_real): Only pass return type when necessary. 11194 Remove explicit return type check. 11195 * class.c (resolve_address_of_overloaded_function): Pass desired 11196 return type to fn_type_unification. 11197 11198Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 11199 11200 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear 11201 DECL_FIELD_SIZE. 11202 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not 11203 DECL_FIELD_SIZE. 11204 * rtti.c (expand_class_desc): Likewise. 11205 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name. 11206 (THUNK_VCALL_OFFSET): Likewise. 11207 (THUNK_DELTA): Reflect changes in ../tree.h. 11208 112092000-02-28 Jason Merrill <jason@casey.cygnus.com> 11210 11211 * search.c (protected_accessible_p): Also allow the access if 11212 the member is public in DERIVED. Lose TYPE parm. 11213 (friend_accessible_p): Lose TYPE parm. 11214 (accessible_p): Adjust. 11215 11216Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 11217 11218 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop 11219 on things that are not sizes; ssize_binop deleted. 11220 Call size_diffop when appropriate. 11221 (dfs_build_vcall_offset_vtbl_entries): Likewise. 11222 (build_primary_vtable, build_secondary_vtable): Likewise. 11223 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise. 11224 Variable I is HOST_WIDE_INT. 11225 (get_vfield_offset): Pass proper types to size_binop. 11226 (size_extra_vtbl_entries, layout_virtual_bases): Likewise. 11227 (finish_struct_1): Likewise. 11228 (skip_rtti_stuff): Arg N is now pointer to signed. 11229 (layout_class_type): Use size_zero_node. 11230 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed. 11231 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop. 11232 * decl.c (complete_arry_type): Pass proper types to size_binop. 11233 (xref_basetypes): BINFO_OFFSET is sizetype. 11234 * error.c (dump_expr): Don't use size_binop non-sizes. 11235 * expr.c (cplus_expand_constant): Pass proper types to size_binop. 11236 * init.c (construct_virtual_bases): Fix type error. 11237 (build_vec_delete_1): Pass proper type to size_binop and don't 11238 fold result. 11239 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype. 11240 * rtti.c (get_base_offset): Pass proper type to size_binop. 11241 * search.c (dfs_find_vbases): Fix type error. 11242 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed. 11243 (dfs_get_vbase_types): BINFO_OFFSET is sizetype. 11244 * tree.c (debug_binfo): Variable N is signed. 11245 Use HOST_WIDE_INT_PRINT_DEC. 11246 * typeck.c (comptypes): sizetype is same as equivalent integer type. 11247 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT, 11248 size_one_node and size_zero_node. 11249 (c_alignof): Use size_one_node. 11250 (build_component_addr): Pass proper types to size_binop. 11251 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes. 11252 112532000-02-26 Jason Merrill <jason@casey.cygnus.com> 11254 11255 Implement class scope using-declarations for functions. 11256 * class.c (handle_using_decl): Call add_method for used functions. 11257 Use IDENTIFIER_CLASS_VALUE to check for conflicts. 11258 (add_method): Used functions are hidden by local functions. 11259 (check_bases_and_members): Handle using-decls before finalizing 11260 CLASSTYPE_METHOD_VEC. 11261 * call.c (add_function_candidate): Add ctype parm; if non-zero, 11262 override the type of 'this' accordingly. 11263 (add_template_candidate, add_template_candidate_real): Add ctype parm. 11264 (convert_class_to_reference, build_user_type_conversion_1, 11265 build_new_function_call, build_object_call, build_new_op, 11266 build_new_method_call): Pass ctype parm. 11267 11268 * search.c (lookup_member): Put rval_binfo, not basetype_path, in 11269 the baselink. 11270 * call.c (convert_class_to_reference, build_user_type_conversion_1, 11271 build_new_function_call, build_object_call, build_new_op, 11272 build_new_method_call, build_op_delete_call): Don't get basetype_path 11273 from a baselink. 11274 * typeck.c (build_component_ref): Likewise. 11275 * init.c (build_offset_ref): Likewise. 11276 (resolve_offset_ref): Don't call enforce_access. 11277 Call build_scoped_ref. 11278 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it 11279 would cause an error or if -pedantic. 11280 * class.c (alter_access): Lose binfo parm. 11281 112822000-02-26 Mark Mitchell <mark@codesourcery.com> 11283 11284 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into 11285 types. 11286 112872000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at> 11288 11289 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info 11290 pseudo_type_info creation into the std namespace 11291 112922000-02-26 Mark Mitchell <mark@codesourcery.com> 11293 11294 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF. 11295 (import_export_class): Remove declaration. 11296 * decl2.c (import_export_class): Make it static. 11297 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR, 11298 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, 11299 EXPR_WITH_FILE_LOCATION. 11300 * lex.c (check_newline): Tweak filename/lineno setting. 11301 * semantics.c (begin_while_stmt): Fix typo in comment. 11302 11303Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 11304 11305 * lang-options.h (-fmessage-length=): Add missing option. 11306 11307 * Make-lang.in (CXX_SRCS): Add .h files and sort list. 11308 113092000-02-26 Zack Weinberg <zack@wolery.cumb.org> 11310 11311 * Make-lang.in: Delete refs to LIBGCC2_DEPS. 11312 11313Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com> 11314 11315 * optimize.c (expand_call_inline): Emit the return label before 11316 evaluating the return value. 11317 113182000-02-24 Mark Mitchell <mark@codesourcery.com> 11319 11320 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather 11321 than duplicating functionality here. 11322 * optimize.c: Include input.h. 11323 (expand_call_inline): Use push_srcloc and pop_srcloc. 11324 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note. 11325 * parse.c: Regenerated. 11326 * Makefile.in (lex.o): Depend on input.h. 11327 (optimize.o): Likewise. 11328 113292000-02-24 Nathan Sidwell <nathan@codesourcery.com> 11330 11331 * decl.c (grokdeclarator): Diagnose qualifiers on non-member 11332 function type, rather than ICE. 11333 113342000-02-23 Jason Merrill <jason@casey.cygnus.com> 11335 11336 * decl.c (grokdeclarator): Call decl_type_access_control. 11337 * parse.y (parse_end_decl): Don't call decl_type_access_control if 11338 decl is null. 11339 113402000-02-23 Nathan Sidwell <nathan@codesourcery.com> 11341 11342 * decl.c (decls_match): Remove obsolete static member nadgering. 11343 113442000-02-21 Martin v. L�wis <loewis@informatik.hu-berlin.de> 11345 11346 * decl.c (grokdeclarator): Change ANSI to ISO. 11347 * lex.c (consume_string, readescape, do_identifier): Likewise. 11348 (parse_float, real_yylex): Likewise. 11349 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise. 11350 (unary_expr, new_initializer, cast_expr, primary, primary_no_id, 11351 new_type_id, maybe_label_decls, simple_stmt, 11352 for.init.statement): Likewise. 11353 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise. 11354 * semantics.c (finish_named_return_value): Likewise. 11355 * parse.c: Regenerate. 11356 113572000-02-21 Mark Mitchell <mark@codesourcery.com> 11358 11359 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro. 11360 (CPTI_CLASS_STAR_TYPE): Remove. 11361 (vtable_index_type): Likewise. 11362 (class_star_type_node): Remove. 11363 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI. 11364 (build_binary_op_nodefault): Remove. 11365 * call.c (build_new_op): Use build_binary_op instead of 11366 build_binary_op_nodefault. 11367 * decl.c (init_decl_processing): Remove class_star_type_node 11368 initialization. Make delta_type_node ptrdiff_type_node under the 11369 new ABI. Initialize vtable_index_type. 11370 (build_ptrmemfunc_type): Build different structures for the new 11371 ABI. 11372 (build_enumerator): Use build_binary_op instead of 11373 build_binary_op_nodefault. 11374 * method.c (build_overload_value): Mangle pointers-to-members 11375 appropriately under the new ABI. 11376 * typeck.c (build_array_ref): Use build_binary_op instead of 11377 build_binary_op_nodefault. 11378 (get_member_function_from_ptrfunc): Adjust for the new ABI. 11379 (build_binary_op_nodefault): Rename to ... 11380 (build_binary_op): ... this. Remove old version. Adjust for 11381 pointer-to-member comparisons under the new ABI. 11382 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI. 11383 (build_ptrmemfunc): Adjust for the new ABI. 11384 (expand_ptrmemfunc_cst): Likewise. 11385 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI. 11386 (pfn_from_ptrmemfunc): Adjust for the new ABI. 11387 113882000-02-21 Gabriel Dos Reis <gdr@codesourcery.com> 11389 11390 * call.c (build_object_call): Compress consecutive calls to 11391 cp_error. 11392 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'. 11393 (build_op_delete_call): Adjust message formatting. 11394 11395 * class.c (check_bases): Compress consecutive calls to 11396 cp_pedwarn. 11397 (finish_struct_anon): Say 'ISO C++'. 11398 11399 * decl.c (start_decl): Same here. 11400 (grok_reference_init): Likewise. 11401 (grokfndecl): Correct message formatting. 11402 (grokfndecl): Improve diagnostic. 11403 (check_static_variable_definition): Likewise. Say 'ISO C++' 11404 (compute_array_index_type): Say 'ISO C++' 11405 (create_array_type_for_decl): Compress consecutive calls to 11406 cp_error. 11407 (grokdeclarator): Say 'ISO C++' 11408 (grok_op_properties): Likewise. 11409 11410 * decl2.c (delete_sanity): Clairify diagnostic. 11411 (check_member_template): Same here. 11412 (grok_function_init): Use consistent terminology. 11413 11414 * expr.c (do_case): Say 'ISO C++' 11415 11416 * friend.c (do_friend): Compress consecutive calls to warning. 11417 114182000-02-20 Mark Mitchell <mark@codesourcery.com> 11419 11420 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro. 11421 * class.c (build_secondary_vtable): Reorganize. Don't create a 11422 new vtable under the new ABI. 11423 (layout_vtable_decl): Don't add num_extra_vtbl_entries when 11424 computing the size. 11425 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return 11426 the initializing elements. 11427 (initialize_vtable): New function. 11428 (dfs_finish_vtbls): Use it. 11429 (dfs_accumulate_vtbl_inits): New function. 11430 (finish_vtbls): Merge primary and secondary vtables under the new 11431 ABI. 11432 (finish_struct_1): Remove redundant call to layout_vtable_decl. 11433 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that 11434 aren't VAR_DECLs. 11435 11436 * class.c (build_vtable): New function, split out from ... 11437 (get_vtable_decl): ... here, and ... 11438 (build_secondary_vtable): ... here. 11439 11440 * pt.c (tsubst_decl): Fix formatting. 11441 11442Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 11443 11444 * class.c (build_primary_vtable, layout_vtable_decl): Likewise. 11445 (avoid_overlap, build_base_field): Likewise. 11446 (build_base_field, build_base_fields, is_empty_class): 11447 Test DECL_SIZE with integer_zero. 11448 (layout_class_type): Set CLASSTYPE_SIZE_UNIT. 11449 * cp-tree.h (struct lang_type): New field size_unit. 11450 (CLASSTYPE_SIZE_UNIT): New macro. 11451 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT. 11452 (cp_finish_decl): Delete -Wlarger-than processing. 11453 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT. 11454 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT. 11455 * tree.c (make_binfo): binfo vector is one entry longer. 11456 (walk_tree): Walk DECL_SIZE_UNIT. 11457 114582000-02-19 Mark Mitchell <mark@codesourcery.com> 11459 11460 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in 11461 comment. 11462 (build_vtable_entry): Don't assume all vtable entries are 11463 functions. 11464 (build_vtbl_initializer): Adjust accordingly. 11465 (get_vtable_decl): Fix formatting. 11466 114672000-02-18 Jason Merrill <jason@casey.cygnus.com> 11468 11469 * semantics.c (deferred_type_access_control): Walk the entire 11470 type_lookups list. 11471 (save_type_access_control): Rename from 11472 initial_deferred_type_access_control. Just remember the value. 11473 (decl_type_access_control): New fn. 11474 (begin_function_definition): Use deferred_type_access_control, after 11475 we've started the function. Set type_lookups to error_mark_node. 11476 * parse.y (frob_specs, fn.def1): Adjust. 11477 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns. 11478 (parse_end_decl, parse_bitfield0, parse_method): New fns. 11479 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them. 11480 (after_type_component_declarator0): Likewise. 11481 (after_type_component_declarator): Likewise. 11482 (notype_component_declarator): Likewise. 11483 * cp-tree.h: Adjust. 11484 11485 * decl.c (redeclaration_error_message): Allow redeclaration of 11486 namespace-scope decls. 11487 114882000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de> 11489 11490 * typeck2.c (my_friendly_abort): Use GCCBUGURL. 11491 114922000-02-17 Mark Mitchell <mark@codesourcery.com> 11493 11494 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT. 11495 * decl2.c (grokclassfn): Likewise. 11496 11497 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS. 11498 11499 * decl2.c (lang_decode_option): Don't set default message length 11500 here. 11501 * lex.c (lang_init_options): Set it here. 11502 115032000-02-16 Mark Mitchell <mark@codesourcery.com> 11504 11505 Make DECL_CONTEXT mean the class in which a member function was 11506 declared, even for a virtual function. 11507 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust. 11508 (DECL_FRIEND_CONTEXT): New macro. 11509 (DECL_REAL_CONTEXT): Remove. 11510 (SET_DECL_FRIEND_CONTEXT): Likewise. 11511 (DECL_VIRTUAL_CONTEXT): Adjust. 11512 (DECL_CLASS_SCOPE_P): Use TYPE_P. 11513 (add_friends): Remove. 11514 (hack_decl_function_context): Likewise. 11515 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with 11516 CP_DECL_CONTEXT. 11517 (build_over_call): Fix indentation. Use DECL_CONTEXT 11518 instead of DECL_CLASS_CONTEXT. 11519 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise. 11520 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT. 11521 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 11522 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT. 11523 (build_base_field): Likewise. 11524 (finish_struct_1): Likewise. 11525 (build_self_reference): Likewise. 11526 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not 11527 DECL_REAL_CONTEXT. 11528 (pushtag): Use decl_function_context, not 11529 hack_decl_function_context. 11530 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. 11531 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT. 11532 (pushdecl): Remove bogus code. 11533 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT. 11534 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. 11535 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 11536 Use decl_function_context, nothack_decl_function_context. 11537 (grokvardecl): Don't set DECL_CLASS_CONTEXT. 11538 (grokdeclarator): Likewise. Use decl_function_context, not 11539 hack_decl_function_context. 11540 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT. 11541 (start_function): Use DECL_FRIEND_CONTEXT, not 11542 DECL_CLASS_CONTEXT. Use decl_function_context, not 11543 hack_decl_function_context. 11544 (finish_function): Use decl_function_context, not 11545 hack_decl_function_context. 11546 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not 11547 DECL_CLASS_CONTEXT. 11548 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT. 11549 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT. 11550 (grokfield): Likewise. 11551 (finish_builtin_type): Likewise. 11552 (finish_vtable_vardec): Use decl_function_context, not 11553 hack_decl_function_context. 11554 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 11555 (start_static_initialization_or_destruction): Likewise. 11556 (finish_static_initialization_or_destruction): Likewise. 11557 (mark_used): Adjust logic for deciding when to synthesize methods. 11558 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not 11559 DECL_REAL_CONTEXT. 11560 * error.c (dump_function_decl): Use DECL_CONTEXT, not 11561 DECL_CLASS_CONTEXT. 11562 * friend.c (is_friend): Likewise. 11563 (add_friends): Remove. 11564 (do_friend): Use SET_DECL_FRIEND_CONTEXT. 11565 * lex.c (begin_definition_of_inclass_inline): Use 11566 decl_function_context, not hack_decl_function_context. 11567 (process_next_inline): Likewise. 11568 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. 11569 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not 11570 DECL_CLASSS_CONTEXT. 11571 (hack_identifier): Likewise. 11572 (synthesize_method): Use decl_function_context, not 11573 hack_decl_function_context. 11574 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not 11575 DECL_REAL_CONTEXT. 11576 (is_member_template): Use decl_function_context, not 11577 hack_decl_function_context. Use DECL_CONTEXT, not 11578 DECL_CLASS_CONTEXT. 11579 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not 11580 DECL_CLASS_CONTEXT. 11581 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not 11582 DECL_REAL_CONTEXT. 11583 (push_template_decl_real): Likewise. 11584 (instantiate_class_template): Don't call add_friends. 11585 (tsubst_default_argument): Use DECL_CONTEXT, not 11586 DECL_REAL_CONTEXT. 11587 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT. 11588 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 11589 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not 11590 DECL_CLASS_CONTEXT. 11591 * repo.c (repo_inline_used): Likewise. 11592 * search.c (current_scope): Adjust for new _CONTEXT macros. 11593 (context_for_name_lookup): Use CP_DECL_CONTEXT, not 11594 DECL_REAL_CONTEXT. 11595 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 11596 (lookup_fnfields_here):Likewise. 11597 (check_final_overrider): Likewise. 11598 (init_vbase_pointers): Likewise. 11599 (virtual_context): Likewise. 11600 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT. 11601 (expand_body): Use decl_function_context, not 11602 hack_decl_function_context. 11603 * tree.c (hack_decl_function_context): Remove. 11604 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not 11605 DECL_CLASS_CONTEXT. 11606 * typeck2.c (error_not_base_type): Likewise. 11607 116082000-02-15 Jason Merrill <jason@casey.cygnus.com> 11609 11610 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE. 11611 116122000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 11613 11614 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h. 11615 116162000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk> 11617 11618 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec. 11619 116202000-01-16 Gabriel Dos Reis <gdr@codesourcery.com> 11621 11622 * decl2.c (lang_decode_option): Enable automatic line wrapping. 11623 116242000-02-13 Jason Merrill <jason@casey.cygnus.com> 11625 11626 * parse.y (frob_specs): Split out... 11627 (parse_decl): From here. 11628 (fn.def2): Call initial_deferred_type_access_control. 11629 (after_type_component_declarator0): Call frob_specs. 11630 (notype_component_declarator0): Likewise. 11631 * search.c (friend_accessible_p): Nested classes are friends of their 11632 enclosing classes. 11633 116342000-02-10 Mark Mitchell <mark@codesourcery.com> 11635 11636 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be 11637 used to create an implicit temporary. 11638 11639 * class.c (dfs_modify_vtables): Tweak calculation of functions to 11640 override. 11641 116422000-02-08 Nathan Sidwell <nathan@acm.org> 11643 11644 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to 11645 strip array element qualifiers too. 11646 116472000-02-07 Mark Mitchell <mark@codesourcery.com> 11648 11649 * decl.c (store_parm_decls): Don't build cleanups for parameters 11650 while processing_template_decl. 11651 116522000-02-07 Jason Merrill <jason@casey.cygnus.com> 11653 11654 * cp-tree.h (struct saved_scope): Add incomplete field. 11655 (namespace_scope_incomplete): New macro. 11656 * decl.c (pushdecl): Use it. 11657 (hack_incomplete_structures): Use it. See through artificial 11658 binding levels. 11659 (mark_saved_scope): Mark it. 11660 11661 Implement access control for nested types. 11662 * search.c (type_access_control): New fn. 11663 (accessible_p): Now we do perform access control for types. 11664 * semantics.c (deferred_type_access_control): New fn. 11665 (initial_deferred_type_access_control): New fn. 11666 (begin_function_definition): Call it. Add lookups parm. 11667 * decl.c (struct binding_level): Add this_class field. 11668 (pushlevel_class): Set it. 11669 (mark_binding_level): Mark it. 11670 (lookup_name_real): Use it. Call type_access_control. 11671 (mark_saved_scope): Mark lookups field. 11672 * cp-tree.h (flagged_type_tree): Add lookups field. 11673 (struct saved_scope): Add lookups field. 11674 (type_lookups): New macro. 11675 * parse.y (declmods): Now <ftype>. 11676 (parse_decl): Add lookups parm. Call 11677 initial_deferred_type_access_control. 11678 (lang_extdef): Clear type_lookups. 11679 (typed_declspecs, declmods, typespec): Set lookups field. 11680 (initdcl): Call deferred_type_access_control. 11681 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0, 11682 component_decl_1, named_parm): Adjust. 11683 * friend.c (is_friend): Nested classes are friends of their 11684 enclosing classes. 11685 11686 * class.c (currently_open_derived_class): New fn. 11687 * method.c (hack_identifier): Use it. 11688 11689 * lex.c (do_identifier): Remove obsolete code. 11690 11691 * parse.y (typed_typespecs): Propagate new_type_flag properly. 11692 116932000-02-05 Zack Weinberg <zack@wolery.cumb.org> 11694 11695 * tinfo.h: Remove apostrophes from C++ comment (xgettext 11696 thinks this file is plain C). 11697 116982000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 11699 11700 * Makefile.in (call.o): Depend on $(EXPR_H). 11701 11702 * call.c: Include "expr.h". 11703 11704 * class.c (dump_class_hierarchy): Add prototype. 11705 11706 * search.c (dfs_get_pure_virtuals): Likewise. 11707 117082000-02-1 Ulrich Drepper <drepper@redhat.com> 11709 11710 * parse.y (simple_stmt): Allow :: token in asm parameter list. 11711 * parse.c: Rebuilt. 11712 11713Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com> 11714 11715 * class.c (build_vtbl_or_vbase_field): New parameter fcontext. 11716 Store it in DECL_FCONTEXT. 11717 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers. 11718 117192000-01-31 Jason Merrill <jason@casey.cygnus.com> 11720 11721 * tinfo.h (old abi): #include "tconfig.h". 11722 * tinfo.cc (convert_to_base): Move into old abi section. 11723 117242000-01-31 Mark Mitchell <mark@codesourcery.com> 11725 11726 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation. 11727 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO. 11728 (BINFO_PRIMARY_BINFO): New macro. 11729 (BF_DELTA): Rename to ... 11730 (BV_DELTA): ... this. 11731 (BF_VCALL_INDEX): Rename to ... 11732 (BV_VCALL_INDEX): ... this. 11733 (BF_FN): Rename to ... 11734 (BV_FN): ... this. 11735 * class.c (build_vbase_path): Adjust for changes to reverse_path. 11736 (set_rtti_entry): Rename BF_ macros to BV_ variants. 11737 (modify_vtable_entry): Simplify. 11738 (add_virtual_function): Rename BF_ macros to BV_ variants. 11739 (build_vtable_initializer): Likewise. 11740 (get_class_offset_1): Remove. 11741 (dfs_get_class_offset): Likewise. 11742 (get_class_offset): Likewise. 11743 (dfs_find_final_overrider): New function. 11744 (find_final_overrider): Likewise. 11745 (modify_one_vtable): Remove. 11746 (dfs_find_base): New function. 11747 (dfs_modify_vtables): Fold modify_one_vtable in here. Use 11748 find_final_overrider. 11749 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new 11750 virtuals. 11751 (dfs_fixup_vtable_deltas): Remove. 11752 (override_one_vtable): Remove. 11753 (merge_overrides): Likewise. 11754 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for 11755 unreal chilren of virtual bases. 11756 (finish_struct_1): Don't use merge_overrides. Don't use 11757 dfs_fixup_vtable_deltas. 11758 * tree.c (reverse_path): Return a TREE_LIST, not a chain of 11759 BINFOs. 11760 117612000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl> 11762 Jason Merrill <jason@yorick.cygnus.com> 11763 11764 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT. 11765 117662000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at> 11767 11768 * exception.cc (__throw_bad_typeid): Add missing std::. 11769 117702000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 11771 11772 * cp-tree.h (make_thunk): PROTO -> PARAMS. 11773 117742000-01-31 Nathan Sidwell <sidwell@codesourcery.com> 11775 11776 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi. 11777 11778 Runtime support for new-abi rtti. 11779 * inc/typeinfo (type_info::operator!=): Define in class. 11780 (type_info::before, type_info::name, type_info::operator==, 11781 type_info::operator!=): Define new ABI implementations. 11782 (type_info::is_pointer_p, type_info::is_function_p): Declare 11783 new virtual functions. 11784 (type_info::do_catch, type_info::do_upcast): Likewise. 11785 11786 * tinfo.h (__base_class_info): Define new class. 11787 (__class_type_info): Likewise. 11788 (__si_class_type_info): Likewise. 11789 (__vmi_class_type_info): Likewise. 11790 (__dynamic_cast): Prototype. 11791 11792 * tinfo.cc: Conditionalize old and new rtti mechanisms. 11793 (type_info::is_pointer_p): Define new function. 11794 (type_info::is_function_p): Likewise. 11795 (type_info::do_catch): Likewise. 11796 (type_info::do_upcast): Likewise. 11797 (vtable_prefix): New structure for vtable access. 11798 (adjust_pointer): Define new template function. 11799 (contained_p, public_p, virtual_p, contained_public_p, 11800 contained_nonpublic_p, contained_nonvirtual_p): Define new 11801 functions. 11802 (nonvirtual_base_type): New local variable. 11803 (__class_type_info::~__class_type_info): Define. 11804 (__si_class_type_info::~__si_class_type_info): Likewise. 11805 (__vmi_class_type_info::~__vmi_class_type_info): Likewise. 11806 (__class_type_info::do_catch): Define new function. 11807 (__class_type_info::do_upcast): Likewise. 11808 (__class_type_info::find_public_src): Likewise. 11809 (__class_type_info::do_find_public_src): Likewise. 11810 (__si_class_type_info::do_find_public_src): Likewise. 11811 (__vmi_class_type_info::do_find_public_src): Likewise. 11812 (__class_type_info::do_dyncast): Likewise. 11813 (__si_class_type_info::do_dyncast): Likewise. 11814 (__vmi_class_type_info::do_dyncast): Likewise. 11815 (__class_type_info::do_upcast): Likewise. 11816 (__si_class_type_info::do_upcast): Likewise. 11817 (__vmi_class_type_info::do_upcast): Likewise. 11818 (__dynamic_cast): Likewise. 11819 11820 * tinfo2.cc (__fundamental_type_info): Define new class. 11821 (__pointer_type_info): Likewise. 11822 (__reference_type_info): Likewise. 11823 (__array_type_info): Likewise. 11824 (__function_type_info): Likewise. 11825 (__enum_type_info): Likewise. 11826 (__ptr_to_member_type_info): Likewise. 11827 (__fundamental_type_info::~__fundamental_type_info): Define. 11828 (__pointer_type_info::~__pointer_type_info): Likewise. 11829 (__reference_type_info::~__reference_type_info): Likewise. 11830 (__array_type_info::~__array_type_info): Likewise. 11831 (__function_type_info::~__function_type_info): Likewise. 11832 (__enum_type_info::~__enum_type_info): Likewise. 11833 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise. 11834 (__pointer_type_info::do_catch): Define new function. 11835 (__ptr_to_member_type_info::do_catch): Define new function. 11836 11837 (__throw_type_match_rtti_2): Use new ABI interface, if enabled. 11838 (__is_pointer): Likewise. 11839 11840 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti. 11841 118422000-01-30 Mark Mitchell <mark@codesourcery.com> 11843 11844 * cp/class.c (build_vtable): Rename to build_primary_vtable. 11845 (prepare_fresh_vtable): Rename to build_secondary_vtable. 11846 (make_new_vtable): New function. 11847 (modify_vtable_entry): Handle generation of new vtables correctly. 11848 (modify_one_vtable): Remove unused parameter. 11849 (dfs_fixup_vtable_deltas): Likewise. 11850 (override_one_vtable): Use build_secondary_vtable. 11851 (finish_struct_1): Use build_primary_vtable and 11852 build_secondary_vtable. 11853 118542000-01-28 Ulrich Drepper <drepper@redhat.com> 11855 11856 * cp/decl.c: Adjust variable names, comments, help strings. 11857 118582000-01-29 Nathan Sidwell <nathan@acm.org> 11859 11860 * new2.cc (operator delete[]): Use operator delete, don't assume 11861 implementation. 11862 118632000-01-29 Nathan Sidwell <sidwell@codesourcery.com> 11864 11865 * class.c (build_vtbl_initializer): Add argument to 11866 build_vtable_entry call. 11867 118682000-01-27 Mark Mitchell <mark@codesourcery.com> 11869 11870 * cp-tree.def (THUNK_DECL): Discuss vcall indices. 11871 * cp-tree.h (BINFO_VIRTUALS): Update documentation. 11872 (BF_DELTA): New macro. 11873 (BF_VCALL_INDEX): Likewise. 11874 (BF_FN): Likewise. 11875 (THUNK_VCALL_OFFSET): Likewise. 11876 (make_thunk): Change prototype. 11877 * class.c (build_vtable_entry): Integrate 11878 build_vtable_entry_for_fn. Handle vcall indices. 11879 (build_vtable_entry_for_fn): Remove. 11880 (set_rtti_entry): Handle vcall indices. Use BF_DELTA, 11881 BF_VCALL_INDEX, BF_FN. 11882 (modify_vtable_entry): Integrate common code from 11883 modify_one_vtable and dfs_fixup_vtable_deltas. 11884 (add_virtual_function): Set BF_VCALL_INDEX. 11885 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX, 11886 and BF_FN. 11887 (modify_one_vtable): Simplify. 11888 (dfs_fixup_vtable_deltas): Likewise. 11889 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 11890 * method.c (make_thunk): Handle vcall indices. 11891 118922000-01-28 Nathan Sidwell <sidwell@codesourcery.com> 11893 11894 Compiler side new abi rtti (not enabled). 11895 * cp-tree.h (new_abi_rtti_p): New macro. 11896 (emit_support_tinfos): Prototype new function. 11897 (tinfo_decl_p): Likewise. 11898 (emit_tinfo_decl): Likwise. 11899 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor 11900 macros. 11901 (doing_runtime): New local static. 11902 (init_rtti_processing): Add new-abi initializer. 11903 (get_tinfo_decl): Add new-abi logic. 11904 (tinfo_from_decl): Likewise. 11905 (build_dynamic_cast_1): Likewise. 11906 (qualifier_flags): New static function. 11907 (tinfo_base_init): Likewise. 11908 (generic_initializer): Likewise. 11909 (ptr_ref_initializer): Likewise. 11910 (ptmd_initializer): Likewise. 11911 (class_hint_flags): Likewise. 11912 (class_initializer): Likewise. 11913 (synthesize_tinfo_var): Likewise. 11914 (create_real_tinfo_var): Likewise. 11915 (create_pseudo_type_info): Likewise. 11916 (get_vmi_pseudo_type_info): Likewise. 11917 (create_tinfo_types): Likewise. 11918 (emit_support_tinfos): New global function. 11919 (tinfo_decl_p): New global predicate. 11920 (emit_tinfo_decl): New global function. 11921 * class.c (set_rtti_entry): Generalize for old and new rtti. 11922 (build_vtbl_initializer): Likewise. 11923 * decl2.c (finish_file): Likewise. 11924 11925Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com> 11926 11927 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t) 11928 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))). 11929 11930Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com> 11931 11932 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit 11933 for scopes. 11934 119352000-01-26 Jason Merrill <jason@casey.cygnus.com> 11936 11937 * pt.c (unify): Use fold, not maybe_fold_nontype_arg. 11938 11939Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk> 11940 11941 * optimize.c (calls_setjmp_r): Supply new argument 11942 to special_function_p. 11943 119442000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 11945 11946 * call.c: PROTO -> PARAMS. 11947 * class.c: Likewise. 11948 * cp-tree.h: Likewise. 11949 * cvt.c: Likewise. 11950 * decl.c: Likewise. 11951 * decl.h: Likewise. 11952 * decl2.c: Likewise. 11953 * dump.c: Likewise. 11954 * errfn.c: Likewise. 11955 * error.c: Likewise. 11956 * except.c: Likewise. 11957 * expr.c: Likewise. 11958 * init.c: Likewise. 11959 * input.c: Likewise. 11960 * lex.c: Likewise. 11961 * lex.h: Likewise. 11962 * method.c: Likewise. 11963 * optimize.c: Likewise. 11964 * parse.y: Likewise. 11965 * pt.c: Likewise. 11966 * repo.c: Likewise. 11967 * rtti.c: Likewise. 11968 * search.c: Likewise. 11969 * semantics.c: Likewise. 11970 * spew.c: Likewise. 11971 * tree.c: Likewise. 11972 * typeck.c: Likewise. 11973 * typeck2.c: Likewise. 11974 * xref.c: Likewise. 11975 119762000-01-25 Richard Henderson <rth@cygnus.com> 11977 11978 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR. 11979 119802000-01-25 Mark Mitchell <mark@codesourcery.com> 11981 11982 * cp-tree.h (vcall_offset_in_vtable_p): New macro. 11983 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment. 11984 (struct vcall_offset_data_s): New type. 11985 (dfs_vcall_offset_queue_p): New function. 11986 (dfs_build_vcall_offset_vtbl_entries): Likewise. 11987 (build_vcall_offset_vtbl_entries): Likewise. 11988 (layout_vtable_decl): Likewise. 11989 (num_vfun_entries): Likewise. 11990 (num_extra_vtbl_entries): Add the entries for vcall offsets. 11991 (build_vtbl_initializer): Likewise. 11992 (dfs_finish_vtabls): Use layout_vtable_decl. 11993 (modify_one_vtables): Always duplicate vtables under the new ABI. 11994 (finish_struct_1): Use layout_vtable_decl. 11995 119962000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 11997 11998 * decl.c (member_function_or_else): Change third arg from a format 11999 specifier to an `enum overload_flags'. Callers changed. 12000 120012000-01-25 Gabriel Dos Reis <gdr@codesourcery.com> 12002 12003 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof, 12004 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast, 12005 build_const_cast, get_delta_difference, check_return_expr): Avoid 12006 ANSI string concatenation usage. 12007 120082000-01-24 Mark Mitchell <mark@codesourcery.com> 12009 12010 * class.c (layout_class_type): Put the fields required to make a 12011 class non-empty at the end, not the beginning, of the TYPE_FIELDs 12012 list. 12013 120142000-01-24 Jason Merrill <jason@casey.cygnus.com> 12015 12016 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a 12017 template. 12018 12019 * decl2.c (mark_used): Do instantiate inlines that have been 12020 explicitly instantiated. 12021 120222000-01-24 Richard Henderson <rth@cygnus.com> 12023 12024 * call.c (build_over_call): Use expand_tree_builtin. 12025 * typeck.c (build_function_call_real): Likewise. 12026 (build_binary_op_nodefault): Handle unordered compares. 12027 120282000-01-24 Nathan Sidwell <sidwell@codesourcery.com> 12029 12030 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New 12031 cp_tree_index values. 12032 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node): 12033 New global node #defines for them. 12034 * rtti.c (call_void_fn): Replace with ... 12035 (build_runtime_decl): ... new static function. 12036 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl. 12037 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl. 12038 (build_dynamic_cast_1): Always produce correctly typed result. 12039 Explicitly produce type_info addresses. Use dynamic_cast_node. 12040 * exception.cc (__throw_bad_cast): Return `void *'. 12041 (__throw_bad_typeid): Return `const type_info &'. 12042 120432000-01-24 Nathan Sidwell <sidwell@codesourcery.com> 12044 12045 * cp-tree.h (get_vtable_decl): Prototype new function. 12046 * class.c (get_vtable_decl): New function. Broken out from ... 12047 (build_vtable): ... here. Use it. 12048 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created 12049 by get_vtable_decl. 12050 120512000-01-24 Nathan Sidwell <sidwell@codesourcery.com> 12052 12053 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE, 12054 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE, 12055 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations. 12056 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE, 12057 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE, 12058 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations. 12059 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ... 12060 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here. 12061 (CPTI_TINFO_VAR_ID): New enumeration. 12062 (__tp_desc_type_node, __access_mode_type_node, 12063 __bltn_desc_type_node, __user_desc_type_node, 12064 __class_desc_type_node, __ptr_desc_type_node, 12065 __attr_desc_type_node, __func_desc_type_node, 12066 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines. 12067 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node, 12068 ref_desc_type_node, ary_desc_type_node, func_desc_type_node, 12069 enum_desc_type_node, class_desc_type_node, 12070 si_class_desc_type_node, vmi_class_desc_type_node, 12071 ptmd_desc_type_node, base_desc_type_node): New #defines. 12072 (tinfo_fn_id, tinfo_fn_type): Rename to ... 12073 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust. 12074 (tinfo_var_id): New enumeration. 12075 (DECL_TINFO_FN_P): Augment comment. 12076 * decl.c (cp_global_trees): Adjust documentation. 12077 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id, 12078 tinfo_decl_type and tinfo_var_id. 12079 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type. 12080 (build_typeid): Remove unused variable. 12081 (get_tinfo_var): Use tinfo_var_id. 12082 (tinfo_name): New static function. 12083 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type. 12084 (tinfo_from_decl): Likewise. 12085 (get_base_offset): New static function, broken out of 12086 expand_class_desc. 12087 (expand_si_desc): Use tinfo_name. 12088 (expand_class_desc): Likewise. Lose local static variable. 12089 Use base_desc_type_node. Use get_base_offset. 12090 (expand_ptr_desc): Use tinfo_name. 12091 (expand_attr_desc): Likewise. 12092 (expand_generic_desc): Likewise. 12093 12094 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence. 12095 * tinfo.h (__GXX_ABI_VERSION): Test value and existence. 12096 120972000-01-23 Mark Mitchell <mark@codesourcery.com> 12098 12099 * cp-tree.h (__eprintf): Remove declaration. 12100 * tree.c (__eprintf): Remove definition. 12101 121022000-01-23 Zack Weinberg <zack@rabi.columbia.edu> 12103 Mark Mitchell <mark@codesourcery.com> 12104 12105 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N, 12106 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings. 12107 121082000-01-23 Brad Lucier <lucier@math.purdue.edu> 12109 12110 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly. 12111 121122000-01-23 Mark Mitchell <mark@codesourcery.com> 12113 12114 * cp-tree.h (register_dtor_fn): New function. 12115 * decl.c (destroy_local_static): Rename to ... 12116 (register_dtor_fn): ... this. Give it external linkage. 12117 (expand_static_init): Use it. 12118 * decl2.c (do_static_initialization): Likewise, if using 12119 __cxa_atexit. 12120 (do_static_destruction): Check that __cxa_atexit is not in use. 12121 (finish_file): Don't call do_static_destruction if using 12122 __cxa_atexit. 12123 12124 * typeck.c (convert_arguments): Restore two-message error 12125 reporting. 12126 121272000-01-20 Nathan Sidwell <sidwell@codesourcery.com> 12128 12129 Remap dynamic cast hint values to be consistent across ABIs. 12130 * search.c (dynamic_cast_base_recurse): Remap generated value. 12131 (get_dynamic_cast_base_type): Adjust documentation. 12132 * tinfo.h (__user_type_info::dyncast): Likewise. 12133 (__user_type_info::find_public_subobj): Remap BOFF meaning. 12134 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning. 12135 (__class_type_info::do_dyncast): Likewise. 12136 (__class_type_info::do_find_public_subobj): Likewise. 12137 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter. 12138 121392000-01-19 Gabriel Dos Reis <gdr@codesourcery.com> 12140 12141 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn. 12142 12143 * typeck2.c (incomplete_type_error): Restore previous 12144 cp_error and cp_error_at call sequence. 12145 121462000-01-20 Brad Lucier <lucier@math.purdue.edu> 12147 12148 * class.c (dump_class_hierarchy): Make format agree with argument; 12149 cast pointer to unsigned long and print with %lx. 12150 121512000-01-19 Gabriel Dos Reis <gdr@codesourcery.com> 12152 12153 * decl2.c (lang_decode_option): Set default line-wrap length to 72. 12154 12155 * typeck.c (composite_pointer_type, common_type, 12156 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref, 12157 build_function_call_real, convert_arguments, 12158 build_binary_op_nodefault, pointer_int_sum, pointer_diff, 12159 build_unary_op, mark_addressable, build_compound_expr, 12160 build_static_cast, build_reinterpret_cast, build_const_cast, 12161 build_c_cast, build_modify_expr, get_delta_difference, 12162 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 12163 'ISO C++'. Fusion consecutive calls to diagnostic message routines 12164 into a single one. 12165 * typeck2.c (readonly_error, abstract_virtuals_error, 12166 process_init_constructor, check_for_new_type): Likewise. 12167 121682000-01-19 Mark Mitchell <mark@codesourcery.com> 12169 12170 * tree.c (bot_manip): Set DECL_CONTEXT for newly created 12171 VAR_DECLs. 12172 121732000-01-18 Nathan Sidwell <sidwell@codesourcery.com> 12174 12175 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype. 12176 (build_x_typeid): Likewise. 12177 (get_tinfo_fn): Likewise. 12178 (get_tinfo_fn_unused): Rename to ... 12179 (get_tinfo_decl): ... here. 12180 * rtti.c (build_headof): Replace logic error with assertion. 12181 (get_tinfo_fn_dynamic): Rename to ... 12182 (get_tinfo_decl_dynamic): ... here. Make static. Use 12183 complete_type_or_else. 12184 (build_x_typeid): Move into ... 12185 (build_typeid): ... here. Adjust call to 12186 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify 12187 throw_bad_typeid expression. 12188 (get_tinfo_fn_unused): Rename to ... 12189 (get_tinfo_decl): ... here. Adjust comment. 12190 (get_tinfo_fn): Delete. 12191 (tinfo_from_decl): New static function. 12192 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl. 12193 (get_typeid): Use complete_type_or_else. 12194 (build_dynamic_cast_1): Adjust calls to 12195 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression. 12196 * parse.y (primary): Adjust call to build_typeid. 12197 * except.c (build_eh_type_type_ref): Adjust call to 12198 get_tinfo_decl. Mark as used. 12199 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl. 12200 * decl2.c (build_expr_from_tree): Adjust call to build_typeid. 12201 * parse.c: Regenerated. 12202 122032000-01-17 Mark Mitchell <mark@codesourcery.com> 12204 12205 * class.c (fixed_type_or_null): Don't clear NONNULL. Document 12206 calling convention. 12207 (resolves_to_fixed_type_p): Document calling convention. 12208 * rtti.c (build_x_typeid): Initialize NONNULL. 12209 12210 * cp-tree.h (build_shared_int_cst): New function. 12211 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity. 12212 * class.c (modify_vtable_entry): Likewise. 12213 (add_virtual_function): Split out code to generated shared 12214 INTEGER_CSTs to build_share_int_cst. 12215 (modify_all_vtables): Handle all the overridden functions here. 12216 Add overridden functions from non-primary virtual bases to the 12217 primary vtable. 12218 (finish_struct_1): Adjust call to modify_all_vtables. Add 12219 overridden functions from non-primary bases to the vtable. 12220 * tree.c (build_shared_int_cst): New function. 12221 12222 * cp-tree.h (scratchalloc): Remove. 12223 (build_scratch_list): Likewise. 12224 * call.c (convert_class_to_reference): Replace build_scratch_list 12225 and build_expr_list with build_tree_list. 12226 (add_candidate): Replace scratchalloc with expralloc. Note memory 12227 leak. 12228 (build_user_type_conversion_1): Replace build_scratch_list 12229 and build_expr_list with build_tree_list. 12230 (build_new_op): Likewise. 12231 (build_op_delete_call): Likewise. 12232 (convert_like): Likewise. 12233 * cvt.c (ocp_convert): Likewise. 12234 * decl.c (start_decl): Likewise. 12235 (start_function): Likewise. 12236 (finish_destructor_body): Likewise. 12237 (maybe_build_cleanup_1): Likewise. 12238 * decl2.c (reparse_decl_as_expr): Likewise. 12239 * init.c (perform_member_init): Likewise. 12240 (expand_cleanup_for_base): Likewise. 12241 (build_builtin_delete_call): Likewise. 12242 (build_new_1): Likewise. 12243 (build_delete): Likewise. 12244 * method.c (do_build_assign_ref): Likewise. 12245 * parse.y (already_scoped_stmt): Likewise. 12246 (nontrivial_exprlist): Likewise. 12247 (net_initializer): Likewise. 12248 (initlist): Likewise. 12249 * parse.c: Regenerated. 12250 * rtti.c (build_x_typeid): Likewise. 12251 (build_dynamic_cast_1): Likewise. 12252 * typeck.c (build_x_compound_expr): Likewise. 12253 (build_static_cast): Likewise. 12254 (build_modify_expr): Likewise. 12255 12256 * cp-tree.h (DECL_VINDEX): Add documentation. 12257 * class.c (build_vtable_entry): Likewise. 12258 (start_vtable): Add comment. 12259 (add_virtual_function): Replace pending_hard_virtuals with 12260 overridden_virtuals and pending_virtuals with new_virtuals. 12261 Replace redundant assignments with assertions. 12262 (check_for_override): Add comment. 12263 (check_bases_and_members): Replace pending_hard_virtuals with 12264 overridden_virtuals and pending_virtuals with new_virtuals. 12265 (create_vtbl_ptr): Likewise. 12266 (layout_class_type): Likewise. 12267 (finish_struct_1): Likewise. Add comments. 12268 122692000-01-16 Mark Mitchell <mark@codesourcery.com> 12270 12271 * class.c (finish_struct_1): Replace redundant code with 12272 assertions. 12273 12274 * cp-tree.h (flag_new_abi): Move. 12275 (flag_use_cxa_atexit): Likewise. 12276 (flag_honor_std): Likewise. 12277 (flag_rtti): Likewise. 12278 (vbase_offsets_in_vtable_p): Define. 12279 (vptrs_present_everywhere_p): Likewise. 12280 (TYPE_CONTAINS_VPTR_P): Likewise. 12281 (dfs_walk_real): Declare. 12282 * class.c (build_vbase_pointer_fields): Check 12283 vbase_offsets_in_vtable_p. 12284 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in 12285 BINFO_VPTR_FIELD. 12286 (build_vbase_offset_vtbl_entries): Simplify. 12287 (build_vbase_offset_vtbl_entries): Adjust. 12288 (build_vbase_pointer): Add ability to look up vbase offsets in 12289 vtable. 12290 (start_vtable): New function. 12291 (add_virtual_function): Use it. 12292 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P. 12293 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p. 12294 (build_vtbl_initializer): Take the type of the complete object as 12295 input. Use it to correctly calculate vbase offsets. 12296 (dfs_finish_vtbls): Pass the complete type to 12297 build_vtbl_initializer. 12298 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P. 12299 (create_vtable_ptr): Create a vtable even if there are no 12300 new virtual functions, under the new ABI. 12301 (finish_struct_1): Likewise. 12302 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P. 12303 * decl.c (exapnd_static_init): Remove call to 12304 preserve_initializer. 12305 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in 12306 vtables. 12307 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order. 12308 (expand_virtual_init): Use vbase_offsets_in_vtable_p. 12309 (construct_virtual_bases): Don't initialize virtual base pointers 12310 under the new ABI. 12311 (build_aggr_init): Clean up comment. 12312 (expand_aggr_init_1): Likewise. 12313 * rtti.c (expand_class_desc): Store the virtual function table 12314 index where the vbase offset lives in the offset field. 12315 * search.c (dfs_walk_real): Make it global. 12316 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P. 12317 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD. 12318 12319 * tinfo.h (USItype): Make it signed under the new ABI. 12320 * tinfo.cc (convert_to_base): New function. Encapsulate base 12321 conversion logic here. 12322 (__class_type_info::do_upcast): Use it. 12323 (__class_type_info::do_dyncast): Likewise. 12324 (__class_type_info::do_find_public_subobj): Likewise. 12325 12326 * init.c (construct_virtual_bases): Don't look up the addresses of 12327 virtual bases at run-time. 12328 12329 * class.c (build_vbase_pointer): Relocate. 12330 (build_vbase_pointer_fields): Likewise. 12331 (dfs_build_vbase_offset_vtbl_entries): Likewise. 12332 (build_vbase_offset_vtbl_entries): Likewise. 12333 12334 * decl.c (init_decl_processing): Complain if -fnew-abi 12335 -fno-vtable-thunks is used. 12336 12337 * decl2.c (lang_decode_option): Don't couple flag_honor_std to 12338 flag_new_abi. 12339 123402000-01-15 Mark Mitchell <mark@codesourcery.com> 12341 12342 * cp-tree.h (num_extra_vtbl_entries): New function. 12343 (size_extra_vtbl_entries): Likewise. 12344 (dfs_vtable_path_unmark): Likewise. 12345 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise. 12346 (dfs_vtable_path_marked_real_bases_queue_p): Likewise. 12347 * class.c (num_extra_vtbl_entries): New function. 12348 (size_extra_vtbl_entries): Likewise. 12349 (dfs_build_vbase_offset_vtbl_entries): New function. 12350 (build_vbase_offset_vtbl_entries): Likewise. 12351 (build_vtbl_initializer): Use it. 12352 (finish_struct_1): Adjust vtable sizes (using 12353 num_extra_vtbl_entries). 12354 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a 12355 THUNK_DECL is non-NULL before expanding it. 12356 * init.c (expand_virtual_init): Adjust the vtable pointer by 12357 size_extra_vtbl_entries before storing it. 12358 * search.c (get_shared_vase_if_not_primary): Adjust prototype. 12359 Handle TREE_LIST parameters here, not in the dfs_* functions. 12360 (dfs_unmarked_real_bases_queue_p): Adjust. 12361 (dfs_marked_real_bases_queue_p): Likewise. 12362 (dfs_vtable_path_unmarked_real_bases_queue_p): New function. 12363 (dfs_vtable_path_marked_real_bases_queue_p): New function. 12364 (dfs_vtable_path_unmark): Likewise. 12365 123662000-01-14 Mark Mitchell <mark@codesourcery.com> 12367 12368 * optimize.c (copy_body_r): Clear the operand three of a 12369 TARGET_EXPR when copying it. 12370 123712000-01-14 Martin v. L�wis <loewis@informatik.hu-berlin.de> 12372 12373 * method.c (build_decl_overload_real): Check whether we are in :: 12374 before returning __builtin_new/delete. 12375 123762000-01-13 Mark Mitchell <mark@codesourcery.com> 12377 12378 * pt.c (tsubst_friend_function): Improve comment. 12379 (instantiate_decl): Avoid crashing when a "nested" function is 12380 instantiated from the top level. 12381 12382 * dump.c (dqeueue_and_dump): Dump 12383 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION. 12384 123852000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12386 12387 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'. 12388 123892000-01-13 Nathan Sidwell <sidwell@codesourcery.com> 12390 12391 * g++spec.c (lang_specific_driver): Add -fnew-abi if 12392 ENABLE_NEW_GXX_ABI defined. 12393 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o, 12394 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o, 12395 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch. 12396 123972000-01-12 Mark Mitchell <mark@codesourcery.com> 12398 12399 * decl.c (start_cleanup_fn): Call pushdecl. 12400 12401 * call.c (convert_class_to_reference): Fix typos. 12402 (build_conditional_expr): Handle errors gracefully. 12403 * class.c (push_nested_class): Likewise. 12404 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro. 12405 (DECL_THIS_EXTERN): Use it. 12406 (DECL_THIS_STATIC): Likewise. 12407 * cvt.c (convert_to_void): Handle errors gracefully. 12408 (build_expr_type_conversion): Likewise. 12409 * decl.c (maybe_push_decl): Likewise. 12410 (start_decl_1): Likewise. 12411 (require_complete_types_for_parms): Likewise. 12412 * parse.y (structsp): Likewise. 12413 (base_class): Likewise. 12414 * parse.c: Regenerated. 12415 * pt.c (finish_member_template_decl): Likewise. 12416 * typeck.c (decay_conversion): Likewise. 12417 12418 * cp-tree.h (dfs_skip_vbases): New function. 12419 (find_vbase_instance): Likewise. 12420 * class.c (determine_primary_base): Allow a nearly empty base to 12421 serve as a primary base class under the new ABI. 12422 (get_class_offset_1): Rename to ... 12423 (dfs_get_class_offset): ... this. Simplify. Don't issue error 12424 messages here. 12425 (get_class_offset): Use it. Issue error messages here. 12426 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to 12427 find the right copies of virtual bases. 12428 (fixup_vtable_deltas1): Rename to ... 12429 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual 12430 bases as primary bases. 12431 (fixup_vtable_deltas): Remove. 12432 (override_one_vtable): Handle virtual bases as primary bases. 12433 (merge_overrides): Likewise. 12434 (finish_struct_1): Likewise. 12435 (dump_class_hierarchy): Dump primary-ness of bases as well. 12436 * search.c (mark_primary_bases): Use a pre-order traversal to 12437 handle primary virtual bases. 12438 (dfs_skip_vbases): New fiunction. 12439 (expand_upcast_fixups): Adjust to handle primary virtual bases. 12440 (fixup_virtual_upcast_offsets): Likewise. 12441 (fixup_all_virtual_upcast_offsets): Likewise. 12442 (dfs_find_vbase_instances): New function. 12443 (find_vbase_instance): Likewise. 12444 124452000-01-11 Mumit Khan <khan@xraylith.wisc.edu> 12446 12447 * lex.c (DIR_SEPARATOR): Delete macro. 12448 124492000-01-12 Gabriel Dos Reis <gdr@codesourcery.com> 12450 12451 * decl2.c (lang_decode_option): Handle automatic line wrapping 12452 option. 12453 124542000-01-11 Mark Mitchell <mark@codesourcery.com> 12455 12456 * friend.c (do_friend): Don't resolve scopes when processing 12457 template declarations, even if the qualifying scope doesn't 12458 involve template parameters. 12459 124602000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com> 12461 12462 * class.c (dfs_modify_vtables_queue_p): Remove. 12463 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p 12464 and dfs_marked_real_bases_queue_p instead of 12465 dfs_modify_vtables_queue_p. 12466 12467 * class.c (build_vbase_path): Simplify. 12468 (dfs_propagate_binfo_offsets): New function. 12469 (propagate_binfo_offsets): Use it. 12470 (remove_base_field): Simplify. 12471 (dfs_set_offset_for_vbases): Remove. 12472 (dfs_set_offset_for_shared_vbases): New function. 12473 (dfs_set_offset_for_unshared_vbases): Likewise. 12474 (layout_virtual_bases): Use them. 12475 (layout_basetypes): Don't call propagate_binfo_offsets. 12476 * search.c (dfs_get_vbase_types): Clone completely fresh binfos 12477 for the vbases. 12478 12479 * class.c (build_base_field): New function, split out from ... 12480 (build_base_fields): ... here. Use it. Allocate primary bases 12481 first, under the new ABI. 12482 (get_vtable_entry): Remove. 12483 (remove_base_field): New function, split out from ... 12484 (remove_base_fields): ... here. Adjust since primary bases come 12485 first under the new ABI. 12486 12487 * cp-tree.h (expand_direct_vtbls_init): Remove declaration. 12488 (initialize_vtbl_ptrs): New function. 12489 (expand_indirect_vtbls_init): Change prototype. 12490 (convert_pointer_to_vbase): Declare. 12491 * init.c (expand_direct_vtbls_init): Remove. 12492 (dfs_initialize_vtbl_ptrs): New function. 12493 (initialize_vtbl_ptrs): Likewise. 12494 (emit_base_init): Use initialize_vtbl_ptrs. 12495 * search.c (convert_pointer_to_vbase): Make it global. 12496 (expand_indirect_vtbls_init): Remove vtable initialization code. 12497 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs. 12498 12499 * class.c (dfs_finish_vtbls): New function. 12500 (finish_vtbls): Use it. 12501 (dump_class_hierarchy): New function. 12502 12503 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition. 12504 (BINFO_VBASE_PRIMARY_P): New macro. 12505 (BINFO_VIRTUALS): Add to documentation. 12506 (SET_BINFO_PRIMARY_MARKED_P): Remove. 12507 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. 12508 (dfs_mark_primary_bases_queue_p): Likewise. 12509 (dfs_unmarked_real_bases_queue_p): New function. 12510 (dfs_marked_real_bases_queue_p): Likewise. 12511 * search.c (dfs_mark_primary_bases): Adjust. 12512 (mark_primary_bases): Likewise. 12513 (get_shared_vbase_if_not_primary): New function. 12514 (dfs_unmarked_real_bases_queue_p): Likewise. 12515 (dfs_marked_real_bases_queue_p): Likewise. 12516 (dfs_get_pure_virtuals): Simplify. 12517 (get_pure_virtuals): Likewise. 12518 125192000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12520 12521 * lex.c: Include tm_p.h. 12522 125232000-01-07 Nathan Sidwell <sidwell@codesourcery.com> 12524 12525 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro. 12526 125272000-01-06 Jason Merrill <jason@casey.cygnus.com> 12528 12529 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT. 12530 * pt.c (instantiate_decl): Defer comdat templates that might not be 12531 needed. 12532 12533 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT. 12534 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT. 12535 (finish_file): Likewise. 12536 12537 * decl2.c (import_export_class): Undo 12/14 change. 12538 12539 * error.c (dump_decl): operator new, not operatornew. 12540 12541 * class.c (field_decl_cmp): A nontype is "greater" than a type. 12542 * search.c (lookup_field_1): Look for the last field with the 12543 desired name. 12544 125452000-01-05 Nathan Sidwell <nathan@acm.org> 12546 12547 * decl2.c (lookup_arg_dependent): Deal with FNS not being a 12548 FUNCTION_DECL. 12549 125502000-01-05 Nathan Sidwell <nathan@acm.org> 12551 12552 * typeck.c (build_static_cast): Don't strip target qualifiers 12553 when casting from a class. 12554 125552000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12556 12557 * class.c (warn_hidden): Initialize variable `fndecl'. 12558 125592000-01-03 Ulrich Drepper <drepper@cygnus.com> 12560 12561 * decl.c (flag_isoc9x): New variable to be able to use code in 12562 c-common.c. For now always zero. 12563 125642000-01-03 Mark Mitchell <mark@codesourcery.com> 12565 12566 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation. 12567 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN 12568 or unshare_base_binfos for virtual bases here. 12569 * search.c (dfs_get_vbase_types): Do it here. 12570 (get_vbase_types): Adjust. 12571 125722000-01-02 Mark Mitchell <mark@codesourcery.com> 12573 12574 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition. 12575 (BINFO_PRIMARY_MARKED_P): Use flag 5. 12576 (SET_BINFO_PRIMARY_MARKED_P): Likewise. 12577 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. 12578 (unmark_primary_bases): Remove declaration. 12579 (unmarkedp): Declare. 12580 (dfs_vbase_unmark): Likewise. 12581 * class.c (determine_primary_base): Return immediately if there 12582 are no base classes. Call mark_primary_bases here. 12583 (modify_all_direct_vtables): Remove. 12584 (modify_all_indirect_vtables): Remove. 12585 (dfs_modify_vtables_queue_p): New function. 12586 (dfs_modify_vtables): New function. 12587 (modify_all_vtables): Use them. 12588 (build_base_fields): Build FIELD_DECLs for primary virtual base 12589 classes. 12590 (create_vtable_ptr): Don't call determine_primary_base here. 12591 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ... 12592 (dfs_set_offset_for_vbases): ... this. 12593 (layout_virtual_bases): Use it. 12594 (layout_class_type): Call determine_primary_base here. 12595 * search.c (unmarkedp): Make it global. 12596 (shared_marked_p): Simplify. 12597 (shared_unmarked_p): Likewise. 12598 (dfs_primary_bases_queue_p): Remove. 12599 (dfs_unmark_primary_bases): Likewise. 12600 (unmark_primary_bases): Likewise. 12601 (mark_primary_bases): Simplify. 12602 (get_pure_virtuals): Don't call mark_primary_bases here. 12603 (dfs_vbase_unmark): New function. 12604 (get_vbase_types): Simplify. 12605 12606 * class.c (struct base_info): Remove. 12607 (determine_primary_base): Take has_virtual_p rather than a 12608 base_info as input. Don't calculate max_has_virtual. 12609 (finish_struct_bits): Remove max_has_virtual argument. 12610 (create_vtable_ptr): Remove max_has_virtual_p argument. 12611 (layout_virtual_bases): Remove max argument. 12612 (layout_basetypes): Likewise. 12613 (layout_class_type): Remove max_has_virtual_p argument. 12614 (finish_struct_1): Remove max_has_virtual. 12615 12616 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function. 12617 (layout_basetypes): Remove. 12618 * class.c (propagate_binfo_offsets): Moved here from tree.c. 12619 Update to handle primary virtual bases. 12620 (remove_base_fields): New function, split out from 12621 layout_basetypes. 12622 (dfs_mark_primary_bases_and_set_vbase_offsets): New function. 12623 (layout_virtual_bases): New function, split out from 12624 layout_basetypes. Update to handle primary virtual bases. 12625 (layout_basetypes): Moved here from tree.c. Use 12626 remove_base_fields and layout_virtual_bases. 12627 * search.c (dfs_mark_primary_bases_queue_p): New function. 12628 (mark_primary_bases): Use it. 12629 * tree.c (CEIL): Remove. 12630 (propagate_binfo_offsets): Remove. 12631 (layout_basetypes): Remove. 12632 126332000-01-01 Mark Mitchell <mark@codesourcery.com> 12634 12635 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES. 12636 (BINFO_PRIMARY_MARKED_P): New macro. 12637 (SET_BINFO_PRIMARY_MARKED_P): Likewise. 12638 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. 12639 (mark_primary_bases): New function. 12640 (unmark_primary_bases): Likewise. 12641 * search.c (get_abstract_virtuals_1): Remove. 12642 (dfs_mark_primary_bases): New function. 12643 (mark_primary_bases): Likewise. 12644 (dfs_unmark_primary_bases): Likewise. 12645 (unmark_primary_bases): Likewise. 12646 (dfs_get_pure_virtuals): Likewise. 12647 126482000-01-01 Mark Mitchell <mark@codesourcery.com> 12649 12650 * cp-tree.h (skip_rtti_stuff): Adjust prototype. 12651 * class.c (skip_rtti_stuff): Reorganize parameters and return value. 12652 (modify_one_vtable): Adjust. 12653 (fixup_vtable_deltas1): Likewise. 12654 (override_one_vtable): Likewise. 12655 * search.c (get_abstract_virtuals_1): Likewise. 12656 (get_pure_virtuals): Likewise. 12657 (expand_upcast_fixups): Likewise. 12658 * tree.c (debug_binfo): Likewise. 12659 12660 * class.c (build_vtable): Don't return a value. Don't rebuild 12661 vtables for bases that have already been handled. 12662 (prepare_fresh_vtable): Don't rebuild vtables for bases that have 12663 already been handled. 12664 (modify_one_vtable): Adjust accordingly. 12665 (fixup_vtable_deltas1): Likewise. 12666 (finish_struct_1): Likewise. 12667 126682000-01-01 Martin v. L�wis <loewis@informatik.hu-berlin.de> 12669 12670 * call.c (build_new_method_call): Also check destructors. 12671