ChangeLog revision 110611
12003-02-05 Release Manager 2 3 * GCC 3.2.2 Released. 4 52003-02-03 Mark Mitchell <mark@codesourcery.com> 6 7 PR C++/7129 8 * operators.def: Add <?= and >?=. 9 102003-01-28 Christian Cornelssen <ccorn@cs.tu-berlin.de> 11 12 * Make-lang.in (c++.install-common, c++.install-man) 13 (c++.uninstall): Prepend $(DESTDIR) to destination paths 14 in all (un)installation commands. 15 (c++.install-common): Rewrite $(LN) commands to support 16 DESTDIR with "ln" as well as with "ln -s". 17 182003-01-22 Mark Mitchell <mark@codesourcery.com> 19 20 PR c++/9328 21 * error.c (dump_decl): For an OVERLOAD, just print the name of the 22 function; it doesn't make sense to try to print its type. 23 * semantics.c (finish_typeof): Issue errors about invalid uses. 24 252003-01-21 Jeffrey D. Oldham <oldham@codesourcery.com> 26 27 PR c++/47 28 * cp-tree.h (lookup_nested_field): Add declaration. 29 * decl.c (lookup_name_real): Call lookup_nested_field. 30 * search.c (lookup_nested_field): Add function. 31 322002-12-26 Nathan Sidwell <nathan@codesourcery.com> 33 34 PR c++/8503 35 Remove DR 295 implementation. 36 * pt.c (check_cv_quals_for_unify): Disable function & method cases. 37 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn 38 about ignoring volatile qualifiers. 39 402002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 41 42 * parse.y (bad_parm): Add missing argument to error function call. 43 442002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 45 46 PR c++/8442 47 * decl2.c (handle_class_head): Verify if the looked up name is a 48 type or template. 49 * pt.c (convert_template_argument): Fix type or template template 50 parameter decision logic. 51 522002-12-13 Joe Buck <jbuck@synopsys.com> 53 54 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for 55 anonymous structs. 56 572002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net> 58 59 PR C++/8031 60 * cvt.c (convert_to_pointer_force): Don't try comparing against 61 erronous type. 62 632002-12-10 Mark Mitchell <mark@codesourcery.com> 64 65 PR c++/8372 66 * pt.c (tsubst_copy): Handle destructor names more correctly. 67 682002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 69 70 * error.c (dump_expr): Fix format specifier warning. 71 722002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net> 73 74 PR C++/8799 75 * error.c (dump_expr): Don't ever try to dump a non-existent 76 expression. 77 782002-12-02 Mark Mitchell <mark@codesourcery.com> 79 80 PR c++/8615 81 * error.c (dump_expr): Handle character constants with 82 TREE_OVERFLOW set. 83 842002-12-01 Mark Mitchell <mark@codesourcery.com> 85 86 PR c++/5919 87 * pt.c (unify): Use variably_modified_type_p to test validity of 88 template argument types. 89 902002-12-01 Mark Mitchell <mark@codesourcery.com> 91 92 PR c++/8727 93 * cp-tree.h (lang_type_class): Add typeinfo_var. 94 (CLASSTYPE_TYPEINFO_VAR): New macro. 95 * rtti.c (get_tinfo_decl): Use it. 96 97 PR c++/8663 98 * init.c (expand_member_init): Always get the main variant of a 99 base class. 100 1012002-12-01 Mark Mitchell <mark@codesourcery.com> 102 103 PR c++/8332 104 PR c++/8493 105 * decl.c (cxx_init_decl_processing): Use size_type_node, not 106 c_size_type_node. 107 * decl2.c (coerce_new_type): Likewise. 108 * except.c (do_allocate_exception): Likewise. 109 * typeck.c (c_sizeof): Likewise. 110 (c_sizeof_nowarn): Likewise. 111 1122002-11-30 Mark Mitchell <mark@codesourcery.com> 113 114 PR c++/8214 115 * typeck.c (convert_for_assignment): Do not use 116 decl_constant_value on the operand. 117 1182002-11-19 Release Manager 119 120 * GCC 3.2.1 Released. 121 1222002-11-19 Release Manager 123 124 * GCC 3.2.1 Released. 125 1262002-11-18 Release Manager 127 128 * GCC 3.2.1 Released. 129 1302002-11-11 Nathan Sidwell <nathan@codesourcery.com> 131 132 PR c++/7788 133 * rtti.c (unemitted_tinfo_decl_p): Check it has a field. 134 1352002-11-02 Zack Weinberg <zack@codesourcery.com> 136 137 PR c/7353 redux 138 * decl2.c (grokfield): Reject TYPE_DECLs with initializers. 139 1402002-11-01 Gabriel Dos Reis <gdr@integrable-solutions.net> 141 142 PR C++/2521 143 * typeck.c (build_x_unary_op): Handle pointer-to-member. 144 1452002-10-30 Mark Mitchell <mark@codesourcery.com> 146 147 PR c++/8160 148 * typeck2.c (process_init_constructor): Call complete_array_type. 149 150 PR c++/8149 151 * decl.c (make_typename_type): Issue errors about invalid results. 152 1532002-10-29 Mark Mitchell <mark@codesourcery.com> 154 155 PR c++/8287 156 * decl.c (finish_destructor_body): Create the label to jump to 157 when returning from a destructor here. 158 (finish_function_body): Rather than here. 159 160 * semantics.c (finish_alignof): Call complete_type before calling 161 c_alignof. 162 * decl2.c (build_expr_from_tree): Use 163 finish_sizeof/finish_alignof. 164 1652002-10-10 Jim Wilson <wilson@redhat.com> 166 167 * decl.c (duplicate_decls): Don't call decl_attributes. 168 1692002-10-25 Zack Weinberg <zack@codesourcery.com> 170 171 PR middle-end/6994 172 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for 173 variably_modified_type_p. 174 * cp-tree.h: Remove prototype of variably_modified_type_p. 175 * tree.c (variably_modified_type_p): Remove; now implemented 176 in language-independent code. 177 178 PR c++/7266 179 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a 180 SCOPE_REF is not null before dereferencing it. 181 1822002-10-24 David Edelsohn <edelsohn@gnu.org> 183 184 PR c++/7228 185 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that 186 lang_type structure exists before accessing field. 187 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro. 188 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar. 189 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro. 190 * class.c (check_field_decls): Use new macros. 191 * typeck2.c (process_init_constructor): Remove redundant check for 192 existence of lang_type structure. 193 1942002-10-23 Mark Mitchell <mark@codesourcery.com> 195 196 PR c++/8067 197 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and 198 related variables. 199 2002002-10-23 Mark Mitchell <mark@codesourcery.com> 201 202 PR c++/7679 203 * spew.c (next_token): Do not return an endless stream of 204 END_OF_SAVED_INPUT tokens. 205 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of 206 the cached token stream. 207 (snarf_defarg): Likewise. 208 2092002-10-22 Mark Mitchell <mark@codesourcery.com> 210 211 PR c++/6579 212 * spew.c (snarf_parenthesized_expression): New function. 213 (snarf_block): Use it. 214 2152002-10-21 Matthias Klose <doko@debian.org> 216 217 * Backport, without whitespace change: 218 2002-06-19 Akim Demaille <akim@epita.fr> 219 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with 220 decl.h's TYPENAME. 221 * spew.c, lex.c: Adjust. 222 * parse.y (explicit_instantiation): Add empty action to override 223 the default $$ = $1 where it introduces a type clash. 224 2252002-10-21 Mark Mitchell <mark@codesourcery.com> 226 227 PR c++/8218 228 * cp-tree.h (lang_type_class): Add contains_empty_class_p. 229 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro. 230 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P. 231 (check_field_decls): Likewise. 232 (layout_class_type): Likewise. 233 (finish_struct_1): Initialize it. 234 (walk_subobject_offsets): Use it to prune searches. 235 2362002-10-18 Zack Weinberg <zack@codesourcery.com> 237 238 * decl.c (start_decl): Point users of the old initialized- 239 typedef extension at __typeof__. 240 2412002-10-18 Nathan Sidwell <nathan@codesourcery.com> 242 243 PR c++/7676 244 * class.c (add_method): Compare template parms too. 245 2462002-10-17 Mark Mitchell <mark@codesourcery.com> 247 248 * mangle.c (globals): Add entity and need_abi_warning. 249 (write_prefix): Likewise. 250 (write_template_prefix): Likewise. 251 (start_mangling): Add entity parameter. 252 (finish_mangling): Warn about names whose mangling will change. 253 (mangle_decl_string): Adjust. 254 (mangle_type_string): Likewise. 255 (mangle_special_for_type): Likewise. 256 (mangle_ctor_vtbl_for_type): Likewise. 257 (mangle_thunk): Likewise. 258 (mangle_guard_variable): Likewise. 259 (mangle_ref_init_variable): Likewise. 260 261 PR c++/7584 262 * class.c (handle_using_decl): Allow the declaration used to be 263 from an ambiguous base. 264 2652002-10-16 Mark Mitchell <mark@codesourcery.com> 266 267 PR c++/7478 268 * cvt.c (convert_to_reference): Allow references as the incoming 269 type. 270 271 PR c++/8134 272 * tree.c (zero_init_p): Always return 1. 273 274 PR c++/7524 275 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not 276 build_qualified_type. 277 2782002-10-14 Mark Mitchell <mark@codesourcery.com> 279 280 PR c++/7176 281 * lex.c (do_identifier): Add another option for the parsing 282 parameter. 283 * parse.y (do_id): Use it. 284 2852002-10-11 Mark Mitchell <mark@codesourcery.com> 286 287 PR c++/5661 288 * cp-tree.h (variably_modified_type_p): New function. 289 (grokdeclarator) Tighten check for variably modified types as 290 fields. 291 * pt.c (convert_template_argument): Do not allow variably modified 292 types as template arguments. 293 * tree.c (variably_modified_type_p): New function. 294 2952002-10-11 Jason Molenda <jmolenda@apple.com> 296 297 * init.c (build_field_list): Provide uses_unions_p with a default 298 value. 299 3002002-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net> 301 302 PRs C++/6803, C++/7721 and C++/7803 303 * decl.c (grokdeclarator): Gracefully handle template-name as 304 decl-specifier. 305 3062002-10-09 Zack Weinberg <zack@codesourcery.com> 307 308 PR c/7353 309 * decl.c (start_decl): Unconditionally issue error for 310 'typedef foo = bar'. 311 (cp_finish_decl): Remove special case for TYPE_DECL with initializer. 312 (grokdeclarator): Remove redundant error for 'typedef foo = bar'. 313 3142002-10-03 Mark Mitchell <mark@codesourcery.com> 315 316 PR c++/7754 317 * decl2.c (finish_anon_union): Do not expand anonymous unions when 318 procesing template functions. 319 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable 320 type. Call layout_decl. 321 (tsubst_expr, case DECL_STMT): Handle anonymous unions. 322 3232002-10-07 Richard Henderson <rth@redhat.com> 324 325 * decl2.c: Complete reversion of c++/7754. 326 3272002-10-06 Roger Sayle <roger@eyesopen.com> 328 329 PR optimization/6627 330 * cp/cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition 331 from here, and move it to tree.h. 332 * cp/decl.c (cxx_init_decl_processing): If storing the vbit 333 in function pointers, ensure that force_align_functions_log 334 is atleast one. 335 3362002-10-04 H.J. Lu (hjl@gnu.org) 337 338 * pt.c (tsubst_decl, case VAR_DECL): Back out the last change. 339 (tsubst_expr, case DECL_STMT): Likewise. 340 3412002-10-02 Mark Mitchell <mark@codesourcery.com> 342 343 PR c++/7754 344 * decl2.c (finish_anon_union): Do not expand anonymous unions when 345 procesing template functions. 346 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable 347 type. Call layout_decl. 348 (tsubst_expr, case DECL_STMT): Handle anonymous unions. 349 3502002-10-02 Mark Mitchell <mark@codesourcery.com> 351 352 PR c++/7188. 353 * init.c (expand_member_init): Allow a FIELD_DECL to be passed in 354 directly. 355 * pt.c (tsubst_initializer_list): Use expand_member_init. 356 3572002-09-04 Jakub Jelinek <jakub@redhat.com> 358 359 * decl.c (start_cleanup_fn): Clear interface_only before 360 start_function, restore it afterwards. 361 3622002-09-01 Alexandre Oliva <aoliva@redhat.com> 363 364 * parse.y (sizeof, alignof, typeof): New non-terminals to 365 increment skip_evaluation. Replace terminals with them and 366 decrement skip_evaluation at the end of rules using them. 367 * decl2.c (mark_used): Don't assemble_external if 368 skipping evaluation. 369 3702002-08-31 Jason Merrill <jason@redhat.com> 371 372 * cp-lang.c (cp_expr_size): Don't abort. 373 3742002-08-27 Mark Mitchell <mark@codesourcery.com> 375 376 * cp-tree.h (warn_abi): Declare it. 377 * decl.c (warn_abi): Define it. 378 (cxx_decode_option): Set it. 379 * class.c (layout_virtual_bases): Warn about bugs in G++ that 380 result in incorrect object layouts. 381 (layout_class_type): Likewise. 382 3832002-08-22 Jason Merrill <jason@redhat.com> 384 385 PR c++/5607 386 * search.c (check_final_overrider): No longer static. 387 * class.c (update_vtable_entry_for_fn): Call it. 388 * cp-tree.h: Adjust. 389 390 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define. 391 (cp_expr_size): New fn. 392 * call.c (convert_arg_to_ellipsis): Promote non-POD warning to error. 393 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue. 394 3952002-08-14 Release Manager 396 397 * GCC 3.2 Released. 398 3992002-08-03 Nathan Sidwell <nathan@codesourcery.com> 400 401 PR 7470. 402 C++ ABI change - vfunc ordering. 403 * class.c (add_virtual_function): Remove. 404 (dfs_modify_all_vtables): Take list of all declared 405 virtuals. Assign all that are not in primary base. 406 (check_for_override): Adjust comments. 407 (create_vtable_ptr): Take single list of virtuals. Build chain 408 of declared virtuals here. 409 (layout_class_type): Take single list of virtuals. Adjust. 410 (finish_struct_1): Keep virtuals on single list. Adjust. 411 4122002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> 413 414 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c. 415 4162002-07-17 Scott Snyder <snyder@fnal.gov> 417 418 PR c++/7320 419 * rtti.c (get_tinfo_decl): Set DECL_COMDAT. 420 4212002-07-05 Nathan Sidwell <nathan@codesourcery.com> 422 423 Repair damage on weak-impared targets caused by my previous patch. 424 * cp-tree.h (import_export_tinfo): Add parameter. 425 * decl2.c (import_export_tinfo): Add parameter, post adjust 426 DECL_COMDAT. 427 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by 428 import_export_tinfo. 429 4302002-06-30 Nathan Sidwell <nathan@codesourcery.com> 431 432 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ... 433 (CPTI_TYPE_INFO_PTR_TYPE): ... this. 434 (tinfo_decl_type): Replace with ... 435 (type_info_ptr_type): ... this. 436 (import_export_tinfo): Declare. 437 (tinfo_decl_p): Rename to ... 438 (unemitted_tinfo_decl_p): ... this. 439 * decl2.c (import_export_decl): Break out tinfo handling into ... 440 (import_export_tinfo): ... here. New function. 441 (finish_file): Adjust. 442 * rtti.c (TINFO_REAL_NAME): New macro. 443 (init_rtti_processing): Create the tinfo types. 444 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr. 445 (get_tinfo_decl): Adjust. 446 (get_tinfo_ptr): New function. 447 (get_type_id): Use it. 448 (tinfo_base_init): Create vtable decl here, if it doesn't exist. 449 (ptr_initializer): Use get_tinfo_ptr. 450 (ptm_initializer): Likewise. 451 (synthesize_tinfo_var): Break into ... 452 (get_pseudo_ti_init): ... this. Just create the initializer. 453 (get_pseudo_ti_desc): .. and this. 454 (create_real_tinfo_var): Remove. 455 (create_pseudo_type_info): Don't create the vtable decl here. 456 (get_vmi_pseudo_type_info): Remove. 457 (create_tinfo_types): Adjust. 458 (tinfo_decl_p): Rename to ... 459 (unemitted_tinfo_decl_p): ... here. Adjust. 460 (emit_tinfo_decl): Adjust. Create the initializer. 461 4622002-06-14 Jason Merrill <jason@redhat.com> 463 464 C++ ABI changes. 465 * class.c (build_base_field): Set DECL_PACKED. 466 (layout_class_type): Don't use tail padding of PODs. 467 * mangle.c (write_unqualified_name): Fix template conversion op 468 mangling. 469 4702002-05-18 Jason Merrill <jason@redhat.com> 471 472 PR c++/6611 473 * decl2.c (import_export_decl): If we clear 474 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set. 475 4762002-05-14 Jason Merrill <jason@redhat.com> 477 478 * rtti.c (get_tinfo_decl): Don't call comdat_linkage. 479 Do set DECL_COMDAT. 480 (synthesize_tinfo_var): Take the public decl. 481 (create_real_tinfo_var): Likewise. Check DECL_COMDAT. 482 (emit_tinfo_decl): Adjust. Call import_export_decl. 483 * decl2.c (import_export_decl): Simplify tinfo decl handling. 484 4852002-07-25 Release Manager 486 487 * GCC 3.1.1 Released. 488 4892002-07-12 Mark Mitchell <mark@codesourcery.com> 490 491 * class.c (add_method): Correct handling of conversion operators. 492 4932002-07-11 Mark Mitchell <mark@codesourcery.com> 494 495 PR c++/7224 496 * class.c (add_method): Simplify. 497 4982002-07-11 Jason Merrill <jason@redhat.com> 499 500 PR c++/7279 501 * tree.c (cp_copy_res_decl_for_inlining): Also copy 502 TREE_ADDRESSABLE. 503 5042002-07-10 Jason Merrill <jason@redhat.com> 505 506 PR c++/6255 507 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than 508 modifying the old one. 509 5102002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 511 512 * pt.c (can_complete_type_without_circularity): Add static to 513 function definition. 514 5152002-07-05 Jim Wilson <wilson@redhat.com> 516 517 * decl.c (mark_named_label_lists): Add missing & in call to 518 mark_binding_level. 519 5202002-07-05 Jason Merrill <jason@redhat.com> 521 522 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null 523 pointers. 524 525 PR optimization/7145 526 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL. 527 5282002-05-18 Jason Merrill <jason@redhat.com> 529 530 PR c++/6611 531 * decl2.c (import_export_decl): If we clear 532 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set. 533 5342002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 535 536 PR c++/6944 537 * init.c (build_aggr_init): Remove qualifiers of init before calling 538 build_vec_init. 539 (build_vec_init): Flatten multi-dimensional array during cleanup. 540 (build_vec_delete_1): Abort if the type of each element is array. 541 5422002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 543 544 PR c++/6716 545 * pt.c (can_complete_type_without_circularity): New function. 546 (instantiate_class_template): Use it. 547 * typeck2.c (incomplete_type_error): Improve error message 548 due to incomplete fields. 549 5502002-07-01 Mark Mitchell <mark@codesourcery.com> 551 552 PR c++/7112 553 * mangle.c (write_expression): Add mangling for sizeof when 554 applied to a type. 555 * operators.def: Remove stale comment. 556 5572002-06-27 Mark Mitchell <mark@codesourcery.com> 558 559 PR c++/6695 560 * pt.c (tsubst_friend_class): Substitute into the context of the 561 friend before using it. 562 5632002-06-23 Matt Thomas <matt@3am-software.com> 564 565 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to 566 "#if VMS_TARGET". 567 5682002-06-20 Richard Henderson <rth@redhat.com> 569 570 PR c++/6747 571 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early. 572 Call put_var_into_stack. 573 5742002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 575 576 PR c++/6892 577 * pt.c (tsubst_expr): Handle FILE_STMT. 578 5792002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 580 581 PR c++/6723 582 * pt.c (lookup_template_class): Don't build complete argument of 583 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template 584 argument. 585 5862002-06-16 Richard Henderson <rth@redhat.com> 587 588 PR opt/6793 589 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test 590 after template instantiation. 591 5922002-06-07 H.J. Lu (hjl@gnu.org) 593 594 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT. 595 5962002-05-23 Neil Booth <neil@daikokuya.demon.co.uk> 597 598 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. 599 * cp-tree.h (cxx_post_options): Kill. 600 * cp-lex.c (cxx_post_options): Kill. 601 6022002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 603 604 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing. 605 6062002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 607 608 PR c++/186, DR 259 609 * pt.c (do_decl_instantiation): Don't complain explicit 610 instantiation after explicit specialization. 611 (do_type_instantiation): Likewise. 612 6132002-05-09 Jason Merrill <jason@redhat.com> 614 615 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P. 616 6172002-05-15 Alexandre Oliva <aoliva@redhat.com> 618 619 * cp-tree.h (struct lang_type): Added non_zero_init. 620 (CLASSTYPE_NON_ZERO_INIT_P): New macro. 621 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare. 622 * class.c (check_field_decls): Test non_zero_init. 623 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for 624 zero-to-NULL conversions. 625 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a 626 type that needs zero-initialization without zeros. 627 (check_initializer_decl): Compute zero-initializer for types 628 that require a non-trivial one. 629 * init.c (build_forced_zero_init): New function. 630 (build_default_init): Use it. 631 * tree.c (zero_init_p): New function. 632 * typeck2.c (force_store_init_value): New function. 633 (process_init_constructor): Create non-trivial zero-initializers 634 for array members and class fields. 635 6362002-05-14 Release Manager 637 638 * GCC 3.1 Released. 639 6402002-05-03 Jason Merrill <jason@redhat.com> 641 642 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h. 643 6442002-05-02 Mark Mitchell <mark@codesourcery.com> 645 646 * init.c (perform_base_cleanups): Correct order of base class 647 cleanups. 648 6492002-05-01 Mark Mitchell <mark@codesourcery.com> 650 651 PR c++/6527 652 * init.c (perform_base_cleanups): Emit cleanups in reverse order 653 of construction. 654 6552002-05-01 Gabriel Dos Reis <gdr@codesourcery.com> 656 657 * error.c (dump_type): Be careful about implicit typenames. 658 6592002-04-30 Mark Mitchell <mark@codesourcery.com> 660 661 ABI change, returning simple classes from functions. 662 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if 663 TYPE_HAS_TRIVIAL_INIT_REF is false or 664 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true. 665 6662002-04-30 Jason Merrill <jason@redhat.com> 667 668 PR debug/6436 669 * decl.c (grokdeclarator): Don't override TYPE_NAME of an 670 anonymous class with a typedef if there are attributes. 671 6722002-04-29 Paul Eggert <eggert@twinsun.com> 673 674 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$. 675 6762002-04-29 Jakub Jelinek <jakub@redhat.com> 677 678 PR c++/6477 679 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is 680 non-NULL first. 681 6822002-04-29 Mark Mitchell <mark@codesourcery.com> 683 684 PR c++/6492 685 * pt.c (tsubst_friend_class): If the friend has an explicit scope, 686 enter that scope before name lookup. 687 688 PR c++/6486 689 * method.c (do_build_copy_constructor): Avoid building 690 cv-qualified reference types. 691 6922002-04-29 Nathan Sidwell <nathan@codesourcery.com> 693 694 PR c++/5719 695 * decl.c (grok_op_properties): Assignment ops don't have to return 696 by value. operator% should. 697 6982002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> 699 700 PR c/6343 701 * decl.c (duplicate_decls): Call merge_weak. 702 7032002-04-26 Mark Mitchell <mark@codesourcery.com> 704 705 PR c++/6479 706 * method.c (do_build_assign_ref): Pass a derivation to 707 build_method_call when calling base class assignment operators. 708 7092002-04-24 Mark Mitchell <mark@codesourcery.com> 710 711 * mangle.c (write_type): Don't use TYPE_MAIN_VARIANT when writing 712 out an array type. 713 (write_CV_qualifiers_for_type): Use TYPE_QUALS, not cp_type_quals, 714 to determine qualifiers. 715 716 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs 717 void. 718 7192002-04-24 Jason Merrill <jason@redhat.com> 720 721 PR c++/6331 722 * method.c (do_build_copy_constructor): Use cp_build_qualified_type. 723 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals. 724 The pedwarn for array assignment is now unconditional. 725 * tree.c (build_cplus_array_type_1): Still process simple array types 726 normally in templates. 727 728 PR c++/6395 729 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i 730 stuff for comdats. 731 7322002-04-23 Jason Merrill <jason@redhat.com> 733 734 PR c++/5504 - but re-breaks c++/411 735 * init.c (push_base_cleanups): Rename to perform_base_cleanups. 736 Expand base cleanups now rather than pushing them. 737 * decl.c (begin_destructor_body): Don't call push_base_cleanups. 738 (finish_destructor_body): Call perform_base_cleanups. 739 * cp-tree.h: Adjust prototype. 740 7412002-04-23 Jakub Jelinek <jakub@redhat.com> 742 743 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class 744 node with attributes. 745 7462002-2-23 David O'Brien <obrien@FreeBSD.org> 747 748 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add. 749 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given. 750 7512002-04-23 Mark Mitchell <mark@codesourcery.com> 752 753 PR c++/6256: 754 * pt.c (tsubst_friend_class): Handle templates with explicit 755 nested names. 756 757 PR c++/6331: 758 * typeck.c (merge_types): Remember the cv-qualification of pointer 759 types when merging them. 760 7612002-04-18 Jason Merrill <jason@redhat.com> 762 763 PR c++/5658 764 * search.c (setup_class_bindings): A class template qualifies as a 765 type binding. 766 7672002-04-17 Jakub Jelinek <jakub@redhat.com> 768 769 PR c++/6316 770 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop 771 before expanding. 772 7732002-04-16 Mark Mitchell <mark@codesourcery.com> 774 775 * init.c (begin_init_stmts): Remove commented out code. 776 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE. 777 * semantics.c (begin_gobal_stmt_expr): Adjust call to 778 expand_start_stmt_expr. 779 7802002-04-15 Mark Mitchell <mark@codesourcery.com> 781 782 * decl.c (register_dtor_fn): Pass the address of dso_handle, not 783 dso_handle itself, to __cxa_atexit. 784 7852002-04-14 Jakub Jelinek <jakub@redhat.com> 786 787 * class.c (layout_virtual_bases): Do all dsize computation on trees. 788 7892002-04-12 Mark Mitchell <mark@codesourcery.com> 790 791 PR c++/5373. 792 * semantics.c (finish_expr_stmt): Remember the type of the 793 expression before any conversions are performed. 794 795 PR c++/5189. 796 * call.c (add_template_candidate_real): Do not treat member 797 templates as copy constructors. 798 799 * decl.c (duplicate_decls): Do not copy the RTL for a variable 800 declaration if the old variable had an incomplete type and the new 801 variable does not. 802 (complete_vars): Do not call layout_decl for completed variables. 803 8042002-04-11 Andrew Haley <aph@redhat.com> 805 806 * typeck.c (type_after_usual_arithmetic_conversions): 807 If two types have the same variant, return immediately. 808 When two floating-point operands are the same precision: 809 convert to float if one of the operands is float; 810 if neither operand is one of the standard types, return the type 811 of the first operand. 812 8132002-04-12 Richard Sandiford <rsandifo@redhat.com> 814 815 * decl.c (duplicate_decls): Don't try to unify an implicit typedef 816 with an explicit one. 817 (follow_tag_typedef): New. 818 (lookup_tag): Use it to extract the tag of an explicit typedef. 819 (xref_tag): Likewise. 820 8212002-04-10 Nathan Sidwell <nathan@codesourcery.com> 822 823 PR c++/5507 824 * decl.c (make_typename_type): Remove implicit typenameness. 825 8262002-04-09 Jason Merrill <jason@redhat.com> 827 828 PR optimization/6189 829 * semantics.c (genrtl_start_function): Don't free 830 DECL_SAVED_FUNCTION_DATA for inline functions. 831 8322002-04-08 Paolo Carlini <pcarlini@unitus.it> 833 834 * parse.y (namespace_qualifier, maybe_identifier, 835 begin_explicit_instantiation, end_explicit_instantiation, 836 apparent_template_type, .finish_template_type, 837 do_id, maybe_init, defarg_again, component_decl_1): 838 Add ending ';', in accordance with POSIX. 839 8402002-04-06 Mark Mitchell <mark@codesourcery.com> 841 842 PR c++/5571 843 * class.c (layout_class_type): Remember incomplete static 844 variables. 845 (finish_struct_1): Call complete_vars, not 846 hack_incomplete_structures. 847 * cp-tree.h (hack_incomplete_structures): Rename to ... 848 (complete_vars): ... this. 849 (struct saved_scope): Remove incomplete. 850 (namespace_scope_incomplete): Remove. 851 * decl.c (struct binding_level): Remove incomplete. 852 (incomplete_vars): New variable. 853 (mark_binding_level): Don't mark incomplete. 854 (print_binding_level): Don't print it. 855 (mark_saved_scope): Don't mark incomplete. 856 (pushdecl): Use maybe_register_incopmlete_var. 857 (cxx_init_decl_processing): Register incomplete_vars for GC. 858 (start_decl_1): Clarify error message. 859 (hack_incomplete_vars): Remove. 860 (maybe_register_incomplete_var): New function. 861 (complete_vars): Likewise. 862 8632002-04-06 Jason Merrill <jason@redhat.com> 864 865 PR c++/4934 866 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is 867 set before checking it. 868 869 PR c++/6179 870 * method.c (implicitly_declare_fn): Pass unqualified type to 871 synthesize_exception_spec. 872 8732002-04-03 Jason Merrill <jason@redhat.com> 874 875 PR c++/525 876 * init.c (build_member_call): Convert to intermediate base even 877 with -pedantic. 878 879 PR c++/5636 880 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on 881 cleanup for nrv. 882 883 PR c++/5104 884 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception 885 specifiers. 886 [METHOD_TYPE]: Use same code as FUNCTION_TYPE. 887 8882002-04-03 Roger Sayle <roger@eyesopen.com> 889 890 PR c++/5998: 891 * decl.c (duplicate_decls): Don't mess with assembler names when 892 redeclaring builtin functions as static. 893 8942002-04-01 Roger Sayle <roger@eyesopen.com> 895 896 PR c++/5998: 897 * decl.c (duplicate_decls): Overwrite the RTL when (and only 898 when) overwriting a built-in function. Don't use COPY_DECL_RTL, 899 but follow the SET_DECL_RTL idiom used elsewhere in the function. 900 9012002-03-28 Roger Sayle <roger@eyesopen.com> 902 903 PR c++/5998: 904 * decl.c (cxx_init_decl_processing): Re-enable built-in functions 905 in the g++ front-end. 906 (duplicate_decl): Allow redefinition of anticipated built-ins. 907 Fix inlining problem by over-writing the old DECL_RTL. 908 (lookup_namespace_name): Fail to find an identifier in the 909 specified namespace if its still anticipated. 910 (builtin_function_1): New function split out from builtin_function 911 to create a builtin in the current namespace with given context. 912 (builtin_function): Call builtin_function_1 to define the 913 appropriate builtins in both the std and global namespaces. 914 (select_decl): Don't test for anticipated decls here. 915 (unqualified_namespace_lookup): Instead ignore them whilst 916 searching through scopes and namespaces. 917 * decl2.c (do_nonmember_using_decl): If a using declaration 918 specifies an anticipated built-in function, mark it as no longer 919 anticipated in that scope. 920 (ambiguous_decl): Avoid resolving to an anticipated decl. 921 * lex.c (do_scoped_id): Fail to find an identifier in the global 922 namespace if its still anticipated. 923 9242002-03-29 Jakub Jelinek <jakub@redhat.com> 925 926 PR c++/6073 927 * class.c (finish_struct_1): Update static field's DECL_MODE even 928 if its type is a variant of t. 929 9302002-03-27 Mark Mitchell <mark@codesourcery.com> 931 932 PR c++/4884 933 * call.c (build_op_delete_call): Allow for the fact the placement 934 may be a COMPOUND_EXPR. 935 9362002-03-26 Nathan Sidwell <nathan@codesourcery.com> 937 938 PR c++/5682 939 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better. 940 (dfs_skip_nonprimary_vbases_unmarkedp): Remove. 941 (dfs_skip_nonprimary_vbases_markedp): Remove. 942 * search.c (get_shared_vbase_if_not_primary): Remove. 943 (dfs_skip_nonprimary_vbases_unmarkedp): Remove. 944 (dfs_skip_nonprimary_vbases_markedp): Remove. 945 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo. 946 (dfs_marked_real_bases_queue_p): Likewise. 947 9482002-03-26 Mark Mitchell <mark@codesourcery.com> 949 950 PR c++/4884 951 * init.c (build_new_1): Allow for the fact the result of 952 build_function_call may be a COMPOUND_EXPR. 953 9542002-03-25 Jakub Jelinek <jakub@redhat.com> 955 956 PR c++/6037 957 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node. 958 9592002-03-22 Jeff Knaggs <jknaggs@redhat.com> 960 961 * typeck.c (expand_ptrmemfunc_cst): Scale idx down to an index 962 into the vtable_entry array regardless of 963 TARGET_PTRMEMFUNC_VBIT_LOCATION. 964 9652002-03-21 Aldy Hernandez <aldyh@redhat.com> 966 967 * tree.c (cp_cannot_inline_tree_fn): Same. 968 9692002-03-20 Jason Merrill <jason@redhat.com> 970 971 PR c++/2136 972 * init.c (build_delete): Check access for a member op delete here. 973 * decl2.c (delete_sanity): Not here. 974 9752002-03-19 Jason Merrill <jason@redhat.com> 976 977 PR c++/5118 978 * class.c (get_vfield_name): Use the constructor_name. 979 9802002-03-18 Eric Botcazou <ebotcazou@multimania.com> 981 982 PR c++/3882 983 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling... 984 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer 985 only after recording the declaration. 986 9872002-03-18 Ashif Harji <asharji@uwaterloo.ca> 988 989 * lang-specs.h (compiler default_compilers): Add 990 -no-integrated-cpp flag to invoke an external cpp. 991 9922002-03-18 Jason Merrill <jason@redhat.com> 993 994 PR c++/2039 995 * init.c (resolve_offset_ref): Hand off to build_component_ref. 996 997 PR c++/4222, c++/5995 998 * call.c (build_over_call): Fix empty class logic. 999 1000 PR c++/3870 1001 * cp-tree.h (struct saved_scope): Add last_parms field. 1002 * decl.c (maybe_push_to_top_level): Save last_function_parms. 1003 (pop_from_top_level): Restore it. 1004 1005 PR c++/4377 1006 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip 1007 NON_LVALUE_EXPRs. 1008 1009 PR c++/4003 1010 * pt.c (tsubst_friend_function): Use decl_namespace_context. 1011 1012 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch. 1013 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a 1014 type with a nontrivial destructor. 1015 10162002-03-17 Jason Merrill <jason@redhat.com> 1017 1018 PR c++/4460 1019 * class.c (build_base_path): Virtual base layout is fixed in 1020 in-charge [cd]tors. 1021 1022 PR c++/5757 1023 * init.c (build_new_1): Pass the right pointer to op delete. 1024 10252002-03-15 Richard Henderson <rth@redhat.com> 1026 1027 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op. 1028 10292002-03-15 Richard Henderson <rth@redhat.com> 1030 1031 * decl.c (finish_function): Reapply accidentally reverted 1032 2002-02-28 patch. 1033 10342002-03-15 Mark Mitchell <mark@codesourcery.com> 1035 1036 * cp-tree.h (CLEANUP_DECL): Remove. 1037 (CLEANUP_EXPR): Likewise. 1038 * decl.c (destroy_local_var): Simplify. 1039 (maybe_build_cleanup): Tidy. 1040 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT. 1041 * semantics.c (cp_expand_stmt): Likewise. 1042 * cp/tree.c (cp_statement_code_p): Likewise. 1043 10442002-03-15 Richard Henderson <rth@redhat.com> 1045 1046 * decl.c: Include c-pragma.h. 1047 (start_decl, start_function): Invoke maybe_apply_pragma_weak. 1048 * Make-lang.in: Update dependencies. 1049 10502002-03-15 Jason Merrill <jason@redhat.com> 1051 1052 PR c++/5857 1053 * decl.c (duplicate_decls): Use merge_types instead of common_type. 1054 * typeck.c (common_type): Just hand off to 1055 type_after_usual_arithmetic_conversions and 1056 composite_pointer_type. 1057 (merge_types): New fn. 1058 (commonparms): Use it instead of common_type. 1059 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE. 1060 (composite_pointer_type): Also handle attributes. 1061 * cp-tree.h: Declare merge_types. 1062 1063 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT 1064 variables. 1065 * decl2.c (maybe_make_one_only): Also mark the decl as needed. 1066 10672002-03-14 Jakub Jelinek <jakub@redhat.com> 1068 1069 PR c++/5908 1070 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too. 1071 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING. 1072 10732002-03-12 Richard Sandiford <rsandifo@redhat.com> 1074 1075 * mangle.c (write_builtin_type): Handle 128-bit integers even if 1076 they are not a standard integer type. 1077 10782002-03-12 Nathan Sidwell <nathan@codesourcery.com> 1079 1080 PR c++/5659 1081 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here. 1082 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for 1083 definitions. 1084 10852002-03-11 Nathan Sidwell <nathan@codesourcery.com> 1086 1087 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>, 1088 DR209 is now not a defect. 1089 * cp-tree.h (skip_type_access_control): Remove. 1090 * decl.c (grokdeclarator): Do type access control for friend 1091 declarations. 1092 * semantics.c (decl_type_access_control): Don't reset 1093 current_type_lookups. 1094 (save_type_access_control): Always save the lookups. 1095 (skip_type_access_control): Remove. 1096 (finish_class_definition): Don't change type_lookups. 1097 10982002-03-11 Nathan Sidwell <nathan@codesourcery.com> 1099 1100 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>, 1101 It is incorrect. 1102 * typeck.c (build_static_cast): Compare non-qualified types 1103 with pointer to member conversions. 1104 11052002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org> 1106 1107 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of 1108 conditional return void. 1109 11102002-03-02 Nathan Sidwell <nathan@codesourcery.com> 1111 1112 PR c++/775 1113 * decl.c (lookup_tag): Only reject enum/class mismatch, not 1114 class/union mismatch. 1115 * parse.y (check_class_key): New function. 1116 (structsp): Call it. 1117 11182002-03-01 Michael Matz <matz@suse.de> 1119 1120 * typeck.c (cp_pointer_int_sum): Complete inner type which is 1121 used later by size_in_bytes(). 1122 11232002-03-01 Phil Edwards <pme@gcc.gnu.org> 1124 1125 * cp-tree.h (build_init): Remove prototype. 1126 11272002-03-01 Phil Edwards <pme@gcc.gnu.org> 1128 1129 * cp-tree.h: Require __GNUC__ to be #defined. 1130 (build_init): Add missing prototype. 1131 11322002-02-28 Jason Merrill <jason@redhat.com> 1133 1134 * search.c (lookup_base_r): Don't clear is_non_public just because 1135 we found a friendly scope. 1136 1137 * decl.c (finish_function): Only warn about missing return 1138 statement with -Wreturn-type. 1139 11402002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org> 1141 1142 PR c++/4093 1143 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition 1144 to void. 1145 11462002-02-22 Jakub Jelinek <jakub@redhat.com> 1147 1148 PR other/5746 1149 * semantics.c (finish_switch_cond): Don't call get_unwidened 1150 if error_mark_node. 1151 11522002-02-22 Nathan Sidwell <nathan@codesourcery.com> 1153 1154 PR c++/2645, DR 295 1155 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals, 1156 tf_keep_type_decl. 1157 (make_typename_type): Use tsubst_flags_t. 1158 * decl.c (make_typename_type): Adjust. Return non-artificial 1159 TYPE_DECLs, if required. 1160 (grokdeclarator): Simplify CVR qualification handling. Allow bad 1161 qualifiers on typedef types. 1162 * decl2.c (handle_class_head): Adjust make_typename_type call. 1163 * parse.y (nested_name_specifier): Likewise. 1164 (typename_sub0): Likewise. 1165 (typename_sub1): Likewise. 1166 * pt.c (convert_template_argument): Adjust make_typename_type 1167 return value. 1168 (tsubst): Adjust cp_build_qualified_type_real calls. 1169 (check_cv_quals_for_unify): Cope with alowing bad qualifications 1170 on template type parms. 1171 (instantiate_decl): Recheck substitutions to give warnings on bad 1172 qualifications. 1173 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals. 1174 11752002-02-21 Aldy Hernandez <aldyh@redhat.com> 1176 1177 * cp/decl.c (duplicate_decls): Merge always_inline attribute. 1178 1179 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0 1180 unless DECL_ALWAYS_INLINE. 1181 11822002-02-20 Jakub Jelinek <jakub@redhat.com> 1183 1184 * typeck.c (cp_pointer_int_sum): Renamed from 1185 pointer_int_sum, call pointer_int_sum. 1186 11872002-02-20 Jakub Jelinek <jakub@redhat.com> 1188 1189 * decl.c (duplicate_decls): Return 0 if issued error about 1190 redeclaration. 1191 11922002-02-19 Jason Merrill <jason@redhat.com> 1193 1194 ABI change: Mangle `void (A::*)() const' as 1195 M1AKFvvE, not MK1AFvvE. 1196 * mangle.c (write_function_type): Write cv-quals for member 1197 function type here. 1198 (write_pointer_to_member_type): Not here. 1199 12002002-02-18 Jason Merrill <jason@redhat.com> 1201 1202 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header. 1203 (do_decl_instantiation): Likewise. 1204 12052002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org> 1206 1207 PR c++/5685 1208 * decl.c (duplicate_decls): Make warning unconditional 1209 if duplicate default argument declarations are present. 1210 12112002-02-17 Jakub Jelinek <jakub@redhat.com> 1212 1213 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit 1214 shortening. 1215 12162002-02-15 Nathan Sidwell <nathan@codesourcery.com> 1217 1218 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs, 1219 remove incorrect comment. Move #if 0'd code to common path. Use 1220 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication. 1221 12222002-02-13 Jason Merrill <jason@redhat.com> 1223 1224 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns. 1225 (finish_function): Don't warn if current_function_returns_null. 1226 1227 * typeck2.c (digest_init): Do handle values of vector type. 1228 1229 * typeck2.c (digest_init, process_init_constructor): Treat vectors 1230 like arrays. 1231 12322002-02-11 Jason Merrill <jason@redhat.com> 1233 1234 * parse.y (reserved_declspecs): Don't handle attributes. 1235 (reserved_typespecquals): Handle them here. 1236 * Make-lang.in (parse.c): Adjust expected conflicts. 1237 12382002-02-08 Jakub Jelinek <jakub@redhat.com> 1239 1240 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr 1241 instead of compstmt. 1242 (compstmt_or_stmtexpr): Renamed from compstmt. 1243 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type. 1244 12452002-02-07 Nathan Sidwell <nathan@codesourcery.com> 1246 1247 Rename instantiate_type_flags to tsubst_flags_t & expand use. 1248 * cp-tree.h (instantiate_type_flags): Rename to ... 1249 (tsubst_flags_t): ... here. Rename itf_complain to tf_error, 1250 add tf_warning flag. 1251 (instantiate_type): Adjust prototype. 1252 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class, 1253 do_type_instantiation, cp_build_qualified_type_real): Likewise. 1254 cp_build_qualified_type: Adjust. 1255 * class.c (instantiate_type): Adjust parameter. Rename itf_* to 1256 tf_*. 1257 * call.c (standard_conversion): Rename itf_* to tf_*. 1258 (reference_binding): Likewise. 1259 (convert_like_real): Likewise. 1260 * cvt.c (cp_convert_to_pointer): Likewise. 1261 (convert_to_reference): Likewise. 1262 * decl.c (lookup_namespace_name): Use tf_* flags. 1263 (make_typename_type): Likewise. 1264 (grokdeclarator): Likewise. 1265 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage. 1266 (coerce_template_template_parms, convert_template_argument, 1267 coerce_template_parms, maybe_get_template_decl_from_type_decl, 1268 lookup_template_class, tsubst_friend_function, tsubst_friend_class, 1269 instantiate_class_template, tsubst_template_arg_vector, 1270 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument, 1271 tsubst_decl, tsubst_arg_types, tsubst_function_type, 1272 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr, 1273 instantiate_template, fn_type_unification, 1274 resolve_overloaded_unification, verify_class_unification, 1275 unify, get_bindings_real, do_type_instantiation, 1276 regenerate_decl_from_template, instantiate_decl, 1277 tsubst_initializer_list, tsubst_enum, 1278 get_mostly_instantiated_function_type, 1279 invalid_nontype_parm_type_p): Likewise. 1280 * tree.c (cp_build_qualified_type_real): Likewise. 1281 * typeck.c (build_binary_op): Rename itf_* to tf_*. 1282 (build_ptrmemfunc): Likewise. 1283 (convert_for_assignment): Likewise. 1284 12852002-02-07 Nathan Sidwell <nathan@codesourcery.com> 1286 1287 PR c++/109 1288 * decl.c (grokdeclarator): Allow friend declarations from 1289 dependent types. 1290 * decl2.c (handle_class_head): Don't push into template parm contexts. 1291 * pt.c (push_template_decl_real): Template parm contexts are never 1292 being defined. 1293 12942002-02-05 Alexandre Oliva <aoliva@redhat.com> 1295 1296 * class.c: Include target.h. 1297 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY, 1298 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS 1299 bit-field layout. 1300 * Make-lang.in: Adjust deps. 1301 13022002-02-05 Jason Merrill <jason@redhat.com> 1303 1304 * error.c (dump_type): Be more helpful about VECTOR_TYPE. 1305 13062002-02-04 Jakub Jelinek <jakub@redhat.com> 1307 1308 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE. 1309 (finish_switch_cond): Set SWITCH_TYPE. 1310 13112002-02-04 Richard Henderson <rth@redhat.com> 1312 1313 * method.c (use_thunk): Always initialize the block tree. Reindent. 1314 * semantics.c (expand_body): Emit thunks after function, not before. 1315 13162002-02-04 Jason Merrill <jason@redhat.com> 1317 1318 * decl.c (start_function): Call cplus_decl_attributes immediately 1319 after grokdeclarator. 1320 1321 * decl.c (start_function): Combine DECL_RESULT handling code. 1322 13232002-02-03 Jason Merrill <jason@redhat.com> 1324 1325 * xref.c: Remove. 1326 * Make-lang.in (CXX_OBJS): Remove cp/xref.o 1327 (cp/xref.o): Remove dependencies. 1328 * class.c (finish_struct_1, check_methods): Don't call xref fns. 1329 (finish_struct_1): Likewise. 1330 * friend.c (make_friend_class): Likewise. 1331 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise. 1332 * spew.c (read_process_identifier): Likewise. 1333 13342002-02-01 Jason Merrill <jason@redhat.com> 1335 1336 PR c++/4872 1337 * decl.c (finish_function): Warn about a non-void function with 1338 no return statement and no abnormal exit. 1339 * cp-tree.h (struct cp_language_function): Add returns_abnormally. 1340 (current_function_returns_abnormally): New macro. 1341 * call.c (build_call): Set it. 1342 1343 * typeck.c (build_component_ref): Always complain about offsetof 1344 constructs on non-PODs. Only make it an error for members of 1345 virtual bases. 1346 1347 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS. 1348 (dump_function_decl): Always dump parms. 1349 1350 * decl2.c (finish_static_data_member_decl): Complain about a local 1351 class with a static data member. 1352 1353 PR c++/4286 1354 * search.c (lookup_field_1): Don't xref a static data member 1355 just because we looked it up. 1356 13572002-01-31 Jason Merrill <jason@redhat.com> 1358 1359 * Make-lang.in (parse.c): Handle .output file. 1360 1361 PR c++/3395 1362 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES, 1363 not TREE_TYPE. 1364 * semantics.c (finish_class_definition): Adjust. 1365 1366 Allow attributes in parms and casts. 1367 * parse.y (named_parm): Don't strip attrs. 1368 (declmods): Remove 'attributes' production. 1369 (nonempty_cv_qualifiers): Accept attributes. 1370 (ATTRIBUTE): Give precedence. 1371 * decl.c (groktypename): Handle attributes. 1372 (grokparms): Likewise. 1373 13742002-01-29 Jakub Jelinek <jakub@redhat.com> 1375 1376 * decl2.c (cxx_decode_option): Pass 0 as last argument to 1377 cpp_handle_option. 1378 * lang-specs.h: Use cpp_unique_options instead of cpp_options 1379 when used together with cc1_options. 1380 13812002-01-29 Nathan Sidwell <nathan@codesourcery.com> 1382 1383 PR c++/5132 1384 * typeck2.c (digest_init): Make sure non-array core type is 1385 instantiated. 1386 * decl2.c (reparse_absdcl_as_casts): Just store the type in the 1387 constructor, rather than build a new one. 1388 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the 1389 PURPOSE of constructor elts. 1390 13912002-01-23 Zack Weinberg <zack@codesourcery.com> 1392 1393 * Make-lang.in (parse.c): Adjust expected number of 1394 shift-reduce conflicts. 1395 (decl.o): Depend on diagnostic.h. 1396 * decl.c: Include diagnostic.h. 1397 (grokdeclarator): Check for null pointer. 1398 (finish_function): Don't abort when 1399 current_binding_level->parm_flag != 1, if errors have 1400 occurred; throw away the statement tree and extra binding 1401 levels, and continue. 1402 * lex.c (note_list_got_semicolon): Check for null pointer. 1403 * method.c (hack_identifier): Just return error_mark_node if 1404 value is error_mark_node. 1405 * parse.y (primary: TYPEID(type_id)): No need to use 1406 TYPE_MAIN_VARIANT here. 1407 (handler_seq): Accept an empty list of catch clauses and 1408 generate a fake handler block to avoid later crashes. 1409 (ansi_raise_identifier): Accept the error token too. 1410 * semantics.c (begin_class_definition, 1411 finish_class_definition): Check for error_mark_node. 1412 14132002-01-23 Zack Weinberg <zack@codesourcery.com> 1414 1415 * typeck2.c (friendly_abort): Delete definition. 1416 * cp-tree.h (friendly_abort): Don't prototype. 1417 (my_friendly_assert): Use fancy_abort. 1418 14192002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org> 1420 1421 * cp-tree.h (my_friendly_abort): Remove. 1422 14232002-01-23 Jakub Jelinek <jakub@redhat.com> 1424 1425 * spew.c (pending_inlines, pending_inlines_tail, 1426 processing_these_inlines): Make static. 1427 (mark_pending_inlines): Remove static. 1428 (begin_parsing_inclass_inline): If in function, save pi 1429 for GC to cp_function_chain->unparsed_inlines instead. 1430 (process_next_inline): Likewise. 1431 * cp-tree.h (struct cp_language_function): Add unparsed_inlines. 1432 (mark_pending_inlines): Add prototype. 1433 * decl.c (spew_debug): Remove unused extern. 1434 (mark_lang_function): Call mark_pending_inlines. 1435 14362002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org> 1437 1438 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c, 1439 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c, 1440 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: 1441 Change my_fancy_abort() to abort(). 1442 14432002-01-23 Jason Merrill <jason@redhat.com> 1444 1445 PR c++/5453 1446 * class.c (fixed_type_or_null): Fix thinko. 1447 1448 PR c++/3331 1449 * init.c (resolve_offset_ref): Use build_indirect_ref. 1450 1451 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'. 1452 14532002-01-22 Jason Merrill <jason@redhat.com> 1454 1455 * parse.y (function_body): Suppress the block for the outermost 1456 curly braces. 1457 * decl.c (pushdecl): Don't try to skip it. 1458 (begin_function_body): Keep the block we create, not the next one. 1459 * init.c (emit_base_init): Don't mess with keep_next_level. 1460 1461 * class.c (build_base_path): Tweak formatting. 1462 14632002-01-19 Nathan Sidwell <nathan@codesourcery.com> 1464 1465 Fix regression introduced with patch for c++/775 1466 * parse.y (class_head_defn): Check for template specializations 1467 with a different class-key. 1468 14692002-01-17 Jason Merrill <jason@redhat.com> 1470 1471 * decl.c (begin_constructor_body, begin_destructor_body): New fns. 1472 (begin_function_body): Call them and keep_next_level. 1473 * init.c (emit_base_init): Call keep_next_level. 1474 * semantics.c (setup_vtbl_ptr): Lose. 1475 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p. 1476 (vtbls_set_up_p): Lose. 1477 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init. 1478 * method.c (do_build_copy_constructor): Likewise. 1479 (synthesize_method): Call finish_mem_initializers. 1480 * parse.y (nodecls): Likewise. 1481 1482 * error.c (dump_type_suffix): Print the exception specs before 1483 recursing. 1484 (dump_function_decl): Here, too. 1485 1486 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT. 1487 14882002-01-10 Ira Ruben <ira@apple.com> 1489 1490 PR c++/907 1491 * decl.c (start_method): Handle attrlist. 1492 14932002-01-10 Jakub Jelinek <jakub@redhat.com> 1494 1495 * decl2.c (max_tinst_depth): Increase default limit to 500. 1496 14972002-01-10 Graham Stott <grahams@redhat.com> 1498 1499 * spew.c (YYCHAR): Uppercase macro parameter and add 1500 parenthesis. 1501 (YYCODE): Likewise. 1502 (NAME): Uppercase macro parameter. 1503 15042002-01-09 Graham Stott <grahams@redhat.com> 1505 1506 * decl.h (grokdeclarator): Wrap long line. 1507 1508 * semantics.c (FINISH_COND): Uppercase macro paramaters and 1509 add parenthesis. 1510 15112002-01-08 Graham Stott <grahams@redhat.com> 1512 1513 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis. 1514 (PALLOC): Uppercase macro parameter and whitespace. 1515 (SALLOC): Uppercase macro parameter. 1516 (SFREE): Uppercase macros parameter, add parenthese and 1517 whitespace. 1518 (STREQL): Uppercase macro parameter and whitespace. 1519 (STRNEQ): Likewise. 1520 (STRLSS): Likewise. 1521 (STRLEQ): Likewise. 1522 (STRGTR): Likewise. 1523 (STRGEQ): Likewise. 1524 1525 * call.c (convert_like): Add parenthesis and wrap. 1526 (convert_like_with_context): Likewise. 1527 (ICS_RANK): Whitespace. 1528 (NEED_TEMPORARY_P): Remove parenthesis. 1529 1530 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and 1531 whitespace. 1532 (VTT_MARKED_BINFO_P): Likewise. 1533 1534 * decl.c (BINDING_LEVEL): Add parenthesis. 1535 (DEF_OPERATOR): Likewise. 1536 1537 * mangle.c (MANGLE_TRACE): Add parenthesis. 1538 (MANGLE_TRACE_TREE): Likewise. 1539 (write_signed_number): Likewise. 1540 (write_unsigned_number): Likewise. 1541 1542 * pt.c (ccat): Uppercase macro parameter. 1543 (cat): Likewise 1544 1545 * search.c (SET_BINFO_ACCESS): Add parenthesis. 1546 15472002-01-07 Jason Merrill <jason@redhat.com> 1548 1549 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch 1550 to pedwarn. 1551 1552 PR c++/3536 1553 * method.c (make_thunk): If !flag_weak, give the thunk the 1554 function's linkage. 1555 (use_thunk): Here, too. 1556 15572002-01-07 Graham Stott <grahams@redhat.com> 1558 1559 * error.c: Update copyright date. 1560 (print_scope_operator): Add parenthesis. 1561 (print_left_paren): Likewise. 1562 (print_right_paren): Likewise. 1563 (print_left_bracket): Likewise. 1564 (print_right_bracket): Likewise. 1565 (print_template_argument_list_start): Likewise. 1566 (print_template_argument_list_end): Likewise. 1567 (print_non_consecutive_character): Likewise. 1568 (print_tree_identifier): Likewise. 1569 (print_identifier): Likewise. 1570 (NEXT_CODE): Uppercase macro parameter. 1571 (ident_fndecl): Delete unused. 1572 (GLOBAL_THING): Likewise. 1573 15742002-01-06 Graham Stott <grahams@redhat.com> 1575 1576 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis. 1577 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise. 1578 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise. 1579 (RECORD_OR_UNION_TYPE_CHECK): Likewise. 1580 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise. 1581 (C_IS_RESERVED_WORD): Uppercase macro parameter. 1582 (C_RID_YYCODE) Likewise. 1583 (ptrmem_cst): Use rtx. 1584 (LOCAL_BINDING_P): Add whitespace. 1585 (INHERITED_VALUE_BINDING_P): Likewise. 1586 (BINDING_SCOPE): Wrap long line. 1587 (BINDING_HAS_LEVEL_P): Remove parenthesis. 1588 (BINDING_VALUE): Wrap long line. 1589 (BINDING_TYPE): Whitespace. 1590 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis. 1591 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise. 1592 (IDENTIFIER_NAMESPACE_VALUE): Likewise. 1593 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise. 1594 (same_type_p): Uppercase macro parameters. 1595 (same_type_ignoring_top_level_qualifiers_p): Likewise. 1596 (OVL_FUNCTION): Wrap long line. 1597 (OVL_CHAIN): Whitespace. 1598 (OVL_CURRENT): Add parenthesis and whitespace. 1599 (OVL_NEXT): Whitespace. 1600 (OVL_USED): Likewise. 1601 (IDENTIFIER_TYPE_VALUE): Likewise. 1602 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis. 1603 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace. 1604 (LANG_ID_FIELD): Whitespace. 1605 (SET_LANG_ID(NODE,VALUE,NAME): Likewise. 1606 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap. 1607 (SET_IDENTIFIER_LABEL_VALUE): Whitespace. 1608 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap. 1609 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace. 1610 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap. 1611 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace. 1612 (IDENTIFIER_VIRTUAL_P): Likewise. 1613 (IDENTIFIER_OPNAME_P): Likewise. 1614 (IDENTIFIER_TYPENAME_P): Remove parenthesis. 1615 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters. 1616 (C_SET_EXP_ORIGINAL_CODE): Likewise. 1617 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line. 1618 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise. 1619 (IS_AGGR_TYPE): Uppercase macro parameter. 1620 (CLASS_TYPE_P): Likewise. 1621 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis. 1622 (IS_AGGR_TYPE_2): Whitespace. 1623 (TAGGED_TYPE_P): Uppercase macro parameter. 1624 (TYPE_BUILT_IN): Whitespace. 1625 (TYPE_FOR_JAVA): Likewise. 1626 (FUNCTION_ARG_CHAIN): Remove parenthesis. 1627 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis. 1628 (FUNCTION_FIRST_USER_PARAM): Likewise. 1629 (PROMOTES_TO_AGGR_TYPE): Whitespace. 1630 (DERIVED_FROM_P): Add parenthesis and wrap. 1631 (UNIQUELY_DERIVED_FROM_P): Likewise. 1632 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise. 1633 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise. 1634 (CLASSTYPE_USE_TEMPLATE): Whitespace. 1635 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis. 1636 (TYPE_GETS_DELETE): Add parenthesis. 1637 (TYPE_HAS_CONVERSION): Add parenthesis and wrap. 1638 (TYPE_HAS_ASSIGN_REF): Likewise, 1639 (TYPE_HAS_CONST_ASSIGN_REF): Likewise. 1640 (TYPE_HAS_INIT_REF): Likewise. 1641 (TYPE_HAS_CONST_INIT_REF): Likewise. 1642 (TYPE_BEING_DEFINED): Likewise. 1643 (TYPE_LANG_SPECIFIC): Likewise. 1644 (CLASSTYPE_RTTI): Likewise. 1645 (TYPE_OVERLOADS_CALL_EXPR): Likewise. 1646 (TYPE_OVERLOADS_ARRAY_REF): Likewise. 1647 (TYPE_OVERLOADS_ARROW): Likewise. 1648 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise. 1649 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis. 1650 (CLASSTYPE_METHOD_VEC): Likewise. 1651 (CLASSTYPE_MARKED_N): Likewise. 1652 (CLASSTYPE_MARKED): Likewise. 1653 (CLASSTYPE_MARKED2): Likewise. 1654 (CLASSTYPE_MARKED3): Likewise. 1655 (CLASSTYPE_MARKED4): Likewise. 1656 (CLASSTYPE_MARKED5): Likewise. 1657 (CLASSTYPE_MARKED6): Likewise. 1658 (SET_CLASSTYPE_MARKED): Whitespace. 1659 (CLEAR_CLASSTYPE_MARKED): Likewise. 1660 (SET_CLASSTYPE_MARKED2): Likewise. 1661 (CLEAR_CLASSTYPE_MARKED2): Likewise. 1662 (SET_CLASSTYPE_MARKED3): Likewise. 1663 (CLEAR_CLASSTYPE_MARKED3): Likewise. 1664 (SET_CLASSTYPE_MARKED4): Likewise. 1665 (CLEAR_CLASSTYPE_MARKED4): Likewise. 1666 (SET_CLASSTYPE_MARKED5): Likewise. 1667 (CLEAR_CLASSTYPE_MARKED5): Likewise. 1668 (SET_CLASSTYPE_MARKED6): Likewise. 1669 (CLEAR_CLASSTYPE_MARKED6): Likewise. 1670 (CLASSTYPE_TAGS): Likewise. 1671 (CLASSTYPE_VSIZE): Likewise. 1672 (CLASSTYPE_VBASECLASSES): Likewise. 1673 (CANONICAL_BINFO): Add parenthesis. 1674 (CLASSTYPE_SIZE(NODE): Likewise. 1675 (CLASSTYPE_SIZE_UNIT): Likewise. 1676 (CLASSTYPE_ALIGN(NODE): Likewise. 1677 (CLASSTYPE_USER_ALIGN): Likewise. 1678 (TYPE_JAVA_INTERFACE): Likewise. 1679 (CLASSTYPE_PURE_VIRTUALS): Likewise. 1680 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap. 1681 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise. 1682 (CLASSTYPE_HAS_MUTABLE): Likewise. 1683 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise. 1684 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap. 1685 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise. 1686 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise. 1687 (CLASSTYPE_INTERFACE_ONLY): Likewise. 1688 (CLASSTYPE_INTERFACE_KNOWN): Likewise. 1689 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise. 1690 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise. 1691 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise. 1692 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise. 1693 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap. 1694 (BINFO_UNSHARED_MARKED): Whitespace. 1695 (BINFO_MARKED): Whitespace and wrap. 1696 (SET_BINFO_MARKED): Likewise. 1697 (CLEAR_BINFO_MARKED): Likewise. 1698 (BINFO_VTABLE_PATH_MARKED): Likewise. 1699 (SET_BINFO_VTABLE_PATH_MARKED): Likewise. 1700 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise. 1701 (BINFO_SUBVTT_INDEX): Remove parenthesis. 1702 (BINFO_VPTR_INDEX): Likewise. 1703 (BINFO_PRIMARY_BASE_OF): Likewise, 1704 (CLASSTYPE_VFIELDS): Whitespace. 1705 (VF_DERIVED_VALUE): Wrap long line. 1706 (NAMESPACE_LEVEL): Whitespace. 1707 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis. 1708 (DEFARG_POINTER): Whitespace. 1709 (DECL_NEEDED_P): Remove parenthesis. 1710 (DECL_LANGUAGE): Whitespace. 1711 (SET_DECL_LANGUAGE): Add parenthesis. 1712 (DECL_CONSTRUCTOR_P): Whitespace and wrap. 1713 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis. 1714 (DECL_IN_AGGR_P): Whitespace. 1715 (DECL_FRIEND_P): Likewise. 1716 (DECL_BEFRIENDING_CLASSES): Likewise. 1717 (DECL_STATIC_FUNCTION_P): Whitespace and wrap. 1718 (DECL_NONCONVERTING_P): Whitespace. 1719 (DECL_PURE_VIRTUAL_P): Likewise. 1720 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise. 1721 (DECL_PENDING_INLINE_INFO): Whitespace. 1722 (DECL_SORTED_FIELDS): Likewise. 1723 (DECL_DEFERRED_FN): Likewise. 1724 (DECL_TEMPLATE_INFO): Likewise. 1725 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap. 1726 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise. 1727 (SET_TYPE_TEMPLATE_INFO): Add parenthesis. 1728 (TMPL_ARGS_LEVEL): Likewise. 1729 (SET_TMPL_ARGS_LEVEL): Likewise. 1730 (INNERMOST_TEMPLATE_PARMS): Whitespace. 1731 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter. 1732 (INTEGRAL_CODE_P(CODE): Add parenthesis. 1733 (CP_INTEGRAL_TYPE_P): Remove parenthesis. 1734 (TYPE_HAS_CONSTRUCTOR): Whitespace. 1735 (TREE_HAS_CONSTRUCTOR): Likewise. 1736 (TYPE_HAS_DESTRUCTOR): Likewise. 1737 (TYPE_HAS_REAL_ASSIGN_REF): Likewise. 1738 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise. 1739 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise. 1740 (TYPE_HAS_COMPLEX_INIT_REF): Likewise. 1741 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise. 1742 (TYPE_PTRMEMFUNC_P): Likewise. 1743 (TYPE_PTRMEMFUNC_FLAG): Likewise. 1744 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise. 1745 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise. 1746 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis. 1747 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. 1748 (DECL_ACCESS): Whitespace. 1749 (DECL_GLOBAL_CTOR_P): Remove parenthesis. 1750 (DECL_GLOBAL_DTOR_P): Likewise. 1751 (GLOBAL_INIT_PRIORITY): Likewise. 1752 (DECL_TEMPLATE_PARMS): Likewise. 1753 (DECL_TEMPLATE_RESULT): Likewise. 1754 (DECL_TEMPLATE_INSTANTIATIONS): Likewise. 1755 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise. 1756 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis. 1757 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise. 1758 (PRIMARY_TEMPLATE_P): Add parenthesis. 1759 (DECL_USE_TEMPLATE): Whitespace. 1760 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise. 1761 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise. 1762 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise. 1763 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise. 1764 (CALL_DECLARATOR_PARMS): Remove parenthesis. 1765 (CALL_DECLARATOR_QUALS): Likewise. 1766 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise. 1767 (TEMP_NAME_P): Wrap. 1768 (VFIELD_NAME_P): Likewise. 1769 (B_SET): Uppercase macro parameters and add parenthesis. 1770 (B_CLR): Likewise. 1771 (B_TST): Likewise. 1772 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters. 1773 (LOOKUP_TYPES_ONLY): Uppercase macro parameters. 1774 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters. 1775 (same_or_base_type_p): Likewise. 1776 (cp_deprecated): Likewise. 1777 17782002-01-05 Richard Henderson <rth@redhat.com> 1779 1780 * semantics.c (expand_body): Revert last change. 1781 17822002-01-04 Jason Merrill <jason@redhat.com> 1783 1784 PR c++/4122 1785 * class.c (update_vtable_entry_for_fn): Set delta to zero for a 1786 lost primary. 1787 1788 * class.c (build_vtbl_initializer): Check for a lost primary 1789 before calculating the vtable entry to throw away. 1790 17912002-01-02 Jason Merrill <jason@redhat.com> 1792 1793 * semantics.c (expand_body): Call outlining_inline_function when 1794 emitting an inline function out of line. 1795 17962002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1797 1798 PR c++/5116, c++/764 reversion 1799 * call.c (build_new_op): Revert the instantiations. They are 1800 incorrect. 1801 18022002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1803 1804 PR c++/5089 1805 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void. 1806 18072002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1808 1809 PR c++/3716 1810 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst. 1811 (tsubst, case POINTER_TYPE): Handle pmfs here. 1812 (tsubst, case OFFSET_TYPE): Check it is not an offset to 1813 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE. 1814 18152002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1816 1817 PR c++/35 1818 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too. 1819 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too. 1820 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the 1821 PARM_DECL. 1822 (tsubst_template_parms): Break up loop statements. 1823 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template 1824 parm PARM_DECLs don't get promoted. 1825 18262002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1827 1828 PR c++/5123 1829 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR. 1830 (build_x_function_call): Cope with a COMPONENT_REF containing a 1831 TEMPLATE_ID_EXPR. 1832 18332002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1834 1835 PR c++/5213 1836 * pt.c (convert_template_argument): Be more careful determining 1837 when RECORD_TYPE templates are or are not templates. 1838 18392002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1840 1841 PR c++/775 1842 * cp-tree.h (handle_class_head): Adjust prototype. 1843 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P 1844 parameters. Use for all class heads. 1845 * parse.y (named_class_head_sans_basetype, named_class_head, 1846 named_complex_class_head_sans_basetype, 1847 named_class_head_sans_basetype_defn, 1848 unnamed_class_head): Remove. 1849 (class_head, class_head_apparent_template): Recognize class heads 1850 (class_head_decl, class_head_defn): New reductions. Process class 1851 heads. 1852 (structsp): Adjust class definition and class declaration 1853 reductions. 1854 (maybe_base_class_list): Give diagnostic on empty list. 1855 18562002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1857 1858 PR c++/4379 1859 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a 1860 single non-static member. 1861 (unary_complex_lvalue): If it cannot be a pointer to member, don't 1862 make it so. Check it is not pointer to reference. 1863 18642002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1865 1866 PR c++/5132 1867 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we 1868 are processing a template decl. 1869 18702002-01-02 Nathan Sidwell <nathan@codesourcery.com> 1871 1872 PR c++/5116, c++/764 1873 * call.c (build_new_op): Make sure template class operands are 1874 instantiated. Simplify arglist construction. 1875 18762001-12-29 Nathan Sidwell <nathan@codesourcery.com> 1877 1878 * call.c (build_user_type_conversion_1): Use my_friendly_assert 1879 rather than if ... abort. 1880 * cvt.c (convert_to_reference): Likewise. 1881 * semantics.c (setup_vtbl_ptr): Likewise. 1882 * pt.c (lookup_template_class): Comment typo. 1883 18842001-12-29 Nathan Sidwell <nathan@codesourcery.com> 1885 1886 PR c++/5125 1887 * pt.c (push_template_decl_real): Make sure DECL has 1888 DECL_LANG_SPECIFIC. 1889 18902001-12-29 Nathan Sidwell <nathan@codesourcery.com> 1891 1892 PR c++/335 1893 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer 1894 for non-reference fields. 1895 * typeck.c (require_complete_type): Use resolve_offset_ref). 1896 18972001-12-26 Nathan Sidwell <nathan@codesourcery.com> 1898 1899 PR c++/196 1900 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF. 1901 19022001-12-24 Nathan Sidwell <nathan@codesourcery.com> 1903 1904 PR c++/160 1905 * typeck.c (build_modify_expr): Remove old unreachable code & tidy 1906 up. Don't stabilize_references when initializing a reference. 1907 19082001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1909 1910 * decl2.c (lang_f_options): Const-ify. 1911 19122001-12-20 Joseph S. Myers <jsm28@cam.ac.uk> 1913 1914 * config-lang.in (diff_excludes): Remove. 1915 19162001-12-19 Nathan Sidwell <nathan@codesourcery.com> 1917 1918 PR c++/90 1919 * typeck.c (build_function_call_real): Use original function 1920 expression for errors. 1921 19222001-12-18 Jason Merrill <jason@redhat.com> 1923 1924 PR c++/3242 1925 * class.c (add_method): Do compare 'this' quals when trying to match a 1926 used function. Don't defer to another used function. 1927 19282001-12-18 Nathan Sidwell <nathan@codesourcery.com> 1929 1930 * pt.c (instantiate_clone): Remove, fold into ... 1931 (instantiate_template): ... here. Simplify by removing mutual 1932 recursion. 1933 * typeck2.c (build_m_component_ref): Don't cv qualify the function 1934 pointed to by a pointer to function. 1935 * class.c (delete_duplicate_fields_1): Typo. 1936 19372001-12-18 Jason Merrill <jason@redhat.com> 1938 1939 C++ ABI change: destroy value arguments in caller. 1940 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't 1941 create an extra binding level for the parameters. 1942 * decl.c (store_parm_decls): Don't do parameter cleanups. 1943 19442001-12-18 Nathan Sidwell <nathan@codesourcery.com> 1945 1946 * call.c (build_new_method_call): Use '%#V'. 1947 * error.c (cv_to_string): Use V parameter to determine padding. 1948 19492001-12-18 Joseph S. Myers <jsm28@cam.ac.uk> 1950 1951 * call.c, decl2.c, init.c: Use "built-in" and "bit-field" 1952 spellings in messages. 1953 19542001-12-17 Zack Weinberg <zack@codesourcery.com> 1955 1956 * cp-tree.h: Delete #defines for cp_error, cp_warning, 1957 cp_pedwarn, and cp_compiler_error. 1958 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c, 1959 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c, 1960 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c, 1961 typeck2.c: Change calls to the above macros to use their 1962 language-independent equivalents: error, warning, pedwarn, and 1963 internal_error respectively. 1964 19652001-12-16 Neil Booth <neil@daikokuya.demon.co.uk> 1966 1967 * decl2.c (finish_file): Remove back_end_hook. 1968 19692001-12-16 Joseph S. Myers <jsm28@cam.ac.uk> 1970 1971 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c, 1972 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c, 1973 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors. 1974 19752001-12-15 Joseph S. Myers <jsm28@cam.ac.uk> 1976 1977 * lang-options.h: Use American spelling in messages. 1978 19792001-12-13 Jason Merrill <jason@redhat.com> 1980 1981 * Make-lang.in (parse.h): Separate rule, just depend on parse.c. 1982 1983 Use cleanups to run base and member destructors. 1984 * init.c (push_base_cleanups): New function, split out from... 1985 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code. 1986 * decl.c (finish_destructor_body): Move vbase destruction code to 1987 push_base_cleanups. 1988 (begin_function_body, finish_function_body): New fns. 1989 (finish_function): Move [cd]tor handling and call_poplevel to 1990 finish_function_body. 1991 (pushdecl): Skip the new level. 1992 * semantics.c (genrtl_try_block): Don't call end_protect_partials. 1993 (setup_vtbl_ptr): Call push_base_cleanups. 1994 * method.c (synthesize_method): Call {begin,end}_function_body. 1995 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK. 1996 * cp-tree.h: Declare new fns. 1997 * parse.y (function_body, .begin_function_body): New nonterminals. 1998 (fndef, pending_inline, function_try_block): Use function_body. 1999 (ctor_initializer_opt, function_try_block): No longer has a value. 2000 (base_init): Remove .set_base_init token. 2001 (.set_base_init, compstmt_or_error): Remove. 2002 * Make-lang.in (parse.c): Expect two fewer s/r conflicts. 2003 2004 * optimize.c (maybe_clone_body): Fix parameter updating. 2005 20062001-12-12 Jason Merrill <jason@redhat.com> 2007 2008 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft. 2009 * semantics.c (genrtl_start_function): Don't pass 2010 parms_have_cleanups or push an extra binding level. 2011 (genrtl_finish_function): Lose cleanup_label cruft. 2012 2013 * cp-tree.h (struct cp_language_function): Remove x_ctor_label. 2014 (ctor_label): Remove. 2015 * semantics.c (finish_return_stmt): Lose ctor_label support. 2016 * decl.c (finish_constructor_body, mark_lang_function): Likewise. 2017 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not 2018 dtor_label. 2019 2020 * call.c (build_new_method_call): Let resolves_to_fixed_type_p 2021 check for [cd]tors. 2022 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix. 2023 2024 * decl.c (finish_function): Check VMS_TARGET, not VMS. 2025 2026 * decl.c (start_cleanup_fn): Remove redundant pushlevel. 2027 (end_cleanup_fn): And poplevel. 2028 2029 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER 2030 if we're in a template. 2031 20322001-12-12 Jakub Jelinek <jakub@redhat.com> 2033 2034 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P, 2035 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT, 2036 THIS_NAME_P): Delete. 2037 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P, 2038 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash 2039 with internal naming scheme. 2040 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use. 2041 20422001-12-12 Nathan Sidwell <nathan@codesourcery.com> 2043 2044 * decl.c (grokdeclarator): Deprecated implicit typename use. 2045 20462001-12-11 Nathan Sidwell <nathan@codesourcery.com> 2047 2048 PR g++/51 2049 * parse.y (frob_specs): Indicate it is a language linkage which 2050 contained the extern. 2051 * decl.c (grokdeclarator): Allow extern language linkage with 2052 other specifiers. 2053 20542001-12-10 Nathan Sidwell <nathan@codesourcery.com> 2055 2056 PR g++/72 2057 * decl.c (add_binding): Don't reject duplicate typedefs involving 2058 template parameters. 2059 20602001-12-10 Neil Booth <neil@daikokuya.demon.co.uk> 2061 2062 * parse.y, semantics.c: Similarly. 2063 20642001-12-09 Nathan Sidwell <nathan@codesourcery.com> 2065 2066 PR g++/87 2067 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p. 2068 (copy_args_p): Rename to ... 2069 (copy_fn_p): ... here. 2070 (grok_special_member_properties): New function. 2071 (grok_op_properties): Lose VIRTUALP parameter. 2072 (copy_assignment_arg_p): Remove. 2073 * call.c (build_over_call): Use copy_fn_p. 2074 * decl.c (grokfndecl): Reformat. Adjust call to 2075 grok_op_properties. 2076 (copy_args_p): Rename to ... 2077 (copy_fn_p): ... here. Reject template functions. Check for pass 2078 by value. 2079 (grok_special_member_properties): Remember special functions. 2080 (grok_ctor_properties): Don't remember them here, just check. 2081 (grok_op_properties): Likewise. 2082 (start_method): Call grok_special_member_properties. 2083 * decl2.c (grokfield): Likewise. 2084 (copy_assignment_arg_p): Remove. 2085 (grok_function_init): Don't remember abstract assignment here. 2086 * pt.c (instantiate_class_template): Call 2087 grok_special_member_properties. 2088 (tsubst_decl): Adjust grok_op_properties call. 2089 20902001-12-08 Aldy Hernandez <aldyh@redhat.com> 2091 2092 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and 2093 RID_TYPES_COMPATIBLE_P. 2094 20952001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca> 2096 2097 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in 2098 call to build_aggr_init. 2099 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND. 2100 21012001-12-08 Neil Booth <neil@daikokuya.demon.co.uk> 2102 2103 * parse.y: Replace uses of the string non-terminal with STRING. 2104 Don't perform string concatentaion here. 2105 (string): Remove non-terminal. 2106 * semantics.c (finish_asm_stmt): Don't concatenate strings here. 2107 21082001-12-05 Jason Merrill <jason@redhat.com> 2109 2110 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define. 2111 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define. 2112 * tree.c (cp_start_inlining, cp_end_inlining): New fns. 2113 * pt.c (push_tinst_level): No longer static. 2114 * cp-tree.h: Declare them. 2115 2116 * init.c (resolve_offset_ref): Don't check access for the base 2117 conversion to access a FIELD_DECL. 2118 2119 * cp-tree.h (TYPE_REFFN_P): New macro. 2120 * decl.c (bad_specifiers): Check it, too. 2121 2122 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY 2123 on the __*_type_info type if we haven't seen a definition. 2124 21252001-12-05 Neil Booth <neil@daikokuya.demon.co.uk> 2126 2127 * decl.c: Include c-common.h. 2128 (shadow_warning): Move to c-common.c. 2129 2130Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 2131 2132 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE. 2133 21342001-12-04 Nathan Sidwell <nathan@codesourcery.com> 2135 2136 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm. 2137 21382001-12-04 Nathan Sidwell <nathan@codesourcery.com> 2139 2140 PR g++/164 2141 * init.c (sort_base_init): Allow binfos to be directly specified. 2142 * method.c (do_build_copy_constructor): Explicitly convert to the 2143 base instance. 2144 (do_build_assign_ref): Likewise. 2145 21462001-12-03 Hans-Peter Nilsson <hp@bitrange.com> 2147 2148 * decl.c (xref_basetypes): Don't use C99 construct in tag_code 2149 declaration and initialization. 2150 21512001-12-03 Neil Booth <neil@daikokuya.demon.co.uk> 2152 2153 * typeck2.c: Remove leading capital from diagnostic messages, as 2154 per GNU coding standards. 2155 21562001-12-03 Mumit Khan <khan@nanotech.wisc.edu> 2157 2158 PR c++/3394 2159 * decl.c (xref_basetypes): Handle attributes between 2160 'class' and name. 2161 21622001-12-03 Nathan Sidwell <nathan@codesourcery.com> 2163 2164 PR g++/3381 2165 * parse.y (named_complex_class_head_sans_basetype): Add new 2166 reduction. 2167 * Make-lang.in (parse.c): Adjust expected conflict count. 2168 21692001-12-03 Jason Merrill <jason@redhat.com> 2170 2171 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the 2172 immediate binfos for our virtual bases. 2173 21742001-12-02 Neil Booth <neil@daikokuya.demon.co.uk> 2175 2176 * call.c (build_java_interface_fn_ref): Similarly. 2177 * except.c (is_admissible_throw_operand): Similarly. 2178 * init.c (build_java_class_ref): Similarly. 2179 * xref.c (open_xref_file): Similarly. 2180 21812001-12-01 Neil Booth <neil@daikokuya.demon.co.uk> 2182 2183 * class.c (finish_struct): Remove trailing periods from messages. 2184 * decl.c (check_tag_decl): Similarly. 2185 * lex.c (cxx_set_yydebug): Similarly. 2186 * typeck2.c (friendly_abort): Similarly. 2187 21882001-11-29 Mark Mitchell <mark@codesourcery.com> 2189 2190 PR c++/3048 2191 * cp-tree.h (ovl_member): Remove. 2192 * decl2.c (merge_functions): Handle extern "C" functions 2193 specially. 2194 * tree.c (ovl_member): Remove. 2195 21962001-11-29 Mark Mitchell <mark@codesourcery.com> 2197 2198 PR c++/4842 2199 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a 2200 FUNCTION_DECL, as input. 2201 (mark_overriders): Remove. 2202 (warn_hidden): Rework for the new ABI. 2203 22042001-11-29 Mark Mitchell <mark@codesourcery.com> 2205 2206 PR c++/3471 2207 * call.c (convert_like_real): Do not build additional temporaries 2208 for rvalues of class type. 2209 22102001-11-28 Nathan Sidwell <nathan@codesourcery.com> 2211 2212 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base. 2213 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise. 2214 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise. 2215 (DERIVED_FROM_P): Likewise. 2216 (enum base_access): Renumber, add ba_quiet bit mask. 2217 (get_binfo): Remove. 2218 (get_base_distance): Remove. 2219 (binfo_value): Remove. 2220 (ACCESSIBLY_DERIVED_FROM_P): Remove. 2221 * call.c (standard_conversion): Use lookup_base. 2222 * class.c (strictly_overrides): Likewise. 2223 (layout_virtual_bases): Likewise. 2224 (warn_about_ambiguous_direct_bases): Likewise. 2225 (is_base_of_enclosing_class): Likewise. 2226 (add_vcall_offset_vtbl_entries_1): Likewise. 2227 * cvt.c (build_up_reference): Adjust comment. 2228 * init.c (build_member_call): Reformat. 2229 * search.c (get_binfo): Remove. 2230 (get_base_distance_recursive): Remove. 2231 (get_base_distance): Remove. 2232 (lookup_base_r): Tweak. 2233 (lookup_base): Add ba_quiet control. Complete the types here. 2234 (covariant_return_p): Use lookup_base. 2235 * tree.c (binfo_value): Remove. 2236 (maybe_dummy_object): Use lookup_base. 2237 * typeck.c (build_static_cast): Use lookup_base. 2238 (get_delta_difference): Likewise. 2239 * typeck2.c (binfo_or_else): Use lookup_base. 2240 (build_scoped_ref): Add back error_mark_check. 2241 (build_m_component_ref): Use lookup_base. 2242 22432001-11-29 Joseph S. Myers <jsm28@cam.ac.uk> 2244 2245 * Make-lang.in (c++.generated-manpages): New dummy target. 2246 2247Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 2248 2249 * Make-lang.in (cp-lang.o): Depends on c-common.h. 2250 * cp-lang.c (c-common.h): Include. 2251 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks. 2252 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p. 2253 * expr.c (init_cplus_expand): Don't set lang_expand_constant. 2254 22552001-11-26 Neil Booth <neil@daikokuya.demon.co.uk> 2256 2257 * decl2.c (c_language): Move to c-common.c. 2258 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c 2259 functions. 2260 (cxx_init): Update. 2261 22622001-11-26 Jason Merrill <jason@redhat.com> 2263 2264 * call.c (joust): Remove COND_EXPR hack. 2265 22662001-11-25 Aldy Hernandez <aldyh@redhat.com> 2267 2268 * search.c (lookup_base_r): Declare bk in variable declaration 2269 space. 2270 22712001-11-25 Nathan Sidwell <nathan@codesourcery.com> 2272 2273 PR g++/3145 2274 * class.c (build_vbase_pointer): Remove. 2275 (build_vbase_path): Remove. 2276 (build_base_path): New function. 2277 * cp-tree.h (base_access, base_kind): New enumerations. 2278 (build_base_path): Declare. 2279 (convert_pointer_to_real): Remove. 2280 (convert_pointer_to): Remove. 2281 (lookup_base): Declare. 2282 (convert_pointer_to_vbase): Remove. 2283 * call.c (build_scoped_method_call): Use lookup_base & 2284 build_base_path instead of convert_pointer_to_real, 2285 get_base_distance & get_binfo. 2286 (build_over_call): Likewise. 2287 * cvt.c (cp_convert_to_pointer): Likewise. 2288 (convert_to_pointer_force): Likewise. 2289 (build_up_reference): Likewise. 2290 (convert_pointer_to_real): Remove. 2291 (convert_pointer_to): Remove. 2292 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path 2293 instead of convert_pointer_to_vbase & build_vbase_path. 2294 (emit_base_init): Use build_base_path instead of 2295 convert_pointer_to_real. 2296 (expand_virtual_init): Lose unrequired conversions. 2297 (resolve_offset_ref): Use lookup_base and build_base_path 2298 instead of convert_pointer_to. 2299 * rtti.c (build_dynamic_cast_1): Use lookup_base & 2300 build_base_path instead of get_base_distance & build_vbase_path. 2301 * search.c (get_vbase_1): Remove. 2302 (get_vbase): Remove. 2303 (convert_pointer_to_vbase): Remove. 2304 (lookup_base_recursive): New function. 2305 (lookup_base): New function. 2306 * typeck.c (require_complete_type): Use lookup_base & 2307 build_base_path instead of convert_pointer_to. 2308 (build_component_ref): Likewise. 2309 (build_x_function_call): Likewise. 2310 (get_member_function_from_ptrfunc): Likewise. 2311 (build_component_addr): Likewise. 2312 * typeck2.c (build_scoped_ref): Likewise. 2313 23142001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 2315 2316 * cp-tree.h (CP_TYPE_QUALS): Removed. 2317 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree. 2318 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and 2319 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN. 2320 * dump.c (cp_dump_tree): Use void* dump_info argument to match 2321 lang-hooks prototype. 2322 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c, 2323 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to 2324 CP_TYPE_QUALS changed to cp_type_quals. 2325 * Make-lang.in: References to c-dump.h changed to tree-dump.h. 2326 (CXX_C_OBJS): Remove c-dump.o. 2327 23282001-11-21 Mark Mitchell <mark@codesourcery.com> 2329 2330 PR c++/3637 2331 * pt.c (lookup_template_class): Ensure that all specializations 2332 are registered on the list corresponding to the most general 2333 template. 2334 23352001-11-20 Mark Mitchell <mark@codesourcery.com> 2336 2337 * call.c (non_reference): Add documentation. 2338 (convert_class_to_reference): Do not strip reference types 2339 from conversion operators. 2340 (maybe_handle_ref_bind): Simplify. 2341 (compare_ics): Correct handling of references. 2342 23432001-11-19 John Wilkinson <johnw@research.att.com> 2344 2345 * dump.c (dump_op): New function. 2346 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use 2347 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs. 2348 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P, 2349 23502001-11-19 Mark Mitchell <mark@codesourcery.com> 2351 2352 PR4629 2353 * semantics.c (finish_sizeof): Make sure that expression created 2354 while processing a template do not have a type. 2355 (finish_alignof): Likewise. 2356 * typeck.c (c_sizeof): Likewise. 2357 (expr_sizeof): Likewise. 2358 23592001-11-18 Neil Booth <neil@daikokuya.demon.co.uk> 2360 2361 * lex.c (cxx_finish): Call c_common_finish. 2362 (finish_parse): Remove. 2363 23642001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2365 2366 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE 2367 when displaying error message about missing array bounds. 2368 23692001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2370 2371 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR, 2372 CONST_CAST_EXPR. 2373 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR. 2374 23752001-11-16 Neil Booth <neil@daikokuya.demon.co.uk> 2376 2377 * cp-tree.h (print_class_statistics): Restore. 2378 23792001-11-15 Jason Merrill <jason@redhat.com> 2380 2381 * method.c (use_thunk): Don't emit debugging information for thunks. 2382 2383 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions. 2384 * decl.c (make_typename_type): Handle getting a class template. 2385 * search.c (lookup_field_r): A class template is good enough for 2386 want_type. 2387 2388 * call.c (convert_like_real): Only use cp_convert for the bad part. 2389 (standard_conversion): Also allow bad int->enum. 2390 * typeck.c (ptr_reasonably_similar): Also allow functions to 2391 interconvert. Pointers to same-size integers are reasonably 2392 similar. 2393 2394 * cvt.c (convert_to_void): If we build a new COND_EXPR, always 2395 give it void type. 2396 23972001-11-15 Nathan Sidwell <nathan@codesourcery.com> 2398 2399 PR g++/3154 2400 * init.c (sort_base_init): Remove unreachable code. 2401 (expand_member_init): Adjust comment to reflect reality. Simplify 2402 and remove unreachable code. 2403 24042001-11-15 Neil Booth <neil@daikokuya.demon.co.uk> 2405 2406 * cp-tree.h (init_reswords, cxx_init_decl_processing): New. 2407 (cxx_init): Update prototype. 2408 * decl.c (init_decl_processing): Rename. Move null node init 2409 to its creation time. 2410 * lex.c (cxx_init_options): Update. 2411 (cxx_init): Combine with old init_parse; also call 2412 cxx_init_decl_processing. 2413 24142001-11-14 Richard Sandiford <rsandifo@redhat.com> 2415 2416 * decl.c (check_initializer): Try to complete the type of an 2417 array element before checking whether it's complete. Don't 2418 complain about arrays with complete element types but an 2419 unknown size. 2420 (cp_finish_decl): Build the hierarchical constructor before 2421 calling maybe_deduce_size_from_array_init. 2422 24232001-11-14 Joseph S. Myers <jsm28@cam.ac.uk> 2424 2425 * Make-lang.in: Change all uses of $(manext) to $(man1ext). 2426 24272001-11-13 Nathan Sidwell <nathan@codesourcery.com> 2428 2429 PR g++/4206 2430 * parse.y (already_scoped_stmt): Remove. 2431 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt. 2432 24332001-11-12 H.J. Lu <hjl@gnu.org> 2434 2435 * cvt.c (ocp_convert): Don't warn the address of a weak 2436 function is always `true'. 2437 24382001-11-09 Neil Booth <neil@daikokuya.demon.co.uk> 2439 2440 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, 2441 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, 2442 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override. 2443 * cp-tree.h (print_class_statistics): Remove. 2444 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type, 2445 cxx_print_identifier, cxx_set_yydebug): New. 2446 * lex.c (set_yydebug): Rename c_set_yydebug. 2447 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier, 2448 lang_print_xnode): Rename. 2449 * tree.c (print_lang_statistics): Rename. 2450 24512001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2452 2453 * class.c (dump_array): Fix format specifier warning. 2454 24552001-11-09 Neil Booth <neil@daikokuya.demon.co.uk> 2456 2457 * cp-lang.c (LANG_HOOKS_NAME): Override. 2458 (struct lang_hooks): Constify. 2459 * lex.c (cxx_init_options): Update. 2460 (lang_identify): Remove. 2461 * parse.y (language_string): Remove. 2462 24632001-11-08 Andreas Franck <afranck@gmx.de> 2464 2465 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME, 2466 DEMANGLER_CROSS_NAME): Handle program_transform_name the way 2467 suggested by autoconf. 2468 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define. 2469 (c++.install-common): Use the transformed target alias names. 2470 24712001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk> 2472 2473 * Make-lang.in: Update. 2474 * cp-lang.c: Include langhooks-def.h. 2475 24762001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2477 2478 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR. 2479 24802001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2481 2482 * lex.c (copy_lang_type): Add static prototype. 2483 24842001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2485 2486 * pt.c (unify): Handle SCOPE_REF. 2487 24882001-11-01 Jakub Jelinek <jakub@redhat.com> 2489 2490 * tree.c (cp_copy_res_decl_for_inlining): Adjust 2491 DECL_ABSTRACT_ORIGIN for the return variable. 2492 24932001-10-31 Zack Weinberg <zack@codesourcery.com> 2494 2495 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated. 2496 24972001-10-28 Joseph S. Myers <jsm28@cam.ac.uk> 2498 2499 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c, 2500 semantics.c, spew.c: Fix spelling errors. 2501 25022001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2503 2504 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL. 2505 25062001-10-25 Zack Weinberg <zack@codesourcery.com> 2507 2508 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to 2509 pop_everything. 2510 2511Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 2512 2513 * cp-lang.c (cxx_get_alias_set): New function. 2514 Point LANG_HOOKS_GET_ALIAS_SET to it. 2515 25162001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2517 2518 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node. 2519 * cp-tree.h (make_unbound_class_template): Prototype new function. 2520 * decl.c (make_unbound_class_template): New function. 2521 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE. 2522 * error.c (dump_type): Likewise. 2523 * mangle.c (write_type): Likewise. 2524 * parse.y (template_parm): Likewise. 2525 (template_argument): Use make_unbound_class_template. 2526 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE. 2527 (tsubst): Likewise. 2528 (tsubst_copy): Likewise. 2529 (unify): Likewise. 2530 * tree.c (walk_tree): Likewise. 2531 * typeck.c (comptypes): Likewise. 2532 25332001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2534 2535 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold 2536 extra calls into fewer ones. 2537 25382001-10-18 Alexandre Oliva <aoliva@redhat.com> 2539 2540 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE. 2541 Warn when merging inline with attribute noinline. 2542 (start_decl, start_function): Warn if inline and attribute 2543 noinline appear in the same declaration. 2544 25452001-10-16 H.J. Lu <hjl@gnu.org> 2546 2547 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined 2548 for tree checking disabled. 2549 25502001-10-16 Hans-Peter Nilsson <hp@axis.com> 2551 2552 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL && 2553 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME. 2554 25552001-10-15 Richard Sandiford <rsandifo@redhat.com> 2556 2557 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define. 2558 (unify): Only handle MINUS_EXPR specially if the above flag is set 2559 and the subtracted constant is 1. Clear the flag on recursive calls. 2560 Set it when unifying the maximum value in an INTEGER_TYPE's range. 2561 25622001-10-15 Richard Sandiford <rsandifo@redhat.com> 2563 2564 * decl.c (bad_specifiers): Don't allow exception specifications 2565 on any typedefs. 2566 25672001-10-14 Neil Booth <neil@daikokuya.demon.co.uk> 2568 2569 * cp/lex.c (init_cp_pragma): Similarly. 2570 25712001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2572 2573 * pt.c (lookup_template_class): Build complete template arguments 2574 for BOUND_TEMPLATE_TEMPLATE_PARM. 2575 25762001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2577 2578 * cp-tree.h (TYPE_BINFO): Update comment. 2579 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro. 2580 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info. 2581 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS. 2582 (copy_type): Prototype new function. 2583 * lex.c (copy_lang_decl): Gather tree node statistics. 2584 (copy_lang_type): New function. 2585 (copy_type): Likewise. 2586 (cp_make_lang_type): Create lang_type for 2587 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE 2588 and BOUND_TEMPLATE_TEMPLATE_PARM. 2589 * pt.c (tsubst): Use copy_type instead of copy_node. 2590 * search.c (lookup_field_1): Ignore TYPENAME_TYPE. 2591 25922001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2593 2594 * pt.c (determine_specialization): Ignore functions without 2595 DECL_TEMPLATE_INFO. 2596 25972001-10-12 Nathan Sidwell <nathan@codesourcery.com> 2598 2599 PR g++/4476 2600 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes. 2601 26022001-10-11 Jason Merrill <jason_merrill@redhat.com> 2603 2604 * typeck2.c (store_init_value): Don't re-digest a bracketed 2605 initializer. 2606 2607 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of 2608 ANON_AGGR_TYPE_P. 2609 26102001-10-11 Richard Henderson <rth@redhat.com> 2611 2612 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead 2613 of an asm statement. 2614 (build_vtbl_ref_1): Split out from build_vtbl_ref. 2615 (build_vfn_ref): Use it to handle vtable descriptors before 2616 calling build_vtable_entry_ref. 2617 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit. 2618 26192001-10-10 Richard Henderson <rth@redhat.com> 2620 2621 * parse.y (asm_operand): Allow named operands. 2622 * semantics.c (finish_asm_stmt): Tweek for changed location 2623 of the operand constrant. 2624 26252001-10-09 Jason Merrill <jason_merrill@redhat.com> 2626 2627 * call.c (standard_conversion): Add bad conversion between 2628 integers and pointers. 2629 (convert_like_real): Don't use convert_for_initialization for bad 2630 conversions; complain here and use cp_convert. 2631 (build_over_call): Don't handle bad conversions specially. 2632 (perform_implicit_conversion): Allow bad conversions. 2633 (can_convert_arg_bad): New fn. 2634 * cp-tree.h: Declare it. 2635 * typeck.c (convert_for_assignment): Use it. 2636 (ptr_reasonably_similar): Any target type is similar to void. 2637 26382001-10-08 Alexandre Oliva <aoliva@redhat.com> 2639 2640 * Make-lang.in (CXX_OBJS): Added cp-lang.o. 2641 (cp/cp-lang.o): New rule. 2642 * cp-tree.h: Declare hooks. 2643 * tree.c: Make hooks non-static. 2644 (init_tree): Don't initialize hooks here. 2645 * lex.c: Likewise. Move definition of lang_hooks to... 2646 * cp-lang.c: ... new file. 2647 26482001-10-08 Richard Henderson <rth@redhat.com> 2649 2650 * cp-tree.h (struct lang_decl_flags): Remove declared_inline. 2651 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl. 2652 26532001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2654 2655 * class.c (build_vtable_entry_ref): Const-ify. 2656 * decl.c (predefined_identifier, 2657 initialize_predefined_identifiers): Likewise. 2658 * init.c (build_new_1): Likewise. 2659 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword): 2660 Likewise. 2661 26622001-10-05 Alexandre Oliva <aoliva@redhat.com> 2663 2664 * optimize.c (struct inline_data): Moved to ../tree-inline.c. 2665 (INSNS_PER_STMT): Likewise. 2666 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise. 2667 (copy_body, initialize_inlined_parameters): Likewise. 2668 (declare_return_variable, inlinable_function_p): Likewise. 2669 (expand_call_inline, expand_calls_inline): Likewise. 2670 (optimize_inline_calls, clone_body): Likewise. 2671 * tree.c (walk_tree): Moved to ../tree-inline.c. 2672 (walk_tree_without_duplicates): Likewise. 2673 (copy_tree_r, remap_save_expr): Likewise. 2674 26752001-10-04 Alexandre Oliva <aoliva@redhat.com> 2676 2677 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h. 2678 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise. 2679 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl. 2680 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h. 2681 (flag_inline_trees): Moved declaration to ../tree-inline.h. 2682 (walk_tree): Moved declaration to ../tree-inline.h. 2683 (walk_tree_without_duplicates, copy_tree_r): Likewise. 2684 (remap_save_expr): Likewise. 2685 * decl.c: Include tree-inline.h. 2686 (lang_mark_tree): Don't mark inlined_fns. 2687 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c. 2688 * optimize.c: Include tree-inline.h. 2689 (optimize_inline_calls): Move declaration to ../tree.h, as 2690 non-static. 2691 (remap_decl): Use language-independent constructs and hooks. 2692 (remap_block, copy_body_r, declare_return_variable): Likewise. 2693 (inlinable_function_p): Likewise. Don't test for 2694 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is 2695 no longer language-specific. 2696 (optimize_inline_calls): Likewise. Make it non-static. Moved 2697 call of dump_function to... 2698 (optimize_function): Here... 2699 (clone_body): New function, extracted from... 2700 (maybe_clone_body): ... here. Build decl_map locally and pass 2701 it on to clone_body. 2702 * pt.c, semantics.c: Include tree-inline.h. 2703 * tree.c: Likewise. 2704 (cp_walk_subtrees): New language-specific hook for tree inlining. 2705 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls, 2706 cp_is_overload_p, cp_auto_var_in_fn_p, 2707 cp_copy_res_decl_for_inlining): Likewise. 2708 (walk_tree): Move language-specific constructs into... 2709 (cp_walk_subtrees): this new function. 2710 (copy_tree_r): Use language-independent constructs and hooks. 2711 (init_tree): Initialize tree inlining hooks. 2712 (remap_save_expr): Adjust prototype so that the declaration 2713 does not require the definition of splay_tree. 2714 27152001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca> 2716 2717 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used 2718 to build the declaration instead of the declaration itself. 2719 27202001-10-02 Jason Merrill <jason_merrill@redhat.com> 2721 2722 * decl2.c (cxx_decode_option): Add 'else'. 2723 2724 * spew.c (end_input): No longer static. 2725 * cp-tree.h: Declare it. 2726 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion. 2727 27282001-10-02 Joseph S. Myers <jsm28@cam.ac.uk> 2729 2730 * call.c (build_over_call), typeck.c (build_function_call_real): 2731 Pass type attributes to check_function_format rather than name or 2732 assembler name. Don't require there to be a name or assembler 2733 name to check formats. 2734 27352001-10-02 Joseph S. Myers <jsm28@cam.ac.uk> 2736 2737 * decl.c (init_decl_processing): Don't call 2738 init_function_format_info. Initialize lang_attribute_table 2739 earlier. 2740 (builtin_function): Call decl_attributes. 2741 (insert_default_attributes): New. 2742 27432001-10-01 Jason Merrill <jason_merrill@redhat.com> 2744 2745 * decl.c (grokdeclarator): Copy array typedef handling from C 2746 frontend. 2747 2748 * decl.c (grokdeclarator): Copy too-large array handling from C 2749 frontend. 2750 27512001-09-29 Alexandre Oliva <aoliva@redhat.com> 2752 2753 * config-lang.in (target_libs): Added target-gperf, so that we 2754 don't try to build it if C++ is disabled. 2755 27562001-09-23 Zack Weinberg <zack@codesourcery.com> 2757 2758 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o. 2759 (cp/errfn.o): Delete rule. 2760 (cp/error.o): Depend on flags.h. 2761 * errfn.c: Delete file. 2762 * cp-tree.h: Declare warn_deprecated. Remove definitions of 2763 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, 2764 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning, 2765 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and 2766 internal_error respectively. Make cp_deprecated into a macro. 2767 Don't define cp_printer typedef or declare cp_printers. 2768 * error.c: Include flags.h. 2769 Delete: struct tree_formatting_info, print_function_argument_list, 2770 print_declaration, print_expression, print_function_declaration, 2771 print_function_parameter, print_type_id, print_cv_qualifier_seq, 2772 print_type_specifier_seq, print_simple_type_specifier, 2773 print_elaborated_type_specifier, print_rest_of_abstract_declarator, 2774 print_parameter_declaration_clause, print_exception_specification, 2775 print_nested_name_specifier, and definition of cp_printers. 2776 (locate_error): New function. 2777 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and 2778 rewritten in terms of locate_error and diagnostic.c. 2779 (cp_tree_printer): Rename cp_printer; wire up to *_to_string 2780 instead of deleted print_* routines. Handle %C, %L, %O, %Q also. 2781 (init_error): Adjust to match. 2782 2783Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 2784 2785 * Make-lang.in (CXX_C_OBJS): Add attribs.o. 2786 27872001-09-21 Richard Henderson <rth@redhat.com> 2788 2789 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS. 2790 (build_vtbl_initializer): Likewise. 2791 (build_vfn_ref): New. 2792 * cp-tree.h: Declare it. 2793 * call.c (build_over_call): Use it. 2794 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR. 2795 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors. 2796 2797Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com> 2798 2799 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration. 2800 28012001-09-21 Joseph S. Myers <jsm28@cam.ac.uk> 2802 2803 Table-driven attributes. 2804 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES. 2805 * decl2.c (cplus_decl_attributes): Only take one attributes 2806 parameter. 2807 * cp-tree.c (cplus_decl_attributes): Update prototype. 2808 * class.c (finish_struct), decl.c (start_decl, start_function), 2809 decl2.c (grokfield), friend.c (do_friend), parse.y 2810 (parse_bitfield): Update calls to cplus_decl_attributes. 2811 * decl.c (grokdeclarator): Take a pointer to a single ordinary 2812 attribute list. 2813 * decl.h (grokdeclarator): Update prototype. 2814 * decl2.c (grokfield): Take a single ordinary attribute list. 2815 * friend.c (do_friend): Likewise. 2816 * decl.c (shadow_tag, groktypename, start_decl, 2817 start_handler_parms, grokdeclarator, grokparms, start_function, 2818 start_method), decl2.c (grokfield, grokbitfield, grokoptypename), 2819 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c 2820 (process_template_parm, do_decl_instantiation): Pass single 2821 ordinary attribute lists around. 2822 * decl.c (grokdeclarator): Correct handling of nested attributes. 2823 Revert the patch 2824 1998-10-18 Jason Merrill <jason@yorick.cygnus.com> 2825 * decl.c (grokdeclarator): Embedded attrs bind to the right, 2826 not the left. 2827 . 2828 * cp-tree.h (cp_valid_lang_attribute): Remove declaration 2829 (cp_attribute_table): Declare. 2830 * decl.c (valid_lang_attribute): Don't define. 2831 (lang_attribute_table): Define. 2832 (init_decl_processing): Initialize lang_attribute_table instead of 2833 valid_lang_attribute. 2834 * tree.c (cp_valid_lang_attribute): Remove. 2835 (handle_java_interface_attribute, handle_com_interface_attribute, 2836 handle_init_priority_attribute): New functions. 2837 (cp_attribute_table): New array. 2838 * decl2.c (import_export_class): Don't use 2839 targetm.valid_type_attribute. 2840 28412001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 2842 2843 * Make-lang.in (cp/error.o): Depend on real.h 2844 * error.c: #include "real.h" 2845 28462001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2847 2848 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of 2849 xmalloc/strcpy/strcat. 2850 28512001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2852 2853 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl): 2854 Const-ification. 2855 * pt.c (tsubst_decl): Likewise. 2856 28572001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2858 2859 * decl2.c (lang_f_options): Const-ification. 2860 * lex.c (cplus_tree_code_name): Likewise. 2861 * spew.c (yyerror): Likewise. 2862 28632001-09-06 Nathan Sidwell <nathan@codesourcery.com> 2864 2865 PR c++/3986 2866 * class.c (force_canonical_binfo_r): Check & move an indirect 2867 primary base first. 2868 (force_canonical_binfo): Check that it's not already 2869 canonical. 2870 (mark_primary_virtual_base): Remove BINFO parameter. 2871 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here. 2872 28732001-09-06 Nathan Sidwell <nathan@codesourcery.com> 2874 2875 Remove TYPE_NONCOPIED_PARTS. 2876 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto 2877 CLASSTYPE_PURE_VIRTUALS. 2878 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO. 2879 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS. 2880 (layout_class_type): Don't call fixup_inline_methods here ... 2881 (finish_struct_1): ... call it here. 2882 28832001-09-04 Mark Mitchell <mark@codesourcery.com> 2884 2885 * decl.c (duplicate_decls): Remove code deadling with 2886 DECL_SAVED_INSNS. 2887 * decl2.c (finish_file): Likewise. 2888 * pt.c (instantiate_decl): Likewise. 2889 * semantics.c (expand_body): Don't defer local functions if 2890 they wouldn't be deferred for some other reason. Don't 2891 generate RTL for functions that will not be emitted. 2892 (genrtl_start_function): Remove code deadling with 2893 DECL_SAVED_INSNS. 2894 (genrtl_finish_function): Likewise. 2895 28962001-09-04 Nathan Sidwell <nathan@codesourcery.com> 2897 2898 PR c++/4203 2899 * call.c (build_over_call): Do not optimize any empty base 2900 construction. 2901 29022001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2903 2904 * error.c (dump_template_decl): Output template parameters 2905 together with their specifiers. 2906 Output `class' prefix for template template parameter. 2907 (dump_decl): Fix formatting. 2908 29092001-08-30 Kurt Garloff <garloff@suse.de> 2910 2911 * optimize.c (inlinable_function_p): Allow only smaller single 2912 functions. Halve inline limit after reaching recursive limit. 2913 29142001-08-30 Joern Rennecke <amylaar@redhat.com> 2915 Jason Merrill <jason_merrill@redhat.com> 2916 2917 * class.c (build_vtable_entry_ref): Subtract in char*, not 2918 ptrdiff_t. 2919 29202001-08-23 Jason Merrill <jason_merrill@redhat.com> 2921 2922 * tree.c (cp_build_qualified_type_real): Use get_qualified_type. 2923 (build_cplus_array_type): Use cp_build_qualified_type, not 2924 TYPE_MAIN_VARIANT, to get an unqualified version. 2925 2926 * decl2.c (grok_alignof): Lose. 2927 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr. 2928 * typeck.c (c_alignof): Lose. 2929 * semantics.c (finish_sizeof, finish_alignof): New. 2930 * parse.y: Use them. 2931 * cp-tree.h: Declare them. 2932 29332001-08-22 Jason Merrill <jason_merrill@redhat.com> 2934 2935 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement. 2936 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK. 2937 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement. 2938 29392001-08-19 Jakub Jelinek <jakub@redhat.com> 2940 2941 * typeck2.c (add_exception_specifier): Only require complete type if 2942 not in processing template declaration. 2943 29442001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2945 2946 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to 2947 GNU_xref_start_scope and GNU_xref_end_scope. 2948 2949 * tree.c (TYPE_HASH): Moved to ../tree.h. 2950 29512001-08-16 Mark Mitchell <mark@codesourcery.com> 2952 2953 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS 2954 on COMPOUND_EXPRs. 2955 29562001-08-14 Richard Henderson <rth@redhat.com> 2957 2958 * class.c, cp-tree.h (build_vfn_ref): Remove. 2959 * call.c, rtti.c: Replace all refernces with build_vtbl_ref. 2960 29612001-08-13 Mark Mitchell <mark@codesourcery.com> 2962 2963 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for 2964 empty class assignment as having side-effects to avoid 2965 spurious warnings. 2966 29672001-08-13 Zack Weinberg <zackw@panix.com> 2968 2969 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies. 2970 * except.c: Include libfuncs.h. 2971 29722001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 2973 2974 * decl.c (grokdeclarator): Clarify diagnostic message. 2975 29762001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2977 2978 * decl2.c (do_nonmember_using_decl): Replace using directive 2979 with using declaration in the error message. 2980 29812001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2982 2983 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the 2984 criterion to avoid rebuilding expression tree instead of 2985 processing_template_decl. 2986 29872001-08-07 Jason Merrill <jason_merrill@redhat.com> 2988 2989 Support named return value optimization for inlines, too. 2990 * decl.c (finish_function): Nullify returns here. 2991 * semantics.c (genrtl_start_function): Not here. 2992 (cp_expand_stmt): Don't mess with CLEANUP_STMTs. 2993 (nullify_returns_r): No longer static. Just clear RETURN_EXPR. 2994 Also nullify the CLEANUP_STMT for the nrv. 2995 * cp-tree.h: Declare it. 2996 * optimize.c (declare_return_variable): Replace the nrv with the 2997 return variable. 2998 * typeck.c (check_return_expr): Be more flexible on alignment check. 2999 Ignore cv-quals when checking for a matching type. 3000 30012001-08-09 Richard Henderson <rth@redhat.com> 3002 3003 * decl2.c (finish_objects): Use target hooks instead of 3004 assemble_constructor and assemble_destructor. 3005 30062001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca> 3007 3008 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'. 3009 30102001-08-07 Nathan Sidwell <nathan@codesourcery.com> 3011 3012 PR c++/3820 3013 Stop using TYPE_NONCOPIED_PARTS. 3014 * call.c (build_over_call): Be careful when copy constructing 3015 or assigning to an empty class. 3016 * class.c (check_bases_and_members): It has a 3017 COMPLEX_ASSIGN_REF if it has a vptr. 3018 (layout_class_type): Don't add empty class padding to 3019 TYPE_NONCOPIED_PARTS. 3020 (finish_struct_1): Don't add the VFIELD either. 3021 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_ 3022 initialization. 3023 30242001-08-07 Jason Merrill <jason_merrill@redhat.com> 3025 3026 * tree.c (walk_tree): Walk siblings even if !walk_subtrees. 3027 30282001-08-06 Richard Henderson <rth@redhat.com> 3029 3030 * decl2.c (finish_objects): Pass a symbol_ref and priority to 3031 assemble_{constructor,destructor}. Remove priority handling. 3032 30332001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 3034 3035 Don't allow template-id in using-declaration. 3036 * decl2.c (validate_nonmember_using_decl): Handle template-ids. 3037 (do_class_using_decl): Likewise. 3038 30392001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk> 3040 3041 * cp/spew.c (read_token): No need to pop buffers. 3042 30432001-08-02 Stan Shebs <shebs@apple.com> 3044 3045 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used. 3046 (fnaddr_from_vtable_entry): Remove decl. 3047 * method.c (use_thunk): Update comment. 3048 30492001-08-01 Andrew Cagney <ac131313@redhat.com> 3050 3051 * repo.c (get_base_filename): Change return value to const char 3052 pointer. 3053 30542001-08-02 Nathan Sidwell <nathan@codesourcery.com> 3055 3056 Kill -fhonor-std. 3057 * NEWS: Document. 3058 * cp-tree.h (flag_honor_std): Remove. 3059 (CPTI_FAKE_STD): Remove. 3060 (std_node): Remove comment about it being NULL. 3061 (fake_std_node): Remove. 3062 * decl.c (in_fake_std): Remove. 3063 (walk_namespaces_r): Remove fake_std_node check. 3064 (push_namespace): Remove in_fake_std code. 3065 (pop_namespace): Likewise. 3066 (lookup_name_real): Remove fake_std_node check. 3067 (init_decl_processing): Always create std_node. Always add 3068 std:: things there. 3069 (builtin_function): Always put non '_' fns in std. 3070 * decl2.c (flag_honor_std): Remove. 3071 (lang_f_options): Remove honor-std. 3072 (unsupported_options): Add honor-std. 3073 (set_decl_namespace): Remove fake_std_node check. 3074 (validate_nonmember_using_decl): Likewise. 3075 (do_using_directive): Likewise. 3076 (handle_class_head): Likewise. 3077 * dump.c (cp_dump_tree): Likewise. 3078 * except.c (init_exception_processing): Adjust. 3079 * init.c (build_member_call): Remove fake_std_node check. 3080 (build_offset_ref): Likewise. 3081 * lang-options.h: Remove -fhonor-std, -fno-honor-std. 3082 * rtti.c (init_rtti_processing): Adjust. 3083 30842001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com> 3085 3086 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second 3087 operand while calling cp_tree_equal. 3088 30892001-07-31 Nathan Sidwell <nathan@codesourcery.com> 3090 3091 The 3.0 ABI no longer has vbase pointer fields. 3092 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P, 3093 FORMAT_VBASE_NAME): Remove. 3094 * method.c (do_build_copy_constructor): Adjust. 3095 (do_build_assign_ref): Adjust. 3096 * search.c (lookup_field_r): Adjust. 3097 * typeck.c (build_component_ref): Adjust. 3098 3099 The 3.0 ABI always has a vtable pointer at the start of every 3100 polymorphic class. 3101 * rtti.c (build_headof_sub): Remove. 3102 (build_headof): Adjust. 3103 (get_tinfo_decl_dynamic): No need to check flag_rtti 3104 here. Adjust. 3105 (create_real_tinfo_var): Explain why we need a hidden name. 3106 31072001-07-31 Nathan Sidwell <nathan@codesourcery.com> 3108 3109 PR c++/3631 3110 * class.c (update_vtable_entry_for_fn): The fixed adjustment 3111 of a virtual thunk should be from declaring base. 3112 31132001-07-31 Nathan Sidwell <nathan@codesourcery.com> 3114 3115 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into 3116 the shared virtual base, so preserving inheritance graph order. 3117 31182001-07-30 Andreas Jaeger <aj@suse.de> 3119 3120 * decl2.c: Remove unused var global_temp_name_counter. 3121 31222001-07-28 Richard Henderson <rth@redhat.com> 3123 3124 * method.c (pending_inlines): Remove. 3125 31262001-07-27 Nathan Sidwell <nathan@codesourcery.com> 3127 3128 * class.c (mark_primary_virtual_base): Don't adjust base 3129 offsets here. 3130 (dfs_unshared_virtual_bases): Adjust them here. 3131 (mark_primary_bases): Explain why we adjust at the end. 3132 31332001-07-27 Nathan Sidwell <nathan@codesourcery.com> 3134 3135 * class.c (finish_struct_1): When copying the primary base's 3136 VFIELD, make sure we find it is at offset zero. 3137 31382001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3139 3140 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and 3141 tsubst_expr for default template arguments. 3142 31432001-07-26 Nathan Sidwell <nathan@codesourcery.com> 3144 3145 PR c++/3621 3146 * spew.c (yylex): Only copy the token's lineno, if it is 3147 non-zero. 3148 31492001-07-26 Nathan Sidwell <nathan@codesourcery.com> 3150 3151 PR c++/3624 3152 * call.c (resolve_args): Simplify, call 3153 convert_from_reference. 3154 (build_new_op): Resolve and convert from reference ARG1 3155 earlier. Adjust ARG2 & ARG3 resolve and conversion. 3156 31572001-07-26 Nathan Sidwell <nathan@codesourcery.com> 3158 3159 * decl.c (last_function_parm_tags): Remove. 3160 (current_function_parm_tags): Remove. 3161 (init_decl_processing): Adjust. 3162 (start_function): Adjust. 3163 (store_parm_decls): Adjust. 3164 3165 PR c++/3152 3166 * decl.c (grokdeclarator): Detect when a function typedef is 3167 declaring a function, and create last_function_parms correctly. 3168 31692001-07-25 Jason Merrill <jason_merrill@redhat.com> 3170 3171 * call.c (joust): Only prefer a non-builtin candidate to a builtin 3172 one if they have the same signature. 3173 3174 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on 3175 it rather than toplevel_bindings_p. Give it a mangled name if static. 3176 (convert_to_reference): Adjust. 3177 * decl2.c (get_temp_name): Lose. 3178 * mangle.c (mangle_ref_init_variable): New fn. 3179 (mangle_guard_variable): Strip the ref-init header. 3180 * cp-tree.h: Adjust. 3181 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the 3182 initializer. 3183 (grok_reference_init): Always use DECL_INITIAL. 3184 31852001-07-25 Nathan Sidwell <nathan@codesourcery.com> 3186 3187 PR c++/3416 3188 * call.c (build_conditional_expr): Recheck args after 3189 conversions. 3190 * cp-tree.h (build_conditional_expr): Move to correct file. 3191 * typeck.c (decay_conversion): Diagnose any unknown types 3192 reaching here. 3193 (build_binary_op): Don't do initial decay or default 3194 conversions on overloaded functions. 3195 (build_static_cast): Don't do a decay conversion here. 3196 31972001-07-25 Nathan Sidwell <nathan@codesourcery.com> 3198 3199 PR c++/3543 3200 * typeck.c (condition_conversion): Resolve an OFFSET_REF. 3201 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here. 3202 32032001-07-25 Nathan Sidwell <nathan@codesourcery.com> 3204 3205 * class.c (build_vtbl_or_vbase_field): Remove, move into ... 3206 (create_vtbl_ptr): ... here. 3207 32082001-07-25 Nathan Sidwell <nathan@codesourcery.com> 3209 3210 * class.c (build_vbase_offset_vbtl_entries): Look for 3211 non-primary base of which we are a sub vtable. 3212 32132001-07-24 Phil Edwards <pme@sources.redhat.com> 3214 3215 * semantics.c (finish_this_expr): Remove unused code. 3216 32172001-07-24 Nathan Sidwell <nathan@codesourcery.com> 3218 3219 Simplify rtti, now we've only one ABI. 3220 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID, 3221 CPTI_TINFO_VAR_ID. 3222 (tinfo_decl_id, tinfo_var_id): Remove. 3223 (get_typeid_1): Remove. 3224 * rtti.c 3225 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id. 3226 (typeid_ok_p): New function. 3227 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl. 3228 (get_tinfo_decl): Remove old abi documentation. 3229 (tinfo_from_decl): Remove. 3230 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1. 3231 (get_typeid_1): Remove. 3232 (get_base_offset): Remove. 3233 (synthesize_tinfo_var): Absorb get_base_offset. 3234 (create_real_tinfo_var): Don't use tinfo_decl_id. 3235 32362001-07-23 Graham Stott <grahams@redhat.com> 3237 3238 * cp/class.c (type_requires_array_cookie): Fix use of uninitialised 3239 variable has_two_argument_delete_p. 3240 32412001-07-21 Nathan Sidwell <nathan@codesourcery.com> 3242 3243 Remove flag_vtable_thunk. It is always on for the 3.0 ABI. 3244 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove. 3245 (CPTI_INDEX_IDENTIFIER): Remove. 3246 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove. 3247 (delta2_identifier): Remove. 3248 (index_identifier): Remove. 3249 (pfn_or_delta2_identifier): Remove. 3250 (flag_vtable_thunks): Remove. 3251 (VTABLE_DELTA2_NAME): Remove. 3252 (VTABLE_INDEX_NAME): Remove. 3253 (FNADDR_FROM_VTABLE_ENTRY): Adjust. 3254 (vfunc_ptr_type_node): Adjust. 3255 (VTABLE_NAME_PREFIX): Adjust. 3256 (build_vfn_ref): Lose first parameter. 3257 (fixup_all_virtual_upcast_offsets): Remove. 3258 * decl.c (initialize_predefined_identifiers): Remove 3259 delta2_identifier, index_identifier, pfn_or_delta2_identifier. 3260 (init_decl_processing): Remove no-vtable-thunk code. 3261 * decl2.c (flag_vtable_thunks): Remove. 3262 (mark_vtable_entries): Remove no-vtable-thunk code. 3263 * error.c (dump_decl): Remove no-vtable-thunk code. 3264 (dump_expr): Adjust ptr to member function code. 3265 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk 3266 code. 3267 * rtti.c (build_headof): Remove no-vtable-thunk code. 3268 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call. 3269 * search.c (get_base_distance): Remove expand_upcast_fixups case. 3270 (virtual_context) Remove. 3271 (expand_upcast_fixups): Remove. 3272 (fixup_virtual_upcast_offsets): Remove. 3273 (fixup_all_virtual_upcast_offsets): Remove. 3274 * typeck.c (get_member_function_from_ptrfunc): Remove 3275 no-vtable-thunk code. 3276 * call.c (build_over_call): Adjust call to build_vfn_ref. 3277 * class.c (build_vfn_ref): Lose first parameter. Remove 3278 no-vtable-thunk code. 3279 (build_rtti_vtbl_entries): Remove no-vtable-thunk code. 3280 (build_vtable_entry): Remove no-vtable-thunk code. 3281 32822001-07-20 Nathan Sidwell <nathan@codesourcery.com> 3283 3284 Remove old-abi remnants. Remove comments about old abi 3285 behaviour. Remove references to 'new-abi' in comments. 3286 * cp-tree.h: Adjust comments. 3287 (vbase_offsets_in_vtable_p): Delete. 3288 (vcall_offsets_in_vtable_p): Delete. 3289 (vptrs_present_everywhere_p): Delete. 3290 (all_overridden_vfuns_in_vtables_p): Delete. 3291 (merge_primary_and_secondary_vtables_p): Delete. 3292 (TYPE_CONTAINS_VPTR_P): Adjust. 3293 (VTT_NAME_PREFIX): Remove. 3294 (CTOR_VTBL_NAME_PREFIX): Remove. 3295 (init_vbase_pointers): Remove. 3296 * class.c: Adjust coments. 3297 (build_vbase_pointer_fields): Delete. 3298 (build_vbase_pointer): Remove old-abi code. 3299 (build_secondary_vtable): Likewise. 3300 (modify_all_vtables): Likewise. 3301 (create_vtable_ptr): Likewise. 3302 (layout_class_type): Likewise. 3303 (finish_struct_1): Likewise. 3304 (finish_vtbls): Likewise. 3305 (dfs_finish_vtbls): Delete. 3306 (build_vbase_offset_vtbl_entries): Remove old-abi code. 3307 * cvt.c: Adjust comments. 3308 * decl.c: Adjust comments. 3309 * decl2.c: Adjust comments. 3310 * init.c: Adjust comments. 3311 (construct_virtual_bases): Remove old-abi code. 3312 * lang-specs.h: Remove -fno-new-abi. 3313 * mangle.c: Adjust comments. 3314 * rtti.c: Adjust comments. 3315 (get_base_offset): Remove old-abi-code. 3316 * search.c: Adjust comments. 3317 (dfs_init_vbase_pointers): Remove. 3318 (dfs_vtable_path_unmark): Remove. 3319 (init_vbase_pointers): Remove. 3320 * semantics.c: Adjust comments. 3321 (emit_associated_thunks): Remove old-abi code. 3322 * typeck.c: Adjust comments. 3323 33242001-07-20 Daniel Berlin <dan@cgsoftware.com> 3325 3326 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not 3327 params.h. 3328 33292001-07-19 Mark Mitchell <mark@codesourcery.com> 3330 3331 * class.c (finish_struct_anon): Forbid nested classes. 3332 33332001-07-19 Neil Booth <neil@daikokuya.demon.co.uk> 3334 3335 * decl2.c: Don't include dwarfout.h and dwarf2out.h. 3336 * optimize.c: Include debug.h. 3337 (maybe_clone_body): Use debug hook. 3338 * semantics.c: Include debug.h. 3339 (expand_body): Use debug hook. 3340 33412001-07-19 Neil Booth <neil@daikokuya.demon.co.uk> 3342 3343 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases. 3344 33452001-07-18 Mark Mitchell <mark@codesourcery.com> 3346 3347 * class.c (type_requires_array_cookie): New function. 3348 (check_methods): Don't try to figure out whether the type needs a 3349 cookie here. 3350 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here. 3351 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove. 3352 (TYPE_VEC_NEW_USES_COOKIE): Reimplement. 3353 * pt.c (instantiate_class_template): Don't set 3354 TYPE_VEC_DELETE_TAKES_SIZE. 3355 * NEWS: Document ABI changes from GCC 3.0. 3356 33572001-07-18 Xavier Delacour <xavier@fmaudio.net>, 3358 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> 3359 3360 * NEWS (Changes in GCC 3.0): Fix typo. 3361 33622001-07-13 Joseph S. Myers <jsm28@cam.ac.uk> 3363 3364 * decl2.c (cplus_decl_attributes): Take a pointer to the node to 3365 which attributes are to be attached, and a flags argument. Update 3366 call to decl_attributes. 3367 (grokfield): Update call to decl_attributes. 3368 * class.c (finish_struct): Update call to cplus_decl_attributes. 3369 * cp-tree.h (cplus_decl_attributes): Update prototype. 3370 * decl.c (start_decl, grokdeclarator, start_function): Update 3371 calls to decl_attributes and cplus_decl_attributes. 3372 * friend.c (do_friend): Update call to cplus_decl_attributes. 3373 * parse.y (parse_bitfield): Update call to cplus_decl_attributes. 3374 33752001-07-12 Mark Mitchell <mark@codesourcery.com> 3376 3377 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER 3378 for `register' variables with an asm-specification. 3379 33802001-07-11 Mark Mitchell <mark@codesourcery.com> 3381 3382 * semantics.c (finish_asm_stmt): Mark the output operands 3383 to an asm addressable, if necessary. 3384 33852001-07-11 Ben Elliston <bje@redhat.com> 3386 3387 * Revert this change -- there is a subtle bug. 3388 3389 PR c++/80 3390 * decl.c (finish_enum): New "attributes" argument; pass it to 3391 cplus_decl_attributes. Use a narrower type if the enum is packed. 3392 * cp-tree.h (finish_enum): Adjust prototype. 3393 * parse.y (enum_head): New non-terminal. 3394 (structsp): Use it. Enums now may be preceded or followed by 3395 optional attributes -- pass their chained tree to finish_enum(). 3396 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument. 3397 33982001-07-10 Mark Mitchell <mark@codesourcery.com> 3399 3400 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope 3401 variables. 3402 34032001-07-10 Jason Merrill <jason_merrill@redhat.com> 3404 3405 * semantics.c (cp_expand_stmt): Fix for null 3406 current_function_return_value. 3407 34082001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl> 3409 3410 * call.c (build_op_delete_call): Initialize fn. 3411 (convert_like_real): Delete conditional. 3412 (joust): Initialize *w and *l. 3413 * class.c: Add prototype for binfo_ctor_vtable. 3414 (get_primary_binfo): Initialize result. 3415 * init.c (build_java_class_ref): Initialize name. 3416 34172001-07-09 Erik Rozendaal <dlr@acm.org> 3418 3419 * typeck.c (unary_complex_lvalue): Do not duplicate the 3420 argument to modify, pre-, or post-increment when used as an 3421 lvalue and when the argument has side-effects. 3422 34232001-07-08 Joseph S. Myers <jsm28@cam.ac.uk> 3424 3425 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES. 3426 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call 3427 cplus_decl_attributes even if attrs is NULL. 3428 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES. 3429 34302001-07-08 Joseph S. Myers <jsm28@cam.ac.uk> 3431 3432 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update 3433 calls to decl_attributes. 3434 34352001-07-06 Ira Ruben <ira@apple.com> 3436 3437 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should 3438 be DECL_TEMPLATE_RESULT. 3439 34402001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3441 3442 * cp-tree.h (copy_template_template_parm): Rename to ... 3443 (bind_template_template_parm): ... here. 3444 * tree.c (copy_template_template_parm): Rename to ... 3445 (bind_template_template_parm): ... here. Remove the case when 3446 NEWARGS is NULL_TREE. 3447 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and 3448 BOUND_TEMPLATE_TEMPLATE_PARM. 3449 * pt.c (lookup_template_class): Adjust. 3450 34512001-07-05 Jason Merrill <jason_merrill@redhat.com> 3452 3453 * cvt.c (convert_lvalue): New fn. 3454 * cp-tree.h: Declare it. 3455 * method.c (do_build_assign_ref): Use it. 3456 (do_build_copy_constructor): Convert parm to base types 3457 before calling base constructors. 3458 3459 * typeck.c (check_return_expr): Check DECL_ALIGN instead of 3460 DECL_USER_ALIGN. Check flag_elide_constructors instead of 3461 optimize. 3462 * semantics.c (cp_expand_stmt): Don't destroy the named return value. 3463 34642001-07-02 Nathan Sidwell <nathan@codesourcery.com> 3465 3466 * optimize.c (optimize_inline_calls): New function, broken out 3467 of ... 3468 (optimize_function): ... here. Call it. Don't inline if it is 3469 a thunk. 3470 (dump_function): Print name of dump flag causing this dump. 3471 * semantics.c (expand_body): Move thunk inline check to 3472 optimize_function. 3473 34742001-06-29 Joseph S. Myers <jsm28@cam.ac.uk> 3475 3476 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define. 3477 (comptypes): Use target.comp_type_attributes. 3478 34792001-06-29 Nathan Sidwell <nathan@codesourcery.com> 3480 3481 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration. 3482 34832001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 3484 3485 * error.c (lang_print_error_function): Add a `diagnostic_context *' 3486 parameter. Tweak. 3487 34882001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk> 3489 3490 * decl2.c (import_export_class): Update. 3491 34922001-06-26 Gabriel Dos Reis <gdr@codesourcery.com> 3493 3494 * error.c (init_error): Adjust settings. 3495 34962001-06-26 Gabriel Dos Reis <gdr@codesourcery.com> 3497 3498 * error.c (init_error): Adjust settings. 3499 35002001-06-19 Richard Sandiford <rsandifo@redhat.com> 3501 3502 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to 3503 return pointers to data members by reference rather than by value. 3504 35052001-06-18 Jason Merrill <jason_merrill@redhat.com> 3506 3507 Implement the Named Return Value optimization. 3508 * cp-tree.h (struct cp_language_function): Add x_return_value. 3509 (current_function_return_value): Now a macro. 3510 * decl.c: Don't define it. 3511 (define_label, finish_case_label): Don't clear it. 3512 (init_decl_processing): Don't register it with GC. 3513 * semantics.c (genrtl_finish_function): Don't check it for 3514 no_return_label. Copy the RTL from the return value to 3515 current_function_return_value and walk, calling... 3516 (nullify_returns_r): ...this new fn. 3517 * typeck.c (check_return_expr): Set current_function_return_value. 3518 35192001-06-15 Jason Merrill <jason_merrill@redhat.com> 3520 3521 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're 3522 sharing a ctor vtable with. Merge code for cases 1 and 2. 3523 (binfo_ctor_vtable): New fn. 3524 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it. 3525 35262001-06-14 Jason Merrill <jason_merrill@redhat.com> 3527 3528 * class.c (dfs_find_final_overrider): Fix logic. 3529 3530 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use 3531 virtual thunk instead of non-virtual. 3532 (get_matching_virtual): Uncomment. 3533 3534 * pt.c (unify): Don't recurse between the POINTER_TYPE and the 3535 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on 3536 PARM, not ARG. 3537 35382001-06-14 Nathan Sidwell <nathan@codesourcery.com> 3539 3540 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure 3541 we've not emerged from the hierarchy of RTTI_BINFO on reaching 3542 a non-virtual base. 3543 35442001-06-13 Mark Mitchell <mark@codesourcery.com> 3545 3546 * NEWS: Update release number. 3547 35482001-06-12 Nathan Sidwell <nathan@codesourcery.com> 3549 3550 PR c++/3130, c++/3131, c++/3132 3551 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define. 3552 * class.c (force_canonical_binfo_r): Move 3553 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move 3554 virtual bases unless they're primary and what they're primary 3555 too has been moved. 3556 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope 3557 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and 3558 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most 3559 derived binfo. 3560 (mark_primary_bases): Use BINFO_UNSHARED_MARKED. 3561 (layout_nonempty_base_or_field): Add most derived type 3562 parameter. Adjust. 3563 (layout_empty_base): Likewise. 3564 (build_base_field): Likewise. 3565 (build_base_fields): Likewise. 3566 (propagate_binfo_offsets): Add most derived type 3567 parameter. Skip non canonical virtual bases too. 3568 (dfs_set_offset_for_unshared_vbases): Don't skip primary 3569 bases. Do skip canonical bases. 3570 (layout_virtual_bases): Adjust. 3571 (layout_class_type): Adjust. 3572 (dfs_get_primary_binfo): Build list of virtual primary base 3573 candidates. 3574 (get_primary_binfo): Check that the shared virtual primary 3575 base candidate was found first. 3576 (accumulate_vtbl_inits): Don't do anything for non-vptr 3577 containing binfos. For case 1 primary virtual bases, keep 3578 checking that we've not emerged from the hierarchy of RTTI_BINFO. 3579 35802001-06-12 Nathan Sidwell <nathan@codesourcery.com> 3581 3582 PR c++/3089 3583 * class.c (dfs_accumulate_vtbl_inits): Always walk down the 3584 hierarchy looking for primary bases for a ctor 3585 vtable. Recursively call oneself, if we meet our primary via 3586 this route and haven't met it yet via inheritance graph order. 3587 35882001-06-11 Mark Mitchell <mark@codesourcery.com> 3589 3590 * lang-options.h: Emit documentation for -fno-honor-std, not 3591 -fhonor-std. 3592 35932001-06-10 Alexandre Oliva <aoliva@redhat.com> 3594 3595 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]: 3596 Don't clobber delta. 3597 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn. 3598 35992001-06-10 Mark Mitchell <mark@codesourcery.com> 3600 Gabriel Dos Reis <gdr@codesourcery.com> 3601 3602 * Make-lang.in (cp/call.o): Depend on diagnostic.h 3603 (cp/typeck.o): Depend on diagnostic.h 3604 (cp/typeck2.o): Depend on diagnostic.h 3605 (cp/repo.o): Depend on dignostic.h 3606 * typeck.c: #include diagnostic.h 3607 (convert_for_initialization): Remove extern declaration for 3608 warningcount and errorcount. 3609 3610 * call.c: #include diagnostic.h 3611 (convert_like_real): Remove extern declaration for warnincount and 3612 errorcount. 3613 3614 * repo.c: #include diagnostic.h 3615 * typeck2.c: #include diagnostic.h 3616 36172001-06-08 Nathan Sidwell <nathan@codesourcery.com> 3618 3619 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko 3620 in previous change. 3621 36222001-06-08 Nathan Sidwell <nathan@codesourcery.com> 3623 3624 PR c++/2929 3625 * friend.c (do_friend): Use push_decl_namespace for classes at 3626 namespace scope. 3627 36282001-06-08 Nathan Sidwell <nathan@codesourcery.com> 3629 Jason Merrill <jason_merrill@redhat.com> 3630 3631 PR c++/3061 3632 * class.c (build_secondary_vtable): Use assert, rather than an error 3633 message. 3634 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL. 3635 (dfs_accumulate_vtbl_inits): A lost primary virtual base may 3636 be between ORIG_BINFO and RTTI_BINFO, but neither of them. 3637 Don't set BINFO_VTABLE for a primary virtual base. 3638 36392001-06-07 Mark Mitchell <mark@codesourcery.com> 3640 3641 * decl.c (duplicate_decls): Update source position information 3642 when a template function is defined. 3643 36442001-06-07 Phil Edwards <pme@sources.redhat.com> 3645 3646 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h. 3647 36482001-06-07 Nathan Sidwell <nathan@codesourcery.com> 3649 3650 PR c++/2914 3651 * decl.c (pushtag): Don't push into a complete type's scope. 3652 36532001-06-06 Jason Merrill <jason_merrill@redhat.com> 3654 3655 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose. 3656 (struct lang_decl_flags): Lose generate_with_vtable_p. 3657 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose. 3658 * class.c (copy_virtuals): Adjust. 3659 * decl2.c (mark_vtable_entries): Adjust. 3660 * method.c (make_thunk, build_vtable_entry): Adjust. 3661 * class.c (update_vtable_entry_for_fn): Only look as far as the 3662 first defining class. 3663 (build_vtbl_initializer): Put nothing in the slot for a function only 3664 defined in a lost primary virtual base. 3665 (add_vcall_offset_vtbl_entries_1): Use the same code for 3666 the lost primary case and the normal case. 3667 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base. 3668 (get_vfield_offset, get_derived_offset): Lose. 3669 (dfs_find_final_overrider): Use look_for_overrides_here. 3670 (get_matching_virtual): New fn. 3671 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P, 3672 not BV_VCALL_INDEX. 3673 * search.c (look_for_overrides_here): Split out from... 3674 (look_for_overrides_r): Here. 3675 3676 * class.c (find_final_overrider): Return error_mark_node on error. 3677 3678 * decl2.c (key_method): #if 0 accidental change. 3679 36802001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca> 3681 3682 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P. 3683 (build_over_call): Likewise. 3684 * decl.c (grokparms): Likewise. 3685 * pt.c (tsubst_decl): Likewise. 3686 * typeck.c (convert_arguments): Likewise. 3687 36882001-06-05 Mark Mitchell <mark@codesourcery.com> 3689 3690 * semantics.c (begin_class_definition): Robustify. 3691 3692 * pt.c (instantiate_decl): Tell the repository code about the 3693 clones, not the cloned functions. 3694 * repo.c (repo_template_used): Explicitly instantiate the cloned 3695 function, not the clones. 3696 36972001-06-05 Nathan Sidwell <nathan@codesourcery.com> 3698 3699 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and 3700 ICS_BAD_FLAG on created conversion. 3701 (compare_ics): Break out rank. 3702 37032001-06-05 Nathan Sidwell <nathan@codesourcery.com> 3704 3705 * decl.c (xref_tag): Remove extraneous %s on dependent name 3706 lookup warning. 3707 37082001-06-05 Nathan Sidwell <nathan@codesourcery.com> 3709 3710 * class.c (layout_vtable_decl): Fix off by one error on 3711 build_index_type. 3712 (build_vtt): Likewise. 3713 (build_ctor_vtbl_group): Likewise. 3714 37152001-06-05 Nathan Sidwell <nathan@codesourcery.com> 3716 3717 * class.c (maybe_indent_hierarchy): New function. 3718 (dump_class_hierarchy_r): Add flags. Dump extra binfo 3719 information, if enabled. Use maybe_indent_hierarchy. Adjust 3720 output format. 3721 (dump_class_hierarchy): Adjust prototype. Adjust output format. 3722 (dump_array, dump_vtable, dump_vtt): New functions. 3723 (finish_struct_1): Adjust hierarchy dumping. 3724 (initialize_vtable): Call dump_vtable. 3725 (build_vtt): Call dump_vtt. 3726 (build_ctor_vtbl_group): Call dump_vtable. 3727 * decl2.c (flag_dump_class_layout): Remove. 3728 (cxx_decode_option): Remove dump translation unit 3729 and dump class hierarchy check. Call dump_switch_p. 3730 (finish_file): Adjust dumping. 3731 (dump.c): Only dump base classes if not TDF_SLIM. 3732 Only dump namespace members if not TDF_SLIM. 3733 * optimize.c (dump_function): New function. 3734 (optimize_function): Call dump_function. 3735 * semantics.c (expand_body): Use dump_enabled_p. 3736 37372001-06-01 Nathan Sidwell <nathan@codesourcery.com> 3738 3739 PR g++/2936 3740 Part missed from first commit 3741 * decl2.c (finish_anon_union): Copy context. 3742 37432001-05-30 Nathan Sidwell <nathan@codesourcery.com> 3744 3745 PR g++/2936 3746 * optimize.c (remap_decl): Remap anonymous aggregate members too. 3747 37482001-05-26 Nathan Sidwell <nathan@codesourcery.com> 3749 3750 PR g++/2823 3751 * semantics.c (expand_body): Don't optimize thunks. 3752 37532001-05-25 Sam TH <sam@uchicago.edu> 3754 3755 * cp-tree.h lex.h: Fix header include guards. 3756 37572001-05-25 Mark Mitchell <mark@codesourcery.com> 3758 3759 * decl.c (init_decl_processing): Tweak. 3760 37612001-05-24 Mark Mitchell <mark@codesourcery.com> 3762 3763 * decl.c (duplicate_decls): Tidy. 3764 (init_decl_processing): Always set flag_no_builtin. 3765 37662001-05-24 Nathan Sidwell <nathan@codesourcery.com> 3767 3768 PR c++/2184 3769 * decl2.c (do_local_using_decl): Push the decls, even in a 3770 template. 3771 37722001-05-22 Mark Mitchell <mark@codesourcery.com> 3773 3774 * optimize.c (initialize_inlined_parameters): Don't set 3775 TREE_READONLY for a VAR_DECL taking the place of an inlined 3776 PARM_DECL. 3777 37782001-05-22 Jason Merrill <jason_merrill@redhat.com> 3779 3780 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support. 3781 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface 3782 attribute. 3783 37842001-05-22 Joseph S. Myers <jsm28@cam.ac.uk> 3785 3786 * parse.y: Refer to compound literals as such, not as 3787 constructor-expressions. 3788 37892001-05-21 Mark Mitchell <mark@codesourcery.com> 3790 3791 * call.c (build_op_delete_call): Ignore exception-specifications 3792 when looking for matching delete operators. 3793 * init.c (build_new_1): Compute whether or not the allocation 3794 function used is a placement allocation function or not, and 3795 communicate this information to build_op_delete_call. 3796 37972001-05-21 Jason Merrill <jason_merrill@redhat.com> 3798 3799 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi. 3800 (build_vtbl_ref): Adjust. 3801 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address. 3802 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks. 3803 Re-add vtable-gc. 3804 (unsupported_options): Correspondingly. 3805 3806 * decl2.c (maybe_make_one_only): Check flag_weak, not 3807 supports_one_only(). 3808 3809 * cp-tree.def (START_CATCH_STMT): Lose. 3810 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS. 3811 * tree.c (cp_statement_code_p): Don't case it. 3812 * semantics.c (cp_expand_stmt): Likewise. 3813 * cp-tree.h (START_CATCH_TYPE): Lose. 3814 (HANDLER_TYPE): New. 3815 * except.c (expand_start_catch_block): Don't start any blocks. 3816 Return the type. 3817 (expand_end_catch_block): Don't end any blocks. 3818 * parse.y (handler): Don't pass anything from finish_handler_parms 3819 to finish_handler. 3820 * pt.c (tsubst_expr): Likewise. 3821 * semantics.c (begin_handler): Call note_level_for_catch here. 3822 (finish_handler_parms): Don't return anything. 3823 (genrtl_catch_block, begin_catch_block): Lose. 3824 (genrtl_handler): Call expand_start_catch here. 3825 38262001-05-18 Jason Merrill <jason_merrill@redhat.com> 3827 3828 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here. 3829 (get_vtable_decl, build_vtt): Not here. 3830 38312001-05-20 Nathan Sidwell <nathan@codesourcery.com> 3832 3833 PR c++/2781 3834 * optimize.c (update_cloned_parm): Copy addressability and other 3835 flags. 3836 38372001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3838 3839 * pt.c (determine_specialization): Ignore artificial functions. 3840 38412001-05-20 Neil Booth <neil@daikokuya.demon.co.uk> 3842 3843 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update. 3844 (C_RID_CODE): Remove. 3845 * lex.c (cxx_init_options): Call set_identifier_size. Update. 3846 (init_parse): Don't do it here. 3847 38482001-05-18 Diego Novillo <dnovillo@redhat.com> 3849 3850 * decl2.c (finish_objects): Use the original SYMBOL_REF from the 3851 function declaration to avoid stripping the symbol's attributes. 3852 38532001-05-18 Nathan Sidwell <nathan@codesourcery.com> 3854 3855 * decl.c (pushdecl): Adjust error string. 3856 (xref_tag): Adjust friend class injection warning. Remove the 3857 inherited name from the class shadowed scope. 3858 38592001-05-17 Mark Mitchell <mark@codesourcery.com> 3860 3861 * except.c (cp_protect_cleanup_actions): New function. 3862 (init_exception_processing): Don't set protect_cleanup_actions 3863 here. Do set lang_protect_cleanup_actions. 3864 38652001-05-16 Nathan Sidwell <nathan@codesourcery.com> 3866 3867 * spew.c (read_token): Call yyerror on all unexpected tokens. 3868 38692001-05-16 Nathan Sidwell <nathan@codesourcery.com> 3870 3871 * init.c (member_init_ok_or_else): Take a tree rather than 3872 string for name. 3873 (expand_member_init): Adjust. 3874 38752001-05-14 Nick Clifton <nickc@cambridge.redhat.com> 3876 3877 * decl.c (duplicate_decls): Suppress warning about duplicate 3878 decls if the first decl is a friend. 3879 38802001-05-12 Zack Weinberg <zackw@stanford.edu> 3881 3882 * except.c (choose_personality_routine): Export. Add 3883 explanatory comment. Take an enum languages, not a boolean. 3884 (initialize_handler_parm): Adjust to match. 3885 * cp-tree.h: Prototype choose_personality_routine. 3886 * lex.c (handle_pragma_java_exceptions): New function. 3887 (init_cp_pragma): Register #pragma GCC java_exceptions. 3888 38892001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk> 3890 3891 * method.c (build_mangled_C99_name): Remove unused prototype. 3892 38932001-05-12 Alexandre Oliva <aoliva@redhat.com> 3894 3895 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type. 3896 * typeck.c (get_member_function_from_ptrfunc, 3897 build_ptrmemfunc, expand_ptrmemfunc_cst): Take 3898 TARGET_PTRMEMFUNC_VBIT_LOCATION into account. 3899 3900 Reverted Geoff Keating's 2001-05-03's patch. 3901 39022001-05-11 Ira Ruben <ira@apple.com> 3903 3904 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h. 3905 39062001-05-11 Neil Booth <neil@daikokuya.demon.co.uk> 3907 3908 * cp-tree.h (finish_label_expr, lookup_label): Delete. 3909 * parse.y: Update for '&&'; don't issue warning here. 3910 * semantics.c (finish_label_expr): Delete. 3911 39122001-05-07 Mark Mitchell <mark@codesourcery.com> 3913 3914 * splay-tree.h (splay_tree_max): New function. 3915 (splay_tree_min): Likewise. 3916 39172001-05-03 Geoffrey Keating <geoffk@redhat.com> 3918 3919 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER. 3920 (pfn_vflag_identifier): Define. 3921 Update comment about layout of pointer functions. 3922 (build_ptrmemfunc1): Update prototype. 3923 (expand_ptrmemfunc_cst): Update prototype. 3924 * decl.c (initialize_predefined_identifiers): Initialize 3925 pfn_vflag_identifier. 3926 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add 3927 an extra field to the type. 3928 * expr.c (cplus_expand_constant): Pass 'flag' between 3929 expand_ptrmemfunc_cst and build_ptrmemfunc1. 3930 * typeck.c (get_member_function_from_ptrfunc): When 3931 FUNCTION_BOUNDARY < 16, look at additional field to determine 3932 if a pointer-to-member is a real pointer or a vtable offset. 3933 (build_ptrmemfunc1): Add new parameter to contain extra field. 3934 (build_ptrmemfunc): Pass the extra field around. 3935 (expand_ptrmemfunc_cst): Add new parameter to return extra field. 3936 (pfn_from_ptrmemfunc): Ignore the extra field. 3937 39382001-05-03 Mark Mitchell <mark@codesourcery.com> 3939 3940 * cp-tree.h (flag_inline_trees): Update documentation. 3941 * decl.c (init_decl_processing): Adjust handling of 3942 flag_inline_functions and flag_inline_trees to support -O3. 3943 (grokfndecl): Set DECL_INLINE on all functions if that's what 3944 the user requested. 3945 (save_function_data): Clear DECL_INLINE in 3946 current_function_cannot_inline is non-NULL. 3947 * decl2.c (flag_inline_trees): Update documentation. 3948 39492001-05-03 Nathan Sidwell <nathan@codesourcery.com> 3950 3951 * dump.c (cp_dump_tree, USING_STMT case): New case. 3952 * tree.c (cp_statement_code_p): Add USING_STMT. 3953 * decl2.c (do_using_directive): Add the using directive statement. 3954 3955 * tree.c (walk_tree): Reformat an if block. 3956 39572001-05-02 Mark Mitchell <mark@codesourcery.com> 3958 3959 * decl.c (compute_array_index_type): Don't try to do anything with 3960 the indices when processing a template. 3961 39622001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3963 3964 * call.c: NULL_PTR -> NULL. 3965 * class.c: Likewise. 3966 * cvt.c: Likewise. 3967 * decl.c: Likewise. 3968 * decl2.c: Likewise. 3969 * except.c: Likewise. 3970 * init.c: Likewise. 3971 * rtti.c: Likewise. 3972 * search.c: Likewise. 3973 * tree.c: Likewise. 3974 * typeck.c: Likewise. 3975 * typeck2.c: Likewise. 3976 39772001-05-02 Mark Mitchell <mark@codesourcery.com> 3978 3979 * decl2.c (do_using_directive): Revert previous patch. 3980 39812001-05-01 Nathan Sidwell <nathan@codesourcery.com> 3982 3983 * cp-tree.def (USING_STMT): New statement node. 3984 * cp-tree.h (USING_STMT_NAMESPACE): New macro. 3985 * decl2.c (do_using_directive): Add USING_STMT to statement 3986 tree. Don't emit errors when processing template decl. 3987 * pt.c (tsubst_expr, USING_STMT case): New case. 3988 * semantics.c (cp_expand_stmt, USING_STMT case): New case. 3989 39902001-05-01 Nathan Sidwell <nathan@codesourcery.com> 3991 3992 * call.c (build_new_op): Convert args from reference here. 3993 (build_conditional_expr): Don't convert here. 3994 39952001-05-01 Nathan Sidwell <nathan@codesourcery.com> 3996 3997 * spew.c (last_token_id): New static variable. 3998 (read_token): Set it here. 3999 (yyerror): Use it here. 4000 40012001-04-30 Richard Henderson <rth@redhat.com> 4002 4003 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations. 4004 * decl.c: Likewise. 4005 40062001-04-30 Mark Mitchell <mark@codesourcery.com> 4007 4008 * gxxint.texi: Remove. 4009 * Make-lang.in: Remove all traces of gxxint.texi. 4010 4011Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com> 4012 4013 * decl2.c (start_static_initialization_or_destruction): Correct 4014 logic to handle the -fno-use-cxa-atexit case. 4015 40162001-04-30 Mark Mitchell <mark@codesourcery.com> 4017 4018 * optimize.c (update_cloned_parm): New function. 4019 (maybe_clone_body): Use it. Update the `this' parameter too. 4020 40212001-04-29 Joseph S. Myers <jsm28@cam.ac.uk> 4022 4023 * decl2.c (unsupported_options): Add new-abi. 4024 * lang-options.h: Remove no longer supported options. 4025 40262001-04-27 Nathan Sidwell <nathan@codesourcery.com> 4027 4028 * except.c (can_convert_eh): Don't check template parms, 4029 typename types etc. 4030 40312001-04-27 Nathan Sidwell <nathan@codesourcery.com> 4032 4033 * optimize.c (maybe_clone_body): Copy parameter names and locations. 4034 40352001-04-27 Nathan Sidwell <nathan@codesourcery.com> 4036 4037 * cp-tree.h (adjust_clone_args): Prototype new function. 4038 * class.c (adjust_clone_args): New function. 4039 * decl.c (start_function): Call it for in charge ctors. 4040 40412001-04-26 Mark Mitchell <mark@codesourcery.com> 4042 4043 * method.c (use_thunk): Make sure that thunks really are emitted 4044 when requested. 4045 40462001-04-26 Nathan Sidwell <nathan@codesourcery.com> 4047 4048 * mangle.c (write_chars): New macro. 4049 (hwint_to_ascii): New function 4050 (write_number): Use it. 4051 (write_integer_cst): Deal with really big numbers. 4052 40532001-04-25 Mark Mitchell <mark@codesourcery.com> 4054 4055 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting 4056 the clone. 4057 40582001-04-25 Nathan Sidwell <nathan@codesourcery.com> 4059 4060 * decl.c (grokdeclarator): Set context of namespace scope 4061 TYPE_DECLS. 4062 40632001-04-24 Zack Weinberg <zackw@stanford.edu> 4064 4065 * cp/optimize.c: Include hashtab.h. 4066 (struct inline_data): Add tree_pruner. 4067 (expand_call_inline, expand_calls_inline): Use it when calling 4068 walk_tree. 4069 (optimize_function): Initialize and free tree_pruner. 4070 40712001-04-24 Nathan Sidwell <nathan@codesourcery.com> 4072 4073 Lazy __FUNCTION__ generation. 4074 * cp-tree.def (FUNCTION_NAME): Remove. 4075 * cp-tree.h (function_name_declared_p): Remove. 4076 (cp_fname_init): Prototype. 4077 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids, 4078 don't call declare_function_name. Call start_fname_decls. 4079 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't 4080 clobber the line number. 4081 (cp_fname_init): New function. 4082 (start_function): Call start_fname_decls. 4083 (finish_function): Call finish_fname_decls. 4084 * lex.c (reswords): Add slots for __FUNCTION__ et al. 4085 (rid_to_yy): Add mappings for __FUNCTION__ et al. 4086 * optimize.c (maybe_clone_body): Remove function_name_declared_p. 4087 * parse.y (VAR_FUNC_NAME): New token. 4088 (primary): Add VAR_FUNC_NAME. 4089 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's 4090 generation. 4091 (tsubst, FUNCTION_NAME case): Remove. 4092 (tsubst_copy, FUNCTION_NAME case): Remove. 4093 (tsubst_expr, DECL_STMT case): Be careful with a 4094 DECL_PRETTY_FUNCTION_P. 4095 (instantiate_decl): Remove function_name_declared_p. 4096 * semantics.c (begin_compound_statement): Don't call 4097 declare_function_name here. 4098 (setup_vtbl_ptr). Don't save & restore function_name_declared_p. 4099 (finish_translation_unit): Call finish_fname_decls. 4100 (expand_body): Remove function_name_declared_p. 4101 * typeck2.c (digest_init): Allow any ERROR_MARK. 4102 41032001-04-24 Nathan Sidwell <nathan@codesourcery.com> 4104 4105 * pt.c (tsubst_decl): Use VOID_TYPE_P. 4106 * semantics.c: Fix some typos. 4107 41082001-04-23 Phil Edwards <pme@sources.redhat.com> 4109 4110 * cp/decl2.c (flag_honor_std): Always initialize to 1. 4111 41122001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4113 4114 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf. 4115 41162001-04-23 Jason Merrill <jason_merrill@redhat.com> 4117 4118 * except.c (build_throw): Wrap the initialization of the exception 4119 object in a MUST_NOT_THROW_EXPR. 4120 (do_free_exception): #if 0. 4121 41222001-04-20 Mark Mitchell <mark@codesourcery.com> 4123 4124 * cp-tree.h (finish_enum): Change prototype. 4125 * decl.c (finish_enum): Reorganize. 4126 * parse.y (structsp): Adjust calls to finish_enum. 4127 41282001-04-20 Nathan Sidwell <nathan@codesourcery.com> 4129 4130 * tree.c (cp_tree_equal): Adjust final switch formatting. Add 4131 't' case. 4132 41332001-04-20 Nathan Sidwell <nathan@codesourcery.com> 4134 4135 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED. 4136 (layout_empty_base): Return at end flag. 4137 (build_base_field): Likewise. 4138 (build_base_fields): Likewise. 4139 (layout_virtual_bases): Don't add 1 to eoc value. 4140 (end_of_class): Use full size for empty bases. 4141 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended 4142 empty bases. Don't add 1 to eoc value. Only add trailing padding 4143 if we're an empty class with no empty bases. 4144 (dump_class_hierarchy): Dump size and alignment. 4145 41462001-04-20 Jakub Jelinek <jakub@redhat.com> 4147 4148 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and 4149 ICS_BAD_FLAG. 4150 41512001-04-20 Jakub Jelinek <jakub@redhat.com> 4152 4153 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL 4154 is found, look first if name does not match the structure name. 4155 41562001-04-19 Mark Mitchell <mark@codesourcery.com> 4157 4158 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is 4159 set. 4160 (SET_DECL_LANGUAGE): New macro. 4161 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE. 4162 (pushdecl): Likewise. 4163 (build_library_fn_1): Likewise. 4164 (build_cp_library_fn): Likewise. 4165 (grokfndecl): Likewise. 4166 (grokvardecl): Mark `extern "C"' variables as having C linkage. 4167 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE. 4168 * lex.c (retrofit_lang_decl): Likewise. 4169 * mangle.c (mangle_decl_string): Don't mangle the names of 4170 variables declared with C language linkage. 4171 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE. 4172 41732001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca> 4174 4175 * semantics.c (simplify_aggr_init_exprs_r): Don't restore 4176 flag_access_control from uninitialized storage. 4177 41782001-04-15 Mark Mitchell <mark@codesourcery.com> 4179 4180 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation. 4181 * mangle.c (write_pointer_to_member_type): Fix mangling of 4182 pointers to cv-qualified member function types. 4183 4184 * init.c (build_delete): Create a SAVE_EXPR for the address if 4185 we're going to use it more than once. 4186 41872001-04-13 Mark Mitchell <mark@codesourcery.com> 4188 4189 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove. 4190 (expand_ptremfunc_cst): Change prototype. 4191 (delta2_from_ptrmemfunc): Remove. 4192 * expr.c (cplus_expand_constant): Adjust call to 4193 expand_ptrmemfunc_cst. 4194 * typeck.c (build_ptrmemfunc1): Simplify. 4195 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still 4196 results in a constant. 4197 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters. 4198 (delta2_from_ptrmemfunc): Remove. 4199 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst. 4200 42012001-04-12 Jason Merrill <jason_merrill@redhat.com> 4202 4203 * cp-tree.h (decl_namespace_list): New macro. 4204 (struct saved_scope): Add decl_ns_list. 4205 * decl.c (mark_saved_scope): Mark it. 4206 * decl2.c: Lose static decl_namespace_list. 4207 (init_decl2): Don't save it. 4208 42092001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4210 4211 * cp-tree.h (warn_return_type, yylex): Delete redundant 4212 declarations. 4213 4214 * decl.c (current_class_depth, global_namespace): Likewise. 4215 4216 * decl2.c (current_class_depth, flag_gnu_xref): Likewise 4217 4218 * repo.c (flag_use_repository): Likewise. 4219 42202001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4221 4222 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block, 4223 set_block, pushdecl, getdecls, gettags, init_decl_processing, 4224 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p, 4225 lvalue_or_else, print_lang_statistics, comp_target_types, 4226 unsigned_type, signed_type, signed_or_unsigned_type, 4227 build_function_call, mark_addressable, incomplete_type_error): 4228 Delete redundant declarations. 4229 42302001-04-11 Jason Merrill <jason_merrill@redhat.com> 4231 4232 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro. 4233 (TYPE_ANONYMOUS_P): New macro. 4234 (TAGGED_TYPE_P): New macro. 4235 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P. 4236 (grokfndecl, grokvardecl, grokdeclarator): Likewise. 4237 * tree.c (no_linkage_helper): Likewise. 4238 * semantics.c (begin_class_definition): Likewise. 4239 * pt.c (convert_template_argument): Likewise. 4240 * lex.c (check_for_missing_semicolon): Likewise. 4241 42422001-04-12 Nathan Sidwell <nathan@codesourcery.com> 4243 4244 * class.c (dfs_unshared_virtual_bases): New function. 4245 (mark_primary_bases): Call it. 4246 (check_bases): Ignore virtual bases when determining 4247 nearly-emptiness. 4248 42492001-04-12 Nathan Sidwell <nathan@codesourcery.com> 4250 4251 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION. 4252 42532001-04-11 Mark Mitchell <mark@codesourcery.com> 4254 4255 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the 4256 cloned function to the clone. 4257 42582001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4259 4260 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H). 4261 4262 * semantics.c: Include expr.h. 4263 42642001-04-11 Nathan Sidwell <nathan@codesourcery.com> 4265 4266 * method.c (implicitly_declare_fn): Commonize code for copy ctor 4267 and assignment op. Set TREE_USED for parameter. 4268 42692001-04-10 Mark Mitchell <mark@codesourcery.com> 4270 4271 * class.c (find_final_overrider_data): Add `candidates'. 4272 (dfs_find_final_overrider): Don't issue error messages 4273 prematurely. 4274 (find_final_overrider): Issue error messages here. 4275 (build_base_field): Don't warn about amgibuous direct bases here. 4276 (warn_about_ambiguous_direct_bases): New function. 4277 (layout_class_type): Use it. 4278 42792001-04-10 Richard Henderson <rth@redhat.com> 4280 4281 * typeck.c (build_array_ref): Push the array reference inside 4282 COMPOUND_EXPR and COND_EXPR. 4283 42842001-04-05 Mark Mitchell <mark@codesourcery.com> 4285 4286 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P. 4287 * decl.c (duplicate_decls): Adjust accordingly. 4288 (maybe_commonize_var): Likewise. 4289 (grokfndecl): Likewise. 4290 (start_function): Likewise. 4291 (start_method): Likewise. 4292 * decl2.c (key_method): Likewise. 4293 (import_export_decl): Likewise. 4294 * method.c (implicitly_declare_fn): Likewise. 4295 * optimize.c (maybe_clone_body): Likewise. 4296 42972001-04-05 Benjamin Kosnik <bkoz@redhat.com> 4298 4299 * lang-specs.h: Add __DEPRECATED. 4300 4301Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com> 4302 4303 * search.c (get_dynamic_cast_base_type): When building a new 4304 constant, set its type to ssizetype. 4305 43062001-04-04 Jakub Jelinek <jakub@redhat.com> 4307 4308 * optimize.c (expand_call_inline): Only add newly inlined statements 4309 into inlined_stmts. 4310 43112001-04-03 Mark Mitchell <mark@codesourcery.com> 4312 4313 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove. 4314 (OPERATOR_FORMAT): Likewise. 4315 (OPERATOR_TYPENAME_FORMAT): Likewise. 4316 * operators.def: Remove old name-mangling information. 4317 * decl.c (grok_op_properties): Adjust accordingly. 4318 * lex.c (init_operators): Likewise. 4319 * rtti.c (get_tinfo_decl): Issue error messages about types that 4320 have variable size. 4321 43222001-04-03 Mark Mitchell <mark@codesourcery.com> 4323 4324 * decl2.c (import_export_decl): Don't call import_export_class 4325 when processing an inline member function. 4326 * semantics.c (expand_body): Call import_export_decl before 4327 emitting inline functions. 4328 43292001-03-28 Richard Henderson <rth@redhat.com> 4330 4331 IA-64 ABI Exception Handling: 4332 * cp-tree.def (EH_SPEC_BLOCK): New. 4333 (MUST_NOT_THROW_EXPR): New. 4334 * cp-tree.h: Update changed function declarations. 4335 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove. 4336 (CPTI_CALL_UNEXPECTED): New. 4337 (struct cp_language_function): Rename x_eh_spec_try_block 4338 to x_eh_spec_block. 4339 (EH_SPEC_STMTS, EH_SPEC_RAISES): New. 4340 * decl.c (current_binding_level): If no current function 4341 bindings, revert to scope_chain. 4342 (initialize_predefined_identifiers): Remove __cp_push_exception. 4343 (store_parm_decls): Use begin_eh_spec_block. 4344 (finish_function): Use finish_eh_spec_block. 4345 (mark_lang_function): Update for name changes. 4346 * decl2.c (finish_file): No mark_all_runtime_matches. 4347 * dump.c (cp_dump_tree): Handle new tree codes. 4348 * error.c (dump_expr) [BIND_EXPR]: Fix typo. 4349 * except.c (catch_language_init, catch_language): Remove. 4350 (init_exception_processing): Don't set language code. 4351 Initialize call_unexpected_node, protect_cleanup_actions, 4352 eh_personality_libfunc, lang_eh_runtime_type. 4353 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove. 4354 (get_eh_type, get_eh_caught, get_eh_handlers): Remove. 4355 (prepare_eh_type): Split out type canonicalizations ... 4356 (build_eh_type_type): ... from here. 4357 (build_eh_type_type_ref): Remove. 4358 (mark_all_runtime_matches): Remove. 4359 (build_exc_ptr): New. 4360 (do_begin_catch, do_end_catch): New. 4361 (do_pop_exception): Remove. 4362 (build_terminate_handler): Remove. 4363 (choose_personality_routine): Split out language choice from ... 4364 (initialize_handler_parm): ... here. 4365 Use MUST_NOT_THROW_EXPR. 4366 (expand_start_catch_block): Use do_begin_catch. Simplify Java 4367 exception object handling. 4368 (expand_start_eh_spec, expand_end_eh_spec): Remove. 4369 (expand_exception_blocks, alloc_eh_object): Remove. 4370 (begin_eh_spec_block, finish_eh_spec_block): New. 4371 (do_allocate_exception, do_free_exception): New. 4372 (expand_throw): Merge into ... 4373 (build_throw): ... here. Update for abi. 4374 * expr.c (cplus_expand_expr): No expand_internal_throw. 4375 Handle MUST_NOT_THROW_EXPR. 4376 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK. 4377 * semantics.c (*) Update for except.h name changes. 4378 (genrtl_try_block): No protect_with_terminate. 4379 (genrtl_eh_spec_block): New. 4380 (genrtl_handler): Don't emit the goto here. 4381 (cp_expand_stmt): Handle EH_SPEC_BLOCK. 4382 (genrtl_finish_function): Don't expand_exception_blocks. 4383 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK. 4384 43852001-03-28 Richard Henderson <rth@redhat.com> 4386 4387 * decl.c (struct named_label_list): Rename eh_region to 4388 in_try_scope, add in_catch_scope. 4389 (struct binding_level): Rename eh_region to is_try_scope, 4390 add is_catch_scope. 4391 (note_level_for_try): Rename from note_level_for_eh. 4392 (note_level_for_catch): New. 4393 (poplevel): Copy both is_try_scope and is_catch_scope to 4394 the named_label_list struct. 4395 (check_previous_goto_1): Don't check for catch block via 4396 DECL_ARTIFICIAL; use in_try_scope instead. 4397 (check_goto): Likewise. 4398 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare. 4399 * except.c (expand_start_catch_block): Call note_level_for_catch. 4400 * semantics.c (begin_compound_stmt): Update for note_level_for_try. 4401 44022001-03-27 Richard Henderson <rth@redhat.com> 4403 4404 * except.c: Use USING_SJLJ_EXCEPTIONS instead of 4405 exceptions_via_longjmp. 4406 44072001-03-27 Phil Edwards <pme@sources.redhat.com> 4408 4409 * pt.c (check_default_tmpl_args): Make error messages clearer. 4410 44112001-03-26 Phil Edwards <pme@sources.redhat.com> 4412 4413 * error.c: Also undefine 'A' macro used for cp_printers definition. 4414 44152001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4416 4417 * Make-lang.in: Depend on $(SYSTEM_H), not system.h. 4418 44192001-03-26 Mike Yang <yang@research.att.com> 4420 Mark Mitchell <mark@codesourcery.com> 4421 4422 * dump.c (dump_access): New function. 4423 (cp_dump_tree): Use it. Dump basetype information for class 4424 types. 4425 44262001-03-26 Mark Mitchell <mark@codesourcery.com> 4427 4428 * Makefile.in (optimize.o): Depend on params.h. 4429 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE. 4430 (init_decl_processing): Set flag_no_inline when doing 4431 inlining-on-trees. 4432 * optimize.c: Include params.h. 4433 (struct inline_data): Improve documentation of FNS. Add 4434 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P. 4435 (INSNS_PER_STMT): New macro. 4436 (remap_block): Use CLONING_P. 4437 (inlinable_function_p): Don't inline big functions. 4438 (expand_call_inline): Keep track of how much inlining we've done. 4439 (optimize_function): Set FIRST_INLINED_FN. 4440 (maybe_clone_body): Set CLONING_P. 4441 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in 4442 tree nodes. 4443 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling 4444 rest_of_compilation. Clear DECL_RTL for local variables 4445 afterwards. 4446 (clear_decl_rtl): New function. 4447 44482001-03-26 Nathan Sidwell <nathan@codesourcery.com> 4449 4450 Implement DR 209 4451 * cp-tree.h (skip_type_access_control, 4452 reset_type_access_control): Prototype. 4453 * decl.c (grokdeclarator): Access of friends is not checked. 4454 * parse.y (component_decl_list): Reset type access control. 4455 * semantics.c (decl_type_access_control): Clear 4456 current_type_lookups. 4457 (save_type_access_control): Don't save if not deferring. 4458 (skip_type_access_control, reset_type_access_control): New 4459 functions. 4460 (begin_class_definition): Do type access control for basetypes. 4461 Start deferred access control. 4462 (finish_class_definition): Resume immediate access control if 4463 this is a local class. 4464 44652001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4466 4467 * class.c (add_method): Use memcpy/memmove, not bcopy. 4468 4469 * decl.c (duplicate_decls): Likewise. 4470 44712001-03-23 Jakub Jelinek <jakub@redhat.com> 4472 4473 * mangle.c (write_discriminator): Use `_0' for discriminator 1, 4474 not `_'. 4475 44762001-03-23 Jakub Jelinek <jakub@redhat.com> 4477 4478 * decl.c (local_names): Define. 4479 (push_local_name): New. 4480 (grok_reference_init): Return init if initializing static reference 4481 variable with non-constant instead of emitting it. 4482 Move expand_static_init call to cp_finish_decl. 4483 (layout_var_decl): Call push_local_name. 4484 (maybe_commonize_var): Allow inlining functions even if they have 4485 static local variables, use comdat_linkage for them if flag_weak. 4486 (check_initializer): Call obscure_complex_init if 4487 grok_reference_init returned non-zero. 4488 (save_function_data): Clear x_local_names. 4489 (pop_cp_function_context): Free x_local_names. 4490 (mark_inlined_fns): Remove. 4491 (mark_lang_function): Mark x_local_names. 4492 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P. 4493 Mark inlined_fns as tree, remove call to mark_inlined_fns. 4494 * class.c (alter_access): Ensure DECL_ACCESS is never set if 4495 DECL_DISCRIMINATOR_P. 4496 * cp-tree.h (cp_language_function): Add x_local_names. 4497 (lang_decl_flags): Add discriminator into u2. 4498 (lang_decl_inlined_fns): Remove. 4499 (lang_decl): inlined_fns is now a TREE_VEC. 4500 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define. 4501 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a 4502 TREE_VEC, not a custom structure. 4503 (optimize_function): Likewise. 4504 * mangle.c (discriminator_for_local_entity): Discriminate among 4505 VAR_DECL local entities. 4506 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS 4507 is not valid. 4508 45092001-03-22 Bryce McKinlay <bryce@albatross.co.nz> 4510 4511 Add support for Java interface method calls. 4512 * cp-tree.h (struct lang_type): Add java_interface flag. 4513 (TYPE_JAVA_INTERFACE): New macro. 4514 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute 4515 by setting TYPE_JAVA_INTERFACE. 4516 * call.c (java_iface_lookup_fn): New static. 4517 (build_over_call): If calling a method declared in a 4518 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the 4519 expression which resolves the function address. 4520 (build_java_interface_fn_ref): New function. 4521 45222001-03-22 Richard Henderson <rth@redhat.com> 4523 4524 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h. 4525 * except.c: Don't include it. 4526 45272001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> 4528 based on an idea from Joe Buck <jbuck@synopsys.com> 4529 4530 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore): 4531 New nonterminals. 4532 (data_def, component_decl): Add reductions to bad_decl. 4533 45342001-03-22 Jakub Jelinek <jakub@redhat.com> 4535 4536 * method.c (do_build_assign_ref): Don't use build_modify_expr for 4537 anonymous aggregates, since they don't have assignment operator 4538 method. 4539 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy 4540 assignment operators for anonymous structure fields. 4541 45422001-03-21 Jason Merrill <jason@redhat.com> 4543 4544 * pt.c (instantiate_decl): Abort if we see a member constant 4545 instantiation that doesn't already have its initializer. 4546 Downgrade explicit instantiation without definition to pedwarn. 4547 4548 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove. 4549 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P. 4550 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P. 4551 4552 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove. 4553 (pending_vtables): Remove. 4554 * decl2.c (pending_vtables): Remove. 4555 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not 4556 CLASSTYPE_VTABLE_NEEDS_WRITING. 4557 (import_export_class): Likewise. 4558 (init_decl2): Don't mark pending_vtables. 4559 * lex.c (handle_pragma_vtable): Just sorry. 4560 * pt.c (instantiate_class_template): Don't mess with 4561 CLASSTYPE_VTABLE_NEEDS_WRITING. 4562 (mark_class_instantiated): Likewise. 4563 * ptree.c (print_lang_type): Don't print it. 4564 * semantics.c (begin_class_definition): Don't set it. 4565 4566 * pt.c (template_tail): Replace with last_pending_template. 4567 (maybe_templates, maybe_template_tail): Remove. 4568 (add_pending_template): Adjust. 4569 (instantiate_pending_templates): Adjust. 4570 4571 * cp-tree.h (struct saved_scope): Remove lang_stack field. 4572 (current_lang_stack): Remove. 4573 * decl.c (maybe_push_to_top_level): Don't initialize it. 4574 (duplicate_decls): Use current_lang_depth. 4575 (xref_basetypes): Likewise. 4576 * class.c (current_lang_depth): New fn. 4577 (push_lang_context): Use more varray functionality. 4578 (pop_lang_context): Likewise. 4579 4580 * error.c (GLOBAL_THING): Always use '__'. 4581 45822001-03-21 Mark Mitchell <mark@codesourcery.com> 4583 4584 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME. 4585 4586 * mangle.c (mangle_decl_string): Mangle the names of overloaded 4587 operators, even when they have `extern "C"' linkage. 4588 45892001-03-19 Mark Mitchell <mark@codesourcery.com> 4590 4591 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME, 4592 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME 4593 where it's not necessary. 4594 (add_method): Remove optimization involving comparison of 4595 DECL_ASSEMBLER_NAME. 4596 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME, 4597 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME 4598 where it's not necessary. 4599 (check_methods): Likewise. 4600 (build_clone): Likewise. 4601 (built_vtt): Likewise. 4602 * cp-tree.h (DECL_NEEDED_P): Likewise. 4603 * decl.c (pushtag): Likewise. 4604 (duplicate_decls): Likewise. 4605 (pushdecl): Likewise. 4606 (builtin_function): Likewise. 4607 (build_library_fn_1): Set DECL_LANGUAGE for library functions. 4608 (build_cp_library_fn): Likewise. 4609 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME, 4610 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME 4611 where it's not necessary. 4612 (make_rtl_for_nonlocal_decl): Likewise. 4613 (cp_finish_decl): Likewise. 4614 (grokfndecl): Likewise. 4615 (grokvardecl): Likewise. 4616 (grokdeclarator): Likewise. 4617 (start_function): Likewise. 4618 (cp_missing_return_ok_p): Likewise. 4619 * decl2.c (grokclassfn): Likewise. 4620 (check_classfn): Likewise. 4621 (finish_static_data_member_decl): Likewise. 4622 (grokfield): Likewise. 4623 * error.c (GLOBAL_IORD_P): Remove. 4624 (dump_global_iord): Improve output. 4625 (dump_decl): Avoid using DECL_ASSEMBLER_NAME. 4626 * except.c (nothrow_libfn_p): Summarily reject any function not in 4627 namespace-scope. 4628 * init.c (build_java_class_ref): Don't explicitly set 4629 DECL_ASSEMBLER_NAME after calling mangle_decl. 4630 * mangle.c (mangle_decl_string): Handle extern "C" functions. 4631 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl. 4632 * method.c (set_mangled_name_for_decl): Don't explicitly set 4633 DECL_ASSEMBLER_NAME after calling mangle_decl. 4634 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and 4635 IDENTIFIER_GLOBAL_VALUE for the thunk. 4636 * pt.c (set_mangled_name_for_template_decl): Remove. 4637 (check_explicit_specialization): Don't use it. 4638 (looup_template_class): Don't set DECL_ASSEMBLER_NAME. 4639 (tsubst_friend_function): Likewise. 4640 (tsubst_decl): Likewise. 4641 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME. 4642 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME, 4643 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME 4644 where it's not necessary. 4645 (tinfo_base_init): Likewise. 4646 (create_real_tinfo_var): Likewise. 4647 * search.c (looup_field_1): Likewise. 4648 * semantics.c (finish_named_return_value): Likewise. 4649 * tree.c (init_tree): Set lang_set_decl_assembler_name. 4650 46512001-03-15 Gabriel Dos Reis <gdr@codesourcery.com> 4652 4653 Correct semantics restrictions checking in throw-expression. 4654 * except.c (is_admissible_throw_operand): New function. 4655 (build_throw): Use it. 4656 46572001-03-14 Mark Mitchell <mark@codesourcery.com> 4658 4659 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__ 4660 and its ilk. 4661 46622001-03-14 Mark Mitchell <mark@codesourcery.com> 4663 4664 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. 4665 * cp-tree.h (DECL_IN_MEMORY_P): Likewise. 4666 * decl.c (duplicate_decls): Likewise. 4667 (builtin_function): Likewise. 4668 (build_library_fn): Likewise. 4669 (build_cp_library_fn): Likewise. 4670 (check_initializer): Likewise. 4671 (cp_finish_decl): Likewise. 4672 * decl2.c (grokfield): Likewise. 4673 (grok_function_init): Remove #if 0'd code. 4674 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. 4675 * friend.c (do_friend): Likewise. 4676 * init.c (get_temp_regvar): Likewise. 4677 * method.c (make_thunk): Likewise. 4678 * pt.c (tsubst_friend_function): Likewise. 4679 (tsubst_decl): Likewise. 4680 (regenerate_decl_from_template): Likewise. 4681 * semantics.c (genrtl_named_return_value): Likewise. 4682 (expand_body): Likewise. 4683 (genrtl_finish_function): Likewise. 4684 * tree.c (cp_tree_equal): Likewise. 4685 46862001-03-12 Nathan Sidwell <nathan@codesourcery.com> 4687 4688 * call.c (convert_like_real): Add extra semantics to INNER 4689 parameter. Don't convert to temporary if a user conversion 4690 gives us an lvalue that we're about to bind to a reference. 4691 Set INNER to indicate pending reference binding on recursive 4692 calls. 4693 46942001-03-10 Neil Booth <neil@daikokuya.demon.co.uk> 4695 4696 * cp/lex.c: Delete duplicate pending_lang_change. 4697 46982001-03-10 Neil Booth <neil@daikokuya.demon.co.uk> 4699 4700 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation): 4701 Similarly. 4702 * cp/repo.c (get_base_filename, open_repo_file): Similarly. 4703 * cp/cp-tree.h: Remove file_name_nondirectory prototype. 4704 47052001-03-09 Zack Weinberg <zackw@stanford.edu> 4706 4707 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. 4708 47092001-03-08 Stan Shebs <shebs@apple.com> 4710 4711 * cp-tree.h (set_identifier_local_value): Remove unused decl. 4712 47132001-03-06 Zack Weinberg <zackw@stanford.edu> 4714 4715 * spew.c: Remove references to CPP_OSTRING. 4716 47172001-03-06 Andrew Haley <aph@redhat.com> 4718 4719 * typeck.c (convert_arguments): Check that we have an fndecl. 4720 47212001-03-05 Andrew Haley <aph@redhat.com> 4722 4723 * typeck.c (convert_arguments): Don't do ellipsis conversion for 4724 __built_in_constant_p. 4725 47262001-03-02 Nathan Sidwell <nathan@codesourcery.com> 4727 4728 * typeck.c (build_static_cast): Allow enum to enum conversions 4729 as per DR 128. 4730 47312001-03-02 Nathan Sidwell <nathan@codesourcery.com> 4732 4733 * class.c (check_field_decls): Pointers to member do not a 4734 non-pod struct make, as per DR 148. 4735 47362001-03-02 Nathan Sidwell <nathan@codesourcery.com> 4737 4738 * call.c (joust): cp_pedwarn when using gnu extension concerning 4739 worst conversion sequences. 4740 47412001-03-01 Zack Weinberg <zackw@stanford.edu> 4742 4743 * decl.c: Replace all uses of 'boolean' with 'bool'. 4744 47452001-03-01 Zack Weinberg <zackw@stanford.edu> 4746 4747 * lang-specs.h: Add zero initializer for cpp_spec field to 4748 all array elements that need one. Don't put an #ifdef inside 4749 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and 4750 use it. 4751 47522001-03-01 Nathan Sidwell <nathan@codesourcery.com> 4753 4754 Implement using decls inside template functions. 4755 * decl2.c (validate_nonmember_using_decl): Don't special case 4756 fake_std_node in the global namespace. Don't reject early when 4757 processing a template. 4758 (do_local_using_decl): Add to statement tree. Don't do further 4759 processing when building a template. 4760 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs. 4761 47622001-03-01 Nathan Sidwell <nathan@codesourcery.com> 4763 4764 * decl2.c (do_nonmember_using_decl): Don't complain if we find 4765 same function. Do complain about ambiguating extern "C" 4766 declarations. 4767 47682001-02-28 Nathan Sidwell <nathan@codesourcery.com> 4769 4770 Remove floating point and complex type template constant parms. 4771 * pt.c (convert_nontype_argument): Remove REAL_TYPE and 4772 COMPLEX_TYPE extensions. 4773 (invalid_nontype_parm_type_p): Likewise. 4774 47752001-02-27 Jeffrey Oldham <oldham@codesourcery.com> 4776 4777 * except.c (call_eh_info): Revert "match_function"'s type. 4778 47792001-02-27 Nathan Sidwell <nathan@codesourcery.com> 4780 4781 Fix ctor vtable vcall offsets. 4782 * class.c (struct vtbl_init_data_s): Add rtti_binfo member. 4783 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter. 4784 (get_matching_base): Remove. 4785 (get_original_base): New function. 4786 (build_vtbl_initializer): Initialize vid.rtti_binfo. 4787 Use a virtual thunk for a ctor vtable with an index 4788 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a 4789 primary base within a constructor vtable. Only set 4790 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset 4791 when primary base has been lost. 4792 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment. 4793 47942001-02-26 Jeffrey Oldham <oldham@codesourcery.com> 4795 4796 * call.c (joust): Ensure more_specialized()'s argument length 4797 parameter has correct value for constructors. 4798 47992001-02-26 Nathan Sidwell <nathan@codesourcery.com> 4800 4801 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct. 4802 4803 * decl.c (mark_inlined_fns): Prototype. 4804 48052001-02-22 Mark Mitchell <mark@codesourcery.com> 4806 4807 * spew.c (yylex): Correct handling of friends. 4808 48092001-02-22 Mark Mitchell <mark@codesourcery.com> 4810 4811 * mangle.c (write_encoding): Pass write_function_type the 4812 FUNCTION_DECL for the function being encoded. 4813 (write_function_type): Pass it along to write_bare_function_type. 4814 (write_bare_function_type): Pass it along to write_method_parms. 4815 (write_method_parms): Don't mangle the compiler-generated 4816 parameters to a constructor or destructor. 4817 48182001-02-22 Andreas Jaeger <aj@suse.de> 4819 4820 * optimize.c: Include toplev.h for 4821 note_deferral_of_defined_inline_function prototype. 4822 48232001-02-22 Jakub Jelinek <jakub@redhat.com> 4824 4825 * cp-tree.h (struct lang_decl_inlined_fns): New. 4826 (struct lang_decls): Add inlined_fns. 4827 (DECL_INLINED_FNS): New macro. 4828 * optimize.c (struct inline_data): Add inlined_fns. 4829 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro. 4830 (inlinable_function_p): Likewise, fix typo in comment, 4831 function is not inlinable if it already inlined function currently 4832 being optimized. 4833 (expand_call_inline): Add fn to inlined_fns if necessary. 4834 (optimize_function): Initialize inlined_fns. 4835 Save inlined_fns into DECL_INLINED_FNS after expanding inlines. 4836 * decl.c (mark_inlined_fns): New function. 4837 (lang_mark_tree): Call it. 4838 48392001-02-21 Jason Merrill <jason@redhat.com> 4840 4841 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag. 4842 (DECL_UNINLINABLE): Move to middle-end. 4843 4844 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn. 4845 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT. 4846 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone. 4847 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the 4848 parms and outer BLOCK. note_deferral_of_defined_inline_function. 4849 4850 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on 4851 second parm of op=. 4852 48532001-02-19 Mark Mitchell <mark@codesourcery.com> 4854 4855 * decl2.c (set_decl_namespace): Allow explicit instantiations in 4856 any namespace. 4857 48582001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 4859 4860 * optimize.c (expand_call_inline): Don't walk subtrees of type 4861 nodes. 4862 48632001-02-18 Mark Mitchell <mark@codesourcery.com> 4864 4865 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry 4866 for a destructor. 4867 48682001-02-18 Jason Merrill <jason@redhat.com> 4869 4870 Do put the VTT parameter in DECL_ARGUMENTS. 4871 * cp-tree.h (struct cp_language_function): Add x_vtt_parm. 4872 (current_vtt_parm): New macro. 4873 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm. 4874 (DECL_HAS_VTT_PARM_P): New macro. 4875 (DECL_VTT_PARM): Remove. 4876 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros. 4877 * decl.c (duplicate_decls): Only copy the operator code if 4878 appropriate. 4879 (start_function): Set current_vtt_parm. 4880 (lang_mark_tree): Don't mark vtt_parm. 4881 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to 4882 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P. 4883 * class.c (build_clone): Maybe remove the VTT parm. 4884 * optimize.c (maybe_clone_body): Set up the VTT parm. 4885 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm. 4886 * call.c (build_over_call): Just allow the VTT arg. 4887 * method.c (make_thunk): Don't set DECL_VTT_PARM. 4888 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM. 4889 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE. 4890 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise. 4891 * error.c (dump_function_decl): Likewise. 4892 * call.c (build_user_type_conversion_1, convert_like_real): Abort 4893 if we try to call a constructor with in-charge or VTT parms. 4894 * method.c (skip_artificial_parms_for): New fn. 4895 * call.c (add_function_candidate, build_over_call): Call it. 4896 * call.c (build_new_method_call): Use current_vtt_parm. 4897 * init.c (expand_virtual_init): Likewise. 4898 * class.c (same_signature_p): No longer static. 4899 * cp-tree.h: Declare it. 4900 * search.c (look_for_overrides_r): Use it. 4901 49022001-02-17 Mark Mitchell <mark@codesourcery.com> 4903 4904 * cp-tree.h (new_abi_rtti_p): Remove. 4905 (name_mangling_version): Likewise. 4906 (flag_do_squangling): Likewise. 4907 * class.c (build_rtti_vtbl_entries): Remove old ABI support. 4908 * decl.c (grokfndecl): Likewise. 4909 * decl2.c (name_mangling_version): Remove. 4910 (flag_do_squangling): Likewise. 4911 (lang_f_options): Remove `squangle'. 4912 (unsupported_options): Add `squangle'. 4913 (cxx_decode_option): Issue a warning about uses of 4914 -fname-mangling-version. 4915 (finish_file): Remove old ABI support. 4916 * pt.c (check_explicit_specialization): Likewise. 4917 (tsubst_decl): Likewise. 4918 * rtti.c (init_rtti_processing): Likewise. 4919 (build_headof): Likewise. 4920 (get_tinfo_decl_dynamic): Likewise. 4921 (tinfo_from_decl): Likewise. 4922 (build_dynamic_cast_1): Likewise. 4923 (synthesize_tinfo_var): Likewise. 4924 * init.c (build_new): Allow enumeration types for the array-bounds 4925 in a direct-new-declarator. 4926 4927 * semantics.c (finish_typeof): Resolve OFFSET_REFs. 4928 4929 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and 4930 TREE_PROTECTED from the template being specialized. 4931 49322001-02-17 Jason Merrill <jason@redhat.com> 4933 4934 * decl2.c (build_artificial_parm): Set TREE_READONLY. 4935 4936 * decl.c (bad_specifiers): Allow throw specs on things with 4937 pointer-to-function or -member-function type. 4938 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize 4939 a pmf. 4940 49412001-02-17 Mark Mitchell <mark@codesourcery.com> 4942 4943 * call.c (check_dtor_name): Handle template names correctly. 4944 49452001-02-16 Jason Merrill <jason@redhat.com> 4946 4947 * cp-tree.h (DECL_USE_VTT_PARM): Remove. 4948 * decl2.c (maybe_retrofit_in_chrg): Don't create it. 4949 * optimize.c (maybe_clone_body): Don't substitute it. 4950 * call.c (build_new_method_call): Check in_chrg instead. 4951 * init.c (expand_virtual_init): Likewise. 4952 49532001-02-16 Gabriel Dos Reis <gdr@codesourcery.com> 4954 4955 * decl.c (check_tag_decl): Make sure a typedef for an anonymous 4956 class-type introduces at least a type-name. 4957 49582001-02-16 Jakub Jelinek <jakub@redhat.com> 4959 4960 * call.c (convert_like_real): Create a temporary for non-lvalue. 4961 49622001-02-16 Jeffrey Oldham <oldham@codesourcery.com> 4963 4964 * cp-tree.h: Fix typos in comments. 4965 49662001-02-16 Jason Merrill <jason@redhat.com> 4967 4968 * optimize.c (remap_block): If we're compiling a clone, pass the 4969 new block to insert_block. 4970 49712001-02-16 Mark Mitchell <mark@codesourcery.com> 4972 4973 * semantics.c (finish_asm_stmt): Robustify. 4974 49752001-02-15 Mark Mitchell <mark@codesourcery.com> 4976 4977 * pt.c (push_template_decl_real): Don't remangle the name of a 4978 class template. 4979 49802001-02-15 Jim Meyering <meyering@lucent.com> 4981 4982 * Make-lang.in (c++.install-common): Depend on installdirs. 4983 (c++.install-info): Likewise. 4984 (c++.install-man): Likewise. 4985 49862001-02-15 Mark Mitchell <mark@codesourcery.com> 4987 4988 * typeck2.c (build_m_component_ref): Robustify. 4989 49902001-02-15 Alexandre Oliva <aoliva@redhat.com> 4991 4992 * friend.c (do_friend): Don't take the nested [template] class 4993 into account when deciding whether to warn about the friend 4994 function not referring to a template function. 4995 49962001-02-14 Jakub Jelinek <jakub@redhat.com> 4997 4998 * typeck.c (build_unary_op): Clarify error message. 4999 50002001-02-08 Aldy Hernandez <aldyh@redhat.com> 5001 5002 * parse.y (component_constructor_declarator): allow optional 5003 parentheses around constructor class name. 5004 50052001-02-14 Nathan Sidwell <nathan@codesourcery.com> 5006 5007 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c 5008 section. 5009 * init.c (emit_base_init): Remove incorrect comment about 5010 virtual bases. 5011 * method.c (make_thunk): Fix comment alignment. 5012 50132001-02-14 Nathan Sidwell <nathan@codesourcery.com> 5014 5015 Kill remnants of this is variable. 5016 * cp-tree.h (flag_this_is_variable): Remove. 5017 * decl2.c (flag_this_is_variable): Remove. 5018 * class.c (fixed_type_or_null): Add cdtor parm. Adjust. 5019 (build_vbase_path): The path is non-static, even in a cdtor. 5020 (resolves_to_fixed_type_p): Add additional return value. 5021 * search.c (init_vbase_pointers): Adjust. 5022 * tree.c (lvalue_p_1): Adjust. 5023 * typeck.c (mark_addressable): Adjust. 5024 50252001-02-14 Nathan Sidwell <nathan@codesourcery.com> 5026 5027 * pt.c (unify): Don't check cv quals of array types. 5028 50292001-02-14 Nathan Sidwell <nathan@codesourcery.com> 5030 5031 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to 5032 check whether we already have the type. 5033 50342001-02-13 Mark Mitchell <mark@codesourcery.com> 5035 5036 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment. 5037 * call.c (build_op_delete_call): Simplify to remove duplicate 5038 code. 5039 * class.c (clone_function_decl): Don't build the deleting variant 5040 of a non-virtual destructor. 5041 * decl.c (finish_destructor_body): Don't call delete if this is a 5042 non-virtual destructor. 5043 * init.c (build_delete): Explicitly call `operator delete' when 5044 deleting an object with a non-virtual destructor. 5045 50462001-02-13 Jason Merrill <jason@redhat.com> 5047 5048 * lang-specs.h: Add more __EXCEPTIONS. 5049 50502001-02-12 Nathan Sidwell <nathan@codesourcery.com> 5051 5052 * typeck2.c (process_init_constructor): Check 5053 TREE_HAS_CONSTRUCTOR before issuing missing init warning. 5054 50552001-02-12 Nathan Sidwell <nathan@codesourcery.com> 5056 5057 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case): 5058 Remove spurious information in comment. Allow further 5059 adjustments of REFERENCE_TYPE args. 5060 50612001-02-12 Nathan Sidwell <nathan@codesourcery.com> 5062 5063 * errfn.c (cp_deprecated): Tweak diagnostic text. 5064 * parse.y (new_initializer): Deprecate initializer lists 5065 extension. 5066 50672001-02-12 Mark Mitchell <mark@codesourcery.com> 5068 5069 Remove old ABI support. 5070 50712001-02-11 Mark Mitchell <mark@codesourcery.com> 5072 5073 * decl2.c (flag_vtable_thunks): Always set it to 1. 5074 (flag_new_abi): Likewise. 5075 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI. 5076 5077 * Makefile.in (g++spec.o): Fix typo. 5078 50792001-02-09 Jason Merrill <jason@redhat.com> 5080 5081 * lang-specs.h: Restore definition of __EXCEPTIONS. 5082 50832001-02-08 Jason Merrill <jason@redhat.com> 5084 5085 * search.c (shared_member_p): New function. 5086 (lookup_field_r): Use it. 5087 * cp-tree.h (SHARED_MEMBER_P): Remove. 5088 5089 * method.c (process_overload_item): Handle template-dependent array 5090 bounds. 5091 * pt.c (type_unification_real): If we end up with undeduced nontype 5092 parms, try again. 5093 5094 * decl.c (lookup_name_real): Tweak warning to refer to decls, not 5095 types. 5096 5097 * typeck2.c (friendly_abort): Don't say anything if we have 5098 earlier errors or sorries. 5099 5100 * decl.c (check_tag_decl): Notice attempts to redefine bool and 5101 wchar_t. Ignore if in_system_header. 5102 5103 * decl.c (maybe_push_cleanup_level): New fn... 5104 (start_decl_1): ...split out from here. 5105 * cvt.c (build_up_reference): Use it. 5106 * cp-tree.h: Declare it. 5107 51082001-02-07 Mark Mitchell <mark@codesourcery.com> 5109 5110 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor 5111 spec. 5112 51132001-02-06 Nathan Sidwell <nathan@codesourcery.com> 5114 5115 * pt.c (lookup_template_class): Make sure it's a primary 5116 template or template_template_parm when called from the parser. 5117 (instantiate_template_class): Add assertion. 5118 51192001-02-05 Alexandre Oliva <aoliva@redhat.com> 5120 5121 * method.c (build_mangled_name) [old abi]: Protect flush_repeats() 5122 from error_mark_node. 5123 51242001-02-05 Nathan Sidwell <nathan@codesourcery.com> 5125 5126 Fix specification and implementation bugs in V3 ABI 5127 construction vtables. 5128 * cp-tree.h (flag_dump_class_layout): New flag. 5129 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove. 5130 (BINFO_LOST_PRIMARY_P): New flag. 5131 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts. 5132 (BINFO_PRIMARY_MARKED_P): Rename to ... 5133 (BINFO_PRIMARY_P): ... here. 5134 (binfo_via_virtual): New prototype. 5135 * decl2.c (flag_dump_class_layout): New flag. 5136 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to 5137 use `=' as a file name separator. 5138 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary 5139 bases. 5140 (build_vtbl_address): If this is a virtual primary base, then 5141 get the vtbl of what it is ultimately primary for. 5142 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust 5143 for BINFO_PRIMARY_P. 5144 (dfs_skip_nonprimary_vbases_markedp): Likewise. 5145 (get_shared_vbase_if_not_primary): Likewise. 5146 (dfs_get_pure_virtuals): Likewise. 5147 (expand_upcast_fixups): Likewise. 5148 (fixup_virtual_upcast_offsets): Likewise. 5149 (dfs_find_vbase_instance): Likewise. 5150 (find_vbase_instance): Likewise. 5151 (binfo_from_vbase): Adjust comment to reflect reality. 5152 (binfo_via_virtual): New function. 5153 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros 5154 for binfo walking during VTT construction. 5155 (dfs_mark_primary_bases): Remove. 5156 (force_canonical_binfo_r): New function. 5157 (force_canonical_binfo): New function. 5158 (mark_primary_virtual_base): New function. 5159 (mark_primary_bases): Walk in inheritance graph order, use 5160 mark_primary_virtual_base. 5161 (determine_primary_base): Use some more intermediate variables. 5162 (dfs_find_final_overrider): Don't check for overriding along a 5163 virtual path. 5164 (dfs_modify_vtables): Walk into primary virtual bases too. 5165 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P. 5166 (build_base_fields): Likewise. 5167 (dfs_set_offset_for_unshared_vbases): Likewise. 5168 (layout_virtual_bases): Likewise. 5169 (end_of_class): Likewise. 5170 (finish_struct_1): Call dump_class_hierarchy, if requested. 5171 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos. 5172 (dump_class_hierarchy_r): Add stream parameter. Emit more information. 5173 (dump_class_hierarchy): Add file parameter. Append to file, if 5174 required. 5175 (finish_vtbls): Adjust accumulate_vtbl_inits call. 5176 Use canonical base for virtual bases. 5177 (build_vtt): Add more comments. Adjust build_vtt_inits call. 5178 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm. 5179 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P, 5180 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for 5181 virtual VTTs. 5182 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P 5183 from DATA. We want virtual primary bases and all bases via virtual. 5184 Only set BINFO_VPTR_INDEX for top level. Look up from a primary 5185 virtual base when not a construction vtable. 5186 (dfs_ctor_vtable_bases_queue_p): New DFS predicate. 5187 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call. 5188 Use canonical bases when processing virtual bases. 5189 (accumulate_vtbl_inits): We're interested in any base via a 5190 virtual path. 5191 (dfs_accumulate_vtbl_inits): If this is a primary virtual base 5192 within a construction vtable, determine what is being overridden. 5193 (build_vtbl_initializer): Add more comments 5194 (add_vcall_offset_vtbl_entries_1): Adjust comment. 5195 (build_rtti_vtbl_entries): Check if the base has lost its 5196 primary. 5197 51982001-02-05 Mark Mitchell <mark@codesourcery.com> 5199 5200 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES. 5201 5202Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5203 5204 * decl.c (pushdecl): Call abort instead of fatal. 5205 * except.c (decl_is_java_type): Call fatal_error instead of fatal. 5206 * init.c (build_new_1): Likewise. 5207 (build_java_class_ref): Call internal_error and fatal_error, not fatal. 5208 * decl.c (build_typename_type): hash_table_init now returns void. 5209 decl.c (init_decl_processing): Make an error non-fatal. 5210 52112001-02-04 Mark Mitchell <mark@codesourcery.com> 5212 5213 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting. 5214 Document. 5215 (CLASSTYPE_INTERFACE_KNOWN): Likewise. 5216 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise. 5217 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise. 5218 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise. 5219 * decl.c (maybe_commonize_var): Use the new name-mangling where 5220 appropriate. 5221 * decl2.c (comdat_linkage): Enhance comments. Make all 5222 compiler-generated things static, if COMDAT is not available. 5223 (get_tinfo_decl): Do not make typeinfo objects that belong in the 5224 library COMDAT. 5225 (tinfo_base_init): Use the correct mangled name for typeinfo 5226 strings, and push them into the global scope. 5227 (typeinfo_in_lib_p): New function. 5228 (synthesize_tinfo_var): Use it. 5229 (create_real_tinfo_var): Likewise. 5230 52312001-02-03 Jakub Jelinek <jakub@redhat.com> 5232 5233 * decl.c (push_class_binding): Use context_for_name_lookup instead 5234 of CP_DECL_CONTEXT. 5235 * search.c (context_for_name_lookup): Remove static. Check for NULL 5236 context in the loop. 5237 * cp-tree.h (context_for_name_lookup): Add prototype. 5238 52392001-02-02 Jakub Jelinek <jakub@redhat.com> 5240 5241 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove. 5242 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack): 5243 Remove. 5244 * call.c (convert_class_to_reference, build_user_type_conversion_1, 5245 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper. 5246 52472001-02-02 Mark Mitchell <mark@codesourcery.com> 5248 5249 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list 5250 of macros used when compiling g++spec.c. 5251 * g++spec.c (lang_specific_driver): Link with the shared 5252 libgcc by default. 5253 52542001-01-29 Joseph S. Myers <jsm28@cam.ac.uk> 5255 5256 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator, 5257 make_reference_declarator, make_call_declarator), method.c 5258 (implicitly_declare_fn), parse.y (namespace_using_decl, 5259 notype_unqualified_id, expr_or_declarator, new_type_id, 5260 after_type_declarator, direct_after_type_declarator, 5261 notype_declarator, complex_notype_declarator, 5262 complex_direct_notype_declarator, qualified_id, 5263 notype_qualified_id, overqualified_id, direct_new_declarator, 5264 absdcl, direct_abstract_declarator, conversion_declarator), pt.c 5265 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt 5266 instead of build_parse_node. 5267 52682001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5269 5270 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE. 5271 (minus_one_node): Moved to top level gcc directory. Renamed 5272 to integer_minus_one_node. 5273 5274 * init.c (init_init_processing): Don't set minus_one_node. 5275 (build_vec_init): Use integer_minus_one_node. 5276 5277 * rtti.c (get_tinfo_decl_dynamic): Likewise. 5278 52792001-01-28 Jakub Jelinek <jakub@redhat.com> 5280 5281 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments 5282 identical and they would be replaced with constant, remove 5283 MODIFY_EXPR from the tree. 5284 52852001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5286 5287 * Make-lang.in: Remove all dependencies on defaults.h. 5288 * call.c: Don't include defaults.h. 5289 * decl.c: Likewise. 5290 * decl2.c: Likewise. 5291 * except.c: Likewise. 5292 * pt.c: Likewise. 5293 * rtti.c: Likewise. 5294 * tree.c: Likewise. 5295 * typeck.c: Likewise. 5296 52972001-01-25 Jakub Jelinek <jakub@redhat.com> 5298 5299 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded 5300 operators even in "C" linkage. 5301 * method.c (set_mangled_name_for_decl): Likewise. 5302 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for 5303 overloaded operators in "C" linkage. 5304 53052001-01-24 Nathan Sidwell <nathan@codesourcery.com> 5306 5307 * pt.c (tsubst_decl): Remove IN_DECL parameter. 5308 (tsubst_arg_types): Check parameter is not void. 5309 (tsubst): Adjust tsubst_decl call. 5310 53112001-01-24 Nathan Sidwell <nathan@codesourcery.com> 5312 5313 * call.c (add_builtin_candidate): Quote std properly, from 5314 previous change. 5315 53162001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5317 5318 * pt.c (check_explicit_specialization): Clone constructors and 5319 destructors. 5320 53212001-01-23 Nathan Sidwell <nathan@codesourcery.com> 5322 5323 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC 5324 indicates anything special about template depth. Make sure we 5325 only count the user visible template classes. 5326 53272001-01-23 Nathan Sidwell <nathan@codesourcery.com> 5328 5329 * call.c (build_conv): Typo in comment. 5330 (add_builtin_candidate): Add more explanation. 5331 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR. 5332 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates 5333 when we have enumeral types. 5334 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE 5335 candidates for relops and eqops. 5336 (joust): Simplify control flow. Allow a non-template user 5337 function to hide a builtin. 5338 53392001-01-22 Nathan Sidwell <nathan@codesourcery.com> 5340 5341 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER. 5342 (more_specialized): Add deduction parameter. 5343 * call.c (joust): Adjust more_specialized call. 5344 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL, 5345 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags. 5346 (get_bindings_order): Remove. 5347 (get_bindings_real): Add DEDUCE parameter. 5348 (maybe_adjust_types_for_deduction): Return extra unify flags. Do 5349 REFERENCE_TYPE jig for DEDUCE_ORDER. 5350 (type_unification_real): Deal with DEDUCE_ORDER. Use result of 5351 maybe_adjust_types_for_deduction. 5352 (more_specialized): Add DEDUCE parameter. Call get_bindings_real 5353 directly. 5354 (try_one_overload): Use result of maybe_adjust_types_for_deduction. 5355 (check_cv_quals_for_unify): Use new unify qualifier flags. 5356 (unify): Clear new unify qualifier flags. 5357 (get_bindings_real): Add DEDUCE parameter. 5358 (get_bindings): Adjust call to get_bindings_real. 5359 (get_bindings_overload): Likewise. 5360 (most_specialized_instantiation): Adjust call to 5361 more_specialized. 5362 53632001-01-19 Jason Merrill <jason@redhat.com> 5364 5365 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI. 5366 5367 * decl.c (init_decl_processing): Just force -fvtable-thunks on if 5368 -fnew-abi. 5369 53702001-01-19 Ute Pelkmann <scope.muc@t-online.de> 5371 5372 * decl2.c (arg_assoc_class): Fix double iteration logic. 5373 53742001-01-19 Jason Merrill <jason@redhat.com> 5375 5376 * init.c (build_delete): Always call convert_force to strip cv-quals. 5377 5378 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI. 5379 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI. 5380 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI. 5381 53822001-01-19 Nathan Sidwell <nathan@codesourcery.com> 5383 5384 * search.c (get_vbase_1): Count only virtual bases. 5385 53862001-01-19 Nathan Sidwell <nathan@codesourcery.com> 5387 5388 * class.c (duplicate_tag_error): Robustify flag clearing. 5389 53902001-01-19 Nathan Sidwell <nathan@codesourcery.com> 5391 5392 * cp-tree.h (lookup_template_class): Add complain parm. 5393 * decl.c (lookup_namespace_name): Adjust call to 5394 lookup_template_class. 5395 (make_typename_type): Likewise. 5396 * semantics.c (finish_template_type): Likewise. 5397 * pt.c (lookup_template_class): Add complain parm. Adjust. 5398 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class. 5399 (tsubst): Likewise. 5400 54012001-01-19 Nathan Sidwell <nathan@codesourcery.com> 5402 5403 * pt.c (copy_default_args_to_explicit_spec): Preserve 5404 object's CV quals. Reorganize. 5405 54062001-01-18 Nathan Sidwell <nathan@codesourcery.com> 5407 5408 * typeck.c (build_modify_expr): Say `initialization' for 5409 INIT_EXPRs. 5410 * init.c (build_default_init): Convert to enumeral type, if 5411 needed. 5412 54132001-01-18 Jakub Jelinek <jakub@redhat.com> 5414 5415 * parse.y (nomods_initdcl0): Properly set things up for 5416 initdcl0_innards. 5417 54182001-01-18 Nathan Sidwell <nathan@codesourcery.com> 5419 5420 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag. 5421 (type_unification_real): Set it. 5422 (unify): Use it. 5423 54242001-01-18 Nathan Sidwell <nathan@codesourcery.com> 5425 5426 * decl.c (finish_destructor_body): Convert to vbase pointer here. 5427 54282001-01-18 Nathan Sidwell <nathan@codesourcery.com> 5429 5430 * semantics.c (begin_class_definition): Check we're not inside a 5431 template parm list. 5432 54332001-01-18 Nathan Sidwell <nathan@codesourcery.com> 5434 5435 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of 5436 BASELINK_P. 5437 54382001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5439 5440 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR. 5441 * call.c (build_over_call): Add comment. 5442 54432001-01-16 Daniel Berlin <dberlin@redhat.com> 5444 5445 * cvt.c (ocp_convert): Handle vector type conversion 5446 * typeck2.c (digest_init): Handle vector type initializations 5447 54482001-01-16 Phil Edwards <pme@sources.redhat.com> 5449 5450 * g++spec.c: Don't add libraries needlessly if -fsyntax-only 5451 was given. 5452 54532001-01-15 Nathan Sidwell <nathan@codesourcery.com> 5454 5455 * pt.c (check_nontype_parm): Rename to ... 5456 (invalid_nontype_parm_type_p): ... here. 5457 (process_template_parm): Adjust. 5458 (convert_template_argument): Adjust. 5459 54602001-01-15 Nathan Sidwell <nathan@codesourcery.com> 5461 5462 * pt.c (check_nontype_parm): New function. 5463 (process_template_parm): Use it. 5464 (convert_template_argument): Use it. 5465 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to 5466 member. 5467 54682001-01-14 Jeffrey Oldham <oldham@codesourcery.com> 5469 5470 * tree.c: Add defaults.h 5471 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY. 5472 * Make-lang.in (cp/tree.o): Add defaults.h. 5473 54742001-01-13 Joseph S. Myers <jsm28@cam.ac.uk> 5475 5476 * Make-lang.in (CXX_C_OBJS): Add c-format.o. 5477 54782001-01-13 Joseph S. Myers <jsm28@cam.ac.uk> 5479 5480 * g++.1: Change to be ".so man1/gcc.1". 5481 54822001-01-13 Joseph S. Myers <jsm28@cam.ac.uk> 5483 5484 * Make-lang.in (c++.info, c++.install-info): Build and install g++ 5485 internals info. 5486 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info. 5487 ($(srcdir)/cp/g++int.info): New target. 5488 * gxxint.texi: Add info directory entry. Use @@ in email address. 5489 * .cvsignore: Update. 5490 54912001-01-12 Nathan Sidwell <nathan@codesourcery.com> 5492 5493 * typeck.c (build_c_cast): Do template processing earlier. 5494 Always pedwarn on array casts. 5495 54962001-01-12 Nathan Sidwell <nathan@codesourcery.com> 5497 5498 * friend.c (make_friend_class): Make sure a templated class is 5499 actually a template. 5500 55012001-01-11 Nathan Sidwell <nathan@codesourcery.com> 5502 5503 * decl2.c (get_guard): Set linkage from guarded decl. 5504 55052001-01-11 Nathan Sidwell <nathan@codesourcery.com> 5506 5507 * call.c (convert_default_arg): Check for unprocessed 5508 DEFAULT_ARG. 5509 * cp-tree.h (replace_defarg): Move to spew.c. 5510 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to 5511 spew.c, which is where they really are. 5512 (done_pending_defargs): Declare. 5513 (unprocessed_defarg_fn): Declare. 5514 * decl.c (replace_defarg): Move to spew.c 5515 * parse.y (structsp): Call done_pending_defargs. 5516 * spew.c (defarg_fns): Rearrange list structure. 5517 (defarg_fnsdone): New static variable. 5518 (defarg_depfns): New static variable. 5519 (init_spew): Adjust. 5520 (add_defarg_fn): Store the type in TREE_TYPE. 5521 (do_pending_defargs): Detect and deal with ordering constraints 5522 and circularity. 5523 (done_pending_defargs): New function. 5524 (unprocessed_defarg_fn): New function. 5525 (replace_defarg): Moved from decl.c. Robustify. Don't save 5526 if circularity detected. 5527 55282001-01-11 Nathan Sidwell <nathan@codesourcery.com> 5529 5530 * pt.c (unify): Check array has a domain, before checking 5531 whether it is variable sized. 5532 55332001-01-11 Nathan Sidwell <nathan@codesourcery.com> 5534 5535 * decl.c (grokparms): Unobfuscate and get correct diagnostic for 5536 parameters with pointers to arrays of unknown bound. 5537 55382001-01-11 Nathan Sidwell <nathan@codesourcery.com> 5539 5540 * parse.y (template_parm_header, template_spec_header): New 5541 reductions. Split out from ... 5542 (template_header): ... here. Use them. 5543 (template_template_parm): Use template_parm_header. 5544 * semantics.c (finish_template_template_parm): Add assert. 5545 55462001-01-10 Mark Mitchell <mark@codesourcery.com> 5547 5548 * mangle.c (write_builtin_type): Fix thinko. 5549 5550 * pt.c (copy_default_args_to_explicit_spec_1): New function. 5551 (copy_default_args_to_explicit_spec): Likewise. 5552 (check_explicit_specialization): Use it. 5553 5554 * class.c (finish_struct_1): Remove last argument in call to 5555 make_decl_rtl; use make_function_rtl instead of make_decl_rtl. 5556 * decl.c (builtin_function): Likewise. 5557 (build_cp_library_fn): Likewise. 5558 (check_initializer): Likewise. 5559 (make_rtl_for_nonlocal_decl): Likewise. 5560 (cp_finish_decl): Likewise. 5561 (start_function): Likewise. 5562 * decl2.c (finish_anon_union): Likewise. 5563 * friend.c (do_friend): Likewise. 5564 * init.c (build_java_class_ref): Likewise. 5565 * method.c (make_thunk): Likewise. 5566 * pt.c (tsubst_friend_function): Likewise. 5567 * semantics.c (expand_body): Likewise. 5568 55692001-01-10 Mark Mitchell <mark@codesourcery.com> 5570 5571 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not 5572 looking at DECL_CLONED_FUNCTION for non-functions. 5573 55742001-01-10 Nathan Sidwell <nathan@codesourcery.com> 5575 5576 * error.c (dump_template_parameter): Use parm to determine how 5577 to print default value. 5578 55792001-01-10 Nathan Sidwell <nathan@codesourcery.com> 5580 5581 * class.c (duplicate_tag_error): Clear more flags. 5582 55832001-01-10 Nathan Sidwell <nathan@codesourcery.com> 5584 5585 * call.c (build_new_method_call): Use binfo_for_vbase. 5586 55872001-01-10 Joseph S. Myers <jsm28@cam.ac.uk> 5588 5589 * cp-tree.h (flag_cond_mismatch): Don't declare. 5590 * decl2.c (flag_cond_mismatch): Don't define. 5591 (lang_f_options): Remove cond-mismatch. 5592 (unsupported_options): Add cond-mismatch. 5593 55942001-01-09 Nathan Sidwell <nathan@codesourcery.com> 5595 5596 * class.c (handle_using_decl): Reject using of constructor name 5597 of sourcing class. Allow injecting of a method with same name as 5598 nested class. Fixup error messages. 5599 56002001-01-09 Joseph S. Myers <jsm28@cam.ac.uk> 5601 5602 * decl2.c (lang_decode_option): Handle -Wformat=2. 5603 56042001-01-08 Nathan Sidwell <nathan@codesourcery.com> 5605 5606 * cp-tree.h (lang_decl_flags): Rename defined_in_class to 5607 initialized_in_class. 5608 (DECL_DEFINED_IN_CLASS_P): Rename to ... 5609 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning. 5610 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P. 5611 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P. 5612 * pt.c (check_default_tmpl_args): Adjust for 5613 DECL_INITIALIZED_IN_CLASS_P. 5614 (instantiate_class_template): Likewise. 5615 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P. 5616 5617 * class.c (finish_struct): Constify saved_filename. 5618 56192001-01-08 Nathan Sidwell <nathan@codesourcery.com> 5620 5621 * class.c (duplicate_tag_error): Adjust diagnostic. 5622 (finish_struct): Locally set location to start of struct. 5623 * decl.c (fixup_anonymous_aggr): Use cp_error_at. 5624 56252001-01-08 Nathan Sidwell <nathan@codesourcery.com> 5626 5627 * decl.c (struct binding_level): Adjust class_shadowed comments 5628 to reflect reality. 5629 (push_class_level_binding): Adjust comments to reflect reality. 5630 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding. 5631 Don't set TREE_VALUE on the class_shadowed list. 5632 56332001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 5634 5635 * decl2.c (acceptable_java_type): Allow references too. 5636 * init.c (build_java_class_ref): When using the new ABI, search 5637 `class$' and have it mangled with `mangle_decl.' 5638 * mangle.c (write_java_integer_type_codes): New function. 5639 (write_builtin_type): Detect and mangle Java integer and real 5640 types. 5641 56422001-01-07 Mark Mitchell <mark@codesourcery.com> 5643 5644 * decl2.c (grokfield): Don't accept `asm' specifiers for 5645 non-static data members. 5646 56472001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5648 5649 * expr.c (cplus_expand_expr): Don't reset `target'. 5650 56512001-01-07 Neil Booth <neil@daikokuya.demon.co.uk> 5652 5653 * cp/decl2.c (cxx_post_options): Call cpp_post_options. 5654 56552001-01-05 Nathan Sidwell <nathan@codesourcery.com> 5656 5657 * parse.y (template_datadef): Check for error_mark_node. 5658 56592001-01-05 Nathan Sidwell <nathan@codesourcery.com> 5660 5661 * cp-tree.def (DEFAULT_ARG): Make `x' class. 5662 56632001-01-04 Joseph S. Myers <jsm28@cam.ac.uk> 5664 5665 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define. 5666 (record_builtin_type): Make non-static. 5667 (flag_short_double): Don't declare. 5668 (init_decl_processing): Remove the creation of many tree nodes now 5669 in c_common_nodes_and_builtins. 5670 (build_void_list_node): New function. 5671 * decl2.c (flag_short_double, flag_short_wchar): Don't define. 5672 * cp-tree.h (flag_short_wchar): Don't declare. 5673 56742001-01-04 Mark Mitchell <mark@codesourcery.com> 5675 5676 * call.c (build_conv): Don't use build1 for USER_CONV. 5677 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes. 5678 56792001-01-03 Joseph S. Myers <jsm28@cam.ac.uk> 5680 5681 * lex.c (lang_init): Call c_common_lang_init. 5682 56832001-01-03 Nathan Sidwell <nathan@codesourcery.com> 5684 5685 * search.c (lookup_fnfields_here): Remove. 5686 (look_for_overrides_r): Use lookup_fnfields_1. 5687 Ignore functions from using declarations. 5688 56892001-01-03 Nathan Sidwell <nathan@codesourcery.com> 5690 5691 Implement exceptions specifiers for implicit member functions. 5692 * cp-tree.h (merge_exceptions_specifiers): Declare new function. 5693 * method.c (synthesize_exception_spec): New function. 5694 (locate_dtor, locate_ctor, locate_copy): New functions. 5695 (implicitly_declare_fn): Generate the exception spec too. 5696 * search.c (check_final_overrider): Check artificial functions 5697 too. 5698 * typeck2.c (merge_exception_specifiers): New function. 5699 57002001-01-03 Jason Merrill <jason@redhat.com> 5701 5702 * init.c (build_default_init): New fn. 5703 (perform_member_init): Split out from here. 5704 (build_new_1): Use it. Simplify initialization logic. 5705 (build_vec_init): Take an array, rather than a pointer and maxindex. 5706 Speed up simple initializations. Don't clean up if we're assigning. 5707 * cp-tree.h: Adjust. 5708 * decl2.c (do_static_initialization): Remove TREE_VEC case. 5709 * parse.y (new_initializer): Return void_zero_node for (). 5710 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR. 5711 * typeck2.c (digest_init): Only complain about user-written 5712 CONSTRUCTORs. 5713 57142000-12-22 Mike Stump <mrs@wrs.com> 5715 5716 * decl2.c: (max_tinst_depth): Increase to 50. 5717 57182001-01-02 Mark Mitchell <mark@codesourcery.com> 5719 5720 * class.c (invalidate_class_lookup_cache): Zero the 5721 previous_class_values. 5722 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not 5723 TREE_INT_CST_HIGH. 5724 (CLASSTYPE_TEMPLATE_LEVEL): Likewise. 5725 * decl.c (free_bindings): New variable. 5726 (push_binding): Don't create a new binding if we have one on the 5727 free list. 5728 (pop_binding): Put old bindings on the free list. 5729 (init_decl_processing): Use size_int, not build_int_2. 5730 Register free_bindings as a GC root. 5731 (cp_make_fname_decl): Use size_int, not build_int_2. 5732 (push_inline_template_parms_recursive): Likewise. 5733 (end_template_parm_list): Likewise. 5734 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates. 5735 (tsubst_template_parms): Use size_int, not build_int_2. 5736 (tsubst): Likewise. 5737 * rtti.c (get_vmi_pseudo_type_info): Likewise. 5738 57392001-01-02 Richard Henderson <rth@redhat.com> 5740 5741 * parse.y (asm): Set ASM_INPUT_P. 5742 57432001-01-02 Jason Merrill <jason@redhat.com> 5744 5745 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE 5746 for v3 ABI. 5747 5748 * typeck.c (cp_truthvalue_conversion): New fn. 5749 * cvt.c (ocp_convert): Use it. 5750 5751 * cp-tree.h: Lose c-common.c decls. 5752 5753 * typeck.c (build_unary_op): Restore old &a.f diagnostic code. 5754 * cvt.c (convert_to_void): Use type_unknown_p. 5755 5756 * typeck.c (strip_all_pointer_quals): Also strip quals from 5757 pointer-to-member types. 5758 5759 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat 5760 parse.y as C. 5761 5762 * call.c (build_new_method_call): Do evaluate the object parameter 5763 when accessing a static member. 5764 * typeck.c (build_component_ref): Likewise. 5765 57662001-01-02 Andreas Jaeger <aj@suse.de> 5767 5768 * decl.c (cp_missing_noreturn_ok_p): New. 5769 (init_decl_processing): Set lang_missing_noreturn_ok_p. 5770 57712000-12-29 Jakub Jelinek <jakub@redhat.com> 5772 5773 * decl.c (init_decl_processing): Fix sign of wchar_type_node. 5774 57752000-12-29 Mark Mitchell <mark@codesourcery.com> 5776 5777 * class.c (pushclass): Remove #if 0'd code. 5778 * cp-tree.h (overload_template_name): Remove. 5779 * decl.c (store_bindings): Simplify. 5780 (pop_from_top_level): Likewise. 5781 * pt.c (overload_template_name): Remove. 5782 (instantiate_decl): Don't call push_to_top_level if it's not 5783 needed. 5784 57852000-12-28 Mark Mitchell <mark@codesourcery.com> 5786 5787 * pt.c (register_local_specialization): Don't return a value. 5788 (lookup_template_class): Use move-to-front heuristic when looking 5789 up template instantiations. 5790 (instantiate_decl): Only push_to_top_level when we're actually 5791 going to instantiate the template. 5792 57932000-12-29 Hans-Peter Nilsson <hp@bitrange.com> 5794 5795 * search.c (binfo_for_vtable): Return least derived class, not 5796 most. Handle secondary vtables. 5797 57982000-12-22 Jason Merrill <jason@redhat.com> 5799 5800 * pt.c (more_specialized): Don't optimize len==0. 5801 (fn_type_unification): If we're adding the return type, increase len. 5802 5803 * typeck.c (build_binary_op): Fix pmf comparison logic. 5804 5805 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not 5806 DECL_STATIC_FUNCTION_P. 5807 5808 * semantics.c (genrtl_finish_function): Don't try to jump to 5809 return_label unless it exists. 5810 5811 In partial ordering for a call, ignore parms for which we don't have 5812 a real argument. 5813 * call.c (joust): Pass len to more_specialized. 5814 (add_template_candidate_real): Strip 'this', pass len. 5815 * pt.c (more_specialized): Pass len down. Lose explicit_args parm. 5816 (get_bindings_order): New fn. Pass len down. 5817 (get_bindings_real): Strip 'this', pass len. 5818 (fn_type_unification): Likewise. 5819 (type_unification_real): Succeed after checking 'len' args. 5820 (most_specialized_instantiation): Lose explicit_args parm. 5821 * class.c (resolve_address_of_overloaded_function): Strip 'this', 5822 pass len. 5823 58242000-12-21 Jason Merrill <jason@redhat.com> 5825 5826 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not 5827 DECL_TEMPLATE_RESULT. 5828 5829 * search.c (lookup_field_r): Call lookup_fnfields_1, not 5830 lookup_fnfields_here. 5831 5832 * parse.y (typename_sub2): Return the TYPE_DECL, not the type. 5833 5834 * call.c (build_object_call): Also allow conversions that return 5835 reference to pointer to function. 5836 (add_conv_candidate): Handle totype being ref to ptr to fn. 5837 (build_field_call): Also allow members of type reference to function. 5838 Lose support for calling pointer to METHOD_TYPE fields. 5839 5840 * error.c (dump_expr): Handle *_CAST_EXPR. 5841 5842 * typeck2.c (build_scoped_ref): Always convert to the naming class. 5843 5844 * tree.c (break_out_cleanups): Lose. 5845 * cp-tree.h: Remove prototype. 5846 * typeck.c (build_component_ref): Don't break_out_cleanups. 5847 (build_compound_expr): Likewise. 5848 * semantics.c (finish_expr_stmt): Likewise. 5849 58502000-12-20 Richard Henderson <rth@redhat.com> 5851 5852 * cp-tree.h: Update declarations. 5853 * decl.c (finish_case_label): Return the new stmt node. 5854 * semantics.c (finish_goto_stmt): Likewise. 5855 (finish_expr_stmt, finish_return_stmt): Likewise. 5856 (finish_break_stmt, finish_continue_stmt): Likewise. 5857 (finish_asm_stmt): Likewise. 5858 * parse.y (already_scoped_stmt): Set STMT_LINENO. 5859 (compstmt, implicitly_scoped_stmt, stmt): Likewise. 5860 (simple_if, simple_stmt): Return the new stmt node. 5861 (save_lineno): New. 5862 58632000-12-18 Joseph S. Myers <jsm28@cam.ac.uk> 5864 5865 * cp-tree.h: Don't declare warn_long_long. 5866 58672000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5868 5869 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of 5870 IS_AGGR_TYPE. 5871 58722000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5873 5874 * pt.c (unify): Handle when both ARG and PARM are 5875 BOUND_TEMPLATE_TEMPLATE_PARM. 5876 58772000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5878 5879 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and 5880 DECL_TEMPLATE_PARM_P. 5881 58822000-12-15 Jason Merrill <jason@redhat.com> 5883 5884 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs! 5885 5886 * init.c (build_new_1): Don't strip quals from type. 5887 5888 * decl.c (pushdecl): Don't check for linkage on a non-decl. 5889 5890 * call.c (build_op_delete_call): See through ARRAY_TYPEs. 5891 5892 * call.c (build_new_function_call): Lose space before paren in 5893 error message. 5894 (build_new_method_call): Likewise. 5895 5896 * typeck2.c (build_m_component_ref): Propagate quals from datum. 5897 58982000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5899 5900 * pt.c (check_explicit_specialization): Propagate default 5901 function arguments to explicit specializations. 5902 59032000-12-13 DJ Delorie <dj@redhat.com> 5904 5905 * typeck.c (build_binary_op): Do signed/unsigned warnings for >? 5906 and <? operators. 5907 59082000-12-08 Jason Merrill <jason@redhat.com> 5909 5910 * error.c (dump_function_name): Don't let the user see __comp_ctor. 5911 5912 Clean up copy-initialization in overloading code. 5913 * call.c (build_user_type_conversion_1): Die if we are asked to 5914 convert to the same or a base type. 5915 (implicit_conversion): Avoid doing so. Lose reference binding code. 5916 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit 5917 direct-initialization. Also do direct-init part of copy-init. 5918 (build_user_type_conversion): Don't provide context to convert_like. 5919 * cvt.c (ocp_convert): build_user_type_conversion will now provide 5920 the constructor call for copy-init. 5921 5922 * pt.c (tsubst_decl): Call clone_function_decl here if this is an 5923 instantiation of a member template. 5924 (do_decl_instantiation): Not here. 5925 59262000-12-07 Nathan Sidwell <nathan@codesourcery.com> 5927 5928 * class.c (check_field_decls): Don't special case anonymous 5929 fields in error messages. 5930 (note_name_declared_in_class): Use %D on diagnostic. 5931 5932 * tree.c (pod_type_p): Use strip_array_types. 5933 (cp_valid_lang_attribute): Likewise. 5934 * typeck.c (cp_type_quals): Strip arrays separately, to avoid 5935 multiple evaluations. 5936 (cp_has_mutable_p): Use strip_array_types. 5937 59382000-12-07 Nathan Sidwell <nathan@codesourcery.com> 5939 5940 * cp-tree.h (sufficient_parms_p): Declare new function. 5941 * call.c (sufficient_parms_p): New function, broken out of ... 5942 (add_function_candidate): ... here. Use it. 5943 (add_conv_candidate): Use it. 5944 * decl.c (grok_ctor_properties): Use it. 5945 59462000-12-07 Jakub Jelinek <jakub@redhat.com> 5947 5948 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT. 5949 59502000-12-07 Joseph S. Myers <jsm28@cam.ac.uk> 5951 5952 * decl2.c (lang_decode_option): Handle -Wformat-security. 5953 59542000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5955 5956 * pt.c (verify_class_unification): New function. 5957 (get_class_bindings): Use it. 5958 (try_class_unification): Tidy. 5959 (unify): Handle when argument of a template-id is not 5960 template parameter dependent. 5961 (template_args_equal): Handle when TREE_CODE's do not match. 5962 59632000-12-06 Alexandre Oliva <aoliva@redhat.com> 5964 5965 * lang-specs.h (c++): When invoking the stand-alone preprocessor 5966 for -save-temps, pass all relevant -Defines to it, and then don't 5967 pass them to cc1plus. 5968 59692000-12-05 Will Cohen <wcohen@redhat.com> 5970 5971 * decl.c (finish_case_label): Cleared 5972 more_cleanups_ok in surrounding function scopes. 5973 (define_label): Likewise. 5974 59752000-12-05 Nathan Sidwell <nathan@codesourcery.com> 5976 5977 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document. 5978 (get_matching_virtual): Remove. 5979 (look_for_overrides): Declare new function. 5980 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or 5981 DECL_VINDEX here. 5982 * class.c (check_for_override): Move base class iteration code 5983 to look_for_overrides. 5984 * search.c (next_baselink): Remove. 5985 (get_virtuals_named_this): Remove. 5986 (get_virtual_destructor): Remove. 5987 (tree_has_any_destructors_p): Remove. 5988 (struct gvnt_info): Remove. 5989 (check_final_overrider): Remove `virtual' from error messages. 5990 (get_matching_virtuals): Remove. Move functionality to ... 5991 (look_for_overrides): ... here, and ... 5992 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found 5993 to be overriding. 5994 59952000-12-05 Nathan Sidwell <nathan@codesourcery.com> 5996 5997 * typeck.c (get_delta_difference): If via a virtual base, 5998 return zero. 5999 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no 6000 adjustment. 6001 60022000-12-04 Richard Henderson <rth@redhat.com> 6003 6004 * error.c (dump_tree): Use output_add_string not OB_PUTS. 6005 60062000-12-04 Jason Merrill <jason@redhat.com> 6007 6008 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector". 6009 (write_builtin_type): Pass intSI_type_node and the like through 6010 type_for_mode. 6011 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'. 6012 Pass intSI_type_node and the like through type_for_mode. 6013 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE. 6014 * pt.c (tsubst, unify): Likewise. 6015 * tree.c (walk_tree): Likewise. 6016 * error.c (dump_type): Likewise. 6017 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE. 6018 6019 * Make-lang.in: Tweak top comment for emacs. 6020 (cp/TAGS): Restore. 6021 6022 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw. 6023 6024 * class.c (clone_function_decl): Robustify. 6025 60262000-12-04 Michael Matz <matzmich@cs.tu-berlin.de> 6027 6028 * decl.c (store_bindings): Only search in the non modified 6029 old_bindings for duplicates. 6030 60312000-12-04 Nathan Sidwell <nathan@codesourcery.com> 6032 6033 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not 6034 TYPE_POLYMORPHIC_P. 6035 6036 * typeck.c (build_static_cast): Remove unused variable. 6037 60382000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 6039 6040 * pt.c: Fix typo in comment. 6041 60422000-12-01 Joseph S. Myers <jsm28@cam.ac.uk> 6043 6044 * decl2.c (warn_format): Remove definition. 6045 (lang_decode_option): Handle -Wformat-nonliteral, 6046 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat. 6047 60482000-12-01 Joseph S. Myers <jsm28@cam.ac.uk> 6049 6050 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define. 6051 (init_decl_processing): Don't create string_type_node, 6052 const_string_type_node, wint_type_node, intmax_type_node, 6053 uintmax_type_node, default_function_type, ptrdiff_type_node and 6054 unsigned_ptrdiff_type_node. Adjust position of call to 6055 c_common_nodes_and_builtins. 6056 (identifier_global_value): New function. 6057 60582000-12-01 Nathan Sidwell <nathan@codesourcery.com> 6059 6060 * call.c (standard_conversion): Reject pointer to member 6061 conversions from ambiguous, inaccessible or virtual bases. 6062 * typeck.c (build_static_cast): Don't check pointers to members 6063 specially. 6064 60652000-11-30 Nathan Sidwell <nathan@codesourcery.com> 6066 6067 * method.c (do_build_copy_constructor): Preserve cv 6068 qualifications when accessing source object members. 6069 (do_build_assign_ref): Likewise. Remove separate diagnostics for 6070 unnamed fields. 6071 60722000-11-30 Nathan Sidwell <nathan@codesourcery.com> 6073 6074 * method.c (do_build_assign_ref): Construct appropriately 6075 CV-qualified base reference. Don't allow const casts in base 6076 conversion. 6077 60782000-11-30 Nathan Sidwell <nathan@codesourcery.com> 6079 6080 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on 6081 incomplete return type. 6082 60832000-11-28 Nathan Sidwell <nathan@codesourcery.com> 6084 6085 * parse.y (base_class.1): Produce a _TYPE not a _DECL. 6086 * semantics.c (finish_base_specifier): Accept a _TYPE not a 6087 _DECL. 6088 60892000-11-28 Nathan Sidwell <nathan@codesourcery.com> 6090 6091 * spew.c (yyerror): Cope if yylval.ttype is NULL. 6092 60932000-11-28 Nathan Sidwell <nathan@codesourcery.com> 6094 6095 * decl.c (grokdeclarator): Diagnose undefined template contexts. 6096 60972000-11-28 Nathan Sidwell <nathan@codesourcery.com> 6098 6099 * decl.c (grokdeclarator): Do type access control on friend 6100 class. 6101 61022000-11-27 Nathan Sidwell <nathan@codesourcery.com> 6103 6104 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by 6105 bison parser ickiness. 6106 * pt.c (tsubst_friend_function): Enter namespace scope when 6107 tsubsting the function name. 6108 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality. 6109 61102000-11-27 Nathan Sidwell <nathan@codesourcery.com> 6111 6112 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo. 6113 * cvt.c (cp_convert_to_pointer): Add force parameter. 6114 Allow conversions via virtual base if forced. 6115 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer. 6116 (ocp_convert): Likewise. 6117 * search.c (binfo_from_vbase): Return the virtual base's binfo. 6118 * typeck.c (get_delta_difference): Adjust handling of virtual 6119 bases. 6120 61212000-11-26 Mark Mitchell <mark@codesourcery.com> 6122 6123 * tree.c (struct list_hash): Remove. 6124 (list_hash_table): Make it be an htab. 6125 (struct list_proxy): New type. 6126 (list_hash_eq): New function. 6127 (list_hash_pieces): Renamed from ... 6128 (list_hash): ... this. 6129 (list_hash_lookup): Remove. 6130 (list_hash_add): Remove. 6131 (hash_tree_cons): Use the generic hashtable. 6132 (mark_list_hash): Remove. 6133 (init_tree): Create the hashtable. 6134 61352000-11-25 Joseph S. Myers <jsm28@cam.ac.uk> 6136 6137 * method.c (build_mangled_C9x_name): Rename to 6138 build_mangled_C99_name. Change C9X references in comments to 6139 refer to C99. 6140 61412000-11-24 Nathan Sidwell <nathan@codesourcery.com> 6142 6143 * parse.y (unary_expr): Move VA_ARG from here ... 6144 (primary): ... to here. 6145 61462000-11-24 Nathan Sidwell <nathan@codesourcery.com> 6147 6148 * semantics.c (finish_id_expr): If type is error_mark, return 6149 error_mark. 6150 61512000-11-23 Nathan Sidwell <nathan@codesourcery.com> 6152 6153 * pt.c (lookup_template_class): Simplify loop exit constructs. 6154 Cope when there is no partial instantiation of a template 6155 template member. 6156 6157Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com> 6158 6159 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H). 6160 61612000-11-22 Mark Mitchell <mark@codesourcery.com> 6162 6163 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op' 6164 prefix. 6165 6166 * pt.c (do_decl_instantiate): Explicitly clone constructors and 6167 destructors that haven't already been cloned. 6168 61692000-11-20 Richard Henderson <rth@redhat.com> 6170 6171 * parse.y (yyparse_1): Rename the parser entry point. 6172 61732000-11-20 Alex Samuel <samuel@codesourcery.com> 6174 6175 * mangle.c (write_name): Use <unscoped-name> for names directly in 6176 function scope. 6177 (write_unscoped_name): Accept names directly in function scope. 6178 61792000-11-20 Nathan Sidwell <nathan@codesourcery.com> 6180 6181 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword. 6182 * parse.y (extdef): Add EXPORT reduction. 6183 * spew.c (yylex): Don't skip export here. 6184 61852000-11-19 Mark Mitchell <mark@codesourcery.com> 6186 6187 * decl.c (init_decl_processing): Correct name of pure virtual 6188 function under the new ABI. 6189 * rtti.c (throw_bad_cast): Likewise, for bad cast function. 6190 (throw_bad_typeid): Likewise for bad typeid function. 6191 61922000-11-18 Mark Mitchell <mark@codesourcery.com> 6193 6194 * decl.c (grokparms): Don't even function types of `void' type, 6195 either. 6196 * mangle.c (write_type): Don't crash when confronted with the 6197 error_mark_node. 6198 6199 * decl.c (grokparms): Don't create parameters of `void' type. 6200 62012000-11-17 Zack Weinberg <zack@wolery.stanford.edu> 6202 6203 * lex.c (mark_impl_file_chain): Delete. 6204 (init_parse): Remove call to ggc_add_string_root. No need to 6205 ggc_strdup a string constant. Do not add impl_file_chain to GC 6206 roots. 6207 (handle_pragma_implementation): No need to ggc_strdup main_filename. 6208 62092000-11-17 Nathan Sidwell <nathan@codesourcery.com> 6210 6211 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type. 6212 62132000-11-17 Nathan Sidwell <nathan@codesourcery.com> 6214 6215 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro. 6216 * decl.c (grokdeclarator): Don't reject void parms here. 6217 (require_complete_types_for_parms): Simplify, use 6218 complete_type_or_else. 6219 (grokparms): Remove bitrot. Remove funcdef parm. 6220 Deal with ellipsis parm lists here. 6221 * semantics.c (finish_parmlist): Don't append void_list_node 6222 here. Set PARMLIST_ELLIPSIS_P. 6223 62242000-11-17 Nathan Sidwell <nathan@codesourcery.com> 6225 6226 * typeck2.c (incomplete_type_error): Reorganise to avoid 6227 excessive diagnostics. 6228 62292000-11-16 Zack Weinberg <zack@wolery.stanford.edu> 6230 6231 * lex.c (struct impl_files, internal_filename): Constify a char *. 6232 62332000-11-16 Mark Mitchell <mark@codesourcery.com> 6234 6235 * mangle.c (write_special_name_constructor): Don't generate 6236 assembler junk when confronted with an old-style constructor. 6237 (write_special_name_destructor): Likewise. 6238 (mangle_decl_string): Do it here instead. 6239 62402000-11-16 Nathan Sidwell <nathan@codesourcery.com> 6241 6242 * call.c (op_error): Make error messages clearer. 6243 62442000-11-15 Mark Mitchell <mark@codesourcery.com> 6245 6246 * decl.c (wrapup_globals_for_namespace): Don't mark things 6247 TREE_ASM_WRITTEN when they're not. 6248 62492000-11-15 Jason Merrill <jason@redhat.com> 6250 6251 * typeck2.c (friendly_abort): Uncount the error before handing 6252 off to fancy_abort. 6253 62542000-11-15 Nathan Sidwell <nathan@codesourcery.com> 6255 6256 * typeck.c (lookup_anon_field): Cope with qv qualifiers. 6257 62582000-11-14 Mark Mitchell <mark@codesourcery.com> 6259 6260 * class.c (build_vtbl_initializer): Fix typo in comment. 6261 * typeck.c (expr_sizeof): Don't crash on errors. 6262 62632000-11-14 Jim Wilson <wilson@redhat.com> 6264 6265 * lang-specs.h: Add %2 after %(cc1_options). 6266 62672000-11-14 Richard Henderson <rth@redhat.com> 6268 6269 * typeck.c (c_sizeof): Be strict about casting result value 6270 back to c_size_type_node. 6271 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise. 6272 62732000-11-13 Joseph S. Myers <jsm28@cam.ac.uk> 6274 6275 * typeck.c (build_unary_op): Use boolean_increment from 6276 c-common.c, moving the relevant code there. 6277 62782000-11-11 Jason Merrill <jason@redhat.com> 6279 6280 * typeck.c (mark_addressable): Don't call put_var_into_stack. 6281 6282 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics 6283 in inlines. 6284 62852000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6286 6287 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy. 6288 * lex.c (copy_lang_decl): Likewise. 6289 62902000-11-09 Mark Mitchell <mark@codesourcery.com> 6291 6292 * dump.c (cp_dump_tree): Don't dump function bodies here. 6293 6294 * Make-lang.in (CXX_C_OBJS): Add c-dump.o. 6295 (dump.o): Update dependency list. 6296 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove. 6297 (flag_dump_translation_unit): Likewise. 6298 (CP_TYPE_QUALS): Adjust definition. 6299 (DECL_C_BIT_FIELD): Remove. 6300 (SET_DECL_C_BIT_FIELD): Likewise. 6301 (CLEAR_DECL_C_BIT_FIELD): Likewise. 6302 (add_maybe_template): Likewise. 6303 (strip_array_types): Likewise. 6304 (dump_node_to_file): Likewise. 6305 (cp_dump_tree): New function. 6306 * decl.c (init_decl_processing): Set lang_dump_tree. 6307 * decl2.c (flag_dump_translation_unit): Remove. 6308 * dump.c: Move most of it to ../c-dump.c. 6309 (cp_dump_tree): New function. 6310 * pt.c (add_maybe_template): Remove. 6311 * typeck.c (strip_array_types): Likewise. 6312 63132000-11-07 Eric Christopher <echristo@redhat.com> 6314 6315 * decl.c (init_decl_processing): Change definition of 6316 __wchar_t to wchar_t. Remove artificial declaration of 6317 wchar_t. 6318 * lex.c: Change instances of __wchar_t to wchar_t. 6319 63202000-11-09 Nathan Sidwell <nathan@codesourcery.com> 6321 6322 * lex.c (do_identifier): Don't lookup_name for operators. 6323 * parse.y (operator): Save looking_for_typename. 6324 (unoperator): Restore it. 6325 * spew.c (frob_opname): Use nth_token for lookahead. 6326 63272000-11-08 Nathan Sidwell <nathan@codesourcery.com> 6328 6329 * decl.c (grok_op_properties): Always use coerce_new_type and 6330 coerce_delete_type. 6331 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve 6332 exception specification. Tidy up. 6333 (coerce_delete_type): Preserve exception specification. Tidy up. 6334 63352000-11-07 Joseph S. Myers <jsm28@cam.ac.uk> 6336 6337 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c 6338 (push_binding_level), error.c (cp_tree_printer), pt.c 6339 (process_partial_specialization, tsubst_template_arg_vector), 6340 search.c (lookup_member): Use memset () instead of bzero (). 6341 63422000-11-07 Nathan Sidwell <nathan@codesourcery.com> 6343 6344 * decl.c (build_ptrmemfunc_type): Allow error_mark_node. 6345 63462000-11-05 Joseph S. Myers <jsm28@cam.ac.uk> 6347 6348 * Make-lang.in (c++.distdir): Remove. 6349 63502000-11-04 Mark Mitchell <mark@codesourcery.com> 6351 6352 * decl2.c (do_nonmember_using_decl): Allow `extern "C"' 6353 declarations from different namespaces to be combined. 6354 63552000-11-03 Zack Weinberg <zack@wolery.stanford.edu> 6356 6357 * decl.c: Include tm_p.h. 6358 63592000-11-03 Joseph S. Myers <jsm28@cam.ac.uk> 6360 6361 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp (). 6362 63632000-11-02 Joseph S. Myers <jsm28@cam.ac.uk> 6364 6365 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c 6366 (build_overload_value), repo.c (open_repo_file), xref.c 6367 (open_xref_file): Use strchr () and strrchr () instead of index () 6368 and rindex (). 6369 63702000-11-01 Bernd Schmidt <bernds@redhat.co.uk> 6371 6372 * call.c (build_over_call): Call fold on the CALL_EXPR. 6373 63742000-11-01 Gabriel Dos Reis <gdr@codesourcery.com> 6375 6376 * error.c (dump_template_decl): Separate template hearders with 6377 space not comma. 6378 63792000-10-31 Gabriel Dos Reis <gdr@codesourcery.com> 6380 6381 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace 6382 TS_* flags with corresponding TFF_*. Adjust prototypes of 6383 functions (which used to take a tree_string_flags) to take an int. 6384 6385 * cp-tree.h (enum tree_string_flags): Remove 6386 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, 6387 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS, 6388 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, 6389 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, 6390 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, 6391 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros. 6392 (type_as_string, decl_as_string, expr_as_string, 6393 context_as_string): Adjust prototype. 6394 6395 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER 6396 instead of TS_PLAIN. 6397 6398 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF 6399 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of 6400 plain `0'. 6401 64022000-10-30 Mark Mitchell <mark@codesourcery.com> 6403 6404 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro. 6405 (linkage_kind): New enumeration. 6406 (decl_linkage): New function. 6407 * decl2.c (comdat_linkage): Extend comment. 6408 * error.c (dump_function_decl): Print the arguments used to 6409 instantiate a template, even when not printing the type of the 6410 function. 6411 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P, 6412 not TREE_PUBLIC, to test for external linkage. 6413 * tree.c (decl_linkage): New function. 6414 64152000-10-28 Mark Mitchell <mark@codesourcery.com> 6416 6417 * pt.c (instantiate_decl): Always instantiate static data members 6418 initialized in-class. 6419 64202000-10-27 Zack Weinberg <zack@wolery.stanford.edu> 6421 6422 * Make-lang.in: Move all build rules here from Makefile.in, 6423 adapt to new context. Wrap all rules that change the current 6424 directory in parentheses. Expunge all references to $(P). 6425 When one command depends on another and they're run all at 6426 once, use && to separate them, not ;. Add OUTPUT_OPTION to 6427 all object-file generation rules. Delete obsolete variables. 6428 6429 * Makefile.in: Delete. 6430 * config-lang.in: Delete outputs= line. 6431 64322000-10-26 Gabriel Dos Reis <gdr@codesourcery.com> 6433 6434 * error.c (dump_function_decl): Print no space between 6435 `ptr-operator' the `type-specifier' of the return type. 6436 (dump_type_prefix): Make sure we put space at the appropriate 6437 place. 6438 64392000-10-23 Jason Merrill <jason@redhat.com> 6440 6441 * call.c (equal_functions): Also call decls_match for extern "C" fns. 6442 64432000-10-22 Jason Merrill <jason@redhat.com> 6444 6445 * call.c (build_conditional_expr): Use ocp_convert to force 6446 rvalue conversion. 6447 64482000-10-22 Mark Mitchell <mark@codesourcery.com> 6449 6450 * call.c (standard_conversion): Use RVALUE_CONVs for all 6451 expressions that satisfy lvalue_p, not just those that satisfy 6452 real_lvalue_p. 6453 6454 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially. 6455 6456 * typeck.c (c_sizeof): Return an expression of `size_t' type, 6457 not one with TYPE_IS_SIZETYPE set. 6458 (dubious_conversion_warnings): Remove special-case code. 6459 64602000-10-21 Geoffrey Keating <geoffk@cygnus.com> 6461 6462 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE. 6463 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE. 6464 (dump_type_prefix): Print vector-of-int as 'int vector'. 6465 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE. 6466 * tree.c (walk_tree): Handle VECTOR_TYPE. 6467 6468 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS. 6469 64702000-10-21 Jason Merrill <jason@redhat.com> 6471 6472 * parse.y (operator): Set got_object from got_scope. 6473 Set looking_for_typename. 6474 * decl.c (lookup_name_real): Clear val after setting from_obj. 6475 Reorganize diagnostic. 6476 64772000-10-20 Jason Merrill <jason@redhat.com> 6478 6479 * tree.c (walk_tree): Don't walk into default args. 6480 6481 * error.c (dump_expr): Use host_integerp. 6482 64832000-10-20 David Edelsohn <edelsohn@gnu.org> 6484 6485 * typeck2.c (abstract_virtuals_error): Use "because" instead of 6486 "since" in error message. 6487 6488Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 6489 6490 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE. 6491 64922000-10-20 Jeffrey Oldham <oldham@codesourcery.com> 6493 6494 * decl.c (revert_static_member_fn): Fixed typo. 6495 64962000-10-19 Mark Mitchell <mark@codesourcery.com> 6497 6498 * class.c (subobject_offset_fn): New type. 6499 (dfs_record_base_offsets): Remove. 6500 (record_base_offsets): Likewise. 6501 (dfs_search_base_offsets): Likewise. 6502 (record_subobject_offset): New function. 6503 (check_subobject_offset): Likewise. 6504 (walk_subobject_offsets): Likewise. 6505 (record_subobject_offsets): Likewise. 6506 (layout_conflict_p): Reimplement. 6507 (layout_nonempty_base_or_field): Correct handling of type 6508 conflicts during layout. 6509 (layout_empty_base): Likewise. 6510 (build_base_field): Adjust to handle new representation of empty 6511 base offset table. 6512 (build_base_fields): Likewise. 6513 (layout_virtual_bases): Likewise. 6514 (splay_tree_compare_integer_csts): New function. 6515 (layout_class_type): Use a splay_tree, rather than a varray, to 6516 represent the offsets of empty bases. 6517 6518 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL. 6519 * decl.c (select_decl): Don't return declarations that are 6520 DECL_ANTICIPATED. 6521 65222000-10-18 Mark Mitchell <mark@codesourcery.com> 6523 6524 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD. 6525 (fake_std_node): New macro. 6526 * decl.c (in_std): Rename to ... 6527 (in_fake_std): ... this. 6528 (flag_no_builtin): Remove. 6529 (flag_no_nonansi_builtin): Likewise. 6530 (walk_namespaces_r): Use fake_std_node. 6531 (push_namespace): Use std_identifier. 6532 (pop_namespace): Use in_fake_std. 6533 (lookup_name_real): Use fake_std_node. 6534 (init_decl_processing): When -fhonor-std, create the `std' 6535 namespace. Don't create a dummy fake_std_node in that case. 6536 Adjust call to c_common_nodes_and_builtins. Use std_identifier. 6537 (builtin_function): Put builtins whose names don't begin 6538 with `_' in the std namespace. 6539 * decl2.c (flag_no_builtin): Remove. 6540 (flag_no_nonansi_builtin): Likewise. 6541 (set_decl_namespace): Use fake_std_node. 6542 (validate_nonmember_using_decl): Likewise. 6543 (do_using_directive): Likewise. 6544 (handle_class_head): Likewise. 6545 * dump.c (dequeue_and_dump): Likewise. 6546 * except.c (init_exception_processing): Use std_identifier. 6547 * init.c (build_member_call): Use fake_std_node. 6548 * rtti.c (init_rtti_processing): Use std_identifier. 6549 65502000-10-17 Mark Mitchell <mark@codesourcery.com> 6551 6552 * cp-tree.h (back_end_hook): Remove declaration. 6553 * decl2.c (back_end_hook): Remove definition. 6554 6555 * dump.c (dequeue_and_dump): Dump TREE_USED. 6556 6557Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu> 6558 6559 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int). 6560 65612000-10-17 Joseph S. Myers <jsm28@cam.ac.uk> 6562 6563 * decl.c (WINT_TYPE): Define. 6564 (init_decl_processing): Create types unsigned_ptrdiff_type_node, 6565 c_size_type_node, signed_size_type_node and wint_type_node. 6566 65672000-10-17 Joseph S. Myers <jsm28@cam.ac.uk> 6568 6569 * decl2.c (warn_missing_format_attribute): New variable. 6570 (lang_decode_option): Decode -Wmissing-format-attribute. 6571 65722000-10-16 Mark Mitchell <mark@codesourcery.com> 6573 6574 * typeck.c (qualify_type): Remove. 6575 (composite_pointer_type): Fix handling of conversions to `cv void*'. 6576 65772000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6578 6579 * Makefile.in (parse.c, parse.h): Fix think-o in last patch. 6580 65812000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6582 6583 * Makefile.in (parse.c, parse.h): Create atomically. 6584 65852000-10-12 Mark Mitchell <mark@codesourcery.com> 6586 6587 * class.c (current_obstack): Remove. 6588 * decl.c (ggc_p): Remove. 6589 (start_decl): Don't use decl_tree_cons. 6590 (grokdeclarator): Don't use build_decl_list. 6591 (start_function): Don't use decl_tree_cons. 6592 (finish_function): Don't mess with obstacks. 6593 * decl2.c (grok_x_components): Don't use build_decl_list. 6594 * lex.c (make_call_declarator): Don't call decl_tree_cons. 6595 (implicitly_declare_fn): Don't call build_decl_list. 6596 * parse.y (frob_specs): Don't call build_decl_list or 6597 decl_tree_cons. 6598 (expr_or_declarator_intern): Don't call decl_tree_cons. 6599 (primary): Don't call build_decl_list. 6600 (fcast_or_absdcl): Likewise. 6601 (typed_declspecs): Don't call decl_tree_cons. 6602 (reserved_declspecs): Don't call build_decl_list. 6603 (declmods): Likewise. 6604 (reserved_typespecquals): Likewise. 6605 (aggr): Likewise. 6606 (new_type_id): Likewise. 6607 (cv_qualifiers): Likewise. 6608 (after_type_declarator_intern): Likewise. 6609 (notype_declarator_intern): Likewise. 6610 (absdcl_intern): Likewise. 6611 (named_parm): Likewise. 6612 * pt.c (most_specialized_class): Likewise. 6613 * repo.c (temporary_obstack): Make it a structure, not a pointer. 6614 (init_repo): Initialize it. 6615 * search.c (current_obstack): Remove. 6616 * typeck2.c (add_exception_specifier): Don't call build_decl_list. 6617 66182000-10-09 Richard Henderson <rth@cygnus.com> 6619 6620 * Make-lang.in (CXX_EXTRA_HEADERS): Remove. 6621 (c++ language support bits for libgcc): Remove. 6622 (c++.clean): Remove cplib2.txt cleanup. 6623 * config-lang.in (headers, lib2funcs): Remove. 6624 6625 * exception.cc, new.cc, new1.cc, new2.cc: Remove files. 6626 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files. 6627 * inc/cxxabi.h, inc/exception, inc/new: Remove files. 6628 * inc/new.h, inc/typeinfo: Remove files. 6629 66302000-10-08 Joseph S. Myers <jsm28@cam.ac.uk> 6631 6632 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already 6633 defined. 6634 (init_decl_processing): Initialize intmax_type_node and 6635 uintmax_type_node. 6636 66372000-10-06 Richard Henderson <rth@cygnus.com> 6638 6639 * cp-tree.h (struct cp_language_function): Remove x_result_rtx. 6640 (original_result_rtx): Remove. 6641 * decl.c (save_function_data): Don't clear x_result_rtx. 6642 (mark_lang_function): Don't mark it either. 6643 * expr.c (fixup_result_decl): Remove. 6644 * semantics.c (genrtl_named_return_value): Frob the return decl 6645 before calling emit_local_var. 6646 (genrtl_finish_function): Don't call fixup_result_decl. 6647 Always emit the jump to return_label. 6648 66492000-10-06 Nathan Sidwell <nathan@codesourcery.com> 6650 6651 * pt.c (lookup_template_class): Set current access for enum. 6652 (tsubst_enum): Set file & line for enum decl. 6653 6654 * spew.c (yylex): Remove unused variable. 6655 66562000-10-05 Richard Henderson <rth@cygnus.com> 6657 6658 * semantics.c (genrtl_finish_function): Don't init or check 6659 can_reach_end; remove noreturn and return value checks. 6660 66612000-10-05 Tom Tromey <tromey@cygnus.com> 6662 6663 * init.c (build_java_class_ref): Use `build_static_name' with a 6664 suffix, not a prefix, to build the class object's name. 6665 66662000-10-05 Nathan Sidwell <nathan@codesourcery.com> 6667 6668 * cp-tree.h (access_kind): Fix comment typo. 6669 * decl2.c (grokfield): Fix diagnostic typo. 6670 * semantics.c (finish_template_type): Fix comment typo. 6671 (finish_qualified_object_call_expr): Likewise. 6672 66732000-10-05 Nathan Sidwell <nathan@codesourcery.com> 6674 6675 * pt.c (tsubst_expr, DECL_STMT case): Don't process if 6676 tsubsting fails. 6677 66782000-10-05 Nathan Sidwell <nathan@codesourcery.com> 6679 6680 * spew.c (frob_id): New static function. 6681 (frob_opname): Use it. 6682 (yylex): Use it. 6683 66842000-10-01 Mark Mitchell <mark@codesourcery.com> 6685 6686 * decl.c (lang_mark_false_label_stack): Remove. 6687 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared. 6688 66892000-09-30 Joseph S. Myers <jsm28@cam.ac.uk> 6690 6691 * gxxint.texi: Use @email for formatting email addresses. 6692 66932000-09-29 Gabriel Dos Reis <gdr@codesourcery.com> 6694 6695 * error.c: Remove direct obstack manipulation. Replace with 6696 output_buffer-based formatting. Adjust calls to removed macros. 6697 (obstack_chunk_alloc, obstack_chunk_free): Remove. 6698 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP, 6699 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise. 6700 67012000-09-24 Mark Mitchell <mark@codesourcery.com> 6702 6703 * ir.texi: Move to ../c-tree.texi. 6704 67052000-09-20 Jason Merrill <jason@redhat.com> 6706 6707 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P. 6708 67092000-09-21 Andreas Jaeger <aj@suse.de> 6710 6711 * errfn.c: Move declaration of cp_printer and cp_printers to ... 6712 * cp-tree.h: ... here. 6713 6714 * error.c: Remove declaration of cp_printer. 6715 67162000-09-20 Mark Mitchell <mark@codesourcery.com> 6717 6718 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs. 6719 67202000-09-20 Hans-Peter Nilsson <hp@axis.com> 6721 6722 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and 6723 users. 6724 67252000-09-18 Mark Mitchell <mark@codesourcery.com> 6726 6727 * decl.c (start_function): Robustify. 6728 67292000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6730 6731 * cp-tree.h (check_function_format): Accept a `status' parameter. 6732 6733 * call.c, typeck.c: Updates calls to `check_function_format'. 6734 67352000-09-17 Geoffrey Keating <geoffk@cygnus.com> 6736 6737 * decl2.c (handle_class_head): Always push some scope even 6738 in the error case. 6739 67402000-09-16 Mark Mitchell <mark@codesourcery.com> 6741 6742 * cp-tree.h (struct cp_language_function): Remove 6743 x_scope_stmt_stack and name_declared. 6744 (current_scope_stmt_stack): Remove. 6745 (function_name_declared_p): New macro. 6746 (struct lang_decl_flags): Use c_lang_decl as a base class. 6747 (context): Remove. 6748 (struct lang_decl): Replace saved_tree with context. 6749 (DECL_FRIEND_CONTEXT): Adjust accordingly. 6750 (SET_DECL_FRIEND_CONTEXT): Likewise. 6751 (DECL_VIRTUAL_CONTEXT): Likewise. 6752 (DECL_SAVED_TREE): Remove. 6753 (C_DECLARED_LABEL_FLAG): Likewise. 6754 (cplus_expand_expr_stmt): Don't declare. 6755 (add_decl_stmt): Likewise. 6756 (add_scope_stmt): Likewise. 6757 * decl.c (mark_stmt_tree): Remove. 6758 (case_compare): Likewise. 6759 (finish_case_label): Use c_add_case_label. 6760 (init_decl_processing): Set more language-specific hooks. 6761 (build_enumerator): Fix typo in comment. 6762 (cplus_expand_expr_stmt): Remove. 6763 (mark_lang_function): Use mark_c_language_function. 6764 (lang_mark_tree): Use c_mark_lang_decl. 6765 * decl2.c: Change order of inclusion. 6766 * except.c: Likewise. 6767 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall 6768 back on c_expand_expr. 6769 * friend.c: Include expr.h. 6770 * init.c: Change order of inclusion. 6771 * Makefile.in: Update dependencies. 6772 * lex.h (free_lang_decl_chain): Remove. 6773 * optimize.c (maybe_clone_body): Use function_name_declared_p. 6774 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if 6775 it doesn't exist. 6776 (instantiate_decl): Use function_name_declared_p. 6777 * semantics.c (lang_expand_expr_stmt): Remove. 6778 (set_current_function_name_declared): Likewise. 6779 (current_function_name_declared): Likewise. 6780 (begin_compound_stmt): Use function_name_declared_p. 6781 (add_decl_stmt): Remove. 6782 (setup_vtbl_ptr): Use function_name_declared_p. 6783 (add_scope_stmt): Remove. 6784 (current_scope_stmt_stack): New function. 6785 (cp_expand_stmt): Don't handle SCOPE_STMTs. 6786 (expand_body): Use function_name_declared_p. 6787 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT. 6788 * typeck.c: Change order of includes. 6789 (convert_sequence): Remove. 6790 67912000-09-14 Joseph S. Myers <jsm28@cam.ac.uk> 6792 6793 * lex.c (reswords): Add _Complex. 6794 6795Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 6796 6797 * Make-lang.in (cplib2.txt): Depend on cp/Makefile. 6798 67992000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca> 6800 6801 * init.c (begin_init_stmts): Don't use // comments. 6802 68032000-09-12 Jason Merrill <jason@redhat.com> 6804 6805 * decl.c (maybe_deduce_size_from_array_init): Set do_default for 6806 all non-extern arrays. 6807 6808 * decl.c (grokdeclarator): Complain about 'friend T' for implicit 6809 typenames, too. Downgrade complaint to pedwarn. 6810 (xref_tag): Warn about surprising behavior of 'friend struct T'. 6811 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for 6812 'class This::Inherited'. 6813 68142000-09-12 Mark Mitchell <mark@codesourcery.com> 6815 6816 * decl.c (finish_case_label): Given the LABEL_DECL a 6817 DECL_CONTEXT. 6818 68192000-09-12 Gabriel Dos Reis <gdr@codesourcery.com> 6820 6821 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, 6822 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF, 6823 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, 6824 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, 6825 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE): 6826 New macros. 6827 (sorry_for_unsupported_tree, print_scope_operator, 6828 print_left_paren, print_right_paren, print_left_bracket, 6829 print_right_bracket, print_whitespace): Likewise. 6830 (aggr_variety): Rename to class_key_or_enum. 6831 (print_type): Rename to print_type_id. 6832 (print_type_specifier_seq, print_simple_type_specifier, 6833 print_elaborated_type_specifier, 6834 print_rest_of_abstract_declarator, 6835 print_parameter_declaration_clause, print_exception_specification, 6836 print_nested_name_specifier, print_template_id, 6837 typedef_original_name, print_template_argument_list_start, 6838 print_template_argument_list_end): New functions. 6839 68402000-09-11 Gabriel Dos Reis <gdr@codesourcery.com> 6841 6842 * ir.texi: Add more documentation. 6843 68442000-09-11 Mark Mitchell <mark@codesourcery.com> 6845 6846 * cp-tree.h (struct saved_scope): Remove x_function_parms. 6847 (current_function_parms): Don't define. 6848 (struct cp_language_function): Remove parms_stored. 6849 (current_function_just_assigned_this): Don't define. 6850 (current_function_parms_stored): Likewise. 6851 (static_ctors): Declare. 6852 (static_dtors): Likewise. 6853 (SF_EXPAND): Don't define. 6854 (expand_start_early_try_stmts): Remove declaration. 6855 (store_parm_decls): Likewise. 6856 * decl.c (static_ctors): Don't declare. 6857 (static_dtors): Likewise. 6858 (struct binding_level): Remove this_block. 6859 (poplevel): Remove dead code. 6860 (set_block): Likewise. 6861 (mark_binding_level): Don't mark this_block. 6862 (mark_saved_scope): Don't mark x_function_parms. 6863 (init_decl_processing): Don't add current_function_parms as a GC 6864 root. 6865 (check_function_type): Change prototype. 6866 (start_function): Remove RTL-generation code. 6867 (expand_start_early_try_stmts): Remove. 6868 (store_parm_decls): Give it internal linkage. Remove 6869 RTL-generation code. 6870 (finish_function): Remove RTL-generation code. 6871 * decl2.c (static_ctors): Fix formatting. 6872 (static_dtors): Likewise. 6873 * method.c (use_thunk): Don't call store_parm_decls. 6874 (synthesize_method): Likewise. 6875 * optimize.c (maybe_clone_body): Likewise. 6876 * parse.y (fn.def2): Likewise. 6877 (.set_base_init): Likewise. 6878 (nodecls): Likewise. 6879 * pt.c (instantiate_decl): Likewise. 6880 * rtti.c (synthesize_tinfo_fn): Likewise. 6881 * semantics.c (genrtl_try_block): Simplify. 6882 (expand_body): Use genrtl_start_function and 6883 genrtl_finish_function. 6884 (genrtl_start_function): New function. 6885 (genrtl_finish_function): Likewise. 6886 68872000-09-11 Nathan Sidwell <nathan@codesourcery.com> 6888 6889 * error.c (cp_tree_printer, case 'P'): Append break. 6890 68912000-09-11 Nathan Sidwell <nathan@codesourcery.com> 6892 6893 * cp-tree.h (frob_opname): Declare. 6894 * parse.y (saved_scopes): New static variable. 6895 (cp_parse_init): Adjust. 6896 (do_id): If lastiddecl is NULL, do do_identifier. 6897 (operator): Save scope information. 6898 (unoperator): New reduction. Restore scope information. 6899 (operator_name): Append unoperator. Call frob_opname. 6900 * spew.c (frob_opname): Define. 6901 69022000-09-10 Zack Weinberg <zack@wolery.cumb.org> 6903 6904 * decl.c, rtti.c: Include defaults.h if not already included. 6905 Don't define the *_TYPE_SIZE macros. 6906 69072000-09-09 Mark Mitchell <mark@codesourcery.com> 6908 6909 * cp-tree.h (push_switch): Change prototype. 6910 (check_cp_case_value): Remove declaration. 6911 (decl_constant_value): Likewise. 6912 * decl.c (struct cp_switch): Add switch_stmt and cases. 6913 (case_compare): New function. 6914 (push_switch): Set switch_stmt. Initialize cases. 6915 (pop_switch): Clean up cases. 6916 (define_case_label): Rename to ... 6917 (finish_case_label): ... this. Do semantic analysis for case 6918 labels here. 6919 (start_function): Correct comment. 6920 * decl2.c (check_cp_case_value): Remove. 6921 * expr.c (do_case): Remove. 6922 * pt.c (tsubst_expr): Adjust call to finish_case_label. 6923 * semantics.c (genrtl_do_poplevel): Remove declaration. 6924 (RECHAIN_STMTS): Remove. 6925 (finish_break_stmt): Use build_break_stmt. 6926 (finish_continue_stmt): Use build_continue_stmt. 6927 (finish_switch_cond): Adjust condition here, rater than in 6928 c_expand_start_case. 6929 (finish_case_label): Remove. 6930 * typeck.c (c_expand_return): Remove. 6931 (c_expand_start_case): Likewise. 6932 69332000-09-07 Gabriel Dos Reis <gdr@codesourcery.com> 6934 6935 * ir.texi: Document type nodes. 6936 69372000-09-06 Mark Mitchell <mark@codesourcery.com> 6938 6939 * cp-tree.h (init_cp_semantics): Declare. 6940 (genrtl_try_block): Don't declare. 6941 (genrtl_handler): Likewise. 6942 (genrtl_catch_block): Likewise. 6943 (genrtl_ctor_stmt): Likewise. 6944 (genrtl_subobject): Likewise. 6945 (genrtl_do_poplevel): Likewise. 6946 (genrtl_named_return_value): Likewise. 6947 * lex.c (init_parse): Call init_cp_semantics. 6948 * semantics.c (genrtl_try_block): Give it internal linkage. 6949 (genrtl_handler): Likewise. 6950 (genrtl_catch_block): Likewise. 6951 (genrtl_ctor_stmt): Likewise. 6952 (genrtl_subobject): Likewise. 6953 (genrtl_do_poplevel): Likewise. 6954 (genrtl_named_return_value): Likewise. 6955 (lang_expand_stmt): Rename to ... 6956 (cp_expand_stmt): ... this. Only handle C++-specific nodes. 6957 (init_cp_semantics): Define. 6958 6959 * decl.c (initialize_local_var): Remove RTL-generating code. 6960 * semantics.c (genrtl_try_block): Fix formatting. 6961 6962 Move statement-tree facilities from C++ to C front-end. 6963 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO. 6964 (void_zero_node): Remove. 6965 (stmt_tree): Likewise. 6966 (scope_chain): Adjust. 6967 (language_function): Rename to cp_language_function. 6968 (cp_function_chain): Adjust. 6969 (current_stmt_tree): Remove. 6970 (last_tree): Likewise. 6971 (last_expr_type): Likewise. 6972 (struct lang_decl): Adjust. 6973 (STMT_IS_FULL_EXPR_P): Remove. 6974 (add_tree): Remove. 6975 (begin_stmt_tree): Likewise. 6976 (finish_stmt_tree): Likewise. 6977 (walk_tree_fn): Likewise. 6978 (walk_stmt_tree): Likewise. 6979 * class.c (finish_struct): Replace use of add_tree with add_stmt. 6980 * decl.c (mark_stmt_tree): Adjust type. 6981 (init_decl_processing): Don't build void_zero_node. 6982 (initialize_local_var): Adjust usage of current_stmt_tree. 6983 (finish_enum): Use add_stmt, not add_tree. 6984 (save_function_data): Adjust use of language_function. 6985 (finish_constructor_body): Use add_stmt, not add_tree. 6986 (finish_destructor_body): Likewise. 6987 (push_cp_function_context): Adjust use of language_function. 6988 (pop_cp_function_context): Likewise. 6989 (mark_lang_function): Likewise. 6990 (mark_cp_function_context): Likewise. 6991 * init.c (build_aggr_init): Adjust use of current_stmt_tree. 6992 (build_vec_init): Likewise. 6993 * semantics.c (SET_LAST_STMT): Remove. 6994 (RECHAIN_STMTS): Don't use it. 6995 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree. 6996 (current_stmt_tree): Define. 6997 (add_tree): Remove. 6998 (finish_goto_stmt): Use add_stmt, not add_tree. 6999 (finish_expr_stmt): Likewise. 7000 (begin_if_stmt): Likewise. 7001 (finish_then_clause): Likewise. 7002 (begin_while_stmt): Likewise. 7003 (begin_do_stmt): Likewise. 7004 (finish_return_stmt): Likewise. 7005 (begin_for_stmt): Likewise. 7006 (finish_break_stmt): Likewise. 7007 (finish_continue_stmt): Likewise. 7008 (begin_switch_stmt): Likewise. 7009 (finish_case_label): Likewise. 7010 (begin_try_block): Likewise. 7011 (begin_function_try_block): Likewise. 7012 (begin_handler): Likewise. 7013 (begin_catch_block): Likewise. 7014 (begin_compound_stmt): Likewise. 7015 (begin_asm_stmt): Likewise. 7016 (finish_asm_stmt): Likewise. 7017 (finish_label_stmt): Likewise. 7018 (add_decl_stmt): Likewise. 7019 (finish_subobject): Likewise. 7020 (finish_decl_cleanup): Likewise. 7021 (finish_named_return_value): Likewise. 7022 (setup_vtbl_ptr): Likewise. 7023 (add_scope_stmt): Likewise. 7024 (finish_stmt_expr): Likewise. 7025 (prune_unused_decls): Remove. 7026 (begin_stmt_tree): Likewise. 7027 (finish_stmt_tree): Likewise. 7028 (prep_stmt): Adjust use of current_stmt_tree. 7029 (lang_expand_stmt): Likewise. 7030 * tree.c (statement_code_p): Remove. 7031 (cp_statement_code_p): New function. 7032 (walk_stmt_tree): Remove. 7033 (init_tree): Set lang_statement_code_p. 7034 70352000-09-06 Zack Weinberg <zack@wolery.cumb.org> 7036 7037 Integrated preprocessor. 7038 7039 * Make-lang.in, Makefile.in: Remove all references to input.c, 7040 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS. 7041 * gxx.gperf, hash.h, input.c: Delete. 7042 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is 7043 initialized properly. 7044 7045 * class.c (fixup_pending_inline): Take a tree, not a 7046 struct pending_inline *. All callers changed. 7047 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE, 7048 RID_PROTECTED entries in ridpointers[] array here. 7049 * decl.c (duplicate_decls): Do not refer to struct 7050 pending_inline. 7051 (record_builtin_type, init_decl_processing): Use RID_MAX not 7052 CP_RID_MAX. 7053 (grokdeclarator): Use C_IS_RESERVED_WORD. 7054 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of 7055 cpplib. 7056 (grok_x_components): Do not inspect pending_inlines chain. 7057 7058 * cp-tree.h (struct lang_identifier): Add rid_code entry. 7059 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New. 7060 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare. 7061 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME, 7062 TIME_IDENTIFIER_FILEINFO): Kill. 7063 Update prototypes. 7064 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a 7065 single 32-bit word. 7066 * parse.y: Call do_pending_inlines unconditionally. 7067 reinit_parse_for_method is now snarf_method. fn.defpen is no 7068 longer necessary. Remove unnecessary <itype> annotation on 7069 SCOPE. Do not refer to end_of_file or struct pending_inline. 7070 * semantics.c (begin_inline_definitions): Call 7071 do_pending_inlines unconditionally. 7072 7073 * lex.c: Remove all code now shared with C front end. 7074 Initialize cpplib properly if USE_CPPLIB. Put reserved words 7075 into the get_identifier table. Rewrite pragma handling to 7076 work with the registry. Move code to save tokens for later 7077 processing to spew.c. 7078 7079 * spew.c: Rewrite everything in terms of token streams instead 7080 of text. Move routines here from lex.c / input.c as 7081 appropriate. GC-mark trees hanging off the pending inlines 7082 chain. 7083 70842000-09-06 Mark Mitchell <mark@codesourcery.com> 7085 7086 * NEWS: Mention that the named return value extension has been 7087 deprecated. 7088 * cp-tree.h (original_result_rtx): Define. 7089 (TREE_REFERENCE_EXPR): Remove. 7090 (DECL_VPARENT): Likewise. 7091 (pushdecl_nonclass_level): Likewise. 7092 (store_return_init): Likewise. 7093 (reinit_lang_specific): Likewise. 7094 (genrtl_named_return_value): Change prototype. 7095 * decl.c (original_result_rtx): Remove. 7096 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs. 7097 Do not generate RTL for local variables here. 7098 (store_return_init): Remove. 7099 * semantics.c (genrtl_named_return_value): Simplify. Fold in 7100 store_return_init. 7101 (finish_named_return_value): Adjust accordingly. Warn that this 7102 extension is deprecated. 7103 (lang_expand_stmt): Adjust call to genrtl_named_return_value. 7104 71052000-09-06 Nathan Sidwell <nathan@codesourcery.com> 7106 7107 * pt.c (type_unification_real): Replace switch with if. 7108 (unify): Tsubst non-type parms before comparing. 7109 71102000-09-06 Nathan Sidwell <nathan@codesourcery.com> 7111 7112 * error.c (dump_typename): New function, broken out of ... 7113 (dump_type): ... here. Use it. 7114 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE. 7115 71162000-09-06 Nathan Sidwell <nathan@codesourcery.com> 7117 7118 * init.c (build_offset_ref): Deal with namespace scoped 7119 TEMPLATE_ID_EXPRs. 7120 71212000-09-06 Nathan Sidwell <nathan@codesourcery.com> 7122 7123 * class.c (resolve_address_of_overloaded_function): Add 7124 explanation message. 7125 * decl.c (define_case_label): Reformat explanation. 7126 * decl2.c (finish_static_data_member_decl): Likewise. 7127 (grokfield): Likewise. 7128 * friend.c (do_friend): Likewise. 7129 71302000-09-05 Zack Weinberg <zack@wolery.cumb.org> 7131 7132 * tree.c (walk_tree): Expose tail recursion. 7133 (walk_stmt_tree): New function. 7134 * cp-tree.h: Prototype walk_stmt_tree. 7135 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not 7136 the BLOCKs directly. If a BLOCK has no variables after 7137 pruning, discard it. 7138 (finish_stmt_tree): Use walk_stmt_tree. No need to save and 7139 restore the line number. 7140 71412000-09-05 Mark Mitchell <mark@codesourcery.com> 7142 7143 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H. 7144 (pt.o): Remove dependency on HTAB_H. 7145 * cp-tree.h: Include hashtab.h. 7146 (walk_tree): Change prototype. 7147 (walk_tree_without_duplicates): New function. 7148 * decl.c (check_default_argument): Use it. 7149 * optimize.c (remap_decl): Adjust calls to walk_tree. 7150 (copy_body): Likewise. 7151 (expand_calls_inline): Likewise. 7152 (calls_setjmp_p): Use walk_tree_without_duplicates. 7153 * pt.c: Don't include hashtab.h. 7154 (for_each_template_parm): Use walk_tree_without_duplicates. 7155 * semantics.c (finish-stmt_tree): Likewise. 7156 (expand_body): Likewise. 7157 * tree.c (walk_tree): Add additional parameter. 7158 (walk_tree_without_duplicates): New function. 7159 (count_trees): Use it. 7160 (verify_stmt_tree): Adjust call to walk_tree. 7161 (find_tree): Use walk_tree_without_duplicates. 7162 (no_linkage_check): Likewise. 7163 (break_out_target_exprs): Adjust call to walk_tree. 7164 (cp_unsave): Likewise. 7165 71662000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 7167 7168 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code. 7169 (TEMPLATE_TEMPLATE_PARM): Adjust comment. 7170 * cp-tree.h (TYPE_BINFO): Adjust comment. 7171 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise. 7172 (TEMPLATE_TYPE_PARM_INDEX): Likewise. 7173 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead. 7174 (TYPE_TEMPLATE_INFO): Likewise. 7175 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise. 7176 * class.c (push_nested_class): Likewise. 7177 * decl.c (lookup_name_real): Likewise. 7178 (grokdeclarator): Likewise. 7179 (grok_op_properties): Likewise. 7180 (xref_tag): Likewise. 7181 (xref_basetypes): Likewise. 7182 * decl2.c (constructor_name_full): Likewise. 7183 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case. 7184 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead. 7185 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case. 7186 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM. 7187 (dump_type_suffix): Likewise. 7188 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM 7189 instead. 7190 (get_aggr_from_typedef): Likewise. 7191 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case. 7192 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM. 7193 (write_template_parm): Likewise. 7194 (write_template_template_parm): Check tree code instead of 7195 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. 7196 * method.c (build_overload_nested_name): Add 7197 BOUND_TEMPLATE_TEMPLATE_PARM. 7198 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case. 7199 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM. 7200 * pt.c (convert_template_argument): Check tree code instead of 7201 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. 7202 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case. 7203 (for_each_template_parm): Adjust comment. 7204 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. 7205 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM. 7206 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use 7207 template_args_equal to compare template template parameter cases. 7208 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM. 7209 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM 7210 instead. 7211 * tree.c (copy_template_template_parm): Decide whether to create 7212 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node. 7213 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM. 7214 (copy_tree_r): Likewise. 7215 * typeck.c (comptypes): Likewise. Check tree code instead of 7216 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. 7217 72182000-09-04 Mark Elbrecht <snowball3@bigfoot.com> 7219 7220 * decl.c (finish_function): Move the code for handling functions 7221 marked with the constructor and destructor attributes inside the 7222 expand_p block. 7223 72242000-09-04 Nathan Sidwell <nathan@codesourcery.com> 7225 7226 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR. 7227 72282000-09-04 Nathan Sidwell <nathan@codesourcery.com> 7229 7230 * pt.c (lookup_template_class): Remove abort. 7231 * tree.c (get_type_decl): Allow error_mark_node. 7232 72332000-09-04 Nathan Sidwell <nathan@codesourcery.com> 7234 7235 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside 7236 TEMPLATE_ID_EXPRs. 7237 72382000-09-03 Mark Mitchell <mark@codesourcery.com> 7239 7240 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change 7241 new ABI mangling. 7242 72432000-09-01 Nathan Sidwell <nathan@codesourcery.com> 7244 7245 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify 7246 union tag mismatch error reporting. 7247 72482000-09-01 Nathan Sidwell <nathan@codesourcery.com> 7249 7250 * call.c (build_scoped_method_call): Check it is not a namespace. 7251 72522000-08-30 Jason Merrill <jason@redhat.com> 7253 7254 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context. 7255 7256 * tree.c (bot_manip): Check TREE_CONSTANT rather than 7257 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and 7258 build_target_expr_with_type for the non-AGGR_INIT_EXPR case. 7259 7260 * decl.c (start_function): Always call make_function_rtl. 7261 72622000-08-29 Zack Weinberg <zack@wolery.cumb.org> 7263 7264 * semantics.c (prune_unused_decls): New function. 7265 (finish_stmt_tree): Call it via walk_tree. 7266 72672000-08-29 Zack Weinberg <zack@wolery.cumb.org> 7268 7269 * class.c (build_secondary_vtable): Constify a char *. 7270 * decl.c (init_decl_processing): Initialize function_id_node, 7271 pretty_function_id_node, and func_id_node. 7272 * input.c (struct input_source): Constify 'str'. 7273 (feed_input): Constify first argument. 7274 * mangle.c (write_identifier): Constify argument. 7275 * pt.c (mangle_class_name_for_template): Constify argument. 7276 72772000-08-29 Mark Mitchell <mark@codesourcery.com> 7278 7279 * typeck.c (mark_addressable): Remove code that pokes around in 7280 RTL. 7281 72822000-08-28 Jason Merrill <jason@redhat.com> 7283 7284 * lex.c (file_name_nondirectory): Move to toplev.c. 7285 7286 * cp-tree.h (LOCAL_CLASS_P): New macro. 7287 * class.c (finish_struct_1): Use it. 7288 72892000-08-27 Alex Samuel <samuel@codesourcery.com> 7290 7291 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo. 7292 (write_encoding): Pass another argument to write_name. 7293 (write_name): Add ignore_local_scope parameter. Fix handling of 7294 local names. 7295 (write_nested_name): Use write_unqualified_name. 7296 (write_prefix): Likewise. Skip out on FUNCTION_DECLs. 7297 (write_template_prefix): Use write_unqualified_name. 7298 (write_component): Remove. 7299 (write_local_name): Add parameter. Use direct local entity to 7300 discriminator calculation. 7301 (write_class_enum_type): Pass another argument to write_name. 7302 (write_template_template_arg): Likewise. 7303 (make_guard_variable): Likewise. 7304 73052000-08-27 Jason Merrill <jason@redhat.com> 7306 7307 * decl.c (pushdecl): Matching decls for local externs are found in 7308 the current level. Propagate linkage information from previous 7309 declarations. 7310 73112000-08-26 Gabriel Dos Reis <gdr@codesourcery.com> 7312 7313 * ir.texi (Expressions): Fix typo. 7314 73152000-08-25 Greg McGary <greg@mcgary.org> 7316 7317 * tree.c (init_tree): Use ARRAY_SIZE. 7318 73192000-08-25 Gabriel Dos Reis <gdr@codesourcery.com> 7320 7321 * error.c (cp_tree_printer): Rework. 7322 73232000-08-25 Mark Mitchell <mark@codesourcery.com> 7324 7325 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and 7326 dyn-string.o. 7327 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c. 7328 (cp-demangle.o): Remove target. 7329 (dyn-string.o): Likewise. 7330 7331 * decl.c (grokfndecl): Require that `main' return an `int'. 7332 * mangle.c (write_encoding): Don't mangle return types for 7333 conversion functions. 7334 73352000-08-25 Gabriel Dos Reis <gdr@codesourcery.com> 7336 7337 * error.c (tree_formatting_info): New data type. 7338 (tree_being_formatted): New macro. 7339 (tree_formatting_flags): Likewise. 7340 (put_whitespace): Likewise. 7341 (print_tree_identifier): Likewise. 7342 (print_identifier): Likewise. 7343 (cp_tree_printer, print_function_argument_list, print_declaration, 7344 print_expression, print_function_declaration, 7345 print_function_parameter, print_type, print_cv_qualifier): New 7346 functions. 7347 (init_error): Initialize lang_printer. 7348 73492000-08-24 Jason Merrill <jason@redhat.com> 7350 7351 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no 7352 adjustment necessary. 7353 73542000-08-24 Greg McGary <greg@mcgary.org> 7355 7356 * cp-tree.h (MAIN_NAME_P): Remove macro. 7357 73582000-08-24 Gabriel Dos Reis <gdr@codesourcery.com> 7359 7360 * error.c (print_instantiation_context): Don't forget to flush the 7361 buffer. 7362 73632000-08-23 Jason Merrill <jason@redhat.com> 7364 7365 * typeck.c (build_ptrmemfunc): Save the input pmf. 7366 7367 * method.c (process_modifiers): Use same_type_p. 7368 73692000-08-23 Mark Mitchell <mark@codesourcery.com> 7370 7371 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC. 7372 * mangle.c (write_function_type): Change prototype. 7373 (write_encoding): Don't mangle return types for 7374 constructors or destructors. 7375 (write_type): Adjust call to write_function_type. 7376 * pt.c (instantiate_template): Instantiate alternate entry points 7377 when instantiating the main function. 7378 73792000-08-23 Gabriel Dos Reis <gdr@codesourcery.com> 7380 7381 * error.c (cp_print_error_function): Don't use embedded '\n' in 7382 output_printf. 7383 73842000-08-23 Gabriel Dos Reis <gdr@codesourcery.com> 7385 7386 * decl.c (init_decl_processing): Remove bogus initialization. 7387 * error.c (lang_print_error_function): Restore here. 7388 (init_error): Initialize print_error_function. 7389 73902000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 7391 7392 * decl2.c (arg_assoc): Revert my 2000-08-11 change. 7393 73942000-08-22 Gabriel Dos Reis <gdr@codesourcery.com> 7395 7396 * Makefile.in (error.o): Depends on diagnostic.h 7397 7398 * cp-tree.h (problematic_instantiation_changed, 7399 record_last_problematic_instantiation, current_instantiation, 7400 print_instantiation_context): Declare. 7401 (maybe_print_template_context): Remove. 7402 7403 * decl.c (init_decl_processing): Set print_error_function to NULL. 7404 (lang_print_error_function): Remove, since we're using a new 7405 machinery. 7406 7407 * error.c: #include diagnostic.h 7408 (function_category): New function. 7409 (cp_diagnostic_starter): Likewise. 7410 (cp_diagnostic_finalizer): Likewise. 7411 (cp_print_error_function): Likewise. 7412 (maybe_print_instantiation_context): Likewise. 7413 (print_instantiation_full_context): Likewise. 7414 (print_instantiation_partial_context): Likewise. 7415 (print_instantiation_context): Define. 7416 (init_error): Initialize diagnostic pager and finalizer. 7417 7418 * pt.c (problematic_instantiation_changed): Define. 7419 (record_last_problematic_instantiation): Likewise. 7420 (current_instantiation): Likewise. 7421 (maybe_print_template_context): Remove. 7422 (print_template_context): Likewise. 7423 (current_tinst_level): Make static to reflect Brendan Kehoe's 7424 change of 1995-04-13. 7425 (push_tinst_level): Call print_instantiation_context. 7426 74272000-08-21 Nix <nix@esperi.demon.co.uk> 7428 7429 * lang-specs.h: Do not process -o or run the assembler if 7430 -fsyntax-only. 7431 74322000-08-21 Joseph S. Myers <jsm28@cam.ac.uk> 7433 7434 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New 7435 variables. 7436 * decl2.c (lang_decode_option): Disable gettext attributes for 7437 -ansi. 7438 74392000-08-21 Gabriel Dos Reis <gdr@codesourcery.com> 7440 7441 * lex.c (lang_init_options): Default diagnostic message maximum 7442 length to 80, when line-wrapping. 7443 74442000-08-20 Mark Mitchell <mark@codesourcery.com> 7445 7446 * class.c (build_vtbl_initializer): Clear the entire 7447 vtbl_init_data. Start keeping track of the functions for which we 7448 have created vcall offsets here. 7449 (dfs_build_vcall_offset_vtbl_entries): Remove. 7450 (build_vcall_offset_vtbl_entries): Reimplement. 7451 (add_vcall_offset_vtbl_entries_r): New function. 7452 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for 7453 computing when vcall offsets are necessary. 7454 74552000-08-18 Nathan Sidwell <nathan@codesourcery.com> 7456 7457 * decl.c (member_function_or_else): Use cp_error ... %T. 7458 (grokdeclarator): Likewise. 7459 (start_method): Likewise. 7460 * friend.c (make_friend_class): Use cp_pedwarn ... %T. 7461 74622000-08-18 Nathan Sidwell <nathan@codesourcery.com> 7463 7464 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class 7465 TYPE_DECLs. 7466 74672000-08-18 Nathan Sidwell <nathan@codesourcery.com> 7468 7469 * cp-tree.h (PTRMEM_OK_P): New macro. 7470 (itf_ptrmem_ok): New enumeration value. 7471 * class.c (resolve_address_of_overloaded_function): Add PTRMEM 7472 argument. Diagnose implicit pointer to member. 7473 (instantiate_type): Don't diagnose implicit pointer to member 7474 here. Pass itf_ptrmem_ok if ok. Adjust calls to 7475 resolve_address_of_overloaded_function. 7476 * init.c (build_offset_ref): Set PTRMEM_OK_P. 7477 (resolve_offset_ref): Don't diagnose implicit pointer to member here. 7478 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here. 7479 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P. 7480 (build_unary_op): Deal with single non-static member in 7481 microsoft-land. 7482 74832000-08-18 Nathan Sidwell <nathan@codesourcery.com> 7484 7485 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE. 7486 74872000-08-18 Nathan Sidwell <nathan@codesourcery.com> 7488 7489 * cp-tree.h (enum_name_string): Remove prototype. 7490 (report_case_error): Remove prototype. 7491 * cp/typeck2.c (enum_name_string): Remove. 7492 (report_case_error): Remove. 7493 * error.c (dump_expr): Deal with enum values directly. 7494 Correctly negate integer constant. 7495 74962000-08-17 Nathan Sidwell <nathan@codesourcery.com> 7497 7498 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare. 7499 (__cxa_vec_delete2, __cxa_vec_delete3): Declare. 7500 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement. 7501 (__cxa_vec_delete2, __cxa_vec_delete3): Implement. 7502 (__cxa_vec_new): Use __cxa_vec_new2. 7503 (__cxa_vec_delete): Use __cxa_vec_delete2. 7504 75052000-08-17 Nathan Sidwell <nathan@codesourcery.com> 7506 7507 * vec.cc (__cxa_vec_new): Set "C" linkage. 7508 (__cxa_vec_ctor): Likewise. 7509 (__cxa_vec_cctor): Likewise. 7510 (__cxa_vec_dtor): Likewise. 7511 (__cxa_vec_delete): Likewise. 7512 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage. 7513 (__cxa_vec_ctor): Likewise. 7514 (__cxa_vec_cctor): Likewise. 7515 (__cxa_vec_dtor): Likewise. 7516 (__cxa_vec_delete): Likewise. 7517 75182000-08-17 Nathan Sidwell <nathan@codesourcery.com> 7519 7520 * class.c (instantiate_type): Reinstate local variable 7521 deleted in previous change. 7522 7523 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not 7524 itf_no_attributes. 7525 75262000-08-17 Nathan Sidwell <nathan@codesourcery.com> 7527 7528 * cp-tree.h (instantiate_type_flags): New enumeration. 7529 (instantiate_type): Change parameter. 7530 * class.c (instantiate_type): Adjust prototype. Adjust. 7531 * call.c (standard_conversion): Adjust instantiate_type call. 7532 (reference_binding): Likewise. 7533 (build_op_delete_call): Likewise. 7534 (convert_like_real): Likewise. 7535 * cvt.c (cp_convert_to_pointer): Likewise. 7536 (convert_to_reference): Likewise. 7537 * pt.c (convert_nontype_argument): Likewise. 7538 * typeck.c (build_binary_op): Likewise. 7539 (build_ptrmemfunc): Likewise. 7540 (convert_for_assignment): Likewise. 7541 75422000-08-17 Nathan Sidwell <nathan@codesourcery.com> 7543 7544 * cp-tree.h (CPTR_AGGR_TAG): New global tree node. 7545 (current_aggr): Define. 7546 * decl.c (grokdeclarator): Make sure a friend class is an 7547 elaborated type specifier. 7548 * parse.y (current_aggr): Remove static definition. 7549 (cp_parse_init): Adjust. 7550 (structsp): Clear and restore current_aggr. 7551 (component_decl_list): Clear current_aggr. 7552 7553 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the 7554 aggregate tag on the typename's context. 7555 7556 * pt.c (tsubst_friend_class): Return error_mark_node, if 7557 parms becomes NULL. 7558 (instantiate_class_template): Ignore error_mark_node friend types. 7559 75602000-08-14 Nathan Sidwell <nathan@codesourcery.com> 7561 7562 * cvt.c (warn_ref_binding): New static function, broken out of ... 7563 (convert_to_reference): ... here. Use it. 7564 75652000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu> 7566 7567 * parse.y (template_arg): Add rule for template qualified with 7568 global scope. 7569 75702000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 7571 7572 * decl2.c (add_function): Reorganize. 7573 (arg_assoc): Do not consider function template decls. 7574 75752000-08-11 Jason Merrill <jason@redhat.com> 7576 7577 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're 7578 looking inside. 7579 75802000-08-11 Nathan Sidwell <nathan@codesourcery.com> 7581 7582 * cp-tree.h (resolve_scope_to_name): Remove unused prototype. 7583 (lookup_nested_tag): Likewise. 7584 7585 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs 7586 can be produced. 7587 75882000-08-11 Nathan Sidwell <nathan@codesourcery.com> 7589 7590 * parse.y (named_complex_class_head_sans_basetype): Remove 7591 always true if. 7592 75932000-08-11 Nathan Sidwell <nathan@codesourcery.com> 7594 7595 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build 7596 explicit TEMPLATE_ID_EXPR args. 7597 (build_expr_from_tree, case CALL_EXPR): Likewise. 7598 75992000-08-11 Nathan Sidwell <nathan@codesourcery.com> 7600 7601 * decl.c (check_tag_decl): Diagnose typename's which don't 7602 declare anything. 7603 76042000-08-10 Nathan Sidwell <nathan@codesourcery.com> 7605 7606 * init.c (build_aggr_init): Reject bogus array initializers 7607 early. 7608 76092000-08-09 Nathan Sidwell <nathan@codesourcery.com> 7610 7611 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi 7612 runtime. 7613 * cp/tinfo.cc (__dynamic_cast): Likewise. 7614 * cp/inc/cxxabi.h (__dynamic_cast): Likewise. 7615 76162000-08-09 Nathan Sidwell <nathan@codesourcery.com> 7617 7618 * cvt.c (convert_to_pointer_force): Fix error message when 7619 attempting to cast from ambiguous base. 7620 76212000-08-08 Jason Merrill <jason@redhat.com> 7622 7623 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails. 7624 (tsubst_template_arg_vector): Likewise. 7625 7626 * decl2.c (build_anon_union_vars): Choose the largest field; don't 7627 assume that one will be as large as the union. 7628 76292000-08-07 Kazu Hirata <kazu@hxi.com> 7630 7631 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo. 7632 * decl.c (pop_labels): Likewise. 7633 76342000-08-04 Jeffrey Oldham <oldham@codesourcery.com> 7635 7636 * inc/cxxabi.h (__pbase_type_info): Changed member names to match 7637 specifications. 7638 (__pointer_to_member_type_info): Likewise. 7639 (__base_class_info): Likewise. 7640 (__class_type_info): Likewise. 7641 (__si_class_type_info): Likewise. 7642 (__vmi_class_type_info): Likewise. 7643 * tinfo.cc (__si_class_type_info::__do_find_public_src): 7644 Changed member names to match specifications. 7645 (__vmi_class_type_info::__do_find_public_src): Likewise. 7646 (__si_class_type_info::__do_dyncast): Likewise. 7647 (__vmi_class_type_info::__do_dyncast): Likewise. 7648 (__si_class_type_info::__do_upcast): Likewise. 7649 (__vmi_class_type_info::__do_upcast): Likewise. 7650 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise. 7651 (__pbase_type_info::__pointer_catch): Likewise. 7652 (__pointer_type_info::__pointer_catch): Likewise. 7653 (__pointer_to_member_type_info::__pointer_catch): Likewise. 7654 76552000-08-04 Zack Weinberg <zack@wolery.cumb.org> 7656 7657 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist. 7658 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS. 7659 (cc1plus): Link with $(BACKEND) and $(C_OBJS). 7660 76612000-08-04 Mark Mitchell <mark@codesourcery.com> 7662 7663 * cp-tree.h (add_method): Change prototype. 7664 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P. 7665 Don't double the size of the method vector in the error case. 7666 (handle_using_decl): Adjust call to add_method. 7667 (add_implicitly_declared_members): Likewise. 7668 (clone_function_decl): Likewise. 7669 * decl2.c (check_classfn): Likewise. 7670 * semantics.c (finish_member_declaration): Likewise. 7671 76722000-08-04 Joseph S. Myers <jsm28@cam.ac.uk> 7673 7674 * decl.c (flag_isoc94): New variable. 7675 76762000-08-02 Jason Merrill <jason@redhat.com> 7677 7678 * pt.c (do_type_instantiation): Add complain parm; don't complain 7679 if called recursively. 7680 * cp-tree.h, parse.y: Adjust. 7681 76822000-08-02 Zack Weinberg <zack@wolery.cumb.org> 7683 7684 * decl2.c: Silently ignore -Wstrict-prototypes; warn about 7685 -Wno-strict-prototypes. 7686 7687 * g++spec.c: Adjust type of second argument to 7688 lang_specific_driver, and update code as necessary. 7689 7690 * cp-tree.h: Don't prototype min_precision here. 7691 (my_friendly_assert): Cast expression to void. 7692 * semantics.c (do_poplevel): Initialize scope_stmts. 7693 76942000-08-02 Mark Mitchell <mark@codesourcery.com> 7695 7696 * cp-tree.h (DECL_NEEDED_P): Tweak. 7697 76982000-07-28 Jason Merrill <jason@redhat.com> 7699 7700 * lang-specs.h: Use %i in rule for .ii files. 7701 77022000-07-31 Zack Weinberg <zack@wolery.cumb.org> 7703 7704 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0. 7705 77062000-07-30 Mark Mitchell <mark@codesourcery.com> 7707 7708 Allow indirect primary bases. 7709 * cp-tree.h (struct lang_type): Remove vfield_parent. Add 7710 primary_base. 7711 (CLASSTYPE_VFIELD_PARENT): Remove. 7712 (CLASSTYPE_PRIMARY_BINFO): Reimplement. 7713 (BINFO_PRIMARY_BINFO): Remove. 7714 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement. 7715 (BINFO_VBASE_PRIMARY_P): Likewise. 7716 (BINFO_PRIMARY_BASE_OF): New macro. 7717 (BINFO_INDIRECT_PRIMARY_P): Likewise. 7718 (get_primary_binfo): New function. 7719 * decl.c (lang_mark_tree): Make lang_type::primary_base. 7720 * class.c (vcall_offset_data_s): Rename to ... 7721 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p, 7722 and add ctor_vtbl_p. 7723 (get_derived_offset): Use get_primary_binfo. 7724 (dfs_mark_primary_bases): Adjust handling of virtual primary 7725 bases. 7726 (mark_primary_bases): Likewise. 7727 (set_primary_base): Take a binfo, not an integer, as a 7728 representation of the primary base. 7729 (indirect_primary_base_p): Remove. 7730 (determine_primary_base): Adjust for indirect primary bases. 7731 (dfs_find_final_overrider): Fix typo in coment. 7732 (update_vtable_entry_for_fn): Use get_primary_binfo. 7733 (layout_nonempty_base_or_field): Tweak. 7734 (build_base_fields): Adjust for new primary base semantics. 7735 (dfs_propagate_binfo_offsets): Remove. 7736 (propagate_binfo_offsets): Rewrite. 7737 (dfs_set_offset_for_shared_vbases): Remove. 7738 (layout_virtual_bases): Don't use it. 7739 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new 7740 ABI. 7741 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not 7742 CLASSTYPE_VFIELD_PARENT. 7743 (dfs_get_primary_binfo): New function. 7744 (get_primary_binfo): Likewise. 7745 (dump_class_hierarchy_r): Tweak printing of primary bases. 7746 (build_vtbl_initializer): Fix typo in comments. Use 7747 vtbl_init_data. 7748 (build_vcall_and_vbase_vtbl_entries): Likewise. 7749 (build_vbaes_offset_vtbl_entries): Likewise. 7750 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of 7751 BV_VCALL_INDEX to handle indirect primary bases. 7752 (build_vcall_offset_vtbl_entries): Use vtbl_init_data. 7753 (build_rtti_vtbl_entries): Likewise. 7754 * search.c (get_shared_vbase_if_not_primary): Tweak. 7755 (find_vbase_instance): Likewise. 7756 (binfo_for_vtable): Simplify. 7757 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF. 7758 (make_binfo): Make it have 11 entries. 7759 77602000-07-30 Alex Samuel <samuel@codesourcery.com> 7761 7762 * mangle.c (DECL_TEMPLATE_ID_P): Remove. 7763 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when 7764 ascertaining primaryness. 7765 (G): Remove template_args. 7766 (decl_is_template_id): New function. 7767 (write_encoding): Use decl_is_template_id. 7768 (write_name): Likewise. Handle type_decls. Get main variant of 7769 type decls. 7770 (write_nested_name): Likewise. 7771 (write_prefix): Likewise. 7772 (write_template_prefix): Likewise. 7773 (write_special_name_constructor): Remove defunct production from 7774 comment. 7775 (write_bare_function_type): Remove comment about absent parameter. 7776 (write_template_template_arg): Add missing grammar production to 7777 comment. 7778 77792000-07-27 Jason Merrill <jason@redhat.com> 7780 7781 * decl.c (duplicate_decls): If common_type produces a non-typedef 7782 type for a typedef, just use the old type. 7783 77842000-07-27 Mark Mitchell <mark@codesourcery.com> 7785 7786 * cp-tree.h (function_depth): Declare. 7787 (verify_stmt_tree): Likewise. 7788 (find_tree): Likewise. 7789 * decl.c (function_depth): Give it external linkage. 7790 * optimize.c (optimize_function): Increment and decrement it. 7791 * tree.c (verify_stmt_tree_r): New function. 7792 (verify_stmt_tree): Likewise. 7793 (find_tree_r): Likewise. 7794 (find_tree): Likewise. 7795 77962000-07-27 Jason Merrill <jason@redhat.com> 7797 7798 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use 7799 TYPE_PTRMEMFUNC_P. 7800 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC. 7801 78022000-07-26 Mark Mitchell <mark@codesourcery.com> 7803 7804 * decl.c (start_cleanup_fn): Mark the function as `inline'. 7805 * decl2.c (get_guard): Call cp_finish_decl, not 7806 rest_of_decl_compilation, for local guards. 7807 * lex.c (do_identifier): Remove unused variable. 7808 7809Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org> 7810 7811 * parse.y: Add missing ';'. 7812 78132000-07-26 Mark Mitchell <mark@codesourcery.com> 7814 7815 * parse.y (empty_parms): Use `()', not `(...)', when in the scope 7816 of `extern "C++"'. 7817 78182000-07-25 Nathan Sidwell <nathan@codesourcery.com> 7819 7820 Kill strict_prototype. Backwards compatibility only for 7821 non NO_IMPLICIT_EXTERN_C systems. 7822 * cp-tree.h (flag_strict_prototype): Remove. 7823 (strict_prototype): Remove. 7824 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove. 7825 * decl.c (maybe_push_to_top_level): Adjust. 7826 (pop_from_top_level): Adjust. 7827 (decls_match): Only allow sloppy parm matching for ancient 7828 system headers. 7829 (init_decl_processing): Adjust. 7830 (grokdeclarator): Adjust. 7831 * decl2.c (flag_strict_prototype): Remove. 7832 (strict_prototype): Remove. 7833 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove. 7834 (lang_f_options): Remove "strict-prototype". 7835 (unsupported-options): Add "strict-prototype". 7836 * lex.c (do_identifier): Adjust. 7837 (do_scoped_id): Adjust. 7838 * parse.y (empty_parms): Adjust. 7839 * class.c (push_lang_context): Adjust. 7840 (pop_lang_context): Adjust. 7841 * typeck.c (comp_target_parms): Adjust. 7842 78432000-07-25 Nathan Sidwell <nathan@codesourcery.com> 7844 7845 * decl.c (poplevel): Deal with anonymous variables at for scope. 7846 (maybe_inject_for_scope_var): Likewise. 7847 78482000-07-25 Zack Weinberg <zack@wolery.cumb.org> 7849 7850 * decl.c: Remove all signal handling code, now done in toplev.c. 7851 78522000-07-23 Mark Mitchell <mark@codesourcery.com> 7853 7854 * decl.c (make_rtl_for_nonlocal_decl): Rework. 7855 7856 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set 7857 correctly. 7858 78592000-07-20 Zack Weinberg <zack@wolery.cumb.org> 7860 7861 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__. 7862 Define my_friendly_assert and my_friendly_abort as macros 7863 which may call friendly_abort. Prototype friendly abort, not 7864 my_friendly_abort or my_friendly_assert. 7865 * decl.c (signal_catch): Report the signal caught in the error 7866 message. Call fatal directly. 7867 * typeck2.c (ack, my_friendly_assert): Delete. 7868 (my_friendly_abort): Rename to friendly_abort. Expect file, 7869 line, and function parameters. Report the abort code, then 7870 call fancy_abort. Do not mask an abort if errors have 7871 already occurred. 7872 78732000-07-18 Nathan Sidwell <nathan@codesourcery.com> 7874 7875 * typeck.c (comp_target_parms): Remove obsolete parameter. 7876 (comp_target_types): Adjust. 7877 78782000-07-17 Jason Merrill <jason@redhat.com> 7879 7880 * typeck.c (mark_addressable): Never set TREE_USED. 7881 * call.c (build_call): Don't abort on calls to library functions 7882 that have been declared normally. 7883 7884 * typeck.c (build_binary_op): Fix grammar in warning. 7885 7886 * exception.cc (__eh_free): Fix prototype. 7887 7888 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR. 7889 7890 * decl.c (pushdecl): Handle seeing an OVERLOAD in 7891 IDENTIFIER_NAMESPACE_VALUE. 7892 78932000-07-16 Mark Mitchell <mark@codesourcery.com> 7894 7895 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation. 7896 * method.c (use_thunk): Correct handling of vcall offsets. 7897 78982000-07-14 Zack Weinberg <zack@wolery.cumb.org> 7899 7900 * .cvsignore: parse.h and parse.c have no cp- prefix. 7901 79022000-07-13 Mark Mitchell <mark@codesourcery.com> 7903 7904 * .cvsignore: New file. 7905 79062000-07-13 Zack Weinberg <zack@wolery.cumb.org> 7907 7908 * lang-specs.h: Use the new named specs. Remove unnecessary braces. 7909 79102000-07-12 Mark Mitchell <mark@codesourcery.com> 7911 7912 * Makefile.in ($(PARSE_H)): Depend directly on parse.y. 7913 * parse.c: Remove. 7914 * parse.h: Likewise. 7915 79162000-07-11 Mark Mitchell <mark@codesourcery.com> 7917 7918 * class.c (layout_class_type): Add pointers to virtual bases after 7919 base classes under the old ABI. 7920 79212000-07-10 Benjamin Chelf <chelf@codesourcery.com> 7922 7923 * semantics.c (finish_for_stmt): Remove call to emit_line_note. 7924 (finish_continue_stmt): Likewise. 7925 (begin_for_stmt): Remove call to note_level_for_for. 7926 (finish_goto_stmt): Change call from build_min_nt 7927 to build_stmt. 7928 (finish_expr_stmt): Likewise. 7929 (begin_if_stmt): Likewise. 7930 (begin_while_stmt): Likewise. 7931 (finish_while_stmt): Likewise. 7932 (finish_return_stmt): Likewise. 7933 (begin_for_stmt): Likewise. 7934 (finish_for_stmt): Likewise. 7935 (finish_break_stmt): Likewise. 7936 (begin_switch_stmt): Likewise. 7937 (finish_case_label): Likewise. 7938 (genrtl_try_block): Likewise. 7939 (begin_try_block): Likewise. 7940 (begin_handler): Likewise. 7941 (begin_compound_stmt): Likewise. 7942 (finish_asm_stmt): Likewise. 7943 (finish_label_stmt): Likewise. 7944 (add_decl_stmt): Likewise. 7945 (finish_subobject): Likewise. 7946 (finish_decl_cleanup): Likewise. 7947 (finish_named_return_value): Likewise. 7948 (setup_vtbl_ptr): Likewise. 7949 (add_scope_stmt): Likewise. 7950 * decl.c (finish_constructor_body): Likewise. 7951 (finish_destructor_body): Likewise. 7952 * optimize.c (copy_body_r): Likewise. 7953 (initialize_inlined_parameters): Likewise. 7954 (declare_return_variable): Likewise. 7955 (expand_call_inline): Likewise. 7956 79572000-07-10 Jakub Jelinek <jakub@redhat.com> 7958 7959 * semantics.c (expand_body): Sync interface information 7960 at the end of function body expansion. 7961 79622000-07-09 Jason Merrill <jason@redhat.com> 7963 7964 * init.c (build_new_1): Bail early if the call to new fails. 7965 7966 * decl.c (compute_array_index_type): Check specifically for 7967 an INTEGER_CST, not just TREE_CONSTANT. 7968 7969 * decl.c (duplicate_decls): Don't call duplicate_decls on 7970 the DECL_TEMPLATE_RESULT. 7971 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different 7972 codes. 7973 7974 * error.c (dump_template_bindings): Don't crash if we had an 7975 invalid argument list. 7976 7977 * typeck.c (c_expand_start_case): Do narrowing here. 7978 * semantics.c (finish_switch_cond): Not here. 7979 79802000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com> 7981 7982 * parse.y (asm_clobbers): Do string concatenation. 7983 79842000-07-09 Mark Mitchell <mark@codesourcery.com> 7985 7986 * decl.c (pushtag): Don't put local classes in template functions 7987 on the local_classes list. 7988 79892000-07-04 Scott Snyder <snyder@fnal.gov> 7990 7991 * decl2.c (get_guard): Add missing return for old ABI local 7992 variable case. 7993 79942000-07-09 Mark Mitchell <mark@codesourcery.com> 7995 7996 * cp-tree.h (char_type_p): New function. 7997 * decl.c (init_decl_processing): Don't initialize 7998 signed_wchar_type_node or unsigned_wchar_type_node. 7999 (complete_array_type): Handle brace-enclosed string-constants. 8000 * rtti.c (emit_support_tinfos): Remove #if 0'd code. 8001 * tree.c (char_type_p): New function. 8002 * typeck2.c (digest_init): Use char_type_p. 8003 80042000-07-06 Nathan Sidwell <nathan@codesourcery.com> 8005 8006 * pt.c (tsubst): Don't layout type, if it's error_mark. 8007 80082000-07-06 Nathan Sidwell <nathan@codesourcery.com> 8009 8010 * pt.c (instantiate_pending_templates): Reset template level. 8011 80122000-07-05 Jason Merrill <jason@redhat.com> 8013 8014 * call.c (joust): Don't complain about `operator char *()' beating 8015 `operator const char *() const'. 8016 80172000-07-04 scott snyder <snyder@fnal.gov> 8018 Jason Merrill <jason@redhat.com> 8019 8020 * repo.c (repo_get_id): Handle the case where a class with virtual 8021 bases has a null TYPE_BINFO_VTABLE. 8022 80232000-07-04 Kevin Buhr <buhr@stat.wisc.edu> 8024 Jason Merrill <jason@redhat.com> 8025 8026 * parse.y (member_init): Just pass in the type. 8027 * init.c (expand_member_init): Handle getting a type. 8028 80292000-07-04 Martin v. L�wis <loewis@informatik.hu-berlin.de> 8030 Jason Merrill <jason@redhat.com> 8031 8032 * decl.c (finish_function): Warn if a function has no return 8033 statement. 8034 Suggested by Andrew Koenig. 8035 * typeck.c (check_return_expr): Do set current_function_returns_value 8036 if we got an error_mark_node. 8037 80382000-07-03 Nathan Sidwell <nathan@codesourcery.com> 8039 8040 * decl2.c (push_decl_namespace): Push the original namespace. 8041 80422000-07-03 Nathan Sidwell <nathan@codesourcery.com> 8043 8044 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES. 8045 * semantics.c (begin_class_definition): Clear it. 8046 80472000-07-02 Benjamin Chelf <chelf@codesourcery.com> 8048 8049 * cp-tree.h (genrtl_goto_stmt): Remove declaration. 8050 (genrtl_expr_stmt): Likewise. 8051 (genrtl_decl_stmt): Likewise. 8052 (genrtl_if_stmt): Likewise. 8053 (genrtl_while_stmt): Likewise. 8054 (genrtl_do_stmt): Likewise. 8055 (genrtl_return_stmt): Likewise. 8056 (genrtl_for_stmt): Likewise. 8057 (genrtl_break_stmt): Likewise. 8058 (genrtl_continue_stmt): Likewise. 8059 (genrtl_scope_stmt): Likewise. 8060 (genrtl_switch_stmt): Likewise. 8061 (genrtl_case_label): Likewise. 8062 (genrtl_begin_compound_stmt): Likewise. 8063 (genrtl_finish_compound_stmt): Likewise. 8064 (genrtl_compound_stmt): Likewise. 8065 (genrtl_asm_stmt): Likewise. 8066 8067 * init.c (begin_init_stmts): Remove call to 8068 genrtl_begin_compound_stmt. 8069 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt. 8070 8071 * semantics.c (lang_expand_stmt): Changed call to 8072 genrtl_compound_stmt to ignore return value. 8073 80742000-07-02 Mark Mitchell <mark@codesourcery.com> 8075 8076 * mangle.c (canonicalize_for_substitution): Return the canonical 8077 variant of a type. 8078 8079 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a 8080 TYPE_DECL. 8081 * typeck.c (commonparms): Remove obstack manipulations. 8082 80832000-07-01 Benjamin Chelf <chelf@codesourcery.com> 8084 8085 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o. 8086 8087 * Makefile.in (OBJS): Added ../c-semantics.o. 8088 (OBJDEPS): Likewise. 8089 8090 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to 8091 ../c-common.h. 8092 (struct stmt_tree): Added comment. 8093 (current_function_name_declared): Removed. 8094 (stmts_are_full_exprs_p): Likewise. 8095 (genrtl_do_pushlevel): Likewise. 8096 (genrtl_clear_out_block): Likewise. 8097 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h. 8098 (DECL_ANON_UNION_ELEMS): Likewise. 8099 (emit_local_var): Likewise. 8100 (make_rtl_for_local_static): Likewise. 8101 (do_case): Likewise. 8102 (expand_stmt): Likewise. 8103 (genrtl_decl_cleanup): Likewise. 8104 (c_expand_asm_operands): Likewise. 8105 (c_expand_return): Likewise. 8106 (c_expand_start_case): Likewise. 8107 8108 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c. 8109 (emit_local_var): Likewise. 8110 (initialize_local_var): Change reference to 8111 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p(). 8112 Change reference to stmts_are_full_exprs_p to 8113 current_stmt_tree->stmts_are_full_exprs_p. 8114 (push_cp_function_context): Likewise. 8115 8116 * expect.c (expand_throw): Change reference to 8117 stmts_are_full_exprs_p. 8118 8119 * init.c (build_aggr_init): Change reference to 8120 stmts_are_full_exprs_p. 8121 (build_vec_init): Likewise. 8122 8123 * optimize.c (maybe_clone_body): Change reference to 8124 current_function_name_declared to 8125 cp_function_chain->name_declared. 8126 8127 * pt.c (instantiate_decl): Change reference to 8128 current_function_name_declared to 8129 cp_function_chain->name_declared. 8130 8131 * semantics.c (expand_cond): Moved declaration to c-common.h. 8132 (genrtl_do_pushlevel): Moved to c-semantics.c. 8133 (genrtl_clear_out_block): Likewise. 8134 (genrtl_goto_stmt): Likewise. 8135 (genrtl_expr_stmt): Likewise. 8136 (genrtl_decl_stmt): Likewise. 8137 (gerntl_if_stmt): Likewise. 8138 (genrtl_while_stmt): Likewise. 8139 (genrtl_do_stmt): Likewise. 8140 (genrtl_return_stmt): Likewise. 8141 (genrtl_for_stmt): Likewise. 8142 (genrtl_break_stmt): Likewise. 8143 (genrtl_continue_stmt): Likewise. 8144 (genrtl_scope_stmt): Likewise. 8145 (genrtl_switch_stmt): Likewise. 8146 (genrtl_case_label): Likewise. 8147 (genrtl_begin_compound_stmt): Likewise. 8148 (genrtl_finish_compound_stmt): Likewise. 8149 (genrtl_compound_stmt): Likewise. 8150 (genrtl_asm_stmt): Likewise. 8151 (genrtl_decl_cleanup): Likewise. 8152 (expand_cond): Likewise. 8153 (expand_stmt): Renamed to ... 8154 (lang_expand_stmt): ... this. 8155 (lang_expand_expr_stmt): Initialize. 8156 (set_current_function_name_declared): Likewise. 8157 (stmts_are_full_exprs_p): Likewise. 8158 (current_function_name_declared): Likewise. 8159 (anon_aggr_type_p): Likewise. 8160 (do_poplevel): Change reference to 8161 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p(). 8162 Change reference to stmts_are_full_exprs_p to 8163 current_stmt_tree->stmts_are_full_exprs_p. 8164 (add_tree): Likewise. 8165 (finish_expr_stmt): Likewise. 8166 (prep_stmt): Likewise. 8167 (lang_expand_stmt): Likewise. 8168 (begin_compound_stmt): Change reference to 8169 current_function_name_declared to 8170 cp_function_chain->name_declared and call to 8171 current_function_name_declared(). 8172 (setup_vtbl_ptr): Likewise. 8173 (genrtl_do_poplevel): Removed. 8174 81752000-06-30 Jason Merrill <jason@redhat.com> 8176 8177 * init.c (init_init_processing): Go back to aligning like 8178 double_type_node for old ABI. 8179 (get_cookie_size): Make cookie larger if we get a type that needs 8180 more alignment. 8181 (build_vec_delete): Call it. 8182 8183 * typeck.c (qualify_type_recursive): New fn. 8184 (composite_pointer_type): Use it. 8185 (build_binary_op): Use composite_pointer_type. 8186 81872000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu> 8188 Jason Merrill <jason@redhat.com> 8189 8190 * typeck.c (check_return_expr): Don't complain about returning 8191 NULL from operator new if -fcheck-new. 8192 * cp-tree.h: Declare flag_check_new here. 8193 * init.c: Not here. 8194 81952000-06-28 Alex Samuel <samuel@codesourcery.com> 8196 8197 * mangle.c (find_substitution): Use same_type_p. 8198 (write_encoding): Don't check for substitutions. 8199 82002000-06-30 Nathan Sidwell <nathan@codesourcery.com> 8201 8202 * parse.y (expr_no_comma_rangle): New non-terminal. 8203 (template_parm): Use it for default parameter case. 8204 (template_arg): Use it. 8205 (expr_no_commas): Remove commented out undefined extensions. 8206 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r. 8207 * parse.h, parse.c: Rebuilt. 8208 82092000-06-30 Mark Mitchell <mark@codesourcery.com> 8210 8211 * semantics.c (genrtl_asm_stmt): Don't decay input operands here. 8212 (finish_asm_stmt): Do it here, instead. 8213 8214 * cp-tree.h (ridpointers): Don't declare. 8215 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX. 8216 (record_builtin_java_type): Likewise. 8217 (init_decl_processing): Likewise. 8218 * lex.c: Move inclusion of lex.h. 8219 (ridpointers): Don't define. 8220 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of 8221 RID_MAX. 8222 * lex.h (enum rid): Rename to ... 8223 (enum cp_rid): ... this. 8224 (ridpointers): Don't declare. 8225 * parse.y: Move inclusion of lex.h. 8226 * parse.c: Regenerated. 8227 * spew.c: Move inclusion of lex.h. 8228 8229 * cp-tree.h (struct language_function): Remove temp_name_counter. 8230 (temp_name_counter): Remove. 8231 (get_temp_name): Change prototype. 8232 (get_guard): New function. 8233 (get_guard_cond): Likewise. 8234 (set_guard): Likewise. 8235 * cvt.c (build_up_reference): Adjust call to get_temp_name. 8236 * decl.c (expand_static_init): Use get_guard and friends to 8237 implement guard variables. 8238 * decl2.c (get_temp_name): Assume that the variables created are 8239 always static. 8240 (get_sentry): Rename to ... 8241 (get_guard): ... this. Implement new ABI guard variables. 8242 (get_guard_bits): New function. 8243 (get_guard_cond): Likewise. 8244 (set_guard): Likewise. 8245 (start_static_initialization_or_destruction): Use them. 8246 (do_static_initialization): Replace sentry with guard throughout. 8247 (do_static_destruction): Likewise. 8248 * init.c (create_temporary_var): Add comment. 8249 82502000-06-28 Alex Samuel <samuel@codesourcery.com> 8251 8252 * mangle.c (find_substitution): Use same_type_p. 8253 (write_encoding): Don't check for substitutions. 8254 82552000-06-30 Nathan Sidwell <nathan@codesourcery.com> 8256 8257 * parse.y (expr_no_comma_rangle): New non-terminal. 8258 (template_parm): Use it for default parameter case. 8259 (template_arg): Use it. 8260 (expr_no_commas): Remove commented out undefined extensions. 8261 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r. 8262 * parse.h, parse.c: Rebuilt. 8263 82642000-06-29 Mark Mitchell <mark@codesourcery.com> 8265 8266 * cp-tree.h (flag_const_strings): Remove. 8267 (warn_parentheses): Likewise. 8268 (warn_format): Likewise. 8269 (common_type): Likewise. 8270 (default_conversion): Likewise. 8271 (build_binary_op): Likewise. 8272 (cp_build_binary_op): New macro. 8273 * call.c (build_new_op): Use cp_build_binary_op instead of 8274 build_binary_op. 8275 * class.c (build_vtable_entry_ref): Likewise. 8276 * decl.c (expand_static_init): Likewise. 8277 (compute_array_index_type): Likewise. 8278 (build_enumerator): Likewise. 8279 * decl2.c (delete_sanity): Likewise. 8280 (start_static_initialization_or_destruction): Likewise. 8281 * error.c (dump_type_suffix): Likewise. 8282 * init.c (resolve_offset_ref): Likewise. 8283 (build_new): Likewise. 8284 (build_new_1): Likewise. 8285 (build_vec_delete_1): Likewise. 8286 (build_vec_init): Likewise. 8287 (build_delete): Likewise. 8288 * rtti.c (synthesize_tinfo_fn): Likewise. 8289 (synthesize_tinfo_var): Likewise. 8290 * search.c (expand_upcast_fixups): Likewise. 8291 (fixup_all_virtual_upcast_offsets): Likewise. 8292 * typeck.c (build_array_ref): Likewise. 8293 (get_member_function_from_ptrfunc): Likewise. 8294 (build_binary_op): Add parameter. 8295 (pointer_int_sum): Use cp_build_binary_op. 8296 (pointer_diff): Likewise. 8297 (build_modify_expr): Likewise. 8298 (get_delta_difference): Likewise. 8299 (build_ptrmemfunc): Likewise. 8300 83012000-06-29 Nathan Sidwell <nathan@codesourcery.com> 8302 8303 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove. 8304 * decl.c (create_implicit_typedef): Adjust. 8305 * decl2.c (build_artificial_parm): Adjust. 8306 * method.c (implicitly_declare_fn): Adjust. 8307 * pt.c (push_inline_template_parms_recursive): Adjust. 8308 (process_template_parm): Adjust. 8309 (overloaded_template_name): Adjust. 8310 * semantics.c (finish_template_template_parm): Adjust. 8311 83122000-06-28 Mark Mitchell <mark@codesourcery.com> 8313 8314 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove. 8315 * class.c (update_vtable_entry_for_fn): Correct logic for deciding 8316 where to emit thunks. 8317 (build_vtt): Adjust call to build_vtt_inits. 8318 (build_vtt_inits): Add parameter to indicate whether or not 8319 sub-VTTs for virtual bases should be included. Adjust handling of 8320 construction vtables. 8321 (get_matching_base): New function. 8322 (dfs_build_vtt_inits): Rename to ... 8323 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of 8324 construction vtables. 8325 (dfs_fixup_binfo_vtbls): Likewise. 8326 (build_ctor_vtbl_groups): Build construction vtables for virtual 8327 bases, too. 8328 (accumulate_vtbl_inits): Tweak logic for deciding whether or not 8329 to build construction vtbls. 8330 (dfs_accumulate_vtbl_inits): Adjust handling of 8331 construction vtables. 8332 8333 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified 8334 types correctly. 8335 83362000-06-27 Mark Mitchell <mark@codesourcery.com> 8337 8338 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too. 8339 83402000-06-26 Nathan Sidwell <nathan@codesourcery.com> 8341 8342 * search.c (hides): Remove. 8343 (is_subobject_of_p): Add most_derived parameter. Use 8344 CANONICAL_BINFO. 8345 (lookup_field_queue_p): Adjust. 8346 (lookup_field_r): Adjust. 8347 83482000-06-26 Nathan Sidwell <nathan@codesourcery.com> 8349 8350 * decl2.c (handle_class_head): Bash typedefs to the type's main 8351 decl. 8352 83532000-06-25 Mark Mitchell <mark@codesourcery.com> 8354 8355 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ... 8356 (begin_global_stmt_expr): ... this. 8357 (genrtl_finish_stmt_expr): Rename to ... 8358 (finish_global_stmt_expr): ... this. 8359 * init.c (begin_init_stmts): Adjust calls. 8360 (finish_init_stmts): Likewise. 8361 * semantics.c (genrtl_begin_stmt_expr): Rename to ... 8362 (begin_global_stmt_expr): ... this. 8363 (genrtl_finish_stmt_expr): Rename to ... 8364 (finish_global_stmt_expr): ... this. 8365 83662000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 8367 8368 * search.c (lookup_member): Fix typo in comment. 8369 83702000-06-24 Jason Merrill <jason@redhat.com> 8371 8372 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace. 8373 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL. 8374 83752000-06-24 Martin v. L�wis <loewis@informatik.hu-berlin.de> 8376 8377 * parse.y (complex_direct_notype_declarator): Support global_scope. 8378 * Makefile.in: Adjust conflict count. 8379 83802000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu> 8381 8382 * parse.y (template_arg): Convert TEMPLATE_DECL 8383 that is a template template parameter to 8384 TEMPLATE_TEMPLATE_PARM here. 8385 8386 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment. 8387 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro. 8388 (copy_template_template_parm): Adjust prototype. 8389 * decl.c (grokdeclarator): Remove dead code. 8390 * pt.c (process_template_parm): Tidy. 8391 (lookup_template_class): Construct nodes in 8392 copy_template_template_parm. 8393 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to 8394 lookup_template_class. Use TYPE_TI_TEMPLATE. 8395 * tree.c (copy_template_template_parm): Add NEWARGS 8396 parameter. 8397 (mapcar): Adjust call to copy_template_template_parm. 8398 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL. 8399 * method.c (build_template_template_parm_names): Change error 8400 code to avoid compilation warning. 8401 8402 * gxxint.texi: Document template template parameter 8403 name mangling. 8404 84052000-06-21 Alex Samuel <samuel@codesourcery.com> 8406 8407 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o. 8408 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c. 8409 (cp-demangle.o): New rule. 8410 (dyn-string.o): Likewise. 8411 * inc/cxxabi.h (__cxa_demangle): New declaration. 8412 84132000-06-22 Mark Mitchell <mark@codesourcery.com> 8414 8415 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro. 8416 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise. 8417 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset 8418 a tree, not an int. 8419 (THUNK_GENERATE_WITH_VTABLE_P): New macro. 8420 (make_thunk): Change prototype. 8421 (emit_thunk): Rename to use_thunk. 8422 (mangle_thunk): Change prototype. 8423 * class.c (get_derived_offset): Simplify. 8424 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and 8425 BV_GENERATE_THUNK_WITH_VTABLE_P. 8426 (build_primary_vtable): Simplify. 8427 (add_virtual_function): Use BV_FN, rather than TREE_VALUE. 8428 (dfs_find_base): Remove. 8429 (update_vtable_entry_for_fn): Correct bug in finding the base 8430 where a virtual function was first declared. Figure out whether 8431 or not to emit a vcall-thunk with the vtables in which it appears. 8432 Correct logic for deciding whether to use an ordinary thunk, or a 8433 vcall thunk. 8434 (finish_struct_1): Remove unnecssary code. 8435 (build_vtbl_initializer): Use ssize_int for the running counter of 8436 negative indices. 8437 (build_vtbl_initializer): Only use vcall thunks where necessary. 8438 Mark thunks as needing to be emitted with their vtables, or not. 8439 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in 8440 indices. Use size_binop. 8441 (dfs_build_vcall_offset_vtbl_entries): Don't rely on 8442 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use 8443 size_binop. 8444 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry. 8445 (build_vtable_entry): Mark thunks as needing to be emitted with 8446 their vtables, or not. 8447 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk. 8448 * decl2.c (mark_vtable_entries): Use use_thunk instead of 8449 emit_thunk. 8450 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk 8451 information. 8452 * error.c (dump_expr): Use BV_FN. 8453 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree, 8454 not an int. 8455 * method.c (make_thunk): Likewise. 8456 (emit_thunk): Rename to use_thunk. Allow callers to decide 8457 whether or not to actually emit the thunk. Adjust for changes in 8458 representation of vcall offsets. 8459 * search.c (dfs_get_pure_virtuals): Use BV_FN. 8460 * semantics.c (emit_associated_thunks): New function. 8461 (expand_body): Use it. 8462 * ir.texi: Adjust decriptions of thunks. 8463 84642000-06-22 Jason Merrill <jason@redhat.com> 8465 8466 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE. 8467 (tsubst_friend_function): Copy it here. 8468 8469 * decl.c (grok_op_properties): Fix typo. 8470 8471 * decl2.c (delete_sanity): Clarify warning, avoid failure on 8472 deleting void*. 8473 8474 * pt.c (check_explicit_specialization): Clarify error. 8475 8476 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from 8477 an old OVERLOAD when we're declaring a non-function. 8478 (pushdecl, destroy_local_var): Check for error_mark_node. 8479 (warn_extern_redeclared_static): Also bail early if 8480 we're a CONST_DECL. 8481 (push_overloaded_decl): Ignore an old error_mark_node. 8482 84832000-06-22 Nathan Sidwell <nathan@codesourcery.com> 8484 8485 * call.c (build_x_va_arg): Check if in a template decl. 8486 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg. 8487 84882000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com> 8489 8490 * class.c (push_lang_context): TYPE_NAME gets you to the Java 8491 types DECLs. 8492 * decl.c (check_goto): Computed gotos assumed OK. 8493 84942000-06-20 Jason Merrill <jason@redhat.com> 8495 8496 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs 8497 for which we don't need to look for instantiations. 8498 84992000-06-21 Nathan Sidwell <nathan@codesourcery.com> 8500 8501 * parse.y (program): Always call finish_translation_unit. 8502 * parse.c, parse.h: Rebuilt. 8503 85042000-06-20 Zack Weinberg <zack@wolery.cumb.org> 8505 8506 * method.c: Don't include hard-reg-set.h. 8507 85082000-06-20 Nathan Sidwell <nathan@codesourcery.com> 8509 8510 * rtti.c (get_base_offset): Cope when vbase field is in a base. 8511 85122000-06-20 Nathan Sidwell <nathan@codesourcery.com> 8513 8514 * call.c (build_conditional_expr): Use VOID_TYPE_P. 8515 * cvt.c (cp_convert_to_pointer): Likewise. 8516 (convert_to_void): Likewise. 8517 * error.c (dump_expr): Likewise. 8518 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise. 8519 * init.c (build_delete): Likewise. 8520 * method.c (emit_thunk): Likewise. 8521 * optmize.c (declare_return_variable): Likewise. 8522 * rtti.c (get_tinfo_decl_dynamic): Likewise. 8523 (get_typeid): Likewise. 8524 (build_dynamic_cast_1): Likewise. 8525 * typeck.c (composite_pointer_type): Likewise. 8526 (common_type): Likewise. 8527 (build_indirect_ref): Likewise. 8528 (build_binary_op): Likewise. 8529 (build_x_compound_expr): Likewise. 8530 (check_return_expr): Likewise. 8531 * typeck2.c (add_exception_specifier): Likewise. 8532 8533 * mangle.c (write_method_parms): Use direct comparison for end 8534 of parmlist. 8535 85362000-06-19 Benjamin Chelf <chelf@codesourcery.com> 8537 8538 * cp-tree.h (genrtl_try_block): Declare function. 8539 (genrtl_handler): Likewise. 8540 (genrtl_catch_block): Likewise. 8541 (genrtl_ctor_stmt): Likewise. 8542 (genrtl_subobject): Likewise. 8543 (genrtl_decl_cleanup): Likewise. 8544 (genrtl_do_poplevel): Likewise. 8545 (genrtl_do_pushlevel): Likewise. 8546 (genrtl_clear_out_block): Likewise. 8547 (genrtl_goto_stmt): Likewise. 8548 (genrtl_expr_stmt): Likewise. 8549 (genrtl_decl_stmt): Likewise. 8550 (genrtl_if_stmt): Likewise. 8551 (genrtl_while_stmt): Likewise. 8552 (genrtl_do_stmt): Likewise. 8553 (genrtl_return_stmt): Likewise. 8554 (genrtl_for_stmt): Likewise. 8555 (genrtl_break_stmt): Likewise. 8556 (genrtl_continue_stmt): Likewise. 8557 (genrtl_scope_stmt): Likewise. 8558 (genrtl_switch_stmt): Likewise. 8559 (genrtl_case_label): Likewise. 8560 (genrtl_begin_compound_stmt): Likewise. 8561 (genrtl_finish_compound_stmt): Likewise. 8562 (genrtl_compound_stmt): Likewise. 8563 (genrtl_asm_stmt): Likewise. 8564 (genrtl_named_return_value): Likewise. 8565 (genrtl_begin_stmt_expr): Likewise. 8566 (genrtl_finish_stmt_expr): Likewise. 8567 (finish_for_stmt): Removed first argument. 8568 (finish_switch_stmt): Likewise. 8569 8570 * semantics.c (genrtl_try_block): Define function. 8571 (genrtl_handler): Likewise. 8572 (genrtl_catch_block): Likewise. 8573 (genrtl_ctor_stmt): Likewise. 8574 (genrtl_subobject): Likewise. 8575 (genrtl_decl_cleanup): Likewise. 8576 (genrtl_do_poplevel): Likewise. 8577 (genrtl_do_pushlevel): Likewise. 8578 (genrtl_clear_out_block): Likewise. 8579 (genrtl_goto_stmt): Likewise. 8580 (genrtl_expr_stmt): Likewise. 8581 (genrtl_decl_stmt): Likewise. 8582 (genrtl_if_stmt): Likewise. 8583 (genrtl_while_stmt): Likewise. 8584 (genrtl_do_stmt): Likewise. 8585 (genrtl_return_stmt): Likewise. 8586 (genrtl_for_stmt): Likewise. 8587 (genrtl_break_stmt): Likewise. 8588 (genrtl_continue_stmt): Likewise. 8589 (genrtl_scope_stmt): Likewise. 8590 (genrtl_switch_stmt): Likewise. 8591 (genrtl_case_label): Likewise. 8592 (genrtl_begin_compound_stmt): Likewise. 8593 (genrtl_finish_compound_stmt): Likewise. 8594 (genrtl_compound_stmt): Likewise. 8595 (genrtl_asm_stmt): Likewise. 8596 (genrtl_named_return_value): Likewise. 8597 (genrtl_begin_stmt_expr): Likewise. 8598 (genrtl_finish_stmt_expr): Likewise. 8599 (finish_for_stmt): Removed first argument and generate rtl 8600 specific code. 8601 (finish_switch_stmt): Likewise. 8602 (do_poplevel): Removed generate rtl specific code. 8603 (do_pushlevel): Likewise. 8604 (add_tree): Likewise. 8605 (finish_goto_stmt): Likewise. 8606 (finish_expr_stmt): Likewise. 8607 (begin_if_stmt): Likewise. 8608 (finish_if_stmt_cond): Likewise. 8609 (finish_then_clause): Likewise. 8610 (begin_else_clause): Likewise. 8611 (finish_else_clause): Likewise. 8612 (finish_if_stmt): Likewise. 8613 (clear_out_block): Likewise. 8614 (begin_while_stmt): Likewise. 8615 (finish_while_stmt_cond): Likewise. 8616 (finish_while_stmt): Likewise. 8617 (begin_do_stmt): Likewise. 8618 (finish_do_body): Likewise. 8619 (finish_do_stmt): Likewise. 8620 (finish_return_stmt): Likewise. 8621 (begin_for_stmt): Likewise. 8622 (finish_for_init_stmt): Likewise. 8623 (finish_for_cond): Likewise. 8624 (finish_for_expr): Likewise. 8625 (finish_break_stmt): Likewise. 8626 (finish_continue_stmt): Likewise. 8627 (begin_switch_stmt): Likewise. 8628 (finish_switch_cond): Likewise. 8629 (finish_case_label): Likewise. 8630 (begin_try_block): Likewise. 8631 (begin_function_try_block): Likewise. 8632 (finish_try_block): Likewise. 8633 (finish_cleanup_try_block): Likewise. 8634 (finish_cleanup): Likewise. 8635 (finish_function_try_block): Likewise. 8636 (finish_handler_sequence): Likewise. 8637 (finish_function_handler_sequence): Likewise. 8638 (begin_handler): Likewise. 8639 (finish_handler_parms): Likewise. 8640 (begin_catch_block): Likewise. 8641 (finish_handler): Likewise. 8642 (begin_compound_stmt): Likewise. 8643 (finish_compound_stmt): Likewise. 8644 (finish_asm_stmt): Likewise. 8645 (finish_label_stmt): Likewise. 8646 (finish_label_decl): Likewise. 8647 (finish_subobject): Likewise. 8648 (finish_decl_cleanup): Likewise. 8649 (finish_named_return_value): Likewise. 8650 (begin_stmt_expr): Likewise. 8651 (finish_stmt_expr): Likewise. 8652 8653 * decl.c (initialize_local_var): Changed call to finish_expr_stmt 8654 to call genrtl_expr_stmt when appropriate. 8655 8656 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and 8657 begin_compound_expr to call genrtl_begin_stmt_expr and 8658 genrtl_begin_compound_expr when appropriate. 8659 (finish_init_stmts): Changed calls to finish_compound_expr and 8660 finish_stmt_expr to call genrtl_finish_compound_expr and 8661 genrtl_finish_stmt_expr when appropriate. 8662 (expand_default_init): Changed call to finish_expr_stmt to call 8663 genrtl_expr_stmt when appropriate. 8664 (build_vec_init): Likewise. 8665 8666 * parse.y (simple_stmt): Removed first argument from call to 8667 finish_for_stmt. Removed first argument from call to 8668 finish_switch_stmt. 8669 8670 * parse.c: Regenerated. 8671 8672 * pt.c (tsubst_expr): Removed first argument from call to 8673 finish_for_stmt. Removed first argument from call to 8674 finish_switch_stmt. 8675 86762000-06-16 Benjamin Chelf <chelf@codesourcery.com> 8677 8678 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to 8679 CP_DUMMY_TREE_CODE. Remove #include "c-common.def". 8680 8681 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def". 8682 (cplus_tree_code_length[]): Likewise. 8683 (cplus_tree_code_name[]): Likewise. 8684 (init_parse): Added call to add_c_tree_codes. Changed 8685 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE. 8686 86872000-06-16 Mark Mitchell <mark@codesourcery.com> 8688 8689 * cp-tree.h (finish_mem_initializers): Declare. 8690 (count_trees): Likewise. 8691 * parse.y (base_init): Use finish_mem_initializers. 8692 * semantics.c (finish_mem_initializers): New function. 8693 8694 * tree.c (count_trees_r): Prototype. Use DATA parameter to store 8695 the number of trees. 8696 (n_trees): Remove. 8697 (count_trees): Don't use it. 8698 86992000-06-15 Jason Merrill <jason@redhat.com> 8700 8701 * tree.c (count_trees): New debugging function. 8702 8703 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P. 8704 * init.c (build_member_call): Pull out the name of a DECL. 8705 8706 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H. 8707 * semantics.c (expand_body): Push to TV_INTEGRATION here. 8708 * optimize.c (optimize_function): Not here. 8709 * pt.c (instantiate_decl): Push to TV_PARSE. 8710 87112000-06-15 Mark Mitchell <mark@codesourcery.com> 8712 8713 * cp-tree.h (struct language_function): Remove x_base_init_list 8714 and x_member_init_list. 8715 (current_base_init_list): Remove. 8716 (current_member_init_list): Likewise. 8717 (setup_vtbl_ptr): Change prototype. 8718 (emit_base_init): Likewise. 8719 (expand_member_init): Likewise. 8720 (reinit_parse_for_function): Remove. 8721 * decl.c (save_function_data): Don't clear x_base_init_list and 8722 x_member_init_list. 8723 (mark_language_function): Don't mark them. 8724 * init.c (perform_member_init): Tweak comment. 8725 (sort_member_init): Take the list of initializers as an argument. 8726 (sort_base_init): Likewise. 8727 (emit_base_init): Likewise. 8728 (expand_member_init): Return the initializer. Don't use global 8729 variables. 8730 * lex.c (reinit_parse_for_function): Remove. 8731 * method.c (build_template_parm_names): Correct substitution. 8732 (do_build_copy_constructor): Don't use current_member_init_list 8733 and current_base_init_list. 8734 (synthesize_method): Likewise. 8735 * parse.y (base_init): Split mem-initializers into 8736 base-initializers and field-initializers. 8737 (member_init_list): Build up the list here. 8738 (member_init): Return the initializer. 8739 (fn.depfn): Don't use reinit_parse_for_function. 8740 * parse.c: Regenerated. 8741 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the 8742 ERROR_MARK. 8743 (tsubst_expr): Don't use current_member_init_list 8744 and current_base_init_list. 8745 (tsubst_expr_values): Rename to ... 8746 (tsubst_initializer_list): ... this. Use convert_from_reference. 8747 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list 8748 and current_base_init_list. 8749 (begin_function_definition): Don't call reinit_parse_for_function. 8750 8751 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors. 8752 8753 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE 8754 correctly. 8755 8756 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking. 8757 87582000-06-14 Benjamin Chelf <chelf@codesourcery.com> 8759 8760 * cp-tree.h (IF_COND): Move to c-common.h. 8761 (THEN_CLAUSE): Likewise. 8762 (ELSE_CLAUSE): Likewise. 8763 (WHILE_COND): Likewise. 8764 (WHILE_BODY): Likewise. 8765 (DO_COND): Likewise. 8766 (DO_BODY): Likewise. 8767 (RETURN_EXPR): Likewise. 8768 (EXPR_STMT_EXPR): Likewise. 8769 (FOR_INIT_STMT): Likewise. 8770 (FOR_COND): Likewise. 8771 (FOR_EXPR): Likewise. 8772 (FOR_BODY): Likewise. 8773 (SWITCH_COND): Likewise. 8774 (SWITCH_BODY): Likewise. 8775 (CASE_LOW): Likewise. 8776 (CASE_HIGH): Likewise. 8777 (GOTO_DESTINATION): Likewise. 8778 (COMPOUND_BODY): Likewise. 8779 (ASM_CV_QUAL): Likewise. 8780 (ASM_STRING): Likewise. 8781 (ASM_OUTPUTS): Likewise. 8782 (ASM_INPUTS): Likewise. 8783 (ASM_CLOBBERS): Likewise. 8784 (DECL_STMT_DECL): Likewise. 8785 (STMT_EXPR_STMT): Likewise. 8786 (LABEL_STMT_LABEL): Likewise. 8787 (SCOPE_BEGIN_P): Likewise. 8788 (SCOPE_END_P): Likewise. 8789 (SCOPE_STMT_BLOCK): Likewise. 8790 (SCOPE_NULLIFIED_P): Likewise. 8791 (SCOPE_NO_CLEANUPS_P): Likewise. 8792 (SCOPE_PARTIAL_P): Likewise. 8793 (ASM_VOLATILE_P): Likewise. 8794 (STMT_LINENO): Likewise. 8795 (STMT_LINENO_FOR_FN_P): Likewise. 8796 8797 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR, 8798 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT, 8799 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT, 8800 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT, 8801 SCOPE_STMT, CASE_LABEL, STMT_EXPR. 8802 8803 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def. 8804 8805 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def. 8806 (cc1plus$(exeext)): Added $(srcdir)/c-common.def. 8807 8808 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'. 8809 (cplus_tree_code_length[]): Added '#include "c-common.def"'. 8810 (cplus_tree_code_name[]): Added '#include "c-common.def"'. 8811 88122000-06-14 Mark Mitchell <mark@codesourcery.com> 8813 8814 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro. 8815 * class.c (dfs_find_final_overrider): Set it appropriately. 8816 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to 8817 avoid unneeded secondary vptrs. 8818 88192000-06-13 Jakub Jelinek <jakub@redhat.com> 8820 8821 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN. 8822 (check_bitfield_decl, check_field_decl): Likewise. 8823 (build_vtbl_or_vbase_field, build_base_field): Likewise. 8824 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN. 8825 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN. 8826 (xfer_tag, finish_enum): Likewise. 8827 * decl2.c (finish_builtin_type): Likewise. 8828 * init.c (init_init_processing): Likewise. 8829 * pt.c (instantiate_class_template): Likewise. 8830 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN. 8831 * cp-tree.h (struct lang_type): Add user_align member. 8832 (CLASSTYPE_USER_ALIGN): Define. 8833 8834Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl> 8835 8836 * Make-lang.in (c++.install-common): Install g++-cross in 8837 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as 8838 $(target_alias)-g++ and $(target_alias)-c++. 8839 88402000-06-12 Mark Mitchell <mark@codesourcery.com> 8841 8842 * class.c (vcall_offset_data_s): Add last_init and fns. 8843 (overrides): Rename to same_signature_p. 8844 (dfs_find_final_overrider): Adjust accordingly. 8845 (mark_overriders): Likewise. 8846 (warn_hidden): Likewise. 8847 (build_vtbl_initializer): Reorganize machinery for building things 8848 at negative offsets. 8849 (build_vcall_and_vbase_vtbl_entries): Likewise. 8850 (build_vbase_offset_vtbl_entries): Likewise. 8851 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall 8852 offset entries. Do not create two entries for functions with the 8853 same signature. 8854 (build_vcall_offset_vtbl_entries): Initialize vod->fns. 8855 (build_rtti_vtbl_entries): Reorganize machinery for building things 8856 at negative offsets. 8857 8858 * optimize.c (expand_call_inline): Don't recurse into the code 8859 used to initialize the parameters more than once. 8860 88612000-06-11 Mark Mitchell <mark@codesourcery.com> 8862 8863 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment. 8864 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here. 8865 (find_substitution): Only use the `Sa' substitution for 8866 std::allocator, not instantiations of it. 8867 (write_template_prefix): Move comment. Only use a TREE_LIST to 8868 represent substitutions for a member template. 8869 (write_array_type): Mangle array dimensions correctly. 8870 * optimize.c (maybe_clone_body): Copy more information from the 8871 cloned function. 8872 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE 8873 on the regenerated declaration. 8874 88752000-06-11 Chip Salzenberg <chip@valinux.com> 8876 Mark Mitchell <mark@codesourcery.com> 8877 8878 * class.c (build_vtable): Clarify comment. 8879 (build_ctor_vtbl_group): Pass the most derived type to 8880 build_vtable. 8881 88822000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8883 8884 * decl2.c (compare_options): Don't needlessly cast away const-ness. 8885 88862000-06-10 Mark Mitchell <mark@codesourcery.com> 8887 8888 * decl.c (add_binding): Handle duplicate declarations of external 8889 variables. 8890 88912000-06-09 Chip Salzenberg <chip@valinux.com> 8892 Mark Mitchell <mark@codesourcery.com> 8893 8894 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an 8895 argument. 8896 (write_signed_number): New macro. 8897 (write_unsigned_number): Likewise. 8898 (write_source_name): Use them. 8899 (write_number): Handle signed and unsigned values. 8900 (write_integer_cst): Use tree_int_cst_sgn, and use 8901 write_unsigned_number or write_signed_number as appropriate. 8902 (write_discriminator): Use write_unsigned_number or 8903 write_signed_number as appropriate. 8904 (write_template_arg_literal): Likewise. 8905 (write_array_type): Use tree_low_cst. 8906 (write_template_parm): Use write_unsigned_number or 8907 write_signed_number as appropriate. 8908 (write_substitution): Adjust call to write_number. 8909 (write_type): Get the TYPE_MAIN_VARIANT before mangling it. 8910 (write_expression): Handle non-type template arguments of 8911 reference type correctly. 8912 (mangle_thunk): Use write_signed_number. 8913 89142000-06-09 Chip Salzenberg <chip@valinux.com> 8915 8916 * mangle.c (find_substition): Don't mangle objects with typename 8917 substitutions (e.g. "cin" as "Si"). 8918 89192000-06-09 Zack Weinberg <zack@wolery.cumb.org> 8920 8921 * call.c (add_candidate): Use ggc_alloc_cleared. 8922 * decl.c (lookup_label): Likewise. 8923 * lex.c (retrofit_lang_decl): Likewise. 8924 89252000-06-09 Jason Merrill <jason@casey.soma.redhat.com> 8926 8927 * semantics.c (expand_body): Push to TV_EXPAND. 8928 * optimize.c (optimize_function): Push to TV_INTEGRATION. 8929 * decl.c (start_function): Always call announce_function. 8930 8931 * tinfo2.cc: Just declare abort. 8932 89332000-06-09 Gabriel Dos Reis <gdr@codesourcery.com> 8934 8935 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @' 8936 whenever @ is a symbolic name. 8937 89382000-06-08 Jakub Jelinek <jakub@redhat.com> 8939 8940 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk. 8941 89422000-06-07 Mark Mitchell <mark@codesourcery.com> 8943 8944 * decl.c (pushdecl): Look up functions by DECL_NAME, not 8945 DECL_ASSEMBLER_NAME. 8946 89472000-06-06 Mark Mitchell <mark@codesourcery.com> 8948 8949 * decl2.c (c_language): Define. 8950 89512000-06-06 Gabriel Dos Reis <gdr@codesourcery.com> 8952 8953 * lex.c (lang_init_options): Tweak. 8954 8955 * decl2.c: Remove #inclusion of diagnostic.h 8956 (lang_decode_option): Move diagnostic formatting options to 8957 toplevel. 8958 8959 * lang-options.h: Remove documentation for diagnostic options. 8960 8961 * Makefile.in (lex.o): Depends upon diagnostic.h 8962 89632000-06-06 Mark Mitchell <mark@codesourcery.com> 8964 8965 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have 8966 the same DECL_RESULT, it's not a redefinition. 8967 * pt.c (tsubst_decl): Remove code to handle illegal 8968 specializations. 8969 89702000-06-06 Nathan Sidwell <nathan@codesourcery.com> 8971 8972 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c 8973 89742000-06-05 Jason Merrill <jason@casey.soma.redhat.com> 8975 8976 * search.c (maybe_suppress_debug_info): Don't check 8977 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set. 8978 8979 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION 8980 here if extern_p. 8981 8982 Remember instantiation context in deferred instantiations. 8983 * cp-tree.h (struct tinst_level): Remove. 8984 (TINST_DECL, TINST_LINE, TINST_FILE): New macros. 8985 * pt.c (current_tinst_level): Now a tree. 8986 (print_template_context, push_tinst_level, pop_tinst_level, 8987 tinst_for_decl): Adjust. 8988 (reopen_tinst_level): New fn. 8989 (init_pt): Register current_tinst_level as a root. 8990 (add_pending_template): Put current_tinst_level in TREE_PURPOSE 8991 of the pending templates list. 8992 (instantiate_pending_templates): Adjust. Call reopen_tinst_level. 8993 * lex.c (extract_interface_info): Adjust. 8994 * decl2.c (warn_if_unknown_interface): Adjust. 8995 89962000-06-05 Mark Mitchell <mark@codesourcery.com> 8997 8998 * class.c (indirect_primary_base_p): New function. 8999 (determine_primary_base): Use it. 9000 90012000-06-05 Nathan Sidwell <nathan@codesourcery.com> 9002 9003 Update new-abi dynamic cast algorithm. 9004 * tinfo.cc (__class_type_info::__dyncast_result): Add 9005 whole_details. Adjust constructor. 9006 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags. 9007 Avoid unnecessary searching. 9008 (__dynamic_cast): Adjust for __dyncast_result::whole_details. 9009 9010Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 9011 9012 * decl.c (init_decl_processing): Don't call record_component_aliases. 9013 * tree.c (build_cplus_array_type_1): Likewise. 9014 90152000-06-04 Mark Mitchell <mark@codesourcery.com> 9016 9017 * ir.texi: Correct typo. 9018 * mangle.c (write_expression): Handle non-type template arguments 9019 with reference type. 9020 * method.c (build_overload_value): Likewise. 9021 * pt.c (convert_nontype_argument): Explicitly represent conversion 9022 to a reference with an ADDR_EXPR. 9023 (unify): Always unify arguments in left-to-right order. 9024 90252000-06-03 Alex Samuel <samuel@codesourcery.com> 9026 Mark Mitchell <mark@codesourcery.com> 9027 9028 * Make-lang.in (CXX_SRCS): Add mangle.c. 9029 * Makefile.in (CXX_OBJS): Add mangle.o. 9030 (mangle.o): New rule. 9031 9032 * class.c (local_classes): New variable. 9033 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI. 9034 (get_vtt_name): Use mangle_vtt_name for new ABI. 9035 (init_class_processing): Initialize local_classes. 9036 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI. 9037 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER. 9038 (std_identifier): New macro. 9039 (DECL_VOLATILE_MEMFUNC_P): New macro. 9040 (DECL_NAMESPACE_STD_P): Likewise. 9041 (local_classes): Declare. 9042 (get_mostly_instantiated_function_type): Declare. 9043 (init_mangle): Declare. 9044 (mangle_decl): Likewise. 9045 (mangle_type_string): Likewise. 9046 (mangle_type): Likewise. 9047 (mangle_typeinfo_for_type): Likewise. 9048 (mangle_typeinfo_string_for_type): Likewise. 9049 (mangle_vtbl_for_type): Likewise. 9050 (mangle_vtt_for_type): Likewise. 9051 (mangle_ctor_vtbl_for_type): Likewise. 9052 (mangle_thunk): Likewise. 9053 (mangle_conv_op_name_for_type): Likewise. 9054 (mangle_guard_variable): Likewise. 9055 * decl.c (pushtag): Keep track of local classes. 9056 (initialize_predefined_identifiers): Initialize std_identifier. 9057 (init_decl_processing): Use std_identifier. 9058 (start_decl): Don't treat instantiations as specializations. 9059 (grokdeclarator): Likewise. 9060 (grokvardecl): Call mangle_decl for new ABI. Only set mangled 9061 name for fully-instantiated templates. 9062 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for 9063 destructors with the new ABI. 9064 (finish_static_data_member_decl): Use mangle_decl under the new ABI. 9065 (grokfield): Use mangle_type for new ABI. 9066 (grokoptypename): Use mangle_conv_op_for_type for new ABI. 9067 (get_sentry): Use mangle_guard_variable for new ABI. 9068 (start_static_initialization_or_destruction): Likewise. 9069 * expr.c (extract_aggr_init): Remove. 9070 (extract_scalar_init): Likewise. 9071 (extract_init): Remove #if 0'd code. 9072 * mangle.c: New function. 9073 * method.c (build_mangled_name): Assert not flag_new_abi. 9074 (build_static_name): Likewise. 9075 (build_decl_overload_real): Likewise. 9076 (build_typename_overload): Likewise. 9077 (build_overload_with_type): Likewise. 9078 (build_overload_name): Likewise. 9079 (get_ctor_vtbl_name): Likewise. 9080 (start_squangling): Likewise. 9081 (get_id_2): Likewise. 9082 (set_mangled_name_for_decl): Call mangle_decl for new ABI. 9083 (init_method): Call init_mangle for new ABI. 9084 (make_thunk): Call mangle_thunk for new ABI. 9085 * operators.def: Correct new ABI manglings for the `%' operator. 9086 Add `::' operator. 9087 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and 9088 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL. 9089 (lookup_template_class): Call mangle_decl for new ABI. 9090 (get_mostly_instantiated_function_type): New function. 9091 (set_mangled_name_for_template_decl): Use it. 9092 (tsubst_decl): Use set_mangled_name_for_decl for destructors with 9093 the new ABI. Use mangle_conv_op_name_for_type for instantiated 9094 conversion op names. 9095 * rtti.c (tinfo_name): Call mangle_type_string for new ABI. 9096 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI. 9097 (tinfo_base_init): Likewise. Mangle typeinfo string name with 9098 mangle_typeinfo_string_for_type. 9099 91002000-06-03 Mark Mitchell <mark@codesourcery.com> 9101 9102 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment. 9103 (INNERMOST_TEMPLATE_ARGS): New macro. 9104 (innermost_args): Remove. 9105 (get_innermost_template_args): New function. 9106 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS. 9107 * error.c (dump_function_decl): Be caution when using 9108 most_general_template. 9109 * method.c (build_template_parm_names): Use 9110 INNERMOST_TEMPLATE_ARGS. 9111 * pt.c (add_to_template_args): Tidy comment 9112 (get_innermost_template_args): New function. 9113 (check_explicit_specialization): Clear DECL_INITIAL for a new 9114 specialization. 9115 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS. 9116 Tidy. 9117 (push_template_decl): Always register specializations of the most 9118 general template. 9119 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS. 9120 (coerce_template_parms): Likewise. 9121 (lookup_template_class): Likewise. 9122 (innermost_args): Remove. 9123 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS. 9124 (tsubst_decl): Handle tricky specializations. Use 9125 get_innermost_template_args. 9126 (instantiate_template): Simplify handling of partial 9127 instantiations. 9128 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS. 9129 (most_general_template): Reimplement, in a more straightforward 9130 manner. 9131 (regenerate_decl_from_template): Tweak formatting. Use 9132 TMPL_ARGS_DEPTH for clarity. 9133 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS. 9134 9135 * dump.c (dequeue_and_dump): Dump information about thunks. 9136 91372000-06-01 Richard Henderson <rth@cygnus.com> 9138 9139 * decl.c (init_decl_processing): Set lang_get_alias_set first thing. 9140 91412000-06-01 Richard Henderson <rth@cygnus.com> 9142 9143 * decl2.c (unsupported_options): Fix typo, make const. 9144 (lang_decode_option): Fix bsearch argument order. 9145 91462000-06-01 Mark Mitchell <mark@codesourcery.com> 9147 9148 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE 9149 on FIELD_DECLs. 9150 9151Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 9152 9153 * cp-tree.h (c_get_alias_set): Deleted. 9154 * Makefile.in (decl.o): Include ../expr.h. 9155 * decl.c (expr.h): Include. 9156 (init_decl_processing): Call record_component_aliases for arrays. 9157 (grokdeclarator): Likewise. 9158 Set TREE_ADDRESSABLE for fields that aren't bitfields. 9159 * tree.c (build_cplus_array_type_1): Call record_component_aliases. 9160 91612000-05-31 Mark Mitchell <mark@codesourcery.com> 9162 9163 Remove guiding declaration support. 9164 * cp/cp-tree.h (flag_dump_translation_unit): Make it const. 9165 (flag_guiding_decls): Remove. 9166 * call.c (build_user_type_conversion_1): Remove support for 9167 guiding decls. 9168 (build_new_function_call): Likewise. 9169 (build_new_op): Likewise. 9170 (build_new_method_call): Likewise. 9171 * decl.c (start_function): Likewise. 9172 * friend.c (is_friend): Likewise. 9173 (do_friend): Likewise. 9174 * decl2.c ((flag_dump_translation_unit): Make it const. 9175 (flag_guiding_decls): Remove. 9176 (unsupported_options): New variable 9177 (compare_options): New function. 9178 (lang_decode_option): Use them. 9179 9180 * decl.c (build_cp_library_fn): Set DECL_CONTEXT. 9181 9182 * method.c (mangle_expression): Adjust test for legal expression 9183 operators. 9184 9185 * pt.c (instantiate_decl): Save and restore the local 9186 specializations list. 9187 91882000-05-30 Jason Merrill <jason@decepticon.cygnus.com> 9189 9190 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING. 9191 91922000-05-30 Mark Mitchell <mark@codesourcery.com> 9193 9194 * call.c (add_template_candidate_real): Handle member template 9195 constructors for classes with virtual bases. 9196 (build_user_type_conversion_1): Use in_charge_arg_for_name. 9197 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P. 9198 9199 * ir.texi: Update thunk documentation. 9200 9201 * call.c (joust): Fix handling of overloaded builtin operators. 9202 92032000-05-30 Zack Weinberg <zack@wolery.cumb.org> 9204 9205 * cp-tree.h (DECL_ANTICIPATED): New macro. 9206 Document new use of DECL_LANG_FLAG_7. 9207 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins 9208 in the user namespace. 9209 * lex.c (do_identifier): If the identifier's declaration has 9210 DECL_ANTICIPATED on, it has not yet been declared. But do not 9211 replace it with an ordinary implicit declaration. 9212 9213 * tinfo2.cc: Include stdlib.h. 9214 92152000-05-29 Mark Mitchell <mark@codesourcery.com> 9216 9217 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro. 9218 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not 9219 CLASSTYPE_ALIGN. 9220 92212000-05-28 Gabriel Dos Reis <gdr@codesourcery.com> 9222 9223 * decl2.c (lang_decode_option): Use skip_leading_substring instead 9224 of plain strncmp. 9225 92262000-05-28 Alexandre Oliva <aoliva@cygnus.com> 9227 9228 * operators.def (<?): Duplicated, should have been... 9229 (>?): this. Fixed. 9230 92312000-05-27 Alex Samuel <samuel@codesourcery.com> 9232 Mark Mitchell <mark@codesourcery.com> 9233 9234 * cp-tree.h (ansi_opname): Make it a macro. 9235 (ansi_assopname): Likewise. 9236 (struct lang_decl_flags): Add assignment_operator_p. 9237 (struct lang_decl): Add operator_code. 9238 (DECL_VTT_PARM): Adjust. 9239 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an 9240 overloaded operator. 9241 (SET_OVERLOADED_OPERATOR_CODE): New macro. 9242 (DECL_ASSIGNMENT_OPERATOR_P): New macro. 9243 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust. 9244 (opname_tab): Remove. 9245 (assignop_tab): Likewise. 9246 (operator_name_info_t): New type. 9247 (operator_name_info): New variable. 9248 (assignment_operator_name_info): Likewise. 9249 (build_cp_library_fn): Remove declaration. 9250 (push_cp_library_fn): Likewise. 9251 (operator_name_string): Likewise. 9252 (build_decl_overload): Likewise. 9253 * call.c (print_z_candidates): Simplify. 9254 (build_object_call): Adjust usage of ansi_opname. Use 9255 DECL_OVERLOADED_OPERATOR_P. 9256 (op_error): Adjust operator name lookup. 9257 (build_conditional_expr): Adjust usage of ansi_opname. 9258 (build_new_op): Likewise. 9259 (build_op_delete_call): Likewise. 9260 (build_over_call): Likewise. 9261 (joust): Use DECL_OVERLOADED_OPERATOR_P. 9262 * decl.c (duplicate_decls): Copy operator_code. 9263 (init_decl_processing): Adjust parameters to push_cp_library_fn. 9264 (builtin_function): Adjust parameters to build_library_fn_1. 9265 (build_library_fn_1): Accept an overloaded operator code. 9266 (build_library_fn): Pass ERROR_MARK. 9267 (build_cp_library_fn): Accept an overloaded operator code. 9268 (push_cp_library_fn): Likewise. 9269 (grokfndecl): Tweak. 9270 (grokdeclarator): Simplify code to compute names of overloaded 9271 operators. Adjust use of ansi_opname. 9272 (ambi_op_p): Work on tree_codes, not identifiers. 9273 (unary_op_p): Likewise. 9274 (grok_op_properties): Likewise. 9275 (start_function): Use DECL_OVERLOADED_OPERATOR_P. 9276 (lang_mark_tree): Don't try to mark the operator_code. 9277 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P. 9278 * error.c (dump_decl): Remove special handling for operator 9279 names. 9280 (dump_function_name): Likewise. 9281 (dump_expr): Adjust name lookup of operators. 9282 (op_to_string): Simplify. 9283 (assop_to_string): Likewise. 9284 * init.c (build_new_1): Adjust use of ansi_opname. 9285 * lex.c (opname_tab): Remove. 9286 (assignop_tab): Likewise. 9287 (ansi_opname): Likewise. 9288 (ansi_assopname): Likewise. 9289 (operator_name_string): Likewise. 9290 (reinit_lang_specific): Likewise. 9291 (operator_name_info): New variable. 9292 (assignment_operator_name_info): Likewise. 9293 (init_operators): New function. 9294 (init_parse): Use it. 9295 (do_identifier): Adjust use of ansi_opname. 9296 * method.c (mangle_expression): Don't use ansi_opname for 9297 mangling. 9298 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P. 9299 (build_decl_overload): Remove. 9300 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly. 9301 (do_build_assign_ref): Adjust use of ansi_opname. 9302 (synthesize_method): Likewise. 9303 (implicitly_declare_fn): Likewise. 9304 * operators.def: New file. 9305 * parse.y (operator): Adjust use of ansi_opname. 9306 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P. 9307 (set_mangled_name_for_template_decl): Don't play games with 9308 current_namespace. 9309 (special_function_p): Adjust use of ansi_opname. 9310 * typeck.c (check_return_expr): Likewise. 9311 * Make-lang.in (cc1plus): Depend on operators.def. 9312 * Makefile.in (lex.o): Likewise. 9313 (decl.o): Likewise. 9314 93152000-05-27 Zack Weinberg <zack@wolery.cumb.org> 9316 9317 * Make-lang.in (cplib2.ready): Eradicate. 9318 9319Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 9320 9321 * method.c (mangle_expression): Use TREE_CODE_LENGTH. 9322 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH. 9323 (built_min, cp_tree_equal): Likewise. 9324 93252000-05-26 Mark Mitchell <mark@codesourcery.com> 9326 9327 * class.c (layout_nonempty_base_or_field): Replace 9328 `record_layout_info' with `record_layout_info_s'. 9329 93302000-05-26 Jason Merrill <jason@casey.soma.redhat.com> 9331 9332 Fix goto checking. 9333 * cp-tree.h (struct language_function): x_named_labels is now 9334 a struct named_label_list*. 9335 * decl.c (struct named_label_use_list): Renamed from... 9336 (struct named_label_list): ...this. New struct. 9337 (push_binding_level): Don't set eh_region. 9338 (note_level_for_eh): New fn. 9339 (pop_label): Take label and old value directly. 9340 (pop_labels): Adjust for new named_labels format. 9341 (lookup_label): Likewise. 9342 (poplevel): Note characteristics of a binding level containing a 9343 named label. Mess with named label lists earlier. 9344 (mark_named_label_lists): New fn. 9345 (mark_lang_function): Call it. 9346 (use_label): New fn, split out from... 9347 (make_label_decl): ...here. Don't call it. 9348 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1, 9349 check_previous_gotos): New fns, split out from... 9350 (define_label): ...here. 9351 (check_switch_goto): New fn. 9352 (define_case_label): Call it. 9353 (check_goto): New fn. 9354 * semantics.c (finish_goto_stmt): Call it and use_label. 9355 (begin_compound_stmt): If we're a try block, call note_level_for_eh. 9356 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings. 9357 93582000-05-26 Mark Mitchell <mark@codesourcery.com> 9359 9360 * class.c (build_vtable_entry_ref): Correct usage of 9361 get_vtbl_decl_for_binfo. 9362 9363 * decl2.c (grokclassfn): Set DECL_LANGUAGE here. 9364 * method.c (implicitly_declare_fn): Not here. 9365 93662000-05-26 Nathan Sidwell <nathan@codesourcery.com> 9367 9368 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ... 9369 (CPTI_PTMD_DESC_TYPE): ... here. 9370 (ptmd_desc_type_node): Rename to ... 9371 (ptm_desc_type_node): ... here. 9372 * decl.c: Likewise. 9373 * rtti.c (ptmd_initializer): Rename to ... 9374 (ptm_initializer): ... here. 9375 (sythesize_tinfo_var): Adjust. Deal with pointer to member 9376 function. 9377 (create_tinfo_types): Adjust. 9378 93792000-05-25 Mark Mitchell <mark@codesourcery.com> 9380 9381 Finish implementation of VTTs. 9382 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and 9383 CPTI_VTT_PARM_IDENTIFIER. 9384 (vtt_parm_identifier): New macro. 9385 (vtt_parm_type): Likewise. 9386 (BINFO_SUBVTT_INDEX): Likewise. 9387 (BINFO_VPTR_INDEX): Likewise. 9388 (struct lang_decl): Add vtt_parm. 9389 (DECL_VTT_PARM): New macro. 9390 (DECL_USE_VTT_PARM): Likewise. 9391 (DECL_NEEDS_VTT_PARM_P): Likewise. 9392 (get_vtt_name): Declare. 9393 (build_artificial_parm): Likewise. 9394 (fixup_all_virtual_upcast_offsets): Likewise. 9395 (expand_indirect_vtbls_init): Remove. 9396 * call.c (build_new_method_call): Pass the vtt to subobject 9397 constructors and destructors. 9398 * class.c (get_vtt_name): Give it external linkage. 9399 (build_clone): Handle the magic VTT parameters for clones. 9400 (clone_function_decl): Fix typo in comment. 9401 (build_vtt): Keep track of the indices in the VTTs where various 9402 entities are stored. 9403 (build_vtt_inits): Likewise. 9404 (dfs_build_vtt_inits): Likewise. 9405 (build_ctor_vtbl_group): Tweak type of construction vtables. 9406 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even 9407 primary bases, when building construction vtables. 9408 * decl.c (duplicate_decls): Handle DECL_VTT_PARM. 9409 (initialize_predefined_identifiers): Add vtt_parm_identifier. 9410 (init_decl_processing): Initialize vtt_parm_type. 9411 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P. 9412 (lang_mark_tree): Make vtt_parm. 9413 * decl2.c (build_artificial_parm): New function. 9414 (maybe_retrofit_in_chrg): Use it. Add VTT parameters. 9415 (grokclassfn): Use build_artificial_parm. 9416 * init.c (initialize_vtbl_ptrs): Call 9417 fixup_all_virtual_upcast_offsets directly. 9418 (perform_member_init): Use the complete subobject destructor for 9419 member cleanups. 9420 (build_vtbl_address): New function. 9421 (expand_virtual_init): Handle VTTs. 9422 * optimize (maybe_clone_body): Likewise. 9423 * search.c (fixup_all_virtual_upcast_offsets): Give it external 9424 linkage. 9425 (expand_indirect_vtbls_init): Remove. 9426 * semantics.c (setup_vtbl_ptr): Fix typos in comment. 9427 * tree.c (make_binfo): Make them bigger. 9428 94292000-05-25 Nathan Sidwell <nathan@codesourcery.com> 9430 9431 * inc/cxxabi.h (__pbase_type_info): Define, based on 9432 __pointer_type_info. 9433 (__pointer_type_info): Derive from __pbase_type_info. Adjust. 9434 (__pointer_to_member_type_info): Likewise. 9435 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement. 9436 (__pointer_to_member_type_info::__is_pointer_p): Remove. 9437 (__pointer_type_info::__do_catch): Rename to ... 9438 (__pbase_type_info::__do_catch): ... here. Adjust. 9439 (__pbase_type_info::__pointer_catch): Implement. 9440 (__pointer_type_info::__pointer_catch): Adjust. 9441 (__pointer_to_member_type_info::__pointer_catch): Adjust. 9442 94432000-05-25 Nathan Sidwell <nathan@codesourcery.com> 9444 9445 * tinfo.h (__user_type_info::contained_virtual_p): New 9446 predicate. 9447 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond 9448 shaped hierarchy. 9449 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to 9450 diamond shaped hierarchy. Add early out for mixed diamond and 9451 duplicate shaped hierarchy. 9452 94532000-05-24 Mark Mitchell <mark@codesourcery.com> 9454 9455 * cp-tree.h (build_delete): Change prototype. 9456 (build_vec_delete): Likewise. 9457 * call.c (build_scoped_method_call): Use special_function_kind 9458 values to indicate the kind of destruction to be done. 9459 (build_method_call): Likewise. 9460 * decl.c (finish_destructor_body): Likewise. 9461 (maybe_build_cleanup_1): Likewise. Rename to ... 9462 (maybe_build_cleanup): ... this. 9463 * decl2.c (delete_sanity): Use special_function_kind 9464 values to indicate the kind of destruction to be done. 9465 (build_cleanup): Likewise. 9466 * init.c (perform_member_init): Likewise. 9467 (build_vec_delete_1): Likewise. 9468 (build_dtor_call): Simplify. 9469 (build_delete): Use special_function_kind 9470 values to indicate the kind of destruction to be done. 9471 (build_vbase_delete): Likewise. 9472 (build_vec_delete): Likewise. 9473 9474 * init.c (sort_member_init): Fix typo in error message generation 9475 code. 9476 9477Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com> 9478 9479 * semantics.c (begin_class_definition): make the packed 9480 attribute be sensitive to the "-fpack-struct" command line flag 9481 94822000-05-24 Nathan Sidwell <nathan@codesourcery.com> 9483 9484 Update new-abi upcast algorithm. 9485 * inc/cxxabi.h (__class_type_info::__do_upcast): Change 9486 prototype and meaning of return value. 9487 (__si_class_type_info::__do_upcast): Likewise. 9488 (__vmi_class_type_info::__do_upcast): Likewise. 9489 * tinfo.cc (__class_type_info::__upcast_result): Replace 9490 whole2dst with part2dst. Adjust ctor. 9491 (__class_type_info::__do_upcast): Adjust call of worker function. 9492 (__class_type_info::__do_upcast): Adjust. 9493 (__si_class_type_info::__do_upcast): Adjust. Use parent's 9494 __do_upcast. 9495 (__vmi_class_type_info::__do_upcast): Likewise. Fix private 9496 virtual base in diamond hierarchy bug. 9497 94982000-05-23 Mark Mitchell <mark@codesourcery.com> 9499 9500 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable 9501 and bitfield to tinfo_fn_p. 9502 (DECL_TINFO_FN_P): Adjust. 9503 (SET_DECL_TINFO_FN_P): Likewise. 9504 (DECL_MUTABLE_P): Likewise. 9505 (DECL_C_BIT_FIELD): Likewise. 9506 (SET_DECL_C_BIT_FIELD): Likewise. 9507 (CLEAR_DECL_C_BIT_FIELD): Likewise. 9508 (DECL_UNINLINABLE): Likewise. 9509 * class.c (alter_access): Call retrofit_lang_decl if ncessary. 9510 (handle_using_decl): Remove assertion. 9511 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl, 9512 to build FIELD_DECLs. 9513 (build_base_field): Likewise. 9514 (layout_class_type): Likewise. 9515 * decl.c (init_decl_processing): Likewise. 9516 (build_ptrmemfunc_type): Likewise. 9517 (grokdeclarator): Likewise. 9518 * decl2.c (grok_x_components): Likewise. 9519 * except.c (call_eh_info): Likewise. 9520 * init.c (init_init_processing): Likewise. 9521 * rtti.c (expand_class_desc): Likewise. 9522 (create_pseudo_type_info): Likewise. 9523 (get_vmi_pseudo_type_info): Likewise. 9524 (create_tinfo_types): Likewise. 9525 * ptree.c (print_lang_decl): Adjust. 9526 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC 9527 before checking DECL_MUTABLE_P. 9528 9529 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge 9530 parameters for template functions. 9531 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for 9532 destructors as well as constructors. 9533 95342000-05-22 Mark Mitchell <mark@codesourcery.com> 9535 9536 * class.c (build_ctor_vtbl_group): Set inits. 9537 * optimize.c (maybe_clone_body): Set DECL_INLINE and 9538 DECL_THIS_INLINE appropriately for clones. 9539 9540 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp. 9541 (DECL_CONV_FN_P): Simplify. 9542 (DECL_OPERATOR): Remove. 9543 (language_to_string): Declare. 9544 * decl.c (duplicate_decls): Fix typo in comment. 9545 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P. 9546 (grok_op_properties): Use DECL_CONV_FN_P instead of 9547 IDENTIFIER_TYPENAME_P. 9548 * dump.c (dequeue_and_dump): Dump the language linkage of 9549 declarations. 9550 * error.c (language_to_string): Give it external linkage. 9551 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P. 9552 (implicitly_declare_fn): Set DECL_LANGUAGE. 9553 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not 9554 IDENTIFIER_TYPENAME_P. 9555 (tsubst_decl): Likewise. 9556 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P. 9557 * semantics.c (finish_member_declaration): Don't mark members of 9558 classes declared in an extern "C" region as extern "C". 9559 95602000-05-22 Martin v. L�wis <loewis@informatik.hu-berlin.de> 9561 9562 * decl2.c (qualified_lookup_using_namespace): Look through 9563 namespace aliases. 9564 9565 * decl.c (push_using_decl): Return the old decl on namespace level. 9566 95672000-05-21 Mark Mitchell <mark@codesourcery.com> 9568 9569 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks. 9570 (VTT_NAME_PREFIX): New macro. 9571 (CTOR_VTBL_NAME_PREFIX): Likewise. 9572 (get_ctor_vtbl_name): New function. 9573 * class.c (get_vtable_name): Simplify. 9574 (get_vtt_name): New function. 9575 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE. 9576 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list 9577 when a virtual base becomes primary. 9578 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build 9579 VTTs. 9580 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in 9581 additional parameters. 9582 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED. 9583 (initialize_array): New function. 9584 (build_vtt): Likewise. 9585 (build_vtt_inits): Likewise. 9586 (dfs_build_vtt_inits): Likewise. 9587 (dfs_fixup_binfo_vtbls): Likewise. 9588 (build_ctor_vtbl_group): Likewise. 9589 (initialize_vtable): Use initialize_array. 9590 (accumulate_vtbl_inits): Reimplement to handle construction 9591 vtables. 9592 (dfs_accumulate_vtbl_inits): Likewise. 9593 (bulid_vtbl_initializer): Adjust parameter name. 9594 * method.c (build_typename_overload): Remove #if 0'd code. 9595 (get_ctor_vtbl_name): New function. 9596 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES. 9597 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo. 9598 9599 * cp-tree.h (struct lang_type): Remove search_slot. 9600 (CLASSTYPE_SEARCH_SLOT): Remove. 9601 (emit_base_init): Change prototype. 9602 (initialize_vtbl_ptrs): Likewise. 9603 (expand_indirect_vtbls_init): Likewise. 9604 (clear_search_slots): Remove. 9605 * decl.c (lang_mark_tree): Don't mark search_slot. 9606 * init.c (initialize_vtbl_ptrs): Simplify. 9607 (emit_base_init): Likewise. 9608 * search.c (struct vbase_info): Document decl_ptr. 9609 (convert_pointer_to_single_level): Remove. 9610 (dfs_find_vbases): Remove. 9611 (dfs_init_base_pointers): Simplify. 9612 (dfs_clear_vbase_slots): Remove. 9613 (dfs_vtable_path_unmark): New function. 9614 (init_vbase_pointers): Simplify. 9615 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT. 9616 (expand_indirect_vtbls_init): Simplify. Don't call 9617 mark_all_temps_used. 9618 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and 9619 initialize_vtbl_ptrs. 9620 96212000-05-20 Zack Weinberg <zack@wolery.cumb.org> 9622 9623 * except.c: Add static prototypes. 9624 96252000-05-20 H.J. Lu <hjl@gnu.org> 9626 9627 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext). 9628 96292000-05-19 Mark Mitchell <mark@codesourcery.com> 9630 9631 Don't create a separate copy of virtual bases for the 9632 CLASSTYPE_VBASECLASSES list. 9633 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation. 9634 (BINFO_FOR_VBASE): Remove. 9635 (CANONICAL_BINFO): Adjust. 9636 (binfo_for_vbase): New function. 9637 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase 9638 instead of BINFO_FOR_VBASE. 9639 (build_vbase_pointer): Likewise. 9640 (build_secondary_vtable): Likewise. 9641 (dfs_mark_primary_bases): Likewise. 9642 (mark_primary_bases): Likewise. 9643 (layout_nonempty_base_or_field): Likewise. 9644 (dfs_set_offset_for_shared_vbases): Likewise. 9645 (dfs_set_offset_for_unshared_vbases): Likewise. 9646 (layout_virtual_bases): Likewise. Adjust for changes to the 9647 CLASSTYPE_VBASECLASSES list. 9648 (dump_class_hierarchy_r): Use binfo_for_vbase 9649 instead of BINFO_FOR_VBASE. 9650 (dump_class_hierarchy): Likewise. 9651 (finish_vtbls): Likewise. 9652 (build_vtbl_initializer): Adjust for changes to the 9653 CLASSTYPE_VBASECLASSES list. 9654 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase. 9655 * decl.c (finish_destructor_body): Adjust for changes to the 9656 CLASSTYPE_VBASECLASSES list. 9657 * init.c (sort_base_init): Use binfo_for_vbase. 9658 (construct_virtual_bases): Adjust for changes to the 9659 CLASSTYPE_VBASECLASSES list. 9660 (expand_member_init): Use binfo_for_vbase. 9661 (build_vbase_delete): Adjust for changes to the 9662 CLASSTYPE_VBASECLASSES list. 9663 * method.c (do_build_copy_constructor): Likewise. 9664 * rtti.c (get_base_offset): Use binfo_for_vbase. 9665 (expand_class_desc): Remove #if 0'd code. 9666 * search.c (struct vbase_info): Remove vbase_types. 9667 (get_base_distance): Use binfo_for_vbase. 9668 (lookup_field_queue_p): Use CANONICAL_BINFO. 9669 (get_shared_vbase_if_not_primary): Use binfo_for_vbase. 9670 (get_pure_virtuals): Adjust for changes to the 9671 CLASSTYPE_VBASECLASSES list. 9672 (dfs_find_vbases): Use binfo_for_vbase. 9673 (dfs_init_vbase_pointers): Likewise. 9674 (init_vbase_pointers): Don't initialize vi.vbase_types. 9675 (virtual_context): Use binfo_for_vbase. 9676 (fixup_all_virtual_upcast_offsets): Adjust for changes to the 9677 CLASSTYPE_VBASECLASSES list. 9678 (expand_indirect_vtbls_init): Simplify. 9679 (dfs_get_vbase_types): Don't replicate virtual bases. 9680 (find_vbase_instance): Use binfo_for_vbase. 9681 (binfo_for_vbase): New function. 9682 * typeck.c (get_delta_difference): Use binfo_for_vbase. 9683 96842000-05-17 Mark Mitchell <mark@codesourcery.com> 9685 9686 * decl2.c (finish_anon_union): Generalize error messages to handle 9687 anonymous structures. 9688 * init.c (perform_member_init): Remove `name' parameter. 9689 (build_field_list): New function. 9690 (sort_member_init): Handle anonymous union initialization order 9691 correctly. Check for multiple initializations of the same union. 9692 (emit_base_init): Don't look up fields by name here. 9693 (expand_member_init): Record the result of name lookup for future 9694 reference. 9695 * typeck.c (build_component_ref): Fix formatting. 9696 9697Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com> 9698 9699 * decl.c (pop_label): Replace warn_unused with warn_unused_label. 9700 * typeck.c (build_x_compound_expr): Replace warn_unused with 9701 warn_unused_value. 9702 9703 * decl2.c (lang_decode_option): Update -Wall unused flags by 9704 calling set_Wunused. 9705 97062000-05-16 Mark Mitchell <mark@codesourcery.com> 9707 9708 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation. 9709 * init.c (dfs_vtable_path_unmark): Remove. 9710 * search.c (marked_new_vtable_p): Likewise. 9711 (unmarked_new_vtable_p): Likewise. 9712 (dfs_search_slot_nonempty_p): Likewise. 9713 (dfs_mark): Likewise. 9714 (dfs_vtable_path_unmark): Likewise. 9715 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED. 9716 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED. 9717 (dfs_init_vbase_pointers): Remove special-case new ABI code. 9718 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED. 9719 (init_vbase_pointers): Simplify. 9720 (expand_indirect_vtbls_init): Likewise. 9721 9722 * class.c (copy_virtuals): New function. 9723 (build_primary_table): Use it. 9724 (build_secondary_vtable): Likewise. 9725 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to 9726 indicate that no vcall offset is required. 9727 (add_virtual_function): Likewise. 9728 (modify_all_vtables): Likewise. 9729 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer. 9730 (dfs_accumulate_vtbl_inits): Likewise. 9731 (build_vtbl_initializer): Make changes to handle construction 9732 vtables. 9733 (dfs_build_vcall_offset_vtbl_entries): Likewise. 9734 (build_rtti_vtbl_entries): Likewise. 9735 (build_vtable_entries): Handle a NULL vcall_index. 9736 97372000-05-15 Gabriel Dos Reis <gdr@codesourcery.com> 9738 9739 * decl2.c (lang_decode_option): Fix thinko. 9740 97412000-05-14 Jason Merrill <jason@casey.cygnus.com> 9742 9743 * except.c (check_handlers): New fn. 9744 * cp-tree.h: Declare it. 9745 * semantics.c (finish_handler_sequence): Call it. 9746 (finish_function_handler_sequence): Likewise. 9747 (finish_handler_parms): Set TREE_TYPE on the handler. 9748 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro. 9749 * search.c (get_base_distance_recursive): If protect>1, ignore 9750 special access. 9751 (get_base_distance): Don't reduce watch_access. 9752 97532000-05-13 Gabriel Dos Reis <gdr@codesourcery.com> 9754 9755 * lex.c: #include diagnostic.h. 9756 (lang_init_options): Set default prefixing rules. 9757 9758 * lang-options.h: Add -fdiagnostics-show-location=. 9759 9760 * decl2.c: #include diagnostic.h. 9761 (lang_decode_option): Handle -fdiagnostics-show-location=. 9762 97632000-05-12 Nathan Sidwell <nathan@codesourcery.com> 9764 9765 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes. 9766 * vec.cc: Revert my 2000-05-07 change. 9767 97682000-05-11 Jason Merrill <jason@casey.cygnus.com> 9769 9770 * class.c (check_field_decls): Complain about non-static data 9771 members with same name as class in class with constructor. 9772 97732000-05-10 Jason Merrill <jason@casey.cygnus.com> 9774 9775 * decl.c (grokdeclarator): Allow non-static data members with 9776 same name as class. 9777 97782000-05-09 Zack Weinberg <zack@wolery.cumb.org> 9779 9780 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file, 9781 and pending_inline.filename. Update prototypes. 9782 * decl.c (define_label): Constify filename parameter. 9783 * decl2.c (warn_if_unknown_interface): Constify local char *. 9784 * input.c Constify input_source.filename. Don't declare 9785 input_filename or lineno. Constify filename parameter to feed_input. 9786 * lex.c (init_parse): Constify parameter and return value. 9787 (cp_pragma_interface, cp_pragma_implementation): Constify 9788 filename argument. 9789 (reinit_parse_for_method, reinit_parse_for_block, 9790 reinit_parse_for_expr, feed_defarg, handle_cp_pragma): 9791 Constify local char *. 9792 * pt.c: Don't declare lineno or input_filename. 9793 (print_template_context, tsubst_friend_function, tsubst_decl, 9794 tsubst, instantiate_decl): Constify local char *. 9795 * semantics.c (expand_body): Constify local char *. 9796 * tree.c (build_srcloc): Constify filename parameter. 9797 * typeck.c (c_expand_asm_operands): Constify filename 9798 parameter. 9799 98002000-05-08 Nathan Sidwell <nathan@codesourcery.com> 9801 9802 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix 9803 offsetof expansion. 9804 98052000-05-08 Branko Cibej <branko.cibej@hermes.si> 9806 9807 * inc/cxxabi.h: Fix typos in comment. 9808 (__base_class_info::__offset): Use a static_cast. 9809 98102000-05-07 Nathan Sidwell <nathan@codesourcery.com> 9811 9812 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place 9813 of std::size_t and std::ptrdiff_t respectively. 9814 * tinfo.cc: Likewise. 9815 * vec.cc: Likewise. 9816 98172000-05-06 Richard Henderson <rth@cygnus.com> 9818 9819 * typeck.c (build_c_cast): Don't warn integer->pointer size 9820 mismatch for constants. 9821 98222000-05-06 Nathan Sidwell <nathan@codesourcery.com> 9823 9824 * rtti.c (ptmd_initializer): Set non-public, if class is 9825 incomplete. 9826 9827 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++". 9828 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, 9829 __cxa_vec_delete): Likewise. 9830 * tinfo.cc (__dynamic_cast): Likewise. 9831 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, 9832 __cxa_vec_delete): Likewise. 9833 98342000-05-04 Mark Mitchell <mark@codesourcery.com> 9835 9836 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove. 9837 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise. 9838 (lang_decl_flags): Add vcall_offset. 9839 (THUNK_VCALL_OFFSET): Use it. 9840 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk. 9841 * method.c (make_thunk): Create the lang_decl here, not in 9842 emit_thunk. 9843 (emit_thunk): Make generic thunks into ordinary functions once 9844 they have been fed to expand_body. 9845 * semantics.c (expand_body): Set current_function_is_thunk here. 9846 98472000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 9848 9849 * class.c (update_vtable_entry_for_fn): Prototype. 9850 9851 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl' 9852 and `tmpl'. 9853 9854 * search.c (dfs_build_inheritance_graph_order): Prototype. 9855 98562000-05-04 Mark Mitchell <mark@codesourcery.com> 9857 9858 * cp-tree.h (special_function_kind): Add various kinds of 9859 destructors. 9860 (special_function_p): New function. 9861 * class.c (overrides): Don't let one kind of destructor override 9862 another. 9863 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding 9864 whether or not to instantiate a template. 9865 * tree.c (special_function_p): Define. 9866 98672000-05-03 Mark Mitchell <mark@codesourcery.com> 9868 9869 * cp-tree.def (THUNK_DECL): Remove. 9870 * cp-tree.h (DECL_THUNK_P): New macro. 9871 (DECL_NON_THUNK_FUNCTION_P): Likewise. 9872 (DECL_EXTERN_C_FUNCTION_P): Likewise. 9873 (SET_DECL_THUNK_P): Likewise. 9874 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P. 9875 (FNADDR_FROM_VTABLE_ENTRY): Likewise. 9876 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P. 9877 * decl.c (decls_match): Use DECL_EXTERN_C_P. 9878 (duplicate_decls): Likewise. 9879 (pushdecl): Likewise. Adjust thunk handling. 9880 (grokfndecl): Use DECL_EXTERN_C_P. 9881 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P. 9882 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling. 9883 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P. 9884 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling. 9885 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set 9886 DECL_NO_STATIC_CHAIN. 9887 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't 9888 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk. 9889 * search.c (covariant_return_p): Remove THUNK_DECL handling. 9890 * ir.texi: Update. 9891 98922000-05-01 Jason Merrill <jason@casey.cygnus.com> 9893 9894 * tree.c (walk_tree): Set lineno. 9895 98962000-05-01 Mark Mitchell <mark@codesourcery.com> 9897 9898 * exception.cc: Update license notice. 9899 * new.cc: Likewise. 9900 * new1.cc: Likewise. 9901 * new2.cc: Likewise. 9902 * tinfo.cc: Likewise. 9903 * tinfo2.cc: Likewise. 9904 * vec.cc: Likewise. 9905 * inc/cxxabi.h: Likewise. 9906 * inc/exception: Likewise. 9907 * inc/new: Likewise. 9908 * inc/new.h: Likewise. 9909 * inc/typeinfo: Likewise. 9910 99112000-05-01 Jason Merrill <jason@casey.cygnus.com> 9912 9913 * tree.c (build_target_expr_with_type): If we already have a 9914 TARGET_EXPR, just return it. 9915 9916 * optimize.c (initialize_inlined_parameters): Don't generate an 9917 EXPR_STMT if we can just use DECL_INITIAL. 9918 * decl.c (emit_local_var): Only make the initialization a 9919 full-expression if stmts_are_full_exprs_p. 9920 99212000-05-01 Mark Mitchell <mark@codesourcery.com> 9922 9923 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New 9924 macro. 9925 * call.c (standard_conversion): Use it. 9926 (direct_reference_binding): Likewise. 9927 (build_over_call): Likewise. 9928 (is_properly_derived_from): Likewise. 9929 (compare_ics): Likewise. 9930 * class.c (resolves_to_fixed_type_p): Likewise. 9931 * optimize.c (declare_return_variable): Likewise. 9932 * pt.c (is_specialization_of): Likewise. 9933 (unify): Likewise. 9934 * typeck.c (comp_target_parms): Likeiwse. 9935 (build_static_cast): Likewise. 9936 (build_reinterpret_cast): Likewise. 9937 (build_const_cast): Likewise. 9938 (comp_ptr_ttypes_real): Likewise. 9939 (comp_ptr_ttypes_const): Likewise. 9940 * typeck2.c (process_init_constructor): Likewise. 9941 99422000-04-30 Scott Snyder <snyder@fnal.gov> 9943 9944 * decl.c (finish_destructor_body): Use the base destructor when 9945 destroying virtual bases. 9946 99472000-04-30 Mark Mitchell <mark@codesourcery.com> 9948 9949 * expr.c (cplus_expand_expr): Preserve temporaries when expanding 9950 STMT_EXPRs. 9951 * optimize.c (struct inline_data): Add target_exprs field. 9952 (declare_return_variable): When a function returns an aggregate, 9953 use the variable declared in the TARGET_EXPR as the remapped 9954 DECL_RESULT. 9955 (expand_call_inline): Update the pending target_exprs stack. 9956 (optimize_function): Initialize the stack. 9957 9958 * decl2.c (finish_file): Fix typo in comment. 9959 9960 * method.c (emit_thunk): Don't try to return a `void' value. 9961 9962 * optimize.c (initialize_inlined_parameters): If the parameter is 9963 addressable, we need to make a new VAR_DECL, even if the 9964 initializer is constant. 9965 99662000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro> 9967 9968 * decl.c (grok_op_properties): Add an extra check of argtypes. 9969 99702000-04-27 Mark Mitchell <mark@codesourcery.com> 9971 9972 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying 9973 variables. 9974 (initialize_inlined_parameters): Try to avoid creating new 9975 VAR_DECLs. 9976 99772000-04-27 Alex Samuel <samuel@codesourcery.com> 9978 9979 * lex.c (my_get_run_time): Remove. 9980 (init_filename_times): Use get_run_time instead of my_get_run_time. 9981 (check_newline): Likewise. 9982 (dump_time_statistics): Likewise. 9983 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead 9984 of computing elapsed time explicitly. 9985 99862000-04-26 Mark Mitchell <mark@codesourcery.com> 9987 9988 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P. 9989 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P. 9990 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P 9991 before calling decl_constant_value. 9992 * class.c (check_bitfield_decl): Likewise. 9993 * cvt.c (ocp_convert): Likewise. 9994 (convert): Likewise. 9995 * decl.c (compute_array_index_type): Likewise. 9996 (build_enumerator): Likewise. 9997 * decl2.c (check_cp_case_value): Likewise. 9998 * pt.c (convert_nontype_argument): Likewise. 9999 (tsubst): Likewise. 10000 * typeck.c (decay_conversion): Likewise. 10001 (build_compound_expr): Likewise. 10002 (build_reinterpret_cast): Likewise. 10003 (build_c_cast): Likewise. 10004 (convert_for_assignment): Likewise. 10005 100062000-04-26 Jason Merrill <jason@casey.cygnus.com> 10007 10008 * decl.c (finish_function): Don't play games with DECL_INLINE. 10009 100102000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr> 10011 10012 * ir.texi: Correct typo. 10013 100142000-04-25 Martin v. L�wis <loewis@informatik.hu-berlin.de> 10015 10016 * decl.c (grokdeclarator): Reject VLAs as members. 10017 100182000-04-24 Gabriel Dos Reis <gdr@codesourcery.com> 10019 10020 * call.c (standard_conversion): Accept conversion between 10021 COMPLEX_TYPEs. 10022 10023 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE. 10024 100252000-04-24 Zack Weinberg <zack@wolery.cumb.org> 10026 10027 * decl2.c (finish_file): Remove double setup for accounting 10028 compile time. 10029 100302000-04-24 Robert Lipe <robertlipe@usa.net> 10031 10032 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD. 10033 100342000-04-23 Benjamin Kosnik <bkoz@cygnus.com> 10035 10036 * new.cc (set_new_handler): Needs to be in std::. 10037 100382000-04-23 Mark Mitchell <mark@codesourcery.com> 10039 10040 * cp-tree.h (lang_decl): Remove pretty_function_p. 10041 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the 10042 language-specific node. 10043 * decl.c (cp_make_fname_decl): Use build_decl, not 10044 build_lang_decl, to build the variables. 10045 (grokvardecl): Don't call build_lang_decl for local variables in 10046 templates. 10047 (grokdeclarator): Don't call build_lang_decl for local type 10048 declarations in templates. 10049 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated 10050 zero'd memory, rather than calling memset. 10051 * pt.c: Include hashtab.h. 10052 (local_specializations): New variable. 10053 (retrieve_local_specialization): Use it. 10054 (register_local_specialization): Likewise. 10055 (tsubst_decl): Don't assume local variables have 10056 DECL_LANG_SPECIFIC. 10057 (instantiate_decl): Set up local_specializations. 10058 * Makefile.in (HTAB_H): New variable. 10059 100602000-04-23 Richard Henderson <rth@cygnus.com> 10061 10062 * typeck.c (c_expand_asm_operands): Restore the original 10063 contents of the output list. 10064 100652000-04-22 Gabriel Dos Reis <gdr@codesourcery.com> 10066 10067 * ir.texi: Document complex number representation. 10068 100692000-04-20 Nathan Sidwell <nathan@codesourcery.com> 10070 10071 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi. 10072 (target_incomplete_p): New function. 10073 (tinfo_base_init): Create comdat NTBS name variable. 10074 (ptr_initializer): Add non_public parameter. Calculate it. 10075 (ptmd_initializer): Likewise. 10076 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo. 10077 (create_real_tinfo_var): Add non_public parameter. Use it. 10078 Push proxy into global namespace. 10079 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask): 10080 New enumeration. 10081 * inc/typeinfo (type_info::before, type_info::operator==): 10082 Compare __name addresses. 10083 10084 * tinfo2.cc: Remove new-abi builtins comment. 10085 100862000-04-20 Jason Merrill <jason@casey.cygnus.com> 10087 10088 * typeck.c (build_x_function_call): Resolve an OFFSET_REF. 10089 10090 * call.c (joust): Exit early if we get the same function, too. 10091 10092 * decl2.c (key_method): Return NULL_TREE for template classes. 10093 (import_export_class): Don't need to check for template classes. 10094 100952000-04-18 Zack Weinberg <zack@wolery.cumb.org> 10096 10097 * lex.c: Remove references to cccp.c. 10098 100992000-04-18 Mark Mitchell <mark@codesourcery.com> 10100 10101 * cp-tree.h (lang_decl_flags): Remove const_memfunc and 10102 volatile_memfunc. Add destructor_attr. Adjust dummy. 10103 (DECL_DESTRUCTOR_P): Use destructor_attr. 10104 (DECL_CONST_MEMFUNC_P): Reimplement. 10105 (DECL_VOLATILE_MEMFUNC_P): Remove. 10106 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS. 10107 (overrides): Use DECL_DESTRUCTOR_P. 10108 (check_for_override): Likewise. 10109 * decl.c (start_function): Likewise. 10110 * decl2.c (grokfclassfn): Likewise. 10111 (check_classfn): Likewise. 10112 (grok_function_init): Likewise. 10113 101142000-04-17 Mark Mitchell <mark@codesourcery.com> 10115 10116 * decl2.c (grokfield): Issue error on illegal data member 10117 declaration. 10118 10119Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com> 10120 10121 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL. 10122 101232000-04-16 Mark Mitchell <mark@codesourcery.com> 10124 10125 * class.c (build_vtable_entry): Don't build thunks for type-info 10126 functions. 10127 101282000-04-16 Jason Merrill <jason@casey.cygnus.com> 10129 10130 * decl.c (decls_match): Allow a redeclaration of a builtin to 10131 specify args while the builtin did not. 10132 101332000-04-15 Mark Mitchell <mark@codesourcery.com> 10134 10135 * cp-tree.def (THUNK_DECL): Add to documentation. 10136 * cp-tree.h (flag_huge_objects): Declare. 10137 * class.c (modify_vtable_entry): Tidy. 10138 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables. 10139 Calculate delta appropriately for the new ABI. 10140 (dfs_modify_vtables): Use it. 10141 (modify_all_vtables): Fix thinko in code to add overriding copies 10142 of functions to primary vtables. 10143 (build_clone): Fix typo in comment. 10144 (clone_function_decl): Correct order of destructors in vtable. 10145 (build_vbase_offset_vtbl_entries): Adjust comment. 10146 (dfs_vcall_offset_queue_p): Remove. 10147 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX. 10148 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases. 10149 (build_vtable_entry): Correct check for pure virtual functions. 10150 Don't declare flag_huge_objects. 10151 * decl.c (flag_huge_objects): Remove declaration. 10152 * method.c (make_thunk): Tweak mangling for vcall offset thunks. 10153 Use int_size_in_bytes. 10154 (emit_thunk): Handle vcall offset thunks. 10155 10156Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 10157 10158 * decl2.c (parse_time, varconst_time): Delete declarations. 10159 (finish_file): Delete LINENO declaration. 10160 START_TIME and THIS_TIME now long. 10161 101622000-04-13 Nathan Sidwell <nathan@codesourcery.com> 10163 10164 * class.c (build_base_field): Reformat comment. 10165 10166 * inc/cxxabi.h (stddef.h): Comment inclusion. 10167 (__base_class_info::__offset): Comment shift. 10168 101692000-04-12 Mark Mitchell <mark@codesourcery.com> 10170 10171 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro. 10172 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER. 10173 (cp_push_exception_identifier): New macro. 10174 (DECL_COMPLETE_DESTRUCTOR_P): New macro. 10175 (DECL_BASE_DESTRUCTOR_P): Likewise. 10176 (DECL_DELETING_DESTRUCTOR_P): Likewise. 10177 (get_vtbl_decl_for_binfo): Fix formatting. 10178 (in_charge_arg_for_name): New macro. 10179 (maybe_build_cleanup_and_delete): Remove declaration. 10180 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P. 10181 (in_charge_arg_for_name): New function. 10182 (build_new_method_call): Use it. Handle cloned destructors. 10183 (build_clone): Don't make the base constructor virtual. 10184 Automatically defer generated functions. 10185 (clone_function_decl): Handle destructors, too. 10186 (clone_constructors_and_destructors): Likewise. 10187 (create_vtable_ptr): Don't create a vtable entry for a cloned 10188 function. 10189 * decl.c (predefined_identifier): Add ctor_or_dtor_p. 10190 (initialize_predefined_identifiers): Update appropriately. 10191 (finish_destructor_body): Simplify. 10192 (maybe_build_cleanup_and_delete): Remove. 10193 * except.c (expand_throw): Handle new-ABI destructors. 10194 * init.c (expand_cleanup_for_base): Use base_dtor_identifier. 10195 (build_dtor_call): New function. 10196 (build_delete): Use it. Simplify. 10197 * optimize.c (maybe_clone_body): Handle destructors. 10198 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P. 10199 10200 * exception.cc (cleanup_fn): New typedef. 10201 (CALL_CLEANUP): New macro. 10202 (cp_eh_info): Use them. 10203 (__cp_push_exception): Likewise. 10204 (__cp_pop_exception): Likewise. 10205 102062000-04-11 Mark Mitchell <mark@codesourcery.com> 10207 10208 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER. 10209 (complete_dtor_identifier): New macro. 10210 (CLASSTYPE_FIRST_CONVERSION): Remove. 10211 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro. 10212 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise. 10213 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise. 10214 (CLASSTYPE_CONSTRUCTORS): Likewise. 10215 (CLASSTYPE_DESTRUCTORS): Likewise. 10216 (lang_decl): Add cloned_function. 10217 (DECL_COMPLETE_CONSTRUCTOR_P): New macro. 10218 (DECL_BASE_CONSTRUCTOR_P): Likewise. 10219 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise. 10220 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise. 10221 (DECL_CLONED_FUNCTION_P): Likewise. 10222 (DECL_CLONED_FUNCTION): Likewise. 10223 (clone_function_decl): Declare. 10224 (maybe_clone_body): Likewise. 10225 * call.c (build_user_type_conversion_1): Call complete object 10226 constructors in the new ABI. 10227 (build_new_method_call): Don't add in-charge parameters under the 10228 new ABI. 10229 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P, 10230 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and 10231 CLASSTYPE_DESTRUCTOR_SLOT. 10232 (build_clone): New function. 10233 (clone_function_decl): Likewise. 10234 (clone_constructors_and_destructors): Likewise. 10235 (check_bases_and_members): Use it. 10236 * decl.c (iniitialize_predefined_identifiers): Initialize 10237 complete_dtor_identifier. 10238 (finish_function): Don't add extra code to a clone. 10239 (lang_mark_tree): Mark cloned_function. 10240 * decl2.c (mark_used): Don't bother trying to instantiate things 10241 we synthesized. 10242 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice. 10243 * method.c (set_mangled_name_for_decl): Don't treat clones as 10244 constructors. 10245 (synthesize_method): Sythesize cloned functions, not the clones. 10246 * optimize.c (inline_data): Update comment on ret_label. 10247 (remap_block): Don't assume DECL_INITIAL exists. 10248 (copy_body_r): Allow ret_label to be NULL. 10249 (maybe_clone_body): Define. 10250 * pt.c (tsubst_decl): Handle clones. 10251 (instantiate_clone): New function. 10252 (instantiate_template): Use it. 10253 (set_mangled_name_for_template_decl): Don't treat clones as 10254 constructors. 10255 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT, 10256 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT. 10257 * semantics.c (expand_body): Clone function bodies as necessary. 10258 10259 * optimize.c (remap_decl): Avoid sharing structure for arrays 10260 whose size is only known at run-time. 10261 * tree.c (copy_tree_r): Don't copy PARM_DECLs. 10262 10263 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr 10264 to has_in_charge_parm_p. 10265 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ... 10266 (DECL_HAS_IN_CHARGE_PARM_P): ... this. 10267 (DECL_COPY_CONSTRUCTOR_P): New macro. 10268 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P. 10269 (build_user_type_conversion_1): Likewise. 10270 (convert_like_real): Likewise. 10271 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P. 10272 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P. 10273 (copy_args_p): Likewise. 10274 (grok_ctor_properties): Likewise. 10275 (start_function): Likewise. 10276 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it. 10277 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P. 10278 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P. 10279 * method.c (do_build_copy_constructor): Use 10280 DECL_HAS_IN_CHARGE_PARM_P. 10281 (synthesize_method): Likewise. 10282 * pt.c (instantiate_template): Remove goto. 10283 * tree.c (build_cplus_method_type): Remove mention of obstacks in 10284 comment. 10285 10286 * cp-tre.h (finish_function): Change prototype. 10287 * decl.c (end_cleanup_fn): Adjust caller. 10288 (finish_function): Take only one parameter. 10289 * decl2.c (finish_objects): Adjust caller. 10290 (finish_static_storage_duration_function): Likewise. 10291 * method.c (emit_thunk): Likewise. 10292 * parse.y: Likewise. 10293 * parse.c: Regenerated. 10294 * pt.c (instantiate_decl): Likewise. 10295 * rtti.c (synthesize_tinfo_fn): Likewise. 10296 * semantics.c (expand_body): Likewise. 10297 10298 * cp-tree.h (copy_decl): New function. 10299 * class.c (finish_struct_1): Use it. 10300 * lex.c (copy_decl): Define it. 10301 * pt.c (tsubst_decl): Likewise. 10302 * tree.c (copy_template_template_parm): Likewise. 10303 10304 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and 10305 has_nonpublic_assign_ref. 10306 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare. 10307 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise. 10308 * class.c (finish_struct_methods): Don't set 10309 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF. 10310 (interface_only): Don't declare. 10311 (interface_unknown): Likewise. 10312 103132000-04-11 Martin v. L�wis <loewis@informatik.hu-berlin.de> 10314 10315 * tree.h (HAVE_TEMPLATES): Remove definition. 10316 * lang-options.h (-fthis-is-variable): Remove documentation. 10317 103182000-04-10 Jason Merrill <jason@casey.cygnus.com> 10319 10320 * class.c (instantiate_type): Handle object-relative template-id. 10321 10322 * semantics.c (finish_expr_stmt): Call convert_to_void here. 10323 * decl.c (cplus_expand_expr_stmt): Not here. 10324 10325 * rtti.c (build_dynamic_cast_1): Call non_lvalue. 10326 Initialize exprtype earlier. 10327 10328 * parse.y (fn.def1): Check for defining types in return types. 10329 10330 * decl.c (check_tag_decl): Notice extra fundamental types. 10331 Diagnose empty decls in classes, too. 10332 10333 * decl.c (grokdeclarator): Don't override an anonymous name if no 10334 declarator was given. 10335 10336 * cvt.c (convert_to_void): Call resolve_offset_ref. 10337 10338 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF. 10339 10340 * decl2.c (decl_namespace): Handle getting a type. 10341 10342 * typeck.c (build_c_cast): Re-enable warning for cast between 10343 pointer and integer of different size. 10344 103452000-04-10 Nathan Sidwell <nathan@codesourcery.com> 10346 10347 * inc/cxxabi.h (__pointer_type_info): Add restrict and 10348 incomplete flags. 10349 (__pointer_type_info::__pointer_catch): New virtual function. 10350 (__pointer_to_member_type_info): Derive from 10351 __pointer_type_info. Adjust. 10352 (__pointer_to_member_type_info::__do_catch): Remove. 10353 (__pointer_to_member_type_info::__is_pointer_p): Declare. 10354 (__pointer_to_member_type_info::__pointer_catch): Declare. 10355 * rtti.c (qualifier_flags): Add restrict flag. 10356 (ptmd_initializer): Reorder members. 10357 (create_tinfo_types): Expand comments. Reorder 10358 ptmd_desc_type_node members. 10359 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p): 10360 Implement. 10361 (__pointer_type_info::__do_catch): Move specific code into 10362 __pointer_catch. Call it. 10363 (__pointer_type_info::__pointer_catch): Non-pointer-to-member 10364 specific catch checking. Fix void conversion check. 10365 (__pointer_to_member_type_info::__do_catch): Remove. 10366 (__pointer_to_member_type_info::__pointer_catch): Implement. 10367 103682000-04-10 Martin v. L�wis <loewis@informatik.hu-berlin.de> 10369 10370 * lex.c (init_parse): Remove traces of classof and headof. 10371 * decl2.c (flag_operator_names): Default to 1. 10372 (lang_decode_option): Do not set it for -ansi. 10373 103742000-04-09 Mark Mitchell <mark@codesourcery.com> 10375 10376 * cp-tree.h (struct lang_decl): Remove main_decl_variant. 10377 (DECL_MAIN_VARIANT): Remove. 10378 * decl.c (duplicate_decls): Don't set it. 10379 (start_function): Likewise. 10380 (lang_mark_tree): Don't mark it. 10381 * decl2.c (defer_fn): Don't use it. 10382 * lex.c (retrofit_lang_decl): Don't set it. 10383 * pt.c (tsubst_decl): Likewise. 10384 * ptree.c (print_lang_decl): Don't print it. 10385 * typeck.c (mark_addressable): Don't use it. 10386 103872000-04-09 Nathan Sidwell <nathan@codesourcery.com> 10388 10389 * vec.cc: Include <new> and <exception>. 10390 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup. 10391 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or 10392 terminate. 10393 (__cxa_vec_delete): Catch dtor exceptions. 10394 103952000-04-09 Nathan Sidwell <nathan@codesourcery.com> 10396 10397 Prepend __ to implementation defined names. 10398 * inc/typeinfo (type_info): Rename _name to __name. 10399 (type_info::type_info): Rename parameter. 10400 (type_info::operator==, type_info::operator!=, 10401 type_info::before): Likewise. 10402 (type_info::is_pointer_p, type_info::is_function_p, 10403 type_info::do_catch, type_info::do_upcast): Prepend __. Rename 10404 parameters. 10405 * inc/cxxabi.h 10406 (__fundamental_type_info::__fundamental_type_info) Rename parameters. 10407 (__pointer_type_info::__pointer_type_info): Likewise. 10408 (__pointer_type_info::is_pointer_p, 10409 __pointer_type_info::do_catch): Prepend __. Rename parameters. 10410 (__array_type_info::__array_type_info): Rename parameters. 10411 (__function_type_info::__function_type_info): Likewise. 10412 (__function_type_info::is_function_p): Prepend __. 10413 (__enum_type_info::__enum_type_info): Rename parameters. 10414 (__pointer_to_member_type_info::__pointer_to_member_type_info): 10415 Likewise. 10416 (__pointer_to_member_type_info::do_catch): Prepend __. Rename 10417 parameters. 10418 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __. 10419 (__class_type_info::__class_type_info): Rename parameters. 10420 (__class_type_info::sub_kind): Prepend __. Adjust member names. 10421 (__class_type_info::upcast_result, 10422 __class_type_info::dyncast_result): Prepend __. Move definition 10423 into tinfo.cc. 10424 (__class_type_info::do_upcast, __class_type_info::do_catch, 10425 __class_type_info::find_public_src, 10426 __class_type_info::do_dyncast, 10427 __class_type_info::do_find_public_src): Prepend __. Rename 10428 parameters. 10429 (__si_class_type_info::__si_class_type_info): Rename parameters. 10430 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast, 10431 __si_class_type_info::do_find_public_src): Prepent __. Rename 10432 parameters. 10433 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters. 10434 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast, 10435 __vmi_class_type_info::do_find_public_src): Prepent __. Rename 10436 parameters. 10437 (__dynamic_cast): Rename parameters. 10438 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p, 10439 type_info::do_catch, type_info::do_upcast): Prepend __. 10440 (contained_p, public_p, virtual_p, contained_public_p, 10441 contained_nonpublic_p, contained_nonvirtual_p): Adjust. 10442 (__class_type_info::do_catch, 10443 __class_type_info::do_upcast): Prepend __. Adjust. 10444 (__class_type_info::__upcast_result, 10445 __class_type_info::__dyncast_result): Move from inc/cxxabi.h. 10446 Adjust. 10447 (__class_type_info::find_public_src): Prepend __. Adjust. 10448 (__class_type_info::do_find_public_src, 10449 __si_class_type_info::do_find_public_src, 10450 __vmi_class_type_info::do_find_public_src): Likewise. 10451 (__class_type_info::do_dyncast, 10452 __si_class_type_info::do_dyncast, 10453 __vmi_class_type_info::do_dyncast): Likewise. 10454 (__class_type_info::do_upcast, 10455 __si_class_type_info::do_upcast, 10456 __vmi_class_type_info::do_upcast): Likewise. 10457 (__dynamic_cast): Adjust. 10458 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __. 10459 (__function_type_info::is_function_p): Likewise. 10460 (__pointer_type_info::do_catch): Likewise. Adjust. 10461 (__pointer_to_member_type_info::do_catch): Likewise. Adjust. 10462 (__throw_type_match_rtti_2): Adjust. 10463 (__is_pointer): Adjust. 10464 104652000-04-08 Mark Mitchell <mark@codesourcery.com> 10466 10467 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER. 10468 (complete_ctor_identifier): New macro. 10469 (special_function_kind): Add sfk_copy_constructor and 10470 sfk_assignment_operator. 10471 (LOOKUP_HAS_IN_CHARGE): Remove. 10472 (cons_up_default_function): Rename to ... 10473 (implicitly_declare_fn): ... this. 10474 * call.c (build_new_method_call): Add in-charge parameters for 10475 constructors here. 10476 * class.c (add_implicitly_declared_members): Change parameter name 10477 from cant_have_assignment to cant_have_const_assignment. 10478 Replace calls to cons_up_default_function to implicitly_declare_fn. 10479 * cvt.c (ocp_convert): Use complete_ctor_identifier. 10480 * decl.c (initialize_predefined_identifiers): Initialize it. 10481 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of 10482 complex expression. 10483 * init.c (expand_default_init): Don't calculate the in-charge 10484 parameter here. 10485 (build_new_1): Likewise. 10486 * lex.c (cons_up_default_function): Move to method.c. 10487 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P. 10488 (implicitly_declare_fn): New function. 10489 * typeck.c (build_static_cast): Use complete_ctor_identifier. 10490 (build_modify_expr): Likewise. 10491 * typeck2.c (build_functional_cast): Likewise. 10492 10493 Under the new ABI, constructors don't return `this'. 10494 * cp-tree.h (warn_reorder): Declare. 10495 (special_function_kind): New enum. 10496 (global_base_init_list): Remove declaration. 10497 (emit_base_init): Don't return a value. 10498 (check_base_init): Don't declare. 10499 (is_aggr_typedef): Likewise. 10500 * decl.c (check_special_function_return_type): New function. 10501 (return_types): Remove. 10502 (grokdeclarator): Use check_special_function_return_type. 10503 (start_function): Don't initialize ctor_label under the new ABI. 10504 (finish_construtor_body): Don't create a corresponding LABEL_STMT. 10505 * init.c (begin_init_stmts): Move to top of file. 10506 (finish_init_stmts): Likewise. 10507 (warn_reorder): Don't declare. 10508 (emit_base_init): Don't create a STMT_EXPR here. Don't return a 10509 value. 10510 (check_base_init): Remove. 10511 (is_aggr_typedef): Likewise. 10512 (build_new_1): Don't use the return value of a constructor. 10513 * semantics.c (setup_vtbl_ptr): Don't use the return value 10514 of emit_base_init. 10515 * typeck.c (check_return_expr): Don't magically convert return 10516 statements into `return this' in constructors under the new ABI. 10517 10518 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER, 10519 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER. 10520 (base_ctor_identifier): New macro. 10521 (base_dtor_identifier): Likewise. 10522 (deleting_dtor_identifier): Likewise. 10523 * decl.c: Don't include obstack.h. 10524 (obstack_chunk_alloc): Don't define. 10525 (obstack_chunk_free): Likewise. 10526 (struct predefined_identifier): New type. 10527 (initialize_predefined_identifiers): New function. 10528 (init_decl_processing): Use it. 10529 (debug_temp_inits): Remove. 10530 (start_method): Don't call preserve_data. 10531 (hack_incomplete_structures): Update comment. 10532 * init.c (init_init_processing): Don't initialize 10533 nelts_identifier. 10534 (build_offset_rf): Remove dead code. 10535 (build_delete): Use CLASSTYPE_N_BASECLASSES. 10536 * search.c (init_search_processing): Don't initialize 10537 vptr_identifier. 10538 105392000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 10540 10541 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide 10542 some sign_compare warnings. 10543 105442000-04-07 Nathan Sidwell <nathan@codesourcery.com> 10545 10546 Rename abi::__vmi_class_type_info members. 10547 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases, 10548 base_list, detail_masks members to vmi_flags, vmi_base_count, 10549 vmi_bases and vmi_flags_masks respectively. 10550 (__vmi_class_type_info::vmi_flags_masks): Rename 10551 details_unknown_mask to flags_unknown_mask. 10552 * tinfo.cc (__class_type_info::do_upcast): Adjust. 10553 (__vmi_class_type_info::do_find_public_src): Adjust. 10554 (__vmi_class_type_info::do_dyncast): Adjust. 10555 (__vmi_class_type_info::do_upcast): Adjust. 10556 105572000-04-07 Nathan Sidwell <nathan@codesourcery.com> 10558 10559 * tinfo.cc (convert_to_base): New function. 10560 (get_vbase_offset): Remove. Move into convert_to_base. 10561 (__vmi_class_type_info::do_find_public_src): Adjust. 10562 (__vmi_class_type_info::do_dyncast): Adjust. 10563 (__vmi_class_type_info::do_upcast): Adjust. 10564 105652000-04-06 Jason Merrill <jason@yorick.cygnus.com> 10566 10567 * tinfo.cc (operator=): Use __builtin_strcmp. 10568 * tinfo2.cc (before): Likewise. 10569 105702000-04-06 Mark Mitchell <mark@codesourcery.com> 10571 10572 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred. 10573 (DECL_SAVED_INLINE): Rename to ... 10574 (DECL_DEFERRED_FN): ... this. 10575 (in_function_p): Remove declaration. 10576 (mark_inline_for_output): Rename to ... 10577 (defer_fn): ... this. 10578 * decl.c (finish_function): Adjust call to mark_inline_for_output. 10579 (in_function_p): Remove definition. 10580 * decl2.c (saved_inlines): Rename to ... 10581 (deferred_fns): ... this. 10582 (saved_inlines_used): Rename to ... 10583 (deferred_fns_used): ... this. 10584 (mark_inline_for_output): Rename to ... 10585 (defer_fn): ... this. 10586 (finish_file): Adjust accordingly. 10587 (init_decl2): Likewise. 10588 * lex.c (cons_up_default_function): Likewise. 10589 * pt.c (mark_decl_instantiated): Likewise. 10590 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any 10591 circumstances. 10592 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output. 10593 * semantics.c (expand_body): Defer more functions. 10594 105952000-04-06 Nathan Sidwell <nathan@codesourcery.com> 10596 10597 * vec.cc: New file. 10598 * Make-lang.in (CXX_LIB2FUNCS): Add it. 10599 (vec.o): Build it. 10600 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, 10601 __cxa_vec_delete): Declare. 10602 106032000-04-06 Nathan Sidwell <nathan@codesourcery.com> 10604 10605 * rtti.c (dfs_class_hint_mark): New static function. 10606 (dfs_class_hint_unmark): New static function. 10607 (class_hint_flags): Use them. 10608 106092000-04-05 Benjamin Kosnik <bkoz@cygnus.com> 10610 10611 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE. 10612 106132000-04-05 Mark Mitchell <mark@codesourcery.com> 10614 10615 * cp-tree.h (instantiate_decl): Change prototype. 10616 * decl2.c (mark_used): Adjust call. 10617 * optimize.c (inlinable_function_p): Adjust handling of templates. 10618 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl. 10619 (do_type_instantiation): Likewise. 10620 (instantiate_decl): Defer more templates. 10621 (instantiate_pending_templates): Adjust logic to handle inline 10622 friend functions. 10623 10624 * Makefile.in (GGC_H): New variable. Use it throughout in place 10625 of ggc.h. 10626 10627 * call.c: Don't include obstack.h. Include ggc.h. 10628 (obstack_chunk_alloc): Don't define. 10629 (obstack_chunk_free): Likewise. 10630 (add_candidate): Allocate the z_candidate with ggc_alloc_obj. 10631 * decl.c (push_switch): Use xmalloc to allocate the cp_switch. 10632 (pop_switch): Free it. 10633 10634 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs. 10635 10636 * dump.c (dequeue_and_dump): Don't try to print the bit_position 10637 if we don't have a DECL_FIELD_OFFSET. 10638 10639Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz> 10640 10641 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of 10642 special_function_p. 10643 106442000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 10645 10646 * cfns.gperf (hash, libc_name_p): Prototype. 10647 10648 * rtti.c (build_dynamic_cast_1): Constification. 10649 10650 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes. 10651 10652 * semantics.c (deferred_type_access_control): Prototype. 10653 106542000-04-04 Mark Mitchell <mark@codesourcery.com> 10655 10656 Correct many new ABI issues regarding vbase and vcall offset 10657 layout. 10658 * cp-tree.h (BINFO_VTABLE): Document. 10659 (struct lang_type): Tweak formatting. 10660 (BINFO_PRIMARY_BINFO): Add to documentation. 10661 (CLASSTYPE_VSIZE): Fix typo in comment. 10662 (CLASSTYPE_VBASECLASSES): Update documentation. 10663 (BINFO_VBASE_MARKED): Remove. 10664 (SET_BINFO_VBASE_MARKED): Likewise. 10665 (CLEAR_BINFO_VBASE_MARKED): Likewise. 10666 (BINFO_FIELDS_MARKED): Remove. 10667 (SET_BINFO_FIELDS_MARKED): Likewise. 10668 (CLEAR_BINFO_FIELDS_MARKED): Likewise. 10669 (enum access_kind): New enumeration. 10670 (num_extra_vtbl_entries): Remove declaration. 10671 (size_extra_vtbl_entries): Likewise. 10672 (get_vtbl_decl_for_binfo): New function. 10673 (dfs_vbase_unmark): Remove declaration. 10674 (mark_primary_bases): Likewise. 10675 * class.c (SAME_FN): Remove. 10676 (struct vcall_offset_data_s): Move definition. 10677 (build_vbase_pointer): Use `build', not `build_binary_op', to 10678 access the vbase pointer under the new ABI. 10679 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo. 10680 (build_primary_vtable): Likewise. 10681 (dfs_mark_primary_bases): Move here from search.c. 10682 (mark_primary_bases): Likewise. 10683 (determine_primary_bases): Under the new ABI, don't make a base 10684 class a primary base just because we don't yet have any virtual 10685 functions. 10686 (layout_vtable_decl): Use get_vtbl_decl_for_binfo. 10687 (num_vfun_entries): Remove. 10688 (dfs_count_virtuals): Likewise. 10689 (num_extra_vtbl_entries): Likewise. 10690 (size_extra_vtbl_entries): Likewise. 10691 (layout_virtual_bases): Iterate in inheritance graph order under 10692 the new ABI. 10693 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to 10694 indicate that a vfield is present. 10695 (init_class_processing): Initialize access_public_node, etc., from 10696 ak_public, etc. 10697 (get_vtbl_decl_for_binfo): New function. 10698 (dump_class_hierarchy_r): Likewise. 10699 (dump_class_hierarchy): Use it. 10700 (finish_vtbls): Build the vtbls in inheritance graph order. 10701 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer. 10702 (initialize_vtable): Use get_vtbl_decl_for_binfo. 10703 (accumulate_vtbl_inits): Add comments explaining why a pre-order 10704 walk is required. 10705 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location 10706 where the vptr points, even for primary vtables. 10707 (build_vtbl_initializer): Adjust handling of vbase and vcall 10708 offsets. 10709 (build_vcall_and_vbase_vtable_entries): New function. 10710 (dfs_build_vbase_offset_vtbl_entries): Remove. 10711 (build_vbase_offset_vtbl_entries): Reimplement. 10712 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that 10713 were already handled in a primary base class vtable. 10714 (build_vcall_offset_vtbl_entries): Adjust. 10715 (build_rtti_vtbl_entries): Adjust. 10716 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo. 10717 * init.c (expand_virtual_init): Simplify. 10718 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo. 10719 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr. 10720 * search.c (BINFO_ACCESS): New macro. 10721 (SET_BINFO_ACCESS): Likewise. 10722 (dfs_access_in_type): Manipulate access_kinds, not access nodes. 10723 (access_in_type): Likewise. 10724 (dfs_accessible_p): Likewise. 10725 (protected_accessible_p): Likewise. 10726 (lookup_fnfields_1): Adjust documentation. 10727 (dfs_mark_primary_bases): Move to class.c 10728 (mark_primary_bases): Likewise. 10729 (dfs_vbase_unmark): Remove. 10730 (virtual_context): Use BINFO_FOR_VBASE. 10731 (dfs_get_vbase_types): Simplify. 10732 (dfs_build_inheritance_graph_order): New function. 10733 (get_vbase_types): Use it. 10734 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo. 10735 10736 * tinfo.cc (get_vbase_offset): New function. 10737 (__vmi_class_type_info::do_find_public_src): Use it. 10738 (__vmi_class_type_info::do_dyncast): Likewise. 10739 (__vmi_class_type_info::do_upcast): Likewise. 10740 107412000-04-03 Zack Weinberg <zack@wolery.cumb.org> 10742 10743 * lang-specs.h: Pass -fno-show-column to the preprocessor. 10744 107452000-03-30 Nathan Sidwell <nathan@codesourcery.com> 10746 10747 * rtti.c (class_hint_flags): Rename flags. 10748 (class_initializer): Remove flags. 10749 (synthesize_tinfo_var): Combine offset and flags. Add flags 10750 for __vmi_class_type_info. 10751 (create_tinfo_types): Remove flags from __class_type_info and 10752 __si_class_type_info. Merge flags and offset from 10753 base_class_type_info. 10754 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags. 10755 (__base_class_info::is_virtual_p): Adjust. 10756 (__base_class_info::is_public_p): Adjust. 10757 (__base_class_info::offset): New accessor. 10758 (__class_type_info::details): Remove member. 10759 (__class_type_info::__class_type_info): Lose details. 10760 (__class_type_info::detail_masks): Remove. 10761 (__si_class_type_info::__si_class_type_info): Lose details. 10762 (__vmi_class_type_info::details): New member. 10763 (__vmi_class_type_info::__vmi_class_type_info): Adjust. 10764 (__vmi_class_type_info::detail_masks): New member. 10765 * tinfo.cc (__class_type_info::do_upcast): Initialize result 10766 with unknown_details_mask. 10767 (__vmi_class_type_info::do_find_public_src): Adjust 10768 (__vmi_class_type_info::do_dyncast): Adjust. 10769 (__vmi_class_type_info::do_upcast): Set result details, if 10770 needed. Adjust. 10771 (__dynamic_cast): Temporarily #if out optimization. 10772 107732000-03-29 Nathan Sidwell <nathan@codesourcery.com> 10774 10775 * rtti.c (get_tinfo_decl): Mark used. 10776 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only 10777 mark as dealt with, if we output it. 10778 107792000-03-28 Mark Mitchell <mark@codesourcery.com> 10780 10781 * class.c: Reorganize to put virtual function table initialization 10782 machinery at the end of the file. 10783 107842000-03-28 Jason Merrill <jason@casey.cygnus.com> 10785 10786 * class.c (finish_struct): Use bitsize_zero_node. 10787 * pt.c (instantiate_class_template): Likewise. 10788 107892000-03-28 Mark Mitchell <mark@codesourcery.com> 10790 10791 Put RTTI entries at negative offsets in new ABI. 10792 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first 10793 vbase offset at index -3, not -1. 10794 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not 10795 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases. 10796 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff. 10797 (build_rtti_vtbl_entries): New function. 10798 (set_rtti_entry): Remove. 10799 (build_primary_vtable): Don't use it. 10800 (build_secondary_vtable): Likewise. 10801 (start_vtable): Remove. 10802 (first_vfun_index): New function. 10803 (set_vindex): Likewise. 10804 (add_virtual_function): Don't call start_vtable. Do call 10805 set_vindex. 10806 (set_primary_base): Rename parameter. 10807 (determine_primary_base): Likewise. 10808 (num_vfun_entries): Don't use skip_rtti_stuff. 10809 (num_extra_vtbl_entries): Include RTTI information. 10810 (build_vtbl_initializer): Use build_rtti_vtbl_entries. 10811 (skip_rtti_stuff): Remove. 10812 (dfs_modify_vtables): Don't use it. 10813 (modify_all_vtables): Don't use start_vtable. Do use set_vindex. 10814 (layout_nonempty_base_or_field): Update size handling. 10815 (create_vtable_ptr): Tweak. 10816 (layout_class_type): Adjust parameter names. 10817 (finish_struct_1): Simplify. 10818 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation. 10819 (skip_rtti_stuff): Remove. 10820 (first_vfun_index): New function. 10821 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove. 10822 (dfs_vtable_path_marked_real_bases_queue_p): Remove. 10823 (marked_vtable_pathp): Declare. 10824 (unmarked_vtable_pathp): Likewise. 10825 * error.c (dump_expr): Use first_vfun_index to calculate vtable 10826 offsets. 10827 * rtti.c (build_headof): Look for RTTI at negative offsets. 10828 (get_tinfo_decl_dynamic): Likewise. 10829 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL 10830 here. 10831 (create_pseudo_type_info): Do it here instead. Adjust so that 10832 vptr points at first virtual function. 10833 * search.c (marked_vtable_pathp): Make it global. 10834 (unmarked_vtable_pathp): Likewise. 10835 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove. 10836 (dfs_vtable_path_marked_real_bases_queue_p): Likewise. 10837 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff. 10838 (get_pure_virtuals): Likewise. 10839 (expand_upcast_fixups): Likewise. 10840 * tree.c (debug_binfo): Likewise. 10841 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate 10842 negative offset. 10843 10844Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 10845 10846 * class.c (check_field_decl): Fix typo. 10847 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS. 10848 (check_methods): Likewise. 10849 (check_field_decls): Likewise. 10850 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT. 10851 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT): 10852 Use DECL_RESULT_FLD, not DECL_RESULT. 10853 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT. 10854 * lex.c (identifier_type): Likewise. 10855 * pt.c (determine_specialization, lookup_template_class): Likewise. 10856 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise. 10857 (resolve_overloaded_unification, more_specialized): Likewise. 10858 * semantics.c (finish_member_declaration): Likewise. 10859 * typeck.c (build_x_function_call): Likewise. 10860 108612000-03-26 Mark Mitchell <mark@codesourcery.com> 10862 10863 * class.c (layout_empty_base): Handle empty bases with non-byte 10864 alignment. 10865 (build_base_field): Likewise. 10866 (layout_virtual_bases): Likewise. 10867 10868 * class.c (finish_struct_1): Fix typo in this change: 10869 10870 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 10871 108722000-03-25 Mark Mitchell <mark@codesourcery.com> 10873 10874 * decl.c (grokdeclarator): Count partial specializations when 10875 keeping track of how many template classes have been seen. 10876 10877 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT. 10878 10879Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 10880 10881 * class.c (build_vbase_pointer_fields): layout_field now place_field. 10882 (get_vfield_offset): Use byte_position. 10883 (set_rtti_entry): Set OFFSET to ssizetype zero. 10884 (get_binfo_offset_as_int): Deleted. 10885 (dfs_record_base_offsets): Use tree_low_cst. 10886 (dfs_search_base_offsets): Likewise. 10887 (layout_nonempty_base_or_field): Reflect changes in RLI format 10888 and call byte_position. 10889 (layout_empty_base): Convert offset to ssizetype. 10890 (build_base_field): use rli_size_unit_so_far. 10891 (dfs_propagate_binfo_offsets): Do computation in proper type. 10892 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. 10893 (layout_class_type): Reflect changes in RLI names and fields. 10894 (finish_struct_1): Set DECL_FIELD_OFFSET. 10895 * dump.c (dequeue_and_dump): Call bit_position. 10896 * expr.c (cplus_expand_constant): Use byte_position. 10897 * rtti.c (expand_class_desc): Use bitsize_one_node. 10898 * typeck.c (build_component_addr): Use byte_position and don't 10899 special case for zero offset. 10900 109012000-03-24 Nathan Sidwell <nathan@codesourcery.com> 10902 10903 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P. 10904 10905 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi 10906 tinfo object. 10907 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting 10908 vtable. 10909 109102000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 10911 10912 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and 10913 DECL_P macros. 10914 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name, 10915 make_typename_type, check_initializer, cp_finish_decl, 10916 xref_tag): Likewise. 10917 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree, 10918 decl_namespace, arg_assoc_template_arg, arg_assoc, 10919 validate_nonmember_using_decl, do_class_using_decl): Likewise. 10920 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of, 10921 args_to_string): Likewise. 10922 * friend.c (is_friend): Likewise. 10923 * lex.c (note_got_semicolon, note_list_got_semicolon, 10924 is_global): Likewise. 10925 * method.c (build_overload_nested_name, build_overload_value, 10926 build_qualified_name, build_qualified_name, hack_identifier): Likewise. 10927 * parse.y (typename_sub, typename_sub1): Likewise. 10928 * pt.c (push_inline_template_parms_recursive, check_template_shadow, 10929 process_partial_specialization, convert_template_argument, 10930 template_args_equal, add_pending_template, lookup_template_class, 10931 for_each_template_parm_r, maybe_fold_nontype_arg, 10932 tsubst, instantiate_template, type_unification_real, unify, 10933 instantiate_pending_templates, set_mangled_name_for_template_decl): 10934 Likewise. 10935 * repo.c (repo_get_id, repo_template_used): Likewise. 10936 * search.c (lookup_field_1): Likewise. 10937 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise. 10938 * xref.c (classname): Likewise. 10939 109402000-03-22 Mark Mitchell <mark@codesourcery.com> 10941 10942 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation. 10943 (CANONICAL_BINFO): New macro. 10944 (BINFO_NEW_VTABLE_MARKED): Use it. 10945 (SET_BINFO_NEW_VTABLE_MARKED): Likewise. 10946 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise. 10947 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE, 10948 not TREE_TYPE. 10949 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED. 10950 (build_secondary_vtable): Likewise. 10951 (dfs_finish_vtbls): Likewise. 10952 (dfs_accumulate_vtbl_inits): Likewise. 10953 (accumulate_vtbl_inits): New function. 10954 (finish_vtbls): Make sure that virtual bases come after 10955 non-virtual bases in the vtable group. 10956 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL. 10957 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED. 10958 * search.c (struct vbase_info): Move definition. 10959 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED. 10960 (unmarked_new_vtable_p): Likewise. 10961 (dfs_mark_vtable_path): Remove. 10962 (dfs_mark_new_vtable): Remove. 10963 (dfs_unmark_new_vtable): Likewise. 10964 (dfs_clear_search_slot): Likewise. 10965 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED. 10966 (dfs_clear_vbase_slots): Likewise. 10967 (init_vbase_pointers): LIkewise. 10968 109692000-03-22 Jason Merrill <jason@casey.cygnus.com> 10970 10971 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a 10972 SIZETYPE to a non-SIZETYPE. 10973 109742000-03-21 Mark Mitchell <mark@codesourcery.com> 10975 10976 * class.c (layout_virtual_bases): Adjust names in conditionally 10977 compiled code. 10978 10979 * class.c (record_base_offsets): New function. 10980 (layout_conflict_p): Likewise. 10981 (layout_nonempty_base_or_field): Use it. 10982 (layout_empty_base): New function. 10983 (build_base_field): Use it. 10984 (build_base_fields): Update comment. 10985 (layout_virtual_bases): Fold in a little code form 10986 layout_basetypes. Use layout_empty_base. 10987 (layout_basetypes): Remove. 10988 (end_of_class): New function. 10989 (layout_class_type): Use it. Adjust. 10990 10991 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment. 10992 (fntype_p): Remove. 10993 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in 10994 comment. 10995 (dfs_skip_nonprimary_vbases_markedp): Likewise. 10996 * typeck.c (fntype_p): Remove. 10997 10998 * cp-tree.h (TI_SPEC_INFO): Remove. 10999 (CLASSTYPE_TI_SPEC_INFO): Likewise. 11000 * pt.c (process_partial_specialization): Likewise. 11001 11002 * class.c (build_base_field): Fix thinko in computation of binfo 11003 offsets. 11004 11005 * tree.c (mark_local_for_remap_p): Mark variables declared in 11006 TARGET_EXPRs as well. 11007 110082000-03-21 Nathan Sidwell <nathan@codesourcery.com> 11009 11010 * typeck.c (require_complete_type, complete_type, 11011 complete_type_or_else, c_sizeof, c_sizeof_nowarn, 11012 build_array_ref, convert_arguments, pointer_diff, 11013 build_x_unary_op, build_unary_op, build_c_cast, 11014 build_modify_expr): Use COMPLETE_TYPE_P etc. 11015 * call.c (is_complete, convert_like_real, 11016 build_new_method_call): Likewise. 11017 * class.c (build_vbase_pointer_fields, check_bases, 11018 build_base_field, finish_struct_1, pushclass): Likewise. 11019 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise. 11020 * decl.c (maybe_process_template_type_declaration, pushtag, 11021 pushdecl, redeclaration_error_message, start_decl, start_decl_1, 11022 layout_var_decl, check_initializer, cp_finish_decl, 11023 grokdeclarator, require_complete_types_for_parms, 11024 grok_op_properties, xref_tag, xref_basetypes, 11025 check_function_type): Likewise. 11026 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise. 11027 * friend.c (do_friend): Likewise. 11028 * init.c (build_offset_ref): Likewise. 11029 * parse.y (structsp): Likewise. 11030 * pt.c (maybe_process_partial_specialization, 11031 tsubst_friend_function, instantiate_class_template, tsubst, 11032 do_type_instantiation, instantiate_pending_templates): Likewise. 11033 * repo.c (repo_get_id): Likewise. 11034 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1, 11035 synthesize_tinfo_var, emit_support_tinfos): Likewise. 11036 * search.c (lookup_fnfields_1, lookup_conversions): Likewise. 11037 * semantics.c (begin_class_definition): Likewise. 11038 * tree.c (build_cplus_method_type): Likewise. 11039 * typeck2.c (digest_init, build_functional_cast, 11040 add_exception_specifier): Likewise. 11041 * parse.h, parse.c: Regenerated. 11042 110432000-03-21 Nathan Sidwell <nathan@codesourcery.com> 11044 11045 * inc/cxxabi.h: New header file. Define new-abi entry points. 11046 (__pointer_type_info::target): Rename member to ... 11047 (__pointer_type_info::type): ... here. 11048 (__base_class_info::type): Rename member to ... 11049 (__base_class_info::base): ... here. 11050 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h 11051 * cp-tree.h (CPTI_ABI): New global tree enumeration. 11052 (abi_node): New global tree node. 11053 * decl.c (abi_node): Document. 11054 (init_decl_processing): Initialize abi_node. 11055 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi. 11056 (get_vmi_pseudo_type_info): Likewise. 11057 (create_tinfo_types): Likewise. 11058 (emit_support_tinfos): Likewise. 11059 * tinfo.h (cxxabi.h): Include for new-abi. 11060 Move rtti class definitions to new header file. 11061 * tinfo.cc (abi): Use the namespace. 11062 (std): Move new abi rtti classes from here ... 11063 (__cxxabiv1): ... to here. 11064 * tinfo2.cc (cxxabi.h): Include for new-abi. 11065 Move rtti class definitions to new header file. 11066 (std): Move new abi rtti classes from here ... 11067 (__cxxabiv1): ... to here. 11068 * inc/typeinfo (__class_type_info): Move into __cxxabiv1 11069 namespace. 11070 110712000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu> 11072 Jason Merrill <jason@casey.cygnus.com> 11073 11074 * method.c (build_overload_int): Use host_integerp. 11075 110762000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 11077 11078 * init.c (build_offset_ref): Handle the case of a templated member 11079 function. 11080 110812000-03-19 Martin v. L�wis <loewis@informatik.hu-berlin.de> 11082 11083 * except.c (expand_exception_blocks): Clear catch_clauses_last. 11084 110852000-03-18 Mark Mitchell <mark@codesourcery.com> 11086 11087 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro. 11088 * class.c (check_bitfield_decl): Turn illegal bitfields into 11089 non-bitfields. 11090 (dfs_propagate_binfo_offsets): Adjust for new size_binop 11091 semantics. 11092 (dfs_offset_for_unshared_vbases): Likewise. 11093 * cvt.c (cp_convert_to_pointer): Convert NULL to a 11094 pointer-to-member correctly under the new ABI. 11095 * expr.c (cplus_expand_constant): Don't use cp_convert when 11096 turning an offset into a pointer-to-member. 11097 * init.c (resolve_offset_ref): Don't adjust pointers-to-members 11098 when dereferencing them under the new ABI. 11099 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation 11100 of pointers-to-members under the new ABI. 11101 11102 * class.c (check_bitfield_decl): Remove restriction on really long 11103 bitfields. 11104 (layout_class_type): Implement new ABI handling of bitfields 11105 longer than their types. 11106 111072000-03-18 Martin v. L�wis <loewis@informatik.hu-berlin.de> 11108 11109 * parse.y (extdefs): Call ggc_collect. 11110 * parse.c: Regenerated. 11111 111122000-03-18 Nathan Sidwell <nathan@codesourcery.com> 11113 11114 * class.c (build_base_field): Use TYPE_ALIGN to examine a type. 11115 (note_name_declared_in_class): Use OVL_CURRENT to get at a 11116 potential overload. 11117 11118Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 11119 11120 * class.c (build_vbase_path): Use integer_zerop. 11121 (build_vtable_entry): Use tree_low_cst. 11122 (get_vfield_offset): Use bit_position. 11123 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT. 11124 Use tree_low_cst. 11125 (check_bitfield_decl): Set DECL_SIZE using convert. 11126 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop. 11127 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT. 11128 Use tree_low_cst. 11129 (finish_struct_1): Use bit_position. 11130 (dump_class_hierarchy): Use tree_low_cst. 11131 * cp-tree.h (min_precision): Add declaration. 11132 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst. 11133 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst. 11134 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst. 11135 * expr.c (cplus_expand_constant): Use bit_position. 11136 * init.c (build_vec_init): Use host_integerp and tree_low_cst. 11137 * rtti.c (get_base_offset): Use bit_position. 11138 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int, 11139 host_integerp, and tree_low_cst. 11140 (pointer_int_sum): Use integer_zerop. 11141 (build_component_addr): Use bit_position. 11142 111432000-03-17 Nathan Sidwell <nathan@codesourcery.com> 11144 11145 * typeck.c (require_complete_type): Don't assume size_zero_node. 11146 (complete_type_or_else): Likewise. 11147 111482000-03-16 Steven Grady <grady@digitaldeck.com> 11149 Jason Merrill <jason@casey.cygnus.com> 11150 11151 * rtti.c (build_dynamic_cast_1): Improve diagnostics. 11152 111532000-03-16 Nathan Sidwell <nathan@codesourcery.com> 11154 11155 * decl2.c (grokfield): Bail out if type is error_mark_node. 11156 111572000-03-15 Nathan Sidwell <nathan@codesourcery.com> 11158 11159 * tinfo2.cc (__ptr_to_member_data): Rename to ... 11160 (__pointer_to_member_data): ... here. Adjust. 11161 * rtti.c (create_tinfo_types): Adjust. 11162 111632000-03-15 Nathan Sidwell <nathan@codesourcery.com> 11164 11165 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove. 11166 * decl.c (ref_desc_type_node): Undocument. 11167 * rtti.c (ptr_ref_initializer): Rename to ... 11168 (ptr_initializer): ... here. Adjust comments. 11169 (ptmd_initializer): Fix comment thinko. 11170 (synthesize_tinfo_var): Remove REFERENCE_TYPE case. 11171 (create_tinfo_types): Remove ref_desc_type_node init. 11172 * tinfo2.cc (__reference_type_info): Remove. 11173 111742000-03-15 Nathan Sidwell <nathan@codesourcery.com> 11175 11176 * decl.c (cp_finish_decl): Remove obsolete comment. 11177 11178 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning. 11179 111802000-03-14 Mark Mitchell <mark@codesourcery.com> 11181 11182 * cp-tree.h: Tweak documentation. 11183 * class.c (build_vbase_pointer_fields): Layout the fields, too. 11184 (avoid_overlap): Remove. 11185 (get_binfo_offset_as_int): New function. 11186 (dfs_serach_base_offsets): Likewise. 11187 (layout_nonempty_base_or_field): Likewise. 11188 (build_base_field): Layout fields here. Avoid placing two objects 11189 of the same type at the same address, under the new ABI. 11190 (build_base_fields): Adjust accordingly. 11191 (create_vtable_ptr): Return the new field, but don't attach it to 11192 TYPE_FIELDS. 11193 (remove_base_field): Remove. 11194 (remove_base_fields): Remove. 11195 (layout_basetypes): Adjust accordingly. 11196 (layout_class_type): Call layout_field for each field, rather than 11197 just making a wholesale call to layout_type. 11198 111992000-03-14 Jeff Sturm <jsturm@sigma6.com> 11200 11201 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw. 11202 112032000-03-13 Jason Merrill <jason@casey.cygnus.com> 11204 11205 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P. 11206 11207 * except.c (dtor_nothrow): New fn. 11208 (do_pop_exception): Use it. Take type parm. 11209 (push_eh_cleanup): Take type parm. 11210 (expand_start_catch_block): Pass it. 11211 (build_eh_type_type_ref): Accept null type. 11212 112132000-03-12 Mark Mitchell <mark@codesourcery.com> 11214 11215 * cp-tree.h (revert_static_member_fn): Change prototype. 11216 * decl.c (grokfndecl): Adjust call to revert_static_member_fn. 11217 (grok_op_properties): Likewise. 11218 (start_function): Likewise. 11219 (revert_static_member_fn): Simplify. 11220 * pt.c (check_explicit_specialization): Adjust call to 11221 revert_static_member_fn. 11222 112232000-03-11 Mark Mitchell <mark@codesourcery.com> 11224 11225 * cp-tree.h (scope_kind): New type. 11226 (tmpl_spec_kind): Likewise. 11227 (declare_pseudo_global_level): Remove. 11228 (pseudo_global_level_p): Rename to template_parm_scope_p. 11229 (pushlevel): Remove declaration. 11230 (begin_scope): New function. 11231 (finish_scope): Likewise. 11232 (current_tmpl_spec_kind): Likewise. 11233 * decl.c (struct binding_level): Shorten parm_flag to 2 bits. 11234 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p. 11235 Add template_spec_p. 11236 (toplevel_bindings_p): Adjust. 11237 (declare_pseudo_global_level): Remove. 11238 (pseudo_global_level_p): Rename to template_parm_scope_p. 11239 (current_tmpl_spec_kind): New function. 11240 (begin_scope): Likewise. 11241 (finish_scope): Likewise. 11242 (maybe_push_to_top_level): Adjust. 11243 (maybe_process_template_type_declaration): Likewise. 11244 (pushtag): Likewise. 11245 (pushdecl_nonclass_level): Likewise. 11246 (lookup_tag): Likewise. 11247 (grokfndecl): Handle member template specializations. Share 11248 constructor and non-constructor code. 11249 * decl2.c (check_classfn): Handle member template specializations. 11250 * pt.c (begin_template_parm_list): Use begin_scope. 11251 (begin_specialization): Likewise. 11252 (end_specialization): Likewise. 11253 (check_explicit_specialization): Use current_tmpl_spec_kind. 11254 Handle member template specializations. 11255 (end_template_decl): Use finish_scope. Remove call to 11256 get_pending_sizes. 11257 (push_template_decl_real): Remove bogus error message. 11258 (tsubst_decl): Fix typo in code contained in comment. 11259 (instantiate_template): Handle member template specializations. 11260 (most_general_template): Likewise. 11261 112622000-03-11 Gabriel Dos Reis <gdr@codesourcery.com> 11263 11264 * lex.c (whitespace_cr): Compress consecutive calls to warning(). 11265 (do_identifier): Ditto for error(). 11266 11267 * pt.c (convert_nontype_argument): Ditto for cp_error(). 11268 (convert_template_argument): Ditto for cp_pedwarn(). 11269 112702000-03-11 Jason Merrill <jason@casey.cygnus.com> 11271 11272 * exception.cc (__check_null_eh_spec): New fn. 11273 * except.c (expand_end_eh_spec): Call it if the spec is throw(). 11274 112752000-03-10 Jason Merrill <jason@casey.cygnus.com> 11276 11277 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE. 11278 * except.c (expand_end_eh_spec): Add the return type. 11279 * rtti.c (throw_bad_cast): Add the parmtypes. 11280 (throw_bad_typeid): Likewise. 11281 11282 * semantics.c (expand_stmt): Only leave out rtl for unused 11283 artificials, and set DECL_IGNORED_P on them as well. 11284 * decl.c (wrapup_globals_for_namespace): Likewise. 11285 112862000-03-09 Nathan Sidwell <nathan@codesourcery.com> 11287 11288 * decl.c (maybe_commonize_var): Skip all artificial decls. 11289 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN. 11290 112912000-03-10 Jason Merrill <jason@casey.cygnus.com> 11292 11293 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs. 11294 * cp-tree.h: Declare flag_enforce_eh_specs. 11295 * decl.c (store_parm_decls, finish_function): Check it. 11296 11297 C library functions don't throw. 11298 * Makefile.in (cfns.h): New target. 11299 (except.o): Depend on it. 11300 * Make-lang.in (cc1plus): Depend on cfns.gperf. 11301 * cfns.gperf: New file. 11302 * cfns.h: Generated. 11303 * except.c: Include it. 11304 (nothrow_libfn_p): New fn. 11305 * decl.c (grokfndecl): Use it. 11306 * cp-tree.h: Declare it. 11307 11308 * decl.c (push_overloaded_decl_1, auto_function, 11309 define_function): Lose. 11310 (build_library_fn_1): New static fn. 11311 (builtin_function): Use it. 11312 (get_atexit_node): Use build_library_fn_ptr. 11313 (build_library_fn, build_cp_library_fn, build_library_fn_ptr, 11314 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn, 11315 push_void_library_fn, push_throw_library_fn): New fns. 11316 * cp-tree.h: Declare them. 11317 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID. 11318 (throw_bad_cast_node, throw_bad_typeid_node): Lose. 11319 * except.c (init_exception_processing, call_eh_info, do_pop_exception, 11320 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns. 11321 * rtti.c (build_runtime_decl): Lose. 11322 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, 11323 build_dynamic_cast_1, expand_si_desc, expand_class_desc, 11324 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns. 11325 11326 * call.c (build_call): Remove result_type parm. 11327 Call mark_used on unused artificial fns. 11328 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust. 11329 113302000-03-09 Jason Merrill <jason@casey.cygnus.com> 11331 11332 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as 11333 appropriate. 11334 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL. 11335 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set 11336 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate. 11337 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1, 11338 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc, 11339 expand_generic_desc): Likewise. 11340 113412000-03-08 Nathan Sidwell <nathan@codesourcery.com> 11342 11343 * exception.cc (__cp_pop_exception): Cleanup the original object. 11344 113452000-03-08 Nathan Sidwell <nathan@codesourcery.com> 11346 11347 * decl.c (grok_op_properties): Merge conversion to void warning 11348 with other silly op warnings. 11349 113502000-03-08 Jason Merrill <jason@casey.cygnus.com> 11351 11352 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of 11353 array CONSTRUCTOR elements. Don't use expr_tree_cons. 11354 113552000-03-08 Nathan Sidwell <nathan@codesourcery.com> 11356 11357 * decl.c (cp_make_fname_decl): New function. 11358 (wrapup_globals_for_namespace): Don't emit unused static vars. 11359 (init_decl_processing): Remove comment about use of 11360 array_domain_type. Set make_fname_decl. 11361 (cp_finish_decl): Remove __FUNCTION__ nadgering. 11362 * semantics.c (begin_compound_stmt): Remove 11363 current_function_name_declared flagging. 11364 (expand_stmt): Don't emit unused local statics. 11365 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls 11366 specially. 11367 113682000-03-08 Nathan Sidwell <nathan@codesourcery.com> 11369 11370 * typeck.c (convert_for_assignment): Don't look at array 11371 initializer. 11372 * call.c (convert_like_real): Likewise. 11373 113742000-03-07 Jason Merrill <jason@casey.cygnus.com> 11375 11376 Add initial support for '\uNNNN' specifier. 11377 * lex.c (read_ucs): New fn. 11378 (readescape, skip_white_space): Call it. 11379 (is_extended_char, is_extended_char_1): New fns. 11380 (utf8_extend_token): New fn, #if 0'd out. 11381 (real_yylex): Treat extended chars like letters. 11382 11383 * search.c (note_debug_info_needed): Walk the bases even if we 11384 weren't deferring the type itself. 11385 113862000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 11387 11388 * decl2.c (finish_objects): Constify a char*. 11389 11390 * method.c (emit_thunk): Likewise. 11391 113922000-03-06 Nathan Sidwell <nathan@codesourcery.com> 11393 11394 * typeck.c (dubious_conversion_warnings): Look through 11395 REFERENCE_TYPE. 11396 11397Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 11398 11399 * class.c (dfs_modify_vtables): I is now unsigned. 11400 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int. 11401 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT. 11402 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned. 11403 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. 11404 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned. 11405 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR): 11406 Call integer_all_onesp. 11407 * typeck2.c (process_init_constructor): Use compare_tree_int. 11408 11409 * lang-specs.h (as): Don't call if -syntax-only. 11410 114112000-03-06 Mark Mitchell <mark@codesourcery.com> 11412 11413 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set 11414 RTL_EXPR_HAS_NO_SCOPE after all. 11415 114162000-03-05 Mark Mitchell <mark@codesourcery.com> 11417 11418 * expr.c (cplus_expand_expr, case STMT_EXPR): Use 11419 expand_start_stmt_expr and expand_end_stmt_expr directly. Set 11420 RTL_EXPR_HAS_NO_SCOPE. 11421 11422 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little 11423 later. 11424 11425 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P. 11426 114272000-03-05 Nathan Sidwell <nathan@codesourcery.com> 11428 11429 * call.c (convert_like): Macrofy. 11430 (convert_like_with_context): New macro. 11431 (convert_like_real): Renamed from convert_like. Add calling 11432 context parameters, for diagnostics. Add recursive flag. Call 11433 dubious_conversion_warnings for outer conversion. 11434 (build_user_type_conversion): Use convert_like_with_context. 11435 (build_over_call): Likewise. Don't warn about dubious 11436 conversions here. Adjust convert_default_arg calls. 11437 (convert_default_arg): Add context parameters for diagnostics. 11438 Pass through to convert_like_with_context. 11439 * cp-tree.h (convert_default_arg): Add context parameters. 11440 (dubious_conversion_warnings): Prototype new function. 11441 * typeck.c (convert_arguments): Adjust convert_default_arg call. 11442 (dubious_conversion_warnings): New function, broken 11443 out of convert_for_assignment. 11444 (convert_for_assignment): Adjust. 11445 114462000-03-03 Jason Merrill <jason@casey.cygnus.com> 11447 11448 * decl2.c (key_method): Break out from... 11449 (import_export_vtable, import_export_class): ...here. 11450 11451 * decl.c (finish_function): Don't mess with flag_keep_inline_functions. 11452 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context. 11453 11454 * search.c (note_debug_info_needed, dfs_debug_mark, 11455 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme. 11456 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed. 11457 114582000-03-03 Nathan Sidwell <nathan@codesourcery.com> 11459 11460 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix 11461 typos. 11462 114632000-03-02 Mark Mitchell <mark@codesourcery.com> 11464 11465 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ... 11466 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this. 11467 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro. 11468 (lang_type): Split gets_new into has_new and has_array_new. 11469 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 11470 (TYPE_GETS_NEW): Split into ... 11471 (TYPE_HAS_NEW_OPERATOR): ... this, and ... 11472 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this. 11473 (DECL_ARRAY_DELETE_OPERATOR_P): New macro 11474 (build_op_new_call): Don't declare. 11475 (build_new_1): Likewise. 11476 * call.c (build_op_new_call): Remove. 11477 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR 11478 instead of TYPE_NEEDS_DESTRUCTOR. 11479 (finish_struct_bits): Likewise. 11480 (add_implicitly_declared_members): Likewise. 11481 (check_field_decl): Likewise. 11482 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it 11483 correctly under the new ABI. 11484 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR 11485 instead of TYPE_NEEDS_DESTRUCTOR. 11486 (initialize_local_var): Likewise. 11487 (destroy_local_var): Likewise. 11488 (cp_finish_decl): Likewise. 11489 (register_dtor_fn): Likewise. 11490 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and 11491 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set 11492 TYPE_VEC_DELETE_TAKES_SIZE here. 11493 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and 11494 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. 11495 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 11496 (finish_destructor_body): Likewise. 11497 (maybe_build_cleanup_1): Likewise. 11498 * decl2.c (do_static_destruction): Likewise. 11499 * init.c (build_new_1): Make it static. 11500 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 11501 (expand_cleanup_for_base): Likewise. 11502 (get_cookie_size): New function. 11503 (build_new_1): Handle array-new cookies correctly under the new 11504 ABI. 11505 (build_vec_delete_1): Likewise. 11506 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 11507 (build_delete): Likewise. 11508 (build_vec_delete): Handle array-new cookies correctly under the new 11509 ABI. 11510 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 11511 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and 11512 TYPE_HAS_ARRAY_NEW_OPERATOR. 11513 * ptree.c (print_lang_type): Check them. 11514 * search.c (context_for_name_lookup): Fix typo in comment. 11515 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 11516 * tree.c (break_out_cleanups): Likewise. 11517 (build_cplus_array_test_1): Likewise. 11518 (cp_build_qualified_type_real): Likewise. 11519 * typeck.c (complete_type): Likewise. 11520 11521 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of 11522 the command-line, not the end. 11523 115242000-03-01 Jason Merrill <jason@casey.cygnus.com> 11525 11526 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG. 11527 115282000-03-02 Tom Tromey <tromey@cygnus.com> 11529 11530 * cp-tree.h (build_java_class_ref): Declare. 11531 * init.c (build_java_class_ref): No longer static. 11532 * except.c (expand_throw): Generate a Java-style `throw' if the 11533 thrown object is a "Java" object. 11534 (initialize_handler_parm): Generate a Java-style lookup of 11535 exception info if the caught object is a "Java" object. 11536 (catch_language, catch_language_init): New globals. 11537 (decl_is_java_type): New function. 11538 (expand_start_catch_block): Don't call push_eh_info() or 11539 push_eh_cleanup() when handling a Java-style "catch". Pass Java 11540 class reference to build_catch_block. 11541 11542Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 11543 11544 * typeck.c (comptypes): Treat sizetype like its language equivalent. 11545 115462000-03-01 Bernd Schmidt <bernds@cygnus.co.uk> 11547 11548 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize 11549 to merge reference/pointer code and fix incorrect warnings. 11550 115512000-02-29 Jason Merrill <jason@casey.cygnus.com> 11552 11553 * search.c (protected_accessible_p): Use context_for_name_lookup. 11554 11555 * init.c (construct_virtual_bases): Fix thinko. 11556 * typeck.c (expand_ptrmemfunc_cst): Fix thinko. 11557 115582000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de> 11559 11560 * decl.c (current_function_decl): Move to toplev.c. 11561 115622000-02-29 Nathan Sidwell <nathan@codesourcery.com> 11563 11564 * pt.c (fn_type_unification): Unify return type, whenever 11565 provided. 11566 (get_bindings_real): Only pass return type when necessary. 11567 Remove explicit return type check. 11568 * class.c (resolve_address_of_overloaded_function): Pass desired 11569 return type to fn_type_unification. 11570 11571Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 11572 11573 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear 11574 DECL_FIELD_SIZE. 11575 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not 11576 DECL_FIELD_SIZE. 11577 * rtti.c (expand_class_desc): Likewise. 11578 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name. 11579 (THUNK_VCALL_OFFSET): Likewise. 11580 (THUNK_DELTA): Reflect changes in ../tree.h. 11581 115822000-02-28 Jason Merrill <jason@casey.cygnus.com> 11583 11584 * search.c (protected_accessible_p): Also allow the access if 11585 the member is public in DERIVED. Lose TYPE parm. 11586 (friend_accessible_p): Lose TYPE parm. 11587 (accessible_p): Adjust. 11588 11589Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 11590 11591 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop 11592 on things that are not sizes; ssize_binop deleted. 11593 Call size_diffop when appropriate. 11594 (dfs_build_vcall_offset_vtbl_entries): Likewise. 11595 (build_primary_vtable, build_secondary_vtable): Likewise. 11596 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise. 11597 Variable I is HOST_WIDE_INT. 11598 (get_vfield_offset): Pass proper types to size_binop. 11599 (size_extra_vtbl_entries, layout_virtual_bases): Likewise. 11600 (finish_struct_1): Likewise. 11601 (skip_rtti_stuff): Arg N is now pointer to signed. 11602 (layout_class_type): Use size_zero_node. 11603 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed. 11604 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop. 11605 * decl.c (complete_arry_type): Pass proper types to size_binop. 11606 (xref_basetypes): BINFO_OFFSET is sizetype. 11607 * error.c (dump_expr): Don't use size_binop non-sizes. 11608 * expr.c (cplus_expand_constant): Pass proper types to size_binop. 11609 * init.c (construct_virtual_bases): Fix type error. 11610 (build_vec_delete_1): Pass proper type to size_binop and don't 11611 fold result. 11612 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype. 11613 * rtti.c (get_base_offset): Pass proper type to size_binop. 11614 * search.c (dfs_find_vbases): Fix type error. 11615 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed. 11616 (dfs_get_vbase_types): BINFO_OFFSET is sizetype. 11617 * tree.c (debug_binfo): Variable N is signed. 11618 Use HOST_WIDE_INT_PRINT_DEC. 11619 * typeck.c (comptypes): sizetype is same as equivalent integer type. 11620 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT, 11621 size_one_node and size_zero_node. 11622 (c_alignof): Use size_one_node. 11623 (build_component_addr): Pass proper types to size_binop. 11624 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes. 11625 116262000-02-26 Jason Merrill <jason@casey.cygnus.com> 11627 11628 Implement class scope using-declarations for functions. 11629 * class.c (handle_using_decl): Call add_method for used functions. 11630 Use IDENTIFIER_CLASS_VALUE to check for conflicts. 11631 (add_method): Used functions are hidden by local functions. 11632 (check_bases_and_members): Handle using-decls before finalizing 11633 CLASSTYPE_METHOD_VEC. 11634 * call.c (add_function_candidate): Add ctype parm; if non-zero, 11635 override the type of 'this' accordingly. 11636 (add_template_candidate, add_template_candidate_real): Add ctype parm. 11637 (convert_class_to_reference, build_user_type_conversion_1, 11638 build_new_function_call, build_object_call, build_new_op, 11639 build_new_method_call): Pass ctype parm. 11640 11641 * search.c (lookup_member): Put rval_binfo, not basetype_path, in 11642 the baselink. 11643 * call.c (convert_class_to_reference, build_user_type_conversion_1, 11644 build_new_function_call, build_object_call, build_new_op, 11645 build_new_method_call, build_op_delete_call): Don't get basetype_path 11646 from a baselink. 11647 * typeck.c (build_component_ref): Likewise. 11648 * init.c (build_offset_ref): Likewise. 11649 (resolve_offset_ref): Don't call enforce_access. 11650 Call build_scoped_ref. 11651 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it 11652 would cause an error or if -pedantic. 11653 * class.c (alter_access): Lose binfo parm. 11654 116552000-02-26 Mark Mitchell <mark@codesourcery.com> 11656 11657 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into 11658 types. 11659 116602000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at> 11661 11662 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info 11663 pseudo_type_info creation into the std namespace 11664 116652000-02-26 Mark Mitchell <mark@codesourcery.com> 11666 11667 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF. 11668 (import_export_class): Remove declaration. 11669 * decl2.c (import_export_class): Make it static. 11670 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR, 11671 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, 11672 EXPR_WITH_FILE_LOCATION. 11673 * lex.c (check_newline): Tweak filename/lineno setting. 11674 * semantics.c (begin_while_stmt): Fix typo in comment. 11675 11676Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 11677 11678 * lang-options.h (-fmessage-length=): Add missing option. 11679 11680 * Make-lang.in (CXX_SRCS): Add .h files and sort list. 11681 116822000-02-26 Zack Weinberg <zack@wolery.cumb.org> 11683 11684 * Make-lang.in: Delete refs to LIBGCC2_DEPS. 11685 11686Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com> 11687 11688 * optimize.c (expand_call_inline): Emit the return label before 11689 evaluating the return value. 11690 116912000-02-24 Mark Mitchell <mark@codesourcery.com> 11692 11693 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather 11694 than duplicating functionality here. 11695 * optimize.c: Include input.h. 11696 (expand_call_inline): Use push_srcloc and pop_srcloc. 11697 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note. 11698 * parse.c: Regenerated. 11699 * Makefile.in (lex.o): Depend on input.h. 11700 (optimize.o): Likewise. 11701 117022000-02-24 Nathan Sidwell <nathan@codesourcery.com> 11703 11704 * decl.c (grokdeclarator): Diagnose qualifiers on non-member 11705 function type, rather than ICE. 11706 117072000-02-23 Jason Merrill <jason@casey.cygnus.com> 11708 11709 * decl.c (grokdeclarator): Call decl_type_access_control. 11710 * parse.y (parse_end_decl): Don't call decl_type_access_control if 11711 decl is null. 11712 117132000-02-23 Nathan Sidwell <nathan@codesourcery.com> 11714 11715 * decl.c (decls_match): Remove obsolete static member nadgering. 11716 117172000-02-21 Martin v. L�wis <loewis@informatik.hu-berlin.de> 11718 11719 * decl.c (grokdeclarator): Change ANSI to ISO. 11720 * lex.c (consume_string, readescape, do_identifier): Likewise. 11721 (parse_float, real_yylex): Likewise. 11722 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise. 11723 (unary_expr, new_initializer, cast_expr, primary, primary_no_id, 11724 new_type_id, maybe_label_decls, simple_stmt, 11725 for.init.statement): Likewise. 11726 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise. 11727 * semantics.c (finish_named_return_value): Likewise. 11728 * parse.c: Regenerate. 11729 117302000-02-21 Mark Mitchell <mark@codesourcery.com> 11731 11732 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro. 11733 (CPTI_CLASS_STAR_TYPE): Remove. 11734 (vtable_index_type): Likewise. 11735 (class_star_type_node): Remove. 11736 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI. 11737 (build_binary_op_nodefault): Remove. 11738 * call.c (build_new_op): Use build_binary_op instead of 11739 build_binary_op_nodefault. 11740 * decl.c (init_decl_processing): Remove class_star_type_node 11741 initialization. Make delta_type_node ptrdiff_type_node under the 11742 new ABI. Initialize vtable_index_type. 11743 (build_ptrmemfunc_type): Build different structures for the new 11744 ABI. 11745 (build_enumerator): Use build_binary_op instead of 11746 build_binary_op_nodefault. 11747 * method.c (build_overload_value): Mangle pointers-to-members 11748 appropriately under the new ABI. 11749 * typeck.c (build_array_ref): Use build_binary_op instead of 11750 build_binary_op_nodefault. 11751 (get_member_function_from_ptrfunc): Adjust for the new ABI. 11752 (build_binary_op_nodefault): Rename to ... 11753 (build_binary_op): ... this. Remove old version. Adjust for 11754 pointer-to-member comparisons under the new ABI. 11755 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI. 11756 (build_ptrmemfunc): Adjust for the new ABI. 11757 (expand_ptrmemfunc_cst): Likewise. 11758 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI. 11759 (pfn_from_ptrmemfunc): Adjust for the new ABI. 11760 117612000-02-21 Gabriel Dos Reis <gdr@codesourcery.com> 11762 11763 * call.c (build_object_call): Compress consecutive calls to 11764 cp_error. 11765 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'. 11766 (build_op_delete_call): Adjust message formatting. 11767 11768 * class.c (check_bases): Compress consecutive calls to 11769 cp_pedwarn. 11770 (finish_struct_anon): Say 'ISO C++'. 11771 11772 * decl.c (start_decl): Same here. 11773 (grok_reference_init): Likewise. 11774 (grokfndecl): Correct message formatting. 11775 (grokfndecl): Improve diagnostic. 11776 (check_static_variable_definition): Likewise. Say 'ISO C++' 11777 (compute_array_index_type): Say 'ISO C++' 11778 (create_array_type_for_decl): Compress consecutive calls to 11779 cp_error. 11780 (grokdeclarator): Say 'ISO C++' 11781 (grok_op_properties): Likewise. 11782 11783 * decl2.c (delete_sanity): Clairify diagnostic. 11784 (check_member_template): Same here. 11785 (grok_function_init): Use consistent terminology. 11786 11787 * expr.c (do_case): Say 'ISO C++' 11788 11789 * friend.c (do_friend): Compress consecutive calls to warning. 11790 117912000-02-20 Mark Mitchell <mark@codesourcery.com> 11792 11793 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro. 11794 * class.c (build_secondary_vtable): Reorganize. Don't create a 11795 new vtable under the new ABI. 11796 (layout_vtable_decl): Don't add num_extra_vtbl_entries when 11797 computing the size. 11798 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return 11799 the initializing elements. 11800 (initialize_vtable): New function. 11801 (dfs_finish_vtbls): Use it. 11802 (dfs_accumulate_vtbl_inits): New function. 11803 (finish_vtbls): Merge primary and secondary vtables under the new 11804 ABI. 11805 (finish_struct_1): Remove redundant call to layout_vtable_decl. 11806 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that 11807 aren't VAR_DECLs. 11808 11809 * class.c (build_vtable): New function, split out from ... 11810 (get_vtable_decl): ... here, and ... 11811 (build_secondary_vtable): ... here. 11812 11813 * pt.c (tsubst_decl): Fix formatting. 11814 11815Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 11816 11817 * class.c (build_primary_vtable, layout_vtable_decl): Likewise. 11818 (avoid_overlap, build_base_field): Likewise. 11819 (build_base_field, build_base_fields, is_empty_class): 11820 Test DECL_SIZE with integer_zero. 11821 (layout_class_type): Set CLASSTYPE_SIZE_UNIT. 11822 * cp-tree.h (struct lang_type): New field size_unit. 11823 (CLASSTYPE_SIZE_UNIT): New macro. 11824 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT. 11825 (cp_finish_decl): Delete -Wlarger-than processing. 11826 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT. 11827 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT. 11828 * tree.c (make_binfo): binfo vector is one entry longer. 11829 (walk_tree): Walk DECL_SIZE_UNIT. 11830 118312000-02-19 Mark Mitchell <mark@codesourcery.com> 11832 11833 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in 11834 comment. 11835 (build_vtable_entry): Don't assume all vtable entries are 11836 functions. 11837 (build_vtbl_initializer): Adjust accordingly. 11838 (get_vtable_decl): Fix formatting. 11839 118402000-02-18 Jason Merrill <jason@casey.cygnus.com> 11841 11842 * semantics.c (deferred_type_access_control): Walk the entire 11843 type_lookups list. 11844 (save_type_access_control): Rename from 11845 initial_deferred_type_access_control. Just remember the value. 11846 (decl_type_access_control): New fn. 11847 (begin_function_definition): Use deferred_type_access_control, after 11848 we've started the function. Set type_lookups to error_mark_node. 11849 * parse.y (frob_specs, fn.def1): Adjust. 11850 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns. 11851 (parse_end_decl, parse_bitfield0, parse_method): New fns. 11852 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them. 11853 (after_type_component_declarator0): Likewise. 11854 (after_type_component_declarator): Likewise. 11855 (notype_component_declarator): Likewise. 11856 * cp-tree.h: Adjust. 11857 11858 * decl.c (redeclaration_error_message): Allow redeclaration of 11859 namespace-scope decls. 11860 118612000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de> 11862 11863 * typeck2.c (my_friendly_abort): Use GCCBUGURL. 11864 118652000-02-17 Mark Mitchell <mark@codesourcery.com> 11866 11867 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT. 11868 * decl2.c (grokclassfn): Likewise. 11869 11870 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS. 11871 11872 * decl2.c (lang_decode_option): Don't set default message length 11873 here. 11874 * lex.c (lang_init_options): Set it here. 11875 118762000-02-16 Mark Mitchell <mark@codesourcery.com> 11877 11878 Make DECL_CONTEXT mean the class in which a member function was 11879 declared, even for a virtual function. 11880 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust. 11881 (DECL_FRIEND_CONTEXT): New macro. 11882 (DECL_REAL_CONTEXT): Remove. 11883 (SET_DECL_FRIEND_CONTEXT): Likewise. 11884 (DECL_VIRTUAL_CONTEXT): Adjust. 11885 (DECL_CLASS_SCOPE_P): Use TYPE_P. 11886 (add_friends): Remove. 11887 (hack_decl_function_context): Likewise. 11888 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with 11889 CP_DECL_CONTEXT. 11890 (build_over_call): Fix indentation. Use DECL_CONTEXT 11891 instead of DECL_CLASS_CONTEXT. 11892 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise. 11893 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT. 11894 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 11895 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT. 11896 (build_base_field): Likewise. 11897 (finish_struct_1): Likewise. 11898 (build_self_reference): Likewise. 11899 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not 11900 DECL_REAL_CONTEXT. 11901 (pushtag): Use decl_function_context, not 11902 hack_decl_function_context. 11903 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. 11904 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT. 11905 (pushdecl): Remove bogus code. 11906 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT. 11907 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. 11908 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 11909 Use decl_function_context, nothack_decl_function_context. 11910 (grokvardecl): Don't set DECL_CLASS_CONTEXT. 11911 (grokdeclarator): Likewise. Use decl_function_context, not 11912 hack_decl_function_context. 11913 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT. 11914 (start_function): Use DECL_FRIEND_CONTEXT, not 11915 DECL_CLASS_CONTEXT. Use decl_function_context, not 11916 hack_decl_function_context. 11917 (finish_function): Use decl_function_context, not 11918 hack_decl_function_context. 11919 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not 11920 DECL_CLASS_CONTEXT. 11921 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT. 11922 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT. 11923 (grokfield): Likewise. 11924 (finish_builtin_type): Likewise. 11925 (finish_vtable_vardec): Use decl_function_context, not 11926 hack_decl_function_context. 11927 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 11928 (start_static_initialization_or_destruction): Likewise. 11929 (finish_static_initialization_or_destruction): Likewise. 11930 (mark_used): Adjust logic for deciding when to synthesize methods. 11931 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not 11932 DECL_REAL_CONTEXT. 11933 * error.c (dump_function_decl): Use DECL_CONTEXT, not 11934 DECL_CLASS_CONTEXT. 11935 * friend.c (is_friend): Likewise. 11936 (add_friends): Remove. 11937 (do_friend): Use SET_DECL_FRIEND_CONTEXT. 11938 * lex.c (begin_definition_of_inclass_inline): Use 11939 decl_function_context, not hack_decl_function_context. 11940 (process_next_inline): Likewise. 11941 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. 11942 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not 11943 DECL_CLASSS_CONTEXT. 11944 (hack_identifier): Likewise. 11945 (synthesize_method): Use decl_function_context, not 11946 hack_decl_function_context. 11947 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not 11948 DECL_REAL_CONTEXT. 11949 (is_member_template): Use decl_function_context, not 11950 hack_decl_function_context. Use DECL_CONTEXT, not 11951 DECL_CLASS_CONTEXT. 11952 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not 11953 DECL_CLASS_CONTEXT. 11954 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not 11955 DECL_REAL_CONTEXT. 11956 (push_template_decl_real): Likewise. 11957 (instantiate_class_template): Don't call add_friends. 11958 (tsubst_default_argument): Use DECL_CONTEXT, not 11959 DECL_REAL_CONTEXT. 11960 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT. 11961 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 11962 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not 11963 DECL_CLASS_CONTEXT. 11964 * repo.c (repo_inline_used): Likewise. 11965 * search.c (current_scope): Adjust for new _CONTEXT macros. 11966 (context_for_name_lookup): Use CP_DECL_CONTEXT, not 11967 DECL_REAL_CONTEXT. 11968 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 11969 (lookup_fnfields_here):Likewise. 11970 (check_final_overrider): Likewise. 11971 (init_vbase_pointers): Likewise. 11972 (virtual_context): Likewise. 11973 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT. 11974 (expand_body): Use decl_function_context, not 11975 hack_decl_function_context. 11976 * tree.c (hack_decl_function_context): Remove. 11977 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not 11978 DECL_CLASS_CONTEXT. 11979 * typeck2.c (error_not_base_type): Likewise. 11980 119812000-02-15 Jason Merrill <jason@casey.cygnus.com> 11982 11983 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE. 11984 119852000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 11986 11987 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h. 11988 119892000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk> 11990 11991 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec. 11992 119932000-01-16 Gabriel Dos Reis <gdr@codesourcery.com> 11994 11995 * decl2.c (lang_decode_option): Enable automatic line wrapping. 11996 119972000-02-13 Jason Merrill <jason@casey.cygnus.com> 11998 11999 * parse.y (frob_specs): Split out... 12000 (parse_decl): From here. 12001 (fn.def2): Call initial_deferred_type_access_control. 12002 (after_type_component_declarator0): Call frob_specs. 12003 (notype_component_declarator0): Likewise. 12004 * search.c (friend_accessible_p): Nested classes are friends of their 12005 enclosing classes. 12006 120072000-02-10 Mark Mitchell <mark@codesourcery.com> 12008 12009 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be 12010 used to create an implicit temporary. 12011 12012 * class.c (dfs_modify_vtables): Tweak calculation of functions to 12013 override. 12014 120152000-02-08 Nathan Sidwell <nathan@acm.org> 12016 12017 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to 12018 strip array element qualifiers too. 12019 120202000-02-07 Mark Mitchell <mark@codesourcery.com> 12021 12022 * decl.c (store_parm_decls): Don't build cleanups for parameters 12023 while processing_template_decl. 12024 120252000-02-07 Jason Merrill <jason@casey.cygnus.com> 12026 12027 * cp-tree.h (struct saved_scope): Add incomplete field. 12028 (namespace_scope_incomplete): New macro. 12029 * decl.c (pushdecl): Use it. 12030 (hack_incomplete_structures): Use it. See through artificial 12031 binding levels. 12032 (mark_saved_scope): Mark it. 12033 12034 Implement access control for nested types. 12035 * search.c (type_access_control): New fn. 12036 (accessible_p): Now we do perform access control for types. 12037 * semantics.c (deferred_type_access_control): New fn. 12038 (initial_deferred_type_access_control): New fn. 12039 (begin_function_definition): Call it. Add lookups parm. 12040 * decl.c (struct binding_level): Add this_class field. 12041 (pushlevel_class): Set it. 12042 (mark_binding_level): Mark it. 12043 (lookup_name_real): Use it. Call type_access_control. 12044 (mark_saved_scope): Mark lookups field. 12045 * cp-tree.h (flagged_type_tree): Add lookups field. 12046 (struct saved_scope): Add lookups field. 12047 (type_lookups): New macro. 12048 * parse.y (declmods): Now <ftype>. 12049 (parse_decl): Add lookups parm. Call 12050 initial_deferred_type_access_control. 12051 (lang_extdef): Clear type_lookups. 12052 (typed_declspecs, declmods, typespec): Set lookups field. 12053 (initdcl): Call deferred_type_access_control. 12054 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0, 12055 component_decl_1, named_parm): Adjust. 12056 * friend.c (is_friend): Nested classes are friends of their 12057 enclosing classes. 12058 12059 * class.c (currently_open_derived_class): New fn. 12060 * method.c (hack_identifier): Use it. 12061 12062 * lex.c (do_identifier): Remove obsolete code. 12063 12064 * parse.y (typed_typespecs): Propagate new_type_flag properly. 12065 120662000-02-05 Zack Weinberg <zack@wolery.cumb.org> 12067 12068 * tinfo.h: Remove apostrophes from C++ comment (xgettext 12069 thinks this file is plain C). 12070 120712000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12072 12073 * Makefile.in (call.o): Depend on $(EXPR_H). 12074 12075 * call.c: Include "expr.h". 12076 12077 * class.c (dump_class_hierarchy): Add prototype. 12078 12079 * search.c (dfs_get_pure_virtuals): Likewise. 12080 120812000-02-1 Ulrich Drepper <drepper@redhat.com> 12082 12083 * parse.y (simple_stmt): Allow :: token in asm parameter list. 12084 * parse.c: Rebuilt. 12085 12086Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com> 12087 12088 * class.c (build_vtbl_or_vbase_field): New parameter fcontext. 12089 Store it in DECL_FCONTEXT. 12090 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers. 12091 120922000-01-31 Jason Merrill <jason@casey.cygnus.com> 12093 12094 * tinfo.h (old abi): #include "tconfig.h". 12095 * tinfo.cc (convert_to_base): Move into old abi section. 12096 120972000-01-31 Mark Mitchell <mark@codesourcery.com> 12098 12099 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation. 12100 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO. 12101 (BINFO_PRIMARY_BINFO): New macro. 12102 (BF_DELTA): Rename to ... 12103 (BV_DELTA): ... this. 12104 (BF_VCALL_INDEX): Rename to ... 12105 (BV_VCALL_INDEX): ... this. 12106 (BF_FN): Rename to ... 12107 (BV_FN): ... this. 12108 * class.c (build_vbase_path): Adjust for changes to reverse_path. 12109 (set_rtti_entry): Rename BF_ macros to BV_ variants. 12110 (modify_vtable_entry): Simplify. 12111 (add_virtual_function): Rename BF_ macros to BV_ variants. 12112 (build_vtable_initializer): Likewise. 12113 (get_class_offset_1): Remove. 12114 (dfs_get_class_offset): Likewise. 12115 (get_class_offset): Likewise. 12116 (dfs_find_final_overrider): New function. 12117 (find_final_overrider): Likewise. 12118 (modify_one_vtable): Remove. 12119 (dfs_find_base): New function. 12120 (dfs_modify_vtables): Fold modify_one_vtable in here. Use 12121 find_final_overrider. 12122 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new 12123 virtuals. 12124 (dfs_fixup_vtable_deltas): Remove. 12125 (override_one_vtable): Remove. 12126 (merge_overrides): Likewise. 12127 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for 12128 unreal chilren of virtual bases. 12129 (finish_struct_1): Don't use merge_overrides. Don't use 12130 dfs_fixup_vtable_deltas. 12131 * tree.c (reverse_path): Return a TREE_LIST, not a chain of 12132 BINFOs. 12133 121342000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl> 12135 Jason Merrill <jason@yorick.cygnus.com> 12136 12137 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT. 12138 121392000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at> 12140 12141 * exception.cc (__throw_bad_typeid): Add missing std::. 12142 121432000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12144 12145 * cp-tree.h (make_thunk): PROTO -> PARAMS. 12146 121472000-01-31 Nathan Sidwell <sidwell@codesourcery.com> 12148 12149 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi. 12150 12151 Runtime support for new-abi rtti. 12152 * inc/typeinfo (type_info::operator!=): Define in class. 12153 (type_info::before, type_info::name, type_info::operator==, 12154 type_info::operator!=): Define new ABI implementations. 12155 (type_info::is_pointer_p, type_info::is_function_p): Declare 12156 new virtual functions. 12157 (type_info::do_catch, type_info::do_upcast): Likewise. 12158 12159 * tinfo.h (__base_class_info): Define new class. 12160 (__class_type_info): Likewise. 12161 (__si_class_type_info): Likewise. 12162 (__vmi_class_type_info): Likewise. 12163 (__dynamic_cast): Prototype. 12164 12165 * tinfo.cc: Conditionalize old and new rtti mechanisms. 12166 (type_info::is_pointer_p): Define new function. 12167 (type_info::is_function_p): Likewise. 12168 (type_info::do_catch): Likewise. 12169 (type_info::do_upcast): Likewise. 12170 (vtable_prefix): New structure for vtable access. 12171 (adjust_pointer): Define new template function. 12172 (contained_p, public_p, virtual_p, contained_public_p, 12173 contained_nonpublic_p, contained_nonvirtual_p): Define new 12174 functions. 12175 (nonvirtual_base_type): New local variable. 12176 (__class_type_info::~__class_type_info): Define. 12177 (__si_class_type_info::~__si_class_type_info): Likewise. 12178 (__vmi_class_type_info::~__vmi_class_type_info): Likewise. 12179 (__class_type_info::do_catch): Define new function. 12180 (__class_type_info::do_upcast): Likewise. 12181 (__class_type_info::find_public_src): Likewise. 12182 (__class_type_info::do_find_public_src): Likewise. 12183 (__si_class_type_info::do_find_public_src): Likewise. 12184 (__vmi_class_type_info::do_find_public_src): Likewise. 12185 (__class_type_info::do_dyncast): Likewise. 12186 (__si_class_type_info::do_dyncast): Likewise. 12187 (__vmi_class_type_info::do_dyncast): Likewise. 12188 (__class_type_info::do_upcast): Likewise. 12189 (__si_class_type_info::do_upcast): Likewise. 12190 (__vmi_class_type_info::do_upcast): Likewise. 12191 (__dynamic_cast): Likewise. 12192 12193 * tinfo2.cc (__fundamental_type_info): Define new class. 12194 (__pointer_type_info): Likewise. 12195 (__reference_type_info): Likewise. 12196 (__array_type_info): Likewise. 12197 (__function_type_info): Likewise. 12198 (__enum_type_info): Likewise. 12199 (__ptr_to_member_type_info): Likewise. 12200 (__fundamental_type_info::~__fundamental_type_info): Define. 12201 (__pointer_type_info::~__pointer_type_info): Likewise. 12202 (__reference_type_info::~__reference_type_info): Likewise. 12203 (__array_type_info::~__array_type_info): Likewise. 12204 (__function_type_info::~__function_type_info): Likewise. 12205 (__enum_type_info::~__enum_type_info): Likewise. 12206 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise. 12207 (__pointer_type_info::do_catch): Define new function. 12208 (__ptr_to_member_type_info::do_catch): Define new function. 12209 12210 (__throw_type_match_rtti_2): Use new ABI interface, if enabled. 12211 (__is_pointer): Likewise. 12212 12213 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti. 12214 122152000-01-30 Mark Mitchell <mark@codesourcery.com> 12216 12217 * cp/class.c (build_vtable): Rename to build_primary_vtable. 12218 (prepare_fresh_vtable): Rename to build_secondary_vtable. 12219 (make_new_vtable): New function. 12220 (modify_vtable_entry): Handle generation of new vtables correctly. 12221 (modify_one_vtable): Remove unused parameter. 12222 (dfs_fixup_vtable_deltas): Likewise. 12223 (override_one_vtable): Use build_secondary_vtable. 12224 (finish_struct_1): Use build_primary_vtable and 12225 build_secondary_vtable. 12226 122272000-01-28 Ulrich Drepper <drepper@redhat.com> 12228 12229 * cp/decl.c: Adjust variable names, comments, help strings. 12230 122312000-01-29 Nathan Sidwell <nathan@acm.org> 12232 12233 * new2.cc (operator delete[]): Use operator delete, don't assume 12234 implementation. 12235 122362000-01-29 Nathan Sidwell <sidwell@codesourcery.com> 12237 12238 * class.c (build_vtbl_initializer): Add argument to 12239 build_vtable_entry call. 12240 122412000-01-27 Mark Mitchell <mark@codesourcery.com> 12242 12243 * cp-tree.def (THUNK_DECL): Discuss vcall indices. 12244 * cp-tree.h (BINFO_VIRTUALS): Update documentation. 12245 (BF_DELTA): New macro. 12246 (BF_VCALL_INDEX): Likewise. 12247 (BF_FN): Likewise. 12248 (THUNK_VCALL_OFFSET): Likewise. 12249 (make_thunk): Change prototype. 12250 * class.c (build_vtable_entry): Integrate 12251 build_vtable_entry_for_fn. Handle vcall indices. 12252 (build_vtable_entry_for_fn): Remove. 12253 (set_rtti_entry): Handle vcall indices. Use BF_DELTA, 12254 BF_VCALL_INDEX, BF_FN. 12255 (modify_vtable_entry): Integrate common code from 12256 modify_one_vtable and dfs_fixup_vtable_deltas. 12257 (add_virtual_function): Set BF_VCALL_INDEX. 12258 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX, 12259 and BF_FN. 12260 (modify_one_vtable): Simplify. 12261 (dfs_fixup_vtable_deltas): Likewise. 12262 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 12263 * method.c (make_thunk): Handle vcall indices. 12264 122652000-01-28 Nathan Sidwell <sidwell@codesourcery.com> 12266 12267 Compiler side new abi rtti (not enabled). 12268 * cp-tree.h (new_abi_rtti_p): New macro. 12269 (emit_support_tinfos): Prototype new function. 12270 (tinfo_decl_p): Likewise. 12271 (emit_tinfo_decl): Likwise. 12272 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor 12273 macros. 12274 (doing_runtime): New local static. 12275 (init_rtti_processing): Add new-abi initializer. 12276 (get_tinfo_decl): Add new-abi logic. 12277 (tinfo_from_decl): Likewise. 12278 (build_dynamic_cast_1): Likewise. 12279 (qualifier_flags): New static function. 12280 (tinfo_base_init): Likewise. 12281 (generic_initializer): Likewise. 12282 (ptr_ref_initializer): Likewise. 12283 (ptmd_initializer): Likewise. 12284 (class_hint_flags): Likewise. 12285 (class_initializer): Likewise. 12286 (synthesize_tinfo_var): Likewise. 12287 (create_real_tinfo_var): Likewise. 12288 (create_pseudo_type_info): Likewise. 12289 (get_vmi_pseudo_type_info): Likewise. 12290 (create_tinfo_types): Likewise. 12291 (emit_support_tinfos): New global function. 12292 (tinfo_decl_p): New global predicate. 12293 (emit_tinfo_decl): New global function. 12294 * class.c (set_rtti_entry): Generalize for old and new rtti. 12295 (build_vtbl_initializer): Likewise. 12296 * decl2.c (finish_file): Likewise. 12297 12298Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com> 12299 12300 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t) 12301 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))). 12302 12303Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com> 12304 12305 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit 12306 for scopes. 12307 123082000-01-26 Jason Merrill <jason@casey.cygnus.com> 12309 12310 * pt.c (unify): Use fold, not maybe_fold_nontype_arg. 12311 12312Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk> 12313 12314 * optimize.c (calls_setjmp_r): Supply new argument 12315 to special_function_p. 12316 123172000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12318 12319 * call.c: PROTO -> PARAMS. 12320 * class.c: Likewise. 12321 * cp-tree.h: Likewise. 12322 * cvt.c: Likewise. 12323 * decl.c: Likewise. 12324 * decl.h: Likewise. 12325 * decl2.c: Likewise. 12326 * dump.c: Likewise. 12327 * errfn.c: Likewise. 12328 * error.c: Likewise. 12329 * except.c: Likewise. 12330 * expr.c: Likewise. 12331 * init.c: Likewise. 12332 * input.c: Likewise. 12333 * lex.c: Likewise. 12334 * lex.h: Likewise. 12335 * method.c: Likewise. 12336 * optimize.c: Likewise. 12337 * parse.y: Likewise. 12338 * pt.c: Likewise. 12339 * repo.c: Likewise. 12340 * rtti.c: Likewise. 12341 * search.c: Likewise. 12342 * semantics.c: Likewise. 12343 * spew.c: Likewise. 12344 * tree.c: Likewise. 12345 * typeck.c: Likewise. 12346 * typeck2.c: Likewise. 12347 * xref.c: Likewise. 12348 123492000-01-25 Richard Henderson <rth@cygnus.com> 12350 12351 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR. 12352 123532000-01-25 Mark Mitchell <mark@codesourcery.com> 12354 12355 * cp-tree.h (vcall_offset_in_vtable_p): New macro. 12356 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment. 12357 (struct vcall_offset_data_s): New type. 12358 (dfs_vcall_offset_queue_p): New function. 12359 (dfs_build_vcall_offset_vtbl_entries): Likewise. 12360 (build_vcall_offset_vtbl_entries): Likewise. 12361 (layout_vtable_decl): Likewise. 12362 (num_vfun_entries): Likewise. 12363 (num_extra_vtbl_entries): Add the entries for vcall offsets. 12364 (build_vtbl_initializer): Likewise. 12365 (dfs_finish_vtabls): Use layout_vtable_decl. 12366 (modify_one_vtables): Always duplicate vtables under the new ABI. 12367 (finish_struct_1): Use layout_vtable_decl. 12368 123692000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12370 12371 * decl.c (member_function_or_else): Change third arg from a format 12372 specifier to an `enum overload_flags'. Callers changed. 12373 123742000-01-25 Gabriel Dos Reis <gdr@codesourcery.com> 12375 12376 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof, 12377 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast, 12378 build_const_cast, get_delta_difference, check_return_expr): Avoid 12379 ANSI string concatenation usage. 12380 123812000-01-24 Mark Mitchell <mark@codesourcery.com> 12382 12383 * class.c (layout_class_type): Put the fields required to make a 12384 class non-empty at the end, not the beginning, of the TYPE_FIELDs 12385 list. 12386 123872000-01-24 Jason Merrill <jason@casey.cygnus.com> 12388 12389 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a 12390 template. 12391 12392 * decl2.c (mark_used): Do instantiate inlines that have been 12393 explicitly instantiated. 12394 123952000-01-24 Richard Henderson <rth@cygnus.com> 12396 12397 * call.c (build_over_call): Use expand_tree_builtin. 12398 * typeck.c (build_function_call_real): Likewise. 12399 (build_binary_op_nodefault): Handle unordered compares. 12400 124012000-01-24 Nathan Sidwell <sidwell@codesourcery.com> 12402 12403 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New 12404 cp_tree_index values. 12405 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node): 12406 New global node #defines for them. 12407 * rtti.c (call_void_fn): Replace with ... 12408 (build_runtime_decl): ... new static function. 12409 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl. 12410 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl. 12411 (build_dynamic_cast_1): Always produce correctly typed result. 12412 Explicitly produce type_info addresses. Use dynamic_cast_node. 12413 * exception.cc (__throw_bad_cast): Return `void *'. 12414 (__throw_bad_typeid): Return `const type_info &'. 12415 124162000-01-24 Nathan Sidwell <sidwell@codesourcery.com> 12417 12418 * cp-tree.h (get_vtable_decl): Prototype new function. 12419 * class.c (get_vtable_decl): New function. Broken out from ... 12420 (build_vtable): ... here. Use it. 12421 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created 12422 by get_vtable_decl. 12423 124242000-01-24 Nathan Sidwell <sidwell@codesourcery.com> 12425 12426 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE, 12427 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE, 12428 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations. 12429 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE, 12430 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE, 12431 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations. 12432 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ... 12433 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here. 12434 (CPTI_TINFO_VAR_ID): New enumeration. 12435 (__tp_desc_type_node, __access_mode_type_node, 12436 __bltn_desc_type_node, __user_desc_type_node, 12437 __class_desc_type_node, __ptr_desc_type_node, 12438 __attr_desc_type_node, __func_desc_type_node, 12439 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines. 12440 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node, 12441 ref_desc_type_node, ary_desc_type_node, func_desc_type_node, 12442 enum_desc_type_node, class_desc_type_node, 12443 si_class_desc_type_node, vmi_class_desc_type_node, 12444 ptmd_desc_type_node, base_desc_type_node): New #defines. 12445 (tinfo_fn_id, tinfo_fn_type): Rename to ... 12446 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust. 12447 (tinfo_var_id): New enumeration. 12448 (DECL_TINFO_FN_P): Augment comment. 12449 * decl.c (cp_global_trees): Adjust documentation. 12450 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id, 12451 tinfo_decl_type and tinfo_var_id. 12452 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type. 12453 (build_typeid): Remove unused variable. 12454 (get_tinfo_var): Use tinfo_var_id. 12455 (tinfo_name): New static function. 12456 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type. 12457 (tinfo_from_decl): Likewise. 12458 (get_base_offset): New static function, broken out of 12459 expand_class_desc. 12460 (expand_si_desc): Use tinfo_name. 12461 (expand_class_desc): Likewise. Lose local static variable. 12462 Use base_desc_type_node. Use get_base_offset. 12463 (expand_ptr_desc): Use tinfo_name. 12464 (expand_attr_desc): Likewise. 12465 (expand_generic_desc): Likewise. 12466 12467 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence. 12468 * tinfo.h (__GXX_ABI_VERSION): Test value and existence. 12469 124702000-01-23 Mark Mitchell <mark@codesourcery.com> 12471 12472 * cp-tree.h (__eprintf): Remove declaration. 12473 * tree.c (__eprintf): Remove definition. 12474 124752000-01-23 Zack Weinberg <zack@rabi.columbia.edu> 12476 Mark Mitchell <mark@codesourcery.com> 12477 12478 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N, 12479 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings. 12480 124812000-01-23 Brad Lucier <lucier@math.purdue.edu> 12482 12483 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly. 12484 124852000-01-23 Mark Mitchell <mark@codesourcery.com> 12486 12487 * cp-tree.h (register_dtor_fn): New function. 12488 * decl.c (destroy_local_static): Rename to ... 12489 (register_dtor_fn): ... this. Give it external linkage. 12490 (expand_static_init): Use it. 12491 * decl2.c (do_static_initialization): Likewise, if using 12492 __cxa_atexit. 12493 (do_static_destruction): Check that __cxa_atexit is not in use. 12494 (finish_file): Don't call do_static_destruction if using 12495 __cxa_atexit. 12496 12497 * typeck.c (convert_arguments): Restore two-message error 12498 reporting. 12499 125002000-01-20 Nathan Sidwell <sidwell@codesourcery.com> 12501 12502 Remap dynamic cast hint values to be consistent across ABIs. 12503 * search.c (dynamic_cast_base_recurse): Remap generated value. 12504 (get_dynamic_cast_base_type): Adjust documentation. 12505 * tinfo.h (__user_type_info::dyncast): Likewise. 12506 (__user_type_info::find_public_subobj): Remap BOFF meaning. 12507 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning. 12508 (__class_type_info::do_dyncast): Likewise. 12509 (__class_type_info::do_find_public_subobj): Likewise. 12510 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter. 12511 125122000-01-19 Gabriel Dos Reis <gdr@codesourcery.com> 12513 12514 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn. 12515 12516 * typeck2.c (incomplete_type_error): Restore previous 12517 cp_error and cp_error_at call sequence. 12518 125192000-01-20 Brad Lucier <lucier@math.purdue.edu> 12520 12521 * class.c (dump_class_hierarchy): Make format agree with argument; 12522 cast pointer to unsigned long and print with %lx. 12523 125242000-01-19 Gabriel Dos Reis <gdr@codesourcery.com> 12525 12526 * decl2.c (lang_decode_option): Set default line-wrap length to 72. 12527 12528 * typeck.c (composite_pointer_type, common_type, 12529 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref, 12530 build_function_call_real, convert_arguments, 12531 build_binary_op_nodefault, pointer_int_sum, pointer_diff, 12532 build_unary_op, mark_addressable, build_compound_expr, 12533 build_static_cast, build_reinterpret_cast, build_const_cast, 12534 build_c_cast, build_modify_expr, get_delta_difference, 12535 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 12536 'ISO C++'. Fusion consecutive calls to diagnostic message routines 12537 into a single one. 12538 * typeck2.c (readonly_error, abstract_virtuals_error, 12539 process_init_constructor, check_for_new_type): Likewise. 12540 125412000-01-19 Mark Mitchell <mark@codesourcery.com> 12542 12543 * tree.c (bot_manip): Set DECL_CONTEXT for newly created 12544 VAR_DECLs. 12545 125462000-01-18 Nathan Sidwell <sidwell@codesourcery.com> 12547 12548 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype. 12549 (build_x_typeid): Likewise. 12550 (get_tinfo_fn): Likewise. 12551 (get_tinfo_fn_unused): Rename to ... 12552 (get_tinfo_decl): ... here. 12553 * rtti.c (build_headof): Replace logic error with assertion. 12554 (get_tinfo_fn_dynamic): Rename to ... 12555 (get_tinfo_decl_dynamic): ... here. Make static. Use 12556 complete_type_or_else. 12557 (build_x_typeid): Move into ... 12558 (build_typeid): ... here. Adjust call to 12559 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify 12560 throw_bad_typeid expression. 12561 (get_tinfo_fn_unused): Rename to ... 12562 (get_tinfo_decl): ... here. Adjust comment. 12563 (get_tinfo_fn): Delete. 12564 (tinfo_from_decl): New static function. 12565 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl. 12566 (get_typeid): Use complete_type_or_else. 12567 (build_dynamic_cast_1): Adjust calls to 12568 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression. 12569 * parse.y (primary): Adjust call to build_typeid. 12570 * except.c (build_eh_type_type_ref): Adjust call to 12571 get_tinfo_decl. Mark as used. 12572 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl. 12573 * decl2.c (build_expr_from_tree): Adjust call to build_typeid. 12574 * parse.c: Regenerated. 12575 125762000-01-17 Mark Mitchell <mark@codesourcery.com> 12577 12578 * class.c (fixed_type_or_null): Don't clear NONNULL. Document 12579 calling convention. 12580 (resolves_to_fixed_type_p): Document calling convention. 12581 * rtti.c (build_x_typeid): Initialize NONNULL. 12582 12583 * cp-tree.h (build_shared_int_cst): New function. 12584 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity. 12585 * class.c (modify_vtable_entry): Likewise. 12586 (add_virtual_function): Split out code to generated shared 12587 INTEGER_CSTs to build_share_int_cst. 12588 (modify_all_vtables): Handle all the overridden functions here. 12589 Add overridden functions from non-primary virtual bases to the 12590 primary vtable. 12591 (finish_struct_1): Adjust call to modify_all_vtables. Add 12592 overridden functions from non-primary bases to the vtable. 12593 * tree.c (build_shared_int_cst): New function. 12594 12595 * cp-tree.h (scratchalloc): Remove. 12596 (build_scratch_list): Likewise. 12597 * call.c (convert_class_to_reference): Replace build_scratch_list 12598 and build_expr_list with build_tree_list. 12599 (add_candidate): Replace scratchalloc with expralloc. Note memory 12600 leak. 12601 (build_user_type_conversion_1): Replace build_scratch_list 12602 and build_expr_list with build_tree_list. 12603 (build_new_op): Likewise. 12604 (build_op_delete_call): Likewise. 12605 (convert_like): Likewise. 12606 * cvt.c (ocp_convert): Likewise. 12607 * decl.c (start_decl): Likewise. 12608 (start_function): Likewise. 12609 (finish_destructor_body): Likewise. 12610 (maybe_build_cleanup_1): Likewise. 12611 * decl2.c (reparse_decl_as_expr): Likewise. 12612 * init.c (perform_member_init): Likewise. 12613 (expand_cleanup_for_base): Likewise. 12614 (build_builtin_delete_call): Likewise. 12615 (build_new_1): Likewise. 12616 (build_delete): Likewise. 12617 * method.c (do_build_assign_ref): Likewise. 12618 * parse.y (already_scoped_stmt): Likewise. 12619 (nontrivial_exprlist): Likewise. 12620 (net_initializer): Likewise. 12621 (initlist): Likewise. 12622 * parse.c: Regenerated. 12623 * rtti.c (build_x_typeid): Likewise. 12624 (build_dynamic_cast_1): Likewise. 12625 * typeck.c (build_x_compound_expr): Likewise. 12626 (build_static_cast): Likewise. 12627 (build_modify_expr): Likewise. 12628 12629 * cp-tree.h (DECL_VINDEX): Add documentation. 12630 * class.c (build_vtable_entry): Likewise. 12631 (start_vtable): Add comment. 12632 (add_virtual_function): Replace pending_hard_virtuals with 12633 overridden_virtuals and pending_virtuals with new_virtuals. 12634 Replace redundant assignments with assertions. 12635 (check_for_override): Add comment. 12636 (check_bases_and_members): Replace pending_hard_virtuals with 12637 overridden_virtuals and pending_virtuals with new_virtuals. 12638 (create_vtbl_ptr): Likewise. 12639 (layout_class_type): Likewise. 12640 (finish_struct_1): Likewise. Add comments. 12641 126422000-01-16 Mark Mitchell <mark@codesourcery.com> 12643 12644 * class.c (finish_struct_1): Replace redundant code with 12645 assertions. 12646 12647 * cp-tree.h (flag_new_abi): Move. 12648 (flag_use_cxa_atexit): Likewise. 12649 (flag_honor_std): Likewise. 12650 (flag_rtti): Likewise. 12651 (vbase_offsets_in_vtable_p): Define. 12652 (vptrs_present_everywhere_p): Likewise. 12653 (TYPE_CONTAINS_VPTR_P): Likewise. 12654 (dfs_walk_real): Declare. 12655 * class.c (build_vbase_pointer_fields): Check 12656 vbase_offsets_in_vtable_p. 12657 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in 12658 BINFO_VPTR_FIELD. 12659 (build_vbase_offset_vtbl_entries): Simplify. 12660 (build_vbase_offset_vtbl_entries): Adjust. 12661 (build_vbase_pointer): Add ability to look up vbase offsets in 12662 vtable. 12663 (start_vtable): New function. 12664 (add_virtual_function): Use it. 12665 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P. 12666 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p. 12667 (build_vtbl_initializer): Take the type of the complete object as 12668 input. Use it to correctly calculate vbase offsets. 12669 (dfs_finish_vtbls): Pass the complete type to 12670 build_vtbl_initializer. 12671 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P. 12672 (create_vtable_ptr): Create a vtable even if there are no 12673 new virtual functions, under the new ABI. 12674 (finish_struct_1): Likewise. 12675 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P. 12676 * decl.c (exapnd_static_init): Remove call to 12677 preserve_initializer. 12678 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in 12679 vtables. 12680 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order. 12681 (expand_virtual_init): Use vbase_offsets_in_vtable_p. 12682 (construct_virtual_bases): Don't initialize virtual base pointers 12683 under the new ABI. 12684 (build_aggr_init): Clean up comment. 12685 (expand_aggr_init_1): Likewise. 12686 * rtti.c (expand_class_desc): Store the virtual function table 12687 index where the vbase offset lives in the offset field. 12688 * search.c (dfs_walk_real): Make it global. 12689 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P. 12690 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD. 12691 12692 * tinfo.h (USItype): Make it signed under the new ABI. 12693 * tinfo.cc (convert_to_base): New function. Encapsulate base 12694 conversion logic here. 12695 (__class_type_info::do_upcast): Use it. 12696 (__class_type_info::do_dyncast): Likewise. 12697 (__class_type_info::do_find_public_subobj): Likewise. 12698 12699 * init.c (construct_virtual_bases): Don't look up the addresses of 12700 virtual bases at run-time. 12701 12702 * class.c (build_vbase_pointer): Relocate. 12703 (build_vbase_pointer_fields): Likewise. 12704 (dfs_build_vbase_offset_vtbl_entries): Likewise. 12705 (build_vbase_offset_vtbl_entries): Likewise. 12706 12707 * decl.c (init_decl_processing): Complain if -fnew-abi 12708 -fno-vtable-thunks is used. 12709 12710 * decl2.c (lang_decode_option): Don't couple flag_honor_std to 12711 flag_new_abi. 12712 127132000-01-15 Mark Mitchell <mark@codesourcery.com> 12714 12715 * cp-tree.h (num_extra_vtbl_entries): New function. 12716 (size_extra_vtbl_entries): Likewise. 12717 (dfs_vtable_path_unmark): Likewise. 12718 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise. 12719 (dfs_vtable_path_marked_real_bases_queue_p): Likewise. 12720 * class.c (num_extra_vtbl_entries): New function. 12721 (size_extra_vtbl_entries): Likewise. 12722 (dfs_build_vbase_offset_vtbl_entries): New function. 12723 (build_vbase_offset_vtbl_entries): Likewise. 12724 (build_vtbl_initializer): Use it. 12725 (finish_struct_1): Adjust vtable sizes (using 12726 num_extra_vtbl_entries). 12727 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a 12728 THUNK_DECL is non-NULL before expanding it. 12729 * init.c (expand_virtual_init): Adjust the vtable pointer by 12730 size_extra_vtbl_entries before storing it. 12731 * search.c (get_shared_vase_if_not_primary): Adjust prototype. 12732 Handle TREE_LIST parameters here, not in the dfs_* functions. 12733 (dfs_unmarked_real_bases_queue_p): Adjust. 12734 (dfs_marked_real_bases_queue_p): Likewise. 12735 (dfs_vtable_path_unmarked_real_bases_queue_p): New function. 12736 (dfs_vtable_path_marked_real_bases_queue_p): New function. 12737 (dfs_vtable_path_unmark): Likewise. 12738 127392000-01-14 Mark Mitchell <mark@codesourcery.com> 12740 12741 * optimize.c (copy_body_r): Clear the operand three of a 12742 TARGET_EXPR when copying it. 12743 127442000-01-14 Martin v. L�wis <loewis@informatik.hu-berlin.de> 12745 12746 * method.c (build_decl_overload_real): Check whether we are in :: 12747 before returning __builtin_new/delete. 12748 127492000-01-13 Mark Mitchell <mark@codesourcery.com> 12750 12751 * pt.c (tsubst_friend_function): Improve comment. 12752 (instantiate_decl): Avoid crashing when a "nested" function is 12753 instantiated from the top level. 12754 12755 * dump.c (dqeueue_and_dump): Dump 12756 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION. 12757 127582000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12759 12760 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'. 12761 127622000-01-13 Nathan Sidwell <sidwell@codesourcery.com> 12763 12764 * g++spec.c (lang_specific_driver): Add -fnew-abi if 12765 ENABLE_NEW_GXX_ABI defined. 12766 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o, 12767 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o, 12768 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch. 12769 127702000-01-12 Mark Mitchell <mark@codesourcery.com> 12771 12772 * decl.c (start_cleanup_fn): Call pushdecl. 12773 12774 * call.c (convert_class_to_reference): Fix typos. 12775 (build_conditional_expr): Handle errors gracefully. 12776 * class.c (push_nested_class): Likewise. 12777 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro. 12778 (DECL_THIS_EXTERN): Use it. 12779 (DECL_THIS_STATIC): Likewise. 12780 * cvt.c (convert_to_void): Handle errors gracefully. 12781 (build_expr_type_conversion): Likewise. 12782 * decl.c (maybe_push_decl): Likewise. 12783 (start_decl_1): Likewise. 12784 (require_complete_types_for_parms): Likewise. 12785 * parse.y (structsp): Likewise. 12786 (base_class): Likewise. 12787 * parse.c: Regenerated. 12788 * pt.c (finish_member_template_decl): Likewise. 12789 * typeck.c (decay_conversion): Likewise. 12790 12791 * cp-tree.h (dfs_skip_vbases): New function. 12792 (find_vbase_instance): Likewise. 12793 * class.c (determine_primary_base): Allow a nearly empty base to 12794 serve as a primary base class under the new ABI. 12795 (get_class_offset_1): Rename to ... 12796 (dfs_get_class_offset): ... this. Simplify. Don't issue error 12797 messages here. 12798 (get_class_offset): Use it. Issue error messages here. 12799 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to 12800 find the right copies of virtual bases. 12801 (fixup_vtable_deltas1): Rename to ... 12802 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual 12803 bases as primary bases. 12804 (fixup_vtable_deltas): Remove. 12805 (override_one_vtable): Handle virtual bases as primary bases. 12806 (merge_overrides): Likewise. 12807 (finish_struct_1): Likewise. 12808 (dump_class_hierarchy): Dump primary-ness of bases as well. 12809 * search.c (mark_primary_bases): Use a pre-order traversal to 12810 handle primary virtual bases. 12811 (dfs_skip_vbases): New fiunction. 12812 (expand_upcast_fixups): Adjust to handle primary virtual bases. 12813 (fixup_virtual_upcast_offsets): Likewise. 12814 (fixup_all_virtual_upcast_offsets): Likewise. 12815 (dfs_find_vbase_instances): New function. 12816 (find_vbase_instance): Likewise. 12817 128182000-01-11 Mumit Khan <khan@xraylith.wisc.edu> 12819 12820 * lex.c (DIR_SEPARATOR): Delete macro. 12821 128222000-01-12 Gabriel Dos Reis <gdr@codesourcery.com> 12823 12824 * decl2.c (lang_decode_option): Handle automatic line wrapping 12825 option. 12826 128272000-01-11 Mark Mitchell <mark@codesourcery.com> 12828 12829 * friend.c (do_friend): Don't resolve scopes when processing 12830 template declarations, even if the qualifying scope doesn't 12831 involve template parameters. 12832 128332000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com> 12834 12835 * class.c (dfs_modify_vtables_queue_p): Remove. 12836 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p 12837 and dfs_marked_real_bases_queue_p instead of 12838 dfs_modify_vtables_queue_p. 12839 12840 * class.c (build_vbase_path): Simplify. 12841 (dfs_propagate_binfo_offsets): New function. 12842 (propagate_binfo_offsets): Use it. 12843 (remove_base_field): Simplify. 12844 (dfs_set_offset_for_vbases): Remove. 12845 (dfs_set_offset_for_shared_vbases): New function. 12846 (dfs_set_offset_for_unshared_vbases): Likewise. 12847 (layout_virtual_bases): Use them. 12848 (layout_basetypes): Don't call propagate_binfo_offsets. 12849 * search.c (dfs_get_vbase_types): Clone completely fresh binfos 12850 for the vbases. 12851 12852 * class.c (build_base_field): New function, split out from ... 12853 (build_base_fields): ... here. Use it. Allocate primary bases 12854 first, under the new ABI. 12855 (get_vtable_entry): Remove. 12856 (remove_base_field): New function, split out from ... 12857 (remove_base_fields): ... here. Adjust since primary bases come 12858 first under the new ABI. 12859 12860 * cp-tree.h (expand_direct_vtbls_init): Remove declaration. 12861 (initialize_vtbl_ptrs): New function. 12862 (expand_indirect_vtbls_init): Change prototype. 12863 (convert_pointer_to_vbase): Declare. 12864 * init.c (expand_direct_vtbls_init): Remove. 12865 (dfs_initialize_vtbl_ptrs): New function. 12866 (initialize_vtbl_ptrs): Likewise. 12867 (emit_base_init): Use initialize_vtbl_ptrs. 12868 * search.c (convert_pointer_to_vbase): Make it global. 12869 (expand_indirect_vtbls_init): Remove vtable initialization code. 12870 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs. 12871 12872 * class.c (dfs_finish_vtbls): New function. 12873 (finish_vtbls): Use it. 12874 (dump_class_hierarchy): New function. 12875 12876 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition. 12877 (BINFO_VBASE_PRIMARY_P): New macro. 12878 (BINFO_VIRTUALS): Add to documentation. 12879 (SET_BINFO_PRIMARY_MARKED_P): Remove. 12880 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. 12881 (dfs_mark_primary_bases_queue_p): Likewise. 12882 (dfs_unmarked_real_bases_queue_p): New function. 12883 (dfs_marked_real_bases_queue_p): Likewise. 12884 * search.c (dfs_mark_primary_bases): Adjust. 12885 (mark_primary_bases): Likewise. 12886 (get_shared_vbase_if_not_primary): New function. 12887 (dfs_unmarked_real_bases_queue_p): Likewise. 12888 (dfs_marked_real_bases_queue_p): Likewise. 12889 (dfs_get_pure_virtuals): Simplify. 12890 (get_pure_virtuals): Likewise. 12891 128922000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12893 12894 * lex.c: Include tm_p.h. 12895 128962000-01-07 Nathan Sidwell <sidwell@codesourcery.com> 12897 12898 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro. 12899 129002000-01-06 Jason Merrill <jason@casey.cygnus.com> 12901 12902 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT. 12903 * pt.c (instantiate_decl): Defer comdat templates that might not be 12904 needed. 12905 12906 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT. 12907 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT. 12908 (finish_file): Likewise. 12909 12910 * decl2.c (import_export_class): Undo 12/14 change. 12911 12912 * error.c (dump_decl): operator new, not operatornew. 12913 12914 * class.c (field_decl_cmp): A nontype is "greater" than a type. 12915 * search.c (lookup_field_1): Look for the last field with the 12916 desired name. 12917 129182000-01-05 Nathan Sidwell <nathan@acm.org> 12919 12920 * decl2.c (lookup_arg_dependent): Deal with FNS not being a 12921 FUNCTION_DECL. 12922 129232000-01-05 Nathan Sidwell <nathan@acm.org> 12924 12925 * typeck.c (build_static_cast): Don't strip target qualifiers 12926 when casting from a class. 12927 129282000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12929 12930 * class.c (warn_hidden): Initialize variable `fndecl'. 12931 129322000-01-03 Ulrich Drepper <drepper@cygnus.com> 12933 12934 * decl.c (flag_isoc9x): New variable to be able to use code in 12935 c-common.c. For now always zero. 12936 129372000-01-03 Mark Mitchell <mark@codesourcery.com> 12938 12939 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation. 12940 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN 12941 or unshare_base_binfos for virtual bases here. 12942 * search.c (dfs_get_vbase_types): Do it here. 12943 (get_vbase_types): Adjust. 12944 129452000-01-02 Mark Mitchell <mark@codesourcery.com> 12946 12947 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition. 12948 (BINFO_PRIMARY_MARKED_P): Use flag 5. 12949 (SET_BINFO_PRIMARY_MARKED_P): Likewise. 12950 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. 12951 (unmark_primary_bases): Remove declaration. 12952 (unmarkedp): Declare. 12953 (dfs_vbase_unmark): Likewise. 12954 * class.c (determine_primary_base): Return immediately if there 12955 are no base classes. Call mark_primary_bases here. 12956 (modify_all_direct_vtables): Remove. 12957 (modify_all_indirect_vtables): Remove. 12958 (dfs_modify_vtables_queue_p): New function. 12959 (dfs_modify_vtables): New function. 12960 (modify_all_vtables): Use them. 12961 (build_base_fields): Build FIELD_DECLs for primary virtual base 12962 classes. 12963 (create_vtable_ptr): Don't call determine_primary_base here. 12964 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ... 12965 (dfs_set_offset_for_vbases): ... this. 12966 (layout_virtual_bases): Use it. 12967 (layout_class_type): Call determine_primary_base here. 12968 * search.c (unmarkedp): Make it global. 12969 (shared_marked_p): Simplify. 12970 (shared_unmarked_p): Likewise. 12971 (dfs_primary_bases_queue_p): Remove. 12972 (dfs_unmark_primary_bases): Likewise. 12973 (unmark_primary_bases): Likewise. 12974 (mark_primary_bases): Simplify. 12975 (get_pure_virtuals): Don't call mark_primary_bases here. 12976 (dfs_vbase_unmark): New function. 12977 (get_vbase_types): Simplify. 12978 12979 * class.c (struct base_info): Remove. 12980 (determine_primary_base): Take has_virtual_p rather than a 12981 base_info as input. Don't calculate max_has_virtual. 12982 (finish_struct_bits): Remove max_has_virtual argument. 12983 (create_vtable_ptr): Remove max_has_virtual_p argument. 12984 (layout_virtual_bases): Remove max argument. 12985 (layout_basetypes): Likewise. 12986 (layout_class_type): Remove max_has_virtual_p argument. 12987 (finish_struct_1): Remove max_has_virtual. 12988 12989 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function. 12990 (layout_basetypes): Remove. 12991 * class.c (propagate_binfo_offsets): Moved here from tree.c. 12992 Update to handle primary virtual bases. 12993 (remove_base_fields): New function, split out from 12994 layout_basetypes. 12995 (dfs_mark_primary_bases_and_set_vbase_offsets): New function. 12996 (layout_virtual_bases): New function, split out from 12997 layout_basetypes. Update to handle primary virtual bases. 12998 (layout_basetypes): Moved here from tree.c. Use 12999 remove_base_fields and layout_virtual_bases. 13000 * search.c (dfs_mark_primary_bases_queue_p): New function. 13001 (mark_primary_bases): Use it. 13002 * tree.c (CEIL): Remove. 13003 (propagate_binfo_offsets): Remove. 13004 (layout_basetypes): Remove. 13005 130062000-01-01 Mark Mitchell <mark@codesourcery.com> 13007 13008 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES. 13009 (BINFO_PRIMARY_MARKED_P): New macro. 13010 (SET_BINFO_PRIMARY_MARKED_P): Likewise. 13011 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. 13012 (mark_primary_bases): New function. 13013 (unmark_primary_bases): Likewise. 13014 * search.c (get_abstract_virtuals_1): Remove. 13015 (dfs_mark_primary_bases): New function. 13016 (mark_primary_bases): Likewise. 13017 (dfs_unmark_primary_bases): Likewise. 13018 (unmark_primary_bases): Likewise. 13019 (dfs_get_pure_virtuals): Likewise. 13020 130212000-01-01 Mark Mitchell <mark@codesourcery.com> 13022 13023 * cp-tree.h (skip_rtti_stuff): Adjust prototype. 13024 * class.c (skip_rtti_stuff): Reorganize parameters and return value. 13025 (modify_one_vtable): Adjust. 13026 (fixup_vtable_deltas1): Likewise. 13027 (override_one_vtable): Likewise. 13028 * search.c (get_abstract_virtuals_1): Likewise. 13029 (get_pure_virtuals): Likewise. 13030 (expand_upcast_fixups): Likewise. 13031 * tree.c (debug_binfo): Likewise. 13032 13033 * class.c (build_vtable): Don't return a value. Don't rebuild 13034 vtables for bases that have already been handled. 13035 (prepare_fresh_vtable): Don't rebuild vtables for bases that have 13036 already been handled. 13037 (modify_one_vtable): Adjust accordingly. 13038 (fixup_vtable_deltas1): Likewise. 13039 (finish_struct_1): Likewise. 13040 130412000-01-01 Martin v. L�wis <loewis@informatik.hu-berlin.de> 13042 13043 * call.c (build_new_method_call): Also check destructors. 13044