ChangeLog revision 119256
12003-08-04 Release Manager 2 3 * GCC 3.3.1 Released. 4 52003-08-04 Release Manager 6 7 * GCC 3.3.1 Released. 8 92003-08-04 Mark Mitchell <mark@codesourcery.com> 10 11 PR c++/11713 12 * search.c (setup_class_bindings): Handle conversion operators 13 specially. 14 152003-07-24 Alexandre Oliva <aoliva@redhat.com> 16 17 PR c++/10796 18 * decl.c (finish_enum): Make sure the underlying integer type has 19 the same precision as some full integer type. Reverts part 20 2003-06-27's patch that didn't play any role in fixing the PR. 21 222003-07-24 Mark Mitchell <mark@codesourcery.com> 23 24 * cp-tree.h (convert_to_base_statically): Declare. 25 * call.c (build_special_member_call): Convert INSTANCE to the base 26 type. 27 * class.c (convert_to_base_statically): New method. 28 * init.c (construct_virtual_base): Use it. 29 * method.c (do_build_assign_ref): Fix typo in comment. 30 312003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 32 33 PR c++/11513 34 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope. 35 362003-07-23 Mark Mitchell <mark@codesourcery.com> 37 38 PR c++/11645 39 * cp-tree.h (accessible_base_p): Declare. 40 * call.c (build_over_call): Use it. 41 * search.c (accessible_base_p): New function, split out from ... 42 (lookup_base): ... here. 43 442003-07-23 Nathan Sidwell <nathan@codesourcery.com> 45 46 PR c++/11282 47 * decl.c: (reshape_init): Always advance *INITP. 48 492003-07-19 Mark Mitchell <mark@codesourcery.com> 50 51 PR c++/11546 52 * pt.c (lookup_template_class): Treat TYPE_DECLs as TEMPLATE_DECLs 53 where appropriate. 54 552003-07-14 Mark Mitchell <mark@codesourcery.com> 56 57 PR c++/7053 58 * pt.c (unregister_specialization): Rename to ... 59 (reregister_specialization): ... this. 60 (tsubst_friend_function): Use it. 61 (regenerate_decl_from_template): Likewise. 62 632003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 64 65 PR c++/11154 66 * pt.c (more_specialized_class): Add full_args parameter. 67 (most_specialized_class): Adjust calls to more_specialized_class. 68 * cp-tree.h (more_specialized_class): Adjust declaration. 69 702003-07-13 Mark Mitchell <mark@codesourcery.com> 71 72 PR c++/11503 73 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro. 74 (SET_DECL_SELF_REFERENCE_P): Likewise. 75 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P. 76 * pt.c (tsubst_decl): Copy it. 77 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P. 78 792003-07-11 Danny Smith <dannysmith@users.sourceforge.net> 80 81 Backport from mainline. 82 83 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net> 84 85 PR c++/9738 86 * decl.c (duplicate_decls): Re-invoke make_decl_rtl 87 if the old decl had instantiated DECL_RTL. 88 (Based on Richard Henderson 2003-05-13 patch to c-decl.c). 89 902003-07-11 Mark Mitchell <mark@codesourcery.com> 91 92 PR c++/8164 93 * decl.c (duplicate_decls): Avoid mangling names unnecessarily. 94 952003-07-10 Mark Mitchell <mark@codesourcery.com> 96 97 PR c++/10558 98 * parse.y (class_template_ok_as_expr): New variable. 99 (template_arg_1): New non-terminal. 100 (primary): Issue errors about uses of class templates as 101 expressions. 102 1032003-07-09 Mark Mitchell <mark@codesourcery.com> 104 105 PR c++/10032 106 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are 107 still errors. 108 109 PR c++/10527 110 * error.c (decl_to_string): Do not print default argument 111 expressions. 112 1132003-07-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 114 115 PR c++/10849 116 * decl2.c (handle_class_head_apparent_template): New function. 117 * cp-tree.h (handle_class_head_apparent_template): Add declaration. 118 * parse.y (class_head_defn): Use it. 119 * search.c (type_access_control): Revert my 2003-05-25 change. 120 1212003-07-06 Mark Mitchell <mark@codesourcery.com> 122 123 PR c++/11236 124 * cvt.c (convert_to_void): Treat an overloaded function like 125 "((void) 0)" after issuing a diagnostic. 126 127 PR c++/11345 128 * search.c (lookup_base_r): Remove is_non_public and 129 within_current_scope parameters. Remove other dead code. 130 (lookup_base): Adjust call to lookup_base_r. 131 (adjust_result_of_qualified_name_lookup): Improve comment. 132 * semantics.c (finish_call_expr): Use maybe_dummy_object. 133 1342003-07-05 Mark Mitchell <mark@codesourcery.com> 135 136 PR c++/11431 137 * typeck.c (build_static_cast): Check for reference conversions 138 earlier. 139 1402003-07-01 Mark Mitchell <mark@codesourcery.com> 141 142 PR c++/6949 143 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local 144 classes. 145 1462003-07-01 Mark Mitchell <mark@codesourcery.com> 147 148 * call.c (resolve_scoped_fn_name): Return error_mark_node for 149 erroneous cases. 150 151 PR c++/11137 152 * decl2.c (generate_ctor_or_dtor_function): Tolerate a 153 non-existant ssdf_decls array. 154 (finish_file): Call generator_ctor_or_dtor_function when there are 155 static constructors or destructors and no other static 156 initializations. 157 158 PR c++/11149 159 * call.c (resolve_scoped_fn_name): Check that the qualifying scope 160 is a class type. 161 1622003-07-01 Mark Mitchell <mark@codesourcery.com> 163 164 PR c++/9559 165 * decl2.c (grokfield): Do not build NOP_EXPRs around the 166 error_mark_node. 167 1682003-06-30 Giovanni Bajo <giovannibajo@libero.it> 169 170 * mangle.c (write_expression): Exit gracefully when trying to 171 mangle a CALL_EXPR. 172 1732003-06-30 Giovanni Bajo <giovannibajo@libero.it> 174 175 PR c++/11106 176 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a 177 USING_DECL, instead of print_tree_identifier. 178 1792003-06-27 Mark Mitchell <mark@codesourcery.com> 180 181 PR c++/10468 182 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly. 183 184 PR c++/10796 185 * decl.c (finish_enum): Implement DR377. 186 187 * decl.c (cp_finish_decl): Don't make variables with reference 188 type readonly while they are being initialized. 189 1902003-06-26 Mark Mitchell <mark@codesourcery.com> 191 192 PR c++/11332 193 * typeck.c (build_static_cast): Avoid returning expressions with 194 reference type. 195 1962003-06-25 Mark Mitchell <mark@codesourcery.com> 197 198 PR c++/10990 199 * search.c (lookup_base_r): Rely on accessible_p, rather than 200 trying to emulate that logic here. 201 202 PR c++/10931 203 * call.c (convert_like): Pass issue_conversion_warnings. 204 (convert_like_with_context): Likewise. 205 (convert_like_real): Add issue_conversion_warnings parameter. 206 (perform_direct_initialization_if_possible): New function. 207 * cp-tree.h (perform_direct_initialization_if_possible): Declare it. 208 * typeck.c (check_for_casting_away_constness): New function. 209 (build_static_cast): Rewrite. 210 2112003-06-23 Mark Mitchell <mark@codesourcery.com> 212 213 PR c++/5754 214 * parse.y (structsp): Improve error handling of invalid nested 215 template classes. 216 2172003-06-23 Jakub Jelinek <jakub@redhat.com> 218 219 * mangle.c: Include ggc.h, gt-cp-mangle.h. 220 (mangle_conv_op_name_for_type): Use htab_create_ggc instead of 221 htab_create. 222 * config-lang.in (gtfiles): Add cp/mangle.c. 223 * Make-lang.in (gt-cp-mangle.h): Depend on s-gtype. 224 (cp/mangle.o): Depend on gt-cp-mangle.h. 225 2262003-06-23 Jakub Jelinek <jakub@redhat.com> 227 228 * mangle.c (hash_type): val is the TREE_LIST itself, not a pointer 229 to it. 230 2312003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net> 232 233 PR c++/10784 234 * call.c (joust): Warn about choosing conversion sequence only if 235 -Wconversion. 236 2372003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net> 238 239 PR c++/10864 240 * call.c (op_error): Tidy. 241 * error.c (dump_expr): Properly format 'T()' when T is an 242 aggregate type. 243 2442003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net> 245 246 PR c++/10915 247 * decl.c (grok_op_properties): Warn possible confusing conversion 248 only if -Wconversion. 249 2502003-06-20 Mark Mitchell <mark@codesourcery.com> 251 252 PR c++/10845 253 * pt.c (try_class_unification): Correct handling of member class 254 templates. 255 2562003-06-19 Mark Mitchell <mark@codesourcery.com> 257 258 PR c++/10939 259 * Make-lang.in (decl.o): Depend on input.h. 260 * decl.c (input.h): Include it. 261 (cp_finish_decl): Revert previous change: 262 2003-06-19 Mark Mitchell <mark@codesourcery.com> 263 * decl.c (cp_finish_decl): Remove support for RESULT_DECLs. 264 Don't check building_stmt_tree. 265 * pt.c (tsubst_decl): Do not try to substitute into non-dependent 266 functions. 267 268 PR c++/9649 269 * cp-tree.h (pushdecl_class_level): Change prototype. 270 (push_class_level_binding): Likewise. 271 * decl.c (add_binding): Reject duplicate static data members. 272 (pushdecl_class_level): Return a value indicating whether or not 273 the binding was valid. 274 (push_class_level_binding): Likewise. 275 * semantics.c (finish_member_declaration): Don't keep invalid 276 declarations. 277 2782003-06-19 Mark Mitchell <mark@codesourcery.com> 279 280 PR c++/11041 281 * call.c (initialize_reference): Do not use cp_finish_decl to emit 282 temporary variables. 283 * cp-tree.h (static_aggregates): Declare. 284 (pushdecl_top_level_and_finish): Likewise. 285 * decl.c (pushdecl_top_level_1): New function. 286 (pushdecl_top_level): Use it. 287 (pushdecl_top_level_and_finish): New function. 288 (initialize_local_var): Remove redundant code. 289 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check 290 building_stmt_tree. 291 * decl.h (static_aggregates): Remove. 292 * decl2.c (get_guard): Use pushdecl_top_level_and_finish. 293 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish. 294 (tinfo_base_init): Likewise. 295 2962003-06-19 Matt Austern <austern@apple.com> 297 298 PR c++/11228 299 * init.c (build_zero_init): Assert that number of array elements 300 is an integer constant. 301 (build_default_init) Don't use build_zero_init for arrays with 302 variable number of elements. 303 3042003-06-17 Mark Mitchell <mark@codesourcery.com> 305 306 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format 307 string again. 308 3092003-06-17 Mark Mitchell <mark@codesourcery.com> 310 311 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format 312 string. 313 3142003-06-17 Jason Merrill <jason@redhat.com> 315 316 PR c++/10929 317 * decl.c (grokfndecl): Don't mark a function inline for 318 -finline-functions if it isn't defined. 319 3202003-06-17 Mark Mitchell <mark@codesourcery.com> 321 322 PR c++/10712 323 * class.c (handle_using_decl): Robustify. 324 325 PR c++/11105 326 * cp-tree.h (DECL_CONV_FN_TYPE): New method. 327 * decl.c (lookup_name_real): Backport conversion operator code 328 from mainline. 329 * mangle.c (struct globals): Remove internal_mangling_p. 330 (write_unqualified_name): Use DECL_CONV_FN_TYPE. 331 (write_template_parm): Don't write out the level number. 332 (conv_type_names): New variable. 333 (hash_type): New function. 334 (compare_type): Likewise. 335 (mangle_conv_op_name_for_type): Don't try to mangle conversion 336 operator names. 337 * search.c (lookup_conversion_operator): New function. 338 (lookup_fnfields_1): Use it. 339 3402003-06-12 Mark Mitchell <mark@codesourcery.com> 341 342 PR c++/10635 343 * typeck.c (build_c_cast): Check that the destination type is 344 complete. 345 3462003-06-10 Jason Merrill <jason@redhat.com> 347 348 PR c++/10968 349 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT. 350 3512003-06-09 Zack Weinberg <zack@codesourcery.com> 352 353 PR 8861 354 * mangle.c (write_real_cst): New function. Implement 355 ABI-compliant mangling of floating-point literals when 356 -fabi-version>=2; provide backward compatibility with 3.3 when 357 -fabi-version=1 (with warning). Clarify commentary. 358 (write_template_arg_literal): Use write_real_cst. 359 3602003-06-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 361 362 PR c++/11039 363 * decl2.c (handle_class_head): Remove implicitness in typename 364 appeared as elaborated type specifier in declaration. 365 3662003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 367 368 PR c++/10940 369 * pt.c (check_explicit_specialization): Check for 'static' 370 earlier. 371 3722003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 373 374 PR c++/10956 375 * pt.c (instantiate_decl): Don't use full template arguments if 376 we are dealing with specializations. 377 3782003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net> 379 380 * decl.c (ENABLE_CHECKING_SCOPES): New macro. 381 (binding_depth): Unconditionally define. 382 (is_class_level): Likewise. 383 (indent): Likewise. Take an indenting parameter. 384 (push_binding_level): Remove conditional definittion. 385 (pop_binding_level): Likewise. 386 (suspend_binding_level): Likewise. 387 (resume_binding_level): Likewise. 388 (pushlevel): Likewise. 389 (pushlevel_class): Likewise. 390 (poplevel_class): Likewise. 391 (pop_everything): Likewise. 392 3932003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net> 394 395 * decl.c (global_scope_p): New macro. 396 (pop_binding_level): Use it. 397 (suspend_binding_level): Likewise. 398 (global_bindings_p): Likewise. 399 (print_other_binding_stack): Likewise. 400 (print_binding_stack): Likewise. 401 (maybe_push_to_top_level): Likewise. 402 (pushdecl_namespace_level): Likewise. 403 (start_decl): Likewise. 404 (cp_finish_decl): Likewise. 405 (start_function): Likewise. 406 (cxx_init_decl_processing): Don't refer to global_binding_level. 407 (global_binding_level): Remove. 408 4092003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 410 411 PR c++/10849 412 * search.c (type_access_control): Don't check access when 413 processing_specialization. 414 4152003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 416 417 PR c++/10682 418 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to 419 check for implicitly created typedef to an enum. 420 4212003-05-20 Gabriel Dos Reis <gdr@integrable-solutions.net> 422 423 * decl.c (free_binding_entry): Fix thinko. 424 4252003-05-19 Gabriel Dos Reis <gdr@integrable-solutions.net> 426 427 * cp-tree.h (struct binding_entry_s): New datatype. 428 (binding_table): Declare. 429 (binding_entry): Likewise. 430 (bt_foreach_proc): Likewise. 431 (binding_table_foreach): Likewise. 432 (binding_table_find): Likewise. 433 (cxx_remember_type_decls): Likewise. 434 (CLASSTYPE_TAGS): Remove. 435 (CLASSTYPE_NESTED_UDTS): New macro. 436 (struct lang_type_class): Remove tags field. Add nested_types. 437 * decl.c (ENTRY_INDEX): New macro. 438 (free_binding_entry): New free list. 439 (binding_entry_make): New function. 440 (binding_entry_free): Likewise. 441 (struct binding_table_s): New datatype. 442 (SCOPE_DEFAULT_HT_SIZE): New macro. 443 (CLASS_SCOPE_HT_SIZE): Likewise. 444 (NAMESPACE_ORDINARY_HT_SIZE): Likewise. 445 (NAMESPACE_STD_HT_SIZE): Likewise. 446 (GLOBAL_SCOPE_HT_SIZE): Likewise. 447 (binding_table_construct): New function. 448 (binding_table_free): Likewise. 449 (binding_table_new): Likewise. 450 (binding_table_expand): Likewise. 451 (binding_table_insert): Likewise. 452 (binding_table_find): Likewise. 453 (binding_table_find_anon_type): Likewise. 454 (binding_table_reverse_maybe_remap): Likewise. 455 (binding_table_remove_anonymous_types): Likewise. 456 (binding_table_foreach): Likewise. 457 (struct cp_binding_level): Remove tags field. Add type_decls. 458 (pop_binding_level): Free binding_entries if possible. 459 (kept_level_p): Tidy. 460 (poplevel): Remove unused variable tags. 461 (bt_print_entry): New function. 462 (print_binding_level): Use it. 463 (push_namespace): Construct binding table. 464 (maybe_process_template_type_declaration): Tidy. 465 (pushtag): Likewise. 466 (clear_anon_tags): Likewise. 467 (cxx_remember_type_decls): New function. 468 (lookup_tag): Tidy. 469 (lookup_tag_reverse): Likewise. 470 (cxx_init_decl_processing): Construct binding_table for the global 471 scope. 472 (store_parm_decls): Remove pointless code. 473 (gettags): Remove. 474 (storetags): Likewise. 475 * class.c (unreverse_member_declarations): Don't touch 476 CLASSTYPE_TAGS. 477 (pushclass): Remember CLASSTYPE_NESTED_UTDS. 478 * pt.c (instantiate_class_template): Remove reference to 479 CLASSTYPE_TAGS. Remeber CLASSTYPE_NESTED_UTDS. 480 (bt_instantiate_type_proc): New function. 481 (do_type_instantiation): Use it. 482 * search.c (lookup_field_r): Use binding_table_find. 483 * semantics.c (begin_class_definition): Remove reference to 484 CLASSTYPE_TAGS. Nullify CLASSTYPE_NESTED_UTDS. 485 4862003-05-15 Jason Merrill <jason@redhat.com> 487 488 PR c++/5388 489 * call.c (conditional_conversion): Don't consider implicit 490 conversions if T2 is a base of T1. 491 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean. 492 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise. 493 494 PR c++/10661 495 * pt.c (instantiate_class_template): Also instantiate our 496 enclosing class. 497 4982003-05-13 Release Manager 499 500 * GCC 3.3 Released. 501 5022003-05-02 Richard Henderson <rth@redhat.com> 503 504 PR c++/10570 505 * cfns.gperf: Comment out POSIX thread cancellation points, 506 plus abort and raise. 507 * cfns.h: Regenerate. 508 5092003-05-01 Mark Mitchell <mark@codesourcery.com> 510 511 * decl2.c (comdat_linkage): Don't externalize explicit 512 instantiations. 513 5142003-04-29 Mark Mitchell <mark@codesourcery.com> 515 516 PR c++/10551 517 * pt.c (mark_decl_instantiated): Defer all explicit instantiations 518 that have not yet been written out. 519 520 PR c++/10549 521 * class.c (layout_class_type): Mark overlong bitfields as having 522 the maximum size permitted by their type, after layout. 523 5242003-04-29 Mark Mitchell <mark@codesourcery.com> 525 526 PR c++/10527 527 * error.c (dump_expr): Correctly handling of NEW_EXPR.4 528 5292003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 530 531 * lang-options.h: Fix typo. 532 5332003-04-29 Mark Mitchell <mark@codesourcery.com> 534 535 PR c++/10515 536 * cp-tree.h (lookup_field_1): Declare it. 537 * search.c (lookup_field_1): Make it public. 538 * decl.c (reshape_init): Handle designated initializers. 539 5402003-04-29 Mark Mitchell <mark@codesourcery.com> 541 542 * decl.c (maybe_commonize_var): Further tweak support for systems 543 without weak symbols. 544 5452003-04-27 Mark Mitchell <mark@codesourcery.com> 546 547 * decl.c (maybe_commonize_var): Fix thinko in last patch. 548 549 PR c++/10506 550 * method.c (use_thunk): Decrement immediate_size_expand. 551 552 PR c++/10503 553 * cp-tree.h (DECL_VAR_MARKED_P): New macro. 554 (DECL_MAYBE_TEMPLATE): Remove. 555 * class.c (fixed_type_or_null): Avoid infinite recursion. 556 5572003-04-27 Mark Mitchell <mark@codesourcery.com> 558 559 * decl.c (maybe_commonize_var): Make the code match the comments. 560 * pt.c (instantiate_decl): Move call to import_export_decl. 561 5622003-04-25 Mark Mitchell <mark@codesourcery.com> 563 564 * decl2.c (finish_file): Don't call import_export_decl for 565 functions that are not defined. 566 (handle_class_head): Robustify. 567 * pt.c (instantiate_decl): Do not call cp_finish_decl for 568 variables that are not defined. 569 5702003-04-23 Mark Mitchell <mark@codesourcery.com> 571 572 PR c++/10471 573 * call.c (build_cxx_call): Robustify. 574 5752003-04-23 Mark Mitchell <mark@codesourcery.com> 576 577 PR c++/10451 578 * decl.c (grokdeclarator): Correct logic for "mutable" errors. 579 5802003-04-22 Mark Mitchell <mark@codesourcery.com> 581 582 PR c++/10446 583 * search.c (lookup_fnfields_1): Handle empty slots in the method 584 vector. 585 5862003-04-22 Mark Mitchell <mark@codesourcery.com> 587 588 PR c++/10428 589 * decl.c (check_elaborated_type_specifier): New function, split 590 out from ... 591 (xref_tag): ... here. Use the new function in more places. 592 5932003-04-21 Mark Mitchell <mark@codesourcery.com> 594 595 * call.c (build_over_call): Use build_cxx_call. 596 (build_cxx_call): New method, split out of build_over_call. 597 * cp-tree.h (language_function): Add can_throw. 598 (build_cxx_call): Declare it. 599 * decl.c (finish_function): If a function does not contain any 600 calls to functions that can throw an exception, indicate that 601 fact. 602 * decl2.c (mark_used): Do not defer the instantiation of 603 functions, if the current function does not throw. 604 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones. 605 * pt.c (instantiate_decl): Make sure import_export_decl is called 606 before emitting things. 607 * rtti.c (throw_bad_cast): Use build_cxx_call. 608 (build_dynamic_cast_1): Likewise. 609 * typeck.c (build_function_call): Likewise. 610 6112003-04-21 Nathan Sidwell <nathan@codesourcery.com> 612 613 PR c++/9881 614 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr 615 expressions. Reverts my 2002-08-08 patch. 616 6172003-04-20 Nathan Sidwell <nathan@codesourcery.com> 618 619 PR c++/10405 620 * search.c (lookup_field_1): Final scan goes backwards for 621 types, forwards for non-types. 622 6232003-04-15 Jason Merrill <jason@redhat.com> 624 625 * decl2.c (mark_used): Don't instantiate anything if 626 skip_evaluation. 627 6282003-04-15 Mark Mitchell <mark@codesourcery.com> 629 630 * init.c (build_new_1): Use nullexp instead of null_node to avoid 631 unwanted macro expansion. 632 6332003-04-14 Ziemowit Laski <zlaski@apple.com> 634 635 * tree.c (build_cplus_array_type_1): Do not call 636 uses_template_parms() on a NULL index_type. 637 6382003-04-14 Andreas Schwab <schwab@suse.de> 639 640 * init.c (build_new_1): Test use_cookie instead of cookie_size to 641 avoid code-gen bug on ia64. 642 6432003-04-13 Mark Mitchell <mark@codesourcery.com> 644 645 PR c++/10300 646 * init.c (build_new_1): Correct logic for checking whether the 647 return value from the allocation function was zero. 648 6492003-03-31 Mark Mitchell <mark@codesourcery.com> 650 651 PR c++/10278 652 * spew.c (yyerror): Avoid crashing at all costs. 653 6542003-03-31 Jason Merrill <jason@redhat.com> 655 656 PR java/10145 657 * class.c (check_field_decl): Don't set DECL_ALIGN. 658 6592003-03-30 Mark Mitchell <mark@codesourcery.com> 660 661 PR c++/7647 662 * search.c (lookup_field_1): Add want_type parameter. 663 (lookup_field_r): Adjust call to lookup_field_1. 664 6652003-03-28 Jason Merrill <jason@redhat.com> 666 667 PR c++/10245 668 * cvt.c (force_rvalue): New fn. 669 * call.c (build_conditional_expr): Use it. 670 * cp-tree.h: Declare it. 671 6722003-03-28 Nathan Sidwell <nathan@codesourcery.com> 673 674 PR c++/10047 675 * decl2.c (finish_file): Don't warn about explicitly instantiated 676 inline decls. 677 6782003-03-27 Nathan Sidwell <nathan@codesourcery.com> 679 680 PR c++/10158 681 * spew.c (snarf_method):Set DECL_INITIALIZED_IN_CLASS for 682 members. 683 * pt.c (instantiate_decl): Only reduce the template args for 684 friends that are not defined in class. 685 6862003-03-24 Nathan Sidwell <nathan@codesourcery.com> 687 688 PR c++/9898, PR c++/383, DR 322 689 * pt.c (maybe_adjust_types_for_deduction) [DEDUCE_CONV]: Look 690 through reference types on both PARM and ARG. 691 692 PR c++/10199 693 * call.c (build_method_call): Deal with LOOKUP_EXPR. 694 * semantics.c (finish_object_call_expr): Use build_method_call 695 when in a template decl. 696 6972003-03-23 Mark Mitchell <mark@codesourcery.com> 698 699 PR c++/7086 700 * semantics.c (genrtl_named_return_value): Adjust calls to 701 put_var_into_stack. 702 * typeck.c (cxx_mark_addressable): Likewise. 703 7042003-03-20 Mark Mitchell <mark@codesourcery.com> 705 706 PR c++/6412 707 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope 708 friends. 709 * cp/pt.c (instantiate_class_template): Fix formatting. 710 7112003-03-19 Jason Merrill <jason@redhat.com> 712 713 PR c++/8316, c++/9315, c++/10136 714 * call.c (joust): Improve wording. 715 7162003-03-18 Roger Sayle <roger@eyesopen.com> 717 718 PR c++/10031 719 * decl.c (duplicate_decls): Use the new type when prototyping 720 anticipated decls, even when the types match. This defines the 721 exception list for the built-in function. 722 7232003-03-17 Jason Merrill <jason@redhat.com> 724 725 PR c++/10091 726 * typeck.c (build_class_member_access_expr): Compare 727 TYPE_MAIN_VARIANTs. 728 729 * decl.c (finish_function): Don't skip a block. 730 731 PR c++/9993 732 * decl.c (finish_function): Only allow the NRVO to use variables 733 declared at function scope. 734 7352003-03-17 Nathan Sidwell <nathan@codesourcery.com> 736 737 PR c++/9629 738 * cp-tree.h (struct language_function): Add in_base_initializer. 739 (in_base_initializer): define it. 740 (expand_member_init): Remove INIT param. 741 * init.c (expand_member_init): Remove INIT param, return the member. 742 (emit_mem_initializers): Set in_base_initializer. 743 * class.c (build_base_path): Check in_base_initializer. 744 * parse.y (begin_member_init): New reduction. 745 (member_init): Use it. 746 * pt.c (tsubst_initializer_list): Set in_base_initializer. 747 7482003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 749 750 PR c++/6440 751 * pt.c (maybe_process_partial_specialization): Handle 752 member class template when enclosing class template is 753 explicit specialized. 754 (most_general_template): Stop looking when DECL is already 755 specialized. 756 7572003-03-13 Jason Merrill <jason@redhat.com> 758 759 PR c++/9420 760 * search.c (lookup_conversions): Call complete_type here. 761 * call.c (implicit_conversion): Not here. 762 7632003-03-13 Jason Merrill <jason@redhat.com> 764 765 PR c++/9336 766 * decl2.c (lookup_arg_dependent): Handle error_mark_node. 767 7682003-03-13 Mark Mitchell <mark@codesourcery.com> 769 770 * decl2.c (do_nonmember_using_decl): Correct handling of 771 simultaneous type/non-type bindings. 772 7732003-03-13 Mark Mitchell <mark@codesourcery.com> 774 775 * call.c (initialize_reference): Remove bogus assertion. 776 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09. 777 7782003-03-12 Andrew Lewycky <andrew@mxc.ca> 779 780 PR c++/7050 781 * expr.c (cxx_expand_expr): Return const0_rtx for throw 782 expressions. 783 7842003-03-11 Mark Mitchell <mark@codesourcery.com> 785 786 PR c++/9474 787 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls 788 to merge old and new declarations. 789 7902003-03-11 Mark Mitchell <mark@codesourcery.com> 791 792 PR c++/9924 793 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins. 794 7952003-03-11 Jason Merrill <jason@redhat.com> 796 797 PR c++/9820 798 * search.c (lookup_member): Fix handling of functions in a class 799 being defined. 800 8012003-03-11 Mark Mitchell <mark@codesourcery.com> 802 803 PR c++/8700 804 * call.c (print_z_candidates): Avoid printing duplicates. 805 8062003-03-11 Jason Merrill <jason@redhat.com> 807 808 PR c++/8660 809 * decl2.c (check_classfn): A member template only matches a 810 member template. 811 8122003-03-10 Devang Patel <dpatel@apple.com> 813 814 PR c++/9394 815 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWITCH_TAKES_ARG. 816 8172003-03-10 Jason Merrill <jason@redhat.com> 818 819 PR c++/9798 820 * decl.c (push_using_directive): Push before recursing. 821 822 PR c++/9868 823 * call.c (resolve_scoped_fn_name): Handle the case of a function 824 pointer member. 825 * init.c (build_offset_ref): Handle getting a FIELD_DECL for NAME. 826 827 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this' 828 argument in the pointer-to-member case. 829 8302003-03-09 Mark Mitchell <mark@codesourcery.com> 831 832 PR c++/9373 833 * cp-lang.c (cxx_get_alias_set): Use alias set zero for 834 pointers to member functions. 835 836 PR c++/8534 837 * decl.c (build_ptrmemfunc_type): Do not allow default arugments 838 in pointer-to-member-function types. 839 8402003-03-09 Mark Mitchell <mark@codesourcery.com> 841 842 PR c++/9912 843 * cp-tree.h (is_ancestor): New function. 844 * decl2.c (is_namespace_ancestor): Rename to ... 845 (is_ancestor): ... this. 846 (namespace_ancestor): Use it. 847 (set_decl_namespace): Likewise. 848 (handle_class_head): Check for invalid class definitions. 849 8502003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net> 851 852 Compile-time improvement: 2/n. 853 * cp-tree.h (struct cxx_binding): New datatype; 854 (struct lang_identifier): Use it. 855 (LOCAL_BINDING_P): Adjust definition. 856 (INHERITED_VALUE_BINDING_P): Likewise. 857 (BINDING_SCOPE): Likewise. 858 (BINDING_HAS_LEVEL_P): Likewise. 859 (BINDING_VALUE): Likewise. 860 (BINDING_TYPE): Likewise. 861 (IDENTIFIER_VALUE): Likewise. 862 (struct tree_binding): Remove. 863 (TS_CP_BINDING): Likewise. 864 ((union lang_tree_node): Remove field "binding". 865 (cxx_binding_clear): New macro. 866 (binding_for_name): Adjust return type. 867 (qualified_lookup_using_namespace): Adjust prototype. 868 (lookup_using_namespace): Adjust prototype. 869 (cxx_scope_find_binding_for_name): Declare. 870 * cp-tree.def: Remove CPLUS_BINDING definition. 871 * parse.y (parse_scoped_id): Don't type-abuse of 'id'. Allocate 872 temporary cxx_binding on stack. Simplify. 873 * decl.c (push_binding): Adjust local variable type. 874 (add_binding): Likewise. 875 (push_class_binding): Likewise. 876 (pop_binding): Likewise. 877 (poplevel): Likewise. 878 (poplevel_class): Likewise. 879 (free_bindings): Adjust type. 880 (find_binding): Adjust return type, add a third parameter. Remove 881 non-useful assertion now that we use static typing. 882 (cxx_scope_find_binding_for_name): New function. 883 (binding_for_name): Use it. Adjust local variable type. Simplify. 884 (namespace_binding): Simplify. 885 (set_namespace_binding): Likewise. 886 (set_identifier_type_value_with_scope): Adjust local variable type. 887 (lookup_tag): Don't type-abuse of local variable 'old'. 888 (lookup_namespace_name): Likewise. Allocate binding on stack. 889 (select_decl): Adjust prototype. 890 (unqualified_namespace_lookup): Allocate binding on stack. 891 Don't type-abuse of local variable 'val'. 892 (lookup_name_real): Likewise. 893 (maybe_inject_for_scope_var): Adjust local variable type. 894 (cp_tree_node_structure): Remove CPLUS_BINDING case label. 895 (namespace_binding): Adjust logic, simplify. 896 (BINDING_LEVEL): Adjust definition. 897 (push_class_level_binding): Adjust local variable type. 898 (struct cxx_saved_binding): Adjust field 'binding' type. 899 * decl2.c (ambiguous_decl): Adjust prototype. 900 (lookup_using_namespace): Adjust local variable type. 901 (qualified_lookup_using_namespace): Catch type error and correct 902 ensueing logic error. 903 (do_nonmember_using_decl): Adjust local variable type. Allocate 904 temporary cxx_binding on stack. 905 (do_toplevel_using_decl): Adjust local variable type. 906 * ptree.c (cxx_print_cxx_binding): New function. 907 (cxx_print_identifier): Use it. 908 (cxx_print_xnode): Delete CPLUS_BINDING case label. 909 9102003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 911 912 PR c++/9970 913 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual 914 functions. 915 9162003-03-07 Matt Austern <austern@apple.com> 917 918 * cp-tree.h (struct lang_type_class): add field for key method 919 (cp_global_trees): rename dynamic_classes to keyed_classes 920 (key_method): add definition 921 * class.c (finish_struct_1): compute class's key method, and add 922 the class to keyed_classes list if there is no key method. 923 * decl.c (finish_function): add class to keyed_classes list if we 924 see a definition of the class's key method. 925 * pt.c (instantiate_class_template): add template specialization 926 of a dynamic class to keyed_classes list. 927 * decl2.c (key_method): remove 928 (finish_file): iterate only through keyed_classes list when 929 deciding whether to emit vtables, remove class from its list after 930 we do the emission. 931 9322003-03-08 Mark Mitchell <mark@codesourcery.com> 933 934 PR c++/9809 935 * call.c (add_function_candidate): Skip builtin fuctions that have 936 not yet been declared. 937 9382003-03-07 Mark Mitchell <mark@codesourcery.com> 939 940 * call.c (reference_binding): Remove REF_IS_VAR parameter. 941 (implicit_conversion): Adjust call to reference_binding. 942 (make_temporary_var_for_ref_to_type): Add TYPE parameter. 943 (initialize_reference): Adjust handling for references bound to 944 rvalues. 945 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change 946 prototype. 947 (real_non_cast_lvalue_p): New method. 948 * cvt.c (build_up_reference): Adjust use of 949 make_temporary_var_for_ref_to_temp. 950 * tree.c (real_non_cast_lvalue_p): New method. 951 9522003-03-06 Mark Mitchell <mark@codesourcery.com> 953 954 * call.c (merge_conversion_sequences): New function. 955 (build_conv): Set ICS_USER_FLAG for USER_CONVs. 956 (convert_class_to_reference): Correct handling of second 957 standard conversion sequence in a user-defined conversion 958 sequence. 959 (build_user_type_conversion_1): Use merge_conversion_sequences. 960 * cp-tree.def: Add comments for CONV nodes. 961 9622003-03-06 Mark Mitchell <mark@codesourcery.com> 963 964 PR c++/9965 965 * call.c (reference_binding): Add ref_is_var parameter. 966 (implicit_conversion): Adjust call to reference_binding. 967 (initialize_reference): Likewise. 968 969 PR c++/9400 970 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL 971 PARM_DECLs. 972 9732003-03-06 Mark Mitchell <mark@codesourcery.com> 974 975 PR c++/9791 976 * class.c (get_basefndecls): Use lookup_fnfields_1. 977 9782003-03-02 Matt Austern <austern@apple.com> 979 980 * decl.c (cp_binding_level): Add static_decls varray member. 981 (add_decl_to_level): Add static/inline namespace scope 982 declarations to static_decls array. 983 (wrapup_global_for_namespace): Pass static_decls only, instead of 984 all decls, to wrapup_global_declarations/check_global_declarations. 985 (push_namespace): Initialize static_decls for ordinary namespaces. 986 (cxx_init_decl_processing): Initialize static_decls for global 987 namespace. 988 9892003-03-05 Mark Mitchell <mark@codesourcery.com> 990 991 * class.c (end_of_class): Correct thinko. 992 9932003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net> 994 995 * cp-tree.h (cxx_saved_binding): Declare. 996 (struct saved_scope): Adjust type of field 'old_binding'. 997 * decl.c (cxx_saved_binding_make): New macro. 998 (struct cxx_saved_binding): Define. 999 (store_bindings): Adjust prototype. Use cxx_saved_binding to save 1000 C++ bindings. 1001 (maybe_push_to_top_level): Adjust local variable type. 1002 (pop_from_top_level): Likewise. 1003 10042003-03-03 Jason Merrill <jason@redhat.com> 1005 1006 * decl.c (finish_enum): Do set the type in a template. Simplify. 1007 * pt.c (tsubst_enum, tsubst_copy): Revert last patch. 1008 10092003-03-03 Mark Mitchell <mark@codesourcery.com> 1010 1011 PR c++/9878 1012 * call.c (convert_class_to_reference): Correct conversion 1013 sequences. 1014 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter. 1015 (implicit_conversion): Adjust call to reference_binding. 1016 (add_candidate): Change type of candidates parameter. 1017 (add_function_candidate): Likewise. 1018 (add_conv_candidate): Likewise. 1019 (build_builtin_candidate): Likewise. 1020 (add_builtin_candidate): Likewise. 1021 (add_builtin_candidates): Likewise. 1022 (add_template_candidate_real): Likewise. 1023 (add_template_candidate): Likewise. 1024 (add_template_conv_candidate): Likewise. 1025 (build_user_type_conversion_1): Adjust accordingly. 1026 (build_object_call): Likewise. 1027 (build_conditional_expr): Likewise. 1028 (add_candidates): Likewise. 1029 (build_new_op): Likewise. 1030 (convert_like_real): Use USER_CONV_CAND. Use build_nop. 1031 (build_new_method_call): Adjust calls to add_function_candidate. 1032 (make_temporary_var_for_ref_to_temp): New function. 1033 (initialize_reference): Add decl parameter. 1034 * class.c (build_rtti_vtbl_entries): Use build_address and 1035 build_nop. 1036 * cp-tree.h (initialize_reference): Change prototype. 1037 (make_temporary_var_for_ref_to_temp): New function. 1038 (build_type_conversion): Change prototype. 1039 (build_address): New function. 1040 (build_nop): Likewise. 1041 * cvt.c (cp_convert_to_pointer): Adjust call to 1042 build_type_conversion. Avoid indicating redundant NOP_EXPRs. 1043 Use build_nop. 1044 (convert_to_pointer_force): Use build_nop. 1045 (build_up_reference): Use make_temporary_var_for_ref_to_temp. 1046 (convert_to_reference): Adjust call to build_type_conversion. 1047 (ocp_convert): Likewise. 1048 (build_type_conversion): Remove for_sure parameter. 1049 * decl.c (grok_reference_init): Use initialize_reference. 1050 * typeck.c (build_address): New function. 1051 (build_nop): Likewise. 1052 (build_unary_op): Use them. 1053 (build_ptrmemfunc): Tidy slightly. 1054 (convert_for_initialization): Adjust call to 1055 initialize_reference. 1056 * typeck2.c (store_init_value): Remove #if 0'd code. 1057 10582003-03-02 Ashif Harji <asharji@uwaterloo.ca> 1059 1060 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to 1061 invoke an external cpp during compilation. 1062 10632003-02-28 Mark Mitchell <mark@codesourcery.com> 1064 1065 PR c++/9892 1066 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when 1067 instantiating it. 1068 10692003-02-28 Mark Mitchell <mark@codesourcery.com> 1070 1071 PR c++/9879 1072 * cp-tree.h (build_zero_init): Add parameter. 1073 * decl.c (cp_finish_decl): Adjust call. 1074 * init.c (build_zero_init): Add nelts parameter. Adjust recursive 1075 calls. 1076 (build_default_init): Add nelts parameter. Adjust calls to 1077 build_zero_init. 1078 (build_new_1): Adjust call to build_default_init. 1079 * typeck2.c (process_init_constructor): Adjust call to build_zero_init. 1080 10812003-02-27 Devang Patel <dpatel@apple.com> 1082 1083 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if required. 1084 Postpone enum setting for template decls. 1085 (build_enumerator): Delay copying value node until finish_enum (). Remove 1086 #if 0'ed code. 1087 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node. 1088 (tsubst_copy): Add check for enum type. 1089 1090 10912003-02-25 Mark Mitchell <mark@codesourcery.com> 1092 1093 PR c++/9829 1094 * decl.c (grokdeclarator): Handle SCOPE_REFs whose second argument 1095 is a NAMESPACE_DECL. 1096 10972003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net> 1098 1099 * decl.c (add_binding): Time TV_NAME_LOOKUP. 1100 (push_class_binding): Likewise. 1101 (set_namespace_binding): Likewise. 1102 11032003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1104 1105 PR c++/9602 1106 * typeck2.c (abstract_virtuals_error): Don't check when we 1107 are processing a template. 1108 11092003-02-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1110 1111 PR c++/7982 1112 * decl.c (warn_about_implicit_typename_lookup): Handle TYPEOF_TYPE. 1113 11142003-02-21 Mark Mitchell <mark@codesourcery.com> 1115 1116 PR c++/9749 1117 * decl.c (grokdeclarator): Do not allow parameters with variably 1118 modified types. 1119 1120 PR c++/9727 1121 * decl2.c (push_scope): Don't pushclass for non-class types. 1122 (pop_scope): Don't popclass either. 1123 1124 PR c++/8906 1125 * decl.c (lookup_name_real): Use IMPLICIT_TYPENAME_P. 1126 * decl2.c (handle_class_head): Check it. 1127 1128 PR c++/8724 1129 * call.c (build_method_call): Make sure that the type destroyed in 1130 an explicit destructor call is complete. 1131 11322003-02-20 Mark Mitchell <mark@codesourcery.com> 1133 1134 PR c++/9729 1135 * mangle.c (mangle_conv_op_name_for_type): Issue an error message 1136 when the G++ 3.2 ABI prevents correct compilation. 1137 11382003-02-18 Mark Mitchell <mark@codesourcery.com> 1139 1140 PR c++/9704 1141 * class.c (layout_class_type): In the 3.2 ABI, take into account 1142 trailing bit fields when computing CLASSTYPE_SIZE_UNIT. 1143 11442003-02-18 Matt Austern <austern@apple.com> 1145 1146 * cp/cp-lang.c: Change lang hooks so that final_write_globals does 1147 nothing for C++. 1148 * cp/decl.c (wrapup_globals_for_namespace): Remove special 1149 handling of global namespace. 1150 11512003-02-18 Jason Merrill <jason@redhat.com> 1152 1153 PR c++/9623 1154 * decl.c (reshape_init): Don't mess with initializer labels. 1155 11562003-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1157 1158 PR c++/9459 1159 * error.c (dump_type_prefix): Handle TYPEOF_TYPE. 1160 (dump_type_suffix): Likewise. 1161 11622003-02-17 Michael Elizabeth Chastain <mec@shout.net> 1163 1164 PR debug/9717 1165 * class.c (build_base_field): Mark fields for base classes with 1166 DECL_IGNORED_P. 1167 11682003-02-13 Andrew Pinski <pinskia@physics.uc.edu> 1169 1170 * decl.c: (define_label): Fix warning for return 0 instead of NULL. 1171 11722003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net> 1173 1174 * Make-lang.in (cp/decl2.o): Add dependency on timevar.h 1175 * decl2.c: Include "timevar.h". 1176 (namespace_ancestor): Time name lookup. 1177 (add_using_namespace): Likewise. 1178 (lookup_using_namespace): Likewise. 1179 (qualified_lookup_using_namespace): Likewise. 1180 (decl_namespace): Likewise. 1181 (lookup_arg_dependent): Likewise. 1182 * lex.c (do_identifier): Likewise. 1183 (do_scoped_id): Likewise. 1184 * pt.c (lookup_template_class): Likewise. 1185 11862003-02-12 Gabriel Dos Reis <gdr@integrable-solutions.net> 1187 1188 * decl.c (define_label): Don't forget to pop TV_NAME_LOOKUP. 1189 11902003-02-11 Gabriel Dos Reis <gdr@integrable-solutions.net> 1191 1192 * decl.c: Include "timevar.h". 1193 (poplevel): Time name lookup. 1194 (find_binding): Likewise. 1195 (push_namespace): Likewise. 1196 (pop_nested_namespace): Likewise. 1197 (store_bindings): Likewise. 1198 (maybe_push_to_top_level): Likewise. 1199 (pop_from_top_level): Likewise. 1200 (push_local_name): Likewise. 1201 (pushtag): Likewise. 1202 (pushdecl): Likewise. 1203 (pushdecl_with_scope): Likewise. 1204 (pushdecl_namespace_level): Likewise. 1205 (pushdecl_top_level): Likewise. 1206 (pushdecl_class_level): Likewise. 1207 (push_class_level_binding): Likewise. 1208 (push_using_decl): Likewise. 1209 (push_using_directive): Likewise. 1210 (push_overloaded_decl): Likewise. 1211 (lookup_label): Likewise. 1212 (define_label): Likewise. 1213 (lookup_tag): Likewise. 1214 (lookup_tag_reverse): Likewise. 1215 (lookup_namespace_name): Likewise. 1216 (select_decl): Likewise. 1217 (unqualified_namespace_lookup): Likewise. 1218 (lookup_name_real): Likewise. 1219 (lookup_name_current_level): Likewise. 1220 (lookup_type_current_level): Likewise. 1221 (maybe_inject_for_scope_var): Likewise. 1222 (xref_tag): Likewise. 1223 1224 * Make-lang.in (cp/decl.o): Add dependency on timevar.h 1225 12262003-02-03 Mark Mitchell <mark@codesourcery.com> 1227 1228 PR c++/7129 1229 * operators.def: Add <?= and >?=. 1230 12312003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1232 1233 PR c++/8849 1234 * error.c (dump_expr): Handle BASELINK. 1235 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL. 1236 12372003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1238 1239 PR c++/9453 1240 * friend.c (is_friend): Always accept when SUPPLICANT is still 1241 a TEMPLATE_DECL. 1242 * pt.c (push_access_scope_real): Call push_to_top_level for 1243 function in namespace scope. 1244 (push_access_scope): Remove ARGS argument, all caller adjusted. 1245 (pop_access_scope): Call pop_from_top_level for function in 1246 namespace scope. 1247 (regenerate_decl_from_template): Use push_access_scope_real. 1248 12492003-01-29 Nathan Sidwell <nathan@codesourcery.com> 1250 1251 PR c++/9437 1252 * pt.c (unify): Don't unify '*T' with 'U C::*'. 1253 12542003-01-27 Jeffrey D. Oldham <oldham@codesourcery.com> 1255 1256 PR c++/47 1257 * cp-tree.h (lookup_nested_field): Add declaration. 1258 * decl.c (lookup_name_real): Call lookup_nested_field. 1259 * search.c (lookup_nested_field): Add function. 1260 12612003-01-26 Christian Cornelssen <ccorn@cs.tu-berlin.de> 1262 1263 * Make-lang.in (c++.install-common, c++.install-man) 1264 (c++.uninstall): Prepend $(DESTDIR) to destination paths in 1265 all (un)installation commands. 1266 (c++.install-common): Rewrite $(LN) commands to support 1267 DESTDIR with "ln" as well as with "ln -s". 1268 12692003-01-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1270 1271 * decl2.c (check_classfn): Fix uninitialized warning. 1272 12732003-01-22 Mark Mitchell <mark@codesourcery.com> 1274 1275 PR c++/9328 1276 * error.c (dump_decl): For an OVERLOAD, just print the name of the 1277 function; it doesn't make sense to try to print its type. 1278 * semantics.c (finish_typeof): Issue errors about invalid uses. 1279 12802003-01-22 Josef Zlomek <zlomekj@suse.cz> 1281 1282 PR/9386, PR/8801 1283 2002-12-27 Mark Mitchell <mark@codesourcery.com> 1284 * typeck.c (build_class_member_access_expr): Fix anonymous union 1285 handling. 1286 12872003-01-17 Jason Merrill <jason@redhat.com> 1288 1289 PR c++/9167, c++/9358 1290 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE. 1291 12922003-01-17 Jason Merrill <jason@redhat.com> 1293 1294 PR c++/9342 1295 * call.c (build_conditional_expr): Always do lvalue-rvalue 1296 conversion. 1297 12982003-01-16 Jason Merrill <jason@redhat.com> 1299 1300 PR c++/8564 1301 * init.c (build_vec_init): Re-add maxindex parm. 1302 (perform_member_init, build_aggr_init): Pass it. 1303 (build_new_1): Pass it. Use an incomplete array type for full_type. 1304 * typeck.c (build_modify_expr): Pass it. 1305 * cp-tree.h: Adjust. 1306 13072003-01-13 Jason Merrill <jason@redhat.com> 1308 1309 PR c++/8748 1310 * class.c (build_base_path): Take the address before calling save_expr. 1311 1312 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if 1313 all the ambiguous conversions are bad. 1314 1315 * class.c (maybe_warn_about_overly_private_class): Don't stop 1316 searching when we find a nonprivate method. 1317 13182003-01-09 Jakub Jelinek <jakub@redhat.com> 1319 1320 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs. 1321 13222003-01-09 Jakub Jelinek <jakub@redhat.com> 1323 1324 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables. 1325 13262003-01-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1327 1328 PR c++/9030 1329 * decl.c (make_typename_type): Check access only when tf_error. 1330 (make_unbound_class_template): Likewise. 1331 * pt.c (saved_access_scope): New variable. 1332 (push_access_scope_real): New function. 1333 (push_access_scope): Likewise. 1334 (pop_access_scope): Likewise. 1335 (tsubst_default_argument): Use them. 1336 (instantiate_template): Likewise. 1337 (regenerate_decl_from_template): Likewise. 1338 (instantiate_decl): Likewise. 1339 (get_mostly_instantiated_function_type): Likewise. 1340 13412003-01-06 Mark Mitchell <mark@codesourcery.com> 1342 1343 PR c++/9165 1344 * decl2.c (build_cleanup): Mark the object as used. 1345 13462003-01-03 Nathan Sidwell <nathan@codesourcery.com> 1347 1348 PR c++/45, c++/3784 1349 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be 1350 the same too. 1351 13522002-12-30 Nathan Sidwell <nathan@codesourcery.com> 1353 1354 PR c++/9054 1355 * class.c (layout_class_type): Set DECL_CONTEXT of type for base. 1356 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types. 1357 13582002-12-26 Nathan Sidwell <nathan@codesourcery.com> 1359 1360 PR c++/4803 1361 * decl2.c (mark_used): Defer inline functions. 1362 (finish_file): Merge deferred_fns loops. Check all used 1363 inline functions have a definition. 1364 * method.c (make_thunk): Thunks are not inline. 1365 1366 PR c++/5116, c++/764 1367 * call.c (build_new_op): Make sure template class operands are 1368 instantiated. 1369 13702002-12-24 Nathan Sidwell <nathan@codesourcery.com> 1371 1372 PR C++/7964 1373 * cp-tree.h (resolve_scoped_fn_name): Prototype. 1374 * call.c (resolve_scoped_fn_name): New function. Deal with 1375 more template expansion. Broken out of ... 1376 * parse.y (parse_finish_call_expr): ... here. Call it. 1377 * decl2.c (build_expr_from_tree, CALL_EXPR): Use 1378 resolve_scoped_fn_name and build_call_from_tree. 1379 1380 PR c++/9053 1381 * decl.c (duplicate_decls): Templates may be disambiguated by 1382 return type. 1383 1384 PR c++/8702 1385 * decl2.c (check_classfn): Use lookup_fnfield_1. List all 1386 conversion operators on failure. 1387 13882002-12-22 Nathan Sidwell <nathan@codesourcery.com> 1389 1390 PR c++/8572 1391 * cp-tree.h (grokoptypename): Add SCOPE parameter. 1392 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type 1393 if in a template scope. 1394 * parse.y (unoperator): Return the scope. 1395 (operator_name): Adjust grokoptypename call. 1396 13972002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1398 1399 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t. 1400 * decl.c (make_unbound_class_template): Adjust. Check for tf_error. 1401 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error. 1402 14032002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1404 1405 PR c++/8099 1406 * friend.c (make_friend_class): Allow partial specialization 1407 when declaration is not a template friend. 1408 14092002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1410 1411 PR c++/3663 1412 * pt.c (lookup_template_class): Copy TREE_PRIVATE and 1413 TREE_PROTECTED to created decl nodes. 1414 14152002-12-18 Mark Mitchell <mark@codesourcery.com> 1416 1417 * class.c (build_base_field): Do not set DECL_PACKED on the 1418 FIELD_DECL. 1419 14202002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1421 1422 * parse.y (bad_parm): Add missing argument to error function call. 1423 14242002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1425 1426 PR c++/8442 1427 * decl2.c (handle_class_head): Verify if the looked up name is a 1428 type or template. 1429 * pt.c (convert_template_argument): Fix type or template template 1430 parameter decision logic. 1431 14322002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net> 1433 1434 PR C++/8031 1435 * cvt.c (convert_to_pointer_force): Don't try comparing against 1436 erronous type. 1437 14382002-12-13 Geoffrey Keating <geoffk@apple.com> 1439 1440 * cp-tree.h: Have the multiple-include guards around 1441 the entire file. 1442 14432002-12-10 Mark Mitchell <mark@codesourcery.com> 1444 1445 PR c++/8372 1446 * pt.c (tsubst_copy): Handle destructor names more correctly. 1447 14482002-12-10 Matt Austern <austern@apple.com> 1449 1450 * cp-tree.h: get rid of needs_virtual_reinit bit. 1451 14522002-12-09 Mark Mitchell <mark@codesourcery.com> 1453 1454 * NEWS: Document removal of in-class initialization extension for 1455 static data members of non-arithmetic, non-enumeration type. 1456 * decl.c (check_static_variable_definition): Do not allow that 1457 extension. 1458 * decl2.c (grokfield): Do not call digest_init when processing 1459 templates. 1460 14612002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1462 1463 * error.c (dump_expr): Fix format specifier warning. 1464 14652002-12-04 Geoffrey Keating <geoffk@apple.com> 1466 1467 * class.c (finish_struct_1): Correct comment. 1468 * cp-tree.c (DECL_SORTED_FIELDS): Likewise. 1469 14702002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net> 1471 1472 PR C++/8799 1473 * error.c (dump_expr): Don't ever try to dump a non-existent 1474 expression. 1475 14762002-12-03 Jason Merrill <jason@redhat.com> 1477 1478 PR c++/8674 1479 * call.c (build_over_call): Check specifically for TARGET_EXPR 1480 when eliding. 1481 1482 PR c++/8461, c++/8625 1483 * call.c (convert_for_arg_passing): Don't mess with error_mark_node. 1484 (cp_convert_parm_for_inlining): Remove. 1485 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): 1486 Remove. 1487 * cp-tree.h (ADDR_IS_INVISIREF): Remove. 1488 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code. 1489 1490 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on 1491 an ambiguous conversion. 1492 14932002-12-03 Mark Mitchell <mark@codesourcery.com> 1494 1495 PR c++/8688 1496 * decl.c (reshape_init): Handle erroneous initializers. 1497 14982002-12-02 Mark Mitchell <mark@codesourcery.com> 1499 1500 PR c++/8720 1501 * spew.c (remove_last_token): Make sure that last_chunk is set 1502 correctly. 1503 1504 PR c++/8615 1505 * error.c (dump_expr): Handle character constants with 1506 TREE_OVERFLOW set. 1507 15082002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1509 1510 DR 180 1511 * decl.c (grokdeclarator): Require class-key for all friend class. 1512 Output the correct type and context in the error message. 1513 15142002-12-01 Mark Mitchell <mark@codesourcery.com> 1515 1516 PR c++/5919 1517 * pt.c (unify): Use variably_modified_type_p to test validity of 1518 template argument types. 1519 1520 PR c++/8727 1521 * cp-tree.h (lang_type_class): Add typeinfo_var. 1522 (CLASSTYPE_TYPEINFO_VAR): New macro. 1523 * rtti.c (get_tinfo_decl): Use it. 1524 1525 PR c++/8663 1526 * init.c (expand_member_init): Always get the main variant of a 1527 base class. 1528 15292002-12-01 Mark Mitchell <mark@codesourcery.com> 1530 1531 PR c++/8332 1532 PR c++/8493 1533 * decl.c (cxx_init_decl_processing): Use size_type_node, not 1534 c_size_type_node. 1535 * decl2.c (coerce_new_type): Likewise. 1536 * except.c (do_allocate_exception): Likewise. 1537 15382002-11-30 Mark Mitchell <mark@codesourcery.com> 1539 1540 PR c++/8227 1541 * decl.c (layout_var_decl): Deal gracefully with erroneous types. 1542 (check_initializer): Validate the type of the initialized 1543 variable, even if the initializer is absent. 1544 * typeck.c (cp_type_quals): Deal gracefully with erroneous types. 1545 1546 PR c++/8214 1547 * typeck.c (convert_for_assignment): Do not use 1548 decl_constant_value on the operand. 1549 1550 PR c++/8511 1551 * pt.c (instantiate_decl): Handle template friends defined outside 1552 of the class correctly. 1553 15542002-11-29 Joe Buck <jbuck@synopsys.com> 1555 1556 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for 1557 anonymous structs. 1558 15592002-11-29 Mark Mitchell <mark@codesourcery.com> 1560 1561 * class.c (walk_subobject_offsets): Recur on binfos as well as on 1562 types. 1563 (layout_nonempty_base_or_field): Pass it a binfo when processing a 1564 base class. 1565 (layout_empty_base): Likewise. 1566 (build_base_field): Likewise. 1567 15682002-11-27 Mark Mitchell <mark@codesourcery.com> 1569 1570 * class.c (build_base_field): Make sure we get the canonical base 1571 when descending through primary bases. 1572 15732002-11-26 Geoffrey Keating <geoffk@apple.com> 1574 1575 * decl.c (check_initializer): Don't error on initialisation of 1576 a scalar with a brace-enclosed expression. 1577 15782002-11-26 Nathan Sidwell <nathan@codesourcery.com> 1579 1580 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses. 1581 (template_parms_equal): Remove prototype. 1582 * typeck.c (buuld_indirect_ref): Reformat. 1583 15842002-11-25 Mark Mitchell <mark@codesourcery.com> 1585 1586 * tree.c (cp_build_qualified_type_real): Correct handling of 1587 array types. 1588 * class.c (walk_subobject_offsets): Fix thinko. 1589 (build_base_field): Record offsets of empty bases in primary 1590 virtual bases. 1591 (layout_class_type): Record offsets of empty bases in fields. 1592 1593 * search.c (is_subobject_of_p_1): Fix thinko. 1594 (lookup_field_queue_p): Likewise. 1595 15962002-11-24 Mark Mitchell <mark@codesourcery.com> 1597 1598 * class.c (layout_class_type): Reuse tail padding when laying out 1599 virtual bases. 1600 16012002-11-22 Mark Mitchell <mark@codesourcery.com> 1602 1603 * rtti.c (qualifier_flags): Fix thinko. 1604 16052002-11-21 Glen Nakamura <glen@imodulo.com> 1606 1607 PR c++/8342 1608 * typeck.c (get_member_function_from_ptrfunc): Make sure that a 1609 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one 1610 of the branches of a COND_EXPR. 1611 16122002-11-19 Mark Mitchell <mark@codesourcery.com> 1613 1614 * pt.c (for_each_template_parm): Free allocated memory. 1615 * search.c (is_subobject_of_p_1): New function. 1616 (is_subobject_of_p): Avoid walking virtual bases multiple times. 1617 16182002-11-19 Jason Thorpe <thorpej@wasabisystems.com> 1619 1620 * g++spec.c (lang_specific_spec_functions): New. 1621 16222002-11-15 Kazu Hirata <kazu@cs.umass.edu> 1623 1624 * ChangeLog: Follow spelling conventions. 1625 * class.c: Likewise. 1626 * decl2.c: Likewise. 1627 16282002-11-14 Zack Weinberg <zack@codesourcery.com> 1629 1630 * search.c (dfs_push_decls): Do not try to reorder elements 1631 3..n of method_vec if method_vec has only two elements. 1632 Reverse order of two tests to avoid accessing unallocated 1633 memory. 1634 16352002-11-14 Mark Mitchell <mark@codesourcery.com> 1636 1637 * class.c (dfs_find_final_overrider): Adjust so that the most 1638 derived object is a binfo, rather than a class type. 1639 (find_final_overrider): Likewise. 1640 (add_vcall_offset_vtbl_entries_1): Simplify accordingly. 1641 (add_vcall_offset): Likewise. 1642 16432002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1644 1645 PR c++/8389 1646 * pt.c (instantiate_template): Push class scope for member 1647 functions. 1648 (get_mostly_instantiated_function_type): Likewise. Don't call 1649 tsubst on context. Remove CONTEXTP and TPARMSP parameters. 1650 * cp-tree.h (get_mostly_instantiated_function_type): Adjust. 1651 * mangle.c (write_encoding, write_unqualified_name): Adjust. 1652 16532002-11-07 Mark Mitchell <mark@codesourcery.com> 1654 1655 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of 1656 vcall offfsets. Split out ... 1657 (add_vcall_offset): ... new function. 1658 1659 PR c++/8338 1660 * pt.c (for_each_template_parm): Add htab parameter. 1661 (process_partial_specialization): Adjust call. 1662 (push_template_decl_real): Likewise. 1663 (pair_fn_data): Add visited. 1664 (for_each_template_parm_r): Avoid walking duplicates more than 1665 once. 1666 (uses_template_parms): Adjust call to for_each_template_parm. 1667 16682002-11-07 Mark Mitchell <mark@codesourcery.com> 1669 1670 * class.c (add_implicitly_declared_members): Put implicitly 1671 declared functions at the end of TYPE_METHODs when -fabi-version 1672 is at least 2. 1673 16742002-11-05 Geoffrey Keating <geoffk@apple.com> 1675 1676 * decl2.c (finish_file): Correct spelling. 1677 16782002-11-03 Mark Mitchell <mark@codesourcery.com> 1679 1680 * call.c (build_special_member_call): Do not try to lookup VTTs by 1681 name. 1682 * class.c (vtbl_init_data): Add generate_vcall_entries. 1683 (get_vtable_decl): Do not look up virtual tables by name. 1684 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P. 1685 (set_primary_base): Do not set CLASSTYPE_RTTI. 1686 (determine_primary_base): Likewise. 1687 (get_matching_virtual): Remove. 1688 (get_vcall_index): New function. 1689 (update_vtable_entry_for_fn): Do not try to use virtual thunks 1690 when they are not required. Assign vcall indices at this point. 1691 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT. 1692 Do update dynamic_classes. 1693 (build_vtt): Do not add VTTs to the symbol table. 1694 (build_ctor_vtbl_group): Likewise. 1695 (build_vtbl_initializer): Simplify handling of vcall indices. 1696 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets 1697 for the most derived class. 1698 (add_vcall_offset_vtbl_entries_1): But do not actually add them to 1699 the vtable. 1700 * cp-tree.h (dynamic_classes): New macro. 1701 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices. 1702 (CLASSTYPE_RTTI): Remove. 1703 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove. 1704 (CLASSTYPE_VCALL_INDICES): New macro. 1705 (CLASSTYPE_VTABLES): Likewise. 1706 (BV_USE_VCALL_INDEX_P): Remove. 1707 (build_vtable_path): Remove. 1708 * decl2.c (finish_vtable_vardecl): Remove. 1709 (key_method): Remove #if 0'd code. 1710 (finish_vtable_vardecl): Rename to ... 1711 (maybe_emit_vtables): ... this. 1712 (finish_file): Use it. 1713 * search.c (look_for_overrides_here): Update comment. 1714 17152002-11-01 Zack Weinberg <zack@codesourcery.com> 1716 1717 PR c/7353 redux 1718 * decl2.c (grokfield): Reject TYPE_DECLs with initializers. 1719 17202002-10-30 Jason Merrill <jason@redhat.com> 1721 1722 PR c++/8186 1723 * cp-tree.h (ADDR_IS_INVISIREF): New macro. 1724 * call.c (convert_for_arg_passing): Set it. 1725 * except.c (stabilize_throw_expr): Recurse for such an arg. 1726 17272002-10-31 Mark Mitchell <mark@codesourcery.com> 1728 1729 * cp-tree.h (lang_decl_flags): Remove init_priority. 1730 (lang_decl): Add delta. 1731 (GLOBAL_INIT_PRIORITY): Remove. 1732 (THUNK_DELTA): Revise definition. 1733 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY. 1734 * dump.c (cp_dump_tree): Don't dump it. 1735 17362002-10-30 Mark Mitchell <mark@codesourcery.com> 1737 1738 PR c++/8160 1739 * typeck2.c (process_init_constructor): Call complete_array_type. 1740 1741 PR c++/8149 1742 * decl.c (make_typename_type): Issue errors about invalid results. 1743 17442002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 1745 1746 Core issue 287, PR c++/7639 1747 * cp-tree.h (lang_type_class): Add decl_list field. 1748 (CLASSTYPE_DECL_LIST): New macro. 1749 (maybe_add_class_template_decl_list): Add declaration. 1750 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST. 1751 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST. 1752 (maybe_add_class_template_decl_list): New function. 1753 (add_implicitly_declared_members): Use it. 1754 * decl.c (maybe_process_template_type_declaration): Likewise. 1755 (pushtag): Likewise. 1756 * friend.c (add_friend): Likewise. 1757 (make_friend_class): Likewise. 1758 * semantics.c (finish_member_declaration): Likewise. 1759 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST. 1760 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST 1761 to process members and friends in the order of declaration. 1762 17632002-10-29 Mark Mitchell <mark@codesourcery.com> 1764 1765 PR c++/8287 1766 * decl.c (finish_destructor_body): Create the label to jump to 1767 when returning from a destructor here. 1768 (finish_function_body): Rather than here. 1769 17702002-10-25 Zack Weinberg <zack@codesourcery.com> 1771 1772 PR c++/7266 1773 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a 1774 SCOPE_REF is not null before dereferencing it. 1775 17762002-10-25 Mark Mitchell <mark@codesourcery.com> 1777 1778 * call.c (build_over_call): Use DECL_CONTEXT, not 1779 DECL_VIRTUAL_CONTEXT. 1780 * class.c (modify_vtable_entry): Don't mess with 1781 DECL_VIRTUAL_CONTEXT. 1782 (set_vindex): Remove. 1783 (set_primary_base): Remove vfuns_p parameter. 1784 (determine_primary_base): Likewise. 1785 (modify_all_vtables): Likewise. 1786 (layout_class_type): Likewise. Adjust calls to other functions 1787 accordingly. 1788 (finish_struct_1): Adjust calls to modified functions. Set 1789 DECL_VINDEX here. 1790 * cp-tree.h (lang_type_class): Remove vsize. 1791 (CLASSTYPE_VSIZE): Remove. 1792 (lang_decl): Remove thunks. 1793 (DECL_THUNKS): Adjust. 1794 (DECL_VIRTUAL_CONTEXT): Remove. 1795 (duplicate_decls): Don't copy it. 1796 * pt.c (build_template_decl): Don't set it. 1797 (tsubst_decl): Likewise. 1798 * typeck.c (expand_ptrmemfunc_cst): Don't use it. 1799 1800 * class.c (build_vtbl_initializer): Don't use build_vtable_entry. 1801 (build_vtable_entry): Remove. 1802 * cp-tree.h (BINFO_VIRTUALS): Expand documentation. 1803 (lang_decl): Add thunks. 1804 (DECL_THUNKS): New macro. 1805 * decl.c (duplicate_decls): Copy it. 1806 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS. 1807 * semantics.c (emit_associated_thunks): Simplify. 1808 18092002-10-24 David Edelsohn <edelsohn@gnu.org> 1810 1811 PR c++/7228 1812 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that 1813 lang_type structure exists before accessing field. 1814 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro. 1815 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar. 1816 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro. 1817 * class.c (check_field_decls): Use new macros. 1818 * typeck2.c (process_init_constructor): Remove redundant check for 1819 existence of lang_type structure. 1820 18212002-10-24 Mark Mitchell <mark@codesourcery.com> 1822 1823 * class.c (end_of_base): New method. 1824 (end_of_class): Use it. Check indirect virtual bases. 1825 1826 * class.c (check_field_decls): Fix typo. 1827 18282002-10-23 Mark Mitchell <mark@codesourcery.com> 1829 1830 PR c++/8067 1831 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and 1832 related variables. 1833 1834 PR c++/7679 1835 * spew.c (next_token): Do not return an endless stream of 1836 END_OF_SAVED_INPUT tokens. 1837 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of 1838 the cached token stream. 1839 (snarf_defarg): Likewise. 1840 18412002-10-23 Zack Weinberg <zack@codesourcery.com> 1842 1843 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for 1844 variably_modified_type_p. 1845 * cp-tree.h: Remove prototype of variably_modified_type_p. 1846 * tree.c (variably_modified_type_p): Remove; now implemented 1847 in language-independent code. 1848 18492002-10-22 Mark Mitchell <mark@codesourcery.com> 1850 1851 PR c++/6579 1852 * spew.c (snarf_parenthesized_expression): New function. 1853 (snarf_block): Use it. 1854 18552002-10-22 Richard Henderson <rth@redhat.com> 1856 1857 * method.c (use_thunk): Always compute vcall_value; assert that 1858 it is not zero. Use can_output_mi_thunk; use output_mi_thunk 1859 for vcall thunks as well. 1860 18612002-10-21 Mark Mitchell <mark@codesourcery.com> 1862 1863 * class.c (empty_base_at_nonzero_offset_p): New function. 1864 (layout_nonempty_base_or_field): Do not check for conflicts when 1865 laying out a virtual base using the GCC 3.2 ABI. 1866 (build_base_field): Correct checking for presence of empty classes 1867 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P. 1868 1869 * class.c (include_empty_classes): Use normalize_rli. 1870 (layout_class_type): Likewise. 1871 1872 * decl.c (reshape_init): Tweak handling of character arrays. 1873 1874 PR c++/8218 1875 * cp-tree.h (lang_type_class): Add contains_empty_class_p. 1876 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro. 1877 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P. 1878 (check_field_decls): Likewise. 1879 (layout_class_type): Likewise. 1880 (finish_struct_1): Initialize it. 1881 (walk_subobject_offsets): Use it to prune searches. 1882 18832002-10-20 Mark Mitchell <mark@codesourcery.com> 1884 1885 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT. 1886 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with 1887 TARGET_ASM_OUTPUT_MI_THUNK in comments. 1888 18892002-10-18 Zack Weinberg <zack@codesourcery.com> 1890 1891 * decl.c (start_decl): Point users of the old initialized- 1892 typedef extension at __typeof__. 1893 18942002-10-18 Mark Mitchell <mark@codesourcery.com> 1895 1896 * Make-lang.in (method.o): Depend on TARGET_H. 1897 * method.c (target.h): Include it. 1898 (use_thunk): Use target hooks. Use vcall thunks, if available. 1899 19002002-10-18 Mark Mitchell <mark@codesourcery.com> 1901 1902 * class.c (base_derived_from): Make sure return value is a bool. 1903 19042002-10-18 Mark Mitchell <mark@codesourcery.com> 1905 1906 * class.c (find_final_overrider_data_s): Remove overriding_fn and 1907 overriding_base. 1908 (dfs_base_derived_from): New function. 1909 (base_derived_from): Likewise. 1910 (dfs_find_final_overrider): Use base_derived_from. 1911 (find_final_overrider): Adjust. 1912 19132002-10-18 Jason Merrill <jason@redhat.com> 1914 1915 PR c++/8080 1916 * semantics.c (finish_for_cond, finish_while_cond): Don't mess 1917 with condition decls in a template. 1918 19192002-10-17 Nathan Sidwell <nathan@codesourcery.com> 1920 1921 * class.c (add_method): Compare template parms too. 1922 19232002-10-17 Mark Mitchell <mark@codesourcery.com> 1924 1925 PR c++/7584 1926 * class.c (handle_using_decl): Allow the declaration used to be 1927 from an ambiguous base. 1928 1929 * pt.c (convert_template_argument): Revert this change: 1930 2002-10-16 Mark Mitchell <mark@codesourcery.com> 1931 * pt.c (convert_template_argument): Do not fold non-type 1932 template rguments when inside a template. 1933 1934 * init.c (expand_default_init): Handle brace-enclosed initializers 1935 correctly. 1936 19372002-10-16 Mark Mitchell <mark@codesourcery.com> 1938 1939 * mangle.c (write_expression): Correct handling of enumeration 1940 constants. 1941 (write_template_arg): Likewise. 1942 * pt.c (convert_template_argument): Do not fold non-type template 1943 arguments when inside a template. 1944 1945 PR c++/7478 1946 * cvt.c (convert_to_reference): Allow references as the incoming 1947 type. 1948 19492002-10-16 Mark Mitchell <mark@codesourcery.com> 1950 1951 PR c++/7524 1952 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not 1953 build_qualified_type. 1954 19552002-10-15 Richard Henderson <rth@redhat.com> 1956 1957 * error.c (dump_expr): Use real_to_decimal directly, and with 1958 the new arguments. 1959 19602002-10-15 Mark Mitchell <mark@codesourcery.com> 1961 1962 * decl.c (reshape_init): Fix typo. 1963 1964 * cp-tree.h (operator_name_info_t): Add arity. 1965 * lex.c (init_operators): Initialize it. 1966 * mangle.c (write_conversion_operator_name): New function. 1967 (write_unqualified_name): Use it. 1968 (write_template_args): Accept template arguments as a TREE_LIST. 1969 (write_expression): Adjust handling of qualified names to match 1970 specification. 1971 19722002-10-15 Jason Merrill <jason@redhat.com> 1973 1974 * call.c (call_builtin_trap): New fn. 1975 (convert_arg_to_ellipsis): Use it. Downgrade error to warning. 1976 (build_call): Don't set current_function_returns_abnormally outside 1977 a function. 1978 19792002-10-14 Mark Mitchell <mark@codesourcery.com> 1980 1981 * class.c (check_field_decls): Remove empty_p parameter. Instead, 1982 clear CLASSTYPE_EMPTY_P. 1983 (build_base_field): Likewise. 1984 (build_base_fields): Likewise. 1985 (check_bases_and_members): Likewise. 1986 (create_vtbl_ptr): Likewise. 1987 (layout_class_type): Likewise. Ensure that empty classes have 1988 size zero when used as base classes in the 3.2 ABI. 1989 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and 1990 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p 1991 parameter. 1992 (is_empty_class): Correct definition when using post-3.2 ABI. 1993 * cp-tree.h (lang_type_class): Add empty_p. 1994 (CLASSTYPE_EMPTY_P): New macro. 1995 19962002-10-12 Nathan Sidwell <nathan@codesourcery.com> 1997 1998 * init.c (build_delete): Do not apply save_expr for arrays. 1999 (build_vec_delete): Likewise. 2000 20012002-10-14 Mark Mitchell <mark@codesourcery.com> 2002 2003 * decl.c (layout_var_decl): Call layout_decl even for variables 2004 whose type is an array with unspecified bounds. 2005 2006 PR c++/7176 2007 * lex.c (do_identifier): Add another option for the parsing 2008 parameter. 2009 * parse.y (do_id): Use it. 2010 20112002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net> 2012 2013 PRs C++/6803, C++/7721 and C++/7803 2014 * decl.c (grokdeclarator): Gracefully handle template-name as 2015 decl-specifier. 2016 20172002-10-11 Jason Molenda <jmolenda@apple.com> 2018 2019 * init.c (build_field_list): Provide uses_unions_p with a default 2020 value. 2021 20222002-10-11 Mark Mitchell <mark@codesourcery.com> 2023 2024 PR c++/5661 2025 * cp-tree.h (variably_modified_type_p): New function. 2026 (grokdeclarator) Tighten check for variably modified types as 2027 fields. 2028 * pt.c (convert_template_argument): Do not allow variably modified 2029 types as template arguments. 2030 * tree.c (variably_modified_type_p): New function. 2031 2032 * NEWS: Document removal of "new X = ..." extension. 2033 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on 2034 brace-enclosed initializers. 2035 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro. 2036 (initialize_local_var): Remove declaration. 2037 (expand_static_init): Likewise. 2038 * decl.c (next_initializable_field): New function. 2039 (reshape_init): Likewise. 2040 (check_initializer): Use them. Build dynamic initializer for 2041 aggregates here too. 2042 (initialize_local_var): Simplify, and incorporate cleanup 2043 insertion code as well. 2044 (destroy_local_var): Remove. 2045 (cp_finish_decl): Tidy. 2046 (expand_static_init): Fold checks for whether or not a variable 2047 needs initialization into this function. Simplify. 2048 * decl2.c (do_static_initialization): Simplify. 2049 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will 2050 be done for us automatically. 2051 (expand_default_init): Handle brace-enclosed initializers 2052 correctly. 2053 (expand_aggr_init_1): Remove RTL-generation code. 2054 (build_vec_init): Remove "new X = ..." support. 2055 * parse.y (new_initializer): Likewise. 2056 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on 2057 brace-enclosed initializer. 2058 (create_pseudo_type_info): Likewise. 2059 * typeck2.c (store_init_value): Don't try to handle digest_init 2060 being called more than once. 2061 (digest_init): Tidy handling of brace-enclosed initializers. 2062 20632002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2064 2065 * decl.c (typename_hash): Use htab_hash_pointer. 2066 20672002-10-10 Jim Wilson <wilson@redhat.com> 2068 2069 * decl.c (duplicate_decls): Don't call decl_attributes. 2070 20712002-10-09 Zack Weinberg <zack@codesourcery.com> 2072 2073 PR c/7353 2074 * decl.c (start_decl): Unconditionally issue error for 2075 'typedef foo = bar'. 2076 (cp_finish_decl): Remove special case for TYPE_DECL with initializer. 2077 (grokdeclarator): Remove redundant error for 'typedef foo = bar'. 2078 20792002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2080 2081 * decl2.c (prune_vtable_vardecl): Delete unused function. 2082 20832002-10-03 Mark Mitchell <mark@codesourcery.com> 2084 2085 PR c++/7754 2086 * decl2.c (finish_anon_union): Do not expand anonymous unions when 2087 procesing template functions. 2088 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable 2089 type. Call layout_decl. 2090 (tsubst_expr, case DECL_STMT): Handle anonymous unions. 2091 20922002-10-07 Richard Henderson <rth@redhat.com> 2093 2094 * decl2.c, pt.c: Revert c++/7754 fix. 2095 20962002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2097 2098 PR c++/7804 2099 * error.c (dump_expr) [REAL_CST]: Output in decimal format. 2100 21012002-10-03 Mark Mitchell <mark@codesourcery.com> 2102 2103 PR c++/7931 2104 * pt.c (for_each_template_parm_r): Handle BASELINKs. 2105 2106 PR c++/7754 2107 * decl2.c (finish_anon_union): Do not expand anonymous unions when 2108 procesing template functions. 2109 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable 2110 type. Call layout_decl. 2111 (tsubst_expr, case DECL_STMT): Handle anonymous unions. 2112 21132002-10-03 Mark Mitchell <mark@codesourcery.com> 2114 2115 PR c++/8006 2116 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template 2117 template parameters. 2118 (globals): Add entity and need_abi_warning. 2119 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not 2120 CLASSTYPE_TEMPLATE_INFO. 2121 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not 2122 TYPE_TI_TEMPLATE. 2123 (write_prefix): Handle typename types correctly. 2124 (write_template_prefix): Handle template template parameters 2125 correctly. 2126 (start_mangling): Add entity parameter. 2127 (finish_mangling): Warn about names whose mangling will change. 2128 (mangle_decl_string): Adjust. 2129 (mangle_type_string): Likewise. 2130 (mangle_special_for_type): Likewise. 2131 (mangle_ctor_vtbl_for_type): Likewise. 2132 (mangle_thunk): Likewise. 2133 (mangle_guard_variable): Likewise. 2134 (mangle_ref_init_variable): Likewise. 2135 21362002-10-02 Mark Mitchell <mark@codesourcery.com> 2137 2138 PR c++/7188. 2139 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two. 2140 * cp-tree.h (emit_base_init): Rename to .... 2141 (emit_mem_initializers): ... this. 2142 (expand_member_init): Change prototype. 2143 * init.c (perform_member_init): Compute explicit, rather than 2144 requiring it as a parameter. 2145 (sort_member_init): Rename to ... 2146 (sort_mem_initializers): ... this. Process bases and data members 2147 together. 2148 (sort_base_init): Remove. 2149 (emit_base_init): Rename to ... 2150 (emit_mem_initializers): ... this. 2151 (expand_aggr_vbase_init_1): Remove. 2152 (construct_virtual_bases): Rename to ... 2153 (construct_virtual_base): ... this. 2154 (expand_member_init): Rework handling of base initializers. 2155 * method.c (do_build_copy_constructor): Use 2156 finish_mem_initializers. 2157 * parse.y (member_init): Adjust calls to expand_member_init. 2158 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case. 2159 (tsubst_initializer_list): Use expand_member_init. 2160 * semantics.c (finish_mem_intiailizers): Simplify. 2161 21622002-10-02 Matt Austern <austern@apple.com> 2163 * decl.c (walk_vtables_r): Fixed typo that caused result to 2164 never get a nonzero value. 2165 21662002-10-02 Roger Sayle <roger@eyesopen.com> 2167 2168 PR optimization/6627 2169 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition 2170 from here, and move it to tree.h. 2171 * decl.c (cxx_init_decl_processing): If storing the vbit 2172 in function pointers, ensure that force_align_functions_log 2173 is atleast one. 2174 21752002-10-02 Matt Austern <austern@apple.com> 2176 2177 * class.c (check_field_decls): Changed warning about const member 2178 variables so that it doesn't get issued for a class aggregate. 2179 21802002-10-01 Mark Mitchell <mark@codesourcery.com> 2181 2182 * decl.c (cp_finish_decl): Make sure array types are laid out, 2183 even if the array bounds are unknown. 2184 21852002-10-01 Steve Ellcey <sje@cup.hp.com> 2186 2187 * class.c (build_vtbl_initializer): Change build_c_cast 2188 to build1. 2189 21902002-10-01 Mark Mitchell <mark@codesourcery.com> 2191 2192 * decl.c (cp_finish_decl): Make sure array types are laid out, 2193 even if the array bounds are unknown. 2194 2195 * decl.c (cp_finish_decl): Correct check for dynamic 2196 initialization of thread-local storage. 2197 21982002-09-30 Nathan Sidwell <nathan@codesourcery.com> 2199 2200 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also 2201 overloaded. 2202 22032002-09-30 Steve Ellcey <sje@cup.hp.com> 2204 2205 * class.c (build_vtbl_initializer): Add cast. 2206 (add_vcall_offset_vtbl_entries_1): 2207 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset. 2208 22092002-09-30 Mark Mitchell <mark@codesourcery.com> 2210 2211 * class.c (walk_subobject_offsets): Correct the calculation of 2212 offsets for virtual bases. Correct the counting of array 2213 elements. 2214 (layout_nonempty_base_or_field): Simplify. Correct the 2215 calculation of offsets to be propagated through the binfo 2216 hierarchy. 2217 (build_base_field): Avoid creating a FIELD_DECL for empty bases. 2218 Add the FIELD_DECL to TYPE_FIELDS. 2219 (build_base_fields): Adjust accordingly. 2220 (layout_virtual_bases): Use build_base_field. 2221 (end_of_class): Return a tree, not an integer. 2222 (warn_about_ambiguous_direct_bases): Rename to ... 2223 (warn_about_ambiguous_bases): ... this. 2224 (include_empty_classes): New function. 2225 (layout_class_type): Create an alternative version of the type to 2226 be used when as a base class type. Do not call 2227 finish_record_layout until we are done laying out the class. 2228 * cp-tree.h (lang_type_class): Remove size, size_unit. Add 2229 as_base. 2230 (CLASSTYPE_SIZE): Reimplement. 2231 (CLASSTYPE_SIZE_UNIT): Likewise. 2232 (CLASSTYPE_ALIGN): Likweise. 2233 (CLASSTYPE_USER_ALIGN): Likewise. 2234 (CLASSTYPE_AS_BASE): New macro. 2235 (DECL_INITIALIZED_P): Likewise. 2236 (extract_init): Remove prototype. 2237 (build_forced_zero_init): Rename to ... 2238 (build_zero_init): ... this. 2239 (force_store_init_value): Remove. 2240 * decl.c (obscure_complex_init): Remove. 2241 (duplicate_decls): Copy DECL_INITIALIZED_P. 2242 (check_initializer): Do not leave junk in DECL_INITIAL. 2243 (cp_finish_decl): Handle zero-initialization of entities with 2244 static storage duration. 2245 * expr.c (extract_init): Remove. 2246 * init.c (build_forced_zero_init): Remove. 2247 (build_zero_init): New function. 2248 (build_default_init): Use it. 2249 (build_field_list): Skip FIELD_DECLs for base subobjects. 2250 (push_base_cleanups): Likewise. 2251 * method.c (do_build_assign_ref): Likewise. 2252 (synthesize_exception_spec): Likewise. 2253 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P. 2254 (regenerate_decl_from_template): To not set DECL_INITIAL for a 2255 static data member whose initialization took place in its class. 2256 (instantiate_decl): Do not pass an initializer to cp_finish_decl 2257 in that situation. 2258 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects. 2259 (dfs_unuse_fields): Likewise. 2260 * tree.c (pod_type_p): Handle error_mark_node. 2261 (zero_init_p): Likewise. 2262 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base 2263 subobjects. 2264 * typeck2.c (store_init_value): Remove #if 0'd code. 2265 (force_store_init_value): Remove. 2266 (process_init_constructor): Use build_zero_init. 2267 22682002-09-29 Nathan Sidwell <nathan@codesourcery.com> 2269 2270 PR c++/7788 2271 * rtti.c (unemitted_tinfo_decl_p): Check it has a field. 2272 22732002-09-29 Kazu Hirata <kazu@cs.umass.edu> 2274 2275 * cp-tree.h: Fix comment typos. 2276 * decl.c: Likewise. 2277 * pt.c: Likewise. 2278 22792002-09-25 Mark Mitchell <mark@codesourcery.com> 2280 2281 * cp/class.c (contains_empty_class_p): New method. 2282 (walk_subobject_offsets): Correct computation of field offset. 2283 (layout_empty_base): Correct placement of emtpy base classes. 2284 (layout_class_type): Warn about ABI changes. 2285 22862002-09-23 Mark Mitchell <mark@codesourcery.com> 2287 2288 * cp/class.c (layout_virtual_bases): Do not round the size of the 2289 type to a multiple of the alignment before laying out virtual bases. 2290 (layout_class_type): Correct handling of bit-fields that are wider 2291 than their type inside unions. Round the size of the type to a 2292 even number of bytes when computing the size without virtual 2293 bases. 2294 * cp/cp-tree.h (abi_version_at_least): New macro. 2295 22962002-09-21 Kazu Hirata <kazu@cs.umass.edu> 2297 2298 * ChangeLog: Follow spelling conventions. 2299 * ChangeLog.2: Likewise. 2300 * call.c: Likewise. 2301 * class.c: Likewise. 2302 * cp-tree.h: Likewise. 2303 * cvt.c: Likewise. 2304 * decl.c: Likewise. 2305 * decl2.c: Likewise. 2306 * except.c: Likewise. 2307 * friend.c: Likewise. 2308 * g++spec.c: Likewise. 2309 * init.c: Likewise. 2310 * lex.c: Likewise. 2311 * mangle.c: Likewise. 2312 * method.c: Likewise. 2313 * operators.def: Likewise. 2314 * optimize.c: Likewise. 2315 * pt.c: Likewise. 2316 * rtti.c: Likewise. 2317 * search.c: Likewise. 2318 * semantics.c: Likewise. 2319 * spew.c: Likewise. 2320 * tree.c: Likewise. 2321 * typeck.c: Likewise. 2322 23232002-09-18 Devang Patel <dpatel@apple.com> 2324 2325 * cp/cp-tree.h: New prototype for walk_vtabls(). 2326 * cp/decl.c (walk_vtables_r): New function. 2327 (struct cp_binding_level): Add new members, namespaces, 2328 names_size and vtables. 2329 (add_decl_to_level): Add decl in namespaces or vtables 2330 chain, if conditions match. 2331 (walk_vtables): New function. 2332 (walk_namespaces_r): Travers separate namespace chain 2333 for namespace decls. 2334 (wrapup_globals_for_namespace): Use names_size instead 2335 of list_length(). 2336 * cp/decl2.c (finish_file): Use walk_vtables() instead of 2337 walk_globals() to walk vtable decls. 2338 23392002-09-18 Nathan Sidwell <nathan@codesourcery.com> 2340 2341 * decl.c (grokdeclarator): Use assert, not internal_error. Don't 2342 ICE with invalid pointers & references. 2343 23442002-09-17 Zack Weinberg <zack@codesourcery.com> 2345 2346 * Make-lang.in: Remove all references to the demangler. 2347 * cxxfilt.c: Moved to binutils. 2348 23492002-09-16 Nathan Sidwell <nathan@codesourcery.com> 2350 2351 PR c++/7718 2352 * pt.c (tsubst_decl): Remove assert. 2353 2354 Remove DR 295 implementation. 2355 * pt.c (check_cv_quals_for_unify): Disable function & method cases. 2356 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn 2357 about ignoring volatile qualifiers. 2358 2359 * search.c (lookup_member): Correct documentation. 2360 23612002-09-16 Geoffrey Keating <geoffk@apple.com> 2362 2363 * cp-tree.h (union lang_tree_node): Add chain_next option. 2364 23652002-09-16 Nathan Sidwell <nathan@codesourcery.com> 2366 2367 * parse.y (parse_finish_call_expr): Check lookup_member result. 2368 2369 PR c++/7015 2370 * semantic.c (finish_asm_stmt): Fix operand/output_operands 2371 thinko. 2372 * typeck.c (c_expand_asm_operands): Protect from error_mark_node. 2373 23742002-09-15 Nathan Sidwell <nathan@codesourcery.com> 2375 2376 PR c++/7919 2377 * call.c (build_over_call): Convert this pointer for fns found by 2378 using decls. 2379 23802002-09-15 Kazu Hirata <kazu@cs.umass.edu> 2381 2382 * ChangeLog: Follow spelling conventions. 2383 * ChangeLog.1: Likewise. 2384 23852002-09-14 Nathan Sidwell <nathan@codesourcery.com> 2386 2387 PR c++/7768 2388 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P. 2389 23902002-09-14 Kazu Hirata <kazu@cs.umass.edu> 2391 2392 * error.c: Fix comment formatting. 2393 * except.c: Likewise. 2394 * expr.c: Likewise. 2395 * friend.c: Likewise. 2396 * g++spec.c: Likewise. 2397 * init.c: Likewise. 2398 * lex.c: Likewise. 2399 * mangle.c: Likewise. 2400 * method.c: Likewise. 2401 * optimize.c: Likewise. 2402 * pt.c: Likewise. 2403 * rtti.c: Likewise. 2404 * search.c: Likewise. 2405 * semantics.c: Likewise. 2406 * spew.c: Likewise. 2407 * tree.c: Likewise. 2408 * typeck.c: Likewise. 2409 * typeck2.c: Likewise. 2410 24112002-09-13 Matt Austern <austern@apple.com> 2412 2413 PR C++/7828 2414 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p. 2415 * cp/call.c: Change call-by-const-reference mechanism to use 2416 non_cast_lvalue_p when deciding whether the create a temporary. 2417 We need a temporary when passing, e.g. (long) x by const ref. 2418 24192002-09-13 Nathan Sidwell <nathan@codesourcery.com> 2420 2421 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified. 2422 24232002-09-13 Kazu Hirata <kazu@cs.umass.edu> 2424 2425 * decl.c: Fix comment formatting. 2426 * decl2.c: Likewise. 2427 24282002-09-12 Kazu Hirata <kazu@cs.umass.edu> 2429 2430 * call.c: Fix comment formatting. 2431 * class.c: Likewise. 2432 * cp-lang.c: Likewise. 2433 * cp-tree.h: Likewise. 2434 * cvt.c: Likewise. 2435 24362002-09-11 Zack Weinberg <zack@codesourcery.com> 2437 2438 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c, 2439 and c++filt from cxxfilt.o + version.o + $(LIBDEPS). 2440 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with 2441 minor adjustments (use version_string, eliminate yet another 2442 duplicate of xmalloc) 2443 24442002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2445 2446 * cp-tree.h (require_complete_eh_spec_types): Add prototype. 2447 24482002-09-05 Jason Merrill <jason@redhat.com> 2449 2450 * typeck2.c (add_exception_specifier): Only pedwarn for an 2451 incomplete type. 2452 (require_complete_eh_spec_types): New fn. 2453 (cxx_incomplete_type_diagnostic): Also support pedwarning. 2454 * typeck.c (complete_type_or_diagnostic): Likewise. 2455 * call.c (build_call): Call require_complete_eh_spec_types. 2456 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting 2457 on an incomplete type. 2458 24592002-09-04 Jakub Jelinek <jakub@redhat.com> 2460 2461 * decl.c (start_cleanup_fn): Clear interface_only before 2462 start_function, restore it afterwards. 2463 24642002-08-31 Jason Merrill <jason@redhat.com> 2465 2466 * cp-lang.c (cp_expr_size): Allow initialization from a 2467 CONSTRUCTOR. 2468 24692002-08-30 Richard Henderson <rth@redhat.com> 2470 2471 PR opt/7515 2472 * tree.c: Include target.h. 2473 (cp_cannot_inline_tree_fn): Don't auto-inline functions that 2474 don't bind locally. 2475 * Makefile.in (tree.o): Update. 2476 24772002-08-27 Mark Mitchell <mark@codesourcery.com> 2478 2479 * class.c (layout_virtual_bases): Warn about bugs in G++ that 2480 result in incorrect object layouts. 2481 (layout_class_type): Likewise. 2482 24832002-08-24 Matt Austern <austern@apple.com> 2484 2485 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues 2486 are allowable. 2487 (real_lvalue_p): Update caller. 2488 (lvalue_p): Ditto. 2489 (non_cast_lvalue_or_else): New. 2490 * tree.h: Declare it. 2491 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else. 2492 24932002-08-22 Mark Mitchell <mark@codesourcery.com> 2494 2495 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR 2496 and COND_EXPR specially; fix error message output. 2497 24982002-08-22 Jason Merrill <jason@redhat.com> 2499 2500 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR. 2501 * semantics.c (nullify_returns_r): Likewise. 2502 25032002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net> 2504 2505 Fix PR/7621 2506 * typeck.c (finish_class_member_access_expr): Diagnose cases where 2507 name lookup finds nothing. 2508 25092002-08-15 Jason Merrill <jason@redhat.com> 2510 2511 * semantics.c (finish_then_clause): Remove redundant assignment. 2512 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the 2513 extra binding level outside the if/switch statement. 2514 (finish_while_cond, finish_for_cond): Rewrite complex condition 2515 into the loop body. 2516 25172002-08-15 Alexandre Oliva <aoliva@redhat.com> 2518 2519 * parse.y (sizeof, alignof, typeof): New non-terminals to 2520 increment skip_evaluation. Replace terminals with them and 2521 decrement skip_evaluation at the end of rules using them. 2522 * decl2.c (mark_used): Don't assemble_external if 2523 skipping evaluation. 2524 25252002-08-15 Gabriel Dos Reis <gdr@nerim.net> 2526 2527 Fix PR/7504 2528 * parse.y (parse_finish_call_expr): Handle incomplete 2529 type used to name a scope. 2530 25312002-08-15 Nathan Sidwell <nathan@codesourcery.com> 2532 2533 PR c++/7598 2534 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes 2535 regression caused by my 2002-08-08 patch. 2536 25372002-08-13 Mark Mitchell <mark@codesourcery.com> 2538 2539 * decl.c (pushdecl_class_level): Honor requests to bind names to 2540 OVERLOADs. 2541 25422002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2543 2544 * decl2.c (build_call_from_tree): Fix uninitialized variable. 2545 * parse.y (parse_finish_call_expr): Likewise. 2546 * repo.c (old_args, old_dir, old_main): Const-ify. 2547 25482002-08-11 Gabriel Dos Reis <gdr@nerim.net> 2549 2550 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE + 2551 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION. 2552 * optimize.c (maybe_clone_body): Likewise. 2553 * pt.c (tsubst_enum): Likewise. 2554 (lookup_template_class): Likewise. 2555 * tree.c (cp_copy_res_decl_for_inlining): Likewise. 2556 25572002-08-10 Neil Booth <neil@daikokuya.co.uk> 2558 2559 * lang-specs.h: Remove -ansi. 2560 25612002-08-10 Nathan Sidwell <nathan@codesourcery.com> 2562 2563 * tree.c (maybe_dummy_object): Replace // with /* */ 2564 25652002-08-09 Mark Mitchell <mark@codesourcery.com> 2566 2567 * call.c (standard_conversion): Use build_ptrmem_type. 2568 * cp-tree.h (build_ptrmem_type): New function. 2569 (adjust_result_of_qualified_name_lookup): Likewise. 2570 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate 2571 static data members. 2572 (build_ptrmem_type): New function. 2573 (grokdeclarator): Do not use build_offset_type when encountering a 2574 qualified name. 2575 * parse.y (parse_finish_call_expr): Use 2576 adjust_result_of_qualified_name_lookup. 2577 * search.c (adjust_result_of_qualified_name_lookup): New function. 2578 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than 2579 accessing OFFSET_TYPEs directly. 2580 25812002-08-08 Mike Stump <mrs@apple.com> 2582 2583 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid. 2584 (type_decays_to): Likewise. 2585 * class.c (find_final_overrider): Likewise. 2586 (maybe_note_name_used_in_class): Likewise. 2587 * decl.c (current_tmpl_spec_kind): Likewise. 2588 (add_binding): Likewise. 2589 (push_class_binding): Likewise. 2590 (duplicate_decls): Likewise. 2591 (layout_var_decl): Likewise. 2592 (grokfndecl): Likewise. 2593 (grokdeclarator): Likewise. 2594 (check_default_argument): Likewise. 2595 * decl2.c (handle_class_head): Likewise. 2596 * error.c (dump_template_decl): Likewise. 2597 * init.c (build_offset_ref): Likewise. 2598 * pt.c (check_specialization_scope): Likewise. 2599 (determine_specialization): Likewise. 2600 (check_explicit_specialization): Likewise. 2601 (maybe_check_template_type): Likewise. 2602 (process_partial_specialization): Likewise. 2603 (check_default_tmpl_args): Likewise. 2604 (push_template_decl_real): Likewise. 2605 (convert_template_argument): Likewise. 2606 (try_class_unification): Likewise. 2607 (get_bindings_real): Likewise. 2608 (do_decl_instantiation): Likewise. 2609 * semantics.c (begin_function_definition): Likewise. 2610 (finish_member_declaration): Likewise. 2611 (check_multiple_declarators): Likewise. 2612 * typeck.c (comp_array_types): Likewise. 2613 (comptypes): Likewise. 2614 (expr_sizeof): Likewise. 2615 (build_binary_op): Likewise. 2616 (dubious_conversion_warnings): Likewise. 2617 (check_return_expr): Likewise. 2618 26192002-08-08 Mark Mitchell <mark@codesourcery.com> 2620 2621 * typeck.c (build_class_member_access_expr): Do not return 2622 error_mark_node when no error has occurred. 2623 26242002-08-08 Nathan Sidwell <nathan@codesourcery.com> 2625 2626 * typeck.c (build_component_addr): Remove. 2627 (build_unary_op): Just check it's not a bitfield, and then build 2628 an ADDR_EXPR. 2629 26302002-08-08 Nathan Sidwell <nathan@codesourcery.com> 2631 2632 * class.c (convert_to_base): Correct check for error_mark_node. 2633 (create_vtable_ptr): Remove unused VFUNS_P parm. 2634 26352002-08-08 Nathan Sidwell <nathan@codesourcery.com> 2636 2637 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files. 2638 26392002-08-07 Mark Mitchell <mark@codesourcery.com> 2640 2641 Rework build_component_ref. 2642 * call.c (build_vfield_ref): Do not go through build_component_ref. 2643 (build_field_call): Use build_class_member_access_expr. 2644 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS. 2645 (build_object_call): Likewise. 2646 * class.c (convert_to_base): New function. 2647 (type_requires_array_cookie): Use BASELINK_FUNCTIONS. 2648 (instantiate_type): Handle BASELINKs. 2649 * cp-tree.def (BASELINK): New tree code. 2650 * cp-tree.h (BASELINK_P): Reimplement. 2651 (SET_BASELINK_P): Remove. 2652 (BASELINK_BINFO): Reimplement. 2653 (BASELINK_FUNCTIONS): Likewise. 2654 (BASELINK_ACCESS_BINFO): Likewise. 2655 (BASELINK_OPTYPE): Likewise. 2656 (convert_to_base): New function. 2657 (name_p): Likewise. 2658 (build_object_ref): Remove. 2659 (build_component_ref_1): Likewise. 2660 (build_component_ref): Likewise. 2661 (build_x_component_ref): Likewise. 2662 (build_class_member_access_expr): New function. 2663 (finish_class_member_access_expr): Likewise. 2664 (build_ptrmemfunc_access_expr): Likewise. 2665 * decl.c (grokdeclarator): Handle BASELINKs. 2666 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using 2667 finish_class_member_access_expr. 2668 (arg_assoc): Handle BASELINKs. 2669 (do_class_using_decl): Likewise. 2670 * error.c (dump_decl): Likewise. 2671 (dump_expr): Use build_ptrmemfunc_access_expr. 2672 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find 2673 destructors. 2674 (build_throw): Use BASELINK_FUNCTIONS. 2675 * init.c (perform_member_init): Use 2676 build_class_member_access_expr. 2677 (build_offset_ref): Handle BASELINKs. Use 2678 build_class_member_access_expr. 2679 * method.c (hack_identifier): Likewise. 2680 * parse.y (do_id): Use BASELINK, not TREE_LIST. 2681 (primary): Remove uses of build_object_ref. 2682 * pt.c (lookup_template_function): Handle BASELINKs. 2683 (resolve_overloaded_unification): Likewise. 2684 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST. 2685 (lookup_field): Use BASELINK, not TREE_LIST. 2686 (lookup_fnfiels): Likewise. 2687 (setup_class_bindings): Likewise. 2688 * semantics.c (finish_object_call_expr): Do not use 2689 build_method_call when we already know what function is being 2690 called. 2691 * spew.c (identifier_type): Use BASELINK, not TREE_LIST. 2692 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not 2693 TREE_CHAIN. 2694 (name_p): New function. 2695 * typeck.c (build_object_ref): Remove. 2696 (build_component_ref_1): Likewise. 2697 (build_x_component_ref): Likewise. 2698 (build_class_member_access_expr): New function. 2699 (finish_class_member_access_expr): Likewise. 2700 (build_ptrmemfunc_access_expr): Likewise. 2701 (get_member_function_from_ptrfunc): Use 2702 build_ptrmemfunc_access_expr. 2703 (build_binary_op): Likewise. 2704 (build_unary_op): Likewise. 2705 (build_ptrmemfunc): Likewise. 2706 (pfn_from_ptrmemfunc): Likewise. 2707 * typeck2.c (build_m_component_ref): Adjust comment. 2708 27092002-08-07 Neil Booth <neil@daikokuya.co.uk> 2710 2711 * Make-lang.in (CXX_C_OBJS): Update. 2712 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option. 2713 * cp-tree.h (cxx_decode_option): Remove. 2714 * decl2.c (compare_options, lang_f_options, unsupported_options, 2715 cxx_decode_option): Remove. 2716 27172002-08-06 Gabriel Dos Reis <gdr@nerim.net> 2718 2719 * typeck.c (build_x_unary_op): Handle pointer-to-member. 2720 27212002-08-05 Geoffrey Keating <geoffk@redhat.com> 2722 2723 * class.c: Don't include obstack.h. 2724 (popclass): 2725 * decl2.c: Delete bogus comment. 2726 * error.c: Don't include obstack.h. 2727 * except.c: Likewise. 2728 (dump_type): Correct comment. 2729 * method.c: Don't include obstack.h. 2730 * tree.c: Likewise. 2731 27322002-08-04 Gabriel Dos Reis <gdr@nerim.net> 2733 2734 Fix PR/2213 2735 * cvt.c (cp_convert_to_pointer): Reject conversions from integral 2736 expressions to pointer-to-data-member of pointer-to-member-functions. 2737 27382002-08-04 Geoffrey Keating <geoffk@redhat.com> 2739 2740 * cvt.c (ocp_convert): Delete obsolete code. 2741 * parse.y (permanent_obstack): Delete declaration. 2742 * pt.c (permanent_obstack): Delete declaration. 2743 * repo.c (permanent_obstack): Delete declaration. 2744 (open_repo_file): Use xmalloc instead of permanent_obstack. 2745 (init_repo): Use xstrdup instead of permanent_obstack. 2746 27472002-08-04 Nathan Sidwell <nathan@codesourcery.com> 2748 2749 * cp-tree.h (VF_DERIVED_VALUE): Remove. 2750 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE. 2751 27522002-08-03 Nathan Sidwell <nathan@codesourcery.com> 2753 2754 PR 7470. 2755 C++ ABI change - vfunc ordering. 2756 * class.c (add_virtual_function): Remove. 2757 (dfs_modify_all_vtables): Take list of all declared 2758 virtuals. Assign all that are not in primary base. 2759 (check_for_override): Adjust comments. 2760 (create_vtable_ptr): Take single list of virtuals. Build chain 2761 of declared virtuals here. 2762 (layout_class_type): Take single list of virtuals. Adjust. 2763 (finish_struct_1): Keep virtuals on single list. Adjust. 2764 27652002-08-02 Mark Mitchell <mark@codesourcery.com> 2766 2767 * init.c (build_member_call): Use build_new_method_call, not 2768 build_method_call. 2769 27702002-08-02 Krister Walfridsson <cato@df.lth.se> 2771 2772 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies. 2773 27742002-08-02 Mark Mitchell <mark@codesourcery.com> 2775 2776 * call.c (build_method_call): Issue a more helpful error message 2777 about ambiguous method names. 2778 27792002-08-02 Nathan Sidwell <nathan@codesourcery.com> 2780 2781 * tree.c (build_shared_int_cst): Make cache file scope, and 2782 GTY it. 2783 27842002-08-02 Jason Merrill <jason@redhat.com> 2785 2786 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define. 2787 (cp_expr_size): New fn. 2788 * call.c (build_over_call): Lose empty class hackery. 2789 (convert_arg_to_ellipsis): Promote non-POD warning to error. 2790 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue. 2791 2792 * semantics.c (expand_body): Do tree optimization in the function 2793 context, too. 2794 27952002-08-01 Neil Booth <neil@daikokuya.co.uk> 2796 2797 * cp-tree.h: Move all warning and flag declarations to c-common.h. 2798 * decl.c: Move all warning and flag variables to c-common.c. 2799 * decl2.c: Move all warning and flag variables to c-common.c. 2800 * lex.c (flag_digraphs): Remove. 2801 (warn_traditional): Now in c-common.c. 2802 28032002-07-31 Mark Mitchell <mark@codesourcery.com> 2804 2805 * call.c (build_field_call): Do not look up the field by name. 2806 (build_method_call): Simplify. 2807 (struct z_candidate): Add access_path and conversion_path. Remove 2808 basetype_path. 2809 (convert_class_to_reference): Adjust use of 2810 add_function_candidate. 2811 (add_candidate): Add conversion_path argument. 2812 (add_function_candidate): Use it. 2813 (add_conv_dndidate): Likewise. 2814 (build_builtin_candidate): Likewise. 2815 (add_template_candidate_real): Add conversion_path argument. 2816 (add_template_conv_candidate): Likewise. 2817 (add_template_candidate): Likewise. 2818 (build_user_type_conversion_1): Use it. 2819 (build_new_function_call): Remove name lookup code. Adjust use of 2820 add_template_candidate and add_function_candidate. 2821 (build_new_op): Likewise. 2822 (convert_like_real): Use build_special_member_call. 2823 (build_over_call): Use cand->conversion_path. 2824 (build_special_member_call): New method. 2825 (build_new_method_call): Remove name lookup code. 2826 * cp-tree.def (OFFSET_REF): Update documentation. 2827 (TEMPLATE_ID_EXPR): Likewise. 2828 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro. 2829 (BASELINK_OPTYPE): Likewise. 2830 (build_new_method_call): Adjust prototype. 2831 (build_special_member_call): New method. 2832 (build_baselink): New method. 2833 (build_offset_ref_call_from_tree): Likewise. 2834 (build_call_from_tree): Likewise. 2835 (finish_qualified_call_expr): Remove. 2836 (finish_call_expr): Adjust prototype. 2837 (build_x_function_call): Remove. 2838 * cvt.c (ocp_convert): Use build_special_member_call. 2839 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr. 2840 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and 2841 CALL_EXPR. 2842 (build_offset_ref_call_from_tree): New function. 2843 (build_call_from_tree): Likewise. 2844 * init.c (expand_cleanup): Use build_special_member_call. 2845 (expand_default_init): Likewise. 2846 (build_member_call): Use finish_call_expr. 2847 (build_new_1): Use build_special_member_call. 2848 (push_base_cleanups): Likewise. 2849 * method.c (do_build_assign_ref): Likewise. 2850 * parse.y (template_id): Do not pass a COMPONENT_REF to 2851 lookup_template_function. 2852 (primary): Use parse_finish_call_epxr, not finish_call_expr. 2853 (parse_finish_call_expr): New function. 2854 * pt.c (lookup_template_function): Add assertions. 2855 * search.c (lookup_base): Allow T to be a binfo. 2856 (build_baselink): New function. 2857 (lookup_member): Use it. 2858 * semantics.c (finish_call_expr): Do not do name lookup. 2859 (finish_object_call_expr): Remove #if 0'd code. 2860 (finish_qualified_call_expr): Remove. 2861 * typeck.c (build_x_function_call): Remove. 2862 (build_static_case): Use build_special_member_call. 2863 * typeck2.c (build_functional_cast): Likewise. 2864 28652002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> 2866 2867 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c. 2868 28692002-07-30 Gabriel Dos Reis <gdr@nerim.net> 2870 2871 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion. 2872 28732002-07-30 Nathan Sidwell <nathan@codesourcery.com> 2874 2875 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more 2876 documentation. 2877 28782002-07-29 Alan Modra <amodra@bigpond.net.au> 2879 2880 * cp-tree.h: Comment typo fix. 2881 28822002-07-29 Richard Earnshaw <rearnsha@arm.com> 2883 2884 * spew.c (space_for_token): Allocate zeroed memory for a new token 2885 chunk. 2886 28872002-07-27 Roger Sayle <roger@eyesopen.com> 2888 2889 * decl.c (builtin_function_1): No need to explicitly mark 2890 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn. 2891 28922002-07-27 Roger Sayle <roger@eyesopen.com> 2893 2894 * decl2.c (cxx_decode_option): Support -fno-builtin-foo. 2895 28962002-07-26 Jason Merrill <jason@redhat.com> 2897 2898 * call.c (build_over_call): Likewise. 2899 (cp_convert_parm_for_inlining): New fn. 2900 (convert_for_arg_passing): New fn. 2901 (convert_default_arg, build_over_call): Use it. 2902 (type_passed_as): New fn. 2903 * pt.c (tsubst_decl): Use it. 2904 * decl2.c (cp_build_parm_decl): New fn. 2905 (build_artificial_parm): Use it. 2906 (start_static_storage_duration_function): Likewise. 2907 * decl.c (start_cleanup_fn, grokdeclarater): Likewise. 2908 (grokparms): Don't mess with DECL_ARG_TYPE. 2909 * typeck.c (convert_arguments): Use convert_for_arg_passing. 2910 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): 2911 Define. 2912 * cp-tree.h: Declare new fns. 2913 29142002-07-26 Neil Booth <neil@daikokuya.co.uk> 2915 2916 * cp-tree.h (flag_operator_names): Remove. 2917 * decl2.c (flag_operator_names): Remove. 2918 (lang_f_options): Remove operator-names. 2919 * lex.c (D_OPNAME): Remove. 2920 (reswords): Remove operator names. 2921 (rid_to_yy): Remove operator names. 2922 (init_reswords): No need to handle D_OPNAME. 2923 * spew.c (read_process_identifier): There are no operator 2924 names. 2925 29262002-07-26 Jason Merrill <jason@redhat.com> 2927 2928 * dump.c (cp_dump_tree): Call c_dump_tree. 2929 * Make-lang.in (CXX_C_OBJS): Add c-dump.o. 2930 29312002-07-25 Neil Booth <neil@daikokuya.co.uk> 2932 2933 * error.c (print_whitespace): Remove. 2934 * g++spec.c (LIBUNWIND): Move. 2935 * mangle.c (mangled_position, write_signed_number): Remove. 2936 29372002-07-25 Neil Booth <neil@daikokuya.co.uk> 2938 2939 * decl2.c (cxx_decode_option): Similarly. 2940 29412002-07-25 Gabriel Dos Reis <gdr@nerim.net> 2942 2943 * cp-tree.h (cxx_sizeof_nowarn): Now a macro. 2944 (cxx_sizeof_or_alignof_type): Take a third argument. 2945 (cxx_sizeof): Adjust definition. 2946 (cxx_alignof): Likewise. 2947 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality. 2948 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for 2949 complaining. 2950 (c_sizeof_nowarn): Remove definition. 2951 (build_unary_op): Use cxx_sizeof_nowarn. 2952 29532002-07-24 Geoffrey Keating <geoffk@redhat.com> 2954 2955 * tree.c (cp_build_qualified_type_real): When copying 2956 pointer-to-method types, unshare the record that holds 2957 the cached pointer-to-member-function type. 2958 29592002-07-23 Neil Booth <neil@daikokuya.co.uk> 2960 2961 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove. 2962 29632002-07-23 Gabriel Dos Reis <gdr@nerim.net> 2964 2965 Fix PR/7363: 2966 * typeck.c (cxx_sizeof_or_alignof_type): New function. 2967 (c_sizeof): Remove definition. 2968 (expr_sizeof): Use cxx_sizeof. 2969 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type. 2970 * decl.c (finish_destructor_body): Use cxx_sizeof. 2971 * semantics.c (finish_alignof): Likewise. 2972 (finish_alignof): Use cxx_alignof. 2973 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros. 2974 (cxx_sizeof_or_alignof_type): Declare. 2975 (my_friendly_assert): Move to ../c-common.h. 2976 29772002-07-23 Neil Booth <neil@daikokuya.co.uk> 2978 2979 * class.c, method.c, pt.c, search.c: Don't define obstack macros. 2980 29812002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 2982 2983 PR c++/7347, c++/7348 2984 * cp-tree.h (tsubst_flags_t): Add tf_parsing. 2985 * decl.c (make_typename_type): Use it. 2986 (make_unbound_class_template): Likewise. 2987 (lookup_name_real): Don't call type_access_control if scope is 2988 template parameter dependent. 2989 * parse.y (template_arg): Call make_unbound_class_template with 2990 tf_parsing set. 2991 (nest_name_specifier): Call make_typename_type with tf_parsing set. 2992 (typename_sub0): Likewise. 2993 (typename_sub1): Likewise. 2994 (instantiate_decl): Push class scope. 2995 * pt.c (regenerate_decl_from_template): Call pushclass and popclass 2996 for both static variable and member function template. 2997 (instantiate_decl) Call pushclass and popclass when tsubst'ing type 2998 and arguments. 2999 * search.c (type_access_control): Do type access for TEMPLATE_DECL 3000 too. 3001 30022002-07-20 Roger Sayle <roger@eyesopen.com> 3003 3004 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions 3005 test by using positive_option. Make whitespace consistent. 3006 30072002-07-20 Gabriel Dos Reis <gdr@nerim.net> 3008 3009 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno' 3010 members with 'locus'. Adjust use throughout. 3011 (struct feed): Likewise. 3012 (alloc_unparsed_test): Change prototype, take a 'const location_t *'. 3013 Adjust use. 3014 (snarf_defarg): Use error(), not error_with_file_and_line(). 3015 30162002-07-19 Chris Demetriou <cgd@broadcom.com> 3017 3018 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever 3019 cpp_options is included. 3020 30212002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3022 3023 PR c++/2862, c++/2863 3024 * pt.c (determine_specialization): Compare the length of 3025 TYPE_ARG_TYPES. Tidy. 3026 30272002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3028 3029 PR c++/3797 3030 * decl.c (duplicate_decls): Don't propagate inlining parameters from 3031 olddecl to newdecl when newdecl is a specialization of the 3032 instantiation olddecl. 3033 30342002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3035 3036 PR c++/4802, c++/5387 3037 * decl.c (make_typename_type): Use enforce_access. 3038 30392002-07-17 Scott Snyder <snyder@fnal.gov> 3040 3041 PR c++/7320 3042 * rtti.c (get_tinfo_decl): Set DECL_COMDAT. 3043 30442002-07-12 Mark Mitchell <mark@codesourcery.com> 3045 3046 * class.c (add_method): Correct handling of conversion operators. 3047 30482002-07-11 Mark Mitchell <mark@codesourcery.com> 3049 3050 PR c++/7224 3051 * class.c (add_method): Simplify. 3052 30532002-07-11 Jason Merrill <jason@redhat.com> 3054 3055 PR c++/7279 3056 * tree.c (cp_copy_res_decl_for_inlining): Also copy 3057 TREE_ADDRESSABLE. 3058 30592002-07-10 Graham Stott <graham.stott@btinternet.com> 3060 3061 * pt.c (template_parm_this_level_p, push_template_decl_real): 3062 Pass depth as int pointer. 3063 30642002-07-11 Tim Josling <tej@melbpc.org.au> 3065 3066 Remove front end hard coding from gengtype.c. 3067 3068 * config-lang.in (gtfiles): Add files needed for this front end. 3069 30702002-07-10 Mark Mitchell <mark@codesourcery.com> 3071 3072 * cp-tree.h (unqualified_name_lookup_error): Declare it. 3073 (begin_function_definition): Adjust prototype. 3074 * lex.c (unqualified_name_lookup_error): New function, split out 3075 from ... 3076 (do_identifier): ... here. 3077 * parse.y (parse_begin_function_definition): New function. 3078 (fn.def1): Use it. 3079 * semantics.c (begin_function_definition): Accept decl-specifiers 3080 and attributes as separate parameters. 3081 30822002-07-10 Jason Merrill <jason@redhat.com> 3083 3084 PR c++/6255 3085 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than 3086 modifying the old one. 3087 30882002-07-09 Mark Mitchell <mark@codesourcery.com> 3089 3090 * cp-tree.h (constructor_name_p): Declare it. 3091 (check_template_template_default_arg): Likewise. 3092 * class.c (handle_using_decl): Use constructor_name_p. 3093 * decl.c (grokdeclarator): Likewise. 3094 * decl2.c (constructor_name_p): Define it. 3095 * init.c (build_member_call): Use constructor_name_p. 3096 * parse.y (template_parm): Use check_template_template_default_arg. 3097 * pt.c (check_explicit_specialization): Use constructor_name_p. 3098 * semantics.c (check_template_template_default_arg): New function. 3099 31002002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3101 3102 * pt.c (can_complete_type_without_circularity): Add static to 3103 function definition. 3104 31052002-07-08 Mark Mitchell <mark@codesourcery.com> 3106 3107 * cp-tree.h (have_extern_spec): Declare it 3108 * decl.c (have_extern_spec): Define it. 3109 (start_decl): Eliminate use of used_extern_spec. 3110 (start_function): Likewise. 3111 * parse.y (have_extern_spec): Remove declaration. 3112 (used_extern_spec): Likewise. 3113 (frob_specs): Eliminate use of used_extern_spec. 3114 (.hush_warning): Likewise. 3115 31162002-07-07 Mark Mitchell <mark@codesourcery.com> 3117 3118 * Make-lang.in (cp/parse.o): Depend on decl.h. 3119 * cp-tree.h (do_decl_instantiation): Change prototype. 3120 * parse.y: Include decl.h. 3121 (parse_decl_instantiation): New function. 3122 (explicit_instantiation): Use it. 3123 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR 3124 and DECLSPECS. 3125 31262002-07-07 Roger Sayle <roger@eyesopen.com> 3127 3128 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for 3129 constructor and destructor tests when passed a TEMPLATE_DECL. 3130 31312002-07-05 Jason Merrill <jason@redhat.com> 3132 3133 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null 3134 pointers. 3135 3136 PR optimization/7145 3137 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL. 3138 31392002-07-05 Nathan Sidwell <nathan@codesourcery.com> 3140 3141 Repair damage on weak-impared targets caused by my previous patch. 3142 * cp-tree.h (import_export_tinfo): Add parameter. 3143 * decl2.c (import_export_tinfo): Add parameter, post adjust 3144 DECL_COMDAT. 3145 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by 3146 import_export_tinfo. 3147 31482002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3149 3150 PR c++/6944 3151 * init.c (build_aggr_init): Remove qualifiers of init before calling 3152 build_vec_init. 3153 (build_vec_init): Flatten multi-dimensional array during cleanup. 3154 (build_vec_delete_1): Abort if the type of each element is array. 3155 31562002-07-03 Graham Stott <graham.stott@btinternet.com> 3157 3158 * pt.c (instantiate_class_template): Fix typo. 3159 31602002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3161 3162 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused 3163 by CVS conflict in my last patch. 3164 31652002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3166 3167 PR c++/6716 3168 * pt.c (can_complete_type_without_circularity): New function. 3169 (instantiate_class_template): Use it. 3170 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error 3171 message due to incomplete fields. 3172 31732002-07-01 Mark Mitchell <mark@codesourcery.com> 3174 3175 PR c++/7112 3176 * mangle.c (write_expression): Add mangling for sizeof when 3177 applied to a type. 3178 * operators.def: Remove stale comment. 3179 31802002-06-30 Nathan Sidwell <nathan@codesourcery.com> 3181 3182 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ... 3183 (CPTI_TYPE_INFO_PTR_TYPE): ... this. 3184 (tinfo_decl_type): Replace with ... 3185 (type_info_ptr_type): ... this. 3186 (import_export_tinfo): Declare. 3187 (tinfo_decl_p): Rename to ... 3188 (unemitted_tinfo_decl_p): ... this. 3189 * decl2.c (import_export_decl): Break out tinfo handling into ... 3190 (import_export_tinfo): ... here. New function. 3191 (finish_file): Adjust. 3192 * rtti.c (TINFO_REAL_NAME): New macro. 3193 (init_rtti_processing): Create the tinfo types. 3194 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr. 3195 (get_tinfo_decl): Adjust. 3196 (get_tinfo_ptr): New function. 3197 (get_type_id): Use it. 3198 (tinfo_base_init): Create vtable decl here, if it doesn't exist. 3199 (ptr_initializer): Use get_tinfo_ptr. 3200 (ptm_initializer): Likewise. 3201 (synthesize_tinfo_var): Break into ... 3202 (get_pseudo_ti_init): ... this. Just create the initializer. 3203 (get_pseudo_ti_desc): .. and this. 3204 (create_real_tinfo_var): Remove. 3205 (create_pseudo_type_info): Don't create the vtable decl here. 3206 (get_vmi_pseudo_type_info): Remove. 3207 (create_tinfo_types): Adjust. 3208 (tinfo_decl_p): Rename to ... 3209 (unemitted_tinfo_decl_p): ... here. Adjust. 3210 (emit_tinfo_decl): Adjust. Create the initializer. 3211 32122002-06-27 Mark Mitchell <mark@codesourcery.com> 3213 3214 PR c++/6695 3215 * pt.c (tsubst_friend_class): Substitute into the context of the 3216 friend before using it. 3217 32182002-06-26 Mark Mitchell <mark@codesourcery.com> 3219 3220 * cp-tree.h (xref_tag): Change prototype. 3221 (handle_class_head): Likewise. 3222 (build_x_component_ref): Likewise. 3223 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag. 3224 (xref_tag): Take attributes as a separate parameter. 3225 (xref_tag_from_type): Adjust call to xref_tag. 3226 * decl2.c (build_expr_from_tree): Adjust call to 3227 build_x_component_ref. 3228 (handle_class_head): Take attributes as a separate parameter. 3229 * parse.y (parse_xref_tag): New function. 3230 (parse_handle_class_head): Likewise. 3231 (primary): Use parse_xref_tag. 3232 (class_head_decl): Use parse_handle_class_head. 3233 (class_head_defn): Likewise. 3234 * rtti.c (init_rtti_processing): Adjust call to xref_tag. 3235 (build_dynamic_cast_1): Likewise. 3236 (create_pseudo_type_info): Likewise. 3237 (emit_support_tinfos): Likewise. 3238 * typeck.c (build_object_ref): Adjust call to 3239 build_x_component_ref. 3240 (build_x_component_ref): Remove protect parameter. 3241 32422002-06-25 Mark Mitchell <mark@codesourcery.com> 3243 3244 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS. 3245 * class.c (handle_using_decl): Likewise. 3246 (instantiate_type): Likewise. 3247 * cp-tree.h (BASELINK_FUNCTIONS): New macro. 3248 (xref_basetypes): Change prototype. 3249 (begin_mem_initializers): New function. 3250 (get_overloaded_fn): Likewise. 3251 * decl.c (xref_basetypes): Simplify. 3252 * error.c (dump_expr): Use BASELINK_FUNCTIONS. 3253 * init.c (build_offset_ref): Likewise. 3254 * parse.y (base_init): Use begin_mem_initializers(). 3255 (structsp): Adjust call to xref_basetypes. 3256 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS. 3257 (instantiate_class_template): Adjust call to xref_basetypes. 3258 * semantics.c (begin_mem_initializers): New function. 3259 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS. 3260 (really_overlaoded_fn): Likewise. 3261 (get_overloaded_fn): New function.' 3262 (get_first_fn): USe BASELINK_FUNCTIONS. 3263 32642002-06-24 Mark Mitchell <mark@codesourcery.com> 3265 3266 * cp-tree.h (SCALAR_TYPE_P): New macro. 3267 (check_for_out_of_scope_variable): New function. 3268 (at_class_scope_p): Likewise. 3269 (finish_fname): Likewise. 3270 * class.c (finish_struct): Use at_function_scope_p. 3271 * decl.c (check_for_out_of_scope_variable): New function, split 3272 out from do_identifier. 3273 (finish_enum): Use at_function_scope_p. 3274 * lex.c (do_identifier): Use check_for_out_of_scope_variable. 3275 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname. 3276 (primary): Use at_function_scope_p. 3277 * search.c (at_class_scope_p): New function. 3278 * semantics.c (finish_fname): Likewise. 3279 (check_multiple_declarators): Use at_function_scope_p. 3280 32812002-06-23 Mark Mitchell <mark@codesourcery.com> 3282 3283 * parse.y (parse_scoped_id): New function. 3284 (primary): Use it. 3285 * cp-tree.h (do_scoped_id): Adjust declaration. 3286 * lex.c (do_scoped_id): Remove call to yylex. 3287 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id. 3288 * typeck2.c (add_exception_specifier): Use tree_cons, rather than 3289 expanding it inline. 3290 32912002-06-23 Matt Thomas <matt@3am-software.com> 3292 3293 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to 3294 "#if VMS_TARGET". 3295 32962002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3297 3298 * mangle.c (integer_type_codes): Const-ify. 3299 33002002-06-20 Richard Henderson <rth@redhat.com> 3301 3302 PR c++/6747 3303 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early. 3304 Call put_var_into_stack. 3305 33062002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3307 3308 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit 3309 array size calculation. 3310 33112002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3312 3313 PR c++/6892 3314 * pt.c (tsubst_expr): Handle FILE_STMT. 3315 33162002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3317 3318 PR c++/6723 3319 * pt.c (lookup_template_class): Don't build complete argument of 3320 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template 3321 argument. 3322 33232002-06-19 Akim Demaille <akim@epita.fr> 3324 3325 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with 3326 decl.h's TYPENAME. 3327 * spew.c, lex.c: Adjust. 3328 * parse.y (explicit_instantiation): Add empty action to override 3329 the default $$ = $1 where it introduces a type clash. 3330 33312002-06-14 Jason Merrill <jason@redhat.com> 3332 3333 * semantics.c (begin_for_stmt): Push the 'for' scope before 3334 adding the FOR_STMT. 3335 3336 C++ ABI changes. 3337 * class.c (build_base_field): Set DECL_PACKED. 3338 (layout_class_type): Don't use tail padding of PODs. 3339 * mangle.c (write_unqualified_name): Fix template conversion op 3340 mangling. 3341 33422002-06-16 Richard Henderson <rth@redhat.com> 3343 3344 PR opt/6793 3345 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test 3346 after template instantiation. 3347 33482002-06-16 Richard Henderson <rth@redhat.com> 3349 3350 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common. 3351 33522002-06-15 Gabriel Dos Reis <gdr@codesourcery.com> 3353 3354 * cp-tree.h (compiler_error): Remove declaration. 3355 * lex.c (compiler_error): Remove definition. 3356 33572002-06-14 Steve Ellcey <sje@cup.hp.com> 3358 3359 * g++spec.c (LIBUNWIND): New. 3360 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set. 3361 33622002-06-13 Jessica Han <jessica@cup.hp.com> 3363 3364 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN. 3365 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE. 3366 (build_vbase_offset_vtbl_entries): Likewise. 3367 * rtti.c (build_headof): Likewise. 3368 (get_tinfo_decl_dynamic): Likewise. 3369 (create_pseudo_type_info): Likewise. 3370 33712002-06-12 Stan Shebs <shebs@apple.com> 3372 3373 * mpw-config.in: Remove file, no longer used. 3374 * mpw-make.sed: Ditto. 3375 33762002-06-07 Zack Weinberg <zack@codesourcery.com> 3377 3378 * decl2.c: Update call to cpp_handle_option. 3379 33802002-06-07 H.J. Lu (hjl@gnu.org) 3381 3382 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT. 3383 33842002-06-06 Gabriel Dos Reis <gdr@codesourcery.com> 3385 3386 * error.c (cp_error_at): Fix typo. 3387 33882002-06-04 Gabriel Dos Reis <gdr@codesourcery.com> 3389 3390 * error.c (cp_diagnostic_starter): Adjust call. 3391 (maybe_print_instantiation_context): Change prototype to take a 3392 'diagnostic_info *'. 3393 (print_instantiation_full_context): Likewise. 3394 (print_instantiation_partial_context): Likewise. 3395 (cp_diagnostic_starter): Likewise. 3396 (cp_diagnostic_finalizer): Likewise. 3397 (cp_print_error_function): Likewise. 3398 (cp_printer): Take a secondary parameter as a 'text_info *'. 3399 Remove output_state savings. Adjust calls. 3400 34012002-06-03 Geoffrey Keating <geoffk@redhat.com> 3402 3403 * pt.c (inline_parm_levels): Mark for GC. 3404 3405 * mangle.c (start_mangling): Allocate G.substitutions here... 3406 (init_mangle): ... rather than here. 3407 (finish_mangling): Clear the varray pointer when done with it. 3408 * spew.c (yylexstring): Don't use VARRAY_FREE. 3409 * search.c (bfs_walk): Don't use VARRAY_FREE. 3410 * decl2.c (pending_statics): Use gengtype to mark. 3411 (deferred_fns): Likewise. 3412 (ssdf_decls): Likewise. 3413 (init_decl2): Delete. 3414 * decl.c (pop_from_top_level): Don't use VARRAY_FREE. 3415 (cxx_init_decl_processing): Don't call init_decl2. 3416 (cxx_pop_function_context): Don't use VARRAY_FREE. 3417 * cp-tree.h (struct saved_scope): No need for special marking 3418 of varrays. 3419 (struct language_function): Likewise. 3420 (local_classes): Use gengtype to mark. 3421 (init_decl2): Delete prototype. 3422 * class.c (init_class_processing): Don't use 3423 ggc_add_tree_varray_root. 3424 (build_vtbl_initializer): Don't use VARRAY_FREE. 3425 3426 * decl.c (typename_compare): Don't use same_type_p. 3427 3428 * decl.c: Include hashtab.h instead of hash.h. 3429 (typename_hash): Update to use htab_h. 3430 (typename_compare): Likewise. 3431 (typename_htab): Use gengtype to mark. 3432 (build_typename_type): Update to use htab_h. 3433 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h. 3434 3435 * Make-lang.in (gt-cp-tree.h): New rule. 3436 (cp/tree.o): Depend on gt-cp-tree.h. 3437 * config-lang.in (gtfiles): Add cp/tree.c. 3438 * tree.c: Include gt-cp-tree.h. 3439 (list_hash_table): Use gengtype to mark. 3440 (init_tree): Use gengtype to mark trees. 3441 3442 * Make-lang.in (cp/decl.o): Add debug.h dependency. 3443 * call.c (struct z_candidate): Use gengtype. 3444 (USER_CONV_CAND): Use WRAPPER_ZC. 3445 (convert_class_to_reference): Use build_zc_wrapper. 3446 (build_type_conversion_1): Likewise. 3447 (build_over_call): Use WRAPPER_ZC. 3448 (add_warning): Use build_zc_wrapper. 3449 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete. 3450 * cp-tree.h (struct lang_identifier): Use gengtype. 3451 (struct template_parm_index_s): Likewise. 3452 (struct ptrmem_cst): Likewise. 3453 (struct tree_binding): Likewise. 3454 (struct tree_overload): Likewise. 3455 (struct tree_srcloc): Likewise. 3456 (struct tree_wrapper): Likewise. Also modify to have a pointer 3457 to struct z_candidate rather than void. 3458 (enum cp_tree_node_structure_enum): New. 3459 (union lang_tree_node): New. 3460 (cxx_mark_tree): Delete prototype. 3461 (cp_tree_node_structure): New prototype. 3462 (build_ptr_wrapper): Delete prototype. 3463 (build_int_wrapper): Delete prototype. 3464 (build_zc_wrapper): New prototype. 3465 * decl.c: Include debug.h 3466 (cxx_mark_tree): Delete. 3467 (cp_tree_node_structure): New. 3468 * tree.c (build_ptr_wrapper): Delete. 3469 (build_int_wrapper): Delete. 3470 (build_zc_wrapper): New. 3471 3472 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK): 3473 Correct typo. Patch from k_fukui@highway.ne.jp. 3474 3475 * semantics.c (current_stmt_tree): Update for change to 3476 struct language_function. 3477 (finish_mem_initializers): Likewise. 3478 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status. 3479 * cp-tree.h (struct language_function): Rename from 3480 cp_language_function. Change all uses. 3481 (cp_function_chain): Don't need to cast. 3482 3483 * class.c (duplicate_tag_error): Reset discriminator. 3484 (check_bases_and_members): Update for data structure changes. 3485 * cp-tree.h (struct lang_id2): Use gengtype. 3486 (flagged_type_tree): Likewise. 3487 (SET_LANG_ID): Use GGC on struct lang_id2. 3488 (struct cp_language_function): Use gengtype. Remove field 3489 'x_vcalls_possible_p'. 3490 (current_vcalls_possible_p): Delete. 3491 (struct lang_type_header): New. 3492 (struct lang_type_class): Rename from struct lang_type. Include 3493 struct lang_type_header. 3494 (struct lang_type_ptrmem): New. 3495 (struct lang_type): New. 3496 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros. 3497 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros. 3498 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes. 3499 (struct lang_decl_flags): Use gengtype. Add discriminators. 3500 (struct lang_decl): Use gengtype. Add and use discriminators. 3501 Update the macros that reference moved fields. 3502 (LANG_DECL_U2_CHECK): New function. Use it when appropriate. 3503 (SET_DECL_THUNK_P): Set discriminator too. 3504 (clear_inline_text_obstack): Delete prototype. 3505 (finish_inline_definitions): Delete prototype. 3506 (mark_pending_inlines): Delete prototype. 3507 (lang_check_failed): New prototype. 3508 * decl.c (struct named_label_use_list): Use gengtype. 3509 (struct named_label_list): Likewise. 3510 (mark_binding_level): Delete. 3511 (mark_named_label_lists): Delete. 3512 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC. 3513 (cxx_init_decl_processing): Use generated marker routine. 3514 (begin_destructor_body): Delete dead set to 3515 current_vcalls_possible_p. 3516 (mark_lang_function): Delete. 3517 (mark_cp_function_context): Delete. 3518 (lang_mark_tree): Use generated marker routines. 3519 * decl2.c (start_objects): Set discriminator when setting 3520 GLOBAL_INIT_PRIORITY. 3521 * lex.c (retrofit_lang_decl): Set discriminators. 3522 (copy_lang_type): Update for changes to lang_type structure. 3523 (cp_make_lang_type): Set discriminator. 3524 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers. 3525 * search.c: Include ggc.h. 3526 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it. 3527 (finish_inline_definitions): Delete. 3528 * spew.c (struct token): Use gengtype. 3529 (struct token_chunk): New. 3530 (struct unparsed_text): Use gengtype. Store tokens in chunks. 3531 (struct feed): Use gengtype. 3532 (feed_obstack): Delete. 3533 (feed): Mark as GC root. 3534 (pending_inlines): Mark as GC root. 3535 (pending_inlines_tail): Likewise. 3536 (processing_these_inlines): Likewise. 3537 (token_obstack): Make static. 3538 (first_token): Likewise. 3539 (init_spew): Don't initialize deleted things; use gengtype for roots. 3540 (clear_inline_text_obstack): Delete. 3541 (feed_input): Use GC for struct feed. Update for changes to 3542 struct unparsed_text. 3543 (mark_pending_inlines): Delete. 3544 (next_token): Rename from add_token. Change all callers. Update 3545 for changes to struct unparsed_text. 3546 (space_for_token): New. 3547 (remove_last_token): New. 3548 (alloc_unparsed_text): New. 3549 (snarf_block): Take an unparsed_text. Update for changes to struct 3550 unparsed_text. 3551 (snarf_method): Update for changes to struct unparsed_text. 3552 (snarf_defarg): Update for changes to struct unparsed_text. 3553 * tree.c (lang_check_failed): New. 3554 3555 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h 3556 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules. 3557 (cp/spew.o): Add dependency on gt-<filename>.h. 3558 (cp/decl2.o): Add dependency on gt-<filename>.h. 3559 (cp/call.o): Add dependency on gt-<filename>.h. 3560 (cp/pt.o): Add dependency on gt-<filename>.h. 3561 (cp/repo.o): Add dependency on gt-<filename>.h. 3562 (cp/parse.o): Add dependency on gt-<filename>.h. 3563 * call.c: Use gengtype for roots. 3564 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c 3565 decl2.c parse.y pt.c repo.c spew.c. 3566 * cp-tree.h: Use gengtype for roots. 3567 (struct saved_scope): Use GGC, gengtype. 3568 (cp_parse_init): Delete prototype. 3569 (init_pt): Delete prototype. 3570 * decl.c: Use gengtype for roots. 3571 (mark_saved_scope): Delete. 3572 (cxx_init_decl_processing): Don't call deleted initilisation 3573 routines. 3574 (signed_size_zero_node): Delete, unused. 3575 * decl.h: Use gengtype for roots. 3576 * decl2.c: Use gengtype for roots. 3577 * lex.h: Use gengtype for roots. 3578 * parse.y: Use gengtype for roots. 3579 (cp_parse_init): Delete. 3580 * pt.c: Use gengtype for roots. 3581 (init_pt): Delete. 3582 * repo.c: Use gengtype for roots. 3583 * spew.c: Use gengtype for roots. 3584 3585 * Make-lang.in: Allow for filename changes. Add gtype-cp.h. 3586 (cp/decl.o): Add dependency on gtype-cp.h. 3587 * decl.c: Remove use of add_deletable_root, use GTY marker instead. 3588 Include gtype-cp.h. Allow for filename changes. 3589 3590 * Make-lang.in (cp/gt-decl.h): Generate using gengtype. 3591 (cp/decl.o): Add cp/gt-decl.h dependency. 3592 * config-lang.in (gtfiles): New. 3593 * tree.h: Rename struct binding_level to struct cp_binding_level. 3594 * decl.c: Rename struct binding_level to struct cp_binding_level. 3595 Include cp/gt-decl.h. 3596 (struct cp_binding_level): Use gengtype. 3597 (make_binding_level): Use GGC on struct cp_binding_level. 3598 (mark_binding_level): Use gt_ggc_m_cp_binding_level. 3599 (cxx_init_decl_processing): Mark free_binding_level as 3600 deletable. 3601 3602 * decl.c (mark_cp_function_context): Update calling sequence. 3603 3604 * decl.c (start_function): Don't free 'struct 3605 cp_language_function'. 3606 (pop_cp_function_context): Likewise. 3607 (save_function_data): Allocate it using GC. 3608 * semantics.c (genrtl_start_function): Don't free 'struct 3609 cp_language_function'. 3610 36112002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk> 3612 3613 * lang-specs.h: Use cpp_debug_options. 3614 36152002-05-28 Zack Weinberg <zack@codesourcery.com> 3616 3617 * mangle.c, tree.c: Include real.h. 3618 * Make-lang.in: Update dependency lists. 3619 36202002-05-25 Neil Booth <neil@daikokuya.demon.co.uk> 3621 3622 * lex.c: Don't include c-lex.h. 3623 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h. 3624 36252002-05-23 Neil Booth <neil@daikokuya.demon.co.uk> 3626 3627 * spew.c (yyungetc, snarf_block): Remove indent_level handling. 3628 36292002-05-22 Richard Henderson <rth@redhat.com> 3630 3631 * decl.c (obscure_complex_init): Check for VAR_DECL 3632 before using DECL_THREAD_LOCAL. 3633 36342002-05-22 Richard Henderson <rth@redhat.com> 3635 3636 * decl.c (check_tag_decl): Handle RID_THREAD. 3637 (obscure_complex_init): Reject run-time init of tls. 3638 (grokvardecl, grokdeclarator): Handle RID_THREAD. 3639 * lex.c (reswords): Add __thread. 3640 (rid_to_yy): Map RID_THREAD to SCSPEC. 3641 36422002-05-22 Neil Booth <neil@daikokuya.demon.co.uk> 3643 3644 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. 3645 * cp-tree.h (cxx_post_options): Kill. 3646 * cp-lex.c (cxx_post_options): Kill. 3647 36482002-05-21 Richard Henderson <rth@redhat.com> 3649 3650 * lex.c (rid_to_yy): Add RID_THREAD. 3651 36522002-05-21 Alexandre Oliva <aoliva@redhat.com> 3653 3654 * init.c (build_vec_init): Test for trivial copy-assignment when 3655 copy-assigning arrays. 3656 36572002-05-20 Andreas Jaeger <aj@suse.de> 3658 3659 * init.c (build_default_init): Remove unused variable. 3660 36612002-05-20 Alexandre Oliva <aoliva@redhat.com> 3662 3663 * call.c (any_strictly_viable): New. 3664 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs. 3665 36662002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3667 3668 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing. 3669 36702002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3671 3672 PR c++/186, DR 259 3673 * pt.c (do_decl_instantiation): Don't complain explicit 3674 instantiation after explicit specialization. 3675 (do_type_instantiation): Likewise. 3676 36772002-05-19 Alexandre Oliva <aoliva@redhat.com> 3678 3679 * cp-tree.h (complete_type_or_diagnostic): Changed prototype, 3680 renamed from... 3681 (complete_type_or_else): ... this. Redefined as macro. 3682 (cxx_incomplete_type_diagnostic): Declare. 3683 (cxx_incomplete_type_error): Define as macro. 3684 * init.c (build_delete): Warn about incomplete types other than 3685 void, and use the built-in operator delete for them. 3686 * typeck.c (complete_type_or_diagnostic): Renamed from 3687 complete_type_or_else. Added warn_only argument, passed to... 3688 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print 3689 warnings or errors depending on new warn_only argument. Renamed 3690 from... 3691 (cxx_incomplete_type_error): ... this. New implementation in 3692 terms of cxx_incomplete_type_diagnostic. 3693 36942002-05-18 Jason Merrill <jason@redhat.com> 3695 3696 PR c++/6611 3697 * decl2.c (import_export_decl): If we clear 3698 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set. 3699 37002002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3701 3702 PR c++/6620 3703 * pt.c (verify_class_unification): Don't check if PARM is template 3704 parameter dependent. Simplify. 3705 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template 3706 parameter dependent expression. 3707 37082002-05-14 Jason Merrill <jason@redhat.com> 3709 3710 * rtti.c (get_tinfo_decl): Don't call comdat_linkage. 3711 Do set DECL_COMDAT. 3712 (synthesize_tinfo_var): Take the public decl. 3713 (create_real_tinfo_var): Likewise. Check DECL_COMDAT. 3714 (emit_tinfo_decl): Adjust. Call import_export_decl. 3715 * decl2.c (import_export_decl): Simplify tinfo decl handling. 3716 37172002-05-14 Alexandre Oliva <aoliva@redhat.com> 3718 3719 * cp-tree.h (struct lang_type): Added non_zero_init. 3720 (CLASSTYPE_NON_ZERO_INIT_P): New macro. 3721 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare. 3722 * class.c (check_field_decls): Test non_zero_init. 3723 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for 3724 zero-to-NULL conversions. 3725 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a 3726 type that needs zero-initialization without zeros. 3727 (check_initializer_decl): Compute zero-initializer for types 3728 that require a non-trivial one. 3729 * init.c (build_forced_zero_init): New function. 3730 (build_default_init): Use it. 3731 * tree.c (zero_init_p): New function. 3732 * typeck2.c (force_store_init_value): New function. 3733 (process_init_constructor): Create non-trivial zero-initializers 3734 for array members and class fields. 3735 37362002-05-14 Neil Booth <neil@daikokuya.demon.co.uk> 3737 3738 * lang-specs.h: Remove redundant -lang-c++. 3739 37402002-05-13 Jason Merrill <jason@redhat.com> 3741 3742 * class.c (build_vtbl_ref_1): Use fixed_type_or_null. 3743 (fixed_type_or_null): See through reference vars. 3744 (build_base_path): Vtable contents are constant. 3745 * typeck.c (get_member_function_from_ptrfunc): Likewise. 3746 37472002-05-12 Jason Merrill <jason@redhat.com> 3748 3749 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created 3750 structs are safe. 3751 37522002-05-09 Neil Booth <neil@daikokuya.demon.co.uk> 3753 3754 * cp-tree.h (flag_ansi): Remove. 3755 * decl2.c (flag_ansi): Remove. 3756 (cxx_decode_option): Set flag_iso and flag_undef. 3757 37582002-05-09 Jason Merrill <jason@redhat.com> 3759 3760 * typeck.c (get_member_function_from_ptrfunc): Reorganize. 3761 Use subtraction rather than a bitmask to get the index. 3762 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node. 3763 3764 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P. 3765 37662002-05-07 Neil Booth <neil@daikokuya.demon.co.uk> 3767 3768 * Make-lang.in (decl2.o): Update. 3769 * cp-tree.h (warn_multichar): Remove. 3770 * decl2.c: Include c-common.h. 3771 (warn_multichar): Remove. 3772 37732002-05-03 Jason Merrill <jason@redhat.com> 3774 3775 * tree.c (build_cplus_array_type): Only const and volatile get 3776 special handling. 3777 3778 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h. 3779 37802002-04-30 Mark Mitchell <mark@codesourcery.com> 3781 3782 ABI change, returning simple classes from functions. 3783 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if 3784 TYPE_HAS_TRIVIAL_INIT_REF is false or 3785 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true. 3786 37872002-04-30 Jason Merrill <jason@redhat.com> 3788 3789 PR debug/6436 3790 * decl.c (grokdeclarator): Don't override TYPE_NAME of an 3791 anonymous class with a typedef if there are attributes. 3792 37932002-04-29 Paul Eggert <eggert@twinsun.com> 3794 3795 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$. 3796 37972002-04-29 Jakub Jelinek <jakub@redhat.com> 3798 3799 PR c++/6477 3800 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is 3801 non-NULL first. 3802 38032002-04-29 Mark Mitchell <mark@codesourcery.com> 3804 3805 PR c++/6492 3806 * pt.c (tsubst_friend_class): If the friend has an explicit scope, 3807 enter that scope before name lookup. 3808 3809 PR c++/6486 3810 * method.c (do_build_copy_constructor): Avoid building 3811 cv-qualified reference types. 3812 38132002-04-29 Nathan Sidwell <nathan@codesourcery.com> 3814 3815 PR c++/5719 3816 * decl.c (grok_op_properties): Assignment ops don't have to return 3817 by value. operator% should. 3818 38192002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> 3820 3821 PR c/6343 3822 * decl.c (duplicate_decls): Call merge_weak. 3823 38242002-04-26 Richard Henderson <rth@redhat.com> 3825 3826 * parse.y (malloced_yyss, malloced_yyvs): New. 3827 (yyoverflow): Re-add. Set them. 3828 (free_parser_stacks): New. 3829 38302002-04-26 Mark Mitchell <mark@codesourcery.com> 3831 3832 PR c++/6497 3833 * method.c (do_build_assign_ref): Pass a derivation to 3834 build_method_call when calling base class assignment operators. 3835 38362002-04-26 Richard Henderson <rth@redhat.com> 3837 3838 * parse.y (yyoverflow): Revert. 3839 38402002-04-26 Richard Henderson <rth@redhat.com> 3841 3842 PR c/3581 3843 * parse.y (string): Remove. Update all uses to use STRING 3844 instead, and not call combine_strings. 3845 * rtti.c (tinfo_name): Use fix_string_type. 3846 * semantics.c (finish_asm_stmt): Don't call combine_strings. 3847 * spew.c (yylexstring): New. 3848 (read_token): Use it. 3849 38502002-04-25 Richard Henderson <rth@redhat.com> 3851 3852 PR c/2161 3853 * parse.y (yyoverflow): New. 3854 38552002-04-25 Jason Merrill <jason@redhat.com> 3856 3857 PR c++/5607 3858 * search.c (check_final_overrider): No longer static. 3859 * class.c (update_vtable_entry_for_fn): Call it. 3860 * cp-tree.h: Adjust. 3861 38622002-04-25 Neil Booth <neil@daikokuya.demon.co.uk> 3863 3864 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. 3865 * cp-tree.h (cxx_set_yydebug): Die. 3866 * lex.c (YYDEBUG): Get from c-lex.h. 3867 (cxx_set_yydebug): Remove. 3868 * parse.y: Include c-lex.h. 3869 (YYDEBUG): Get from c-lex.h. 3870 38712002-04-24 Mark Mitchell <mark@codesourcery.com> 3872 3873 PR c++/6438. 3874 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs 3875 void. 3876 38772002-04-24 Neil Booth <neil@daikokuya.demon.co.uk> 3878 3879 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, 3880 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE): 3881 Redefine. 3882 * cp-tree.h (cp_attribute_table): Rename. 3883 * decl.c (lang_attribute_table): Remove declaration. 3884 (cxx_init_decl_processing): Don't set it. 3885 * tree.c (cp_attribute_table): Rename. 3886 38872002-04-24 Jason Merrill <jason@redhat.com> 3888 3889 PR c++/6331 3890 * method.c (do_build_copy_constructor): Use cp_build_qualified_type. 3891 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals. 3892 The pedwarn for array assignment is now unconditional. 3893 * tree.c (build_cplus_array_type_1): Still process simple array types 3894 normally in templates. 3895 3896 PR c++/6395 3897 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i 3898 stuff for comdats. 3899 39002002-04-23 Jakub Jelinek <jakub@redhat.com> 3901 3902 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class 3903 node with attributes. 3904 39052002-2-23 David O'Brien <obrien@FreeBSD.org> 3906 3907 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add. 3908 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given. 3909 39102002-04-23 Mark Mitchell <mark@codesourcery.com> 3911 3912 PR c++/6256: 3913 * pt.c (tsubst_friend_class): Handle templates with explicit 3914 nested names. 3915 3916 PR c++/6331: 3917 * typeck.c (merge_types): Remember the cv-qualification of pointer 3918 types when merging them. 3919 39202002-04-20 Neil Booth <neil@daikokuya.demon.co.uk> 3921 3922 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT, 3923 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine. 3924 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context, 3925 cxx_mark_function_context): New. 3926 * decl.c (push_cp_function_context, pop_cp_function_context, 3927 mark_cp_function_context): Rename for consistency. 3928 (cxx_init_decl_processing): Don't set old hooks. 3929 39302002-04-19 Neil Booth <neil@daikokuya.demon.co.uk> 3931 3932 * call.c (convert_type_from_ellipsis): Rename, update. 3933 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine. 3934 * cp-tree.h (convert_type_from_ellipsis): Rename. 3935 * decl.c (cxx_init_decl_processing): Don't set hook. 3936 39372002-04-18 Neil Booth <neil@daikokuya.demon.co.uk> 3938 3939 * call.c (build_new_method_call): Update. 3940 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine. 3941 * cp-tree.h (cxx_incomplete_type_error): New. 3942 * decl.c (grokdeclarator, grokparms): Update. 3943 * decl2.c (check_classfn): Update. 3944 * pt.c (tsubst): Update. 3945 * typeck.c (complete_type_or_else, expr_sizeof, 3946 decay_conversion): Update. 3947 * typeck2.c (incomplete_type_error): Rename. 3948 (add_exception_specifier): Update. 3949 39502002-04-18 Jason Merrill <jason@redhat.com> 3951 3952 PR c++/5658 3953 * search.c (setup_class_bindings): A class template qualifies as a 3954 type binding. 3955 39562002-04-17 Jakub Jelinek <jakub@redhat.com> 3957 3958 PR c++/6316 3959 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop 3960 before expanding. 3961 39622002-04-16 Mark Mitchell <mark@codesourcery.com> 3963 3964 * init.c (begin_init_stmts): Remove commented out code. 3965 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE. 3966 * semantics.c (begin_gobal_stmt_expr): Adjust call to 3967 expand_start_stmt_expr. 3968 39692002-04-15 Mark Mitchell <mark@codesourcery.com> 3970 3971 * decl.c (register_dtor_fn): Pass the address of dso_handle, not 3972 dso_handle itself, to __cxa_atexit. 3973 39742002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 3975 3976 * error.c (cxx_print_error_function): Adjust call to macros. 3977 39782002-04-14 Jakub Jelinek <jakub@redhat.com> 3979 3980 * class.c (layout_virtual_bases): Do all dsize computation on trees. 3981 39822002-04-14 Jason Merrill <jason@redhat.com> 3983 3984 * typeck.c (get_member_function_from_ptrfunc): Don't do 3985 gratuitious division and multiplication on 3986 ptrmemfunc_vbit_in_delta targets. 3987 39882002-04-12 Mark Mitchell <mark@codesourcery.com> 3989 3990 PR c++/5373. 3991 * semantics.c (finish_expr_stmt): Remember the type of the 3992 expression before any conversions are performed. 3993 39942002-04-12 Mark Mitchell <mark@codesourcery.com> 3995 3996 PR c++/5189. 3997 * call.c (add_template_candidate_real): Do not treat member 3998 templates as copy constructors. 3999 40002002-04-12 Mark Mitchell <mark@codesourcery.com> 4001 4002 * decl.c (duplicate_decls): Do not copy the RTL for a variable 4003 declaration if the old variable had an incomplete type and the new 4004 variable does not. 4005 (complete_vars): Do not call layout_decl for completed variables. 4006 40072002-04-12 Richard Sandiford <rsandifo@redhat.com> 4008 4009 * decl.c (duplicate_decls): Don't try to unify an implicit typedef 4010 with an explicit one. 4011 (follow_tag_typedef): New. 4012 (lookup_tag): Use it to extract the tag of an explicit typedef. 4013 (xref_tag): Likewise. 4014 40152002-04-11 Andrew Haley <aph@redhat.com> 4016 4017 * typeck.c (type_after_usual_arithmetic_conversions): 4018 If two types have the same variant, return immediately. 4019 When two floating-point operands are the same precision: 4020 convert to float if one of the operands is float; 4021 if neither operand is one of the standard types, return the type 4022 of the first operand. 4023 40242002-04-10 Nathan Sidwell <nathan@codesourcery.com> 4025 4026 PR c++/5507 4027 * decl.c (make_typename_type): Remove implicit typenameness. 4028 40292002-04-09 Jason Merrill <jason@redhat.com> 4030 4031 PR optimization/6189 4032 * semantics.c (genrtl_start_function): Don't free 4033 DECL_SAVED_FUNCTION_DATA for inline functions. 4034 4035 * init.c (build_member_call): For now, don't convert to 4036 intermediate base if it would cause an error. 4037 40382002-04-08 Paolo Carlini <pcarlini@unitus.it> 4039 4040 * parse.y (namespace_qualifier, maybe_identifier, 4041 begin_explicit_instantiation, end_explicit_instantiation, 4042 apparent_template_type, .finish_template_type, 4043 do_id, maybe_init, defarg_again, component_decl_1): 4044 Add ending ';', in accordance with POSIX. 4045 40462002-04-06 Mark Mitchell <mark@codesourcery.com> 4047 4048 PR c++/5571 4049 * class.c (layout_class_type): Remember incomplete static 4050 variables. 4051 (finish_struct_1): Call complete_vars, not 4052 hack_incomplete_structures. 4053 * cp-tree.h (hack_incomplete_structures): Rename to ... 4054 (complete_vars): ... this. 4055 (struct saved_scope): Remove incomplete. 4056 (namespace_scope_incomplete): Remove. 4057 * decl.c (struct binding_level): Remove incomplete. 4058 (incomplete_vars): New variable. 4059 (mark_binding_level): Don't mark incomplete. 4060 (print_binding_level): Don't print it. 4061 (mark_saved_scope): Don't mark incomplete. 4062 (pushdecl): Use maybe_register_incopmlete_var. 4063 (cxx_init_decl_processing): Register incomplete_vars for GC. 4064 (start_decl_1): Clarify error message. 4065 (hack_incomplete_vars): Remove. 4066 (maybe_register_incomplete_var): New function. 4067 (complete_vars): Likewise. 4068 40692002-04-06 Jason Merrill <jason@redhat.com> 4070 4071 PR c++/4934 4072 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is 4073 set before checking it. 4074 4075 PR c++/525 4076 * init.c (build_member_call): Use build_scoped_ref. 4077 (resolve_offset_ref): Likewise. 4078 * call.c (build_scoped_method_call): Likewise. 4079 * tree.c (maybe_dummy_object): Kludge around current_class_type being 4080 wrong. 4081 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm. 4082 * cp-tree.h: Adjust. 4083 4084 * init.c (push_base_cleanups): Just use build_scoped_method_call. 4085 4086 PR c++/6179 4087 * method.c (implicitly_declare_fn): Pass unqualified type to 4088 synthesize_exception_spec. 4089 40902002-04-04 Neil Booth <neil@daikokuya.demon.co.uk> 4091 4092 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. 4093 * cvt.c: Update comment. 4094 * init.c (expand_cleanup_for_base): Update. 4095 * semantics.c (finish_parenthesized_expr): Update. 4096 * typeck.c (cp_truthvalue_conversion): Update. 4097 40982002-04-04 Jason Merrill <jason@redhat.com> 4099 4100 * semantics.c (finish_eh_cleanup): New fn. 4101 * cp-tree.h: Add prototype. 4102 * init.c (perform_member_init, expand_cleanup_for_base): Use 4103 finish_eh_cleanup. 4104 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove. 4105 * cp-tree.h: Remove references. 4106 * decl.c (begin_constructor_body, end_constructor_body): Likewise. 4107 * dump.c (cp_dump_tree): Likewise. 4108 * pt.c (tsubst_expr): Likewise. 4109 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove. 4110 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT. 4111 * tree.c (cp_statement_code_p): Likewise. 4112 4113 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup. 4114 4115 PR c++/5636 4116 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on 4117 cleanup for nrv. 4118 4119 PR c++/5104 4120 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception 4121 specifiers. 4122 [METHOD_TYPE]: Use same code as FUNCTION_TYPE. 4123 41242002-04-03 Richard Henderson <rth@redhat.com> 4125 4126 * cp-lang.c (cxx_warn_unused_global_decl): New. 4127 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. 4128 41292002-04-03 Neil Booth <neil@daikokuya.demon.co.uk> 4130 4131 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine. 4132 * tree.c (init_tree): Don't set hook. 4133 41342002-04-03 Roger Sayle <roger@eyesopen.com> 4135 4136 PR c++/5998: 4137 * decl.c (duplicate_decls): Don't mess with assembler names when 4138 redeclaring builtin functions as static. 4139 41402002-04-01 Neil Booth <neil@daikokuya.demon.co.uk> 4141 4142 * call.c (build_addr_func): Update. 4143 * class.c (resolve_address_of_overloaded_function): Update. 4144 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. 4145 * cp-tree.h (cxx_mark_addressable): New. 4146 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update. 4147 * decl2.c (build_cleanup): Update. 4148 * except.c (build_throw): Update. 4149 * init.c (resolve_offset_ref): Update. 4150 * pt.c (convert_nontype_argument): Update. 4151 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update. 4152 * typeck.c (decay_conversion, build_array_ref, build_unary_op, 4153 unary_complex_lvalue): Update. 4154 (mark_addressable): Rename. 4155 41562002-04-01 Roger Sayle <roger@eyesopen.com> 4157 4158 PR c++/5998: 4159 * decl.c (duplicate_decls): Overwrite the RTL when (and only 4160 when) overwriting a built-in function. Don't use COPY_DECL_RTL, 4161 but follow the SET_DECL_RTL idiom used elsewhere in the function. 4162 41632002-04-01 Neil Booth <neil@daikokuya.demon.co.uk> 4164 4165 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, 4166 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. 4167 * decl.c (grokdeclarator): Update. 4168 * mangle.c (write_integer_cst): Update. 4169 * typeck.c (build_binary_op): Update. 4170 41712002-03-31 Neil Booth <neil@daikokuya.demon.co.uk> 4172 4173 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine. 4174 * lex.c (cxx_init): Don't set hook. 4175 41762002-03-31 Neil Booth <neil@daikokuya.demon.co.uk> 4177 4178 * Make-lang.in (error.o): Update. 4179 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. 4180 * cp-tree.h (struct diagnostic_context): Predeclare. 4181 (cxx_print_error_function): New. 4182 * error.c: Include langhooks-def.h. 4183 (lang_print_error_function): Rename. Update. 4184 (init_error): Don't set hook. 4185 41862002-03-29 Neil Booth <neil@daikokuya.demon.co.uk> 4187 4188 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): 4189 Redefine. 4190 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks. 4191 * decl.c (finish_enum): Similarly. 4192 * error.c (dump_type): Similarly. 4193 * lex.c (cxx_init): Similarly. 4194 * mangle.c (write_builtin_type): Similarly. 4195 * typeck.c (comptypes): Similarly. 4196 41972002-03-28 Roger Sayle <roger@eyesopen.com> 4198 4199 PR c++/5998: 4200 * decl.c (cxx_init_decl_processing): Re-enable built-in functions 4201 in the g++ front-end. 4202 (duplicate_decl): Allow redefinition of anticipated built-ins. 4203 Fix inlining problem by over-writing the old DECL_RTL. 4204 (lookup_namespace_name): Fail to find an identifier in the 4205 specified namespace if its still anticipated. 4206 (builtin_function_1): New function split out from builtin_function 4207 to create a builtin in the current namespace with given context. 4208 (builtin_function): Call builtin_function_1 to define the 4209 appropriate builtins in both the std and global namespaces. 4210 (select_decl): Don't test for anticipated decls here. 4211 (unqualified_namespace_lookup): Instead ignore them whilst 4212 searching through scopes and namespaces. 4213 * decl2.c (do_nonmember_using_decl): If a using declaration 4214 specifies an anticipated built-in function, mark it as no longer 4215 anticipated in that scope. 4216 (ambiguous_decl): Avoid resolving to an anticipated decl. 4217 * lex.c (do_scoped_id): Fail to find an identifier in the global 4218 namespace if its still anticipated. 4219 42202002-03-29 Neil Booth <neil@daikokuya.demon.co.uk> 4221 4222 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine. 4223 * cp-tree.h (cp_make_lang_type): Rename. 4224 * lex.c (cp_make_lang_type): Rename. 4225 (make_aggr_type): Update. 4226 * tree.c (init_tree): Don't set make_lang_type_fn. 4227 42282002-03-29 Jakub Jelinek <jakub@redhat.com> 4229 4230 PR c++/6073 4231 * class.c (finish_struct_1): Update static field's DECL_MODE even 4232 if its type is a variant of t. 4233 42342002-03-27 Neil Booth <neil@daikokuya.demon.co.uk> 4235 4236 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine. 4237 * cp-tree.h (cxx_insert_default_attributes): New. 4238 * decl.c (insert_default_attributes): Rename. 4239 42402002-03-27 Mark Mitchell <mark@codesourcery.com> 4241 4242 PR c++/4884 4243 * call.c (build_op_delete_call): Allow for the fact the placement 4244 may be a COMPOUND_EXPR. 4245 42462002-03-27 Neil Booth <neil@daikokuya.demon.co.uk> 4247 4248 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. 4249 * cp-tree.h (init_cplus_expand): Remove. 4250 (cxx_expand_expr): New. 4251 * expr.c (cplus_expand_expr): Rename cxx_expand_expr, 4252 fix prototype. 4253 (init_cplus_expand): Remove. 4254 * lex.c (cxx_init): Don't call init_cplus_expand. 4255 42562002-03-26 Mark Mitchell <mark@codesourcery.com> 4257 4258 PR c++/4884. 4259 * init.c (build_new_1): Allow for the fact the result of 4260 build_function_call may be a COMPOUND_EXPR. 4261 42622002-03-26 Nathan Sidwell <nathan@codesourcery.com> 4263 4264 PR c++/5682 4265 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better. 4266 (dfs_skip_nonprimary_vbases_unmarkedp): Remove. 4267 (dfs_skip_nonprimary_vbases_markedp): Remove. 4268 * search.c (get_shared_vbase_if_not_primary): Remove. 4269 (dfs_skip_nonprimary_vbases_unmarkedp): Remove. 4270 (dfs_skip_nonprimary_vbases_markedp): Remove. 4271 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo. 4272 (dfs_marked_real_bases_queue_p): Likewise. 4273 42742002-03-26 Neil Booth <neil@daikokuya.demon.co.uk> 4275 4276 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine. 4277 * cp-tree.h (cxx_mark_tree): New. 4278 * decl.c (lang_mark_tree): Rename cxx_mark_tree. 4279 42802002-03-25 Neil Booth <neil@daikokuya.demon.co.uk> 4281 4282 * cp-tree.h (cxx_maybe_build_cleanup): New. 4283 * decl.c (destroy_local_var, hack_incomplete_structures): Update. 4284 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup. 4285 * tree.c (build_target_expr): Update. 4286 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine. 4287 42882002-03-24 Neil Booth <neil@daikokuya.demon.co.uk> 4289 4290 * decl2.c (cxx_decode_option): Handle -E. 4291 * lang-specs.h (default_compilers): Preprocess with cc1plus. 4292 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL. 4293 42942002-03-23 Jakub Jelinek <jakub@redhat.com> 4295 4296 PR c++/6037 4297 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node. 4298 42992002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 4300 4301 * error.c (dump_type): Be careful about implicit typenames. 4302 43032002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 4304 4305 PR C++/3656 4306 * semantics.c (finish_base_specifier): Handle erronous base 4307 classes. 4308 43092002-03-22 Zack Weinberg <zack@codesourcery.com> 4310 4311 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test 4312 REAL_IS_NOT_DOUBLE. 4313 43142002-03-22 Jeff Knaggs <jknaggs@redhat.com> 4315 4316 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to 4317 an index into the vtable_entry array regardless of 4318 TARGET_PTRMEMFUNC_VBIT_LOCATION. 4319 43202002-03-21 Aldy Hernandez <aldyh@redhat.com> 4321 4322 * tree.c (cp_cannot_inline_tree_fn): Same. 4323 43242002-03-21 Neil Booth <neil@daikokuya.demon.co.uk> 4325 4326 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, 4327 insert_block, getdecls, global_bindings_p): New. 4328 43292002-03-20 Nathan Sidwell <nathan@codesourcery.com> 4330 4331 PR c++/4361 4332 * mangle.c (struct globals) Add internal_mangling_p member. 4333 (write_template_param): Do internal mangling, if needed. 4334 (mangle_conv_op_name_for_type): Request internal mangling. 4335 43362002-03-20 Jason Merrill <jason@redhat.com> 4337 4338 PR c++/2136 4339 * init.c (build_delete): Check access for a member op delete here. 4340 * decl2.c (delete_sanity): Not here. 4341 43422002-03-19 Jason Merrill <jason@redhat.com> 4343 4344 PR c++/5118 4345 * class.c (get_vfield_name): Use the constructor_name. 4346 43472002-03-20 Neil Booth <neil@daikokuya.demon.co.uk> 4348 4349 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. 4350 * cp-tree.h (lang_printable_name): Rename. 4351 * error.c (lang_decl_name): Use new hook. 4352 * lex.c (cxx_init): Remove old hook. 4353 * pt.c (tsubst_decl): Use new hook. 4354 * tree.c (lang_printable_name): Rename. 4355 43562002-03-18 Eric Botcazou <ebotcazou@multimania.com> 4357 4358 PR c++/3882 4359 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling... 4360 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer 4361 only after recording the declaration. 4362 43632002-03-18 Jason Merrill <jason@redhat.com> 4364 4365 PR c++/2039 4366 * init.c (resolve_offset_ref): Hand off to build_component_ref. 4367 4368 PR c++/4222, c++/5995 4369 * call.c (build_over_call): Fix empty class logic. 4370 4371 PR c++/3870 4372 * cp-tree.h (struct saved_scope): Add last_parms field. 4373 * decl.c (maybe_push_to_top_level): Save last_function_parms. 4374 (pop_from_top_level): Restore it. 4375 4376 PR c++/4377 4377 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip 4378 NON_LVALUE_EXPRs. 4379 4380 PR c++/4003 4381 * pt.c (tsubst_friend_function): Use decl_namespace_context. 4382 4383 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch. 4384 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a 4385 type with a nontrivial destructor. 4386 43872002-03-17 Jason Merrill <jason@redhat.com> 4388 4389 PR c++/4460 4390 * class.c (build_base_path): Virtual base layout is fixed in 4391 in-charge [cd]tors. 4392 43932002-03-17 Neil Booth <neil@daikokuya.demon.co.uk> 4394 4395 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine. 4396 * parse.y (yyparse): Remove macro. 4397 43982002-03-17 Jason Merrill <jason@redhat.com> 4399 4400 PR c++/5757 4401 * init.c (build_new_1): Pass the right pointer to op delete. 4402 44032002-03-16 Nathan Sidwell <nathan@codesourcery.com> 4404 4405 PR c++/4361 4406 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated 4407 conversion operators go. 4408 (struct lang_decl_flags): Add template_conv_p and unused 4409 bitfields. 4410 (DECL_TEMPLATE_CONV_FN_P): New macro. 4411 * call.c (build_user_type_conversion_1): Don't check second type 4412 conversion of overload set first. 4413 * class.c (add_method): Make sure templated conversion operators 4414 all end up on slot 2. 4415 * lex.c (do_identifier): A conversion operator token might be 4416 satisfied by a templated conversion operator. 4417 * pt.c (check_explicit_specialization): Use 4418 CLASSTYPE_FIRST_CONVERSION_SLOT. 4419 (template_parm_this_level_p): New function. 4420 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P. 4421 * search.c (lookup_fnfields_1): Template conversions will be on 4422 the first slot. 4423 * typeck.c (build_component_ref): Preserve the type of an 4424 conversion operator name on the overload type. 4425 (build_x_function_call): Retrieve the conversion operator name. 4426 44272002-03-15 Richard Henderson <rth@redhat.com> 4428 4429 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op. 4430 44312002-03-15 Mark Mitchell <mark@codesourcery.com> 4432 4433 * cp-tree.h (CLEANUP_DECL): Remove. 4434 (CLEANUP_EXPR): Likewise. 4435 * decl.c (destroy_local_var): Simplify. 4436 (maybe_build_cleanup): Tidy. 4437 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT. 4438 * semantics.c (cp_expand_stmt): Likewise. 4439 * cp/tree.c (cp_statement_code_p): Likewise. 4440 44412002-03-15 Jason Merrill <jason@redhat.com> 4442 4443 PR c++/5857 4444 * decl.c (duplicate_decls): Use merge_types instead of common_type. 4445 * typeck.c (common_type): Just hand off to 4446 type_after_usual_arithmetic_conversions and 4447 composite_pointer_type. 4448 (merge_types): New fn. 4449 (commonparms): Use it instead of common_type. 4450 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE. 4451 (composite_pointer_type): Also handle attributes. 4452 * cp-tree.h: Declare merge_types. 4453 4454 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT 4455 variables. 4456 * decl2.c (maybe_make_one_only): Also mark the decl as needed. 4457 44582002-03-14 Richard Henderson <rth@redhat.com> 4459 4460 * decl.c: Include c-pragma.h. 4461 (start_decl, start_function): Invoke maybe_apply_pragma_weak. 4462 * Make-lang.in: Update dependencies. 4463 44642002-03-14 Jakub Jelinek <jakub@redhat.com> 4465 4466 PR c++/5908 4467 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too. 4468 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING. 4469 44702002-03-12 Richard Sandiford <rsandifo@redhat.com> 4471 4472 * mangle.c (write_builtin_type): Handle 128-bit integers even if 4473 they are not a standard integer type. 4474 44752002-03-12 Richard Sandiford <rsandifo@redhat.com> 4476 4477 * cp-tree.h (init_init_processing): Remove declaration. 4478 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff. 4479 * decl.c (cxx_init_decl_processing): Don't call init_init_processing. 4480 44812002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4482 4483 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name): 4484 Define. 4485 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not 4486 tree_code_length. 4487 * lex.c (cplus_tree_code_type, cplus_tree_code_length, 4488 cplus_tree_code_name): Delete. 4489 (cxx_init): Don't call add_c_tree_codes, instead set 4490 lang_unsafe_for_reeval. Don't try to copy into the various 4491 tree_code arrays. 4492 44932002-03-12 Nathan Sidwell <nathan@codesourcery.com> 4494 4495 PR c++/5659 4496 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here. 4497 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for 4498 definitions. 4499 45002002-03-11 Nathan Sidwell <nathan@codesourcery.com> 4501 4502 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>, 4503 DR209 is now not a defect. 4504 * cp-tree.h (skip_type_access_control): Remove. 4505 * decl.c (grokdeclarator): Do type access control for friend 4506 declarations. 4507 * semantics.c (decl_type_access_control): Don't reset 4508 current_type_lookups. 4509 (save_type_access_control): Always save the lookups. 4510 (skip_type_access_control): Remove. 4511 (finish_class_definition): Don't change type_lookups. 4512 45132002-03-11 Nathan Sidwell <nathan@codesourcery.com> 4514 4515 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>, 4516 It is incorrect. 4517 * typeck.c (build_static_cast): Compare non-qualified types 4518 with pointer to member conversions. 4519 45202002-03-11 Dan Nicolaescu <dann@ics.uci.edu> 4521 Daniel Berlin <dan@dberlin.org> 4522 4523 * cp-lang.c (ok_to_generate_alias_set_for_type): New function. 4524 (cxx_get_alias_set): Use it. 4525 45262002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4527 4528 * cp-tree.h (stabilize_expr): Prototype. 4529 45302002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org> 4531 4532 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of 4533 conditional return void. 4534 45352002-03-08 Neil Booth <neil@daikokuya.demon.co.uk> 4536 4537 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine. 4538 * cp-tree.h (cxx_unsave): New. 4539 * tree.c (cp_unsave): Rename cxx_unsave, update prototype. 4540 (init_tree): Update. 4541 45422002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4543 4544 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of 4545 explicit sizeof/sizeof. 4546 * decl2.c (cxx_decode_option): Likewise. 4547 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise. 4548 45492002-03-02 Nathan Sidwell <nathan@codesourcery.com> 4550 4551 PR c++/775 4552 * decl.c (lookup_tag): Only reject enum/class mismatch, not 4553 class/union mismatch. 4554 * parse.y (check_class_key): New function. 4555 (structsp): Call it. 4556 45572002-03-01 Michael Matz <matz@suse.de> 4558 4559 * typeck.c (cp_pointer_int_sum): Complete inner type which is 4560 used later by size_in_bytes(). 4561 45622002-03-01 Phil Edwards <pme@gcc.gnu.org> 4563 4564 * cp-tree.h: Require __GNUC__ to be #defined. 4565 (build_init): Add missing prototype. 4566 45672002-03-01 Jason Merrill <jason@redhat.com> 4568 4569 * except.c: Don't include decl.h or obstack.h. Do include 4570 tree-inline.h. 4571 (build_throw): Destroy temporaries from the thrown 4572 expression before calling __cxa_throw. Construct a thrown 4573 temporary directly into the exception object. 4574 (stabilize_throw_expr): New function. 4575 (wrap_cleanups_r): New function. 4576 * tree.c (stabilize_expr): New function. 4577 * init.c (build_init): New function. 4578 * Make-lang.in (cp/except.o): Adjust .h deps. 4579 45802002-02-28 Jason Merrill <jason@redhat.com> 4581 4582 * search.c (lookup_base_r): Don't clear is_non_public just because 4583 we found a friendly scope. 4584 4585 * decl.c (finish_function): Only warn about missing return 4586 statement with -Wreturn-type. 4587 45882002-02-28 Neil Booth <neil@daikokuya.demon.co.uk> 4589 4590 * class.c (build_clone): Update. 4591 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine. 4592 * cp-tree.h (cxx_dup_lang_specific_decl): New. 4593 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl. 4594 (copy_decl): Update. 4595 * method.c (make_thunk): Update. 4596 45972002-02-27 Zack Weinberg <zack@codesourcery.com> 4598 4599 * decl2.c: Delete traditional-mode-related code copied from 4600 the C front end but not used, or used only to permit the 4601 compiler to link. 4602 46032002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org> 4604 4605 PR c++/4093 4606 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition 4607 to void. 4608 46092002-02-22 Jakub Jelinek <jakub@redhat.com> 4610 4611 PR other/5746 4612 * semantics.c (finish_switch_cond): Don't call get_unwidened 4613 if error_mark_node. 4614 46152002-02-22 Nathan Sidwell <nathan@codesourcery.com> 4616 4617 PR c++/2645, DR 295 4618 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals, 4619 tf_keep_type_decl. 4620 (make_typename_type): Use tsubst_flags_t. 4621 * decl.c (make_typename_type): Adjust. Return non-artificial 4622 TYPE_DECLs, if required. 4623 (grokdeclarator): Simplify CVR qualification handling. Allow bad 4624 qualifiers on typedef types. 4625 * decl2.c (handle_class_head): Adjust make_typename_type call. 4626 * parse.y (nested_name_specifier): Likewise. 4627 (typename_sub0): Likewise. 4628 (typename_sub1): Likewise. 4629 * pt.c (convert_template_argument): Adjust make_typename_type 4630 return value. 4631 (tsubst): Adjust cp_build_qualified_type_real calls. 4632 (check_cv_quals_for_unify): Cope with allowing bad qualifications 4633 on template type parms. 4634 (instantiate_decl): Recheck substitutions to give warnings on bad 4635 qualifications. 4636 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals. 4637 46382002-02-21 Aldy Hernandez <aldyh@redhat.com> 4639 4640 * cp/decl.c (duplicate_decls): Merge always_inline attribute. 4641 4642 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0 4643 unless DECL_ALWAYS_INLINE. 4644 46452002-02-20 Jakub Jelinek <jakub@redhat.com> 4646 4647 * typeck.c (cp_pointer_int_sum): Renamed from 4648 pointer_int_sum, call pointer_int_sum. 4649 46502002-02-20 Jakub Jelinek <jakub@redhat.com> 4651 4652 * decl.c (duplicate_decls): Return 0 if issued error about 4653 redeclaration. 4654 46552002-02-19 Jason Merrill <jason@redhat.com> 4656 4657 ABI change: Mangle `void (A::*)() const' as 4658 M1AKFvvE, not MK1AFvvE. 4659 * mangle.c (write_function_type): Write cv-quals for member 4660 function type here. 4661 (write_pointer_to_member_type): Not here. 4662 46632002-02-18 Jason Merrill <jason@redhat.com> 4664 4665 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header. 4666 (do_decl_instantiation): Likewise. 4667 46682002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org> 4669 4670 PR c++/5685 4671 * decl.c (duplicate_decls): Make warning unconditional 4672 if duplicate default argument declarations are present. 4673 46742002-02-17 Jakub Jelinek <jakub@redhat.com> 4675 4676 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit 4677 shortening. 4678 46792002-02-15 Nathan Sidwell <nathan@codesourcery.com> 4680 4681 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs, 4682 remove incorrect comment. Move #if 0'd code to common path. Use 4683 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication. 4684 46852002-02-13 Jason Merrill <jason@redhat.com> 4686 4687 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns. 4688 (finish_function): Don't warn if current_function_returns_null. 4689 4690 * typeck2.c (digest_init): Do handle values of vector type. 4691 4692 * typeck2.c (digest_init, process_init_constructor): Treat vectors 4693 like arrays. 4694 46952002-02-11 Jason Merrill <jason@redhat.com> 4696 4697 * parse.y (reserved_declspecs): Don't handle attributes. 4698 (reserved_typespecquals): Handle them here. 4699 * Make-lang.in (parse.c): Adjust expected conflicts. 4700 47012002-02-08 Jakub Jelinek <jakub@redhat.com> 4702 4703 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr 4704 instead of compstmt. 4705 (compstmt_or_stmtexpr): Renamed from compstmt. 4706 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type. 4707 47082002-02-07 Nathan Sidwell <nathan@codesourcery.com> 4709 4710 Rename instantiate_type_flags to tsubst_flags_t & expand use. 4711 * cp-tree.h (instantiate_type_flags): Rename to ... 4712 (tsubst_flags_t): ... here. Rename itf_complain to tf_error, 4713 add tf_warning flag. 4714 (instantiate_type): Adjust prototype. 4715 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class, 4716 do_type_instantiation, cp_build_qualified_type_real): Likewise. 4717 cp_build_qualified_type: Adjust. 4718 * class.c (instantiate_type): Adjust parameter. Rename itf_* to 4719 tf_*. 4720 * call.c (standard_conversion): Rename itf_* to tf_*. 4721 (reference_binding): Likewise. 4722 (convert_like_real): Likewise. 4723 * cvt.c (cp_convert_to_pointer): Likewise. 4724 (convert_to_reference): Likewise. 4725 * decl.c (lookup_namespace_name): Use tf_* flags. 4726 (make_typename_type): Likewise. 4727 (grokdeclarator): Likewise. 4728 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage. 4729 (coerce_template_template_parms, convert_template_argument, 4730 coerce_template_parms, maybe_get_template_decl_from_type_decl, 4731 lookup_template_class, tsubst_friend_function, tsubst_friend_class, 4732 instantiate_class_template, tsubst_template_arg_vector, 4733 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument, 4734 tsubst_decl, tsubst_arg_types, tsubst_function_type, 4735 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr, 4736 instantiate_template, fn_type_unification, 4737 resolve_overloaded_unification, verify_class_unification, 4738 unify, get_bindings_real, do_type_instantiation, 4739 regenerate_decl_from_template, instantiate_decl, 4740 tsubst_initializer_list, tsubst_enum, 4741 get_mostly_instantiated_function_type, 4742 invalid_nontype_parm_type_p): Likewise. 4743 * tree.c (cp_build_qualified_type_real): Likewise. 4744 * typeck.c (build_binary_op): Rename itf_* to tf_*. 4745 (build_ptrmemfunc): Likewise. 4746 (convert_for_assignment): Likewise. 4747 47482002-02-07 Nathan Sidwell <nathan@codesourcery.com> 4749 4750 PR c++/109 4751 * decl.c (grokdeclarator): Allow friend declarations from 4752 dependent types. 4753 * decl2.c (handle_class_head): Don't push into template parm contexts. 4754 * pt.c (push_template_decl_real): Template parm contexts are never 4755 being defined. 4756 47572002-02-05 Alexandre Oliva <aoliva@redhat.com> 4758 4759 * class.c: Include target.h. 4760 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY, 4761 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS 4762 bit-field layout. 4763 * Make-lang.in: Adjust deps. 4764 47652002-02-05 Jason Merrill <jason@redhat.com> 4766 4767 * error.c (dump_type): Be more helpful about VECTOR_TYPE. 4768 47692002-02-04 Jakub Jelinek <jakub@redhat.com> 4770 4771 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE. 4772 (finish_switch_cond): Set SWITCH_TYPE. 4773 47742002-02-04 Richard Henderson <rth@redhat.com> 4775 4776 * method.c (use_thunk): Always initialize the block tree. Reindent. 4777 * semantics.c (expand_body): Emit thunks after function, not before. 4778 47792002-02-04 Jason Merrill <jason@redhat.com> 4780 4781 * decl.c (start_function): Call cplus_decl_attributes immediately 4782 after grokdeclarator. 4783 4784 * decl.c (start_function): Combine DECL_RESULT handling code. 4785 47862002-02-03 Jason Merrill <jason@redhat.com> 4787 4788 * xref.c: Remove. 4789 * Make-lang.in (CXX_OBJS): Remove cp/xref.o 4790 (cp/xref.o): Remove dependencies. 4791 * class.c (finish_struct_1, check_methods): Don't call xref fns. 4792 (finish_struct_1): Likewise. 4793 * friend.c (make_friend_class): Likewise. 4794 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise. 4795 * spew.c (read_process_identifier): Likewise. 4796 47972002-02-01 Jason Merrill <jason@redhat.com> 4798 4799 PR c++/4872 4800 * decl.c (finish_function): Warn about a non-void function with 4801 no return statement and no abnormal exit. 4802 * cp-tree.h (struct cp_language_function): Add returns_abnormally. 4803 (current_function_returns_abnormally): New macro. 4804 * call.c (build_call): Set it. 4805 4806 * typeck.c (build_component_ref): Always complain about offsetof 4807 constructs on non-PODs. Only make it an error for members of 4808 virtual bases. 4809 4810 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS. 4811 (dump_function_decl): Always dump parms. 4812 4813 * decl2.c (finish_static_data_member_decl): Complain about a local 4814 class with a static data member. 4815 4816 PR c++/4286 4817 * search.c (lookup_field_1): Don't xref a static data member 4818 just because we looked it up. 4819 48202002-01-31 Jason Merrill <jason@redhat.com> 4821 4822 * Make-lang.in (parse.c): Handle .output file. 4823 4824 PR c++/3395 4825 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES, 4826 not TREE_TYPE. 4827 * semantics.c (finish_class_definition): Adjust. 4828 4829 Allow attributes in parms and casts. 4830 * parse.y (named_parm): Don't strip attrs. 4831 (declmods): Remove 'attributes' production. 4832 (nonempty_cv_qualifiers): Accept attributes. 4833 (ATTRIBUTE): Give precedence. 4834 * decl.c (groktypename): Handle attributes. 4835 (grokparms): Likewise. 4836 48372002-01-29 Jakub Jelinek <jakub@redhat.com> 4838 4839 * decl2.c (cxx_decode_option): Pass 0 as last argument to 4840 cpp_handle_option. 4841 * lang-specs.h: Use cpp_unique_options instead of cpp_options 4842 when used together with cc1_options. 4843 48442002-01-29 Nathan Sidwell <nathan@codesourcery.com> 4845 4846 PR c++/5132 4847 * typeck2.c (digest_init): Make sure non-array core type is 4848 instantiated. 4849 * decl2.c (reparse_absdcl_as_casts): Just store the type in the 4850 constructor, rather than build a new one. 4851 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the 4852 PURPOSE of constructor elts. 4853 48542002-01-23 Zack Weinberg <zack@codesourcery.com> 4855 4856 * Make-lang.in (parse.c): Adjust expected number of 4857 shift-reduce conflicts. 4858 (decl.o): Depend on diagnostic.h. 4859 * decl.c: Include diagnostic.h. 4860 (grokdeclarator): Check for null pointer. 4861 (finish_function): Don't abort when 4862 current_binding_level->parm_flag != 1, if errors have 4863 occurred; throw away the statement tree and extra binding 4864 levels, and continue. 4865 * lex.c (note_list_got_semicolon): Check for null pointer. 4866 * method.c (hack_identifier): Just return error_mark_node if 4867 value is error_mark_node. 4868 * parse.y (primary: TYPEID(type_id)): No need to use 4869 TYPE_MAIN_VARIANT here. 4870 (handler_seq): Accept an empty list of catch clauses and 4871 generate a fake handler block to avoid later crashes. 4872 (ansi_raise_identifier): Accept the error token too. 4873 * semantics.c (begin_class_definition, 4874 finish_class_definition): Check for error_mark_node. 4875 48762002-01-23 Zack Weinberg <zack@codesourcery.com> 4877 4878 * typeck2.c (friendly_abort): Delete definition. 4879 * cp-tree.h (friendly_abort): Don't prototype. 4880 (my_friendly_assert): Use fancy_abort. 4881 48822002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org> 4883 4884 * cp-tree.h (my_friendly_abort): Remove. 4885 48862002-01-23 Jakub Jelinek <jakub@redhat.com> 4887 4888 * spew.c (pending_inlines, pending_inlines_tail, 4889 processing_these_inlines): Make static. 4890 (mark_pending_inlines): Remove static. 4891 (begin_parsing_inclass_inline): If in function, save pi 4892 for GC to cp_function_chain->unparsed_inlines instead. 4893 (process_next_inline): Likewise. 4894 * cp-tree.h (struct cp_language_function): Add unparsed_inlines. 4895 (mark_pending_inlines): Add prototype. 4896 * decl.c (spew_debug): Remove unused extern. 4897 (mark_lang_function): Call mark_pending_inlines. 4898 48992002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org> 4900 4901 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c, 4902 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c, 4903 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: 4904 Change my_fancy_abort() to abort(). 4905 49062002-01-23 Jason Merrill <jason@redhat.com> 4907 4908 PR c++/5453 4909 * class.c (fixed_type_or_null): Fix thinko. 4910 4911 PR c++/3331 4912 * init.c (resolve_offset_ref): Use build_indirect_ref. 4913 4914 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'. 4915 49162002-01-22 Jason Merrill <jason@redhat.com> 4917 4918 * parse.y (function_body): Suppress the block for the outermost 4919 curly braces. 4920 * decl.c (pushdecl): Don't try to skip it. 4921 (begin_function_body): Keep the block we create, not the next one. 4922 * init.c (emit_base_init): Don't mess with keep_next_level. 4923 4924 * class.c (build_base_path): Tweak formatting. 4925 49262002-01-19 Nathan Sidwell <nathan@codesourcery.com> 4927 4928 Fix regression introduced with patch for c++/775 4929 * parse.y (class_head_defn): Check for template specializations 4930 with a different class-key. 4931 49322002-01-17 Jason Merrill <jason@redhat.com> 4933 4934 * decl.c (begin_constructor_body, begin_destructor_body): New fns. 4935 (begin_function_body): Call them and keep_next_level. 4936 * init.c (emit_base_init): Call keep_next_level. 4937 * semantics.c (setup_vtbl_ptr): Lose. 4938 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p. 4939 (vtbls_set_up_p): Lose. 4940 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init. 4941 * method.c (do_build_copy_constructor): Likewise. 4942 (synthesize_method): Call finish_mem_initializers. 4943 * parse.y (nodecls): Likewise. 4944 4945 * error.c (dump_type_suffix): Print the exception specs before 4946 recursing. 4947 (dump_function_decl): Here, too. 4948 4949 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT. 4950 49512002-01-10 Ira Ruben <ira@apple.com> 4952 4953 PR c++/907 4954 * decl.c (start_method): Handle attrlist. 4955 49562002-01-10 Jakub Jelinek <jakub@redhat.com> 4957 4958 * decl2.c (max_tinst_depth): Increase default limit to 500. 4959 49602002-01-10 Graham Stott <grahams@redhat.com> 4961 4962 * spew.c (YYCHAR): Uppercase macro parameter and add 4963 parenthesis. 4964 (YYCODE): Likewise. 4965 (NAME): Uppercase macro parameter. 4966 49672002-01-09 Graham Stott <grahams@redhat.com> 4968 4969 * decl.h (grokdeclarator): Wrap long line. 4970 4971 * semantics.c (FINISH_COND): Uppercase macro paramaters and 4972 add parenthesis. 4973 49742002-01-08 Graham Stott <grahams@redhat.com> 4975 4976 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis. 4977 (PALLOC): Uppercase macro parameter and whitespace. 4978 (SALLOC): Uppercase macro parameter. 4979 (SFREE): Uppercase macros parameter, add parenthese and 4980 whitespace. 4981 (STREQL): Uppercase macro parameter and whitespace. 4982 (STRNEQ): Likewise. 4983 (STRLSS): Likewise. 4984 (STRLEQ): Likewise. 4985 (STRGTR): Likewise. 4986 (STRGEQ): Likewise. 4987 4988 * call.c (convert_like): Add parenthesis and wrap. 4989 (convert_like_with_context): Likewise. 4990 (ICS_RANK): Whitespace. 4991 (NEED_TEMPORARY_P): Remove parenthesis. 4992 4993 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and 4994 whitespace. 4995 (VTT_MARKED_BINFO_P): Likewise. 4996 4997 * decl.c (BINDING_LEVEL): Add parenthesis. 4998 (DEF_OPERATOR): Likewise. 4999 5000 * mangle.c (MANGLE_TRACE): Add parenthesis. 5001 (MANGLE_TRACE_TREE): Likewise. 5002 (write_signed_number): Likewise. 5003 (write_unsigned_number): Likewise. 5004 5005 * pt.c (ccat): Uppercase macro parameter. 5006 (cat): Likewise 5007 5008 * search.c (SET_BINFO_ACCESS): Add parenthesis. 5009 50102002-01-07 Jason Merrill <jason@redhat.com> 5011 5012 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch 5013 to pedwarn. 5014 5015 PR c++/3536 5016 * method.c (make_thunk): If !flag_weak, give the thunk the 5017 function's linkage. 5018 (use_thunk): Here, too. 5019 50202002-01-07 Graham Stott <grahams@redhat.com> 5021 5022 * error.c: Update copyright date. 5023 (print_scope_operator): Add parenthesis. 5024 (print_left_paren): Likewise. 5025 (print_right_paren): Likewise. 5026 (print_left_bracket): Likewise. 5027 (print_right_bracket): Likewise. 5028 (print_template_argument_list_start): Likewise. 5029 (print_template_argument_list_end): Likewise. 5030 (print_non_consecutive_character): Likewise. 5031 (print_tree_identifier): Likewise. 5032 (print_identifier): Likewise. 5033 (NEXT_CODE): Uppercase macro parameter. 5034 (ident_fndecl): Delete unused. 5035 (GLOBAL_THING): Likewise. 5036 50372002-01-06 Graham Stott <grahams@redhat.com> 5038 5039 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis. 5040 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise. 5041 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise. 5042 (RECORD_OR_UNION_TYPE_CHECK): Likewise. 5043 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise. 5044 (C_IS_RESERVED_WORD): Uppercase macro parameter. 5045 (C_RID_YYCODE) Likewise. 5046 (ptrmem_cst): Use rtx. 5047 (LOCAL_BINDING_P): Add whitespace. 5048 (INHERITED_VALUE_BINDING_P): Likewise. 5049 (BINDING_SCOPE): Wrap long line. 5050 (BINDING_HAS_LEVEL_P): Remove parenthesis. 5051 (BINDING_VALUE): Wrap long line. 5052 (BINDING_TYPE): Whitespace. 5053 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis. 5054 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise. 5055 (IDENTIFIER_NAMESPACE_VALUE): Likewise. 5056 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise. 5057 (same_type_p): Uppercase macro parameters. 5058 (same_type_ignoring_top_level_qualifiers_p): Likewise. 5059 (OVL_FUNCTION): Wrap long line. 5060 (OVL_CHAIN): Whitespace. 5061 (OVL_CURRENT): Add parenthesis and whitespace. 5062 (OVL_NEXT): Whitespace. 5063 (OVL_USED): Likewise. 5064 (IDENTIFIER_TYPE_VALUE): Likewise. 5065 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis. 5066 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace. 5067 (LANG_ID_FIELD): Whitespace. 5068 (SET_LANG_ID(NODE,VALUE,NAME): Likewise. 5069 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap. 5070 (SET_IDENTIFIER_LABEL_VALUE): Whitespace. 5071 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap. 5072 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace. 5073 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap. 5074 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace. 5075 (IDENTIFIER_VIRTUAL_P): Likewise. 5076 (IDENTIFIER_OPNAME_P): Likewise. 5077 (IDENTIFIER_TYPENAME_P): Remove parenthesis. 5078 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters. 5079 (C_SET_EXP_ORIGINAL_CODE): Likewise. 5080 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line. 5081 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise. 5082 (IS_AGGR_TYPE): Uppercase macro parameter. 5083 (CLASS_TYPE_P): Likewise. 5084 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis. 5085 (IS_AGGR_TYPE_2): Whitespace. 5086 (TAGGED_TYPE_P): Uppercase macro parameter. 5087 (TYPE_BUILT_IN): Whitespace. 5088 (TYPE_FOR_JAVA): Likewise. 5089 (FUNCTION_ARG_CHAIN): Remove parenthesis. 5090 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis. 5091 (FUNCTION_FIRST_USER_PARAM): Likewise. 5092 (PROMOTES_TO_AGGR_TYPE): Whitespace. 5093 (DERIVED_FROM_P): Add parenthesis and wrap. 5094 (UNIQUELY_DERIVED_FROM_P): Likewise. 5095 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise. 5096 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise. 5097 (CLASSTYPE_USE_TEMPLATE): Whitespace. 5098 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis. 5099 (TYPE_GETS_DELETE): Add parenthesis. 5100 (TYPE_HAS_CONVERSION): Add parenthesis and wrap. 5101 (TYPE_HAS_ASSIGN_REF): Likewise, 5102 (TYPE_HAS_CONST_ASSIGN_REF): Likewise. 5103 (TYPE_HAS_INIT_REF): Likewise. 5104 (TYPE_HAS_CONST_INIT_REF): Likewise. 5105 (TYPE_BEING_DEFINED): Likewise. 5106 (TYPE_LANG_SPECIFIC): Likewise. 5107 (CLASSTYPE_RTTI): Likewise. 5108 (TYPE_OVERLOADS_CALL_EXPR): Likewise. 5109 (TYPE_OVERLOADS_ARRAY_REF): Likewise. 5110 (TYPE_OVERLOADS_ARROW): Likewise. 5111 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise. 5112 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis. 5113 (CLASSTYPE_METHOD_VEC): Likewise. 5114 (CLASSTYPE_MARKED_N): Likewise. 5115 (CLASSTYPE_MARKED): Likewise. 5116 (CLASSTYPE_MARKED2): Likewise. 5117 (CLASSTYPE_MARKED3): Likewise. 5118 (CLASSTYPE_MARKED4): Likewise. 5119 (CLASSTYPE_MARKED5): Likewise. 5120 (CLASSTYPE_MARKED6): Likewise. 5121 (SET_CLASSTYPE_MARKED): Whitespace. 5122 (CLEAR_CLASSTYPE_MARKED): Likewise. 5123 (SET_CLASSTYPE_MARKED2): Likewise. 5124 (CLEAR_CLASSTYPE_MARKED2): Likewise. 5125 (SET_CLASSTYPE_MARKED3): Likewise. 5126 (CLEAR_CLASSTYPE_MARKED3): Likewise. 5127 (SET_CLASSTYPE_MARKED4): Likewise. 5128 (CLEAR_CLASSTYPE_MARKED4): Likewise. 5129 (SET_CLASSTYPE_MARKED5): Likewise. 5130 (CLEAR_CLASSTYPE_MARKED5): Likewise. 5131 (SET_CLASSTYPE_MARKED6): Likewise. 5132 (CLEAR_CLASSTYPE_MARKED6): Likewise. 5133 (CLASSTYPE_TAGS): Likewise. 5134 (CLASSTYPE_VSIZE): Likewise. 5135 (CLASSTYPE_VBASECLASSES): Likewise. 5136 (CANONICAL_BINFO): Add parenthesis. 5137 (CLASSTYPE_SIZE(NODE): Likewise. 5138 (CLASSTYPE_SIZE_UNIT): Likewise. 5139 (CLASSTYPE_ALIGN(NODE): Likewise. 5140 (CLASSTYPE_USER_ALIGN): Likewise. 5141 (TYPE_JAVA_INTERFACE): Likewise. 5142 (CLASSTYPE_PURE_VIRTUALS): Likewise. 5143 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap. 5144 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise. 5145 (CLASSTYPE_HAS_MUTABLE): Likewise. 5146 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise. 5147 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap. 5148 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise. 5149 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise. 5150 (CLASSTYPE_INTERFACE_ONLY): Likewise. 5151 (CLASSTYPE_INTERFACE_KNOWN): Likewise. 5152 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise. 5153 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise. 5154 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise. 5155 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise. 5156 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap. 5157 (BINFO_UNSHARED_MARKED): Whitespace. 5158 (BINFO_MARKED): Whitespace and wrap. 5159 (SET_BINFO_MARKED): Likewise. 5160 (CLEAR_BINFO_MARKED): Likewise. 5161 (BINFO_VTABLE_PATH_MARKED): Likewise. 5162 (SET_BINFO_VTABLE_PATH_MARKED): Likewise. 5163 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise. 5164 (BINFO_SUBVTT_INDEX): Remove parenthesis. 5165 (BINFO_VPTR_INDEX): Likewise. 5166 (BINFO_PRIMARY_BASE_OF): Likewise, 5167 (CLASSTYPE_VFIELDS): Whitespace. 5168 (VF_DERIVED_VALUE): Wrap long line. 5169 (NAMESPACE_LEVEL): Whitespace. 5170 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis. 5171 (DEFARG_POINTER): Whitespace. 5172 (DECL_NEEDED_P): Remove parenthesis. 5173 (DECL_LANGUAGE): Whitespace. 5174 (SET_DECL_LANGUAGE): Add parenthesis. 5175 (DECL_CONSTRUCTOR_P): Whitespace and wrap. 5176 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis. 5177 (DECL_IN_AGGR_P): Whitespace. 5178 (DECL_FRIEND_P): Likewise. 5179 (DECL_BEFRIENDING_CLASSES): Likewise. 5180 (DECL_STATIC_FUNCTION_P): Whitespace and wrap. 5181 (DECL_NONCONVERTING_P): Whitespace. 5182 (DECL_PURE_VIRTUAL_P): Likewise. 5183 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise. 5184 (DECL_PENDING_INLINE_INFO): Whitespace. 5185 (DECL_SORTED_FIELDS): Likewise. 5186 (DECL_DEFERRED_FN): Likewise. 5187 (DECL_TEMPLATE_INFO): Likewise. 5188 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap. 5189 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise. 5190 (SET_TYPE_TEMPLATE_INFO): Add parenthesis. 5191 (TMPL_ARGS_LEVEL): Likewise. 5192 (SET_TMPL_ARGS_LEVEL): Likewise. 5193 (INNERMOST_TEMPLATE_PARMS): Whitespace. 5194 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter. 5195 (INTEGRAL_CODE_P(CODE): Add parenthesis. 5196 (CP_INTEGRAL_TYPE_P): Remove parenthesis. 5197 (TYPE_HAS_CONSTRUCTOR): Whitespace. 5198 (TREE_HAS_CONSTRUCTOR): Likewise. 5199 (TYPE_HAS_DESTRUCTOR): Likewise. 5200 (TYPE_HAS_REAL_ASSIGN_REF): Likewise. 5201 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise. 5202 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise. 5203 (TYPE_HAS_COMPLEX_INIT_REF): Likewise. 5204 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise. 5205 (TYPE_PTRMEMFUNC_P): Likewise. 5206 (TYPE_PTRMEMFUNC_FLAG): Likewise. 5207 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise. 5208 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise. 5209 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis. 5210 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. 5211 (DECL_ACCESS): Whitespace. 5212 (DECL_GLOBAL_CTOR_P): Remove parenthesis. 5213 (DECL_GLOBAL_DTOR_P): Likewise. 5214 (GLOBAL_INIT_PRIORITY): Likewise. 5215 (DECL_TEMPLATE_PARMS): Likewise. 5216 (DECL_TEMPLATE_RESULT): Likewise. 5217 (DECL_TEMPLATE_INSTANTIATIONS): Likewise. 5218 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise. 5219 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis. 5220 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise. 5221 (PRIMARY_TEMPLATE_P): Add parenthesis. 5222 (DECL_USE_TEMPLATE): Whitespace. 5223 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise. 5224 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise. 5225 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise. 5226 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise. 5227 (CALL_DECLARATOR_PARMS): Remove parenthesis. 5228 (CALL_DECLARATOR_QUALS): Likewise. 5229 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise. 5230 (TEMP_NAME_P): Wrap. 5231 (VFIELD_NAME_P): Likewise. 5232 (B_SET): Uppercase macro parameters and add parenthesis. 5233 (B_CLR): Likewise. 5234 (B_TST): Likewise. 5235 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters. 5236 (LOOKUP_TYPES_ONLY): Uppercase macro parameters. 5237 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters. 5238 (same_or_base_type_p): Likewise. 5239 (cp_deprecated): Likewise. 5240 52412002-01-05 Richard Henderson <rth@redhat.com> 5242 5243 * semantics.c (expand_body): Revert last change. 5244 52452002-01-04 Jason Merrill <jason@redhat.com> 5246 5247 PR c++/4122 5248 * class.c (update_vtable_entry_for_fn): Set delta to zero for a 5249 lost primary. 5250 5251 * class.c (build_vtbl_initializer): Check for a lost primary 5252 before calculating the vtable entry to throw away. 5253 52542002-01-02 Jason Merrill <jason@redhat.com> 5255 5256 * semantics.c (expand_body): Call outlining_inline_function when 5257 emitting an inline function out of line. 5258 52592002-01-02 Nathan Sidwell <nathan@codesourcery.com> 5260 5261 PR c++/5116, c++/764 reversion 5262 * call.c (build_new_op): Revert the instantiations. They are 5263 incorrect. 5264 52652002-01-02 Nathan Sidwell <nathan@codesourcery.com> 5266 5267 PR c++/5089 5268 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void. 5269 52702002-01-02 Nathan Sidwell <nathan@codesourcery.com> 5271 5272 PR c++/3716 5273 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst. 5274 (tsubst, case POINTER_TYPE): Handle pmfs here. 5275 (tsubst, case OFFSET_TYPE): Check it is not an offset to 5276 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE. 5277 52782002-01-02 Nathan Sidwell <nathan@codesourcery.com> 5279 5280 PR c++/35 5281 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too. 5282 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too. 5283 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the 5284 PARM_DECL. 5285 (tsubst_template_parms): Break up loop statements. 5286 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template 5287 parm PARM_DECLs don't get promoted. 5288 52892002-01-02 Nathan Sidwell <nathan@codesourcery.com> 5290 5291 PR c++/5123 5292 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR. 5293 (build_x_function_call): Cope with a COMPONENT_REF containing a 5294 TEMPLATE_ID_EXPR. 5295 52962002-01-02 Nathan Sidwell <nathan@codesourcery.com> 5297 5298 PR c++/5213 5299 * pt.c (convert_template_argument): Be more careful determining 5300 when RECORD_TYPE templates are or are not templates. 5301 53022002-01-02 Nathan Sidwell <nathan@codesourcery.com> 5303 5304 PR c++/775 5305 * cp-tree.h (handle_class_head): Adjust prototype. 5306 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P 5307 parameters. Use for all class heads. 5308 * parse.y (named_class_head_sans_basetype, named_class_head, 5309 named_complex_class_head_sans_basetype, 5310 named_class_head_sans_basetype_defn, 5311 unnamed_class_head): Remove. 5312 (class_head, class_head_apparent_template): Recognize class heads 5313 (class_head_decl, class_head_defn): New reductions. Process class 5314 heads. 5315 (structsp): Adjust class definition and class declaration 5316 reductions. 5317 (maybe_base_class_list): Give diagnostic on empty list. 5318 53192002-01-02 Nathan Sidwell <nathan@codesourcery.com> 5320 5321 PR c++/4379 5322 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a 5323 single non-static member. 5324 (unary_complex_lvalue): If it cannot be a pointer to member, don't 5325 make it so. Check it is not pointer to reference. 5326 53272002-01-02 Nathan Sidwell <nathan@codesourcery.com> 5328 5329 PR c++/5132 5330 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we 5331 are processing a template decl. 5332 53332002-01-02 Nathan Sidwell <nathan@codesourcery.com> 5334 5335 PR c++/5116, c++/764 5336 * call.c (build_new_op): Make sure template class operands are 5337 instantiated. Simplify arglist construction. 5338 53392001-12-29 Nathan Sidwell <nathan@codesourcery.com> 5340 5341 * call.c (build_user_type_conversion_1): Use my_friendly_assert 5342 rather than if ... abort. 5343 * cvt.c (convert_to_reference): Likewise. 5344 * semantics.c (setup_vtbl_ptr): Likewise. 5345 * pt.c (lookup_template_class): Comment typo. 5346 53472001-12-29 Nathan Sidwell <nathan@codesourcery.com> 5348 5349 PR c++/5125 5350 * pt.c (push_template_decl_real): Make sure DECL has 5351 DECL_LANG_SPECIFIC. 5352 53532001-12-29 Nathan Sidwell <nathan@codesourcery.com> 5354 5355 PR c++/335 5356 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer 5357 for non-reference fields. 5358 * typeck.c (require_complete_type): Use resolve_offset_ref). 5359 53602001-12-26 Nathan Sidwell <nathan@codesourcery.com> 5361 5362 PR c++/196 5363 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF. 5364 53652001-12-24 Nathan Sidwell <nathan@codesourcery.com> 5366 5367 PR c++/160 5368 * typeck.c (build_modify_expr): Remove old unreachable code & tidy 5369 up. Don't stabilize_references when initializing a reference. 5370 53712001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5372 5373 * decl2.c (lang_f_options): Const-ify. 5374 53752001-12-20 Joseph S. Myers <jsm28@cam.ac.uk> 5376 5377 * config-lang.in (diff_excludes): Remove. 5378 53792001-12-19 Nathan Sidwell <nathan@codesourcery.com> 5380 5381 PR c++/90 5382 * typeck.c (build_function_call_real): Use original function 5383 expression for errors. 5384 53852001-12-18 Jason Merrill <jason@redhat.com> 5386 5387 PR c++/3242 5388 * class.c (add_method): Do compare 'this' quals when trying to match a 5389 used function. Don't defer to another used function. 5390 53912001-12-18 Nathan Sidwell <nathan@codesourcery.com> 5392 5393 * pt.c (instantiate_clone): Remove, fold into ... 5394 (instantiate_template): ... here. Simplify by removing mutual 5395 recursion. 5396 * typeck2.c (build_m_component_ref): Don't cv qualify the function 5397 pointed to by a pointer to function. 5398 * class.c (delete_duplicate_fields_1): Typo. 5399 54002001-12-18 Jason Merrill <jason@redhat.com> 5401 5402 C++ ABI change: destroy value arguments in caller. 5403 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't 5404 create an extra binding level for the parameters. 5405 * decl.c (store_parm_decls): Don't do parameter cleanups. 5406 54072001-12-18 Nathan Sidwell <nathan@codesourcery.com> 5408 5409 * call.c (build_new_method_call): Use '%#V'. 5410 * error.c (cv_to_string): Use V parameter to determine padding. 5411 54122001-12-18 Joseph S. Myers <jsm28@cam.ac.uk> 5413 5414 * call.c, decl2.c, init.c: Use "built-in" and "bit-field" 5415 spellings in messages. 5416 54172001-12-17 Zack Weinberg <zack@codesourcery.com> 5418 5419 * cp-tree.h: Delete #defines for cp_error, cp_warning, 5420 cp_pedwarn, and cp_compiler_error. 5421 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c, 5422 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c, 5423 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c, 5424 typeck2.c: Change calls to the above macros to use their 5425 language-independent equivalents: error, warning, pedwarn, and 5426 internal_error respectively. 5427 54282001-12-16 Neil Booth <neil@daikokuya.demon.co.uk> 5429 5430 * decl2.c (finish_file): Remove back_end_hook. 5431 54322001-12-16 Joseph S. Myers <jsm28@cam.ac.uk> 5433 5434 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c, 5435 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c, 5436 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors. 5437 54382001-12-15 Joseph S. Myers <jsm28@cam.ac.uk> 5439 5440 * lang-options.h: Use American spelling in messages. 5441 54422001-12-13 Jason Merrill <jason@redhat.com> 5443 5444 * Make-lang.in (parse.h): Separate rule, just depend on parse.c. 5445 5446 Use cleanups to run base and member destructors. 5447 * init.c (push_base_cleanups): New function, split out from... 5448 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code. 5449 * decl.c (finish_destructor_body): Move vbase destruction code to 5450 push_base_cleanups. 5451 (begin_function_body, finish_function_body): New fns. 5452 (finish_function): Move [cd]tor handling and call_poplevel to 5453 finish_function_body. 5454 (pushdecl): Skip the new level. 5455 * semantics.c (genrtl_try_block): Don't call end_protect_partials. 5456 (setup_vtbl_ptr): Call push_base_cleanups. 5457 * method.c (synthesize_method): Call {begin,end}_function_body. 5458 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK. 5459 * cp-tree.h: Declare new fns. 5460 * parse.y (function_body, .begin_function_body): New nonterminals. 5461 (fndef, pending_inline, function_try_block): Use function_body. 5462 (ctor_initializer_opt, function_try_block): No longer has a value. 5463 (base_init): Remove .set_base_init token. 5464 (.set_base_init, compstmt_or_error): Remove. 5465 * Make-lang.in (parse.c): Expect two fewer s/r conflicts. 5466 5467 * optimize.c (maybe_clone_body): Fix parameter updating. 5468 54692001-12-12 Jason Merrill <jason@redhat.com> 5470 5471 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft. 5472 * semantics.c (genrtl_start_function): Don't pass 5473 parms_have_cleanups or push an extra binding level. 5474 (genrtl_finish_function): Lose cleanup_label cruft. 5475 5476 * cp-tree.h (struct cp_language_function): Remove x_ctor_label. 5477 (ctor_label): Remove. 5478 * semantics.c (finish_return_stmt): Lose ctor_label support. 5479 * decl.c (finish_constructor_body, mark_lang_function): Likewise. 5480 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not 5481 dtor_label. 5482 5483 * call.c (build_new_method_call): Let resolves_to_fixed_type_p 5484 check for [cd]tors. 5485 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix. 5486 5487 * decl.c (finish_function): Check VMS_TARGET, not VMS. 5488 5489 * decl.c (start_cleanup_fn): Remove redundant pushlevel. 5490 (end_cleanup_fn): And poplevel. 5491 5492 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER 5493 if we're in a template. 5494 54952001-12-12 Jakub Jelinek <jakub@redhat.com> 5496 5497 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P, 5498 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT, 5499 THIS_NAME_P): Delete. 5500 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P, 5501 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash 5502 with internal naming scheme. 5503 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use. 5504 55052001-12-12 Nathan Sidwell <nathan@codesourcery.com> 5506 5507 * decl.c (grokdeclarator): Deprecated implicit typename use. 5508 55092001-12-11 Nathan Sidwell <nathan@codesourcery.com> 5510 5511 PR g++/51 5512 * parse.y (frob_specs): Indicate it is a language linkage which 5513 contained the extern. 5514 * decl.c (grokdeclarator): Allow extern language linkage with 5515 other specifiers. 5516 55172001-12-10 Nathan Sidwell <nathan@codesourcery.com> 5518 5519 PR g++/72 5520 * decl.c (add_binding): Don't reject duplicate typedefs involving 5521 template parameters. 5522 55232001-12-10 Neil Booth <neil@daikokuya.demon.co.uk> 5524 5525 * parse.y, semantics.c: Similarly. 5526 55272001-12-09 Nathan Sidwell <nathan@codesourcery.com> 5528 5529 PR g++/87 5530 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p. 5531 (copy_args_p): Rename to ... 5532 (copy_fn_p): ... here. 5533 (grok_special_member_properties): New function. 5534 (grok_op_properties): Lose VIRTUALP parameter. 5535 (copy_assignment_arg_p): Remove. 5536 * call.c (build_over_call): Use copy_fn_p. 5537 * decl.c (grokfndecl): Reformat. Adjust call to 5538 grok_op_properties. 5539 (copy_args_p): Rename to ... 5540 (copy_fn_p): ... here. Reject template functions. Check for pass 5541 by value. 5542 (grok_special_member_properties): Remember special functions. 5543 (grok_ctor_properties): Don't remember them here, just check. 5544 (grok_op_properties): Likewise. 5545 (start_method): Call grok_special_member_properties. 5546 * decl2.c (grokfield): Likewise. 5547 (copy_assignment_arg_p): Remove. 5548 (grok_function_init): Don't remember abstract assignment here. 5549 * pt.c (instantiate_class_template): Call 5550 grok_special_member_properties. 5551 (tsubst_decl): Adjust grok_op_properties call. 5552 55532001-12-08 Aldy Hernandez <aldyh@redhat.com> 5554 5555 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and 5556 RID_TYPES_COMPATIBLE_P. 5557 55582001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca> 5559 5560 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in 5561 call to build_aggr_init. 5562 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND. 5563 55642001-12-08 Neil Booth <neil@daikokuya.demon.co.uk> 5565 5566 * parse.y: Replace uses of the string non-terminal with STRING. 5567 Don't perform string concatentaion here. 5568 (string): Remove non-terminal. 5569 * semantics.c (finish_asm_stmt): Don't concatenate strings here. 5570 55712001-12-05 Jason Merrill <jason@redhat.com> 5572 5573 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define. 5574 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define. 5575 * tree.c (cp_start_inlining, cp_end_inlining): New fns. 5576 * pt.c (push_tinst_level): No longer static. 5577 * cp-tree.h: Declare them. 5578 5579 * init.c (resolve_offset_ref): Don't check access for the base 5580 conversion to access a FIELD_DECL. 5581 5582 * cp-tree.h (TYPE_REFFN_P): New macro. 5583 * decl.c (bad_specifiers): Check it, too. 5584 5585 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY 5586 on the __*_type_info type if we haven't seen a definition. 5587 55882001-12-05 Neil Booth <neil@daikokuya.demon.co.uk> 5589 5590 * decl.c: Include c-common.h. 5591 (shadow_warning): Move to c-common.c. 5592 5593Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5594 5595 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE. 5596 55972001-12-04 Nathan Sidwell <nathan@codesourcery.com> 5598 5599 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm. 5600 56012001-12-04 Nathan Sidwell <nathan@codesourcery.com> 5602 5603 PR g++/164 5604 * init.c (sort_base_init): Allow binfos to be directly specified. 5605 * method.c (do_build_copy_constructor): Explicitly convert to the 5606 base instance. 5607 (do_build_assign_ref): Likewise. 5608 56092001-12-03 Hans-Peter Nilsson <hp@bitrange.com> 5610 5611 * decl.c (xref_basetypes): Don't use C99 construct in tag_code 5612 declaration and initialization. 5613 56142001-12-03 Neil Booth <neil@daikokuya.demon.co.uk> 5615 5616 * typeck2.c: Remove leading capital from diagnostic messages, as 5617 per GNU coding standards. 5618 56192001-12-03 Mumit Khan <khan@nanotech.wisc.edu> 5620 5621 PR c++/3394 5622 * decl.c (xref_basetypes): Handle attributes between 5623 'class' and name. 5624 56252001-12-03 Nathan Sidwell <nathan@codesourcery.com> 5626 5627 PR g++/3381 5628 * parse.y (named_complex_class_head_sans_basetype): Add new 5629 reduction. 5630 * Make-lang.in (parse.c): Adjust expected conflict count. 5631 56322001-12-03 Jason Merrill <jason@redhat.com> 5633 5634 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the 5635 immediate binfos for our virtual bases. 5636 56372001-12-02 Neil Booth <neil@daikokuya.demon.co.uk> 5638 5639 * call.c (build_java_interface_fn_ref): Similarly. 5640 * except.c (is_admissible_throw_operand): Similarly. 5641 * init.c (build_java_class_ref): Similarly. 5642 * xref.c (open_xref_file): Similarly. 5643 56442001-12-01 Neil Booth <neil@daikokuya.demon.co.uk> 5645 5646 * class.c (finish_struct): Remove trailing periods from messages. 5647 * decl.c (check_tag_decl): Similarly. 5648 * lex.c (cxx_set_yydebug): Similarly. 5649 * typeck2.c (friendly_abort): Similarly. 5650 56512001-11-29 Mark Mitchell <mark@codesourcery.com> 5652 5653 PR c++/3048 5654 * cp-tree.h (ovl_member): Remove. 5655 * decl2.c (merge_functions): Handle extern "C" functions 5656 specially. 5657 * tree.c (ovl_member): Remove. 5658 56592001-11-29 Mark Mitchell <mark@codesourcery.com> 5660 5661 PR c++/4842 5662 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a 5663 FUNCTION_DECL, as input. 5664 (mark_overriders): Remove. 5665 (warn_hidden): Rework for the new ABI. 5666 56672001-11-29 Mark Mitchell <mark@codesourcery.com> 5668 5669 PR c++/3471 5670 * call.c (convert_like_real): Do not build additional temporaries 5671 for rvalues of class type. 5672 56732001-11-28 Nathan Sidwell <nathan@codesourcery.com> 5674 5675 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base. 5676 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise. 5677 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise. 5678 (DERIVED_FROM_P): Likewise. 5679 (enum base_access): Renumber, add ba_quiet bit mask. 5680 (get_binfo): Remove. 5681 (get_base_distance): Remove. 5682 (binfo_value): Remove. 5683 (ACCESSIBLY_DERIVED_FROM_P): Remove. 5684 * call.c (standard_conversion): Use lookup_base. 5685 * class.c (strictly_overrides): Likewise. 5686 (layout_virtual_bases): Likewise. 5687 (warn_about_ambiguous_direct_bases): Likewise. 5688 (is_base_of_enclosing_class): Likewise. 5689 (add_vcall_offset_vtbl_entries_1): Likewise. 5690 * cvt.c (build_up_reference): Adjust comment. 5691 * init.c (build_member_call): Reformat. 5692 * search.c (get_binfo): Remove. 5693 (get_base_distance_recursive): Remove. 5694 (get_base_distance): Remove. 5695 (lookup_base_r): Tweak. 5696 (lookup_base): Add ba_quiet control. Complete the types here. 5697 (covariant_return_p): Use lookup_base. 5698 * tree.c (binfo_value): Remove. 5699 (maybe_dummy_object): Use lookup_base. 5700 * typeck.c (build_static_cast): Use lookup_base. 5701 (get_delta_difference): Likewise. 5702 * typeck2.c (binfo_or_else): Use lookup_base. 5703 (build_scoped_ref): Add back error_mark_check. 5704 (build_m_component_ref): Use lookup_base. 5705 57062001-11-29 Joseph S. Myers <jsm28@cam.ac.uk> 5707 5708 * Make-lang.in (c++.generated-manpages): New dummy target. 5709 5710Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5711 5712 * Make-lang.in (cp-lang.o): Depends on c-common.h. 5713 * cp-lang.c (c-common.h): Include. 5714 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks. 5715 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p. 5716 * expr.c (init_cplus_expand): Don't set lang_expand_constant. 5717 57182001-11-26 Neil Booth <neil@daikokuya.demon.co.uk> 5719 5720 * decl2.c (c_language): Move to c-common.c. 5721 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c 5722 functions. 5723 (cxx_init): Update. 5724 57252001-11-26 Jason Merrill <jason@redhat.com> 5726 5727 * call.c (joust): Remove COND_EXPR hack. 5728 57292001-11-25 Aldy Hernandez <aldyh@redhat.com> 5730 5731 * search.c (lookup_base_r): Declare bk in variable declaration 5732 space. 5733 57342001-11-25 Nathan Sidwell <nathan@codesourcery.com> 5735 5736 PR g++/3145 5737 * class.c (build_vbase_pointer): Remove. 5738 (build_vbase_path): Remove. 5739 (build_base_path): New function. 5740 * cp-tree.h (base_access, base_kind): New enumerations. 5741 (build_base_path): Declare. 5742 (convert_pointer_to_real): Remove. 5743 (convert_pointer_to): Remove. 5744 (lookup_base): Declare. 5745 (convert_pointer_to_vbase): Remove. 5746 * call.c (build_scoped_method_call): Use lookup_base & 5747 build_base_path instead of convert_pointer_to_real, 5748 get_base_distance & get_binfo. 5749 (build_over_call): Likewise. 5750 * cvt.c (cp_convert_to_pointer): Likewise. 5751 (convert_to_pointer_force): Likewise. 5752 (build_up_reference): Likewise. 5753 (convert_pointer_to_real): Remove. 5754 (convert_pointer_to): Remove. 5755 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path 5756 instead of convert_pointer_to_vbase & build_vbase_path. 5757 (emit_base_init): Use build_base_path instead of 5758 convert_pointer_to_real. 5759 (expand_virtual_init): Lose unrequired conversions. 5760 (resolve_offset_ref): Use lookup_base and build_base_path 5761 instead of convert_pointer_to. 5762 * rtti.c (build_dynamic_cast_1): Use lookup_base & 5763 build_base_path instead of get_base_distance & build_vbase_path. 5764 * search.c (get_vbase_1): Remove. 5765 (get_vbase): Remove. 5766 (convert_pointer_to_vbase): Remove. 5767 (lookup_base_r): New function. 5768 (lookup_base): New function. 5769 * typeck.c (require_complete_type): Use lookup_base & 5770 build_base_path instead of convert_pointer_to. 5771 (build_component_ref): Likewise. 5772 (build_x_function_call): Likewise. 5773 (get_member_function_from_ptrfunc): Likewise. 5774 (build_component_addr): Likewise. 5775 * typeck2.c (build_scoped_ref): Likewise. 5776 57772001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz> 5778 5779 * cp-tree.h (CP_TYPE_QUALS): Removed. 5780 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree. 5781 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and 5782 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN. 5783 * dump.c (cp_dump_tree): Use void* dump_info argument to match 5784 lang-hooks prototype. 5785 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c, 5786 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to 5787 CP_TYPE_QUALS changed to cp_type_quals. 5788 * Make-lang.in: References to c-dump.h changed to tree-dump.h. 5789 (CXX_C_OBJS): Remove c-dump.o. 5790 57912001-11-21 Mark Mitchell <mark@codesourcery.com> 5792 5793 PR c++/3637 5794 * pt.c (lookup_template_class): Ensure that all specializations 5795 are registered on the list corresponding to the most general 5796 template. 5797 57982001-11-20 Mark Mitchell <mark@codesourcery.com> 5799 5800 * call.c (non_reference): Add documentation. 5801 (convert_class_to_reference): Do not strip reference types 5802 from conversion operators. 5803 (maybe_handle_ref_bind): Simplify. 5804 (compare_ics): Correct handling of references. 5805 58062001-11-19 John Wilkinson <johnw@research.att.com> 5807 5808 * dump.c (dump_op): New function. 5809 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use 5810 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs. 5811 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P, 5812 58132001-11-19 Mark Mitchell <mark@codesourcery.com> 5814 5815 PR4629 5816 * semantics.c (finish_sizeof): Make sure that expression created 5817 while processing a template do not have a type. 5818 (finish_alignof): Likewise. 5819 * typeck.c (c_sizeof): Likewise. 5820 (expr_sizeof): Likewise. 5821 58222001-11-18 Neil Booth <neil@daikokuya.demon.co.uk> 5823 5824 * lex.c (cxx_finish): Call c_common_finish. 5825 (finish_parse): Remove. 5826 58272001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5828 5829 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE 5830 when displaying error message about missing array bounds. 5831 58322001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5833 5834 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR, 5835 CONST_CAST_EXPR. 5836 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR. 5837 58382001-11-16 Neil Booth <neil@daikokuya.demon.co.uk> 5839 5840 * cp-tree.h (print_class_statistics): Restore. 5841 58422001-11-15 Jason Merrill <jason@redhat.com> 5843 5844 * method.c (use_thunk): Don't emit debugging information for thunks. 5845 5846 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions. 5847 * decl.c (make_typename_type): Handle getting a class template. 5848 * search.c (lookup_field_r): A class template is good enough for 5849 want_type. 5850 5851 * call.c (convert_like_real): Only use cp_convert for the bad part. 5852 (standard_conversion): Also allow bad int->enum. 5853 * typeck.c (ptr_reasonably_similar): Also allow functions to 5854 interconvert. Pointers to same-size integers are reasonably 5855 similar. 5856 5857 * cvt.c (convert_to_void): If we build a new COND_EXPR, always 5858 give it void type. 5859 58602001-11-15 Nathan Sidwell <nathan@codesourcery.com> 5861 5862 PR g++/3154 5863 * init.c (sort_base_init): Remove unreachable code. 5864 (expand_member_init): Adjust comment to reflect reality. Simplify 5865 and remove unreachable code. 5866 58672001-11-15 Neil Booth <neil@daikokuya.demon.co.uk> 5868 5869 * cp-tree.h (init_reswords, cxx_init_decl_processing): New. 5870 (cxx_init): Update prototype. 5871 * decl.c (init_decl_processing): Rename. Move null node init 5872 to its creation time. 5873 * lex.c (cxx_init_options): Update. 5874 (cxx_init): Combine with old init_parse; also call 5875 cxx_init_decl_processing. 5876 58772001-11-14 Richard Sandiford <rsandifo@redhat.com> 5878 5879 * decl.c (check_initializer): Try to complete the type of an 5880 array element before checking whether it's complete. Don't 5881 complain about arrays with complete element types but an 5882 unknown size. 5883 (cp_finish_decl): Build the hierarchical constructor before 5884 calling maybe_deduce_size_from_array_init. 5885 58862001-11-14 Joseph S. Myers <jsm28@cam.ac.uk> 5887 5888 * Make-lang.in: Change all uses of $(manext) to $(man1ext). 5889 58902001-11-13 Nathan Sidwell <nathan@codesourcery.com> 5891 5892 PR g++/4206 5893 * parse.y (already_scoped_stmt): Remove. 5894 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt. 5895 58962001-11-12 H.J. Lu <hjl@gnu.org> 5897 5898 * cvt.c (ocp_convert): Don't warn the address of a weak 5899 function is always `true'. 5900 59012001-11-09 Neil Booth <neil@daikokuya.demon.co.uk> 5902 5903 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE, 5904 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE, 5905 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override. 5906 * cp-tree.h (print_class_statistics): Remove. 5907 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type, 5908 cxx_print_identifier, cxx_set_yydebug): New. 5909 * lex.c (set_yydebug): Rename c_set_yydebug. 5910 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier, 5911 lang_print_xnode): Rename. 5912 * tree.c (print_lang_statistics): Rename. 5913 59142001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5915 5916 * class.c (dump_array): Fix format specifier warning. 5917 59182001-11-09 Neil Booth <neil@daikokuya.demon.co.uk> 5919 5920 * cp-lang.c (LANG_HOOKS_NAME): Override. 5921 (struct lang_hooks): Constify. 5922 * lex.c (cxx_init_options): Update. 5923 (lang_identify): Remove. 5924 * parse.y (language_string): Remove. 5925 59262001-11-08 Andreas Franck <afranck@gmx.de> 5927 5928 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME, 5929 DEMANGLER_CROSS_NAME): Handle program_transform_name the way 5930 suggested by autoconf. 5931 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define. 5932 (c++.install-common): Use the transformed target alias names. 5933 59342001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk> 5935 5936 * Make-lang.in: Update. 5937 * cp-lang.c: Include langhooks-def.h. 5938 59392001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5940 5941 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR. 5942 59432001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5944 5945 * lex.c (copy_lang_type): Add static prototype. 5946 59472001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5948 5949 * pt.c (unify): Handle SCOPE_REF. 5950 59512001-11-01 Jakub Jelinek <jakub@redhat.com> 5952 5953 * tree.c (cp_copy_res_decl_for_inlining): Adjust 5954 DECL_ABSTRACT_ORIGIN for the return variable. 5955 59562001-10-31 Zack Weinberg <zack@codesourcery.com> 5957 5958 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated. 5959 59602001-10-28 Joseph S. Myers <jsm28@cam.ac.uk> 5961 5962 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c, 5963 semantics.c, spew.c: Fix spelling errors. 5964 59652001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5966 5967 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL. 5968 59692001-10-25 Zack Weinberg <zack@codesourcery.com> 5970 5971 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to 5972 pop_everything. 5973 5974Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 5975 5976 * cp-lang.c (cxx_get_alias_set): New function. 5977 Point LANG_HOOKS_GET_ALIAS_SET to it. 5978 59792001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 5980 5981 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node. 5982 * cp-tree.h (make_unbound_class_template): Prototype new function. 5983 * decl.c (make_unbound_class_template): New function. 5984 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE. 5985 * error.c (dump_type): Likewise. 5986 * mangle.c (write_type): Likewise. 5987 * parse.y (template_parm): Likewise. 5988 (template_argument): Use make_unbound_class_template. 5989 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE. 5990 (tsubst): Likewise. 5991 (tsubst_copy): Likewise. 5992 (unify): Likewise. 5993 * tree.c (walk_tree): Likewise. 5994 * typeck.c (comptypes): Likewise. 5995 59962001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5997 5998 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold 5999 extra calls into fewer ones. 6000 60012001-10-18 Alexandre Oliva <aoliva@redhat.com> 6002 6003 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE. 6004 Warn when merging inline with attribute noinline. 6005 (start_decl, start_function): Warn if inline and attribute 6006 noinline appear in the same declaration. 6007 60082001-10-16 H.J. Lu <hjl@gnu.org> 6009 6010 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined 6011 for tree checking disabled. 6012 60132001-10-16 Hans-Peter Nilsson <hp@axis.com> 6014 6015 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL && 6016 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME. 6017 60182001-10-15 Richard Sandiford <rsandifo@redhat.com> 6019 6020 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define. 6021 (unify): Only handle MINUS_EXPR specially if the above flag is set 6022 and the subtracted constant is 1. Clear the flag on recursive calls. 6023 Set it when unifying the maximum value in an INTEGER_TYPE's range. 6024 60252001-10-15 Richard Sandiford <rsandifo@redhat.com> 6026 6027 * decl.c (bad_specifiers): Don't allow exception specifications 6028 on any typedefs. 6029 60302001-10-14 Neil Booth <neil@daikokuya.demon.co.uk> 6031 6032 * cp/lex.c (init_cp_pragma): Similarly. 6033 60342001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 6035 6036 * pt.c (lookup_template_class): Build complete template arguments 6037 for BOUND_TEMPLATE_TEMPLATE_PARM. 6038 60392001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 6040 6041 * cp-tree.h (TYPE_BINFO): Update comment. 6042 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro. 6043 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info. 6044 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS. 6045 (copy_type): Prototype new function. 6046 * lex.c (copy_lang_decl): Gather tree node statistics. 6047 (copy_lang_type): New function. 6048 (copy_type): Likewise. 6049 (cp_make_lang_type): Create lang_type for 6050 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE 6051 and BOUND_TEMPLATE_TEMPLATE_PARM. 6052 * pt.c (tsubst): Use copy_type instead of copy_node. 6053 * search.c (lookup_field_1): Ignore TYPENAME_TYPE. 6054 60552001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 6056 6057 * pt.c (determine_specialization): Ignore functions without 6058 DECL_TEMPLATE_INFO. 6059 60602001-10-12 Nathan Sidwell <nathan@codesourcery.com> 6061 6062 PR g++/4476 6063 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes. 6064 60652001-10-11 Jason Merrill <jason_merrill@redhat.com> 6066 6067 * typeck2.c (store_init_value): Don't re-digest a bracketed 6068 initializer. 6069 6070 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of 6071 ANON_AGGR_TYPE_P. 6072 60732001-10-11 Richard Henderson <rth@redhat.com> 6074 6075 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead 6076 of an asm statement. 6077 (build_vtbl_ref_1): Split out from build_vtbl_ref. 6078 (build_vfn_ref): Use it to handle vtable descriptors before 6079 calling build_vtable_entry_ref. 6080 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit. 6081 60822001-10-10 Richard Henderson <rth@redhat.com> 6083 6084 * parse.y (asm_operand): Allow named operands. 6085 * semantics.c (finish_asm_stmt): Tweek for changed location 6086 of the operand constrant. 6087 60882001-10-09 Jason Merrill <jason_merrill@redhat.com> 6089 6090 * call.c (standard_conversion): Add bad conversion between 6091 integers and pointers. 6092 (convert_like_real): Don't use convert_for_initialization for bad 6093 conversions; complain here and use cp_convert. 6094 (build_over_call): Don't handle bad conversions specially. 6095 (perform_implicit_conversion): Allow bad conversions. 6096 (can_convert_arg_bad): New fn. 6097 * cp-tree.h: Declare it. 6098 * typeck.c (convert_for_assignment): Use it. 6099 (ptr_reasonably_similar): Any target type is similar to void. 6100 61012001-10-08 Alexandre Oliva <aoliva@redhat.com> 6102 6103 * Make-lang.in (CXX_OBJS): Added cp-lang.o. 6104 (cp/cp-lang.o): New rule. 6105 * cp-tree.h: Declare hooks. 6106 * tree.c: Make hooks non-static. 6107 (init_tree): Don't initialize hooks here. 6108 * lex.c: Likewise. Move definition of lang_hooks to... 6109 * cp-lang.c: ... new file. 6110 61112001-10-08 Richard Henderson <rth@redhat.com> 6112 6113 * cp-tree.h (struct lang_decl_flags): Remove declared_inline. 6114 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl. 6115 61162001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6117 6118 * class.c (build_vtable_entry_ref): Const-ify. 6119 * decl.c (predefined_identifier, 6120 initialize_predefined_identifiers): Likewise. 6121 * init.c (build_new_1): Likewise. 6122 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword): 6123 Likewise. 6124 61252001-10-05 Alexandre Oliva <aoliva@redhat.com> 6126 6127 * optimize.c (struct inline_data): Moved to ../tree-inline.c. 6128 (INSNS_PER_STMT): Likewise. 6129 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise. 6130 (copy_body, initialize_inlined_parameters): Likewise. 6131 (declare_return_variable, inlinable_function_p): Likewise. 6132 (expand_call_inline, expand_calls_inline): Likewise. 6133 (optimize_inline_calls, clone_body): Likewise. 6134 * tree.c (walk_tree): Moved to ../tree-inline.c. 6135 (walk_tree_without_duplicates): Likewise. 6136 (copy_tree_r, remap_save_expr): Likewise. 6137 61382001-10-04 Alexandre Oliva <aoliva@redhat.com> 6139 6140 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h. 6141 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise. 6142 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl. 6143 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h. 6144 (flag_inline_trees): Moved declaration to ../tree-inline.h. 6145 (walk_tree): Moved declaration to ../tree-inline.h. 6146 (walk_tree_without_duplicates, copy_tree_r): Likewise. 6147 (remap_save_expr): Likewise. 6148 * decl.c: Include tree-inline.h. 6149 (lang_mark_tree): Don't mark inlined_fns. 6150 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c. 6151 * optimize.c: Include tree-inline.h. 6152 (optimize_inline_calls): Move declaration to ../tree.h, as 6153 non-static. 6154 (remap_decl): Use language-independent constructs and hooks. 6155 (remap_block, copy_body_r, declare_return_variable): Likewise. 6156 (inlinable_function_p): Likewise. Don't test for 6157 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is 6158 no longer language-specific. 6159 (optimize_inline_calls): Likewise. Make it non-static. Moved 6160 call of dump_function to... 6161 (optimize_function): Here... 6162 (clone_body): New function, extracted from... 6163 (maybe_clone_body): ... here. Build decl_map locally and pass 6164 it on to clone_body. 6165 * pt.c, semantics.c: Include tree-inline.h. 6166 * tree.c: Likewise. 6167 (cp_walk_subtrees): New language-specific hook for tree inlining. 6168 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls, 6169 cp_is_overload_p, cp_auto_var_in_fn_p, 6170 cp_copy_res_decl_for_inlining): Likewise. 6171 (walk_tree): Move language-specific constructs into... 6172 (cp_walk_subtrees): this new function. 6173 (copy_tree_r): Use language-independent constructs and hooks. 6174 (init_tree): Initialize tree inlining hooks. 6175 (remap_save_expr): Adjust prototype so that the declaration 6176 does not require the definition of splay_tree. 6177 61782001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca> 6179 6180 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used 6181 to build the declaration instead of the declaration itself. 6182 61832001-10-02 Jason Merrill <jason_merrill@redhat.com> 6184 6185 * decl2.c (cxx_decode_option): Add 'else'. 6186 6187 * spew.c (end_input): No longer static. 6188 * cp-tree.h: Declare it. 6189 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion. 6190 61912001-10-02 Joseph S. Myers <jsm28@cam.ac.uk> 6192 6193 * call.c (build_over_call), typeck.c (build_function_call_real): 6194 Pass type attributes to check_function_format rather than name or 6195 assembler name. Don't require there to be a name or assembler 6196 name to check formats. 6197 61982001-10-02 Joseph S. Myers <jsm28@cam.ac.uk> 6199 6200 * decl.c (init_decl_processing): Don't call 6201 init_function_format_info. Initialize lang_attribute_table 6202 earlier. 6203 (builtin_function): Call decl_attributes. 6204 (insert_default_attributes): New. 6205 62062001-10-01 Jason Merrill <jason_merrill@redhat.com> 6207 6208 * decl.c (grokdeclarator): Copy array typedef handling from C 6209 frontend. 6210 6211 * decl.c (grokdeclarator): Copy too-large array handling from C 6212 frontend. 6213 62142001-09-29 Alexandre Oliva <aoliva@redhat.com> 6215 6216 * config-lang.in (target_libs): Added target-gperf, so that we 6217 don't try to build it if C++ is disabled. 6218 62192001-09-23 Zack Weinberg <zack@codesourcery.com> 6220 6221 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o. 6222 (cp/errfn.o): Delete rule. 6223 (cp/error.o): Depend on flags.h. 6224 * errfn.c: Delete file. 6225 * cp-tree.h: Declare warn_deprecated. Remove definitions of 6226 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, 6227 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning, 6228 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and 6229 internal_error respectively. Make cp_deprecated into a macro. 6230 Don't define cp_printer typedef or declare cp_printers. 6231 * error.c: Include flags.h. 6232 Delete: struct tree_formatting_info, print_function_argument_list, 6233 print_declaration, print_expression, print_function_declaration, 6234 print_function_parameter, print_type_id, print_cv_qualifier_seq, 6235 print_type_specifier_seq, print_simple_type_specifier, 6236 print_elaborated_type_specifier, print_rest_of_abstract_declarator, 6237 print_parameter_declaration_clause, print_exception_specification, 6238 print_nested_name_specifier, and definition of cp_printers. 6239 (locate_error): New function. 6240 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and 6241 rewritten in terms of locate_error and diagnostic.c. 6242 (cp_tree_printer): Rename cp_printer; wire up to *_to_string 6243 instead of deleted print_* routines. Handle %C, %L, %O, %Q also. 6244 (init_error): Adjust to match. 6245 6246Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 6247 6248 * Make-lang.in (CXX_C_OBJS): Add attribs.o. 6249 62502001-09-21 Richard Henderson <rth@redhat.com> 6251 6252 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS. 6253 (build_vtbl_initializer): Likewise. 6254 (build_vfn_ref): New. 6255 * cp-tree.h: Declare it. 6256 * call.c (build_over_call): Use it. 6257 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR. 6258 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors. 6259 6260Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com> 6261 6262 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration. 6263 62642001-09-21 Joseph S. Myers <jsm28@cam.ac.uk> 6265 6266 Table-driven attributes. 6267 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES. 6268 * decl2.c (cplus_decl_attributes): Only take one attributes 6269 parameter. 6270 * cp-tree.c (cplus_decl_attributes): Update prototype. 6271 * class.c (finish_struct), decl.c (start_decl, start_function), 6272 decl2.c (grokfield), friend.c (do_friend), parse.y 6273 (parse_bitfield): Update calls to cplus_decl_attributes. 6274 * decl.c (grokdeclarator): Take a pointer to a single ordinary 6275 attribute list. 6276 * decl.h (grokdeclarator): Update prototype. 6277 * decl2.c (grokfield): Take a single ordinary attribute list. 6278 * friend.c (do_friend): Likewise. 6279 * decl.c (shadow_tag, groktypename, start_decl, 6280 start_handler_parms, grokdeclarator, grokparms, start_function, 6281 start_method), decl2.c (grokfield, grokbitfield, grokoptypename), 6282 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c 6283 (process_template_parm, do_decl_instantiation): Pass single 6284 ordinary attribute lists around. 6285 * decl.c (grokdeclarator): Correct handling of nested attributes. 6286 Revert the patch 6287 1998-10-18 Jason Merrill <jason@yorick.cygnus.com> 6288 * decl.c (grokdeclarator): Embedded attrs bind to the right, 6289 not the left. 6290 . 6291 * cp-tree.h (cp_valid_lang_attribute): Remove declaration 6292 (cp_attribute_table): Declare. 6293 * decl.c (valid_lang_attribute): Don't define. 6294 (lang_attribute_table): Define. 6295 (init_decl_processing): Initialize lang_attribute_table instead of 6296 valid_lang_attribute. 6297 * tree.c (cp_valid_lang_attribute): Remove. 6298 (handle_java_interface_attribute, handle_com_interface_attribute, 6299 handle_init_priority_attribute): New functions. 6300 (cp_attribute_table): New array. 6301 * decl2.c (import_export_class): Don't use 6302 targetm.valid_type_attribute. 6303 63042001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 6305 6306 * Make-lang.in (cp/error.o): Depend on real.h 6307 * error.c: #include "real.h" 6308 63092001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6310 6311 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of 6312 xmalloc/strcpy/strcat. 6313 63142001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6315 6316 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl): 6317 Const-ification. 6318 * pt.c (tsubst_decl): Likewise. 6319 63202001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6321 6322 * decl2.c (lang_f_options): Const-ification. 6323 * lex.c (cplus_tree_code_name): Likewise. 6324 * spew.c (yyerror): Likewise. 6325 63262001-09-06 Nathan Sidwell <nathan@codesourcery.com> 6327 6328 PR c++/3986 6329 * class.c (force_canonical_binfo_r): Check & move an indirect 6330 primary base first. 6331 (force_canonical_binfo): Check that it's not already 6332 canonical. 6333 (mark_primary_virtual_base): Remove BINFO parameter. 6334 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here. 6335 63362001-09-06 Nathan Sidwell <nathan@codesourcery.com> 6337 6338 Remove TYPE_NONCOPIED_PARTS. 6339 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto 6340 CLASSTYPE_PURE_VIRTUALS. 6341 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO. 6342 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS. 6343 (layout_class_type): Don't call fixup_inline_methods here ... 6344 (finish_struct_1): ... call it here. 6345 63462001-09-04 Mark Mitchell <mark@codesourcery.com> 6347 6348 * decl.c (duplicate_decls): Remove code deadling with 6349 DECL_SAVED_INSNS. 6350 * decl2.c (finish_file): Likewise. 6351 * pt.c (instantiate_decl): Likewise. 6352 * semantics.c (expand_body): Don't defer local functions if 6353 they wouldn't be deferred for some other reason. Don't 6354 generate RTL for functions that will not be emitted. 6355 (genrtl_start_function): Remove code deadling with 6356 DECL_SAVED_INSNS. 6357 (genrtl_finish_function): Likewise. 6358 63592001-09-04 Nathan Sidwell <nathan@codesourcery.com> 6360 6361 PR c++/4203 6362 * call.c (build_over_call): Do not optimize any empty base 6363 construction. 6364 63652001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 6366 6367 * error.c (dump_template_decl): Output template parameters 6368 together with their specifiers. 6369 Output `class' prefix for template template parameter. 6370 (dump_decl): Fix formatting. 6371 63722001-08-30 Kurt Garloff <garloff@suse.de> 6373 6374 * optimize.c (inlinable_function_p): Allow only smaller single 6375 functions. Halve inline limit after reaching recursive limit. 6376 63772001-08-30 Joern Rennecke <amylaar@redhat.com> 6378 Jason Merrill <jason_merrill@redhat.com> 6379 6380 * class.c (build_vtable_entry_ref): Subtract in char*, not 6381 ptrdiff_t. 6382 63832001-08-23 Jason Merrill <jason_merrill@redhat.com> 6384 6385 * tree.c (cp_build_qualified_type_real): Use get_qualified_type. 6386 (build_cplus_array_type): Use cp_build_qualified_type, not 6387 TYPE_MAIN_VARIANT, to get an unqualified version. 6388 6389 * decl2.c (grok_alignof): Lose. 6390 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr. 6391 * typeck.c (c_alignof): Lose. 6392 * semantics.c (finish_sizeof, finish_alignof): New. 6393 * parse.y: Use them. 6394 * cp-tree.h: Declare them. 6395 63962001-08-22 Jason Merrill <jason_merrill@redhat.com> 6397 6398 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement. 6399 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK. 6400 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement. 6401 64022001-08-19 Jakub Jelinek <jakub@redhat.com> 6403 6404 * typeck2.c (add_exception_specifier): Only require complete type if 6405 not in processing template declaration. 6406 64072001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6408 6409 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to 6410 GNU_xref_start_scope and GNU_xref_end_scope. 6411 6412 * tree.c (TYPE_HASH): Moved to ../tree.h. 6413 64142001-08-16 Mark Mitchell <mark@codesourcery.com> 6415 6416 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS 6417 on COMPOUND_EXPRs. 6418 64192001-08-14 Richard Henderson <rth@redhat.com> 6420 6421 * class.c, cp-tree.h (build_vfn_ref): Remove. 6422 * call.c, rtti.c: Replace all refernces with build_vtbl_ref. 6423 64242001-08-13 Mark Mitchell <mark@codesourcery.com> 6425 6426 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for 6427 empty class assignment as having side-effects to avoid 6428 spurious warnings. 6429 64302001-08-13 Zack Weinberg <zackw@panix.com> 6431 6432 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies. 6433 * except.c: Include libfuncs.h. 6434 64352001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 6436 6437 * decl.c (grokdeclarator): Clarify diagnostic message. 6438 64392001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 6440 6441 * decl2.c (do_nonmember_using_decl): Replace using directive 6442 with using declaration in the error message. 6443 64442001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 6445 6446 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the 6447 criterion to avoid rebuilding expression tree instead of 6448 processing_template_decl. 6449 64502001-08-07 Jason Merrill <jason_merrill@redhat.com> 6451 6452 Support named return value optimization for inlines, too. 6453 * decl.c (finish_function): Nullify returns here. 6454 * semantics.c (genrtl_start_function): Not here. 6455 (cp_expand_stmt): Don't mess with CLEANUP_STMTs. 6456 (nullify_returns_r): No longer static. Just clear RETURN_EXPR. 6457 Also nullify the CLEANUP_STMT for the nrv. 6458 * cp-tree.h: Declare it. 6459 * optimize.c (declare_return_variable): Replace the nrv with the 6460 return variable. 6461 * typeck.c (check_return_expr): Be more flexible on alignment check. 6462 Ignore cv-quals when checking for a matching type. 6463 64642001-08-09 Richard Henderson <rth@redhat.com> 6465 6466 * decl2.c (finish_objects): Use target hooks instead of 6467 assemble_constructor and assemble_destructor. 6468 64692001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca> 6470 6471 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'. 6472 64732001-08-07 Nathan Sidwell <nathan@codesourcery.com> 6474 6475 PR c++/3820 6476 Stop using TYPE_NONCOPIED_PARTS. 6477 * call.c (build_over_call): Be careful when copy constructing 6478 or assigning to an empty class. 6479 * class.c (check_bases_and_members): It has a 6480 COMPLEX_ASSIGN_REF if it has a vptr. 6481 (layout_class_type): Don't add empty class padding to 6482 TYPE_NONCOPIED_PARTS. 6483 (finish_struct_1): Don't add the VFIELD either. 6484 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_ 6485 initialization. 6486 64872001-08-07 Jason Merrill <jason_merrill@redhat.com> 6488 6489 * tree.c (walk_tree): Walk siblings even if !walk_subtrees. 6490 64912001-08-06 Richard Henderson <rth@redhat.com> 6492 6493 * decl2.c (finish_objects): Pass a symbol_ref and priority to 6494 assemble_{constructor,destructor}. Remove priority handling. 6495 64962001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 6497 6498 Don't allow template-id in using-declaration. 6499 * decl2.c (validate_nonmember_using_decl): Handle template-ids. 6500 (do_class_using_decl): Likewise. 6501 65022001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk> 6503 6504 * cp/spew.c (read_token): No need to pop buffers. 6505 65062001-08-02 Stan Shebs <shebs@apple.com> 6507 6508 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used. 6509 (fnaddr_from_vtable_entry): Remove decl. 6510 * method.c (use_thunk): Update comment. 6511 65122001-08-01 Andrew Cagney <ac131313@redhat.com> 6513 6514 * repo.c (get_base_filename): Change return value to const char 6515 pointer. 6516 65172001-08-02 Nathan Sidwell <nathan@codesourcery.com> 6518 6519 Kill -fhonor-std. 6520 * NEWS: Document. 6521 * cp-tree.h (flag_honor_std): Remove. 6522 (CPTI_FAKE_STD): Remove. 6523 (std_node): Remove comment about it being NULL. 6524 (fake_std_node): Remove. 6525 * decl.c (in_fake_std): Remove. 6526 (walk_namespaces_r): Remove fake_std_node check. 6527 (push_namespace): Remove in_fake_std code. 6528 (pop_namespace): Likewise. 6529 (lookup_name_real): Remove fake_std_node check. 6530 (init_decl_processing): Always create std_node. Always add 6531 std:: things there. 6532 (builtin_function): Always put non '_' fns in std. 6533 * decl2.c (flag_honor_std): Remove. 6534 (lang_f_options): Remove honor-std. 6535 (unsupported_options): Add honor-std. 6536 (set_decl_namespace): Remove fake_std_node check. 6537 (validate_nonmember_using_decl): Likewise. 6538 (do_using_directive): Likewise. 6539 (handle_class_head): Likewise. 6540 * dump.c (cp_dump_tree): Likewise. 6541 * except.c (init_exception_processing): Adjust. 6542 * init.c (build_member_call): Remove fake_std_node check. 6543 (build_offset_ref): Likewise. 6544 * lang-options.h: Remove -fhonor-std, -fno-honor-std. 6545 * rtti.c (init_rtti_processing): Adjust. 6546 65472001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com> 6548 6549 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second 6550 operand while calling cp_tree_equal. 6551 65522001-07-31 Nathan Sidwell <nathan@codesourcery.com> 6553 6554 The 3.0 ABI no longer has vbase pointer fields. 6555 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P, 6556 FORMAT_VBASE_NAME): Remove. 6557 * method.c (do_build_copy_constructor): Adjust. 6558 (do_build_assign_ref): Adjust. 6559 * search.c (lookup_field_r): Adjust. 6560 * typeck.c (build_component_ref): Adjust. 6561 6562 The 3.0 ABI always has a vtable pointer at the start of every 6563 polymorphic class. 6564 * rtti.c (build_headof_sub): Remove. 6565 (build_headof): Adjust. 6566 (get_tinfo_decl_dynamic): No need to check flag_rtti 6567 here. Adjust. 6568 (create_real_tinfo_var): Explain why we need a hidden name. 6569 65702001-07-31 Nathan Sidwell <nathan@codesourcery.com> 6571 6572 PR c++/3631 6573 * class.c (update_vtable_entry_for_fn): The fixed adjustment 6574 of a virtual thunk should be from declaring base. 6575 65762001-07-31 Nathan Sidwell <nathan@codesourcery.com> 6577 6578 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into 6579 the shared virtual base, so preserving inheritance graph order. 6580 65812001-07-30 Andreas Jaeger <aj@suse.de> 6582 6583 * decl2.c: Remove unused var global_temp_name_counter. 6584 65852001-07-28 Richard Henderson <rth@redhat.com> 6586 6587 * method.c (pending_inlines): Remove. 6588 65892001-07-27 Nathan Sidwell <nathan@codesourcery.com> 6590 6591 * class.c (mark_primary_virtual_base): Don't adjust base 6592 offsets here. 6593 (dfs_unshared_virtual_bases): Adjust them here. 6594 (mark_primary_bases): Explain why we adjust at the end. 6595 65962001-07-27 Nathan Sidwell <nathan@codesourcery.com> 6597 6598 * class.c (finish_struct_1): When copying the primary base's 6599 VFIELD, make sure we find it is at offset zero. 6600 66012001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 6602 6603 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and 6604 tsubst_expr for default template arguments. 6605 66062001-07-26 Nathan Sidwell <nathan@codesourcery.com> 6607 6608 PR c++/3621 6609 * spew.c (yylex): Only copy the token's lineno, if it is 6610 nonzero. 6611 66122001-07-26 Nathan Sidwell <nathan@codesourcery.com> 6613 6614 PR c++/3624 6615 * call.c (resolve_args): Simplify, call 6616 convert_from_reference. 6617 (build_new_op): Resolve and convert from reference ARG1 6618 earlier. Adjust ARG2 & ARG3 resolve and conversion. 6619 66202001-07-26 Nathan Sidwell <nathan@codesourcery.com> 6621 6622 * decl.c (last_function_parm_tags): Remove. 6623 (current_function_parm_tags): Remove. 6624 (init_decl_processing): Adjust. 6625 (start_function): Adjust. 6626 (store_parm_decls): Adjust. 6627 6628 PR c++/3152 6629 * decl.c (grokdeclarator): Detect when a function typedef is 6630 declaring a function, and create last_function_parms correctly. 6631 66322001-07-25 Jason Merrill <jason_merrill@redhat.com> 6633 6634 * call.c (joust): Only prefer a non-builtin candidate to a builtin 6635 one if they have the same signature. 6636 6637 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on 6638 it rather than toplevel_bindings_p. Give it a mangled name if static. 6639 (convert_to_reference): Adjust. 6640 * decl2.c (get_temp_name): Lose. 6641 * mangle.c (mangle_ref_init_variable): New fn. 6642 (mangle_guard_variable): Strip the ref-init header. 6643 * cp-tree.h: Adjust. 6644 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the 6645 initializer. 6646 (grok_reference_init): Always use DECL_INITIAL. 6647 66482001-07-25 Nathan Sidwell <nathan@codesourcery.com> 6649 6650 PR c++/3416 6651 * call.c (build_conditional_expr): Recheck args after 6652 conversions. 6653 * cp-tree.h (build_conditional_expr): Move to correct file. 6654 * typeck.c (decay_conversion): Diagnose any unknown types 6655 reaching here. 6656 (build_binary_op): Don't do initial decay or default 6657 conversions on overloaded functions. 6658 (build_static_cast): Don't do a decay conversion here. 6659 66602001-07-25 Nathan Sidwell <nathan@codesourcery.com> 6661 6662 PR c++/3543 6663 * typeck.c (condition_conversion): Resolve an OFFSET_REF. 6664 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here. 6665 66662001-07-25 Nathan Sidwell <nathan@codesourcery.com> 6667 6668 * class.c (build_vtbl_or_vbase_field): Remove, move into ... 6669 (create_vtbl_ptr): ... here. 6670 66712001-07-25 Nathan Sidwell <nathan@codesourcery.com> 6672 6673 * class.c (build_vbase_offset_vbtl_entries): Look for 6674 non-primary base of which we are a sub vtable. 6675 66762001-07-24 Phil Edwards <pme@sources.redhat.com> 6677 6678 * semantics.c (finish_this_expr): Remove unused code. 6679 66802001-07-24 Nathan Sidwell <nathan@codesourcery.com> 6681 6682 Simplify rtti, now we've only one ABI. 6683 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID, 6684 CPTI_TINFO_VAR_ID. 6685 (tinfo_decl_id, tinfo_var_id): Remove. 6686 (get_typeid_1): Remove. 6687 * rtti.c 6688 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id. 6689 (typeid_ok_p): New function. 6690 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl. 6691 (get_tinfo_decl): Remove old abi documentation. 6692 (tinfo_from_decl): Remove. 6693 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1. 6694 (get_typeid_1): Remove. 6695 (get_base_offset): Remove. 6696 (synthesize_tinfo_var): Absorb get_base_offset. 6697 (create_real_tinfo_var): Don't use tinfo_decl_id. 6698 66992001-07-23 Graham Stott <grahams@redhat.com> 6700 6701 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized 6702 variable has_two_argument_delete_p. 6703 67042001-07-21 Nathan Sidwell <nathan@codesourcery.com> 6705 6706 Remove flag_vtable_thunk. It is always on for the 3.0 ABI. 6707 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove. 6708 (CPTI_INDEX_IDENTIFIER): Remove. 6709 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove. 6710 (delta2_identifier): Remove. 6711 (index_identifier): Remove. 6712 (pfn_or_delta2_identifier): Remove. 6713 (flag_vtable_thunks): Remove. 6714 (VTABLE_DELTA2_NAME): Remove. 6715 (VTABLE_INDEX_NAME): Remove. 6716 (FNADDR_FROM_VTABLE_ENTRY): Adjust. 6717 (vfunc_ptr_type_node): Adjust. 6718 (VTABLE_NAME_PREFIX): Adjust. 6719 (build_vfn_ref): Lose first parameter. 6720 (fixup_all_virtual_upcast_offsets): Remove. 6721 * decl.c (initialize_predefined_identifiers): Remove 6722 delta2_identifier, index_identifier, pfn_or_delta2_identifier. 6723 (init_decl_processing): Remove no-vtable-thunk code. 6724 * decl2.c (flag_vtable_thunks): Remove. 6725 (mark_vtable_entries): Remove no-vtable-thunk code. 6726 * error.c (dump_decl): Remove no-vtable-thunk code. 6727 (dump_expr): Adjust ptr to member function code. 6728 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk 6729 code. 6730 * rtti.c (build_headof): Remove no-vtable-thunk code. 6731 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call. 6732 * search.c (get_base_distance): Remove expand_upcast_fixups case. 6733 (virtual_context) Remove. 6734 (expand_upcast_fixups): Remove. 6735 (fixup_virtual_upcast_offsets): Remove. 6736 (fixup_all_virtual_upcast_offsets): Remove. 6737 * typeck.c (get_member_function_from_ptrfunc): Remove 6738 no-vtable-thunk code. 6739 * call.c (build_over_call): Adjust call to build_vfn_ref. 6740 * class.c (build_vfn_ref): Lose first parameter. Remove 6741 no-vtable-thunk code. 6742 (build_rtti_vtbl_entries): Remove no-vtable-thunk code. 6743 (build_vtable_entry): Remove no-vtable-thunk code. 6744 67452001-07-20 Nathan Sidwell <nathan@codesourcery.com> 6746 6747 Remove old-abi remnants. Remove comments about old abi 6748 behavior. Remove references to 'new-abi' in comments. 6749 * cp-tree.h: Adjust comments. 6750 (vbase_offsets_in_vtable_p): Delete. 6751 (vcall_offsets_in_vtable_p): Delete. 6752 (vptrs_present_everywhere_p): Delete. 6753 (all_overridden_vfuns_in_vtables_p): Delete. 6754 (merge_primary_and_secondary_vtables_p): Delete. 6755 (TYPE_CONTAINS_VPTR_P): Adjust. 6756 (VTT_NAME_PREFIX): Remove. 6757 (CTOR_VTBL_NAME_PREFIX): Remove. 6758 (init_vbase_pointers): Remove. 6759 * class.c: Adjust coments. 6760 (build_vbase_pointer_fields): Delete. 6761 (build_vbase_pointer): Remove old-abi code. 6762 (build_secondary_vtable): Likewise. 6763 (modify_all_vtables): Likewise. 6764 (create_vtable_ptr): Likewise. 6765 (layout_class_type): Likewise. 6766 (finish_struct_1): Likewise. 6767 (finish_vtbls): Likewise. 6768 (dfs_finish_vtbls): Delete. 6769 (build_vbase_offset_vtbl_entries): Remove old-abi code. 6770 * cvt.c: Adjust comments. 6771 * decl.c: Adjust comments. 6772 * decl2.c: Adjust comments. 6773 * init.c: Adjust comments. 6774 (construct_virtual_bases): Remove old-abi code. 6775 * lang-specs.h: Remove -fno-new-abi. 6776 * mangle.c: Adjust comments. 6777 * rtti.c: Adjust comments. 6778 (get_base_offset): Remove old-abi-code. 6779 * search.c: Adjust comments. 6780 (dfs_init_vbase_pointers): Remove. 6781 (dfs_vtable_path_unmark): Remove. 6782 (init_vbase_pointers): Remove. 6783 * semantics.c: Adjust comments. 6784 (emit_associated_thunks): Remove old-abi code. 6785 * typeck.c: Adjust comments. 6786 67872001-07-20 Daniel Berlin <dan@cgsoftware.com> 6788 6789 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not 6790 params.h. 6791 67922001-07-19 Mark Mitchell <mark@codesourcery.com> 6793 6794 * class.c (finish_struct_anon): Forbid nested classes. 6795 67962001-07-19 Neil Booth <neil@daikokuya.demon.co.uk> 6797 6798 * decl2.c: Don't include dwarfout.h and dwarf2out.h. 6799 * optimize.c: Include debug.h. 6800 (maybe_clone_body): Use debug hook. 6801 * semantics.c: Include debug.h. 6802 (expand_body): Use debug hook. 6803 68042001-07-19 Neil Booth <neil@daikokuya.demon.co.uk> 6805 6806 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases. 6807 68082001-07-18 Mark Mitchell <mark@codesourcery.com> 6809 6810 * class.c (type_requires_array_cookie): New function. 6811 (check_methods): Don't try to figure out whether the type needs a 6812 cookie here. 6813 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here. 6814 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove. 6815 (TYPE_VEC_NEW_USES_COOKIE): Reimplement. 6816 * pt.c (instantiate_class_template): Don't set 6817 TYPE_VEC_DELETE_TAKES_SIZE. 6818 * NEWS: Document ABI changes from GCC 3.0. 6819 68202001-07-18 Xavier Delacour <xavier@fmaudio.net>, 6821 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> 6822 6823 * NEWS (Changes in GCC 3.0): Fix typo. 6824 68252001-07-13 Joseph S. Myers <jsm28@cam.ac.uk> 6826 6827 * decl2.c (cplus_decl_attributes): Take a pointer to the node to 6828 which attributes are to be attached, and a flags argument. Update 6829 call to decl_attributes. 6830 (grokfield): Update call to decl_attributes. 6831 * class.c (finish_struct): Update call to cplus_decl_attributes. 6832 * cp-tree.h (cplus_decl_attributes): Update prototype. 6833 * decl.c (start_decl, grokdeclarator, start_function): Update 6834 calls to decl_attributes and cplus_decl_attributes. 6835 * friend.c (do_friend): Update call to cplus_decl_attributes. 6836 * parse.y (parse_bitfield): Update call to cplus_decl_attributes. 6837 68382001-07-12 Mark Mitchell <mark@codesourcery.com> 6839 6840 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER 6841 for `register' variables with an asm-specification. 6842 68432001-07-11 Mark Mitchell <mark@codesourcery.com> 6844 6845 * semantics.c (finish_asm_stmt): Mark the output operands 6846 to an asm addressable, if necessary. 6847 68482001-07-11 Ben Elliston <bje@redhat.com> 6849 6850 * Revert this change -- there is a subtle bug. 6851 6852 PR c++/80 6853 * decl.c (finish_enum): New "attributes" argument; pass it to 6854 cplus_decl_attributes. Use a narrower type if the enum is packed. 6855 * cp-tree.h (finish_enum): Adjust prototype. 6856 * parse.y (enum_head): New non-terminal. 6857 (structsp): Use it. Enums now may be preceded or followed by 6858 optional attributes -- pass their chained tree to finish_enum(). 6859 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument. 6860 68612001-07-10 Mark Mitchell <mark@codesourcery.com> 6862 6863 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope 6864 variables. 6865 68662001-07-10 Jason Merrill <jason_merrill@redhat.com> 6867 6868 * semantics.c (cp_expand_stmt): Fix for null 6869 current_function_return_value. 6870 68712001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl> 6872 6873 * call.c (build_op_delete_call): Initialize fn. 6874 (convert_like_real): Delete conditional. 6875 (joust): Initialize *w and *l. 6876 * class.c: Add prototype for binfo_ctor_vtable. 6877 (get_primary_binfo): Initialize result. 6878 * init.c (build_java_class_ref): Initialize name. 6879 68802001-07-09 Erik Rozendaal <dlr@acm.org> 6881 6882 * typeck.c (unary_complex_lvalue): Do not duplicate the 6883 argument to modify, pre-, or post-increment when used as an 6884 lvalue and when the argument has side-effects. 6885 68862001-07-08 Joseph S. Myers <jsm28@cam.ac.uk> 6887 6888 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES. 6889 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call 6890 cplus_decl_attributes even if attrs is NULL. 6891 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES. 6892 68932001-07-08 Joseph S. Myers <jsm28@cam.ac.uk> 6894 6895 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update 6896 calls to decl_attributes. 6897 68982001-07-06 Ira Ruben <ira@apple.com> 6899 6900 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should 6901 be DECL_TEMPLATE_RESULT. 6902 69032001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 6904 6905 * cp-tree.h (copy_template_template_parm): Rename to ... 6906 (bind_template_template_parm): ... here. 6907 * tree.c (copy_template_template_parm): Rename to ... 6908 (bind_template_template_parm): ... here. Remove the case when 6909 NEWARGS is NULL_TREE. 6910 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and 6911 BOUND_TEMPLATE_TEMPLATE_PARM. 6912 * pt.c (lookup_template_class): Adjust. 6913 69142001-07-05 Jason Merrill <jason_merrill@redhat.com> 6915 6916 * cvt.c (convert_lvalue): New fn. 6917 * cp-tree.h: Declare it. 6918 * method.c (do_build_assign_ref): Use it. 6919 (do_build_copy_constructor): Convert parm to base types 6920 before calling base constructors. 6921 6922 * typeck.c (check_return_expr): Check DECL_ALIGN instead of 6923 DECL_USER_ALIGN. Check flag_elide_constructors instead of 6924 optimize. 6925 * semantics.c (cp_expand_stmt): Don't destroy the named return value. 6926 69272001-07-02 Nathan Sidwell <nathan@codesourcery.com> 6928 6929 * optimize.c (optimize_inline_calls): New function, broken out 6930 of ... 6931 (optimize_function): ... here. Call it. Don't inline if it is 6932 a thunk. 6933 (dump_function): Print name of dump flag causing this dump. 6934 * semantics.c (expand_body): Move thunk inline check to 6935 optimize_function. 6936 69372001-06-29 Joseph S. Myers <jsm28@cam.ac.uk> 6938 6939 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define. 6940 (comptypes): Use target.comp_type_attributes. 6941 69422001-06-29 Nathan Sidwell <nathan@codesourcery.com> 6943 6944 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration. 6945 69462001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com> 6947 6948 * error.c (lang_print_error_function): Add a `diagnostic_context *' 6949 parameter. Tweak. 6950 69512001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk> 6952 6953 * decl2.c (import_export_class): Update. 6954 69552001-06-26 Gabriel Dos Reis <gdr@codesourcery.com> 6956 6957 * error.c (init_error): Adjust settings. 6958 69592001-06-26 Gabriel Dos Reis <gdr@codesourcery.com> 6960 6961 * error.c (init_error): Adjust settings. 6962 69632001-06-19 Richard Sandiford <rsandifo@redhat.com> 6964 6965 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to 6966 return pointers to data members by reference rather than by value. 6967 69682001-06-18 Jason Merrill <jason_merrill@redhat.com> 6969 6970 Implement the Named Return Value optimization. 6971 * cp-tree.h (struct cp_language_function): Add x_return_value. 6972 (current_function_return_value): Now a macro. 6973 * decl.c: Don't define it. 6974 (define_label, finish_case_label): Don't clear it. 6975 (init_decl_processing): Don't register it with GC. 6976 * semantics.c (genrtl_finish_function): Don't check it for 6977 no_return_label. Copy the RTL from the return value to 6978 current_function_return_value and walk, calling... 6979 (nullify_returns_r): ...this new fn. 6980 * typeck.c (check_return_expr): Set current_function_return_value. 6981 69822001-06-15 Jason Merrill <jason_merrill@redhat.com> 6983 6984 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're 6985 sharing a ctor vtable with. Merge code for cases 1 and 2. 6986 (binfo_ctor_vtable): New fn. 6987 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it. 6988 69892001-06-14 Jason Merrill <jason_merrill@redhat.com> 6990 6991 * class.c (dfs_find_final_overrider): Fix logic. 6992 6993 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use 6994 virtual thunk instead of non-virtual. 6995 (get_matching_virtual): Uncomment. 6996 6997 * pt.c (unify): Don't recurse between the POINTER_TYPE and the 6998 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on 6999 PARM, not ARG. 7000 70012001-06-14 Nathan Sidwell <nathan@codesourcery.com> 7002 7003 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure 7004 we've not emerged from the hierarchy of RTTI_BINFO on reaching 7005 a non-virtual base. 7006 70072001-06-13 Mark Mitchell <mark@codesourcery.com> 7008 7009 * NEWS: Update release number. 7010 70112001-06-12 Nathan Sidwell <nathan@codesourcery.com> 7012 7013 PR c++/3130, c++/3131, c++/3132 7014 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define. 7015 * class.c (force_canonical_binfo_r): Move 7016 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move 7017 virtual bases unless they're primary and what they're primary 7018 too has been moved. 7019 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope 7020 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and 7021 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most 7022 derived binfo. 7023 (mark_primary_bases): Use BINFO_UNSHARED_MARKED. 7024 (layout_nonempty_base_or_field): Add most derived type 7025 parameter. Adjust. 7026 (layout_empty_base): Likewise. 7027 (build_base_field): Likewise. 7028 (build_base_fields): Likewise. 7029 (propagate_binfo_offsets): Add most derived type 7030 parameter. Skip non canonical virtual bases too. 7031 (dfs_set_offset_for_unshared_vbases): Don't skip primary 7032 bases. Do skip canonical bases. 7033 (layout_virtual_bases): Adjust. 7034 (layout_class_type): Adjust. 7035 (dfs_get_primary_binfo): Build list of virtual primary base 7036 candidates. 7037 (get_primary_binfo): Check that the shared virtual primary 7038 base candidate was found first. 7039 (accumulate_vtbl_inits): Don't do anything for non-vptr 7040 containing binfos. For case 1 primary virtual bases, keep 7041 checking that we've not emerged from the hierarchy of RTTI_BINFO. 7042 70432001-06-12 Nathan Sidwell <nathan@codesourcery.com> 7044 7045 PR c++/3089 7046 * class.c (dfs_accumulate_vtbl_inits): Always walk down the 7047 hierarchy looking for primary bases for a ctor 7048 vtable. Recursively call oneself, if we meet our primary via 7049 this route and haven't met it yet via inheritance graph order. 7050 70512001-06-11 Mark Mitchell <mark@codesourcery.com> 7052 7053 * lang-options.h: Emit documentation for -fno-honor-std, not 7054 -fhonor-std. 7055 70562001-06-10 Alexandre Oliva <aoliva@redhat.com> 7057 7058 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]: 7059 Don't clobber delta. 7060 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn. 7061 70622001-06-10 Mark Mitchell <mark@codesourcery.com> 7063 Gabriel Dos Reis <gdr@codesourcery.com> 7064 7065 * Make-lang.in (cp/call.o): Depend on diagnostic.h 7066 (cp/typeck.o): Depend on diagnostic.h 7067 (cp/typeck2.o): Depend on diagnostic.h 7068 (cp/repo.o): Depend on dignostic.h 7069 * typeck.c: #include diagnostic.h 7070 (convert_for_initialization): Remove extern declaration for 7071 warningcount and errorcount. 7072 7073 * call.c: #include diagnostic.h 7074 (convert_like_real): Remove extern declaration for warnincount and 7075 errorcount. 7076 7077 * repo.c: #include diagnostic.h 7078 * typeck2.c: #include diagnostic.h 7079 70802001-06-08 Nathan Sidwell <nathan@codesourcery.com> 7081 7082 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko 7083 in previous change. 7084 70852001-06-08 Nathan Sidwell <nathan@codesourcery.com> 7086 7087 PR c++/2929 7088 * friend.c (do_friend): Use push_decl_namespace for classes at 7089 namespace scope. 7090 70912001-06-08 Nathan Sidwell <nathan@codesourcery.com> 7092 Jason Merrill <jason_merrill@redhat.com> 7093 7094 PR c++/3061 7095 * class.c (build_secondary_vtable): Use assert, rather than an error 7096 message. 7097 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL. 7098 (dfs_accumulate_vtbl_inits): A lost primary virtual base may 7099 be between ORIG_BINFO and RTTI_BINFO, but neither of them. 7100 Don't set BINFO_VTABLE for a primary virtual base. 7101 71022001-06-07 Mark Mitchell <mark@codesourcery.com> 7103 7104 * decl.c (duplicate_decls): Update source position information 7105 when a template function is defined. 7106 71072001-06-07 Phil Edwards <pme@sources.redhat.com> 7108 7109 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h. 7110 71112001-06-07 Nathan Sidwell <nathan@codesourcery.com> 7112 7113 PR c++/2914 7114 * decl.c (pushtag): Don't push into a complete type's scope. 7115 71162001-06-06 Jason Merrill <jason_merrill@redhat.com> 7117 7118 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose. 7119 (struct lang_decl_flags): Lose generate_with_vtable_p. 7120 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose. 7121 * class.c (copy_virtuals): Adjust. 7122 * decl2.c (mark_vtable_entries): Adjust. 7123 * method.c (make_thunk, build_vtable_entry): Adjust. 7124 * class.c (update_vtable_entry_for_fn): Only look as far as the 7125 first defining class. 7126 (build_vtbl_initializer): Put nothing in the slot for a function only 7127 defined in a lost primary virtual base. 7128 (add_vcall_offset_vtbl_entries_1): Use the same code for 7129 the lost primary case and the normal case. 7130 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base. 7131 (get_vfield_offset, get_derived_offset): Lose. 7132 (dfs_find_final_overrider): Use look_for_overrides_here. 7133 (get_matching_virtual): New fn. 7134 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P, 7135 not BV_VCALL_INDEX. 7136 * search.c (look_for_overrides_here): Split out from... 7137 (look_for_overrides_r): Here. 7138 7139 * class.c (find_final_overrider): Return error_mark_node on error. 7140 7141 * decl2.c (key_method): #if 0 accidental change. 7142 71432001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca> 7144 7145 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P. 7146 (build_over_call): Likewise. 7147 * decl.c (grokparms): Likewise. 7148 * pt.c (tsubst_decl): Likewise. 7149 * typeck.c (convert_arguments): Likewise. 7150 71512001-06-05 Mark Mitchell <mark@codesourcery.com> 7152 7153 * semantics.c (begin_class_definition): Robustify. 7154 7155 * pt.c (instantiate_decl): Tell the repository code about the 7156 clones, not the cloned functions. 7157 * repo.c (repo_template_used): Explicitly instantiate the cloned 7158 function, not the clones. 7159 71602001-06-05 Nathan Sidwell <nathan@codesourcery.com> 7161 7162 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and 7163 ICS_BAD_FLAG on created conversion. 7164 (compare_ics): Break out rank. 7165 71662001-06-05 Nathan Sidwell <nathan@codesourcery.com> 7167 7168 * decl.c (xref_tag): Remove extraneous %s on dependent name 7169 lookup warning. 7170 71712001-06-05 Nathan Sidwell <nathan@codesourcery.com> 7172 7173 * class.c (layout_vtable_decl): Fix off by one error on 7174 build_index_type. 7175 (build_vtt): Likewise. 7176 (build_ctor_vtbl_group): Likewise. 7177 71782001-06-05 Nathan Sidwell <nathan@codesourcery.com> 7179 7180 * class.c (maybe_indent_hierarchy): New function. 7181 (dump_class_hierarchy_r): Add flags. Dump extra binfo 7182 information, if enabled. Use maybe_indent_hierarchy. Adjust 7183 output format. 7184 (dump_class_hierarchy): Adjust prototype. Adjust output format. 7185 (dump_array, dump_vtable, dump_vtt): New functions. 7186 (finish_struct_1): Adjust hierarchy dumping. 7187 (initialize_vtable): Call dump_vtable. 7188 (build_vtt): Call dump_vtt. 7189 (build_ctor_vtbl_group): Call dump_vtable. 7190 * decl2.c (flag_dump_class_layout): Remove. 7191 (cxx_decode_option): Remove dump translation unit 7192 and dump class hierarchy check. Call dump_switch_p. 7193 (finish_file): Adjust dumping. 7194 (dump.c): Only dump base classes if not TDF_SLIM. 7195 Only dump namespace members if not TDF_SLIM. 7196 * optimize.c (dump_function): New function. 7197 (optimize_function): Call dump_function. 7198 * semantics.c (expand_body): Use dump_enabled_p. 7199 72002001-06-01 Nathan Sidwell <nathan@codesourcery.com> 7201 7202 PR g++/2936 7203 Part missed from first commit 7204 * decl2.c (finish_anon_union): Copy context. 7205 72062001-05-30 Nathan Sidwell <nathan@codesourcery.com> 7207 7208 PR g++/2936 7209 * optimize.c (remap_decl): Remap anonymous aggregate members too. 7210 72112001-05-26 Nathan Sidwell <nathan@codesourcery.com> 7212 7213 PR g++/2823 7214 * semantics.c (expand_body): Don't optimize thunks. 7215 72162001-05-25 Sam TH <sam@uchicago.edu> 7217 7218 * cp-tree.h lex.h: Fix header include guards. 7219 72202001-05-25 Mark Mitchell <mark@codesourcery.com> 7221 7222 * decl.c (init_decl_processing): Tweak. 7223 72242001-05-24 Mark Mitchell <mark@codesourcery.com> 7225 7226 * decl.c (duplicate_decls): Tidy. 7227 (init_decl_processing): Always set flag_no_builtin. 7228 72292001-05-24 Nathan Sidwell <nathan@codesourcery.com> 7230 7231 PR c++/2184 7232 * decl2.c (do_local_using_decl): Push the decls, even in a 7233 template. 7234 72352001-05-22 Mark Mitchell <mark@codesourcery.com> 7236 7237 * optimize.c (initialize_inlined_parameters): Don't set 7238 TREE_READONLY for a VAR_DECL taking the place of an inlined 7239 PARM_DECL. 7240 72412001-05-22 Jason Merrill <jason_merrill@redhat.com> 7242 7243 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support. 7244 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface 7245 attribute. 7246 72472001-05-22 Joseph S. Myers <jsm28@cam.ac.uk> 7248 7249 * parse.y: Refer to compound literals as such, not as 7250 constructor-expressions. 7251 72522001-05-21 Mark Mitchell <mark@codesourcery.com> 7253 7254 * call.c (build_op_delete_call): Ignore exception-specifications 7255 when looking for matching delete operators. 7256 * init.c (build_new_1): Compute whether or not the allocation 7257 function used is a placement allocation function or not, and 7258 communicate this information to build_op_delete_call. 7259 72602001-05-21 Jason Merrill <jason_merrill@redhat.com> 7261 7262 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi. 7263 (build_vtbl_ref): Adjust. 7264 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address. 7265 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks. 7266 Re-add vtable-gc. 7267 (unsupported_options): Correspondingly. 7268 7269 * decl2.c (maybe_make_one_only): Check flag_weak, not 7270 supports_one_only(). 7271 7272 * cp-tree.def (START_CATCH_STMT): Lose. 7273 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS. 7274 * tree.c (cp_statement_code_p): Don't case it. 7275 * semantics.c (cp_expand_stmt): Likewise. 7276 * cp-tree.h (START_CATCH_TYPE): Lose. 7277 (HANDLER_TYPE): New. 7278 * except.c (expand_start_catch_block): Don't start any blocks. 7279 Return the type. 7280 (expand_end_catch_block): Don't end any blocks. 7281 * parse.y (handler): Don't pass anything from finish_handler_parms 7282 to finish_handler. 7283 * pt.c (tsubst_expr): Likewise. 7284 * semantics.c (begin_handler): Call note_level_for_catch here. 7285 (finish_handler_parms): Don't return anything. 7286 (genrtl_catch_block, begin_catch_block): Lose. 7287 (genrtl_handler): Call expand_start_catch here. 7288 72892001-05-18 Jason Merrill <jason_merrill@redhat.com> 7290 7291 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here. 7292 (get_vtable_decl, build_vtt): Not here. 7293 72942001-05-20 Nathan Sidwell <nathan@codesourcery.com> 7295 7296 PR c++/2781 7297 * optimize.c (update_cloned_parm): Copy addressability and other 7298 flags. 7299 73002001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 7301 7302 * pt.c (determine_specialization): Ignore artificial functions. 7303 73042001-05-20 Neil Booth <neil@daikokuya.demon.co.uk> 7305 7306 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update. 7307 (C_RID_CODE): Remove. 7308 * lex.c (cxx_init_options): Call set_identifier_size. Update. 7309 (init_parse): Don't do it here. 7310 73112001-05-18 Diego Novillo <dnovillo@redhat.com> 7312 7313 * decl2.c (finish_objects): Use the original SYMBOL_REF from the 7314 function declaration to avoid stripping the symbol's attributes. 7315 73162001-05-18 Nathan Sidwell <nathan@codesourcery.com> 7317 7318 * decl.c (pushdecl): Adjust error string. 7319 (xref_tag): Adjust friend class injection warning. Remove the 7320 inherited name from the class shadowed scope. 7321 73222001-05-17 Mark Mitchell <mark@codesourcery.com> 7323 7324 * except.c (cp_protect_cleanup_actions): New function. 7325 (init_exception_processing): Don't set protect_cleanup_actions 7326 here. Do set lang_protect_cleanup_actions. 7327 73282001-05-16 Nathan Sidwell <nathan@codesourcery.com> 7329 7330 * spew.c (read_token): Call yyerror on all unexpected tokens. 7331 73322001-05-16 Nathan Sidwell <nathan@codesourcery.com> 7333 7334 * init.c (member_init_ok_or_else): Take a tree rather than 7335 string for name. 7336 (expand_member_init): Adjust. 7337 73382001-05-14 Nick Clifton <nickc@cambridge.redhat.com> 7339 7340 * decl.c (duplicate_decls): Suppress warning about duplicate 7341 decls if the first decl is a friend. 7342 73432001-05-12 Zack Weinberg <zackw@stanford.edu> 7344 7345 * except.c (choose_personality_routine): Export. Add 7346 explanatory comment. Take an enum languages, not a boolean. 7347 (initialize_handler_parm): Adjust to match. 7348 * cp-tree.h: Prototype choose_personality_routine. 7349 * lex.c (handle_pragma_java_exceptions): New function. 7350 (init_cp_pragma): Register #pragma GCC java_exceptions. 7351 73522001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk> 7353 7354 * method.c (build_mangled_C99_name): Remove unused prototype. 7355 73562001-05-12 Alexandre Oliva <aoliva@redhat.com> 7357 7358 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type. 7359 * typeck.c (get_member_function_from_ptrfunc, 7360 build_ptrmemfunc, expand_ptrmemfunc_cst): Take 7361 TARGET_PTRMEMFUNC_VBIT_LOCATION into account. 7362 7363 Reverted Geoff Keating's 2001-05-03's patch. 7364 73652001-05-11 Ira Ruben <ira@apple.com> 7366 7367 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h. 7368 73692001-05-11 Neil Booth <neil@daikokuya.demon.co.uk> 7370 7371 * cp-tree.h (finish_label_expr, lookup_label): Delete. 7372 * parse.y: Update for '&&'; don't issue warning here. 7373 * semantics.c (finish_label_expr): Delete. 7374 73752001-05-07 Mark Mitchell <mark@codesourcery.com> 7376 7377 * splay-tree.h (splay_tree_max): New function. 7378 (splay_tree_min): Likewise. 7379 73802001-05-03 Geoffrey Keating <geoffk@redhat.com> 7381 7382 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER. 7383 (pfn_vflag_identifier): Define. 7384 Update comment about layout of pointer functions. 7385 (build_ptrmemfunc1): Update prototype. 7386 (expand_ptrmemfunc_cst): Update prototype. 7387 * decl.c (initialize_predefined_identifiers): Initialize 7388 pfn_vflag_identifier. 7389 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add 7390 an extra field to the type. 7391 * expr.c (cplus_expand_constant): Pass 'flag' between 7392 expand_ptrmemfunc_cst and build_ptrmemfunc1. 7393 * typeck.c (get_member_function_from_ptrfunc): When 7394 FUNCTION_BOUNDARY < 16, look at additional field to determine 7395 if a pointer-to-member is a real pointer or a vtable offset. 7396 (build_ptrmemfunc1): Add new parameter to contain extra field. 7397 (build_ptrmemfunc): Pass the extra field around. 7398 (expand_ptrmemfunc_cst): Add new parameter to return extra field. 7399 (pfn_from_ptrmemfunc): Ignore the extra field. 7400 74012001-05-03 Mark Mitchell <mark@codesourcery.com> 7402 7403 * cp-tree.h (flag_inline_trees): Update documentation. 7404 * decl.c (init_decl_processing): Adjust handling of 7405 flag_inline_functions and flag_inline_trees to support -O3. 7406 (grokfndecl): Set DECL_INLINE on all functions if that's what 7407 the user requested. 7408 (save_function_data): Clear DECL_INLINE in 7409 current_function_cannot_inline is non-NULL. 7410 * decl2.c (flag_inline_trees): Update documentation. 7411 74122001-05-03 Nathan Sidwell <nathan@codesourcery.com> 7413 7414 * dump.c (cp_dump_tree, USING_STMT case): New case. 7415 * tree.c (cp_statement_code_p): Add USING_STMT. 7416 * decl2.c (do_using_directive): Add the using directive statement. 7417 7418 * tree.c (walk_tree): Reformat an if block. 7419 74202001-05-02 Mark Mitchell <mark@codesourcery.com> 7421 7422 * decl.c (compute_array_index_type): Don't try to do anything with 7423 the indices when processing a template. 7424 74252001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 7426 7427 * call.c: NULL_PTR -> NULL. 7428 * class.c: Likewise. 7429 * cvt.c: Likewise. 7430 * decl.c: Likewise. 7431 * decl2.c: Likewise. 7432 * except.c: Likewise. 7433 * init.c: Likewise. 7434 * rtti.c: Likewise. 7435 * search.c: Likewise. 7436 * tree.c: Likewise. 7437 * typeck.c: Likewise. 7438 * typeck2.c: Likewise. 7439 74402001-05-02 Mark Mitchell <mark@codesourcery.com> 7441 7442 * decl2.c (do_using_directive): Revert previous patch. 7443 74442001-05-01 Nathan Sidwell <nathan@codesourcery.com> 7445 7446 * cp-tree.def (USING_STMT): New statement node. 7447 * cp-tree.h (USING_STMT_NAMESPACE): New macro. 7448 * decl2.c (do_using_directive): Add USING_STMT to statement 7449 tree. Don't emit errors when processing template decl. 7450 * pt.c (tsubst_expr, USING_STMT case): New case. 7451 * semantics.c (cp_expand_stmt, USING_STMT case): New case. 7452 74532001-05-01 Nathan Sidwell <nathan@codesourcery.com> 7454 7455 * call.c (build_new_op): Convert args from reference here. 7456 (build_conditional_expr): Don't convert here. 7457 74582001-05-01 Nathan Sidwell <nathan@codesourcery.com> 7459 7460 * spew.c (last_token_id): New static variable. 7461 (read_token): Set it here. 7462 (yyerror): Use it here. 7463 74642001-04-30 Richard Henderson <rth@redhat.com> 7465 7466 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations. 7467 * decl.c: Likewise. 7468 74692001-04-30 Mark Mitchell <mark@codesourcery.com> 7470 7471 * gxxint.texi: Remove. 7472 * Make-lang.in: Remove all traces of gxxint.texi. 7473 7474Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com> 7475 7476 * decl2.c (start_static_initialization_or_destruction): Correct 7477 logic to handle the -fno-use-cxa-atexit case. 7478 74792001-04-30 Mark Mitchell <mark@codesourcery.com> 7480 7481 * optimize.c (update_cloned_parm): New function. 7482 (maybe_clone_body): Use it. Update the `this' parameter too. 7483 74842001-04-29 Joseph S. Myers <jsm28@cam.ac.uk> 7485 7486 * decl2.c (unsupported_options): Add new-abi. 7487 * lang-options.h: Remove no longer supported options. 7488 74892001-04-27 Nathan Sidwell <nathan@codesourcery.com> 7490 7491 * except.c (can_convert_eh): Don't check template parms, 7492 typename types etc. 7493 74942001-04-27 Nathan Sidwell <nathan@codesourcery.com> 7495 7496 * optimize.c (maybe_clone_body): Copy parameter names and locations. 7497 74982001-04-27 Nathan Sidwell <nathan@codesourcery.com> 7499 7500 * cp-tree.h (adjust_clone_args): Prototype new function. 7501 * class.c (adjust_clone_args): New function. 7502 * decl.c (start_function): Call it for in charge ctors. 7503 75042001-04-26 Mark Mitchell <mark@codesourcery.com> 7505 7506 * method.c (use_thunk): Make sure that thunks really are emitted 7507 when requested. 7508 75092001-04-26 Nathan Sidwell <nathan@codesourcery.com> 7510 7511 * mangle.c (write_chars): New macro. 7512 (hwint_to_ascii): New function 7513 (write_number): Use it. 7514 (write_integer_cst): Deal with really big numbers. 7515 75162001-04-25 Mark Mitchell <mark@codesourcery.com> 7517 7518 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting 7519 the clone. 7520 75212001-04-25 Nathan Sidwell <nathan@codesourcery.com> 7522 7523 * decl.c (grokdeclarator): Set context of namespace scope 7524 TYPE_DECLS. 7525 75262001-04-24 Zack Weinberg <zackw@stanford.edu> 7527 7528 * cp/optimize.c: Include hashtab.h. 7529 (struct inline_data): Add tree_pruner. 7530 (expand_call_inline, expand_calls_inline): Use it when calling 7531 walk_tree. 7532 (optimize_function): Initialize and free tree_pruner. 7533 75342001-04-24 Nathan Sidwell <nathan@codesourcery.com> 7535 7536 Lazy __FUNCTION__ generation. 7537 * cp-tree.def (FUNCTION_NAME): Remove. 7538 * cp-tree.h (function_name_declared_p): Remove. 7539 (cp_fname_init): Prototype. 7540 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids, 7541 don't call declare_function_name. Call start_fname_decls. 7542 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't 7543 clobber the line number. 7544 (cp_fname_init): New function. 7545 (start_function): Call start_fname_decls. 7546 (finish_function): Call finish_fname_decls. 7547 * lex.c (reswords): Add slots for __FUNCTION__ et al. 7548 (rid_to_yy): Add mappings for __FUNCTION__ et al. 7549 * optimize.c (maybe_clone_body): Remove function_name_declared_p. 7550 * parse.y (VAR_FUNC_NAME): New token. 7551 (primary): Add VAR_FUNC_NAME. 7552 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's 7553 generation. 7554 (tsubst, FUNCTION_NAME case): Remove. 7555 (tsubst_copy, FUNCTION_NAME case): Remove. 7556 (tsubst_expr, DECL_STMT case): Be careful with a 7557 DECL_PRETTY_FUNCTION_P. 7558 (instantiate_decl): Remove function_name_declared_p. 7559 * semantics.c (begin_compound_statement): Don't call 7560 declare_function_name here. 7561 (setup_vtbl_ptr). Don't save & restore function_name_declared_p. 7562 (finish_translation_unit): Call finish_fname_decls. 7563 (expand_body): Remove function_name_declared_p. 7564 * typeck2.c (digest_init): Allow any ERROR_MARK. 7565 75662001-04-24 Nathan Sidwell <nathan@codesourcery.com> 7567 7568 * pt.c (tsubst_decl): Use VOID_TYPE_P. 7569 * semantics.c: Fix some typos. 7570 75712001-04-23 Phil Edwards <pme@sources.redhat.com> 7572 7573 * cp/decl2.c (flag_honor_std): Always initialize to 1. 7574 75752001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 7576 7577 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf. 7578 75792001-04-23 Jason Merrill <jason_merrill@redhat.com> 7580 7581 * except.c (build_throw): Wrap the initialization of the exception 7582 object in a MUST_NOT_THROW_EXPR. 7583 (do_free_exception): #if 0. 7584 75852001-04-20 Mark Mitchell <mark@codesourcery.com> 7586 7587 * cp-tree.h (finish_enum): Change prototype. 7588 * decl.c (finish_enum): Reorganize. 7589 * parse.y (structsp): Adjust calls to finish_enum. 7590 75912001-04-20 Nathan Sidwell <nathan@codesourcery.com> 7592 7593 * tree.c (cp_tree_equal): Adjust final switch formatting. Add 7594 't' case. 7595 75962001-04-20 Nathan Sidwell <nathan@codesourcery.com> 7597 7598 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED. 7599 (layout_empty_base): Return at end flag. 7600 (build_base_field): Likewise. 7601 (build_base_fields): Likewise. 7602 (layout_virtual_bases): Don't add 1 to eoc value. 7603 (end_of_class): Use full size for empty bases. 7604 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended 7605 empty bases. Don't add 1 to eoc value. Only add trailing padding 7606 if we're an empty class with no empty bases. 7607 (dump_class_hierarchy): Dump size and alignment. 7608 76092001-04-20 Jakub Jelinek <jakub@redhat.com> 7610 7611 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and 7612 ICS_BAD_FLAG. 7613 76142001-04-20 Jakub Jelinek <jakub@redhat.com> 7615 7616 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL 7617 is found, look first if name does not match the structure name. 7618 76192001-04-19 Mark Mitchell <mark@codesourcery.com> 7620 7621 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is 7622 set. 7623 (SET_DECL_LANGUAGE): New macro. 7624 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE. 7625 (pushdecl): Likewise. 7626 (build_library_fn_1): Likewise. 7627 (build_cp_library_fn): Likewise. 7628 (grokfndecl): Likewise. 7629 (grokvardecl): Mark `extern "C"' variables as having C linkage. 7630 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE. 7631 * lex.c (retrofit_lang_decl): Likewise. 7632 * mangle.c (mangle_decl_string): Don't mangle the names of 7633 variables declared with C language linkage. 7634 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE. 7635 76362001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca> 7637 7638 * semantics.c (simplify_aggr_init_exprs_r): Don't restore 7639 flag_access_control from uninitialized storage. 7640 76412001-04-15 Mark Mitchell <mark@codesourcery.com> 7642 7643 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation. 7644 * mangle.c (write_pointer_to_member_type): Fix mangling of 7645 pointers to cv-qualified member function types. 7646 7647 * init.c (build_delete): Create a SAVE_EXPR for the address if 7648 we're going to use it more than once. 7649 76502001-04-13 Mark Mitchell <mark@codesourcery.com> 7651 7652 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove. 7653 (expand_ptremfunc_cst): Change prototype. 7654 (delta2_from_ptrmemfunc): Remove. 7655 * expr.c (cplus_expand_constant): Adjust call to 7656 expand_ptrmemfunc_cst. 7657 * typeck.c (build_ptrmemfunc1): Simplify. 7658 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still 7659 results in a constant. 7660 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters. 7661 (delta2_from_ptrmemfunc): Remove. 7662 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst. 7663 76642001-04-12 Jason Merrill <jason_merrill@redhat.com> 7665 7666 * cp-tree.h (decl_namespace_list): New macro. 7667 (struct saved_scope): Add decl_ns_list. 7668 * decl.c (mark_saved_scope): Mark it. 7669 * decl2.c: Lose static decl_namespace_list. 7670 (init_decl2): Don't save it. 7671 76722001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 7673 7674 * cp-tree.h (warn_return_type, yylex): Delete redundant 7675 declarations. 7676 7677 * decl.c (current_class_depth, global_namespace): Likewise. 7678 7679 * decl2.c (current_class_depth, flag_gnu_xref): Likewise 7680 7681 * repo.c (flag_use_repository): Likewise. 7682 76832001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 7684 7685 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block, 7686 set_block, pushdecl, getdecls, gettags, init_decl_processing, 7687 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p, 7688 lvalue_or_else, print_lang_statistics, comp_target_types, 7689 unsigned_type, signed_type, signed_or_unsigned_type, 7690 build_function_call, mark_addressable, incomplete_type_error): 7691 Delete redundant declarations. 7692 76932001-04-11 Jason Merrill <jason_merrill@redhat.com> 7694 7695 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro. 7696 (TYPE_ANONYMOUS_P): New macro. 7697 (TAGGED_TYPE_P): New macro. 7698 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P. 7699 (grokfndecl, grokvardecl, grokdeclarator): Likewise. 7700 * tree.c (no_linkage_helper): Likewise. 7701 * semantics.c (begin_class_definition): Likewise. 7702 * pt.c (convert_template_argument): Likewise. 7703 * lex.c (check_for_missing_semicolon): Likewise. 7704 77052001-04-12 Nathan Sidwell <nathan@codesourcery.com> 7706 7707 * class.c (dfs_unshared_virtual_bases): New function. 7708 (mark_primary_bases): Call it. 7709 (check_bases): Ignore virtual bases when determining 7710 nearly-emptiness. 7711 77122001-04-12 Nathan Sidwell <nathan@codesourcery.com> 7713 7714 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION. 7715 77162001-04-11 Mark Mitchell <mark@codesourcery.com> 7717 7718 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the 7719 cloned function to the clone. 7720 77212001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 7722 7723 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H). 7724 7725 * semantics.c: Include expr.h. 7726 77272001-04-11 Nathan Sidwell <nathan@codesourcery.com> 7728 7729 * method.c (implicitly_declare_fn): Commonize code for copy ctor 7730 and assignment op. Set TREE_USED for parameter. 7731 77322001-04-10 Mark Mitchell <mark@codesourcery.com> 7733 7734 * class.c (find_final_overrider_data): Add `candidates'. 7735 (dfs_find_final_overrider): Don't issue error messages 7736 prematurely. 7737 (find_final_overrider): Issue error messages here. 7738 (build_base_field): Don't warn about amgibuous direct bases here. 7739 (warn_about_ambiguous_direct_bases): New function. 7740 (layout_class_type): Use it. 7741 77422001-04-10 Richard Henderson <rth@redhat.com> 7743 7744 * typeck.c (build_array_ref): Push the array reference inside 7745 COMPOUND_EXPR and COND_EXPR. 7746 77472001-04-05 Mark Mitchell <mark@codesourcery.com> 7748 7749 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P. 7750 * decl.c (duplicate_decls): Adjust accordingly. 7751 (maybe_commonize_var): Likewise. 7752 (grokfndecl): Likewise. 7753 (start_function): Likewise. 7754 (start_method): Likewise. 7755 * decl2.c (key_method): Likewise. 7756 (import_export_decl): Likewise. 7757 * method.c (implicitly_declare_fn): Likewise. 7758 * optimize.c (maybe_clone_body): Likewise. 7759 77602001-04-05 Benjamin Kosnik <bkoz@redhat.com> 7761 7762 * lang-specs.h: Add __DEPRECATED. 7763 7764Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com> 7765 7766 * search.c (get_dynamic_cast_base_type): When building a new 7767 constant, set its type to ssizetype. 7768 77692001-04-04 Jakub Jelinek <jakub@redhat.com> 7770 7771 * optimize.c (expand_call_inline): Only add newly inlined statements 7772 into inlined_stmts. 7773 77742001-04-03 Mark Mitchell <mark@codesourcery.com> 7775 7776 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove. 7777 (OPERATOR_FORMAT): Likewise. 7778 (OPERATOR_TYPENAME_FORMAT): Likewise. 7779 * operators.def: Remove old name-mangling information. 7780 * decl.c (grok_op_properties): Adjust accordingly. 7781 * lex.c (init_operators): Likewise. 7782 * rtti.c (get_tinfo_decl): Issue error messages about types that 7783 have variable size. 7784 77852001-04-03 Mark Mitchell <mark@codesourcery.com> 7786 7787 * decl2.c (import_export_decl): Don't call import_export_class 7788 when processing an inline member function. 7789 * semantics.c (expand_body): Call import_export_decl before 7790 emitting inline functions. 7791 77922001-03-28 Richard Henderson <rth@redhat.com> 7793 7794 IA-64 ABI Exception Handling: 7795 * cp-tree.def (EH_SPEC_BLOCK): New. 7796 (MUST_NOT_THROW_EXPR): New. 7797 * cp-tree.h: Update changed function declarations. 7798 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove. 7799 (CPTI_CALL_UNEXPECTED): New. 7800 (struct cp_language_function): Rename x_eh_spec_try_block 7801 to x_eh_spec_block. 7802 (EH_SPEC_STMTS, EH_SPEC_RAISES): New. 7803 * decl.c (current_binding_level): If no current function 7804 bindings, revert to scope_chain. 7805 (initialize_predefined_identifiers): Remove __cp_push_exception. 7806 (store_parm_decls): Use begin_eh_spec_block. 7807 (finish_function): Use finish_eh_spec_block. 7808 (mark_lang_function): Update for name changes. 7809 * decl2.c (finish_file): No mark_all_runtime_matches. 7810 * dump.c (cp_dump_tree): Handle new tree codes. 7811 * error.c (dump_expr) [BIND_EXPR]: Fix typo. 7812 * except.c (catch_language_init, catch_language): Remove. 7813 (init_exception_processing): Don't set language code. 7814 Initialize call_unexpected_node, protect_cleanup_actions, 7815 eh_personality_libfunc, lang_eh_runtime_type. 7816 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove. 7817 (get_eh_type, get_eh_caught, get_eh_handlers): Remove. 7818 (prepare_eh_type): Split out type canonicalizations ... 7819 (build_eh_type_type): ... from here. 7820 (build_eh_type_type_ref): Remove. 7821 (mark_all_runtime_matches): Remove. 7822 (build_exc_ptr): New. 7823 (do_begin_catch, do_end_catch): New. 7824 (do_pop_exception): Remove. 7825 (build_terminate_handler): Remove. 7826 (choose_personality_routine): Split out language choice from ... 7827 (initialize_handler_parm): ... here. 7828 Use MUST_NOT_THROW_EXPR. 7829 (expand_start_catch_block): Use do_begin_catch. Simplify Java 7830 exception object handling. 7831 (expand_start_eh_spec, expand_end_eh_spec): Remove. 7832 (expand_exception_blocks, alloc_eh_object): Remove. 7833 (begin_eh_spec_block, finish_eh_spec_block): New. 7834 (do_allocate_exception, do_free_exception): New. 7835 (expand_throw): Merge into ... 7836 (build_throw): ... here. Update for abi. 7837 * expr.c (cplus_expand_expr): No expand_internal_throw. 7838 Handle MUST_NOT_THROW_EXPR. 7839 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK. 7840 * semantics.c (*) Update for except.h name changes. 7841 (genrtl_try_block): No protect_with_terminate. 7842 (genrtl_eh_spec_block): New. 7843 (genrtl_handler): Don't emit the goto here. 7844 (cp_expand_stmt): Handle EH_SPEC_BLOCK. 7845 (genrtl_finish_function): Don't expand_exception_blocks. 7846 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK. 7847 78482001-03-28 Richard Henderson <rth@redhat.com> 7849 7850 * decl.c (struct named_label_list): Rename eh_region to 7851 in_try_scope, add in_catch_scope. 7852 (struct binding_level): Rename eh_region to is_try_scope, 7853 add is_catch_scope. 7854 (note_level_for_try): Rename from note_level_for_eh. 7855 (note_level_for_catch): New. 7856 (poplevel): Copy both is_try_scope and is_catch_scope to 7857 the named_label_list struct. 7858 (check_previous_goto_1): Don't check for catch block via 7859 DECL_ARTIFICIAL; use in_try_scope instead. 7860 (check_goto): Likewise. 7861 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare. 7862 * except.c (expand_start_catch_block): Call note_level_for_catch. 7863 * semantics.c (begin_compound_stmt): Update for note_level_for_try. 7864 78652001-03-27 Richard Henderson <rth@redhat.com> 7866 7867 * except.c: Use USING_SJLJ_EXCEPTIONS instead of 7868 exceptions_via_longjmp. 7869 78702001-03-27 Phil Edwards <pme@sources.redhat.com> 7871 7872 * pt.c (check_default_tmpl_args): Make error messages clearer. 7873 78742001-03-26 Phil Edwards <pme@sources.redhat.com> 7875 7876 * error.c: Also undefine 'A' macro used for cp_printers definition. 7877 78782001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 7879 7880 * Make-lang.in: Depend on $(SYSTEM_H), not system.h. 7881 78822001-03-26 Mike Yang <yang@research.att.com> 7883 Mark Mitchell <mark@codesourcery.com> 7884 7885 * dump.c (dump_access): New function. 7886 (cp_dump_tree): Use it. Dump basetype information for class 7887 types. 7888 78892001-03-26 Mark Mitchell <mark@codesourcery.com> 7890 7891 * Makefile.in (optimize.o): Depend on params.h. 7892 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE. 7893 (init_decl_processing): Set flag_no_inline when doing 7894 inlining-on-trees. 7895 * optimize.c: Include params.h. 7896 (struct inline_data): Improve documentation of FNS. Add 7897 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P. 7898 (INSNS_PER_STMT): New macro. 7899 (remap_block): Use CLONING_P. 7900 (inlinable_function_p): Don't inline big functions. 7901 (expand_call_inline): Keep track of how much inlining we've done. 7902 (optimize_function): Set FIRST_INLINED_FN. 7903 (maybe_clone_body): Set CLONING_P. 7904 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in 7905 tree nodes. 7906 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling 7907 rest_of_compilation. Clear DECL_RTL for local variables 7908 afterwards. 7909 (clear_decl_rtl): New function. 7910 79112001-03-26 Nathan Sidwell <nathan@codesourcery.com> 7912 7913 Implement DR 209 7914 * cp-tree.h (skip_type_access_control, 7915 reset_type_access_control): Prototype. 7916 * decl.c (grokdeclarator): Access of friends is not checked. 7917 * parse.y (component_decl_list): Reset type access control. 7918 * semantics.c (decl_type_access_control): Clear 7919 current_type_lookups. 7920 (save_type_access_control): Don't save if not deferring. 7921 (skip_type_access_control, reset_type_access_control): New 7922 functions. 7923 (begin_class_definition): Do type access control for basetypes. 7924 Start deferred access control. 7925 (finish_class_definition): Resume immediate access control if 7926 this is a local class. 7927 79282001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 7929 7930 * class.c (add_method): Use memcpy/memmove, not bcopy. 7931 7932 * decl.c (duplicate_decls): Likewise. 7933 79342001-03-23 Jakub Jelinek <jakub@redhat.com> 7935 7936 * mangle.c (write_discriminator): Use `_0' for discriminator 1, 7937 not `_'. 7938 79392001-03-23 Jakub Jelinek <jakub@redhat.com> 7940 7941 * decl.c (local_names): Define. 7942 (push_local_name): New. 7943 (grok_reference_init): Return init if initializing static reference 7944 variable with non-constant instead of emitting it. 7945 Move expand_static_init call to cp_finish_decl. 7946 (layout_var_decl): Call push_local_name. 7947 (maybe_commonize_var): Allow inlining functions even if they have 7948 static local variables, use comdat_linkage for them if flag_weak. 7949 (check_initializer): Call obscure_complex_init if 7950 grok_reference_init returned nonzero. 7951 (save_function_data): Clear x_local_names. 7952 (pop_cp_function_context): Free x_local_names. 7953 (mark_inlined_fns): Remove. 7954 (mark_lang_function): Mark x_local_names. 7955 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P. 7956 Mark inlined_fns as tree, remove call to mark_inlined_fns. 7957 * class.c (alter_access): Ensure DECL_ACCESS is never set if 7958 DECL_DISCRIMINATOR_P. 7959 * cp-tree.h (cp_language_function): Add x_local_names. 7960 (lang_decl_flags): Add discriminator into u2. 7961 (lang_decl_inlined_fns): Remove. 7962 (lang_decl): inlined_fns is now a TREE_VEC. 7963 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define. 7964 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a 7965 TREE_VEC, not a custom structure. 7966 (optimize_function): Likewise. 7967 * mangle.c (discriminator_for_local_entity): Discriminate among 7968 VAR_DECL local entities. 7969 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS 7970 is not valid. 7971 79722001-03-22 Bryce McKinlay <bryce@albatross.co.nz> 7973 7974 Add support for Java interface method calls. 7975 * cp-tree.h (struct lang_type): Add java_interface flag. 7976 (TYPE_JAVA_INTERFACE): New macro. 7977 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute 7978 by setting TYPE_JAVA_INTERFACE. 7979 * call.c (java_iface_lookup_fn): New static. 7980 (build_over_call): If calling a method declared in a 7981 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the 7982 expression which resolves the function address. 7983 (build_java_interface_fn_ref): New function. 7984 79852001-03-22 Richard Henderson <rth@redhat.com> 7986 7987 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h. 7988 * except.c: Don't include it. 7989 79902001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> 7991 based on an idea from Joe Buck <jbuck@synopsys.com> 7992 7993 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore): 7994 New nonterminals. 7995 (data_def, component_decl): Add reductions to bad_decl. 7996 79972001-03-22 Jakub Jelinek <jakub@redhat.com> 7998 7999 * method.c (do_build_assign_ref): Don't use build_modify_expr for 8000 anonymous aggregates, since they don't have assignment operator 8001 method. 8002 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy 8003 assignment operators for anonymous structure fields. 8004 80052001-03-21 Jason Merrill <jason@redhat.com> 8006 8007 * pt.c (instantiate_decl): Abort if we see a member constant 8008 instantiation that doesn't already have its initializer. 8009 Downgrade explicit instantiation without definition to pedwarn. 8010 8011 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove. 8012 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P. 8013 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P. 8014 8015 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove. 8016 (pending_vtables): Remove. 8017 * decl2.c (pending_vtables): Remove. 8018 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not 8019 CLASSTYPE_VTABLE_NEEDS_WRITING. 8020 (import_export_class): Likewise. 8021 (init_decl2): Don't mark pending_vtables. 8022 * lex.c (handle_pragma_vtable): Just sorry. 8023 * pt.c (instantiate_class_template): Don't mess with 8024 CLASSTYPE_VTABLE_NEEDS_WRITING. 8025 (mark_class_instantiated): Likewise. 8026 * ptree.c (print_lang_type): Don't print it. 8027 * semantics.c (begin_class_definition): Don't set it. 8028 8029 * pt.c (template_tail): Replace with last_pending_template. 8030 (maybe_templates, maybe_template_tail): Remove. 8031 (add_pending_template): Adjust. 8032 (instantiate_pending_templates): Adjust. 8033 8034 * cp-tree.h (struct saved_scope): Remove lang_stack field. 8035 (current_lang_stack): Remove. 8036 * decl.c (maybe_push_to_top_level): Don't initialize it. 8037 (duplicate_decls): Use current_lang_depth. 8038 (xref_basetypes): Likewise. 8039 * class.c (current_lang_depth): New fn. 8040 (push_lang_context): Use more varray functionality. 8041 (pop_lang_context): Likewise. 8042 8043 * error.c (GLOBAL_THING): Always use '__'. 8044 80452001-03-21 Mark Mitchell <mark@codesourcery.com> 8046 8047 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME. 8048 8049 * mangle.c (mangle_decl_string): Mangle the names of overloaded 8050 operators, even when they have `extern "C"' linkage. 8051 80522001-03-19 Mark Mitchell <mark@codesourcery.com> 8053 8054 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME, 8055 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME 8056 where it's not necessary. 8057 (add_method): Remove optimization involving comparison of 8058 DECL_ASSEMBLER_NAME. 8059 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME, 8060 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME 8061 where it's not necessary. 8062 (check_methods): Likewise. 8063 (build_clone): Likewise. 8064 (built_vtt): Likewise. 8065 * cp-tree.h (DECL_NEEDED_P): Likewise. 8066 * decl.c (pushtag): Likewise. 8067 (duplicate_decls): Likewise. 8068 (pushdecl): Likewise. 8069 (builtin_function): Likewise. 8070 (build_library_fn_1): Set DECL_LANGUAGE for library functions. 8071 (build_cp_library_fn): Likewise. 8072 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME, 8073 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME 8074 where it's not necessary. 8075 (make_rtl_for_nonlocal_decl): Likewise. 8076 (cp_finish_decl): Likewise. 8077 (grokfndecl): Likewise. 8078 (grokvardecl): Likewise. 8079 (grokdeclarator): Likewise. 8080 (start_function): Likewise. 8081 (cp_missing_return_ok_p): Likewise. 8082 * decl2.c (grokclassfn): Likewise. 8083 (check_classfn): Likewise. 8084 (finish_static_data_member_decl): Likewise. 8085 (grokfield): Likewise. 8086 * error.c (GLOBAL_IORD_P): Remove. 8087 (dump_global_iord): Improve output. 8088 (dump_decl): Avoid using DECL_ASSEMBLER_NAME. 8089 * except.c (nothrow_libfn_p): Summarily reject any function not in 8090 namespace-scope. 8091 * init.c (build_java_class_ref): Don't explicitly set 8092 DECL_ASSEMBLER_NAME after calling mangle_decl. 8093 * mangle.c (mangle_decl_string): Handle extern "C" functions. 8094 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl. 8095 * method.c (set_mangled_name_for_decl): Don't explicitly set 8096 DECL_ASSEMBLER_NAME after calling mangle_decl. 8097 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and 8098 IDENTIFIER_GLOBAL_VALUE for the thunk. 8099 * pt.c (set_mangled_name_for_template_decl): Remove. 8100 (check_explicit_specialization): Don't use it. 8101 (looup_template_class): Don't set DECL_ASSEMBLER_NAME. 8102 (tsubst_friend_function): Likewise. 8103 (tsubst_decl): Likewise. 8104 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME. 8105 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME, 8106 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME 8107 where it's not necessary. 8108 (tinfo_base_init): Likewise. 8109 (create_real_tinfo_var): Likewise. 8110 * search.c (looup_field_1): Likewise. 8111 * semantics.c (finish_named_return_value): Likewise. 8112 * tree.c (init_tree): Set lang_set_decl_assembler_name. 8113 81142001-03-15 Gabriel Dos Reis <gdr@codesourcery.com> 8115 8116 Correct semantics restrictions checking in throw-expression. 8117 * except.c (is_admissible_throw_operand): New function. 8118 (build_throw): Use it. 8119 81202001-03-14 Mark Mitchell <mark@codesourcery.com> 8121 8122 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__ 8123 and its ilk. 8124 81252001-03-14 Mark Mitchell <mark@codesourcery.com> 8126 8127 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. 8128 * cp-tree.h (DECL_IN_MEMORY_P): Likewise. 8129 * decl.c (duplicate_decls): Likewise. 8130 (builtin_function): Likewise. 8131 (build_library_fn): Likewise. 8132 (build_cp_library_fn): Likewise. 8133 (check_initializer): Likewise. 8134 (cp_finish_decl): Likewise. 8135 * decl2.c (grokfield): Likewise. 8136 (grok_function_init): Remove #if 0'd code. 8137 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. 8138 * friend.c (do_friend): Likewise. 8139 * init.c (get_temp_regvar): Likewise. 8140 * method.c (make_thunk): Likewise. 8141 * pt.c (tsubst_friend_function): Likewise. 8142 (tsubst_decl): Likewise. 8143 (regenerate_decl_from_template): Likewise. 8144 * semantics.c (genrtl_named_return_value): Likewise. 8145 (expand_body): Likewise. 8146 (genrtl_finish_function): Likewise. 8147 * tree.c (cp_tree_equal): Likewise. 8148 81492001-03-12 Nathan Sidwell <nathan@codesourcery.com> 8150 8151 * call.c (convert_like_real): Add extra semantics to INNER 8152 parameter. Don't convert to temporary if a user conversion 8153 gives us an lvalue that we're about to bind to a reference. 8154 Set INNER to indicate pending reference binding on recursive 8155 calls. 8156 81572001-03-10 Neil Booth <neil@daikokuya.demon.co.uk> 8158 8159 * cp/lex.c: Delete duplicate pending_lang_change. 8160 81612001-03-10 Neil Booth <neil@daikokuya.demon.co.uk> 8162 8163 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation): 8164 Similarly. 8165 * cp/repo.c (get_base_filename, open_repo_file): Similarly. 8166 * cp/cp-tree.h: Remove file_name_nondirectory prototype. 8167 81682001-03-09 Zack Weinberg <zackw@stanford.edu> 8169 8170 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate. 8171 81722001-03-08 Stan Shebs <shebs@apple.com> 8173 8174 * cp-tree.h (set_identifier_local_value): Remove unused decl. 8175 81762001-03-06 Zack Weinberg <zackw@stanford.edu> 8177 8178 * spew.c: Remove references to CPP_OSTRING. 8179 81802001-03-06 Andrew Haley <aph@redhat.com> 8181 8182 * typeck.c (convert_arguments): Check that we have an fndecl. 8183 81842001-03-05 Andrew Haley <aph@redhat.com> 8185 8186 * typeck.c (convert_arguments): Don't do ellipsis conversion for 8187 __built_in_constant_p. 8188 81892001-03-02 Nathan Sidwell <nathan@codesourcery.com> 8190 8191 * typeck.c (build_static_cast): Allow enum to enum conversions 8192 as per DR 128. 8193 81942001-03-02 Nathan Sidwell <nathan@codesourcery.com> 8195 8196 * class.c (check_field_decls): Pointers to member do not a 8197 non-pod struct make, as per DR 148. 8198 81992001-03-02 Nathan Sidwell <nathan@codesourcery.com> 8200 8201 * call.c (joust): cp_pedwarn when using gnu extension concerning 8202 worst conversion sequences. 8203 82042001-03-01 Zack Weinberg <zackw@stanford.edu> 8205 8206 * decl.c: Replace all uses of 'boolean' with 'bool'. 8207 82082001-03-01 Zack Weinberg <zackw@stanford.edu> 8209 8210 * lang-specs.h: Add zero initializer for cpp_spec field to 8211 all array elements that need one. Don't put an #ifdef inside 8212 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and 8213 use it. 8214 82152001-03-01 Nathan Sidwell <nathan@codesourcery.com> 8216 8217 Implement using decls inside template functions. 8218 * decl2.c (validate_nonmember_using_decl): Don't special case 8219 fake_std_node in the global namespace. Don't reject early when 8220 processing a template. 8221 (do_local_using_decl): Add to statement tree. Don't do further 8222 processing when building a template. 8223 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs. 8224 82252001-03-01 Nathan Sidwell <nathan@codesourcery.com> 8226 8227 * decl2.c (do_nonmember_using_decl): Don't complain if we find 8228 same function. Do complain about ambiguating extern "C" 8229 declarations. 8230 82312001-02-28 Nathan Sidwell <nathan@codesourcery.com> 8232 8233 Remove floating point and complex type template constant parms. 8234 * pt.c (convert_nontype_argument): Remove REAL_TYPE and 8235 COMPLEX_TYPE extensions. 8236 (invalid_nontype_parm_type_p): Likewise. 8237 82382001-02-27 Jeffrey Oldham <oldham@codesourcery.com> 8239 8240 * except.c (call_eh_info): Revert "match_function"'s type. 8241 82422001-02-27 Nathan Sidwell <nathan@codesourcery.com> 8243 8244 Fix ctor vtable vcall offsets. 8245 * class.c (struct vtbl_init_data_s): Add rtti_binfo member. 8246 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter. 8247 (get_matching_base): Remove. 8248 (get_original_base): New function. 8249 (build_vtbl_initializer): Initialize vid.rtti_binfo. 8250 Use a virtual thunk for a ctor vtable with an index 8251 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a 8252 primary base within a constructor vtable. Only set 8253 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset 8254 when primary base has been lost. 8255 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment. 8256 82572001-02-26 Jeffrey Oldham <oldham@codesourcery.com> 8258 8259 * call.c (joust): Ensure more_specialized()'s argument length 8260 parameter has correct value for constructors. 8261 82622001-02-26 Nathan Sidwell <nathan@codesourcery.com> 8263 8264 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct. 8265 8266 * decl.c (mark_inlined_fns): Prototype. 8267 82682001-02-22 Mark Mitchell <mark@codesourcery.com> 8269 8270 * spew.c (yylex): Correct handling of friends. 8271 82722001-02-22 Mark Mitchell <mark@codesourcery.com> 8273 8274 * mangle.c (write_encoding): Pass write_function_type the 8275 FUNCTION_DECL for the function being encoded. 8276 (write_function_type): Pass it along to write_bare_function_type. 8277 (write_bare_function_type): Pass it along to write_method_parms. 8278 (write_method_parms): Don't mangle the compiler-generated 8279 parameters to a constructor or destructor. 8280 82812001-02-22 Andreas Jaeger <aj@suse.de> 8282 8283 * optimize.c: Include toplev.h for 8284 note_deferral_of_defined_inline_function prototype. 8285 82862001-02-22 Jakub Jelinek <jakub@redhat.com> 8287 8288 * cp-tree.h (struct lang_decl_inlined_fns): New. 8289 (struct lang_decls): Add inlined_fns. 8290 (DECL_INLINED_FNS): New macro. 8291 * optimize.c (struct inline_data): Add inlined_fns. 8292 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro. 8293 (inlinable_function_p): Likewise, fix typo in comment, 8294 function is not inlinable if it already inlined function currently 8295 being optimized. 8296 (expand_call_inline): Add fn to inlined_fns if necessary. 8297 (optimize_function): Initialize inlined_fns. 8298 Save inlined_fns into DECL_INLINED_FNS after expanding inlines. 8299 * decl.c (mark_inlined_fns): New function. 8300 (lang_mark_tree): Call it. 8301 83022001-02-21 Jason Merrill <jason@redhat.com> 8303 8304 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag. 8305 (DECL_UNINLINABLE): Move to middle-end. 8306 8307 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn. 8308 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT. 8309 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone. 8310 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the 8311 parms and outer BLOCK. note_deferral_of_defined_inline_function. 8312 8313 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on 8314 second parm of op=. 8315 83162001-02-19 Mark Mitchell <mark@codesourcery.com> 8317 8318 * decl2.c (set_decl_namespace): Allow explicit instantiations in 8319 any namespace. 8320 83212001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 8322 8323 * optimize.c (expand_call_inline): Don't walk subtrees of type 8324 nodes. 8325 83262001-02-18 Mark Mitchell <mark@codesourcery.com> 8327 8328 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry 8329 for a destructor. 8330 83312001-02-18 Jason Merrill <jason@redhat.com> 8332 8333 Do put the VTT parameter in DECL_ARGUMENTS. 8334 * cp-tree.h (struct cp_language_function): Add x_vtt_parm. 8335 (current_vtt_parm): New macro. 8336 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm. 8337 (DECL_HAS_VTT_PARM_P): New macro. 8338 (DECL_VTT_PARM): Remove. 8339 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros. 8340 * decl.c (duplicate_decls): Only copy the operator code if 8341 appropriate. 8342 (start_function): Set current_vtt_parm. 8343 (lang_mark_tree): Don't mark vtt_parm. 8344 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to 8345 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P. 8346 * class.c (build_clone): Maybe remove the VTT parm. 8347 * optimize.c (maybe_clone_body): Set up the VTT parm. 8348 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm. 8349 * call.c (build_over_call): Just allow the VTT arg. 8350 * method.c (make_thunk): Don't set DECL_VTT_PARM. 8351 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM. 8352 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE. 8353 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise. 8354 * error.c (dump_function_decl): Likewise. 8355 * call.c (build_user_type_conversion_1, convert_like_real): Abort 8356 if we try to call a constructor with in-charge or VTT parms. 8357 * method.c (skip_artificial_parms_for): New fn. 8358 * call.c (add_function_candidate, build_over_call): Call it. 8359 * call.c (build_new_method_call): Use current_vtt_parm. 8360 * init.c (expand_virtual_init): Likewise. 8361 * class.c (same_signature_p): No longer static. 8362 * cp-tree.h: Declare it. 8363 * search.c (look_for_overrides_r): Use it. 8364 83652001-02-17 Mark Mitchell <mark@codesourcery.com> 8366 8367 * cp-tree.h (new_abi_rtti_p): Remove. 8368 (name_mangling_version): Likewise. 8369 (flag_do_squangling): Likewise. 8370 * class.c (build_rtti_vtbl_entries): Remove old ABI support. 8371 * decl.c (grokfndecl): Likewise. 8372 * decl2.c (name_mangling_version): Remove. 8373 (flag_do_squangling): Likewise. 8374 (lang_f_options): Remove `squangle'. 8375 (unsupported_options): Add `squangle'. 8376 (cxx_decode_option): Issue a warning about uses of 8377 -fname-mangling-version. 8378 (finish_file): Remove old ABI support. 8379 * pt.c (check_explicit_specialization): Likewise. 8380 (tsubst_decl): Likewise. 8381 * rtti.c (init_rtti_processing): Likewise. 8382 (build_headof): Likewise. 8383 (get_tinfo_decl_dynamic): Likewise. 8384 (tinfo_from_decl): Likewise. 8385 (build_dynamic_cast_1): Likewise. 8386 (synthesize_tinfo_var): Likewise. 8387 * init.c (build_new): Allow enumeration types for the array-bounds 8388 in a direct-new-declarator. 8389 8390 * semantics.c (finish_typeof): Resolve OFFSET_REFs. 8391 8392 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and 8393 TREE_PROTECTED from the template being specialized. 8394 83952001-02-17 Jason Merrill <jason@redhat.com> 8396 8397 * decl2.c (build_artificial_parm): Set TREE_READONLY. 8398 8399 * decl.c (bad_specifiers): Allow throw specs on things with 8400 pointer-to-function or -member-function type. 8401 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize 8402 a pmf. 8403 84042001-02-17 Mark Mitchell <mark@codesourcery.com> 8405 8406 * call.c (check_dtor_name): Handle template names correctly. 8407 84082001-02-16 Jason Merrill <jason@redhat.com> 8409 8410 * cp-tree.h (DECL_USE_VTT_PARM): Remove. 8411 * decl2.c (maybe_retrofit_in_chrg): Don't create it. 8412 * optimize.c (maybe_clone_body): Don't substitute it. 8413 * call.c (build_new_method_call): Check in_chrg instead. 8414 * init.c (expand_virtual_init): Likewise. 8415 84162001-02-16 Gabriel Dos Reis <gdr@codesourcery.com> 8417 8418 * decl.c (check_tag_decl): Make sure a typedef for an anonymous 8419 class-type introduces at least a type-name. 8420 84212001-02-16 Jakub Jelinek <jakub@redhat.com> 8422 8423 * call.c (convert_like_real): Create a temporary for non-lvalue. 8424 84252001-02-16 Jeffrey Oldham <oldham@codesourcery.com> 8426 8427 * cp-tree.h: Fix typos in comments. 8428 84292001-02-16 Jason Merrill <jason@redhat.com> 8430 8431 * optimize.c (remap_block): If we're compiling a clone, pass the 8432 new block to insert_block. 8433 84342001-02-16 Mark Mitchell <mark@codesourcery.com> 8435 8436 * semantics.c (finish_asm_stmt): Robustify. 8437 84382001-02-15 Mark Mitchell <mark@codesourcery.com> 8439 8440 * pt.c (push_template_decl_real): Don't remangle the name of a 8441 class template. 8442 84432001-02-15 Jim Meyering <meyering@lucent.com> 8444 8445 * Make-lang.in (c++.install-common): Depend on installdirs. 8446 (c++.install-info): Likewise. 8447 (c++.install-man): Likewise. 8448 84492001-02-15 Mark Mitchell <mark@codesourcery.com> 8450 8451 * typeck2.c (build_m_component_ref): Robustify. 8452 84532001-02-15 Alexandre Oliva <aoliva@redhat.com> 8454 8455 * friend.c (do_friend): Don't take the nested [template] class 8456 into account when deciding whether to warn about the friend 8457 function not referring to a template function. 8458 84592001-02-14 Jakub Jelinek <jakub@redhat.com> 8460 8461 * typeck.c (build_unary_op): Clarify error message. 8462 84632001-02-08 Aldy Hernandez <aldyh@redhat.com> 8464 8465 * parse.y (component_constructor_declarator): allow optional 8466 parentheses around constructor class name. 8467 84682001-02-14 Nathan Sidwell <nathan@codesourcery.com> 8469 8470 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c 8471 section. 8472 * init.c (emit_base_init): Remove incorrect comment about 8473 virtual bases. 8474 * method.c (make_thunk): Fix comment alignment. 8475 84762001-02-14 Nathan Sidwell <nathan@codesourcery.com> 8477 8478 Kill remnants of this is variable. 8479 * cp-tree.h (flag_this_is_variable): Remove. 8480 * decl2.c (flag_this_is_variable): Remove. 8481 * class.c (fixed_type_or_null): Add cdtor parm. Adjust. 8482 (build_vbase_path): The path is non-static, even in a cdtor. 8483 (resolves_to_fixed_type_p): Add additional return value. 8484 * search.c (init_vbase_pointers): Adjust. 8485 * tree.c (lvalue_p_1): Adjust. 8486 * typeck.c (mark_addressable): Adjust. 8487 84882001-02-14 Nathan Sidwell <nathan@codesourcery.com> 8489 8490 * pt.c (unify): Don't check cv quals of array types. 8491 84922001-02-14 Nathan Sidwell <nathan@codesourcery.com> 8493 8494 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to 8495 check whether we already have the type. 8496 84972001-02-13 Mark Mitchell <mark@codesourcery.com> 8498 8499 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment. 8500 * call.c (build_op_delete_call): Simplify to remove duplicate 8501 code. 8502 * class.c (clone_function_decl): Don't build the deleting variant 8503 of a non-virtual destructor. 8504 * decl.c (finish_destructor_body): Don't call delete if this is a 8505 non-virtual destructor. 8506 * init.c (build_delete): Explicitly call `operator delete' when 8507 deleting an object with a non-virtual destructor. 8508 85092001-02-13 Jason Merrill <jason@redhat.com> 8510 8511 * lang-specs.h: Add more __EXCEPTIONS. 8512 85132001-02-12 Nathan Sidwell <nathan@codesourcery.com> 8514 8515 * typeck2.c (process_init_constructor): Check 8516 TREE_HAS_CONSTRUCTOR before issuing missing init warning. 8517 85182001-02-12 Nathan Sidwell <nathan@codesourcery.com> 8519 8520 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case): 8521 Remove spurious information in comment. Allow further 8522 adjustments of REFERENCE_TYPE args. 8523 85242001-02-12 Nathan Sidwell <nathan@codesourcery.com> 8525 8526 * errfn.c (cp_deprecated): Tweak diagnostic text. 8527 * parse.y (new_initializer): Deprecate initializer lists 8528 extension. 8529 85302001-02-12 Mark Mitchell <mark@codesourcery.com> 8531 8532 Remove old ABI support. 8533 85342001-02-11 Mark Mitchell <mark@codesourcery.com> 8535 8536 * decl2.c (flag_vtable_thunks): Always set it to 1. 8537 (flag_new_abi): Likewise. 8538 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI. 8539 8540 * Makefile.in (g++spec.o): Fix typo. 8541 85422001-02-09 Jason Merrill <jason@redhat.com> 8543 8544 * lang-specs.h: Restore definition of __EXCEPTIONS. 8545 85462001-02-08 Jason Merrill <jason@redhat.com> 8547 8548 * search.c (shared_member_p): New function. 8549 (lookup_field_r): Use it. 8550 * cp-tree.h (SHARED_MEMBER_P): Remove. 8551 8552 * method.c (process_overload_item): Handle template-dependent array 8553 bounds. 8554 * pt.c (type_unification_real): If we end up with undeduced nontype 8555 parms, try again. 8556 8557 * decl.c (lookup_name_real): Tweak warning to refer to decls, not 8558 types. 8559 8560 * typeck2.c (friendly_abort): Don't say anything if we have 8561 earlier errors or sorries. 8562 8563 * decl.c (check_tag_decl): Notice attempts to redefine bool and 8564 wchar_t. Ignore if in_system_header. 8565 8566 * decl.c (maybe_push_cleanup_level): New fn... 8567 (start_decl_1): ...split out from here. 8568 * cvt.c (build_up_reference): Use it. 8569 * cp-tree.h: Declare it. 8570 85712001-02-07 Mark Mitchell <mark@codesourcery.com> 8572 8573 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor 8574 spec. 8575 85762001-02-06 Nathan Sidwell <nathan@codesourcery.com> 8577 8578 * pt.c (lookup_template_class): Make sure it's a primary 8579 template or template_template_parm when called from the parser. 8580 (instantiate_template_class): Add assertion. 8581 85822001-02-05 Alexandre Oliva <aoliva@redhat.com> 8583 8584 * method.c (build_mangled_name) [old abi]: Protect flush_repeats() 8585 from error_mark_node. 8586 85872001-02-05 Nathan Sidwell <nathan@codesourcery.com> 8588 8589 Fix specification and implementation bugs in V3 ABI 8590 construction vtables. 8591 * cp-tree.h (flag_dump_class_layout): New flag. 8592 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove. 8593 (BINFO_LOST_PRIMARY_P): New flag. 8594 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts. 8595 (BINFO_PRIMARY_MARKED_P): Rename to ... 8596 (BINFO_PRIMARY_P): ... here. 8597 (binfo_via_virtual): New prototype. 8598 * decl2.c (flag_dump_class_layout): New flag. 8599 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to 8600 use `=' as a file name separator. 8601 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary 8602 bases. 8603 (build_vtbl_address): If this is a virtual primary base, then 8604 get the vtbl of what it is ultimately primary for. 8605 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust 8606 for BINFO_PRIMARY_P. 8607 (dfs_skip_nonprimary_vbases_markedp): Likewise. 8608 (get_shared_vbase_if_not_primary): Likewise. 8609 (dfs_get_pure_virtuals): Likewise. 8610 (expand_upcast_fixups): Likewise. 8611 (fixup_virtual_upcast_offsets): Likewise. 8612 (dfs_find_vbase_instance): Likewise. 8613 (find_vbase_instance): Likewise. 8614 (binfo_from_vbase): Adjust comment to reflect reality. 8615 (binfo_via_virtual): New function. 8616 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros 8617 for binfo walking during VTT construction. 8618 (dfs_mark_primary_bases): Remove. 8619 (force_canonical_binfo_r): New function. 8620 (force_canonical_binfo): New function. 8621 (mark_primary_virtual_base): New function. 8622 (mark_primary_bases): Walk in inheritance graph order, use 8623 mark_primary_virtual_base. 8624 (determine_primary_base): Use some more intermediate variables. 8625 (dfs_find_final_overrider): Don't check for overriding along a 8626 virtual path. 8627 (dfs_modify_vtables): Walk into primary virtual bases too. 8628 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P. 8629 (build_base_fields): Likewise. 8630 (dfs_set_offset_for_unshared_vbases): Likewise. 8631 (layout_virtual_bases): Likewise. 8632 (end_of_class): Likewise. 8633 (finish_struct_1): Call dump_class_hierarchy, if requested. 8634 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos. 8635 (dump_class_hierarchy_r): Add stream parameter. Emit more information. 8636 (dump_class_hierarchy): Add file parameter. Append to file, if 8637 required. 8638 (finish_vtbls): Adjust accumulate_vtbl_inits call. 8639 Use canonical base for virtual bases. 8640 (build_vtt): Add more comments. Adjust build_vtt_inits call. 8641 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm. 8642 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P, 8643 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for 8644 virtual VTTs. 8645 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P 8646 from DATA. We want virtual primary bases and all bases via virtual. 8647 Only set BINFO_VPTR_INDEX for top level. Look up from a primary 8648 virtual base when not a construction vtable. 8649 (dfs_ctor_vtable_bases_queue_p): New DFS predicate. 8650 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call. 8651 Use canonical bases when processing virtual bases. 8652 (accumulate_vtbl_inits): We're interested in any base via a 8653 virtual path. 8654 (dfs_accumulate_vtbl_inits): If this is a primary virtual base 8655 within a construction vtable, determine what is being overridden. 8656 (build_vtbl_initializer): Add more comments 8657 (add_vcall_offset_vtbl_entries_1): Adjust comment. 8658 (build_rtti_vtbl_entries): Check if the base has lost its 8659 primary. 8660 86612001-02-05 Mark Mitchell <mark@codesourcery.com> 8662 8663 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES. 8664 8665Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 8666 8667 * decl.c (pushdecl): Call abort instead of fatal. 8668 * except.c (decl_is_java_type): Call fatal_error instead of fatal. 8669 * init.c (build_new_1): Likewise. 8670 (build_java_class_ref): Call internal_error and fatal_error, not fatal. 8671 * decl.c (build_typename_type): hash_table_init now returns void. 8672 decl.c (init_decl_processing): Make an error non-fatal. 8673 86742001-02-04 Mark Mitchell <mark@codesourcery.com> 8675 8676 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting. 8677 Document. 8678 (CLASSTYPE_INTERFACE_KNOWN): Likewise. 8679 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise. 8680 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise. 8681 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise. 8682 * decl.c (maybe_commonize_var): Use the new name-mangling where 8683 appropriate. 8684 * decl2.c (comdat_linkage): Enhance comments. Make all 8685 compiler-generated things static, if COMDAT is not available. 8686 (get_tinfo_decl): Do not make typeinfo objects that belong in the 8687 library COMDAT. 8688 (tinfo_base_init): Use the correct mangled name for typeinfo 8689 strings, and push them into the global scope. 8690 (typeinfo_in_lib_p): New function. 8691 (synthesize_tinfo_var): Use it. 8692 (create_real_tinfo_var): Likewise. 8693 86942001-02-03 Jakub Jelinek <jakub@redhat.com> 8695 8696 * decl.c (push_class_binding): Use context_for_name_lookup instead 8697 of CP_DECL_CONTEXT. 8698 * search.c (context_for_name_lookup): Remove static. Check for NULL 8699 context in the loop. 8700 * cp-tree.h (context_for_name_lookup): Add prototype. 8701 87022001-02-02 Jakub Jelinek <jakub@redhat.com> 8703 8704 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove. 8705 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack): 8706 Remove. 8707 * call.c (convert_class_to_reference, build_user_type_conversion_1, 8708 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper. 8709 87102001-02-02 Mark Mitchell <mark@codesourcery.com> 8711 8712 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list 8713 of macros used when compiling g++spec.c. 8714 * g++spec.c (lang_specific_driver): Link with the shared 8715 libgcc by default. 8716 87172001-01-29 Joseph S. Myers <jsm28@cam.ac.uk> 8718 8719 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator, 8720 make_reference_declarator, make_call_declarator), method.c 8721 (implicitly_declare_fn), parse.y (namespace_using_decl, 8722 notype_unqualified_id, expr_or_declarator, new_type_id, 8723 after_type_declarator, direct_after_type_declarator, 8724 notype_declarator, complex_notype_declarator, 8725 complex_direct_notype_declarator, qualified_id, 8726 notype_qualified_id, overqualified_id, direct_new_declarator, 8727 absdcl, direct_abstract_declarator, conversion_declarator), pt.c 8728 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt 8729 instead of build_parse_node. 8730 87312001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8732 8733 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE. 8734 (minus_one_node): Moved to top level gcc directory. Renamed 8735 to integer_minus_one_node. 8736 8737 * init.c (init_init_processing): Don't set minus_one_node. 8738 (build_vec_init): Use integer_minus_one_node. 8739 8740 * rtti.c (get_tinfo_decl_dynamic): Likewise. 8741 87422001-01-28 Jakub Jelinek <jakub@redhat.com> 8743 8744 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments 8745 identical and they would be replaced with constant, remove 8746 MODIFY_EXPR from the tree. 8747 87482001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8749 8750 * Make-lang.in: Remove all dependencies on defaults.h. 8751 * call.c: Don't include defaults.h. 8752 * decl.c: Likewise. 8753 * decl2.c: Likewise. 8754 * except.c: Likewise. 8755 * pt.c: Likewise. 8756 * rtti.c: Likewise. 8757 * tree.c: Likewise. 8758 * typeck.c: Likewise. 8759 87602001-01-25 Jakub Jelinek <jakub@redhat.com> 8761 8762 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded 8763 operators even in "C" linkage. 8764 * method.c (set_mangled_name_for_decl): Likewise. 8765 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for 8766 overloaded operators in "C" linkage. 8767 87682001-01-24 Nathan Sidwell <nathan@codesourcery.com> 8769 8770 * pt.c (tsubst_decl): Remove IN_DECL parameter. 8771 (tsubst_arg_types): Check parameter is not void. 8772 (tsubst): Adjust tsubst_decl call. 8773 87742001-01-24 Nathan Sidwell <nathan@codesourcery.com> 8775 8776 * call.c (add_builtin_candidate): Quote std properly, from 8777 previous change. 8778 87792001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 8780 8781 * pt.c (check_explicit_specialization): Clone constructors and 8782 destructors. 8783 87842001-01-23 Nathan Sidwell <nathan@codesourcery.com> 8785 8786 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC 8787 indicates anything special about template depth. Make sure we 8788 only count the user visible template classes. 8789 87902001-01-23 Nathan Sidwell <nathan@codesourcery.com> 8791 8792 * call.c (build_conv): Typo in comment. 8793 (add_builtin_candidate): Add more explanation. 8794 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR. 8795 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates 8796 when we have enumeral types. 8797 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE 8798 candidates for relops and eqops. 8799 (joust): Simplify control flow. Allow a non-template user 8800 function to hide a builtin. 8801 88022001-01-22 Nathan Sidwell <nathan@codesourcery.com> 8803 8804 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER. 8805 (more_specialized): Add deduction parameter. 8806 * call.c (joust): Adjust more_specialized call. 8807 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL, 8808 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags. 8809 (get_bindings_order): Remove. 8810 (get_bindings_real): Add DEDUCE parameter. 8811 (maybe_adjust_types_for_deduction): Return extra unify flags. Do 8812 REFERENCE_TYPE jig for DEDUCE_ORDER. 8813 (type_unification_real): Deal with DEDUCE_ORDER. Use result of 8814 maybe_adjust_types_for_deduction. 8815 (more_specialized): Add DEDUCE parameter. Call get_bindings_real 8816 directly. 8817 (try_one_overload): Use result of maybe_adjust_types_for_deduction. 8818 (check_cv_quals_for_unify): Use new unify qualifier flags. 8819 (unify): Clear new unify qualifier flags. 8820 (get_bindings_real): Add DEDUCE parameter. 8821 (get_bindings): Adjust call to get_bindings_real. 8822 (get_bindings_overload): Likewise. 8823 (most_specialized_instantiation): Adjust call to 8824 more_specialized. 8825 88262001-01-19 Jason Merrill <jason@redhat.com> 8827 8828 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI. 8829 8830 * decl.c (init_decl_processing): Just force -fvtable-thunks on if 8831 -fnew-abi. 8832 88332001-01-19 Ute Pelkmann <scope.muc@t-online.de> 8834 8835 * decl2.c (arg_assoc_class): Fix double iteration logic. 8836 88372001-01-19 Jason Merrill <jason@redhat.com> 8838 8839 * init.c (build_delete): Always call convert_force to strip cv-quals. 8840 8841 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI. 8842 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI. 8843 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI. 8844 88452001-01-19 Nathan Sidwell <nathan@codesourcery.com> 8846 8847 * search.c (get_vbase_1): Count only virtual bases. 8848 88492001-01-19 Nathan Sidwell <nathan@codesourcery.com> 8850 8851 * class.c (duplicate_tag_error): Robustify flag clearing. 8852 88532001-01-19 Nathan Sidwell <nathan@codesourcery.com> 8854 8855 * cp-tree.h (lookup_template_class): Add complain parm. 8856 * decl.c (lookup_namespace_name): Adjust call to 8857 lookup_template_class. 8858 (make_typename_type): Likewise. 8859 * semantics.c (finish_template_type): Likewise. 8860 * pt.c (lookup_template_class): Add complain parm. Adjust. 8861 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class. 8862 (tsubst): Likewise. 8863 88642001-01-19 Nathan Sidwell <nathan@codesourcery.com> 8865 8866 * pt.c (copy_default_args_to_explicit_spec): Preserve 8867 object's CV quals. Reorganize. 8868 88692001-01-18 Nathan Sidwell <nathan@codesourcery.com> 8870 8871 * typeck.c (build_modify_expr): Say `initialization' for 8872 INIT_EXPRs. 8873 * init.c (build_default_init): Convert to enumeral type, if 8874 needed. 8875 88762001-01-18 Jakub Jelinek <jakub@redhat.com> 8877 8878 * parse.y (nomods_initdcl0): Properly set things up for 8879 initdcl0_innards. 8880 88812001-01-18 Nathan Sidwell <nathan@codesourcery.com> 8882 8883 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag. 8884 (type_unification_real): Set it. 8885 (unify): Use it. 8886 88872001-01-18 Nathan Sidwell <nathan@codesourcery.com> 8888 8889 * decl.c (finish_destructor_body): Convert to vbase pointer here. 8890 88912001-01-18 Nathan Sidwell <nathan@codesourcery.com> 8892 8893 * semantics.c (begin_class_definition): Check we're not inside a 8894 template parm list. 8895 88962001-01-18 Nathan Sidwell <nathan@codesourcery.com> 8897 8898 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of 8899 BASELINK_P. 8900 89012001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 8902 8903 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR. 8904 * call.c (build_over_call): Add comment. 8905 89062001-01-16 Daniel Berlin <dberlin@redhat.com> 8907 8908 * cvt.c (ocp_convert): Handle vector type conversion 8909 * typeck2.c (digest_init): Handle vector type initializations 8910 89112001-01-16 Phil Edwards <pme@sources.redhat.com> 8912 8913 * g++spec.c: Don't add libraries needlessly if -fsyntax-only 8914 was given. 8915 89162001-01-15 Nathan Sidwell <nathan@codesourcery.com> 8917 8918 * pt.c (check_nontype_parm): Rename to ... 8919 (invalid_nontype_parm_type_p): ... here. 8920 (process_template_parm): Adjust. 8921 (convert_template_argument): Adjust. 8922 89232001-01-15 Nathan Sidwell <nathan@codesourcery.com> 8924 8925 * pt.c (check_nontype_parm): New function. 8926 (process_template_parm): Use it. 8927 (convert_template_argument): Use it. 8928 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to 8929 member. 8930 89312001-01-14 Jeffrey Oldham <oldham@codesourcery.com> 8932 8933 * tree.c: Add defaults.h 8934 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY. 8935 * Make-lang.in (cp/tree.o): Add defaults.h. 8936 89372001-01-13 Joseph S. Myers <jsm28@cam.ac.uk> 8938 8939 * Make-lang.in (CXX_C_OBJS): Add c-format.o. 8940 89412001-01-13 Joseph S. Myers <jsm28@cam.ac.uk> 8942 8943 * g++.1: Change to be ".so man1/gcc.1". 8944 89452001-01-13 Joseph S. Myers <jsm28@cam.ac.uk> 8946 8947 * Make-lang.in (c++.info, c++.install-info): Build and install g++ 8948 internals info. 8949 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info. 8950 ($(srcdir)/cp/g++int.info): New target. 8951 * gxxint.texi: Add info directory entry. Use @@ in email address. 8952 * .cvsignore: Update. 8953 89542001-01-12 Nathan Sidwell <nathan@codesourcery.com> 8955 8956 * typeck.c (build_c_cast): Do template processing earlier. 8957 Always pedwarn on array casts. 8958 89592001-01-12 Nathan Sidwell <nathan@codesourcery.com> 8960 8961 * friend.c (make_friend_class): Make sure a templated class is 8962 actually a template. 8963 89642001-01-11 Nathan Sidwell <nathan@codesourcery.com> 8965 8966 * decl2.c (get_guard): Set linkage from guarded decl. 8967 89682001-01-11 Nathan Sidwell <nathan@codesourcery.com> 8969 8970 * call.c (convert_default_arg): Check for unprocessed 8971 DEFAULT_ARG. 8972 * cp-tree.h (replace_defarg): Move to spew.c. 8973 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to 8974 spew.c, which is where they really are. 8975 (done_pending_defargs): Declare. 8976 (unprocessed_defarg_fn): Declare. 8977 * decl.c (replace_defarg): Move to spew.c 8978 * parse.y (structsp): Call done_pending_defargs. 8979 * spew.c (defarg_fns): Rearrange list structure. 8980 (defarg_fnsdone): New static variable. 8981 (defarg_depfns): New static variable. 8982 (init_spew): Adjust. 8983 (add_defarg_fn): Store the type in TREE_TYPE. 8984 (do_pending_defargs): Detect and deal with ordering constraints 8985 and circularity. 8986 (done_pending_defargs): New function. 8987 (unprocessed_defarg_fn): New function. 8988 (replace_defarg): Moved from decl.c. Robustify. Don't save 8989 if circularity detected. 8990 89912001-01-11 Nathan Sidwell <nathan@codesourcery.com> 8992 8993 * pt.c (unify): Check array has a domain, before checking 8994 whether it is variable sized. 8995 89962001-01-11 Nathan Sidwell <nathan@codesourcery.com> 8997 8998 * decl.c (grokparms): Unobfuscate and get correct diagnostic for 8999 parameters with pointers to arrays of unknown bound. 9000 90012001-01-11 Nathan Sidwell <nathan@codesourcery.com> 9002 9003 * parse.y (template_parm_header, template_spec_header): New 9004 reductions. Split out from ... 9005 (template_header): ... here. Use them. 9006 (template_template_parm): Use template_parm_header. 9007 * semantics.c (finish_template_template_parm): Add assert. 9008 90092001-01-10 Mark Mitchell <mark@codesourcery.com> 9010 9011 * mangle.c (write_builtin_type): Fix thinko. 9012 9013 * pt.c (copy_default_args_to_explicit_spec_1): New function. 9014 (copy_default_args_to_explicit_spec): Likewise. 9015 (check_explicit_specialization): Use it. 9016 9017 * class.c (finish_struct_1): Remove last argument in call to 9018 make_decl_rtl; use make_function_rtl instead of make_decl_rtl. 9019 * decl.c (builtin_function): Likewise. 9020 (build_cp_library_fn): Likewise. 9021 (check_initializer): Likewise. 9022 (make_rtl_for_nonlocal_decl): Likewise. 9023 (cp_finish_decl): Likewise. 9024 (start_function): Likewise. 9025 * decl2.c (finish_anon_union): Likewise. 9026 * friend.c (do_friend): Likewise. 9027 * init.c (build_java_class_ref): Likewise. 9028 * method.c (make_thunk): Likewise. 9029 * pt.c (tsubst_friend_function): Likewise. 9030 * semantics.c (expand_body): Likewise. 9031 90322001-01-10 Mark Mitchell <mark@codesourcery.com> 9033 9034 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not 9035 looking at DECL_CLONED_FUNCTION for non-functions. 9036 90372001-01-10 Nathan Sidwell <nathan@codesourcery.com> 9038 9039 * error.c (dump_template_parameter): Use parm to determine how 9040 to print default value. 9041 90422001-01-10 Nathan Sidwell <nathan@codesourcery.com> 9043 9044 * class.c (duplicate_tag_error): Clear more flags. 9045 90462001-01-10 Nathan Sidwell <nathan@codesourcery.com> 9047 9048 * call.c (build_new_method_call): Use binfo_for_vbase. 9049 90502001-01-10 Joseph S. Myers <jsm28@cam.ac.uk> 9051 9052 * cp-tree.h (flag_cond_mismatch): Don't declare. 9053 * decl2.c (flag_cond_mismatch): Don't define. 9054 (lang_f_options): Remove cond-mismatch. 9055 (unsupported_options): Add cond-mismatch. 9056 90572001-01-09 Nathan Sidwell <nathan@codesourcery.com> 9058 9059 * class.c (handle_using_decl): Reject using of constructor name 9060 of sourcing class. Allow injecting of a method with same name as 9061 nested class. Fixup error messages. 9062 90632001-01-09 Joseph S. Myers <jsm28@cam.ac.uk> 9064 9065 * decl2.c (lang_decode_option): Handle -Wformat=2. 9066 90672001-01-08 Nathan Sidwell <nathan@codesourcery.com> 9068 9069 * cp-tree.h (lang_decl_flags): Rename defined_in_class to 9070 initialized_in_class. 9071 (DECL_DEFINED_IN_CLASS_P): Rename to ... 9072 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning. 9073 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P. 9074 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P. 9075 * pt.c (check_default_tmpl_args): Adjust for 9076 DECL_INITIALIZED_IN_CLASS_P. 9077 (instantiate_class_template): Likewise. 9078 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P. 9079 9080 * class.c (finish_struct): Constify saved_filename. 9081 90822001-01-08 Nathan Sidwell <nathan@codesourcery.com> 9083 9084 * class.c (duplicate_tag_error): Adjust diagnostic. 9085 (finish_struct): Locally set location to start of struct. 9086 * decl.c (fixup_anonymous_aggr): Use cp_error_at. 9087 90882001-01-08 Nathan Sidwell <nathan@codesourcery.com> 9089 9090 * decl.c (struct binding_level): Adjust class_shadowed comments 9091 to reflect reality. 9092 (push_class_level_binding): Adjust comments to reflect reality. 9093 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding. 9094 Don't set TREE_VALUE on the class_shadowed list. 9095 90962001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 9097 9098 * decl2.c (acceptable_java_type): Allow references too. 9099 * init.c (build_java_class_ref): When using the new ABI, search 9100 `class$' and have it mangled with `mangle_decl.' 9101 * mangle.c (write_java_integer_type_codes): New function. 9102 (write_builtin_type): Detect and mangle Java integer and real 9103 types. 9104 91052001-01-07 Mark Mitchell <mark@codesourcery.com> 9106 9107 * decl2.c (grokfield): Don't accept `asm' specifiers for 9108 non-static data members. 9109 91102001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 9111 9112 * expr.c (cplus_expand_expr): Don't reset `target'. 9113 91142001-01-07 Neil Booth <neil@daikokuya.demon.co.uk> 9115 9116 * cp/decl2.c (cxx_post_options): Call cpp_post_options. 9117 91182001-01-05 Nathan Sidwell <nathan@codesourcery.com> 9119 9120 * parse.y (template_datadef): Check for error_mark_node. 9121 91222001-01-05 Nathan Sidwell <nathan@codesourcery.com> 9123 9124 * cp-tree.def (DEFAULT_ARG): Make `x' class. 9125 91262001-01-04 Joseph S. Myers <jsm28@cam.ac.uk> 9127 9128 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define. 9129 (record_builtin_type): Make non-static. 9130 (flag_short_double): Don't declare. 9131 (init_decl_processing): Remove the creation of many tree nodes now 9132 in c_common_nodes_and_builtins. 9133 (build_void_list_node): New function. 9134 * decl2.c (flag_short_double, flag_short_wchar): Don't define. 9135 * cp-tree.h (flag_short_wchar): Don't declare. 9136 91372001-01-04 Mark Mitchell <mark@codesourcery.com> 9138 9139 * call.c (build_conv): Don't use build1 for USER_CONV. 9140 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes. 9141 91422001-01-03 Joseph S. Myers <jsm28@cam.ac.uk> 9143 9144 * lex.c (lang_init): Call c_common_lang_init. 9145 91462001-01-03 Nathan Sidwell <nathan@codesourcery.com> 9147 9148 * search.c (lookup_fnfields_here): Remove. 9149 (look_for_overrides_r): Use lookup_fnfields_1. 9150 Ignore functions from using declarations. 9151 91522001-01-03 Nathan Sidwell <nathan@codesourcery.com> 9153 9154 Implement exceptions specifiers for implicit member functions. 9155 * cp-tree.h (merge_exceptions_specifiers): Declare new function. 9156 * method.c (synthesize_exception_spec): New function. 9157 (locate_dtor, locate_ctor, locate_copy): New functions. 9158 (implicitly_declare_fn): Generate the exception spec too. 9159 * search.c (check_final_overrider): Check artificial functions 9160 too. 9161 * typeck2.c (merge_exception_specifiers): New function. 9162 91632001-01-03 Jason Merrill <jason@redhat.com> 9164 9165 * init.c (build_default_init): New fn. 9166 (perform_member_init): Split out from here. 9167 (build_new_1): Use it. Simplify initialization logic. 9168 (build_vec_init): Take an array, rather than a pointer and maxindex. 9169 Speed up simple initializations. Don't clean up if we're assigning. 9170 * cp-tree.h: Adjust. 9171 * decl2.c (do_static_initialization): Remove TREE_VEC case. 9172 * parse.y (new_initializer): Return void_zero_node for (). 9173 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR. 9174 * typeck2.c (digest_init): Only complain about user-written 9175 CONSTRUCTORs. 9176 91772000-12-22 Mike Stump <mrs@wrs.com> 9178 9179 * decl2.c: (max_tinst_depth): Increase to 50. 9180 91812001-01-02 Mark Mitchell <mark@codesourcery.com> 9182 9183 * class.c (invalidate_class_lookup_cache): Zero the 9184 previous_class_values. 9185 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not 9186 TREE_INT_CST_HIGH. 9187 (CLASSTYPE_TEMPLATE_LEVEL): Likewise. 9188 * decl.c (free_bindings): New variable. 9189 (push_binding): Don't create a new binding if we have one on the 9190 free list. 9191 (pop_binding): Put old bindings on the free list. 9192 (init_decl_processing): Use size_int, not build_int_2. 9193 Register free_bindings as a GC root. 9194 (cp_make_fname_decl): Use size_int, not build_int_2. 9195 (push_inline_template_parms_recursive): Likewise. 9196 (end_template_parm_list): Likewise. 9197 (for_each_template_parm): Do not use walk_tree_without_duplicates. 9198 (tsubst_template_parms): Use size_int, not build_int_2. 9199 (tsubst): Likewise. 9200 * rtti.c (get_vmi_pseudo_type_info): Likewise. 9201 92022001-01-02 Richard Henderson <rth@redhat.com> 9203 9204 * parse.y (asm): Set ASM_INPUT_P. 9205 92062001-01-02 Jason Merrill <jason@redhat.com> 9207 9208 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE 9209 for v3 ABI. 9210 9211 * typeck.c (cp_truthvalue_conversion): New fn. 9212 * cvt.c (ocp_convert): Use it. 9213 9214 * cp-tree.h: Lose c-common.c decls. 9215 9216 * typeck.c (build_unary_op): Restore old &a.f diagnostic code. 9217 * cvt.c (convert_to_void): Use type_unknown_p. 9218 9219 * typeck.c (strip_all_pointer_quals): Also strip quals from 9220 pointer-to-member types. 9221 9222 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat 9223 parse.y as C. 9224 9225 * call.c (build_new_method_call): Do evaluate the object parameter 9226 when accessing a static member. 9227 * typeck.c (build_component_ref): Likewise. 9228 92292001-01-02 Andreas Jaeger <aj@suse.de> 9230 9231 * decl.c (cp_missing_noreturn_ok_p): New. 9232 (init_decl_processing): Set lang_missing_noreturn_ok_p. 9233 92342000-12-29 Jakub Jelinek <jakub@redhat.com> 9235 9236 * decl.c (init_decl_processing): Fix sign of wchar_type_node. 9237 92382000-12-29 Mark Mitchell <mark@codesourcery.com> 9239 9240 * class.c (pushclass): Remove #if 0'd code. 9241 * cp-tree.h (overload_template_name): Remove. 9242 * decl.c (store_bindings): Simplify. 9243 (pop_from_top_level): Likewise. 9244 * pt.c (overload_template_name): Remove. 9245 (instantiate_decl): Don't call push_to_top_level if it's not 9246 needed. 9247 92482000-12-28 Mark Mitchell <mark@codesourcery.com> 9249 9250 * pt.c (register_local_specialization): Don't return a value. 9251 (lookup_template_class): Use move-to-front heuristic when looking 9252 up template instantiations. 9253 (instantiate_decl): Only push_to_top_level when we're actually 9254 going to instantiate the template. 9255 92562000-12-29 Hans-Peter Nilsson <hp@bitrange.com> 9257 9258 * search.c (binfo_for_vtable): Return least derived class, not 9259 most. Handle secondary vtables. 9260 92612000-12-22 Jason Merrill <jason@redhat.com> 9262 9263 * pt.c (more_specialized): Don't optimize len==0. 9264 (fn_type_unification): If we're adding the return type, increase len. 9265 9266 * typeck.c (build_binary_op): Fix pmf comparison logic. 9267 9268 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not 9269 DECL_STATIC_FUNCTION_P. 9270 9271 * semantics.c (genrtl_finish_function): Don't try to jump to 9272 return_label unless it exists. 9273 9274 In partial ordering for a call, ignore parms for which we don't have 9275 a real argument. 9276 * call.c (joust): Pass len to more_specialized. 9277 (add_template_candidate_real): Strip 'this', pass len. 9278 * pt.c (more_specialized): Pass len down. Lose explicit_args parm. 9279 (get_bindings_order): New fn. Pass len down. 9280 (get_bindings_real): Strip 'this', pass len. 9281 (fn_type_unification): Likewise. 9282 (type_unification_real): Succeed after checking 'len' args. 9283 (most_specialized_instantiation): Lose explicit_args parm. 9284 * class.c (resolve_address_of_overloaded_function): Strip 'this', 9285 pass len. 9286 92872000-12-21 Jason Merrill <jason@redhat.com> 9288 9289 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not 9290 DECL_TEMPLATE_RESULT. 9291 9292 * search.c (lookup_field_r): Call lookup_fnfields_1, not 9293 lookup_fnfields_here. 9294 9295 * parse.y (typename_sub2): Return the TYPE_DECL, not the type. 9296 9297 * call.c (build_object_call): Also allow conversions that return 9298 reference to pointer to function. 9299 (add_conv_candidate): Handle totype being ref to ptr to fn. 9300 (build_field_call): Also allow members of type reference to function. 9301 Lose support for calling pointer to METHOD_TYPE fields. 9302 9303 * error.c (dump_expr): Handle *_CAST_EXPR. 9304 9305 * typeck2.c (build_scoped_ref): Always convert to the naming class. 9306 9307 * tree.c (break_out_cleanups): Lose. 9308 * cp-tree.h: Remove prototype. 9309 * typeck.c (build_component_ref): Don't break_out_cleanups. 9310 (build_compound_expr): Likewise. 9311 * semantics.c (finish_expr_stmt): Likewise. 9312 93132000-12-20 Richard Henderson <rth@redhat.com> 9314 9315 * cp-tree.h: Update declarations. 9316 * decl.c (finish_case_label): Return the new stmt node. 9317 * semantics.c (finish_goto_stmt): Likewise. 9318 (finish_expr_stmt, finish_return_stmt): Likewise. 9319 (finish_break_stmt, finish_continue_stmt): Likewise. 9320 (finish_asm_stmt): Likewise. 9321 * parse.y (already_scoped_stmt): Set STMT_LINENO. 9322 (compstmt, implicitly_scoped_stmt, stmt): Likewise. 9323 (simple_if, simple_stmt): Return the new stmt node. 9324 (save_lineno): New. 9325 93262000-12-18 Joseph S. Myers <jsm28@cam.ac.uk> 9327 9328 * cp-tree.h: Don't declare warn_long_long. 9329 93302000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 9331 9332 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of 9333 IS_AGGR_TYPE. 9334 93352000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 9336 9337 * pt.c (unify): Handle when both ARG and PARM are 9338 BOUND_TEMPLATE_TEMPLATE_PARM. 9339 93402000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 9341 9342 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and 9343 DECL_TEMPLATE_PARM_P. 9344 93452000-12-15 Jason Merrill <jason@redhat.com> 9346 9347 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs! 9348 9349 * init.c (build_new_1): Don't strip quals from type. 9350 9351 * decl.c (pushdecl): Don't check for linkage on a non-decl. 9352 9353 * call.c (build_op_delete_call): See through ARRAY_TYPEs. 9354 9355 * call.c (build_new_function_call): Lose space before paren in 9356 error message. 9357 (build_new_method_call): Likewise. 9358 9359 * typeck2.c (build_m_component_ref): Propagate quals from datum. 9360 93612000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 9362 9363 * pt.c (check_explicit_specialization): Propagate default 9364 function arguments to explicit specializations. 9365 93662000-12-13 DJ Delorie <dj@redhat.com> 9367 9368 * typeck.c (build_binary_op): Do signed/unsigned warnings for >? 9369 and <? operators. 9370 93712000-12-08 Jason Merrill <jason@redhat.com> 9372 9373 * error.c (dump_function_name): Don't let the user see __comp_ctor. 9374 9375 Clean up copy-initialization in overloading code. 9376 * call.c (build_user_type_conversion_1): Die if we are asked to 9377 convert to the same or a base type. 9378 (implicit_conversion): Avoid doing so. Lose reference binding code. 9379 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit 9380 direct-initialization. Also do direct-init part of copy-init. 9381 (build_user_type_conversion): Don't provide context to convert_like. 9382 * cvt.c (ocp_convert): build_user_type_conversion will now provide 9383 the constructor call for copy-init. 9384 9385 * pt.c (tsubst_decl): Call clone_function_decl here if this is an 9386 instantiation of a member template. 9387 (do_decl_instantiation): Not here. 9388 93892000-12-07 Nathan Sidwell <nathan@codesourcery.com> 9390 9391 * class.c (check_field_decls): Don't special case anonymous 9392 fields in error messages. 9393 (note_name_declared_in_class): Use %D on diagnostic. 9394 9395 * tree.c (pod_type_p): Use strip_array_types. 9396 (cp_valid_lang_attribute): Likewise. 9397 * typeck.c (cp_type_quals): Strip arrays separately, to avoid 9398 multiple evaluations. 9399 (cp_has_mutable_p): Use strip_array_types. 9400 94012000-12-07 Nathan Sidwell <nathan@codesourcery.com> 9402 9403 * cp-tree.h (sufficient_parms_p): Declare new function. 9404 * call.c (sufficient_parms_p): New function, broken out of ... 9405 (add_function_candidate): ... here. Use it. 9406 (add_conv_candidate): Use it. 9407 * decl.c (grok_ctor_properties): Use it. 9408 94092000-12-07 Jakub Jelinek <jakub@redhat.com> 9410 9411 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT. 9412 94132000-12-07 Joseph S. Myers <jsm28@cam.ac.uk> 9414 9415 * decl2.c (lang_decode_option): Handle -Wformat-security. 9416 94172000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 9418 9419 * pt.c (verify_class_unification): New function. 9420 (get_class_bindings): Use it. 9421 (try_class_unification): Tidy. 9422 (unify): Handle when argument of a template-id is not 9423 template parameter dependent. 9424 (template_args_equal): Handle when TREE_CODE's do not match. 9425 94262000-12-06 Alexandre Oliva <aoliva@redhat.com> 9427 9428 * lang-specs.h (c++): When invoking the stand-alone preprocessor 9429 for -save-temps, pass all relevant -Defines to it, and then don't 9430 pass them to cc1plus. 9431 94322000-12-05 Will Cohen <wcohen@redhat.com> 9433 9434 * decl.c (finish_case_label): Cleared 9435 more_cleanups_ok in surrounding function scopes. 9436 (define_label): Likewise. 9437 94382000-12-05 Nathan Sidwell <nathan@codesourcery.com> 9439 9440 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document. 9441 (get_matching_virtual): Remove. 9442 (look_for_overrides): Declare new function. 9443 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or 9444 DECL_VINDEX here. 9445 * class.c (check_for_override): Move base class iteration code 9446 to look_for_overrides. 9447 * search.c (next_baselink): Remove. 9448 (get_virtuals_named_this): Remove. 9449 (get_virtual_destructor): Remove. 9450 (tree_has_any_destructors_p): Remove. 9451 (struct gvnt_info): Remove. 9452 (check_final_overrider): Remove `virtual' from error messages. 9453 (get_matching_virtuals): Remove. Move functionality to ... 9454 (look_for_overrides): ... here, and ... 9455 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found 9456 to be overriding. 9457 94582000-12-05 Nathan Sidwell <nathan@codesourcery.com> 9459 9460 * typeck.c (get_delta_difference): If via a virtual base, 9461 return zero. 9462 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no 9463 adjustment. 9464 94652000-12-04 Richard Henderson <rth@redhat.com> 9466 9467 * error.c (dump_tree): Use output_add_string not OB_PUTS. 9468 94692000-12-04 Jason Merrill <jason@redhat.com> 9470 9471 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector". 9472 (write_builtin_type): Pass intSI_type_node and the like through 9473 type_for_mode. 9474 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'. 9475 Pass intSI_type_node and the like through type_for_mode. 9476 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE. 9477 * pt.c (tsubst, unify): Likewise. 9478 * tree.c (walk_tree): Likewise. 9479 * error.c (dump_type): Likewise. 9480 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE. 9481 9482 * Make-lang.in: Tweak top comment for emacs. 9483 (cp/TAGS): Restore. 9484 9485 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw. 9486 9487 * class.c (clone_function_decl): Robustify. 9488 94892000-12-04 Michael Matz <matzmich@cs.tu-berlin.de> 9490 9491 * decl.c (store_bindings): Only search in the non modified 9492 old_bindings for duplicates. 9493 94942000-12-04 Nathan Sidwell <nathan@codesourcery.com> 9495 9496 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not 9497 TYPE_POLYMORPHIC_P. 9498 9499 * typeck.c (build_static_cast): Remove unused variable. 9500 95012000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 9502 9503 * pt.c: Fix typo in comment. 9504 95052000-12-01 Joseph S. Myers <jsm28@cam.ac.uk> 9506 9507 * decl2.c (warn_format): Remove definition. 9508 (lang_decode_option): Handle -Wformat-nonliteral, 9509 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat. 9510 95112000-12-01 Joseph S. Myers <jsm28@cam.ac.uk> 9512 9513 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define. 9514 (init_decl_processing): Don't create string_type_node, 9515 const_string_type_node, wint_type_node, intmax_type_node, 9516 uintmax_type_node, default_function_type, ptrdiff_type_node and 9517 unsigned_ptrdiff_type_node. Adjust position of call to 9518 c_common_nodes_and_builtins. 9519 (identifier_global_value): New function. 9520 95212000-12-01 Nathan Sidwell <nathan@codesourcery.com> 9522 9523 * call.c (standard_conversion): Reject pointer to member 9524 conversions from ambiguous, inaccessible or virtual bases. 9525 * typeck.c (build_static_cast): Don't check pointers to members 9526 specially. 9527 95282000-11-30 Nathan Sidwell <nathan@codesourcery.com> 9529 9530 * method.c (do_build_copy_constructor): Preserve cv 9531 qualifications when accessing source object members. 9532 (do_build_assign_ref): Likewise. Remove separate diagnostics for 9533 unnamed fields. 9534 95352000-11-30 Nathan Sidwell <nathan@codesourcery.com> 9536 9537 * method.c (do_build_assign_ref): Construct appropriately 9538 CV-qualified base reference. Don't allow const casts in base 9539 conversion. 9540 95412000-11-30 Nathan Sidwell <nathan@codesourcery.com> 9542 9543 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on 9544 incomplete return type. 9545 95462000-11-28 Nathan Sidwell <nathan@codesourcery.com> 9547 9548 * parse.y (base_class.1): Produce a _TYPE not a _DECL. 9549 * semantics.c (finish_base_specifier): Accept a _TYPE not a 9550 _DECL. 9551 95522000-11-28 Nathan Sidwell <nathan@codesourcery.com> 9553 9554 * spew.c (yyerror): Cope if yylval.ttype is NULL. 9555 95562000-11-28 Nathan Sidwell <nathan@codesourcery.com> 9557 9558 * decl.c (grokdeclarator): Diagnose undefined template contexts. 9559 95602000-11-28 Nathan Sidwell <nathan@codesourcery.com> 9561 9562 * decl.c (grokdeclarator): Do type access control on friend 9563 class. 9564 95652000-11-27 Nathan Sidwell <nathan@codesourcery.com> 9566 9567 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by 9568 bison parser ickiness. 9569 * pt.c (tsubst_friend_function): Enter namespace scope when 9570 tsubsting the function name. 9571 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality. 9572 95732000-11-27 Nathan Sidwell <nathan@codesourcery.com> 9574 9575 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo. 9576 * cvt.c (cp_convert_to_pointer): Add force parameter. 9577 Allow conversions via virtual base if forced. 9578 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer. 9579 (ocp_convert): Likewise. 9580 * search.c (binfo_from_vbase): Return the virtual base's binfo. 9581 * typeck.c (get_delta_difference): Adjust handling of virtual 9582 bases. 9583 95842000-11-26 Mark Mitchell <mark@codesourcery.com> 9585 9586 * tree.c (struct list_hash): Remove. 9587 (list_hash_table): Make it be an htab. 9588 (struct list_proxy): New type. 9589 (list_hash_eq): New function. 9590 (list_hash_pieces): Renamed from ... 9591 (list_hash): ... this. 9592 (list_hash_lookup): Remove. 9593 (list_hash_add): Remove. 9594 (hash_tree_cons): Use the generic hashtable. 9595 (mark_list_hash): Remove. 9596 (init_tree): Create the hashtable. 9597 95982000-11-25 Joseph S. Myers <jsm28@cam.ac.uk> 9599 9600 * method.c (build_mangled_C9x_name): Rename to 9601 build_mangled_C99_name. Change C9X references in comments to 9602 refer to C99. 9603 96042000-11-24 Nathan Sidwell <nathan@codesourcery.com> 9605 9606 * parse.y (unary_expr): Move VA_ARG from here ... 9607 (primary): ... to here. 9608 96092000-11-24 Nathan Sidwell <nathan@codesourcery.com> 9610 9611 * semantics.c (finish_id_expr): If type is error_mark, return 9612 error_mark. 9613 96142000-11-23 Nathan Sidwell <nathan@codesourcery.com> 9615 9616 * pt.c (lookup_template_class): Simplify loop exit constructs. 9617 Cope when there is no partial instantiation of a template 9618 template member. 9619 9620Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com> 9621 9622 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H). 9623 96242000-11-22 Mark Mitchell <mark@codesourcery.com> 9625 9626 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op' 9627 prefix. 9628 9629 * pt.c (do_decl_instantiate): Explicitly clone constructors and 9630 destructors that haven't already been cloned. 9631 96322000-11-20 Richard Henderson <rth@redhat.com> 9633 9634 * parse.y (yyparse_1): Rename the parser entry point. 9635 96362000-11-20 Alex Samuel <samuel@codesourcery.com> 9637 9638 * mangle.c (write_name): Use <unscoped-name> for names directly in 9639 function scope. 9640 (write_unscoped_name): Accept names directly in function scope. 9641 96422000-11-20 Nathan Sidwell <nathan@codesourcery.com> 9643 9644 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword. 9645 * parse.y (extdef): Add EXPORT reduction. 9646 * spew.c (yylex): Don't skip export here. 9647 96482000-11-19 Mark Mitchell <mark@codesourcery.com> 9649 9650 * decl.c (init_decl_processing): Correct name of pure virtual 9651 function under the new ABI. 9652 * rtti.c (throw_bad_cast): Likewise, for bad cast function. 9653 (throw_bad_typeid): Likewise for bad typeid function. 9654 96552000-11-18 Mark Mitchell <mark@codesourcery.com> 9656 9657 * decl.c (grokparms): Don't even function types of `void' type, 9658 either. 9659 * mangle.c (write_type): Don't crash when confronted with the 9660 error_mark_node. 9661 9662 * decl.c (grokparms): Don't create parameters of `void' type. 9663 96642000-11-17 Zack Weinberg <zack@wolery.stanford.edu> 9665 9666 * lex.c (mark_impl_file_chain): Delete. 9667 (init_parse): Remove call to ggc_add_string_root. No need to 9668 ggc_strdup a string constant. Do not add impl_file_chain to GC 9669 roots. 9670 (handle_pragma_implementation): No need to ggc_strdup main_filename. 9671 96722000-11-17 Nathan Sidwell <nathan@codesourcery.com> 9673 9674 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type. 9675 96762000-11-17 Nathan Sidwell <nathan@codesourcery.com> 9677 9678 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro. 9679 * decl.c (grokdeclarator): Don't reject void parms here. 9680 (require_complete_types_for_parms): Simplify, use 9681 complete_type_or_else. 9682 (grokparms): Remove bitrot. Remove funcdef parm. 9683 Deal with ellipsis parm lists here. 9684 * semantics.c (finish_parmlist): Don't append void_list_node 9685 here. Set PARMLIST_ELLIPSIS_P. 9686 96872000-11-17 Nathan Sidwell <nathan@codesourcery.com> 9688 9689 * typeck2.c (incomplete_type_error): Reorganize to avoid 9690 excessive diagnostics. 9691 96922000-11-16 Zack Weinberg <zack@wolery.stanford.edu> 9693 9694 * lex.c (struct impl_files, internal_filename): Constify a char *. 9695 96962000-11-16 Mark Mitchell <mark@codesourcery.com> 9697 9698 * mangle.c (write_special_name_constructor): Don't generate 9699 assembler junk when confronted with an old-style constructor. 9700 (write_special_name_destructor): Likewise. 9701 (mangle_decl_string): Do it here instead. 9702 97032000-11-16 Nathan Sidwell <nathan@codesourcery.com> 9704 9705 * call.c (op_error): Make error messages clearer. 9706 97072000-11-15 Mark Mitchell <mark@codesourcery.com> 9708 9709 * decl.c (wrapup_globals_for_namespace): Don't mark things 9710 TREE_ASM_WRITTEN when they're not. 9711 97122000-11-15 Jason Merrill <jason@redhat.com> 9713 9714 * typeck2.c (friendly_abort): Uncount the error before handing 9715 off to fancy_abort. 9716 97172000-11-15 Nathan Sidwell <nathan@codesourcery.com> 9718 9719 * typeck.c (lookup_anon_field): Cope with qv qualifiers. 9720 97212000-11-14 Mark Mitchell <mark@codesourcery.com> 9722 9723 * class.c (build_vtbl_initializer): Fix typo in comment. 9724 * typeck.c (expr_sizeof): Don't crash on errors. 9725 97262000-11-14 Jim Wilson <wilson@redhat.com> 9727 9728 * lang-specs.h: Add %2 after %(cc1_options). 9729 97302000-11-14 Richard Henderson <rth@redhat.com> 9731 9732 * typeck.c (c_sizeof): Be strict about casting result value 9733 back to c_size_type_node. 9734 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise. 9735 97362000-11-13 Joseph S. Myers <jsm28@cam.ac.uk> 9737 9738 * typeck.c (build_unary_op): Use boolean_increment from 9739 c-common.c, moving the relevant code there. 9740 97412000-11-11 Jason Merrill <jason@redhat.com> 9742 9743 * typeck.c (mark_addressable): Don't call put_var_into_stack. 9744 9745 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics 9746 in inlines. 9747 97482000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 9749 9750 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy. 9751 * lex.c (copy_lang_decl): Likewise. 9752 97532000-11-09 Mark Mitchell <mark@codesourcery.com> 9754 9755 * dump.c (cp_dump_tree): Don't dump function bodies here. 9756 9757 * Make-lang.in (CXX_C_OBJS): Add c-dump.o. 9758 (dump.o): Update dependency list. 9759 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove. 9760 (flag_dump_translation_unit): Likewise. 9761 (CP_TYPE_QUALS): Adjust definition. 9762 (DECL_C_BIT_FIELD): Remove. 9763 (SET_DECL_C_BIT_FIELD): Likewise. 9764 (CLEAR_DECL_C_BIT_FIELD): Likewise. 9765 (add_maybe_template): Likewise. 9766 (strip_array_types): Likewise. 9767 (dump_node_to_file): Likewise. 9768 (cp_dump_tree): New function. 9769 * decl.c (init_decl_processing): Set lang_dump_tree. 9770 * decl2.c (flag_dump_translation_unit): Remove. 9771 * dump.c: Move most of it to ../c-dump.c. 9772 (cp_dump_tree): New function. 9773 * pt.c (add_maybe_template): Remove. 9774 * typeck.c (strip_array_types): Likewise. 9775 97762000-11-07 Eric Christopher <echristo@redhat.com> 9777 9778 * decl.c (init_decl_processing): Change definition of 9779 __wchar_t to wchar_t. Remove artificial declaration of 9780 wchar_t. 9781 * lex.c: Change instances of __wchar_t to wchar_t. 9782 97832000-11-09 Nathan Sidwell <nathan@codesourcery.com> 9784 9785 * lex.c (do_identifier): Don't lookup_name for operators. 9786 * parse.y (operator): Save looking_for_typename. 9787 (unoperator): Restore it. 9788 * spew.c (frob_opname): Use nth_token for lookahead. 9789 97902000-11-08 Nathan Sidwell <nathan@codesourcery.com> 9791 9792 * decl.c (grok_op_properties): Always use coerce_new_type and 9793 coerce_delete_type. 9794 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve 9795 exception specification. Tidy up. 9796 (coerce_delete_type): Preserve exception specification. Tidy up. 9797 97982000-11-07 Joseph S. Myers <jsm28@cam.ac.uk> 9799 9800 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c 9801 (push_binding_level), error.c (cp_tree_printer), pt.c 9802 (process_partial_specialization, tsubst_template_arg_vector), 9803 search.c (lookup_member): Use memset () instead of bzero (). 9804 98052000-11-07 Nathan Sidwell <nathan@codesourcery.com> 9806 9807 * decl.c (build_ptrmemfunc_type): Allow error_mark_node. 9808 98092000-11-05 Joseph S. Myers <jsm28@cam.ac.uk> 9810 9811 * Make-lang.in (c++.distdir): Remove. 9812 98132000-11-04 Mark Mitchell <mark@codesourcery.com> 9814 9815 * decl2.c (do_nonmember_using_decl): Allow `extern "C"' 9816 declarations from different namespaces to be combined. 9817 98182000-11-03 Zack Weinberg <zack@wolery.stanford.edu> 9819 9820 * decl.c: Include tm_p.h. 9821 98222000-11-03 Joseph S. Myers <jsm28@cam.ac.uk> 9823 9824 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp (). 9825 98262000-11-02 Joseph S. Myers <jsm28@cam.ac.uk> 9827 9828 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c 9829 (build_overload_value), repo.c (open_repo_file), xref.c 9830 (open_xref_file): Use strchr () and strrchr () instead of index () 9831 and rindex (). 9832 98332000-11-01 Bernd Schmidt <bernds@redhat.co.uk> 9834 9835 * call.c (build_over_call): Call fold on the CALL_EXPR. 9836 98372000-11-01 Gabriel Dos Reis <gdr@codesourcery.com> 9838 9839 * error.c (dump_template_decl): Separate template hearders with 9840 space not comma. 9841 98422000-10-31 Gabriel Dos Reis <gdr@codesourcery.com> 9843 9844 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace 9845 TS_* flags with corresponding TFF_*. Adjust prototypes of 9846 functions (which used to take a tree_string_flags) to take an int. 9847 9848 * cp-tree.h (enum tree_string_flags): Remove 9849 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, 9850 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS, 9851 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, 9852 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, 9853 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, 9854 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros. 9855 (type_as_string, decl_as_string, expr_as_string, 9856 context_as_string): Adjust prototype. 9857 9858 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER 9859 instead of TS_PLAIN. 9860 9861 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF 9862 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of 9863 plain `0'. 9864 98652000-10-30 Mark Mitchell <mark@codesourcery.com> 9866 9867 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro. 9868 (linkage_kind): New enumeration. 9869 (decl_linkage): New function. 9870 * decl2.c (comdat_linkage): Extend comment. 9871 * error.c (dump_function_decl): Print the arguments used to 9872 instantiate a template, even when not printing the type of the 9873 function. 9874 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P, 9875 not TREE_PUBLIC, to test for external linkage. 9876 * tree.c (decl_linkage): New function. 9877 98782000-10-28 Mark Mitchell <mark@codesourcery.com> 9879 9880 * pt.c (instantiate_decl): Always instantiate static data members 9881 initialized in-class. 9882 98832000-10-27 Zack Weinberg <zack@wolery.stanford.edu> 9884 9885 * Make-lang.in: Move all build rules here from Makefile.in, 9886 adapt to new context. Wrap all rules that change the current 9887 directory in parentheses. Expunge all references to $(P). 9888 When one command depends on another and they're run all at 9889 once, use && to separate them, not ;. Add OUTPUT_OPTION to 9890 all object-file generation rules. Delete obsolete variables. 9891 9892 * Makefile.in: Delete. 9893 * config-lang.in: Delete outputs= line. 9894 98952000-10-26 Gabriel Dos Reis <gdr@codesourcery.com> 9896 9897 * error.c (dump_function_decl): Print no space between 9898 `ptr-operator' the `type-specifier' of the return type. 9899 (dump_type_prefix): Make sure we put space at the appropriate 9900 place. 9901 99022000-10-23 Jason Merrill <jason@redhat.com> 9903 9904 * call.c (equal_functions): Also call decls_match for extern "C" fns. 9905 99062000-10-22 Jason Merrill <jason@redhat.com> 9907 9908 * call.c (build_conditional_expr): Use ocp_convert to force 9909 rvalue conversion. 9910 99112000-10-22 Mark Mitchell <mark@codesourcery.com> 9912 9913 * call.c (standard_conversion): Use RVALUE_CONVs for all 9914 expressions that satisfy lvalue_p, not just those that satisfy 9915 real_lvalue_p. 9916 9917 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially. 9918 9919 * typeck.c (c_sizeof): Return an expression of `size_t' type, 9920 not one with TYPE_IS_SIZETYPE set. 9921 (dubious_conversion_warnings): Remove special-case code. 9922 99232000-10-21 Geoffrey Keating <geoffk@cygnus.com> 9924 9925 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE. 9926 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE. 9927 (dump_type_prefix): Print vector-of-int as 'int vector'. 9928 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE. 9929 * tree.c (walk_tree): Handle VECTOR_TYPE. 9930 9931 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS. 9932 99332000-10-21 Jason Merrill <jason@redhat.com> 9934 9935 * parse.y (operator): Set got_object from got_scope. 9936 Set looking_for_typename. 9937 * decl.c (lookup_name_real): Clear val after setting from_obj. 9938 Reorganize diagnostic. 9939 99402000-10-20 Jason Merrill <jason@redhat.com> 9941 9942 * tree.c (walk_tree): Don't walk into default args. 9943 9944 * error.c (dump_expr): Use host_integerp. 9945 99462000-10-20 David Edelsohn <edelsohn@gnu.org> 9947 9948 * typeck2.c (abstract_virtuals_error): Use "because" instead of 9949 "since" in error message. 9950 9951Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 9952 9953 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE. 9954 99552000-10-20 Jeffrey Oldham <oldham@codesourcery.com> 9956 9957 * decl.c (revert_static_member_fn): Fixed typo. 9958 99592000-10-19 Mark Mitchell <mark@codesourcery.com> 9960 9961 * class.c (subobject_offset_fn): New type. 9962 (dfs_record_base_offsets): Remove. 9963 (record_base_offsets): Likewise. 9964 (dfs_search_base_offsets): Likewise. 9965 (record_subobject_offset): New function. 9966 (check_subobject_offset): Likewise. 9967 (walk_subobject_offsets): Likewise. 9968 (record_subobject_offsets): Likewise. 9969 (layout_conflict_p): Reimplement. 9970 (layout_nonempty_base_or_field): Correct handling of type 9971 conflicts during layout. 9972 (layout_empty_base): Likewise. 9973 (build_base_field): Adjust to handle new representation of empty 9974 base offset table. 9975 (build_base_fields): Likewise. 9976 (layout_virtual_bases): Likewise. 9977 (splay_tree_compare_integer_csts): New function. 9978 (layout_class_type): Use a splay_tree, rather than a varray, to 9979 represent the offsets of empty bases. 9980 9981 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL. 9982 * decl.c (select_decl): Don't return declarations that are 9983 DECL_ANTICIPATED. 9984 99852000-10-18 Mark Mitchell <mark@codesourcery.com> 9986 9987 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD. 9988 (fake_std_node): New macro. 9989 * decl.c (in_std): Rename to ... 9990 (in_fake_std): ... this. 9991 (flag_no_builtin): Remove. 9992 (flag_no_nonansi_builtin): Likewise. 9993 (walk_namespaces_r): Use fake_std_node. 9994 (push_namespace): Use std_identifier. 9995 (pop_namespace): Use in_fake_std. 9996 (lookup_name_real): Use fake_std_node. 9997 (init_decl_processing): When -fhonor-std, create the `std' 9998 namespace. Don't create a dummy fake_std_node in that case. 9999 Adjust call to c_common_nodes_and_builtins. Use std_identifier. 10000 (builtin_function): Put builtins whose names don't begin 10001 with `_' in the std namespace. 10002 * decl2.c (flag_no_builtin): Remove. 10003 (flag_no_nonansi_builtin): Likewise. 10004 (set_decl_namespace): Use fake_std_node. 10005 (validate_nonmember_using_decl): Likewise. 10006 (do_using_directive): Likewise. 10007 (handle_class_head): Likewise. 10008 * dump.c (dequeue_and_dump): Likewise. 10009 * except.c (init_exception_processing): Use std_identifier. 10010 * init.c (build_member_call): Use fake_std_node. 10011 * rtti.c (init_rtti_processing): Use std_identifier. 10012 100132000-10-17 Mark Mitchell <mark@codesourcery.com> 10014 10015 * cp-tree.h (back_end_hook): Remove declaration. 10016 * decl2.c (back_end_hook): Remove definition. 10017 10018 * dump.c (dequeue_and_dump): Dump TREE_USED. 10019 10020Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu> 10021 10022 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int). 10023 100242000-10-17 Joseph S. Myers <jsm28@cam.ac.uk> 10025 10026 * decl.c (WINT_TYPE): Define. 10027 (init_decl_processing): Create types unsigned_ptrdiff_type_node, 10028 c_size_type_node, signed_size_type_node and wint_type_node. 10029 100302000-10-17 Joseph S. Myers <jsm28@cam.ac.uk> 10031 10032 * decl2.c (warn_missing_format_attribute): New variable. 10033 (lang_decode_option): Decode -Wmissing-format-attribute. 10034 100352000-10-16 Mark Mitchell <mark@codesourcery.com> 10036 10037 * typeck.c (qualify_type): Remove. 10038 (composite_pointer_type): Fix handling of conversions to `cv void*'. 10039 100402000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 10041 10042 * Makefile.in (parse.c, parse.h): Fix think-o in last patch. 10043 100442000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 10045 10046 * Makefile.in (parse.c, parse.h): Create atomically. 10047 100482000-10-12 Mark Mitchell <mark@codesourcery.com> 10049 10050 * class.c (current_obstack): Remove. 10051 * decl.c (ggc_p): Remove. 10052 (start_decl): Don't use decl_tree_cons. 10053 (grokdeclarator): Don't use build_decl_list. 10054 (start_function): Don't use decl_tree_cons. 10055 (finish_function): Don't mess with obstacks. 10056 * decl2.c (grok_x_components): Don't use build_decl_list. 10057 * lex.c (make_call_declarator): Don't call decl_tree_cons. 10058 (implicitly_declare_fn): Don't call build_decl_list. 10059 * parse.y (frob_specs): Don't call build_decl_list or 10060 decl_tree_cons. 10061 (expr_or_declarator_intern): Don't call decl_tree_cons. 10062 (primary): Don't call build_decl_list. 10063 (fcast_or_absdcl): Likewise. 10064 (typed_declspecs): Don't call decl_tree_cons. 10065 (reserved_declspecs): Don't call build_decl_list. 10066 (declmods): Likewise. 10067 (reserved_typespecquals): Likewise. 10068 (aggr): Likewise. 10069 (new_type_id): Likewise. 10070 (cv_qualifiers): Likewise. 10071 (after_type_declarator_intern): Likewise. 10072 (notype_declarator_intern): Likewise. 10073 (absdcl_intern): Likewise. 10074 (named_parm): Likewise. 10075 * pt.c (most_specialized_class): Likewise. 10076 * repo.c (temporary_obstack): Make it a structure, not a pointer. 10077 (init_repo): Initialize it. 10078 * search.c (current_obstack): Remove. 10079 * typeck2.c (add_exception_specifier): Don't call build_decl_list. 10080 100812000-10-09 Richard Henderson <rth@cygnus.com> 10082 10083 * Make-lang.in (CXX_EXTRA_HEADERS): Remove. 10084 (c++ language support bits for libgcc): Remove. 10085 (c++.clean): Remove cplib2.txt cleanup. 10086 * config-lang.in (headers, lib2funcs): Remove. 10087 10088 * exception.cc, new.cc, new1.cc, new2.cc: Remove files. 10089 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files. 10090 * inc/cxxabi.h, inc/exception, inc/new: Remove files. 10091 * inc/new.h, inc/typeinfo: Remove files. 10092 100932000-10-08 Joseph S. Myers <jsm28@cam.ac.uk> 10094 10095 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already 10096 defined. 10097 (init_decl_processing): Initialize intmax_type_node and 10098 uintmax_type_node. 10099 101002000-10-06 Richard Henderson <rth@cygnus.com> 10101 10102 * cp-tree.h (struct cp_language_function): Remove x_result_rtx. 10103 (original_result_rtx): Remove. 10104 * decl.c (save_function_data): Don't clear x_result_rtx. 10105 (mark_lang_function): Don't mark it either. 10106 * expr.c (fixup_result_decl): Remove. 10107 * semantics.c (genrtl_named_return_value): Frob the return decl 10108 before calling emit_local_var. 10109 (genrtl_finish_function): Don't call fixup_result_decl. 10110 Always emit the jump to return_label. 10111 101122000-10-06 Nathan Sidwell <nathan@codesourcery.com> 10113 10114 * pt.c (lookup_template_class): Set current access for enum. 10115 (tsubst_enum): Set file & line for enum decl. 10116 10117 * spew.c (yylex): Remove unused variable. 10118 101192000-10-05 Richard Henderson <rth@cygnus.com> 10120 10121 * semantics.c (genrtl_finish_function): Don't init or check 10122 can_reach_end; remove noreturn and return value checks. 10123 101242000-10-05 Tom Tromey <tromey@cygnus.com> 10125 10126 * init.c (build_java_class_ref): Use `build_static_name' with a 10127 suffix, not a prefix, to build the class object's name. 10128 101292000-10-05 Nathan Sidwell <nathan@codesourcery.com> 10130 10131 * cp-tree.h (access_kind): Fix comment typo. 10132 * decl2.c (grokfield): Fix diagnostic typo. 10133 * semantics.c (finish_template_type): Fix comment typo. 10134 (finish_qualified_object_call_expr): Likewise. 10135 101362000-10-05 Nathan Sidwell <nathan@codesourcery.com> 10137 10138 * pt.c (tsubst_expr, DECL_STMT case): Don't process if 10139 tsubsting fails. 10140 101412000-10-05 Nathan Sidwell <nathan@codesourcery.com> 10142 10143 * spew.c (frob_id): New static function. 10144 (frob_opname): Use it. 10145 (yylex): Use it. 10146 101472000-10-01 Mark Mitchell <mark@codesourcery.com> 10148 10149 * decl.c (lang_mark_false_label_stack): Remove. 10150 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared. 10151 101522000-09-30 Joseph S. Myers <jsm28@cam.ac.uk> 10153 10154 * gxxint.texi: Use @email for formatting email addresses. 10155 101562000-09-29 Gabriel Dos Reis <gdr@codesourcery.com> 10157 10158 * error.c: Remove direct obstack manipulation. Replace with 10159 output_buffer-based formatting. Adjust calls to removed macros. 10160 (obstack_chunk_alloc, obstack_chunk_free): Remove. 10161 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP, 10162 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise. 10163 101642000-09-24 Mark Mitchell <mark@codesourcery.com> 10165 10166 * ir.texi: Move to ../c-tree.texi. 10167 101682000-09-20 Jason Merrill <jason@redhat.com> 10169 10170 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P. 10171 101722000-09-21 Andreas Jaeger <aj@suse.de> 10173 10174 * errfn.c: Move declaration of cp_printer and cp_printers to ... 10175 * cp-tree.h: ... here. 10176 10177 * error.c: Remove declaration of cp_printer. 10178 101792000-09-20 Mark Mitchell <mark@codesourcery.com> 10180 10181 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs. 10182 101832000-09-20 Hans-Peter Nilsson <hp@axis.com> 10184 10185 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and 10186 users. 10187 101882000-09-18 Mark Mitchell <mark@codesourcery.com> 10189 10190 * decl.c (start_function): Robustify. 10191 101922000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 10193 10194 * cp-tree.h (check_function_format): Accept a `status' parameter. 10195 10196 * call.c, typeck.c: Updates calls to `check_function_format'. 10197 101982000-09-17 Geoffrey Keating <geoffk@cygnus.com> 10199 10200 * decl2.c (handle_class_head): Always push some scope even 10201 in the error case. 10202 102032000-09-16 Mark Mitchell <mark@codesourcery.com> 10204 10205 * cp-tree.h (struct cp_language_function): Remove 10206 x_scope_stmt_stack and name_declared. 10207 (current_scope_stmt_stack): Remove. 10208 (function_name_declared_p): New macro. 10209 (struct lang_decl_flags): Use c_lang_decl as a base class. 10210 (context): Remove. 10211 (struct lang_decl): Replace saved_tree with context. 10212 (DECL_FRIEND_CONTEXT): Adjust accordingly. 10213 (SET_DECL_FRIEND_CONTEXT): Likewise. 10214 (DECL_VIRTUAL_CONTEXT): Likewise. 10215 (DECL_SAVED_TREE): Remove. 10216 (C_DECLARED_LABEL_FLAG): Likewise. 10217 (cplus_expand_expr_stmt): Don't declare. 10218 (add_decl_stmt): Likewise. 10219 (add_scope_stmt): Likewise. 10220 * decl.c (mark_stmt_tree): Remove. 10221 (case_compare): Likewise. 10222 (finish_case_label): Use c_add_case_label. 10223 (init_decl_processing): Set more language-specific hooks. 10224 (build_enumerator): Fix typo in comment. 10225 (cplus_expand_expr_stmt): Remove. 10226 (mark_lang_function): Use mark_c_language_function. 10227 (lang_mark_tree): Use c_mark_lang_decl. 10228 * decl2.c: Change order of inclusion. 10229 * except.c: Likewise. 10230 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall 10231 back on c_expand_expr. 10232 * friend.c: Include expr.h. 10233 * init.c: Change order of inclusion. 10234 * Makefile.in: Update dependencies. 10235 * lex.h (free_lang_decl_chain): Remove. 10236 * optimize.c (maybe_clone_body): Use function_name_declared_p. 10237 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if 10238 it doesn't exist. 10239 (instantiate_decl): Use function_name_declared_p. 10240 * semantics.c (lang_expand_expr_stmt): Remove. 10241 (set_current_function_name_declared): Likewise. 10242 (current_function_name_declared): Likewise. 10243 (begin_compound_stmt): Use function_name_declared_p. 10244 (add_decl_stmt): Remove. 10245 (setup_vtbl_ptr): Use function_name_declared_p. 10246 (add_scope_stmt): Remove. 10247 (current_scope_stmt_stack): New function. 10248 (cp_expand_stmt): Don't handle SCOPE_STMTs. 10249 (expand_body): Use function_name_declared_p. 10250 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT. 10251 * typeck.c: Change order of includes. 10252 (convert_sequence): Remove. 10253 102542000-09-14 Joseph S. Myers <jsm28@cam.ac.uk> 10255 10256 * lex.c (reswords): Add _Complex. 10257 10258Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 10259 10260 * Make-lang.in (cplib2.txt): Depend on cp/Makefile. 10261 102622000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca> 10263 10264 * init.c (begin_init_stmts): Don't use // comments. 10265 102662000-09-12 Jason Merrill <jason@redhat.com> 10267 10268 * decl.c (maybe_deduce_size_from_array_init): Set do_default for 10269 all non-extern arrays. 10270 10271 * decl.c (grokdeclarator): Complain about 'friend T' for implicit 10272 typenames, too. Downgrade complaint to pedwarn. 10273 (xref_tag): Warn about surprising behavior of 'friend struct T'. 10274 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for 10275 'class This::Inherited'. 10276 102772000-09-12 Mark Mitchell <mark@codesourcery.com> 10278 10279 * decl.c (finish_case_label): Given the LABEL_DECL a 10280 DECL_CONTEXT. 10281 102822000-09-12 Gabriel Dos Reis <gdr@codesourcery.com> 10283 10284 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, 10285 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF, 10286 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, 10287 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, 10288 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE): 10289 New macros. 10290 (sorry_for_unsupported_tree, print_scope_operator, 10291 print_left_paren, print_right_paren, print_left_bracket, 10292 print_right_bracket, print_whitespace): Likewise. 10293 (aggr_variety): Rename to class_key_or_enum. 10294 (print_type): Rename to print_type_id. 10295 (print_type_specifier_seq, print_simple_type_specifier, 10296 print_elaborated_type_specifier, 10297 print_rest_of_abstract_declarator, 10298 print_parameter_declaration_clause, print_exception_specification, 10299 print_nested_name_specifier, print_template_id, 10300 typedef_original_name, print_template_argument_list_start, 10301 print_template_argument_list_end): New functions. 10302 103032000-09-11 Gabriel Dos Reis <gdr@codesourcery.com> 10304 10305 * ir.texi: Add more documentation. 10306 103072000-09-11 Mark Mitchell <mark@codesourcery.com> 10308 10309 * cp-tree.h (struct saved_scope): Remove x_function_parms. 10310 (current_function_parms): Don't define. 10311 (struct cp_language_function): Remove parms_stored. 10312 (current_function_just_assigned_this): Don't define. 10313 (current_function_parms_stored): Likewise. 10314 (static_ctors): Declare. 10315 (static_dtors): Likewise. 10316 (SF_EXPAND): Don't define. 10317 (expand_start_early_try_stmts): Remove declaration. 10318 (store_parm_decls): Likewise. 10319 * decl.c (static_ctors): Don't declare. 10320 (static_dtors): Likewise. 10321 (struct binding_level): Remove this_block. 10322 (poplevel): Remove dead code. 10323 (set_block): Likewise. 10324 (mark_binding_level): Don't mark this_block. 10325 (mark_saved_scope): Don't mark x_function_parms. 10326 (init_decl_processing): Don't add current_function_parms as a GC 10327 root. 10328 (check_function_type): Change prototype. 10329 (start_function): Remove RTL-generation code. 10330 (expand_start_early_try_stmts): Remove. 10331 (store_parm_decls): Give it internal linkage. Remove 10332 RTL-generation code. 10333 (finish_function): Remove RTL-generation code. 10334 * decl2.c (static_ctors): Fix formatting. 10335 (static_dtors): Likewise. 10336 * method.c (use_thunk): Don't call store_parm_decls. 10337 (synthesize_method): Likewise. 10338 * optimize.c (maybe_clone_body): Likewise. 10339 * parse.y (fn.def2): Likewise. 10340 (.set_base_init): Likewise. 10341 (nodecls): Likewise. 10342 * pt.c (instantiate_decl): Likewise. 10343 * rtti.c (synthesize_tinfo_fn): Likewise. 10344 * semantics.c (genrtl_try_block): Simplify. 10345 (expand_body): Use genrtl_start_function and 10346 genrtl_finish_function. 10347 (genrtl_start_function): New function. 10348 (genrtl_finish_function): Likewise. 10349 103502000-09-11 Nathan Sidwell <nathan@codesourcery.com> 10351 10352 * error.c (cp_tree_printer, case 'P'): Append break. 10353 103542000-09-11 Nathan Sidwell <nathan@codesourcery.com> 10355 10356 * cp-tree.h (frob_opname): Declare. 10357 * parse.y (saved_scopes): New static variable. 10358 (cp_parse_init): Adjust. 10359 (do_id): If lastiddecl is NULL, do do_identifier. 10360 (operator): Save scope information. 10361 (unoperator): New reduction. Restore scope information. 10362 (operator_name): Append unoperator. Call frob_opname. 10363 * spew.c (frob_opname): Define. 10364 103652000-09-10 Zack Weinberg <zack@wolery.cumb.org> 10366 10367 * decl.c, rtti.c: Include defaults.h if not already included. 10368 Don't define the *_TYPE_SIZE macros. 10369 103702000-09-09 Mark Mitchell <mark@codesourcery.com> 10371 10372 * cp-tree.h (push_switch): Change prototype. 10373 (check_cp_case_value): Remove declaration. 10374 (decl_constant_value): Likewise. 10375 * decl.c (struct cp_switch): Add switch_stmt and cases. 10376 (case_compare): New function. 10377 (push_switch): Set switch_stmt. Initialize cases. 10378 (pop_switch): Clean up cases. 10379 (define_case_label): Rename to ... 10380 (finish_case_label): ... this. Do semantic analysis for case 10381 labels here. 10382 (start_function): Correct comment. 10383 * decl2.c (check_cp_case_value): Remove. 10384 * expr.c (do_case): Remove. 10385 * pt.c (tsubst_expr): Adjust call to finish_case_label. 10386 * semantics.c (genrtl_do_poplevel): Remove declaration. 10387 (RECHAIN_STMTS): Remove. 10388 (finish_break_stmt): Use build_break_stmt. 10389 (finish_continue_stmt): Use build_continue_stmt. 10390 (finish_switch_cond): Adjust condition here, rater than in 10391 c_expand_start_case. 10392 (finish_case_label): Remove. 10393 * typeck.c (c_expand_return): Remove. 10394 (c_expand_start_case): Likewise. 10395 103962000-09-07 Gabriel Dos Reis <gdr@codesourcery.com> 10397 10398 * ir.texi: Document type nodes. 10399 104002000-09-06 Mark Mitchell <mark@codesourcery.com> 10401 10402 * cp-tree.h (init_cp_semantics): Declare. 10403 (genrtl_try_block): Don't declare. 10404 (genrtl_handler): Likewise. 10405 (genrtl_catch_block): Likewise. 10406 (genrtl_ctor_stmt): Likewise. 10407 (genrtl_subobject): Likewise. 10408 (genrtl_do_poplevel): Likewise. 10409 (genrtl_named_return_value): Likewise. 10410 * lex.c (init_parse): Call init_cp_semantics. 10411 * semantics.c (genrtl_try_block): Give it internal linkage. 10412 (genrtl_handler): Likewise. 10413 (genrtl_catch_block): Likewise. 10414 (genrtl_ctor_stmt): Likewise. 10415 (genrtl_subobject): Likewise. 10416 (genrtl_do_poplevel): Likewise. 10417 (genrtl_named_return_value): Likewise. 10418 (lang_expand_stmt): Rename to ... 10419 (cp_expand_stmt): ... this. Only handle C++-specific nodes. 10420 (init_cp_semantics): Define. 10421 10422 * decl.c (initialize_local_var): Remove RTL-generating code. 10423 * semantics.c (genrtl_try_block): Fix formatting. 10424 10425 Move statement-tree facilities from C++ to C front-end. 10426 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO. 10427 (void_zero_node): Remove. 10428 (stmt_tree): Likewise. 10429 (scope_chain): Adjust. 10430 (language_function): Rename to cp_language_function. 10431 (cp_function_chain): Adjust. 10432 (current_stmt_tree): Remove. 10433 (last_tree): Likewise. 10434 (last_expr_type): Likewise. 10435 (struct lang_decl): Adjust. 10436 (STMT_IS_FULL_EXPR_P): Remove. 10437 (add_tree): Remove. 10438 (begin_stmt_tree): Likewise. 10439 (finish_stmt_tree): Likewise. 10440 (walk_tree_fn): Likewise. 10441 (walk_stmt_tree): Likewise. 10442 * class.c (finish_struct): Replace use of add_tree with add_stmt. 10443 * decl.c (mark_stmt_tree): Adjust type. 10444 (init_decl_processing): Don't build void_zero_node. 10445 (initialize_local_var): Adjust usage of current_stmt_tree. 10446 (finish_enum): Use add_stmt, not add_tree. 10447 (save_function_data): Adjust use of language_function. 10448 (finish_constructor_body): Use add_stmt, not add_tree. 10449 (finish_destructor_body): Likewise. 10450 (push_cp_function_context): Adjust use of language_function. 10451 (pop_cp_function_context): Likewise. 10452 (mark_lang_function): Likewise. 10453 (mark_cp_function_context): Likewise. 10454 * init.c (build_aggr_init): Adjust use of current_stmt_tree. 10455 (build_vec_init): Likewise. 10456 * semantics.c (SET_LAST_STMT): Remove. 10457 (RECHAIN_STMTS): Don't use it. 10458 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree. 10459 (current_stmt_tree): Define. 10460 (add_tree): Remove. 10461 (finish_goto_stmt): Use add_stmt, not add_tree. 10462 (finish_expr_stmt): Likewise. 10463 (begin_if_stmt): Likewise. 10464 (finish_then_clause): Likewise. 10465 (begin_while_stmt): Likewise. 10466 (begin_do_stmt): Likewise. 10467 (finish_return_stmt): Likewise. 10468 (begin_for_stmt): Likewise. 10469 (finish_break_stmt): Likewise. 10470 (finish_continue_stmt): Likewise. 10471 (begin_switch_stmt): Likewise. 10472 (finish_case_label): Likewise. 10473 (begin_try_block): Likewise. 10474 (begin_function_try_block): Likewise. 10475 (begin_handler): Likewise. 10476 (begin_catch_block): Likewise. 10477 (begin_compound_stmt): Likewise. 10478 (begin_asm_stmt): Likewise. 10479 (finish_asm_stmt): Likewise. 10480 (finish_label_stmt): Likewise. 10481 (add_decl_stmt): Likewise. 10482 (finish_subobject): Likewise. 10483 (finish_decl_cleanup): Likewise. 10484 (finish_named_return_value): Likewise. 10485 (setup_vtbl_ptr): Likewise. 10486 (add_scope_stmt): Likewise. 10487 (finish_stmt_expr): Likewise. 10488 (prune_unused_decls): Remove. 10489 (begin_stmt_tree): Likewise. 10490 (finish_stmt_tree): Likewise. 10491 (prep_stmt): Adjust use of current_stmt_tree. 10492 (lang_expand_stmt): Likewise. 10493 * tree.c (statement_code_p): Remove. 10494 (cp_statement_code_p): New function. 10495 (walk_stmt_tree): Remove. 10496 (init_tree): Set lang_statement_code_p. 10497 104982000-09-06 Zack Weinberg <zack@wolery.cumb.org> 10499 10500 Integrated preprocessor. 10501 10502 * Make-lang.in, Makefile.in: Remove all references to input.c, 10503 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS. 10504 * gxx.gperf, hash.h, input.c: Delete. 10505 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is 10506 initialized properly. 10507 10508 * class.c (fixup_pending_inline): Take a tree, not a 10509 struct pending_inline *. All callers changed. 10510 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE, 10511 RID_PROTECTED entries in ridpointers[] array here. 10512 * decl.c (duplicate_decls): Do not refer to struct 10513 pending_inline. 10514 (record_builtin_type, init_decl_processing): Use RID_MAX not 10515 CP_RID_MAX. 10516 (grokdeclarator): Use C_IS_RESERVED_WORD. 10517 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of 10518 cpplib. 10519 (grok_x_components): Do not inspect pending_inlines chain. 10520 10521 * cp-tree.h (struct lang_identifier): Add rid_code entry. 10522 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New. 10523 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare. 10524 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME, 10525 TIME_IDENTIFIER_FILEINFO): Kill. 10526 Update prototypes. 10527 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a 10528 single 32-bit word. 10529 * parse.y: Call do_pending_inlines unconditionally. 10530 reinit_parse_for_method is now snarf_method. fn.defpen is no 10531 longer necessary. Remove unnecessary <itype> annotation on 10532 SCOPE. Do not refer to end_of_file or struct pending_inline. 10533 * semantics.c (begin_inline_definitions): Call 10534 do_pending_inlines unconditionally. 10535 10536 * lex.c: Remove all code now shared with C front end. 10537 Initialize cpplib properly if USE_CPPLIB. Put reserved words 10538 into the get_identifier table. Rewrite pragma handling to 10539 work with the registry. Move code to save tokens for later 10540 processing to spew.c. 10541 10542 * spew.c: Rewrite everything in terms of token streams instead 10543 of text. Move routines here from lex.c / input.c as 10544 appropriate. GC-mark trees hanging off the pending inlines 10545 chain. 10546 105472000-09-06 Mark Mitchell <mark@codesourcery.com> 10548 10549 * NEWS: Mention that the named return value extension has been 10550 deprecated. 10551 * cp-tree.h (original_result_rtx): Define. 10552 (TREE_REFERENCE_EXPR): Remove. 10553 (DECL_VPARENT): Likewise. 10554 (pushdecl_nonclass_level): Likewise. 10555 (store_return_init): Likewise. 10556 (reinit_lang_specific): Likewise. 10557 (genrtl_named_return_value): Change prototype. 10558 * decl.c (original_result_rtx): Remove. 10559 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs. 10560 Do not generate RTL for local variables here. 10561 (store_return_init): Remove. 10562 * semantics.c (genrtl_named_return_value): Simplify. Fold in 10563 store_return_init. 10564 (finish_named_return_value): Adjust accordingly. Warn that this 10565 extension is deprecated. 10566 (lang_expand_stmt): Adjust call to genrtl_named_return_value. 10567 105682000-09-06 Nathan Sidwell <nathan@codesourcery.com> 10569 10570 * pt.c (type_unification_real): Replace switch with if. 10571 (unify): Tsubst non-type parms before comparing. 10572 105732000-09-06 Nathan Sidwell <nathan@codesourcery.com> 10574 10575 * error.c (dump_typename): New function, broken out of ... 10576 (dump_type): ... here. Use it. 10577 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE. 10578 105792000-09-06 Nathan Sidwell <nathan@codesourcery.com> 10580 10581 * init.c (build_offset_ref): Deal with namespace scoped 10582 TEMPLATE_ID_EXPRs. 10583 105842000-09-06 Nathan Sidwell <nathan@codesourcery.com> 10585 10586 * class.c (resolve_address_of_overloaded_function): Add 10587 explanation message. 10588 * decl.c (define_case_label): Reformat explanation. 10589 * decl2.c (finish_static_data_member_decl): Likewise. 10590 (grokfield): Likewise. 10591 * friend.c (do_friend): Likewise. 10592 105932000-09-05 Zack Weinberg <zack@wolery.cumb.org> 10594 10595 * tree.c (walk_tree): Expose tail recursion. 10596 (walk_stmt_tree): New function. 10597 * cp-tree.h: Prototype walk_stmt_tree. 10598 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not 10599 the BLOCKs directly. If a BLOCK has no variables after 10600 pruning, discard it. 10601 (finish_stmt_tree): Use walk_stmt_tree. No need to save and 10602 restore the line number. 10603 106042000-09-05 Mark Mitchell <mark@codesourcery.com> 10605 10606 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H. 10607 (pt.o): Remove dependency on HTAB_H. 10608 * cp-tree.h: Include hashtab.h. 10609 (walk_tree): Change prototype. 10610 (walk_tree_without_duplicates): New function. 10611 * decl.c (check_default_argument): Use it. 10612 * optimize.c (remap_decl): Adjust calls to walk_tree. 10613 (copy_body): Likewise. 10614 (expand_calls_inline): Likewise. 10615 (calls_setjmp_p): Use walk_tree_without_duplicates. 10616 * pt.c: Don't include hashtab.h. 10617 (for_each_template_parm): Use walk_tree_without_duplicates. 10618 * semantics.c (finish-stmt_tree): Likewise. 10619 (expand_body): Likewise. 10620 * tree.c (walk_tree): Add additional parameter. 10621 (walk_tree_without_duplicates): New function. 10622 (count_trees): Use it. 10623 (verify_stmt_tree): Adjust call to walk_tree. 10624 (find_tree): Use walk_tree_without_duplicates. 10625 (no_linkage_check): Likewise. 10626 (break_out_target_exprs): Adjust call to walk_tree. 10627 (cp_unsave): Likewise. 10628 106292000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 10630 10631 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code. 10632 (TEMPLATE_TEMPLATE_PARM): Adjust comment. 10633 * cp-tree.h (TYPE_BINFO): Adjust comment. 10634 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise. 10635 (TEMPLATE_TYPE_PARM_INDEX): Likewise. 10636 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead. 10637 (TYPE_TEMPLATE_INFO): Likewise. 10638 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise. 10639 * class.c (push_nested_class): Likewise. 10640 * decl.c (lookup_name_real): Likewise. 10641 (grokdeclarator): Likewise. 10642 (grok_op_properties): Likewise. 10643 (xref_tag): Likewise. 10644 (xref_basetypes): Likewise. 10645 * decl2.c (constructor_name_full): Likewise. 10646 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case. 10647 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead. 10648 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case. 10649 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM. 10650 (dump_type_suffix): Likewise. 10651 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM 10652 instead. 10653 (get_aggr_from_typedef): Likewise. 10654 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case. 10655 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM. 10656 (write_template_parm): Likewise. 10657 (write_template_template_parm): Check tree code instead of 10658 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. 10659 * method.c (build_overload_nested_name): Add 10660 BOUND_TEMPLATE_TEMPLATE_PARM. 10661 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case. 10662 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM. 10663 * pt.c (convert_template_argument): Check tree code instead of 10664 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. 10665 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case. 10666 (for_each_template_parm): Adjust comment. 10667 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. 10668 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM. 10669 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use 10670 template_args_equal to compare template template parameter cases. 10671 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM. 10672 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM 10673 instead. 10674 * tree.c (copy_template_template_parm): Decide whether to create 10675 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node. 10676 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM. 10677 (copy_tree_r): Likewise. 10678 * typeck.c (comptypes): Likewise. Check tree code instead of 10679 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO. 10680 106812000-09-04 Mark Elbrecht <snowball3@bigfoot.com> 10682 10683 * decl.c (finish_function): Move the code for handling functions 10684 marked with the constructor and destructor attributes inside the 10685 expand_p block. 10686 106872000-09-04 Nathan Sidwell <nathan@codesourcery.com> 10688 10689 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR. 10690 106912000-09-04 Nathan Sidwell <nathan@codesourcery.com> 10692 10693 * pt.c (lookup_template_class): Remove abort. 10694 * tree.c (get_type_decl): Allow error_mark_node. 10695 106962000-09-04 Nathan Sidwell <nathan@codesourcery.com> 10697 10698 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside 10699 TEMPLATE_ID_EXPRs. 10700 107012000-09-03 Mark Mitchell <mark@codesourcery.com> 10702 10703 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change 10704 new ABI mangling. 10705 107062000-09-01 Nathan Sidwell <nathan@codesourcery.com> 10707 10708 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify 10709 union tag mismatch error reporting. 10710 107112000-09-01 Nathan Sidwell <nathan@codesourcery.com> 10712 10713 * call.c (build_scoped_method_call): Check it is not a namespace. 10714 107152000-08-30 Jason Merrill <jason@redhat.com> 10716 10717 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context. 10718 10719 * tree.c (bot_manip): Check TREE_CONSTANT rather than 10720 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and 10721 build_target_expr_with_type for the non-AGGR_INIT_EXPR case. 10722 10723 * decl.c (start_function): Always call make_function_rtl. 10724 107252000-08-29 Zack Weinberg <zack@wolery.cumb.org> 10726 10727 * semantics.c (prune_unused_decls): New function. 10728 (finish_stmt_tree): Call it via walk_tree. 10729 107302000-08-29 Zack Weinberg <zack@wolery.cumb.org> 10731 10732 * class.c (build_secondary_vtable): Constify a char *. 10733 * decl.c (init_decl_processing): Initialize function_id_node, 10734 pretty_function_id_node, and func_id_node. 10735 * input.c (struct input_source): Constify 'str'. 10736 (feed_input): Constify first argument. 10737 * mangle.c (write_identifier): Constify argument. 10738 * pt.c (mangle_class_name_for_template): Constify argument. 10739 107402000-08-29 Mark Mitchell <mark@codesourcery.com> 10741 10742 * typeck.c (mark_addressable): Remove code that pokes around in 10743 RTL. 10744 107452000-08-28 Jason Merrill <jason@redhat.com> 10746 10747 * lex.c (file_name_nondirectory): Move to toplev.c. 10748 10749 * cp-tree.h (LOCAL_CLASS_P): New macro. 10750 * class.c (finish_struct_1): Use it. 10751 107522000-08-27 Alex Samuel <samuel@codesourcery.com> 10753 10754 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo. 10755 (write_encoding): Pass another argument to write_name. 10756 (write_name): Add ignore_local_scope parameter. Fix handling of 10757 local names. 10758 (write_nested_name): Use write_unqualified_name. 10759 (write_prefix): Likewise. Skip out on FUNCTION_DECLs. 10760 (write_template_prefix): Use write_unqualified_name. 10761 (write_component): Remove. 10762 (write_local_name): Add parameter. Use direct local entity to 10763 discriminator calculation. 10764 (write_class_enum_type): Pass another argument to write_name. 10765 (write_template_template_arg): Likewise. 10766 (make_guard_variable): Likewise. 10767 107682000-08-27 Jason Merrill <jason@redhat.com> 10769 10770 * decl.c (pushdecl): Matching decls for local externs are found in 10771 the current level. Propagate linkage information from previous 10772 declarations. 10773 107742000-08-26 Gabriel Dos Reis <gdr@codesourcery.com> 10775 10776 * ir.texi (Expressions): Fix typo. 10777 107782000-08-25 Greg McGary <greg@mcgary.org> 10779 10780 * tree.c (init_tree): Use ARRAY_SIZE. 10781 107822000-08-25 Gabriel Dos Reis <gdr@codesourcery.com> 10783 10784 * error.c (cp_tree_printer): Rework. 10785 107862000-08-25 Mark Mitchell <mark@codesourcery.com> 10787 10788 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and 10789 dyn-string.o. 10790 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c. 10791 (cp-demangle.o): Remove target. 10792 (dyn-string.o): Likewise. 10793 10794 * decl.c (grokfndecl): Require that `main' return an `int'. 10795 * mangle.c (write_encoding): Don't mangle return types for 10796 conversion functions. 10797 107982000-08-25 Gabriel Dos Reis <gdr@codesourcery.com> 10799 10800 * error.c (tree_formatting_info): New data type. 10801 (tree_being_formatted): New macro. 10802 (tree_formatting_flags): Likewise. 10803 (put_whitespace): Likewise. 10804 (print_tree_identifier): Likewise. 10805 (print_identifier): Likewise. 10806 (cp_tree_printer, print_function_argument_list, print_declaration, 10807 print_expression, print_function_declaration, 10808 print_function_parameter, print_type, print_cv_qualifier): New 10809 functions. 10810 (init_error): Initialize lang_printer. 10811 108122000-08-24 Jason Merrill <jason@redhat.com> 10813 10814 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no 10815 adjustment necessary. 10816 108172000-08-24 Greg McGary <greg@mcgary.org> 10818 10819 * cp-tree.h (MAIN_NAME_P): Remove macro. 10820 108212000-08-24 Gabriel Dos Reis <gdr@codesourcery.com> 10822 10823 * error.c (print_instantiation_context): Don't forget to flush the 10824 buffer. 10825 108262000-08-23 Jason Merrill <jason@redhat.com> 10827 10828 * typeck.c (build_ptrmemfunc): Save the input pmf. 10829 10830 * method.c (process_modifiers): Use same_type_p. 10831 108322000-08-23 Mark Mitchell <mark@codesourcery.com> 10833 10834 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC. 10835 * mangle.c (write_function_type): Change prototype. 10836 (write_encoding): Don't mangle return types for 10837 constructors or destructors. 10838 (write_type): Adjust call to write_function_type. 10839 * pt.c (instantiate_template): Instantiate alternate entry points 10840 when instantiating the main function. 10841 108422000-08-23 Gabriel Dos Reis <gdr@codesourcery.com> 10843 10844 * error.c (cp_print_error_function): Don't use embedded '\n' in 10845 output_printf. 10846 108472000-08-23 Gabriel Dos Reis <gdr@codesourcery.com> 10848 10849 * decl.c (init_decl_processing): Remove bogus initialization. 10850 * error.c (lang_print_error_function): Restore here. 10851 (init_error): Initialize print_error_function. 10852 108532000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 10854 10855 * decl2.c (arg_assoc): Revert my 2000-08-11 change. 10856 108572000-08-22 Gabriel Dos Reis <gdr@codesourcery.com> 10858 10859 * Makefile.in (error.o): Depends on diagnostic.h 10860 10861 * cp-tree.h (problematic_instantiation_changed, 10862 record_last_problematic_instantiation, current_instantiation, 10863 print_instantiation_context): Declare. 10864 (maybe_print_template_context): Remove. 10865 10866 * decl.c (init_decl_processing): Set print_error_function to NULL. 10867 (lang_print_error_function): Remove, since we're using a new 10868 machinery. 10869 10870 * error.c: #include diagnostic.h 10871 (function_category): New function. 10872 (cp_diagnostic_starter): Likewise. 10873 (cp_diagnostic_finalizer): Likewise. 10874 (cp_print_error_function): Likewise. 10875 (maybe_print_instantiation_context): Likewise. 10876 (print_instantiation_full_context): Likewise. 10877 (print_instantiation_partial_context): Likewise. 10878 (print_instantiation_context): Define. 10879 (init_error): Initialize diagnostic pager and finalizer. 10880 10881 * pt.c (problematic_instantiation_changed): Define. 10882 (record_last_problematic_instantiation): Likewise. 10883 (current_instantiation): Likewise. 10884 (maybe_print_template_context): Remove. 10885 (print_template_context): Likewise. 10886 (current_tinst_level): Make static to reflect Brendan Kehoe's 10887 change of 1995-04-13. 10888 (push_tinst_level): Call print_instantiation_context. 10889 108902000-08-21 Nix <nix@esperi.demon.co.uk> 10891 10892 * lang-specs.h: Do not process -o or run the assembler if 10893 -fsyntax-only. 10894 108952000-08-21 Joseph S. Myers <jsm28@cam.ac.uk> 10896 10897 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New 10898 variables. 10899 * decl2.c (lang_decode_option): Disable gettext attributes for 10900 -ansi. 10901 109022000-08-21 Gabriel Dos Reis <gdr@codesourcery.com> 10903 10904 * lex.c (lang_init_options): Default diagnostic message maximum 10905 length to 80, when line-wrapping. 10906 109072000-08-20 Mark Mitchell <mark@codesourcery.com> 10908 10909 * class.c (build_vtbl_initializer): Clear the entire 10910 vtbl_init_data. Start keeping track of the functions for which we 10911 have created vcall offsets here. 10912 (dfs_build_vcall_offset_vtbl_entries): Remove. 10913 (build_vcall_offset_vtbl_entries): Reimplement. 10914 (add_vcall_offset_vtbl_entries_r): New function. 10915 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for 10916 computing when vcall offsets are necessary. 10917 109182000-08-18 Nathan Sidwell <nathan@codesourcery.com> 10919 10920 * decl.c (member_function_or_else): Use cp_error ... %T. 10921 (grokdeclarator): Likewise. 10922 (start_method): Likewise. 10923 * friend.c (make_friend_class): Use cp_pedwarn ... %T. 10924 109252000-08-18 Nathan Sidwell <nathan@codesourcery.com> 10926 10927 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class 10928 TYPE_DECLs. 10929 109302000-08-18 Nathan Sidwell <nathan@codesourcery.com> 10931 10932 * cp-tree.h (PTRMEM_OK_P): New macro. 10933 (itf_ptrmem_ok): New enumeration value. 10934 * class.c (resolve_address_of_overloaded_function): Add PTRMEM 10935 argument. Diagnose implicit pointer to member. 10936 (instantiate_type): Don't diagnose implicit pointer to member 10937 here. Pass itf_ptrmem_ok if ok. Adjust calls to 10938 resolve_address_of_overloaded_function. 10939 * init.c (build_offset_ref): Set PTRMEM_OK_P. 10940 (resolve_offset_ref): Don't diagnose implicit pointer to member here. 10941 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here. 10942 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P. 10943 (build_unary_op): Deal with single non-static member in 10944 microsoft-land. 10945 109462000-08-18 Nathan Sidwell <nathan@codesourcery.com> 10947 10948 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE. 10949 109502000-08-18 Nathan Sidwell <nathan@codesourcery.com> 10951 10952 * cp-tree.h (enum_name_string): Remove prototype. 10953 (report_case_error): Remove prototype. 10954 * cp/typeck2.c (enum_name_string): Remove. 10955 (report_case_error): Remove. 10956 * error.c (dump_expr): Deal with enum values directly. 10957 Correctly negate integer constant. 10958 109592000-08-17 Nathan Sidwell <nathan@codesourcery.com> 10960 10961 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare. 10962 (__cxa_vec_delete2, __cxa_vec_delete3): Declare. 10963 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement. 10964 (__cxa_vec_delete2, __cxa_vec_delete3): Implement. 10965 (__cxa_vec_new): Use __cxa_vec_new2. 10966 (__cxa_vec_delete): Use __cxa_vec_delete2. 10967 109682000-08-17 Nathan Sidwell <nathan@codesourcery.com> 10969 10970 * vec.cc (__cxa_vec_new): Set "C" linkage. 10971 (__cxa_vec_ctor): Likewise. 10972 (__cxa_vec_cctor): Likewise. 10973 (__cxa_vec_dtor): Likewise. 10974 (__cxa_vec_delete): Likewise. 10975 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage. 10976 (__cxa_vec_ctor): Likewise. 10977 (__cxa_vec_cctor): Likewise. 10978 (__cxa_vec_dtor): Likewise. 10979 (__cxa_vec_delete): Likewise. 10980 109812000-08-17 Nathan Sidwell <nathan@codesourcery.com> 10982 10983 * class.c (instantiate_type): Reinstate local variable 10984 deleted in previous change. 10985 10986 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not 10987 itf_no_attributes. 10988 109892000-08-17 Nathan Sidwell <nathan@codesourcery.com> 10990 10991 * cp-tree.h (instantiate_type_flags): New enumeration. 10992 (instantiate_type): Change parameter. 10993 * class.c (instantiate_type): Adjust prototype. Adjust. 10994 * call.c (standard_conversion): Adjust instantiate_type call. 10995 (reference_binding): Likewise. 10996 (build_op_delete_call): Likewise. 10997 (convert_like_real): Likewise. 10998 * cvt.c (cp_convert_to_pointer): Likewise. 10999 (convert_to_reference): Likewise. 11000 * pt.c (convert_nontype_argument): Likewise. 11001 * typeck.c (build_binary_op): Likewise. 11002 (build_ptrmemfunc): Likewise. 11003 (convert_for_assignment): Likewise. 11004 110052000-08-17 Nathan Sidwell <nathan@codesourcery.com> 11006 11007 * cp-tree.h (CPTR_AGGR_TAG): New global tree node. 11008 (current_aggr): Define. 11009 * decl.c (grokdeclarator): Make sure a friend class is an 11010 elaborated type specifier. 11011 * parse.y (current_aggr): Remove static definition. 11012 (cp_parse_init): Adjust. 11013 (structsp): Clear and restore current_aggr. 11014 (component_decl_list): Clear current_aggr. 11015 11016 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the 11017 aggregate tag on the typename's context. 11018 11019 * pt.c (tsubst_friend_class): Return error_mark_node, if 11020 parms becomes NULL. 11021 (instantiate_class_template): Ignore error_mark_node friend types. 11022 110232000-08-14 Nathan Sidwell <nathan@codesourcery.com> 11024 11025 * cvt.c (warn_ref_binding): New static function, broken out of ... 11026 (convert_to_reference): ... here. Use it. 11027 110282000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu> 11029 11030 * parse.y (template_arg): Add rule for template qualified with 11031 global scope. 11032 110332000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 11034 11035 * decl2.c (add_function): Reorganize. 11036 (arg_assoc): Do not consider function template decls. 11037 110382000-08-11 Jason Merrill <jason@redhat.com> 11039 11040 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're 11041 looking inside. 11042 110432000-08-11 Nathan Sidwell <nathan@codesourcery.com> 11044 11045 * cp-tree.h (resolve_scope_to_name): Remove unused prototype. 11046 (lookup_nested_tag): Likewise. 11047 11048 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs 11049 can be produced. 11050 110512000-08-11 Nathan Sidwell <nathan@codesourcery.com> 11052 11053 * parse.y (named_complex_class_head_sans_basetype): Remove 11054 always true if. 11055 110562000-08-11 Nathan Sidwell <nathan@codesourcery.com> 11057 11058 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build 11059 explicit TEMPLATE_ID_EXPR args. 11060 (build_expr_from_tree, case CALL_EXPR): Likewise. 11061 110622000-08-11 Nathan Sidwell <nathan@codesourcery.com> 11063 11064 * decl.c (check_tag_decl): Diagnose typename's which don't 11065 declare anything. 11066 110672000-08-10 Nathan Sidwell <nathan@codesourcery.com> 11068 11069 * init.c (build_aggr_init): Reject bogus array initializers 11070 early. 11071 110722000-08-09 Nathan Sidwell <nathan@codesourcery.com> 11073 11074 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi 11075 runtime. 11076 * cp/tinfo.cc (__dynamic_cast): Likewise. 11077 * cp/inc/cxxabi.h (__dynamic_cast): Likewise. 11078 110792000-08-09 Nathan Sidwell <nathan@codesourcery.com> 11080 11081 * cvt.c (convert_to_pointer_force): Fix error message when 11082 attempting to cast from ambiguous base. 11083 110842000-08-08 Jason Merrill <jason@redhat.com> 11085 11086 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails. 11087 (tsubst_template_arg_vector): Likewise. 11088 11089 * decl2.c (build_anon_union_vars): Choose the largest field; don't 11090 assume that one will be as large as the union. 11091 110922000-08-07 Kazu Hirata <kazu@hxi.com> 11093 11094 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo. 11095 * decl.c (pop_labels): Likewise. 11096 110972000-08-04 Jeffrey Oldham <oldham@codesourcery.com> 11098 11099 * inc/cxxabi.h (__pbase_type_info): Changed member names to match 11100 specifications. 11101 (__pointer_to_member_type_info): Likewise. 11102 (__base_class_info): Likewise. 11103 (__class_type_info): Likewise. 11104 (__si_class_type_info): Likewise. 11105 (__vmi_class_type_info): Likewise. 11106 * tinfo.cc (__si_class_type_info::__do_find_public_src): 11107 Changed member names to match specifications. 11108 (__vmi_class_type_info::__do_find_public_src): Likewise. 11109 (__si_class_type_info::__do_dyncast): Likewise. 11110 (__vmi_class_type_info::__do_dyncast): Likewise. 11111 (__si_class_type_info::__do_upcast): Likewise. 11112 (__vmi_class_type_info::__do_upcast): Likewise. 11113 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise. 11114 (__pbase_type_info::__pointer_catch): Likewise. 11115 (__pointer_type_info::__pointer_catch): Likewise. 11116 (__pointer_to_member_type_info::__pointer_catch): Likewise. 11117 111182000-08-04 Zack Weinberg <zack@wolery.cumb.org> 11119 11120 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist. 11121 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS. 11122 (cc1plus): Link with $(BACKEND) and $(C_OBJS). 11123 111242000-08-04 Mark Mitchell <mark@codesourcery.com> 11125 11126 * cp-tree.h (add_method): Change prototype. 11127 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P. 11128 Don't double the size of the method vector in the error case. 11129 (handle_using_decl): Adjust call to add_method. 11130 (add_implicitly_declared_members): Likewise. 11131 (clone_function_decl): Likewise. 11132 * decl2.c (check_classfn): Likewise. 11133 * semantics.c (finish_member_declaration): Likewise. 11134 111352000-08-04 Joseph S. Myers <jsm28@cam.ac.uk> 11136 11137 * decl.c (flag_isoc94): New variable. 11138 111392000-08-02 Jason Merrill <jason@redhat.com> 11140 11141 * pt.c (do_type_instantiation): Add complain parm; don't complain 11142 if called recursively. 11143 * cp-tree.h, parse.y: Adjust. 11144 111452000-08-02 Zack Weinberg <zack@wolery.cumb.org> 11146 11147 * decl2.c: Silently ignore -Wstrict-prototypes; warn about 11148 -Wno-strict-prototypes. 11149 11150 * g++spec.c: Adjust type of second argument to 11151 lang_specific_driver, and update code as necessary. 11152 11153 * cp-tree.h: Don't prototype min_precision here. 11154 (my_friendly_assert): Cast expression to void. 11155 * semantics.c (do_poplevel): Initialize scope_stmts. 11156 111572000-08-02 Mark Mitchell <mark@codesourcery.com> 11158 11159 * cp-tree.h (DECL_NEEDED_P): Tweak. 11160 111612000-07-28 Jason Merrill <jason@redhat.com> 11162 11163 * lang-specs.h: Use %i in rule for .ii files. 11164 111652000-07-31 Zack Weinberg <zack@wolery.cumb.org> 11166 11167 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0. 11168 111692000-07-30 Mark Mitchell <mark@codesourcery.com> 11170 11171 Allow indirect primary bases. 11172 * cp-tree.h (struct lang_type): Remove vfield_parent. Add 11173 primary_base. 11174 (CLASSTYPE_VFIELD_PARENT): Remove. 11175 (CLASSTYPE_PRIMARY_BINFO): Reimplement. 11176 (BINFO_PRIMARY_BINFO): Remove. 11177 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement. 11178 (BINFO_VBASE_PRIMARY_P): Likewise. 11179 (BINFO_PRIMARY_BASE_OF): New macro. 11180 (BINFO_INDIRECT_PRIMARY_P): Likewise. 11181 (get_primary_binfo): New function. 11182 * decl.c (lang_mark_tree): Make lang_type::primary_base. 11183 * class.c (vcall_offset_data_s): Rename to ... 11184 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p, 11185 and add ctor_vtbl_p. 11186 (get_derived_offset): Use get_primary_binfo. 11187 (dfs_mark_primary_bases): Adjust handling of virtual primary 11188 bases. 11189 (mark_primary_bases): Likewise. 11190 (set_primary_base): Take a binfo, not an integer, as a 11191 representation of the primary base. 11192 (indirect_primary_base_p): Remove. 11193 (determine_primary_base): Adjust for indirect primary bases. 11194 (dfs_find_final_overrider): Fix typo in coment. 11195 (update_vtable_entry_for_fn): Use get_primary_binfo. 11196 (layout_nonempty_base_or_field): Tweak. 11197 (build_base_fields): Adjust for new primary base semantics. 11198 (dfs_propagate_binfo_offsets): Remove. 11199 (propagate_binfo_offsets): Rewrite. 11200 (dfs_set_offset_for_shared_vbases): Remove. 11201 (layout_virtual_bases): Don't use it. 11202 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new 11203 ABI. 11204 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not 11205 CLASSTYPE_VFIELD_PARENT. 11206 (dfs_get_primary_binfo): New function. 11207 (get_primary_binfo): Likewise. 11208 (dump_class_hierarchy_r): Tweak printing of primary bases. 11209 (build_vtbl_initializer): Fix typo in comments. Use 11210 vtbl_init_data. 11211 (build_vcall_and_vbase_vtbl_entries): Likewise. 11212 (build_vbaes_offset_vtbl_entries): Likewise. 11213 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of 11214 BV_VCALL_INDEX to handle indirect primary bases. 11215 (build_vcall_offset_vtbl_entries): Use vtbl_init_data. 11216 (build_rtti_vtbl_entries): Likewise. 11217 * search.c (get_shared_vbase_if_not_primary): Tweak. 11218 (find_vbase_instance): Likewise. 11219 (binfo_for_vtable): Simplify. 11220 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF. 11221 (make_binfo): Make it have 11 entries. 11222 112232000-07-30 Alex Samuel <samuel@codesourcery.com> 11224 11225 * mangle.c (DECL_TEMPLATE_ID_P): Remove. 11226 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when 11227 ascertaining primaryness. 11228 (G): Remove template_args. 11229 (decl_is_template_id): New function. 11230 (write_encoding): Use decl_is_template_id. 11231 (write_name): Likewise. Handle type_decls. Get main variant of 11232 type decls. 11233 (write_nested_name): Likewise. 11234 (write_prefix): Likewise. 11235 (write_template_prefix): Likewise. 11236 (write_special_name_constructor): Remove defunct production from 11237 comment. 11238 (write_bare_function_type): Remove comment about absent parameter. 11239 (write_template_template_arg): Add missing grammar production to 11240 comment. 11241 112422000-07-27 Jason Merrill <jason@redhat.com> 11243 11244 * decl.c (duplicate_decls): If common_type produces a non-typedef 11245 type for a typedef, just use the old type. 11246 112472000-07-27 Mark Mitchell <mark@codesourcery.com> 11248 11249 * cp-tree.h (function_depth): Declare. 11250 (verify_stmt_tree): Likewise. 11251 (find_tree): Likewise. 11252 * decl.c (function_depth): Give it external linkage. 11253 * optimize.c (optimize_function): Increment and decrement it. 11254 * tree.c (verify_stmt_tree_r): New function. 11255 (verify_stmt_tree): Likewise. 11256 (find_tree_r): Likewise. 11257 (find_tree): Likewise. 11258 112592000-07-27 Jason Merrill <jason@redhat.com> 11260 11261 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use 11262 TYPE_PTRMEMFUNC_P. 11263 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC. 11264 112652000-07-26 Mark Mitchell <mark@codesourcery.com> 11266 11267 * decl.c (start_cleanup_fn): Mark the function as `inline'. 11268 * decl2.c (get_guard): Call cp_finish_decl, not 11269 rest_of_decl_compilation, for local guards. 11270 * lex.c (do_identifier): Remove unused variable. 11271 11272Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org> 11273 11274 * parse.y: Add missing ';'. 11275 112762000-07-26 Mark Mitchell <mark@codesourcery.com> 11277 11278 * parse.y (empty_parms): Use `()', not `(...)', when in the scope 11279 of `extern "C++"'. 11280 112812000-07-25 Nathan Sidwell <nathan@codesourcery.com> 11282 11283 Kill strict_prototype. Backwards compatibility only for 11284 non NO_IMPLICIT_EXTERN_C systems. 11285 * cp-tree.h (flag_strict_prototype): Remove. 11286 (strict_prototype): Remove. 11287 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove. 11288 * decl.c (maybe_push_to_top_level): Adjust. 11289 (pop_from_top_level): Adjust. 11290 (decls_match): Only allow sloppy parm matching for ancient 11291 system headers. 11292 (init_decl_processing): Adjust. 11293 (grokdeclarator): Adjust. 11294 * decl2.c (flag_strict_prototype): Remove. 11295 (strict_prototype): Remove. 11296 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove. 11297 (lang_f_options): Remove "strict-prototype". 11298 (unsupported-options): Add "strict-prototype". 11299 * lex.c (do_identifier): Adjust. 11300 (do_scoped_id): Adjust. 11301 * parse.y (empty_parms): Adjust. 11302 * class.c (push_lang_context): Adjust. 11303 (pop_lang_context): Adjust. 11304 * typeck.c (comp_target_parms): Adjust. 11305 113062000-07-25 Nathan Sidwell <nathan@codesourcery.com> 11307 11308 * decl.c (poplevel): Deal with anonymous variables at for scope. 11309 (maybe_inject_for_scope_var): Likewise. 11310 113112000-07-25 Zack Weinberg <zack@wolery.cumb.org> 11312 11313 * decl.c: Remove all signal handling code, now done in toplev.c. 11314 113152000-07-23 Mark Mitchell <mark@codesourcery.com> 11316 11317 * decl.c (make_rtl_for_nonlocal_decl): Rework. 11318 11319 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set 11320 correctly. 11321 113222000-07-20 Zack Weinberg <zack@wolery.cumb.org> 11323 11324 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__. 11325 Define my_friendly_assert and my_friendly_abort as macros 11326 which may call friendly_abort. Prototype friendly abort, not 11327 my_friendly_abort or my_friendly_assert. 11328 * decl.c (signal_catch): Report the signal caught in the error 11329 message. Call fatal directly. 11330 * typeck2.c (ack, my_friendly_assert): Delete. 11331 (my_friendly_abort): Rename to friendly_abort. Expect file, 11332 line, and function parameters. Report the abort code, then 11333 call fancy_abort. Do not mask an abort if errors have 11334 already occurred. 11335 113362000-07-18 Nathan Sidwell <nathan@codesourcery.com> 11337 11338 * typeck.c (comp_target_parms): Remove obsolete parameter. 11339 (comp_target_types): Adjust. 11340 113412000-07-17 Jason Merrill <jason@redhat.com> 11342 11343 * typeck.c (mark_addressable): Never set TREE_USED. 11344 * call.c (build_call): Don't abort on calls to library functions 11345 that have been declared normally. 11346 11347 * typeck.c (build_binary_op): Fix grammar in warning. 11348 11349 * exception.cc (__eh_free): Fix prototype. 11350 11351 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR. 11352 11353 * decl.c (pushdecl): Handle seeing an OVERLOAD in 11354 IDENTIFIER_NAMESPACE_VALUE. 11355 113562000-07-16 Mark Mitchell <mark@codesourcery.com> 11357 11358 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation. 11359 * method.c (use_thunk): Correct handling of vcall offsets. 11360 113612000-07-14 Zack Weinberg <zack@wolery.cumb.org> 11362 11363 * .cvsignore: parse.h and parse.c have no cp- prefix. 11364 113652000-07-13 Mark Mitchell <mark@codesourcery.com> 11366 11367 * .cvsignore: New file. 11368 113692000-07-13 Zack Weinberg <zack@wolery.cumb.org> 11370 11371 * lang-specs.h: Use the new named specs. Remove unnecessary braces. 11372 113732000-07-12 Mark Mitchell <mark@codesourcery.com> 11374 11375 * Makefile.in ($(PARSE_H)): Depend directly on parse.y. 11376 * parse.c: Remove. 11377 * parse.h: Likewise. 11378 113792000-07-11 Mark Mitchell <mark@codesourcery.com> 11380 11381 * class.c (layout_class_type): Add pointers to virtual bases after 11382 base classes under the old ABI. 11383 113842000-07-10 Benjamin Chelf <chelf@codesourcery.com> 11385 11386 * semantics.c (finish_for_stmt): Remove call to emit_line_note. 11387 (finish_continue_stmt): Likewise. 11388 (begin_for_stmt): Remove call to note_level_for_for. 11389 (finish_goto_stmt): Change call from build_min_nt 11390 to build_stmt. 11391 (finish_expr_stmt): Likewise. 11392 (begin_if_stmt): Likewise. 11393 (begin_while_stmt): Likewise. 11394 (finish_while_stmt): Likewise. 11395 (finish_return_stmt): Likewise. 11396 (begin_for_stmt): Likewise. 11397 (finish_for_stmt): Likewise. 11398 (finish_break_stmt): Likewise. 11399 (begin_switch_stmt): Likewise. 11400 (finish_case_label): Likewise. 11401 (genrtl_try_block): Likewise. 11402 (begin_try_block): Likewise. 11403 (begin_handler): Likewise. 11404 (begin_compound_stmt): Likewise. 11405 (finish_asm_stmt): Likewise. 11406 (finish_label_stmt): Likewise. 11407 (add_decl_stmt): Likewise. 11408 (finish_subobject): Likewise. 11409 (finish_decl_cleanup): Likewise. 11410 (finish_named_return_value): Likewise. 11411 (setup_vtbl_ptr): Likewise. 11412 (add_scope_stmt): Likewise. 11413 * decl.c (finish_constructor_body): Likewise. 11414 (finish_destructor_body): Likewise. 11415 * optimize.c (copy_body_r): Likewise. 11416 (initialize_inlined_parameters): Likewise. 11417 (declare_return_variable): Likewise. 11418 (expand_call_inline): Likewise. 11419 114202000-07-10 Jakub Jelinek <jakub@redhat.com> 11421 11422 * semantics.c (expand_body): Sync interface information 11423 at the end of function body expansion. 11424 114252000-07-09 Jason Merrill <jason@redhat.com> 11426 11427 * init.c (build_new_1): Bail early if the call to new fails. 11428 11429 * decl.c (compute_array_index_type): Check specifically for 11430 an INTEGER_CST, not just TREE_CONSTANT. 11431 11432 * decl.c (duplicate_decls): Don't call duplicate_decls on 11433 the DECL_TEMPLATE_RESULT. 11434 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different 11435 codes. 11436 11437 * error.c (dump_template_bindings): Don't crash if we had an 11438 invalid argument list. 11439 11440 * typeck.c (c_expand_start_case): Do narrowing here. 11441 * semantics.c (finish_switch_cond): Not here. 11442 114432000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com> 11444 11445 * parse.y (asm_clobbers): Do string concatenation. 11446 114472000-07-09 Mark Mitchell <mark@codesourcery.com> 11448 11449 * decl.c (pushtag): Don't put local classes in template functions 11450 on the local_classes list. 11451 114522000-07-04 Scott Snyder <snyder@fnal.gov> 11453 11454 * decl2.c (get_guard): Add missing return for old ABI local 11455 variable case. 11456 114572000-07-09 Mark Mitchell <mark@codesourcery.com> 11458 11459 * cp-tree.h (char_type_p): New function. 11460 * decl.c (init_decl_processing): Don't initialize 11461 signed_wchar_type_node or unsigned_wchar_type_node. 11462 (complete_array_type): Handle brace-enclosed string-constants. 11463 * rtti.c (emit_support_tinfos): Remove #if 0'd code. 11464 * tree.c (char_type_p): New function. 11465 * typeck2.c (digest_init): Use char_type_p. 11466 114672000-07-06 Nathan Sidwell <nathan@codesourcery.com> 11468 11469 * pt.c (tsubst): Don't layout type, if it's error_mark. 11470 114712000-07-06 Nathan Sidwell <nathan@codesourcery.com> 11472 11473 * pt.c (instantiate_pending_templates): Reset template level. 11474 114752000-07-05 Jason Merrill <jason@redhat.com> 11476 11477 * call.c (joust): Don't complain about `operator char *()' beating 11478 `operator const char *() const'. 11479 114802000-07-04 scott snyder <snyder@fnal.gov> 11481 Jason Merrill <jason@redhat.com> 11482 11483 * repo.c (repo_get_id): Handle the case where a class with virtual 11484 bases has a null TYPE_BINFO_VTABLE. 11485 114862000-07-04 Kevin Buhr <buhr@stat.wisc.edu> 11487 Jason Merrill <jason@redhat.com> 11488 11489 * parse.y (member_init): Just pass in the type. 11490 * init.c (expand_member_init): Handle getting a type. 11491 114922000-07-04 Martin v. L�wis <loewis@informatik.hu-berlin.de> 11493 Jason Merrill <jason@redhat.com> 11494 11495 * decl.c (finish_function): Warn if a function has no return 11496 statement. 11497 Suggested by Andrew Koenig. 11498 * typeck.c (check_return_expr): Do set current_function_returns_value 11499 if we got an error_mark_node. 11500 115012000-07-03 Nathan Sidwell <nathan@codesourcery.com> 11502 11503 * decl2.c (push_decl_namespace): Push the original namespace. 11504 115052000-07-03 Nathan Sidwell <nathan@codesourcery.com> 11506 11507 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES. 11508 * semantics.c (begin_class_definition): Clear it. 11509 115102000-07-02 Benjamin Chelf <chelf@codesourcery.com> 11511 11512 * cp-tree.h (genrtl_goto_stmt): Remove declaration. 11513 (genrtl_expr_stmt): Likewise. 11514 (genrtl_decl_stmt): Likewise. 11515 (genrtl_if_stmt): Likewise. 11516 (genrtl_while_stmt): Likewise. 11517 (genrtl_do_stmt): Likewise. 11518 (genrtl_return_stmt): Likewise. 11519 (genrtl_for_stmt): Likewise. 11520 (genrtl_break_stmt): Likewise. 11521 (genrtl_continue_stmt): Likewise. 11522 (genrtl_scope_stmt): Likewise. 11523 (genrtl_switch_stmt): Likewise. 11524 (genrtl_case_label): Likewise. 11525 (genrtl_begin_compound_stmt): Likewise. 11526 (genrtl_finish_compound_stmt): Likewise. 11527 (genrtl_compound_stmt): Likewise. 11528 (genrtl_asm_stmt): Likewise. 11529 11530 * init.c (begin_init_stmts): Remove call to 11531 genrtl_begin_compound_stmt. 11532 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt. 11533 11534 * semantics.c (lang_expand_stmt): Changed call to 11535 genrtl_compound_stmt to ignore return value. 11536 115372000-07-02 Mark Mitchell <mark@codesourcery.com> 11538 11539 * mangle.c (canonicalize_for_substitution): Return the canonical 11540 variant of a type. 11541 11542 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a 11543 TYPE_DECL. 11544 * typeck.c (commonparms): Remove obstack manipulations. 11545 115462000-07-01 Benjamin Chelf <chelf@codesourcery.com> 11547 11548 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o. 11549 11550 * Makefile.in (OBJS): Added ../c-semantics.o. 11551 (OBJDEPS): Likewise. 11552 11553 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to 11554 ../c-common.h. 11555 (struct stmt_tree): Added comment. 11556 (current_function_name_declared): Removed. 11557 (stmts_are_full_exprs_p): Likewise. 11558 (genrtl_do_pushlevel): Likewise. 11559 (genrtl_clear_out_block): Likewise. 11560 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h. 11561 (DECL_ANON_UNION_ELEMS): Likewise. 11562 (emit_local_var): Likewise. 11563 (make_rtl_for_local_static): Likewise. 11564 (do_case): Likewise. 11565 (expand_stmt): Likewise. 11566 (genrtl_decl_cleanup): Likewise. 11567 (c_expand_asm_operands): Likewise. 11568 (c_expand_return): Likewise. 11569 (c_expand_start_case): Likewise. 11570 11571 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c. 11572 (emit_local_var): Likewise. 11573 (initialize_local_var): Change reference to 11574 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p(). 11575 Change reference to stmts_are_full_exprs_p to 11576 current_stmt_tree->stmts_are_full_exprs_p. 11577 (push_cp_function_context): Likewise. 11578 11579 * expect.c (expand_throw): Change reference to 11580 stmts_are_full_exprs_p. 11581 11582 * init.c (build_aggr_init): Change reference to 11583 stmts_are_full_exprs_p. 11584 (build_vec_init): Likewise. 11585 11586 * optimize.c (maybe_clone_body): Change reference to 11587 current_function_name_declared to 11588 cp_function_chain->name_declared. 11589 11590 * pt.c (instantiate_decl): Change reference to 11591 current_function_name_declared to 11592 cp_function_chain->name_declared. 11593 11594 * semantics.c (expand_cond): Moved declaration to c-common.h. 11595 (genrtl_do_pushlevel): Moved to c-semantics.c. 11596 (genrtl_clear_out_block): Likewise. 11597 (genrtl_goto_stmt): Likewise. 11598 (genrtl_expr_stmt): Likewise. 11599 (genrtl_decl_stmt): Likewise. 11600 (gerntl_if_stmt): Likewise. 11601 (genrtl_while_stmt): Likewise. 11602 (genrtl_do_stmt): Likewise. 11603 (genrtl_return_stmt): Likewise. 11604 (genrtl_for_stmt): Likewise. 11605 (genrtl_break_stmt): Likewise. 11606 (genrtl_continue_stmt): Likewise. 11607 (genrtl_scope_stmt): Likewise. 11608 (genrtl_switch_stmt): Likewise. 11609 (genrtl_case_label): Likewise. 11610 (genrtl_begin_compound_stmt): Likewise. 11611 (genrtl_finish_compound_stmt): Likewise. 11612 (genrtl_compound_stmt): Likewise. 11613 (genrtl_asm_stmt): Likewise. 11614 (genrtl_decl_cleanup): Likewise. 11615 (expand_cond): Likewise. 11616 (expand_stmt): Renamed to ... 11617 (lang_expand_stmt): ... this. 11618 (lang_expand_expr_stmt): Initialize. 11619 (set_current_function_name_declared): Likewise. 11620 (stmts_are_full_exprs_p): Likewise. 11621 (current_function_name_declared): Likewise. 11622 (anon_aggr_type_p): Likewise. 11623 (do_poplevel): Change reference to 11624 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p(). 11625 Change reference to stmts_are_full_exprs_p to 11626 current_stmt_tree->stmts_are_full_exprs_p. 11627 (add_tree): Likewise. 11628 (finish_expr_stmt): Likewise. 11629 (prep_stmt): Likewise. 11630 (lang_expand_stmt): Likewise. 11631 (begin_compound_stmt): Change reference to 11632 current_function_name_declared to 11633 cp_function_chain->name_declared and call to 11634 current_function_name_declared(). 11635 (setup_vtbl_ptr): Likewise. 11636 (genrtl_do_poplevel): Removed. 11637 116382000-06-30 Jason Merrill <jason@redhat.com> 11639 11640 * init.c (init_init_processing): Go back to aligning like 11641 double_type_node for old ABI. 11642 (get_cookie_size): Make cookie larger if we get a type that needs 11643 more alignment. 11644 (build_vec_delete): Call it. 11645 11646 * typeck.c (qualify_type_recursive): New fn. 11647 (composite_pointer_type): Use it. 11648 (build_binary_op): Use composite_pointer_type. 11649 116502000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu> 11651 Jason Merrill <jason@redhat.com> 11652 11653 * typeck.c (check_return_expr): Don't complain about returning 11654 NULL from operator new if -fcheck-new. 11655 * cp-tree.h: Declare flag_check_new here. 11656 * init.c: Not here. 11657 116582000-06-28 Alex Samuel <samuel@codesourcery.com> 11659 11660 * mangle.c (find_substitution): Use same_type_p. 11661 (write_encoding): Don't check for substitutions. 11662 116632000-06-30 Nathan Sidwell <nathan@codesourcery.com> 11664 11665 * parse.y (expr_no_comma_rangle): New non-terminal. 11666 (template_parm): Use it for default parameter case. 11667 (template_arg): Use it. 11668 (expr_no_commas): Remove commented out undefined extensions. 11669 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r. 11670 * parse.h, parse.c: Rebuilt. 11671 116722000-06-30 Mark Mitchell <mark@codesourcery.com> 11673 11674 * semantics.c (genrtl_asm_stmt): Don't decay input operands here. 11675 (finish_asm_stmt): Do it here, instead. 11676 11677 * cp-tree.h (ridpointers): Don't declare. 11678 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX. 11679 (record_builtin_java_type): Likewise. 11680 (init_decl_processing): Likewise. 11681 * lex.c: Move inclusion of lex.h. 11682 (ridpointers): Don't define. 11683 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of 11684 RID_MAX. 11685 * lex.h (enum rid): Rename to ... 11686 (enum cp_rid): ... this. 11687 (ridpointers): Don't declare. 11688 * parse.y: Move inclusion of lex.h. 11689 * parse.c: Regenerated. 11690 * spew.c: Move inclusion of lex.h. 11691 11692 * cp-tree.h (struct language_function): Remove temp_name_counter. 11693 (temp_name_counter): Remove. 11694 (get_temp_name): Change prototype. 11695 (get_guard): New function. 11696 (get_guard_cond): Likewise. 11697 (set_guard): Likewise. 11698 * cvt.c (build_up_reference): Adjust call to get_temp_name. 11699 * decl.c (expand_static_init): Use get_guard and friends to 11700 implement guard variables. 11701 * decl2.c (get_temp_name): Assume that the variables created are 11702 always static. 11703 (get_sentry): Rename to ... 11704 (get_guard): ... this. Implement new ABI guard variables. 11705 (get_guard_bits): New function. 11706 (get_guard_cond): Likewise. 11707 (set_guard): Likewise. 11708 (start_static_initialization_or_destruction): Use them. 11709 (do_static_initialization): Replace sentry with guard throughout. 11710 (do_static_destruction): Likewise. 11711 * init.c (create_temporary_var): Add comment. 11712 117132000-06-28 Alex Samuel <samuel@codesourcery.com> 11714 11715 * mangle.c (find_substitution): Use same_type_p. 11716 (write_encoding): Don't check for substitutions. 11717 117182000-06-30 Nathan Sidwell <nathan@codesourcery.com> 11719 11720 * parse.y (expr_no_comma_rangle): New non-terminal. 11721 (template_parm): Use it for default parameter case. 11722 (template_arg): Use it. 11723 (expr_no_commas): Remove commented out undefined extensions. 11724 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r. 11725 * parse.h, parse.c: Rebuilt. 11726 117272000-06-29 Mark Mitchell <mark@codesourcery.com> 11728 11729 * cp-tree.h (flag_const_strings): Remove. 11730 (warn_parentheses): Likewise. 11731 (warn_format): Likewise. 11732 (common_type): Likewise. 11733 (default_conversion): Likewise. 11734 (build_binary_op): Likewise. 11735 (cp_build_binary_op): New macro. 11736 * call.c (build_new_op): Use cp_build_binary_op instead of 11737 build_binary_op. 11738 * class.c (build_vtable_entry_ref): Likewise. 11739 * decl.c (expand_static_init): Likewise. 11740 (compute_array_index_type): Likewise. 11741 (build_enumerator): Likewise. 11742 * decl2.c (delete_sanity): Likewise. 11743 (start_static_initialization_or_destruction): Likewise. 11744 * error.c (dump_type_suffix): Likewise. 11745 * init.c (resolve_offset_ref): Likewise. 11746 (build_new): Likewise. 11747 (build_new_1): Likewise. 11748 (build_vec_delete_1): Likewise. 11749 (build_vec_init): Likewise. 11750 (build_delete): Likewise. 11751 * rtti.c (synthesize_tinfo_fn): Likewise. 11752 (synthesize_tinfo_var): Likewise. 11753 * search.c (expand_upcast_fixups): Likewise. 11754 (fixup_all_virtual_upcast_offsets): Likewise. 11755 * typeck.c (build_array_ref): Likewise. 11756 (get_member_function_from_ptrfunc): Likewise. 11757 (build_binary_op): Add parameter. 11758 (pointer_int_sum): Use cp_build_binary_op. 11759 (pointer_diff): Likewise. 11760 (build_modify_expr): Likewise. 11761 (get_delta_difference): Likewise. 11762 (build_ptrmemfunc): Likewise. 11763 117642000-06-29 Nathan Sidwell <nathan@codesourcery.com> 11765 11766 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove. 11767 * decl.c (create_implicit_typedef): Adjust. 11768 * decl2.c (build_artificial_parm): Adjust. 11769 * method.c (implicitly_declare_fn): Adjust. 11770 * pt.c (push_inline_template_parms_recursive): Adjust. 11771 (process_template_parm): Adjust. 11772 (overloaded_template_name): Adjust. 11773 * semantics.c (finish_template_template_parm): Adjust. 11774 117752000-06-28 Mark Mitchell <mark@codesourcery.com> 11776 11777 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove. 11778 * class.c (update_vtable_entry_for_fn): Correct logic for deciding 11779 where to emit thunks. 11780 (build_vtt): Adjust call to build_vtt_inits. 11781 (build_vtt_inits): Add parameter to indicate whether or not 11782 sub-VTTs for virtual bases should be included. Adjust handling of 11783 construction vtables. 11784 (get_matching_base): New function. 11785 (dfs_build_vtt_inits): Rename to ... 11786 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of 11787 construction vtables. 11788 (dfs_fixup_binfo_vtbls): Likewise. 11789 (build_ctor_vtbl_groups): Build construction vtables for virtual 11790 bases, too. 11791 (accumulate_vtbl_inits): Tweak logic for deciding whether or not 11792 to build construction vtbls. 11793 (dfs_accumulate_vtbl_inits): Adjust handling of 11794 construction vtables. 11795 11796 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified 11797 types correctly. 11798 117992000-06-27 Mark Mitchell <mark@codesourcery.com> 11800 11801 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too. 11802 118032000-06-26 Nathan Sidwell <nathan@codesourcery.com> 11804 11805 * search.c (hides): Remove. 11806 (is_subobject_of_p): Add most_derived parameter. Use 11807 CANONICAL_BINFO. 11808 (lookup_field_queue_p): Adjust. 11809 (lookup_field_r): Adjust. 11810 118112000-06-26 Nathan Sidwell <nathan@codesourcery.com> 11812 11813 * decl2.c (handle_class_head): Bash typedefs to the type's main 11814 decl. 11815 118162000-06-25 Mark Mitchell <mark@codesourcery.com> 11817 11818 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ... 11819 (begin_global_stmt_expr): ... this. 11820 (genrtl_finish_stmt_expr): Rename to ... 11821 (finish_global_stmt_expr): ... this. 11822 * init.c (begin_init_stmts): Adjust calls. 11823 (finish_init_stmts): Likewise. 11824 * semantics.c (genrtl_begin_stmt_expr): Rename to ... 11825 (begin_global_stmt_expr): ... this. 11826 (genrtl_finish_stmt_expr): Rename to ... 11827 (finish_global_stmt_expr): ... this. 11828 118292000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 11830 11831 * search.c (lookup_member): Fix typo in comment. 11832 118332000-06-24 Jason Merrill <jason@redhat.com> 11834 11835 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace. 11836 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL. 11837 118382000-06-24 Martin v. L�wis <loewis@informatik.hu-berlin.de> 11839 11840 * parse.y (complex_direct_notype_declarator): Support global_scope. 11841 * Makefile.in: Adjust conflict count. 11842 118432000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu> 11844 11845 * parse.y (template_arg): Convert TEMPLATE_DECL 11846 that is a template template parameter to 11847 TEMPLATE_TEMPLATE_PARM here. 11848 11849 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment. 11850 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro. 11851 (copy_template_template_parm): Adjust prototype. 11852 * decl.c (grokdeclarator): Remove dead code. 11853 * pt.c (process_template_parm): Tidy. 11854 (lookup_template_class): Construct nodes in 11855 copy_template_template_parm. 11856 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to 11857 lookup_template_class. Use TYPE_TI_TEMPLATE. 11858 * tree.c (copy_template_template_parm): Add NEWARGS 11859 parameter. 11860 (mapcar): Adjust call to copy_template_template_parm. 11861 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL. 11862 * method.c (build_template_template_parm_names): Change error 11863 code to avoid compilation warning. 11864 11865 * gxxint.texi: Document template template parameter 11866 name mangling. 11867 118682000-06-21 Alex Samuel <samuel@codesourcery.com> 11869 11870 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o. 11871 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c. 11872 (cp-demangle.o): New rule. 11873 (dyn-string.o): Likewise. 11874 * inc/cxxabi.h (__cxa_demangle): New declaration. 11875 118762000-06-22 Mark Mitchell <mark@codesourcery.com> 11877 11878 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro. 11879 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise. 11880 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset 11881 a tree, not an int. 11882 (THUNK_GENERATE_WITH_VTABLE_P): New macro. 11883 (make_thunk): Change prototype. 11884 (emit_thunk): Rename to use_thunk. 11885 (mangle_thunk): Change prototype. 11886 * class.c (get_derived_offset): Simplify. 11887 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and 11888 BV_GENERATE_THUNK_WITH_VTABLE_P. 11889 (build_primary_vtable): Simplify. 11890 (add_virtual_function): Use BV_FN, rather than TREE_VALUE. 11891 (dfs_find_base): Remove. 11892 (update_vtable_entry_for_fn): Correct bug in finding the base 11893 where a virtual function was first declared. Figure out whether 11894 or not to emit a vcall-thunk with the vtables in which it appears. 11895 Correct logic for deciding whether to use an ordinary thunk, or a 11896 vcall thunk. 11897 (finish_struct_1): Remove unnecssary code. 11898 (build_vtbl_initializer): Use ssize_int for the running counter of 11899 negative indices. 11900 (build_vtbl_initializer): Only use vcall thunks where necessary. 11901 Mark thunks as needing to be emitted with their vtables, or not. 11902 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in 11903 indices. Use size_binop. 11904 (dfs_build_vcall_offset_vtbl_entries): Don't rely on 11905 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use 11906 size_binop. 11907 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry. 11908 (build_vtable_entry): Mark thunks as needing to be emitted with 11909 their vtables, or not. 11910 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk. 11911 * decl2.c (mark_vtable_entries): Use use_thunk instead of 11912 emit_thunk. 11913 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk 11914 information. 11915 * error.c (dump_expr): Use BV_FN. 11916 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree, 11917 not an int. 11918 * method.c (make_thunk): Likewise. 11919 (emit_thunk): Rename to use_thunk. Allow callers to decide 11920 whether or not to actually emit the thunk. Adjust for changes in 11921 representation of vcall offsets. 11922 * search.c (dfs_get_pure_virtuals): Use BV_FN. 11923 * semantics.c (emit_associated_thunks): New function. 11924 (expand_body): Use it. 11925 * ir.texi: Adjust decriptions of thunks. 11926 119272000-06-22 Jason Merrill <jason@redhat.com> 11928 11929 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE. 11930 (tsubst_friend_function): Copy it here. 11931 11932 * decl.c (grok_op_properties): Fix typo. 11933 11934 * decl2.c (delete_sanity): Clarify warning, avoid failure on 11935 deleting void*. 11936 11937 * pt.c (check_explicit_specialization): Clarify error. 11938 11939 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from 11940 an old OVERLOAD when we're declaring a non-function. 11941 (pushdecl, destroy_local_var): Check for error_mark_node. 11942 (warn_extern_redeclared_static): Also bail early if 11943 we're a CONST_DECL. 11944 (push_overloaded_decl): Ignore an old error_mark_node. 11945 119462000-06-22 Nathan Sidwell <nathan@codesourcery.com> 11947 11948 * call.c (build_x_va_arg): Check if in a template decl. 11949 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg. 11950 119512000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com> 11952 11953 * class.c (push_lang_context): TYPE_NAME gets you to the Java 11954 types DECLs. 11955 * decl.c (check_goto): Computed gotos assumed OK. 11956 119572000-06-20 Jason Merrill <jason@redhat.com> 11958 11959 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs 11960 for which we don't need to look for instantiations. 11961 119622000-06-21 Nathan Sidwell <nathan@codesourcery.com> 11963 11964 * parse.y (program): Always call finish_translation_unit. 11965 * parse.c, parse.h: Rebuilt. 11966 119672000-06-20 Zack Weinberg <zack@wolery.cumb.org> 11968 11969 * method.c: Don't include hard-reg-set.h. 11970 119712000-06-20 Nathan Sidwell <nathan@codesourcery.com> 11972 11973 * rtti.c (get_base_offset): Cope when vbase field is in a base. 11974 119752000-06-20 Nathan Sidwell <nathan@codesourcery.com> 11976 11977 * call.c (build_conditional_expr): Use VOID_TYPE_P. 11978 * cvt.c (cp_convert_to_pointer): Likewise. 11979 (convert_to_void): Likewise. 11980 * error.c (dump_expr): Likewise. 11981 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise. 11982 * init.c (build_delete): Likewise. 11983 * method.c (emit_thunk): Likewise. 11984 * optmize.c (declare_return_variable): Likewise. 11985 * rtti.c (get_tinfo_decl_dynamic): Likewise. 11986 (get_typeid): Likewise. 11987 (build_dynamic_cast_1): Likewise. 11988 * typeck.c (composite_pointer_type): Likewise. 11989 (common_type): Likewise. 11990 (build_indirect_ref): Likewise. 11991 (build_binary_op): Likewise. 11992 (build_x_compound_expr): Likewise. 11993 (check_return_expr): Likewise. 11994 * typeck2.c (add_exception_specifier): Likewise. 11995 11996 * mangle.c (write_method_parms): Use direct comparison for end 11997 of parmlist. 11998 119992000-06-19 Benjamin Chelf <chelf@codesourcery.com> 12000 12001 * cp-tree.h (genrtl_try_block): Declare function. 12002 (genrtl_handler): Likewise. 12003 (genrtl_catch_block): Likewise. 12004 (genrtl_ctor_stmt): Likewise. 12005 (genrtl_subobject): Likewise. 12006 (genrtl_decl_cleanup): Likewise. 12007 (genrtl_do_poplevel): Likewise. 12008 (genrtl_do_pushlevel): Likewise. 12009 (genrtl_clear_out_block): Likewise. 12010 (genrtl_goto_stmt): Likewise. 12011 (genrtl_expr_stmt): Likewise. 12012 (genrtl_decl_stmt): Likewise. 12013 (genrtl_if_stmt): Likewise. 12014 (genrtl_while_stmt): Likewise. 12015 (genrtl_do_stmt): Likewise. 12016 (genrtl_return_stmt): Likewise. 12017 (genrtl_for_stmt): Likewise. 12018 (genrtl_break_stmt): Likewise. 12019 (genrtl_continue_stmt): Likewise. 12020 (genrtl_scope_stmt): Likewise. 12021 (genrtl_switch_stmt): Likewise. 12022 (genrtl_case_label): Likewise. 12023 (genrtl_begin_compound_stmt): Likewise. 12024 (genrtl_finish_compound_stmt): Likewise. 12025 (genrtl_compound_stmt): Likewise. 12026 (genrtl_asm_stmt): Likewise. 12027 (genrtl_named_return_value): Likewise. 12028 (genrtl_begin_stmt_expr): Likewise. 12029 (genrtl_finish_stmt_expr): Likewise. 12030 (finish_for_stmt): Removed first argument. 12031 (finish_switch_stmt): Likewise. 12032 12033 * semantics.c (genrtl_try_block): Define function. 12034 (genrtl_handler): Likewise. 12035 (genrtl_catch_block): Likewise. 12036 (genrtl_ctor_stmt): Likewise. 12037 (genrtl_subobject): Likewise. 12038 (genrtl_decl_cleanup): Likewise. 12039 (genrtl_do_poplevel): Likewise. 12040 (genrtl_do_pushlevel): Likewise. 12041 (genrtl_clear_out_block): Likewise. 12042 (genrtl_goto_stmt): Likewise. 12043 (genrtl_expr_stmt): Likewise. 12044 (genrtl_decl_stmt): Likewise. 12045 (genrtl_if_stmt): Likewise. 12046 (genrtl_while_stmt): Likewise. 12047 (genrtl_do_stmt): Likewise. 12048 (genrtl_return_stmt): Likewise. 12049 (genrtl_for_stmt): Likewise. 12050 (genrtl_break_stmt): Likewise. 12051 (genrtl_continue_stmt): Likewise. 12052 (genrtl_scope_stmt): Likewise. 12053 (genrtl_switch_stmt): Likewise. 12054 (genrtl_case_label): Likewise. 12055 (genrtl_begin_compound_stmt): Likewise. 12056 (genrtl_finish_compound_stmt): Likewise. 12057 (genrtl_compound_stmt): Likewise. 12058 (genrtl_asm_stmt): Likewise. 12059 (genrtl_named_return_value): Likewise. 12060 (genrtl_begin_stmt_expr): Likewise. 12061 (genrtl_finish_stmt_expr): Likewise. 12062 (finish_for_stmt): Removed first argument and generate rtl 12063 specific code. 12064 (finish_switch_stmt): Likewise. 12065 (do_poplevel): Removed generate rtl specific code. 12066 (do_pushlevel): Likewise. 12067 (add_tree): Likewise. 12068 (finish_goto_stmt): Likewise. 12069 (finish_expr_stmt): Likewise. 12070 (begin_if_stmt): Likewise. 12071 (finish_if_stmt_cond): Likewise. 12072 (finish_then_clause): Likewise. 12073 (begin_else_clause): Likewise. 12074 (finish_else_clause): Likewise. 12075 (finish_if_stmt): Likewise. 12076 (clear_out_block): Likewise. 12077 (begin_while_stmt): Likewise. 12078 (finish_while_stmt_cond): Likewise. 12079 (finish_while_stmt): Likewise. 12080 (begin_do_stmt): Likewise. 12081 (finish_do_body): Likewise. 12082 (finish_do_stmt): Likewise. 12083 (finish_return_stmt): Likewise. 12084 (begin_for_stmt): Likewise. 12085 (finish_for_init_stmt): Likewise. 12086 (finish_for_cond): Likewise. 12087 (finish_for_expr): Likewise. 12088 (finish_break_stmt): Likewise. 12089 (finish_continue_stmt): Likewise. 12090 (begin_switch_stmt): Likewise. 12091 (finish_switch_cond): Likewise. 12092 (finish_case_label): Likewise. 12093 (begin_try_block): Likewise. 12094 (begin_function_try_block): Likewise. 12095 (finish_try_block): Likewise. 12096 (finish_cleanup_try_block): Likewise. 12097 (finish_cleanup): Likewise. 12098 (finish_function_try_block): Likewise. 12099 (finish_handler_sequence): Likewise. 12100 (finish_function_handler_sequence): Likewise. 12101 (begin_handler): Likewise. 12102 (finish_handler_parms): Likewise. 12103 (begin_catch_block): Likewise. 12104 (finish_handler): Likewise. 12105 (begin_compound_stmt): Likewise. 12106 (finish_compound_stmt): Likewise. 12107 (finish_asm_stmt): Likewise. 12108 (finish_label_stmt): Likewise. 12109 (finish_label_decl): Likewise. 12110 (finish_subobject): Likewise. 12111 (finish_decl_cleanup): Likewise. 12112 (finish_named_return_value): Likewise. 12113 (begin_stmt_expr): Likewise. 12114 (finish_stmt_expr): Likewise. 12115 12116 * decl.c (initialize_local_var): Changed call to finish_expr_stmt 12117 to call genrtl_expr_stmt when appropriate. 12118 12119 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and 12120 begin_compound_expr to call genrtl_begin_stmt_expr and 12121 genrtl_begin_compound_expr when appropriate. 12122 (finish_init_stmts): Changed calls to finish_compound_expr and 12123 finish_stmt_expr to call genrtl_finish_compound_expr and 12124 genrtl_finish_stmt_expr when appropriate. 12125 (expand_default_init): Changed call to finish_expr_stmt to call 12126 genrtl_expr_stmt when appropriate. 12127 (build_vec_init): Likewise. 12128 12129 * parse.y (simple_stmt): Removed first argument from call to 12130 finish_for_stmt. Removed first argument from call to 12131 finish_switch_stmt. 12132 12133 * parse.c: Regenerated. 12134 12135 * pt.c (tsubst_expr): Removed first argument from call to 12136 finish_for_stmt. Removed first argument from call to 12137 finish_switch_stmt. 12138 121392000-06-16 Benjamin Chelf <chelf@codesourcery.com> 12140 12141 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to 12142 CP_DUMMY_TREE_CODE. Remove #include "c-common.def". 12143 12144 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def". 12145 (cplus_tree_code_length[]): Likewise. 12146 (cplus_tree_code_name[]): Likewise. 12147 (init_parse): Added call to add_c_tree_codes. Changed 12148 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE. 12149 121502000-06-16 Mark Mitchell <mark@codesourcery.com> 12151 12152 * cp-tree.h (finish_mem_initializers): Declare. 12153 (count_trees): Likewise. 12154 * parse.y (base_init): Use finish_mem_initializers. 12155 * semantics.c (finish_mem_initializers): New function. 12156 12157 * tree.c (count_trees_r): Prototype. Use DATA parameter to store 12158 the number of trees. 12159 (n_trees): Remove. 12160 (count_trees): Don't use it. 12161 121622000-06-15 Jason Merrill <jason@redhat.com> 12163 12164 * tree.c (count_trees): New debugging function. 12165 12166 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P. 12167 * init.c (build_member_call): Pull out the name of a DECL. 12168 12169 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H. 12170 * semantics.c (expand_body): Push to TV_INTEGRATION here. 12171 * optimize.c (optimize_function): Not here. 12172 * pt.c (instantiate_decl): Push to TV_PARSE. 12173 121742000-06-15 Mark Mitchell <mark@codesourcery.com> 12175 12176 * cp-tree.h (struct language_function): Remove x_base_init_list 12177 and x_member_init_list. 12178 (current_base_init_list): Remove. 12179 (current_member_init_list): Likewise. 12180 (setup_vtbl_ptr): Change prototype. 12181 (emit_base_init): Likewise. 12182 (expand_member_init): Likewise. 12183 (reinit_parse_for_function): Remove. 12184 * decl.c (save_function_data): Don't clear x_base_init_list and 12185 x_member_init_list. 12186 (mark_language_function): Don't mark them. 12187 * init.c (perform_member_init): Tweak comment. 12188 (sort_member_init): Take the list of initializers as an argument. 12189 (sort_base_init): Likewise. 12190 (emit_base_init): Likewise. 12191 (expand_member_init): Return the initializer. Don't use global 12192 variables. 12193 * lex.c (reinit_parse_for_function): Remove. 12194 * method.c (build_template_parm_names): Correct substitution. 12195 (do_build_copy_constructor): Don't use current_member_init_list 12196 and current_base_init_list. 12197 (synthesize_method): Likewise. 12198 * parse.y (base_init): Split mem-initializers into 12199 base-initializers and field-initializers. 12200 (member_init_list): Build up the list here. 12201 (member_init): Return the initializer. 12202 (fn.depfn): Don't use reinit_parse_for_function. 12203 * parse.c: Regenerated. 12204 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the 12205 ERROR_MARK. 12206 (tsubst_expr): Don't use current_member_init_list 12207 and current_base_init_list. 12208 (tsubst_expr_values): Rename to ... 12209 (tsubst_initializer_list): ... this. Use convert_from_reference. 12210 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list 12211 and current_base_init_list. 12212 (begin_function_definition): Don't call reinit_parse_for_function. 12213 12214 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors. 12215 12216 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE 12217 correctly. 12218 12219 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking. 12220 122212000-06-14 Benjamin Chelf <chelf@codesourcery.com> 12222 12223 * cp-tree.h (IF_COND): Move to c-common.h. 12224 (THEN_CLAUSE): Likewise. 12225 (ELSE_CLAUSE): Likewise. 12226 (WHILE_COND): Likewise. 12227 (WHILE_BODY): Likewise. 12228 (DO_COND): Likewise. 12229 (DO_BODY): Likewise. 12230 (RETURN_EXPR): Likewise. 12231 (EXPR_STMT_EXPR): Likewise. 12232 (FOR_INIT_STMT): Likewise. 12233 (FOR_COND): Likewise. 12234 (FOR_EXPR): Likewise. 12235 (FOR_BODY): Likewise. 12236 (SWITCH_COND): Likewise. 12237 (SWITCH_BODY): Likewise. 12238 (CASE_LOW): Likewise. 12239 (CASE_HIGH): Likewise. 12240 (GOTO_DESTINATION): Likewise. 12241 (COMPOUND_BODY): Likewise. 12242 (ASM_CV_QUAL): Likewise. 12243 (ASM_STRING): Likewise. 12244 (ASM_OUTPUTS): Likewise. 12245 (ASM_INPUTS): Likewise. 12246 (ASM_CLOBBERS): Likewise. 12247 (DECL_STMT_DECL): Likewise. 12248 (STMT_EXPR_STMT): Likewise. 12249 (LABEL_STMT_LABEL): Likewise. 12250 (SCOPE_BEGIN_P): Likewise. 12251 (SCOPE_END_P): Likewise. 12252 (SCOPE_STMT_BLOCK): Likewise. 12253 (SCOPE_NULLIFIED_P): Likewise. 12254 (SCOPE_NO_CLEANUPS_P): Likewise. 12255 (SCOPE_PARTIAL_P): Likewise. 12256 (ASM_VOLATILE_P): Likewise. 12257 (STMT_LINENO): Likewise. 12258 (STMT_LINENO_FOR_FN_P): Likewise. 12259 12260 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR, 12261 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT, 12262 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT, 12263 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT, 12264 SCOPE_STMT, CASE_LABEL, STMT_EXPR. 12265 12266 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def. 12267 12268 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def. 12269 (cc1plus$(exeext)): Added $(srcdir)/c-common.def. 12270 12271 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'. 12272 (cplus_tree_code_length[]): Added '#include "c-common.def"'. 12273 (cplus_tree_code_name[]): Added '#include "c-common.def"'. 12274 122752000-06-14 Mark Mitchell <mark@codesourcery.com> 12276 12277 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro. 12278 * class.c (dfs_find_final_overrider): Set it appropriately. 12279 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to 12280 avoid unneeded secondary vptrs. 12281 122822000-06-13 Jakub Jelinek <jakub@redhat.com> 12283 12284 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN. 12285 (check_bitfield_decl, check_field_decl): Likewise. 12286 (build_vtbl_or_vbase_field, build_base_field): Likewise. 12287 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN. 12288 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN. 12289 (xfer_tag, finish_enum): Likewise. 12290 * decl2.c (finish_builtin_type): Likewise. 12291 * init.c (init_init_processing): Likewise. 12292 * pt.c (instantiate_class_template): Likewise. 12293 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN. 12294 * cp-tree.h (struct lang_type): Add user_align member. 12295 (CLASSTYPE_USER_ALIGN): Define. 12296 12297Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl> 12298 12299 * Make-lang.in (c++.install-common): Install g++-cross in 12300 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as 12301 $(target_alias)-g++ and $(target_alias)-c++. 12302 123032000-06-12 Mark Mitchell <mark@codesourcery.com> 12304 12305 * class.c (vcall_offset_data_s): Add last_init and fns. 12306 (overrides): Rename to same_signature_p. 12307 (dfs_find_final_overrider): Adjust accordingly. 12308 (mark_overriders): Likewise. 12309 (warn_hidden): Likewise. 12310 (build_vtbl_initializer): Reorganize machinery for building things 12311 at negative offsets. 12312 (build_vcall_and_vbase_vtbl_entries): Likewise. 12313 (build_vbase_offset_vtbl_entries): Likewise. 12314 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall 12315 offset entries. Do not create two entries for functions with the 12316 same signature. 12317 (build_vcall_offset_vtbl_entries): Initialize vod->fns. 12318 (build_rtti_vtbl_entries): Reorganize machinery for building things 12319 at negative offsets. 12320 12321 * optimize.c (expand_call_inline): Don't recurse into the code 12322 used to initialize the parameters more than once. 12323 123242000-06-11 Mark Mitchell <mark@codesourcery.com> 12325 12326 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment. 12327 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here. 12328 (find_substitution): Only use the `Sa' substitution for 12329 std::allocator, not instantiations of it. 12330 (write_template_prefix): Move comment. Only use a TREE_LIST to 12331 represent substitutions for a member template. 12332 (write_array_type): Mangle array dimensions correctly. 12333 * optimize.c (maybe_clone_body): Copy more information from the 12334 cloned function. 12335 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE 12336 on the regenerated declaration. 12337 123382000-06-11 Chip Salzenberg <chip@valinux.com> 12339 Mark Mitchell <mark@codesourcery.com> 12340 12341 * class.c (build_vtable): Clarify comment. 12342 (build_ctor_vtbl_group): Pass the most derived type to 12343 build_vtable. 12344 123452000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 12346 12347 * decl2.c (compare_options): Don't needlessly cast away const-ness. 12348 123492000-06-10 Mark Mitchell <mark@codesourcery.com> 12350 12351 * decl.c (add_binding): Handle duplicate declarations of external 12352 variables. 12353 123542000-06-09 Chip Salzenberg <chip@valinux.com> 12355 Mark Mitchell <mark@codesourcery.com> 12356 12357 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an 12358 argument. 12359 (write_signed_number): New macro. 12360 (write_unsigned_number): Likewise. 12361 (write_source_name): Use them. 12362 (write_number): Handle signed and unsigned values. 12363 (write_integer_cst): Use tree_int_cst_sgn, and use 12364 write_unsigned_number or write_signed_number as appropriate. 12365 (write_discriminator): Use write_unsigned_number or 12366 write_signed_number as appropriate. 12367 (write_template_arg_literal): Likewise. 12368 (write_array_type): Use tree_low_cst. 12369 (write_template_parm): Use write_unsigned_number or 12370 write_signed_number as appropriate. 12371 (write_substitution): Adjust call to write_number. 12372 (write_type): Get the TYPE_MAIN_VARIANT before mangling it. 12373 (write_expression): Handle non-type template arguments of 12374 reference type correctly. 12375 (mangle_thunk): Use write_signed_number. 12376 123772000-06-09 Chip Salzenberg <chip@valinux.com> 12378 12379 * mangle.c (find_substition): Don't mangle objects with typename 12380 substitutions (e.g. "cin" as "Si"). 12381 123822000-06-09 Zack Weinberg <zack@wolery.cumb.org> 12383 12384 * call.c (add_candidate): Use ggc_alloc_cleared. 12385 * decl.c (lookup_label): Likewise. 12386 * lex.c (retrofit_lang_decl): Likewise. 12387 123882000-06-09 Jason Merrill <jason@casey.soma.redhat.com> 12389 12390 * semantics.c (expand_body): Push to TV_EXPAND. 12391 * optimize.c (optimize_function): Push to TV_INTEGRATION. 12392 * decl.c (start_function): Always call announce_function. 12393 12394 * tinfo2.cc: Just declare abort. 12395 123962000-06-09 Gabriel Dos Reis <gdr@codesourcery.com> 12397 12398 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @' 12399 whenever @ is a symbolic name. 12400 124012000-06-08 Jakub Jelinek <jakub@redhat.com> 12402 12403 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk. 12404 124052000-06-07 Mark Mitchell <mark@codesourcery.com> 12406 12407 * decl.c (pushdecl): Look up functions by DECL_NAME, not 12408 DECL_ASSEMBLER_NAME. 12409 124102000-06-06 Mark Mitchell <mark@codesourcery.com> 12411 12412 * decl2.c (c_language): Define. 12413 124142000-06-06 Gabriel Dos Reis <gdr@codesourcery.com> 12415 12416 * lex.c (lang_init_options): Tweak. 12417 12418 * decl2.c: Remove #inclusion of diagnostic.h 12419 (lang_decode_option): Move diagnostic formatting options to 12420 toplevel. 12421 12422 * lang-options.h: Remove documentation for diagnostic options. 12423 12424 * Makefile.in (lex.o): Depends upon diagnostic.h 12425 124262000-06-06 Mark Mitchell <mark@codesourcery.com> 12427 12428 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have 12429 the same DECL_RESULT, it's not a redefinition. 12430 * pt.c (tsubst_decl): Remove code to handle illegal 12431 specializations. 12432 124332000-06-06 Nathan Sidwell <nathan@codesourcery.com> 12434 12435 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c 12436 124372000-06-05 Jason Merrill <jason@casey.soma.redhat.com> 12438 12439 * search.c (maybe_suppress_debug_info): Don't check 12440 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set. 12441 12442 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION 12443 here if extern_p. 12444 12445 Remember instantiation context in deferred instantiations. 12446 * cp-tree.h (struct tinst_level): Remove. 12447 (TINST_DECL, TINST_LINE, TINST_FILE): New macros. 12448 * pt.c (current_tinst_level): Now a tree. 12449 (print_template_context, push_tinst_level, pop_tinst_level, 12450 tinst_for_decl): Adjust. 12451 (reopen_tinst_level): New fn. 12452 (init_pt): Register current_tinst_level as a root. 12453 (add_pending_template): Put current_tinst_level in TREE_PURPOSE 12454 of the pending templates list. 12455 (instantiate_pending_templates): Adjust. Call reopen_tinst_level. 12456 * lex.c (extract_interface_info): Adjust. 12457 * decl2.c (warn_if_unknown_interface): Adjust. 12458 124592000-06-05 Mark Mitchell <mark@codesourcery.com> 12460 12461 * class.c (indirect_primary_base_p): New function. 12462 (determine_primary_base): Use it. 12463 124642000-06-05 Nathan Sidwell <nathan@codesourcery.com> 12465 12466 Update new-abi dynamic cast algorithm. 12467 * tinfo.cc (__class_type_info::__dyncast_result): Add 12468 whole_details. Adjust constructor. 12469 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags. 12470 Avoid unnecessary searching. 12471 (__dynamic_cast): Adjust for __dyncast_result::whole_details. 12472 12473Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 12474 12475 * decl.c (init_decl_processing): Don't call record_component_aliases. 12476 * tree.c (build_cplus_array_type_1): Likewise. 12477 124782000-06-04 Mark Mitchell <mark@codesourcery.com> 12479 12480 * ir.texi: Correct typo. 12481 * mangle.c (write_expression): Handle non-type template arguments 12482 with reference type. 12483 * method.c (build_overload_value): Likewise. 12484 * pt.c (convert_nontype_argument): Explicitly represent conversion 12485 to a reference with an ADDR_EXPR. 12486 (unify): Always unify arguments in left-to-right order. 12487 124882000-06-03 Alex Samuel <samuel@codesourcery.com> 12489 Mark Mitchell <mark@codesourcery.com> 12490 12491 * Make-lang.in (CXX_SRCS): Add mangle.c. 12492 * Makefile.in (CXX_OBJS): Add mangle.o. 12493 (mangle.o): New rule. 12494 12495 * class.c (local_classes): New variable. 12496 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI. 12497 (get_vtt_name): Use mangle_vtt_name for new ABI. 12498 (init_class_processing): Initialize local_classes. 12499 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI. 12500 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER. 12501 (std_identifier): New macro. 12502 (DECL_VOLATILE_MEMFUNC_P): New macro. 12503 (DECL_NAMESPACE_STD_P): Likewise. 12504 (local_classes): Declare. 12505 (get_mostly_instantiated_function_type): Declare. 12506 (init_mangle): Declare. 12507 (mangle_decl): Likewise. 12508 (mangle_type_string): Likewise. 12509 (mangle_type): Likewise. 12510 (mangle_typeinfo_for_type): Likewise. 12511 (mangle_typeinfo_string_for_type): Likewise. 12512 (mangle_vtbl_for_type): Likewise. 12513 (mangle_vtt_for_type): Likewise. 12514 (mangle_ctor_vtbl_for_type): Likewise. 12515 (mangle_thunk): Likewise. 12516 (mangle_conv_op_name_for_type): Likewise. 12517 (mangle_guard_variable): Likewise. 12518 * decl.c (pushtag): Keep track of local classes. 12519 (initialize_predefined_identifiers): Initialize std_identifier. 12520 (init_decl_processing): Use std_identifier. 12521 (start_decl): Don't treat instantiations as specializations. 12522 (grokdeclarator): Likewise. 12523 (grokvardecl): Call mangle_decl for new ABI. Only set mangled 12524 name for fully-instantiated templates. 12525 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for 12526 destructors with the new ABI. 12527 (finish_static_data_member_decl): Use mangle_decl under the new ABI. 12528 (grokfield): Use mangle_type for new ABI. 12529 (grokoptypename): Use mangle_conv_op_for_type for new ABI. 12530 (get_sentry): Use mangle_guard_variable for new ABI. 12531 (start_static_initialization_or_destruction): Likewise. 12532 * expr.c (extract_aggr_init): Remove. 12533 (extract_scalar_init): Likewise. 12534 (extract_init): Remove #if 0'd code. 12535 * mangle.c: New function. 12536 * method.c (build_mangled_name): Assert not flag_new_abi. 12537 (build_static_name): Likewise. 12538 (build_decl_overload_real): Likewise. 12539 (build_typename_overload): Likewise. 12540 (build_overload_with_type): Likewise. 12541 (build_overload_name): Likewise. 12542 (get_ctor_vtbl_name): Likewise. 12543 (start_squangling): Likewise. 12544 (get_id_2): Likewise. 12545 (set_mangled_name_for_decl): Call mangle_decl for new ABI. 12546 (init_method): Call init_mangle for new ABI. 12547 (make_thunk): Call mangle_thunk for new ABI. 12548 * operators.def: Correct new ABI manglings for the `%' operator. 12549 Add `::' operator. 12550 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and 12551 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL. 12552 (lookup_template_class): Call mangle_decl for new ABI. 12553 (get_mostly_instantiated_function_type): New function. 12554 (set_mangled_name_for_template_decl): Use it. 12555 (tsubst_decl): Use set_mangled_name_for_decl for destructors with 12556 the new ABI. Use mangle_conv_op_name_for_type for instantiated 12557 conversion op names. 12558 * rtti.c (tinfo_name): Call mangle_type_string for new ABI. 12559 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI. 12560 (tinfo_base_init): Likewise. Mangle typeinfo string name with 12561 mangle_typeinfo_string_for_type. 12562 125632000-06-03 Mark Mitchell <mark@codesourcery.com> 12564 12565 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment. 12566 (INNERMOST_TEMPLATE_ARGS): New macro. 12567 (innermost_args): Remove. 12568 (get_innermost_template_args): New function. 12569 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS. 12570 * error.c (dump_function_decl): Be caution when using 12571 most_general_template. 12572 * method.c (build_template_parm_names): Use 12573 INNERMOST_TEMPLATE_ARGS. 12574 * pt.c (add_to_template_args): Tidy comment 12575 (get_innermost_template_args): New function. 12576 (check_explicit_specialization): Clear DECL_INITIAL for a new 12577 specialization. 12578 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS. 12579 Tidy. 12580 (push_template_decl): Always register specializations of the most 12581 general template. 12582 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS. 12583 (coerce_template_parms): Likewise. 12584 (lookup_template_class): Likewise. 12585 (innermost_args): Remove. 12586 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS. 12587 (tsubst_decl): Handle tricky specializations. Use 12588 get_innermost_template_args. 12589 (instantiate_template): Simplify handling of partial 12590 instantiations. 12591 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS. 12592 (most_general_template): Reimplement, in a more straightforward 12593 manner. 12594 (regenerate_decl_from_template): Tweak formatting. Use 12595 TMPL_ARGS_DEPTH for clarity. 12596 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS. 12597 12598 * dump.c (dequeue_and_dump): Dump information about thunks. 12599 126002000-06-01 Richard Henderson <rth@cygnus.com> 12601 12602 * decl.c (init_decl_processing): Set lang_get_alias_set first thing. 12603 126042000-06-01 Richard Henderson <rth@cygnus.com> 12605 12606 * decl2.c (unsupported_options): Fix typo, make const. 12607 (lang_decode_option): Fix bsearch argument order. 12608 126092000-06-01 Mark Mitchell <mark@codesourcery.com> 12610 12611 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE 12612 on FIELD_DECLs. 12613 12614Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 12615 12616 * cp-tree.h (c_get_alias_set): Deleted. 12617 * Makefile.in (decl.o): Include ../expr.h. 12618 * decl.c (expr.h): Include. 12619 (init_decl_processing): Call record_component_aliases for arrays. 12620 (grokdeclarator): Likewise. 12621 Set TREE_ADDRESSABLE for fields that aren't bitfields. 12622 * tree.c (build_cplus_array_type_1): Call record_component_aliases. 12623 126242000-05-31 Mark Mitchell <mark@codesourcery.com> 12625 12626 Remove guiding declaration support. 12627 * cp/cp-tree.h (flag_dump_translation_unit): Make it const. 12628 (flag_guiding_decls): Remove. 12629 * call.c (build_user_type_conversion_1): Remove support for 12630 guiding decls. 12631 (build_new_function_call): Likewise. 12632 (build_new_op): Likewise. 12633 (build_new_method_call): Likewise. 12634 * decl.c (start_function): Likewise. 12635 * friend.c (is_friend): Likewise. 12636 (do_friend): Likewise. 12637 * decl2.c ((flag_dump_translation_unit): Make it const. 12638 (flag_guiding_decls): Remove. 12639 (unsupported_options): New variable 12640 (compare_options): New function. 12641 (lang_decode_option): Use them. 12642 12643 * decl.c (build_cp_library_fn): Set DECL_CONTEXT. 12644 12645 * method.c (mangle_expression): Adjust test for legal expression 12646 operators. 12647 12648 * pt.c (instantiate_decl): Save and restore the local 12649 specializations list. 12650 126512000-05-30 Jason Merrill <jason@decepticon.cygnus.com> 12652 12653 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING. 12654 126552000-05-30 Mark Mitchell <mark@codesourcery.com> 12656 12657 * call.c (add_template_candidate_real): Handle member template 12658 constructors for classes with virtual bases. 12659 (build_user_type_conversion_1): Use in_charge_arg_for_name. 12660 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P. 12661 12662 * ir.texi: Update thunk documentation. 12663 12664 * call.c (joust): Fix handling of overloaded builtin operators. 12665 126662000-05-30 Zack Weinberg <zack@wolery.cumb.org> 12667 12668 * cp-tree.h (DECL_ANTICIPATED): New macro. 12669 Document new use of DECL_LANG_FLAG_7. 12670 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins 12671 in the user namespace. 12672 * lex.c (do_identifier): If the identifier's declaration has 12673 DECL_ANTICIPATED on, it has not yet been declared. But do not 12674 replace it with an ordinary implicit declaration. 12675 12676 * tinfo2.cc: Include stdlib.h. 12677 126782000-05-29 Mark Mitchell <mark@codesourcery.com> 12679 12680 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro. 12681 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not 12682 CLASSTYPE_ALIGN. 12683 126842000-05-28 Gabriel Dos Reis <gdr@codesourcery.com> 12685 12686 * decl2.c (lang_decode_option): Use skip_leading_substring instead 12687 of plain strncmp. 12688 126892000-05-28 Alexandre Oliva <aoliva@cygnus.com> 12690 12691 * operators.def (<?): Duplicated, should have been... 12692 (>?): this. Fixed. 12693 126942000-05-27 Alex Samuel <samuel@codesourcery.com> 12695 Mark Mitchell <mark@codesourcery.com> 12696 12697 * cp-tree.h (ansi_opname): Make it a macro. 12698 (ansi_assopname): Likewise. 12699 (struct lang_decl_flags): Add assignment_operator_p. 12700 (struct lang_decl): Add operator_code. 12701 (DECL_VTT_PARM): Adjust. 12702 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an 12703 overloaded operator. 12704 (SET_OVERLOADED_OPERATOR_CODE): New macro. 12705 (DECL_ASSIGNMENT_OPERATOR_P): New macro. 12706 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust. 12707 (opname_tab): Remove. 12708 (assignop_tab): Likewise. 12709 (operator_name_info_t): New type. 12710 (operator_name_info): New variable. 12711 (assignment_operator_name_info): Likewise. 12712 (build_cp_library_fn): Remove declaration. 12713 (push_cp_library_fn): Likewise. 12714 (operator_name_string): Likewise. 12715 (build_decl_overload): Likewise. 12716 * call.c (print_z_candidates): Simplify. 12717 (build_object_call): Adjust usage of ansi_opname. Use 12718 DECL_OVERLOADED_OPERATOR_P. 12719 (op_error): Adjust operator name lookup. 12720 (build_conditional_expr): Adjust usage of ansi_opname. 12721 (build_new_op): Likewise. 12722 (build_op_delete_call): Likewise. 12723 (build_over_call): Likewise. 12724 (joust): Use DECL_OVERLOADED_OPERATOR_P. 12725 * decl.c (duplicate_decls): Copy operator_code. 12726 (init_decl_processing): Adjust parameters to push_cp_library_fn. 12727 (builtin_function): Adjust parameters to build_library_fn_1. 12728 (build_library_fn_1): Accept an overloaded operator code. 12729 (build_library_fn): Pass ERROR_MARK. 12730 (build_cp_library_fn): Accept an overloaded operator code. 12731 (push_cp_library_fn): Likewise. 12732 (grokfndecl): Tweak. 12733 (grokdeclarator): Simplify code to compute names of overloaded 12734 operators. Adjust use of ansi_opname. 12735 (ambi_op_p): Work on tree_codes, not identifiers. 12736 (unary_op_p): Likewise. 12737 (grok_op_properties): Likewise. 12738 (start_function): Use DECL_OVERLOADED_OPERATOR_P. 12739 (lang_mark_tree): Don't try to mark the operator_code. 12740 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P. 12741 * error.c (dump_decl): Remove special handling for operator 12742 names. 12743 (dump_function_name): Likewise. 12744 (dump_expr): Adjust name lookup of operators. 12745 (op_to_string): Simplify. 12746 (assop_to_string): Likewise. 12747 * init.c (build_new_1): Adjust use of ansi_opname. 12748 * lex.c (opname_tab): Remove. 12749 (assignop_tab): Likewise. 12750 (ansi_opname): Likewise. 12751 (ansi_assopname): Likewise. 12752 (operator_name_string): Likewise. 12753 (reinit_lang_specific): Likewise. 12754 (operator_name_info): New variable. 12755 (assignment_operator_name_info): Likewise. 12756 (init_operators): New function. 12757 (init_parse): Use it. 12758 (do_identifier): Adjust use of ansi_opname. 12759 * method.c (mangle_expression): Don't use ansi_opname for 12760 mangling. 12761 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P. 12762 (build_decl_overload): Remove. 12763 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly. 12764 (do_build_assign_ref): Adjust use of ansi_opname. 12765 (synthesize_method): Likewise. 12766 (implicitly_declare_fn): Likewise. 12767 * operators.def: New file. 12768 * parse.y (operator): Adjust use of ansi_opname. 12769 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P. 12770 (set_mangled_name_for_template_decl): Don't play games with 12771 current_namespace. 12772 (special_function_p): Adjust use of ansi_opname. 12773 * typeck.c (check_return_expr): Likewise. 12774 * Make-lang.in (cc1plus): Depend on operators.def. 12775 * Makefile.in (lex.o): Likewise. 12776 (decl.o): Likewise. 12777 127782000-05-27 Zack Weinberg <zack@wolery.cumb.org> 12779 12780 * Make-lang.in (cplib2.ready): Eradicate. 12781 12782Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 12783 12784 * method.c (mangle_expression): Use TREE_CODE_LENGTH. 12785 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH. 12786 (built_min, cp_tree_equal): Likewise. 12787 127882000-05-26 Mark Mitchell <mark@codesourcery.com> 12789 12790 * class.c (layout_nonempty_base_or_field): Replace 12791 `record_layout_info' with `record_layout_info_s'. 12792 127932000-05-26 Jason Merrill <jason@casey.soma.redhat.com> 12794 12795 Fix goto checking. 12796 * cp-tree.h (struct language_function): x_named_labels is now 12797 a struct named_label_list*. 12798 * decl.c (struct named_label_use_list): Renamed from... 12799 (struct named_label_list): ...this. New struct. 12800 (push_binding_level): Don't set eh_region. 12801 (note_level_for_eh): New fn. 12802 (pop_label): Take label and old value directly. 12803 (pop_labels): Adjust for new named_labels format. 12804 (lookup_label): Likewise. 12805 (poplevel): Note characteristics of a binding level containing a 12806 named label. Mess with named label lists earlier. 12807 (mark_named_label_lists): New fn. 12808 (mark_lang_function): Call it. 12809 (use_label): New fn, split out from... 12810 (make_label_decl): ...here. Don't call it. 12811 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1, 12812 check_previous_gotos): New fns, split out from... 12813 (define_label): ...here. 12814 (check_switch_goto): New fn. 12815 (define_case_label): Call it. 12816 (check_goto): New fn. 12817 * semantics.c (finish_goto_stmt): Call it and use_label. 12818 (begin_compound_stmt): If we're a try block, call note_level_for_eh. 12819 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings. 12820 128212000-05-26 Mark Mitchell <mark@codesourcery.com> 12822 12823 * class.c (build_vtable_entry_ref): Correct usage of 12824 get_vtbl_decl_for_binfo. 12825 12826 * decl2.c (grokclassfn): Set DECL_LANGUAGE here. 12827 * method.c (implicitly_declare_fn): Not here. 12828 128292000-05-26 Nathan Sidwell <nathan@codesourcery.com> 12830 12831 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ... 12832 (CPTI_PTMD_DESC_TYPE): ... here. 12833 (ptmd_desc_type_node): Rename to ... 12834 (ptm_desc_type_node): ... here. 12835 * decl.c: Likewise. 12836 * rtti.c (ptmd_initializer): Rename to ... 12837 (ptm_initializer): ... here. 12838 (sythesize_tinfo_var): Adjust. Deal with pointer to member 12839 function. 12840 (create_tinfo_types): Adjust. 12841 128422000-05-25 Mark Mitchell <mark@codesourcery.com> 12843 12844 Finish implementation of VTTs. 12845 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and 12846 CPTI_VTT_PARM_IDENTIFIER. 12847 (vtt_parm_identifier): New macro. 12848 (vtt_parm_type): Likewise. 12849 (BINFO_SUBVTT_INDEX): Likewise. 12850 (BINFO_VPTR_INDEX): Likewise. 12851 (struct lang_decl): Add vtt_parm. 12852 (DECL_VTT_PARM): New macro. 12853 (DECL_USE_VTT_PARM): Likewise. 12854 (DECL_NEEDS_VTT_PARM_P): Likewise. 12855 (get_vtt_name): Declare. 12856 (build_artificial_parm): Likewise. 12857 (fixup_all_virtual_upcast_offsets): Likewise. 12858 (expand_indirect_vtbls_init): Remove. 12859 * call.c (build_new_method_call): Pass the vtt to subobject 12860 constructors and destructors. 12861 * class.c (get_vtt_name): Give it external linkage. 12862 (build_clone): Handle the magic VTT parameters for clones. 12863 (clone_function_decl): Fix typo in comment. 12864 (build_vtt): Keep track of the indices in the VTTs where various 12865 entities are stored. 12866 (build_vtt_inits): Likewise. 12867 (dfs_build_vtt_inits): Likewise. 12868 (build_ctor_vtbl_group): Tweak type of construction vtables. 12869 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even 12870 primary bases, when building construction vtables. 12871 * decl.c (duplicate_decls): Handle DECL_VTT_PARM. 12872 (initialize_predefined_identifiers): Add vtt_parm_identifier. 12873 (init_decl_processing): Initialize vtt_parm_type. 12874 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P. 12875 (lang_mark_tree): Make vtt_parm. 12876 * decl2.c (build_artificial_parm): New function. 12877 (maybe_retrofit_in_chrg): Use it. Add VTT parameters. 12878 (grokclassfn): Use build_artificial_parm. 12879 * init.c (initialize_vtbl_ptrs): Call 12880 fixup_all_virtual_upcast_offsets directly. 12881 (perform_member_init): Use the complete subobject destructor for 12882 member cleanups. 12883 (build_vtbl_address): New function. 12884 (expand_virtual_init): Handle VTTs. 12885 * optimize (maybe_clone_body): Likewise. 12886 * search.c (fixup_all_virtual_upcast_offsets): Give it external 12887 linkage. 12888 (expand_indirect_vtbls_init): Remove. 12889 * semantics.c (setup_vtbl_ptr): Fix typos in comment. 12890 * tree.c (make_binfo): Make them bigger. 12891 128922000-05-25 Nathan Sidwell <nathan@codesourcery.com> 12893 12894 * inc/cxxabi.h (__pbase_type_info): Define, based on 12895 __pointer_type_info. 12896 (__pointer_type_info): Derive from __pbase_type_info. Adjust. 12897 (__pointer_to_member_type_info): Likewise. 12898 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement. 12899 (__pointer_to_member_type_info::__is_pointer_p): Remove. 12900 (__pointer_type_info::__do_catch): Rename to ... 12901 (__pbase_type_info::__do_catch): ... here. Adjust. 12902 (__pbase_type_info::__pointer_catch): Implement. 12903 (__pointer_type_info::__pointer_catch): Adjust. 12904 (__pointer_to_member_type_info::__pointer_catch): Adjust. 12905 129062000-05-25 Nathan Sidwell <nathan@codesourcery.com> 12907 12908 * tinfo.h (__user_type_info::contained_virtual_p): New 12909 predicate. 12910 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond 12911 shaped hierarchy. 12912 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to 12913 diamond shaped hierarchy. Add early out for mixed diamond and 12914 duplicate shaped hierarchy. 12915 129162000-05-24 Mark Mitchell <mark@codesourcery.com> 12917 12918 * cp-tree.h (build_delete): Change prototype. 12919 (build_vec_delete): Likewise. 12920 * call.c (build_scoped_method_call): Use special_function_kind 12921 values to indicate the kind of destruction to be done. 12922 (build_method_call): Likewise. 12923 * decl.c (finish_destructor_body): Likewise. 12924 (maybe_build_cleanup_1): Likewise. Rename to ... 12925 (maybe_build_cleanup): ... this. 12926 * decl2.c (delete_sanity): Use special_function_kind 12927 values to indicate the kind of destruction to be done. 12928 (build_cleanup): Likewise. 12929 * init.c (perform_member_init): Likewise. 12930 (build_vec_delete_1): Likewise. 12931 (build_dtor_call): Simplify. 12932 (build_delete): Use special_function_kind 12933 values to indicate the kind of destruction to be done. 12934 (build_vbase_delete): Likewise. 12935 (build_vec_delete): Likewise. 12936 12937 * init.c (sort_member_init): Fix typo in error message generation 12938 code. 12939 12940Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com> 12941 12942 * semantics.c (begin_class_definition): make the packed 12943 attribute be sensitive to the "-fpack-struct" command line flag 12944 129452000-05-24 Nathan Sidwell <nathan@codesourcery.com> 12946 12947 Update new-abi upcast algorithm. 12948 * inc/cxxabi.h (__class_type_info::__do_upcast): Change 12949 prototype and meaning of return value. 12950 (__si_class_type_info::__do_upcast): Likewise. 12951 (__vmi_class_type_info::__do_upcast): Likewise. 12952 * tinfo.cc (__class_type_info::__upcast_result): Replace 12953 whole2dst with part2dst. Adjust ctor. 12954 (__class_type_info::__do_upcast): Adjust call of worker function. 12955 (__class_type_info::__do_upcast): Adjust. 12956 (__si_class_type_info::__do_upcast): Adjust. Use parent's 12957 __do_upcast. 12958 (__vmi_class_type_info::__do_upcast): Likewise. Fix private 12959 virtual base in diamond hierarchy bug. 12960 129612000-05-23 Mark Mitchell <mark@codesourcery.com> 12962 12963 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable 12964 and bitfield to tinfo_fn_p. 12965 (DECL_TINFO_FN_P): Adjust. 12966 (SET_DECL_TINFO_FN_P): Likewise. 12967 (DECL_MUTABLE_P): Likewise. 12968 (DECL_C_BIT_FIELD): Likewise. 12969 (SET_DECL_C_BIT_FIELD): Likewise. 12970 (CLEAR_DECL_C_BIT_FIELD): Likewise. 12971 (DECL_UNINLINABLE): Likewise. 12972 * class.c (alter_access): Call retrofit_lang_decl if ncessary. 12973 (handle_using_decl): Remove assertion. 12974 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl, 12975 to build FIELD_DECLs. 12976 (build_base_field): Likewise. 12977 (layout_class_type): Likewise. 12978 * decl.c (init_decl_processing): Likewise. 12979 (build_ptrmemfunc_type): Likewise. 12980 (grokdeclarator): Likewise. 12981 * decl2.c (grok_x_components): Likewise. 12982 * except.c (call_eh_info): Likewise. 12983 * init.c (init_init_processing): Likewise. 12984 * rtti.c (expand_class_desc): Likewise. 12985 (create_pseudo_type_info): Likewise. 12986 (get_vmi_pseudo_type_info): Likewise. 12987 (create_tinfo_types): Likewise. 12988 * ptree.c (print_lang_decl): Adjust. 12989 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC 12990 before checking DECL_MUTABLE_P. 12991 12992 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge 12993 parameters for template functions. 12994 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for 12995 destructors as well as constructors. 12996 129972000-05-22 Mark Mitchell <mark@codesourcery.com> 12998 12999 * class.c (build_ctor_vtbl_group): Set inits. 13000 * optimize.c (maybe_clone_body): Set DECL_INLINE and 13001 DECL_THIS_INLINE appropriately for clones. 13002 13003 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp. 13004 (DECL_CONV_FN_P): Simplify. 13005 (DECL_OPERATOR): Remove. 13006 (language_to_string): Declare. 13007 * decl.c (duplicate_decls): Fix typo in comment. 13008 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P. 13009 (grok_op_properties): Use DECL_CONV_FN_P instead of 13010 IDENTIFIER_TYPENAME_P. 13011 * dump.c (dequeue_and_dump): Dump the language linkage of 13012 declarations. 13013 * error.c (language_to_string): Give it external linkage. 13014 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P. 13015 (implicitly_declare_fn): Set DECL_LANGUAGE. 13016 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not 13017 IDENTIFIER_TYPENAME_P. 13018 (tsubst_decl): Likewise. 13019 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P. 13020 * semantics.c (finish_member_declaration): Don't mark members of 13021 classes declared in an extern "C" region as extern "C". 13022 130232000-05-22 Martin v. L�wis <loewis@informatik.hu-berlin.de> 13024 13025 * decl2.c (qualified_lookup_using_namespace): Look through 13026 namespace aliases. 13027 13028 * decl.c (push_using_decl): Return the old decl on namespace level. 13029 130302000-05-21 Mark Mitchell <mark@codesourcery.com> 13031 13032 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks. 13033 (VTT_NAME_PREFIX): New macro. 13034 (CTOR_VTBL_NAME_PREFIX): Likewise. 13035 (get_ctor_vtbl_name): New function. 13036 * class.c (get_vtable_name): Simplify. 13037 (get_vtt_name): New function. 13038 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE. 13039 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list 13040 when a virtual base becomes primary. 13041 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build 13042 VTTs. 13043 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in 13044 additional parameters. 13045 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED. 13046 (initialize_array): New function. 13047 (build_vtt): Likewise. 13048 (build_vtt_inits): Likewise. 13049 (dfs_build_vtt_inits): Likewise. 13050 (dfs_fixup_binfo_vtbls): Likewise. 13051 (build_ctor_vtbl_group): Likewise. 13052 (initialize_vtable): Use initialize_array. 13053 (accumulate_vtbl_inits): Reimplement to handle construction 13054 vtables. 13055 (dfs_accumulate_vtbl_inits): Likewise. 13056 (bulid_vtbl_initializer): Adjust parameter name. 13057 * method.c (build_typename_overload): Remove #if 0'd code. 13058 (get_ctor_vtbl_name): New function. 13059 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES. 13060 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo. 13061 13062 * cp-tree.h (struct lang_type): Remove search_slot. 13063 (CLASSTYPE_SEARCH_SLOT): Remove. 13064 (emit_base_init): Change prototype. 13065 (initialize_vtbl_ptrs): Likewise. 13066 (expand_indirect_vtbls_init): Likewise. 13067 (clear_search_slots): Remove. 13068 * decl.c (lang_mark_tree): Don't mark search_slot. 13069 * init.c (initialize_vtbl_ptrs): Simplify. 13070 (emit_base_init): Likewise. 13071 * search.c (struct vbase_info): Document decl_ptr. 13072 (convert_pointer_to_single_level): Remove. 13073 (dfs_find_vbases): Remove. 13074 (dfs_init_base_pointers): Simplify. 13075 (dfs_clear_vbase_slots): Remove. 13076 (dfs_vtable_path_unmark): New function. 13077 (init_vbase_pointers): Simplify. 13078 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT. 13079 (expand_indirect_vtbls_init): Simplify. Don't call 13080 mark_all_temps_used. 13081 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and 13082 initialize_vtbl_ptrs. 13083 130842000-05-20 Zack Weinberg <zack@wolery.cumb.org> 13085 13086 * except.c: Add static prototypes. 13087 130882000-05-20 H.J. Lu <hjl@gnu.org> 13089 13090 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext). 13091 130922000-05-19 Mark Mitchell <mark@codesourcery.com> 13093 13094 Don't create a separate copy of virtual bases for the 13095 CLASSTYPE_VBASECLASSES list. 13096 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation. 13097 (BINFO_FOR_VBASE): Remove. 13098 (CANONICAL_BINFO): Adjust. 13099 (binfo_for_vbase): New function. 13100 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase 13101 instead of BINFO_FOR_VBASE. 13102 (build_vbase_pointer): Likewise. 13103 (build_secondary_vtable): Likewise. 13104 (dfs_mark_primary_bases): Likewise. 13105 (mark_primary_bases): Likewise. 13106 (layout_nonempty_base_or_field): Likewise. 13107 (dfs_set_offset_for_shared_vbases): Likewise. 13108 (dfs_set_offset_for_unshared_vbases): Likewise. 13109 (layout_virtual_bases): Likewise. Adjust for changes to the 13110 CLASSTYPE_VBASECLASSES list. 13111 (dump_class_hierarchy_r): Use binfo_for_vbase 13112 instead of BINFO_FOR_VBASE. 13113 (dump_class_hierarchy): Likewise. 13114 (finish_vtbls): Likewise. 13115 (build_vtbl_initializer): Adjust for changes to the 13116 CLASSTYPE_VBASECLASSES list. 13117 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase. 13118 * decl.c (finish_destructor_body): Adjust for changes to the 13119 CLASSTYPE_VBASECLASSES list. 13120 * init.c (sort_base_init): Use binfo_for_vbase. 13121 (construct_virtual_bases): Adjust for changes to the 13122 CLASSTYPE_VBASECLASSES list. 13123 (expand_member_init): Use binfo_for_vbase. 13124 (build_vbase_delete): Adjust for changes to the 13125 CLASSTYPE_VBASECLASSES list. 13126 * method.c (do_build_copy_constructor): Likewise. 13127 * rtti.c (get_base_offset): Use binfo_for_vbase. 13128 (expand_class_desc): Remove #if 0'd code. 13129 * search.c (struct vbase_info): Remove vbase_types. 13130 (get_base_distance): Use binfo_for_vbase. 13131 (lookup_field_queue_p): Use CANONICAL_BINFO. 13132 (get_shared_vbase_if_not_primary): Use binfo_for_vbase. 13133 (get_pure_virtuals): Adjust for changes to the 13134 CLASSTYPE_VBASECLASSES list. 13135 (dfs_find_vbases): Use binfo_for_vbase. 13136 (dfs_init_vbase_pointers): Likewise. 13137 (init_vbase_pointers): Don't initialize vi.vbase_types. 13138 (virtual_context): Use binfo_for_vbase. 13139 (fixup_all_virtual_upcast_offsets): Adjust for changes to the 13140 CLASSTYPE_VBASECLASSES list. 13141 (expand_indirect_vtbls_init): Simplify. 13142 (dfs_get_vbase_types): Don't replicate virtual bases. 13143 (find_vbase_instance): Use binfo_for_vbase. 13144 (binfo_for_vbase): New function. 13145 * typeck.c (get_delta_difference): Use binfo_for_vbase. 13146 131472000-05-17 Mark Mitchell <mark@codesourcery.com> 13148 13149 * decl2.c (finish_anon_union): Generalize error messages to handle 13150 anonymous structures. 13151 * init.c (perform_member_init): Remove `name' parameter. 13152 (build_field_list): New function. 13153 (sort_member_init): Handle anonymous union initialization order 13154 correctly. Check for multiple initializations of the same union. 13155 (emit_base_init): Don't look up fields by name here. 13156 (expand_member_init): Record the result of name lookup for future 13157 reference. 13158 * typeck.c (build_component_ref): Fix formatting. 13159 13160Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com> 13161 13162 * decl.c (pop_label): Replace warn_unused with warn_unused_label. 13163 * typeck.c (build_x_compound_expr): Replace warn_unused with 13164 warn_unused_value. 13165 13166 * decl2.c (lang_decode_option): Update -Wall unused flags by 13167 calling set_Wunused. 13168 131692000-05-16 Mark Mitchell <mark@codesourcery.com> 13170 13171 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation. 13172 * init.c (dfs_vtable_path_unmark): Remove. 13173 * search.c (marked_new_vtable_p): Likewise. 13174 (unmarked_new_vtable_p): Likewise. 13175 (dfs_search_slot_nonempty_p): Likewise. 13176 (dfs_mark): Likewise. 13177 (dfs_vtable_path_unmark): Likewise. 13178 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED. 13179 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED. 13180 (dfs_init_vbase_pointers): Remove special-case new ABI code. 13181 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED. 13182 (init_vbase_pointers): Simplify. 13183 (expand_indirect_vtbls_init): Likewise. 13184 13185 * class.c (copy_virtuals): New function. 13186 (build_primary_table): Use it. 13187 (build_secondary_vtable): Likewise. 13188 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to 13189 indicate that no vcall offset is required. 13190 (add_virtual_function): Likewise. 13191 (modify_all_vtables): Likewise. 13192 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer. 13193 (dfs_accumulate_vtbl_inits): Likewise. 13194 (build_vtbl_initializer): Make changes to handle construction 13195 vtables. 13196 (dfs_build_vcall_offset_vtbl_entries): Likewise. 13197 (build_rtti_vtbl_entries): Likewise. 13198 (build_vtable_entries): Handle a NULL vcall_index. 13199 132002000-05-15 Gabriel Dos Reis <gdr@codesourcery.com> 13201 13202 * decl2.c (lang_decode_option): Fix thinko. 13203 132042000-05-14 Jason Merrill <jason@casey.cygnus.com> 13205 13206 * except.c (check_handlers): New fn. 13207 * cp-tree.h: Declare it. 13208 * semantics.c (finish_handler_sequence): Call it. 13209 (finish_function_handler_sequence): Likewise. 13210 (finish_handler_parms): Set TREE_TYPE on the handler. 13211 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro. 13212 * search.c (get_base_distance_recursive): If protect>1, ignore 13213 special access. 13214 (get_base_distance): Don't reduce watch_access. 13215 132162000-05-13 Gabriel Dos Reis <gdr@codesourcery.com> 13217 13218 * lex.c: #include diagnostic.h. 13219 (lang_init_options): Set default prefixing rules. 13220 13221 * lang-options.h: Add -fdiagnostics-show-location=. 13222 13223 * decl2.c: #include diagnostic.h. 13224 (lang_decode_option): Handle -fdiagnostics-show-location=. 13225 132262000-05-12 Nathan Sidwell <nathan@codesourcery.com> 13227 13228 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes. 13229 * vec.cc: Revert my 2000-05-07 change. 13230 132312000-05-11 Jason Merrill <jason@casey.cygnus.com> 13232 13233 * class.c (check_field_decls): Complain about non-static data 13234 members with same name as class in class with constructor. 13235 132362000-05-10 Jason Merrill <jason@casey.cygnus.com> 13237 13238 * decl.c (grokdeclarator): Allow non-static data members with 13239 same name as class. 13240 132412000-05-09 Zack Weinberg <zack@wolery.cumb.org> 13242 13243 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file, 13244 and pending_inline.filename. Update prototypes. 13245 * decl.c (define_label): Constify filename parameter. 13246 * decl2.c (warn_if_unknown_interface): Constify local char *. 13247 * input.c Constify input_source.filename. Don't declare 13248 input_filename or lineno. Constify filename parameter to feed_input. 13249 * lex.c (init_parse): Constify parameter and return value. 13250 (cp_pragma_interface, cp_pragma_implementation): Constify 13251 filename argument. 13252 (reinit_parse_for_method, reinit_parse_for_block, 13253 reinit_parse_for_expr, feed_defarg, handle_cp_pragma): 13254 Constify local char *. 13255 * pt.c: Don't declare lineno or input_filename. 13256 (print_template_context, tsubst_friend_function, tsubst_decl, 13257 tsubst, instantiate_decl): Constify local char *. 13258 * semantics.c (expand_body): Constify local char *. 13259 * tree.c (build_srcloc): Constify filename parameter. 13260 * typeck.c (c_expand_asm_operands): Constify filename 13261 parameter. 13262 132632000-05-08 Nathan Sidwell <nathan@codesourcery.com> 13264 13265 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix 13266 offsetof expansion. 13267 132682000-05-08 Branko Cibej <branko.cibej@hermes.si> 13269 13270 * inc/cxxabi.h: Fix typos in comment. 13271 (__base_class_info::__offset): Use a static_cast. 13272 132732000-05-07 Nathan Sidwell <nathan@codesourcery.com> 13274 13275 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place 13276 of std::size_t and std::ptrdiff_t respectively. 13277 * tinfo.cc: Likewise. 13278 * vec.cc: Likewise. 13279 132802000-05-06 Richard Henderson <rth@cygnus.com> 13281 13282 * typeck.c (build_c_cast): Don't warn integer->pointer size 13283 mismatch for constants. 13284 132852000-05-06 Nathan Sidwell <nathan@codesourcery.com> 13286 13287 * rtti.c (ptmd_initializer): Set non-public, if class is 13288 incomplete. 13289 13290 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++". 13291 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, 13292 __cxa_vec_delete): Likewise. 13293 * tinfo.cc (__dynamic_cast): Likewise. 13294 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, 13295 __cxa_vec_delete): Likewise. 13296 132972000-05-04 Mark Mitchell <mark@codesourcery.com> 13298 13299 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove. 13300 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise. 13301 (lang_decl_flags): Add vcall_offset. 13302 (THUNK_VCALL_OFFSET): Use it. 13303 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk. 13304 * method.c (make_thunk): Create the lang_decl here, not in 13305 emit_thunk. 13306 (emit_thunk): Make generic thunks into ordinary functions once 13307 they have been fed to expand_body. 13308 * semantics.c (expand_body): Set current_function_is_thunk here. 13309 133102000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 13311 13312 * class.c (update_vtable_entry_for_fn): Prototype. 13313 13314 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl' 13315 and `tmpl'. 13316 13317 * search.c (dfs_build_inheritance_graph_order): Prototype. 13318 133192000-05-04 Mark Mitchell <mark@codesourcery.com> 13320 13321 * cp-tree.h (special_function_kind): Add various kinds of 13322 destructors. 13323 (special_function_p): New function. 13324 * class.c (overrides): Don't let one kind of destructor override 13325 another. 13326 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding 13327 whether or not to instantiate a template. 13328 * tree.c (special_function_p): Define. 13329 133302000-05-03 Mark Mitchell <mark@codesourcery.com> 13331 13332 * cp-tree.def (THUNK_DECL): Remove. 13333 * cp-tree.h (DECL_THUNK_P): New macro. 13334 (DECL_NON_THUNK_FUNCTION_P): Likewise. 13335 (DECL_EXTERN_C_FUNCTION_P): Likewise. 13336 (SET_DECL_THUNK_P): Likewise. 13337 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P. 13338 (FNADDR_FROM_VTABLE_ENTRY): Likewise. 13339 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P. 13340 * decl.c (decls_match): Use DECL_EXTERN_C_P. 13341 (duplicate_decls): Likewise. 13342 (pushdecl): Likewise. Adjust thunk handling. 13343 (grokfndecl): Use DECL_EXTERN_C_P. 13344 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P. 13345 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling. 13346 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P. 13347 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling. 13348 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set 13349 DECL_NO_STATIC_CHAIN. 13350 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't 13351 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk. 13352 * search.c (covariant_return_p): Remove THUNK_DECL handling. 13353 * ir.texi: Update. 13354 133552000-05-01 Jason Merrill <jason@casey.cygnus.com> 13356 13357 * tree.c (walk_tree): Set lineno. 13358 133592000-05-01 Mark Mitchell <mark@codesourcery.com> 13360 13361 * exception.cc: Update license notice. 13362 * new.cc: Likewise. 13363 * new1.cc: Likewise. 13364 * new2.cc: Likewise. 13365 * tinfo.cc: Likewise. 13366 * tinfo2.cc: Likewise. 13367 * vec.cc: Likewise. 13368 * inc/cxxabi.h: Likewise. 13369 * inc/exception: Likewise. 13370 * inc/new: Likewise. 13371 * inc/new.h: Likewise. 13372 * inc/typeinfo: Likewise. 13373 133742000-05-01 Jason Merrill <jason@casey.cygnus.com> 13375 13376 * tree.c (build_target_expr_with_type): If we already have a 13377 TARGET_EXPR, just return it. 13378 13379 * optimize.c (initialize_inlined_parameters): Don't generate an 13380 EXPR_STMT if we can just use DECL_INITIAL. 13381 * decl.c (emit_local_var): Only make the initialization a 13382 full-expression if stmts_are_full_exprs_p. 13383 133842000-05-01 Mark Mitchell <mark@codesourcery.com> 13385 13386 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New 13387 macro. 13388 * call.c (standard_conversion): Use it. 13389 (direct_reference_binding): Likewise. 13390 (build_over_call): Likewise. 13391 (is_properly_derived_from): Likewise. 13392 (compare_ics): Likewise. 13393 * class.c (resolves_to_fixed_type_p): Likewise. 13394 * optimize.c (declare_return_variable): Likewise. 13395 * pt.c (is_specialization_of): Likewise. 13396 (unify): Likewise. 13397 * typeck.c (comp_target_parms): Likeiwse. 13398 (build_static_cast): Likewise. 13399 (build_reinterpret_cast): Likewise. 13400 (build_const_cast): Likewise. 13401 (comp_ptr_ttypes_real): Likewise. 13402 (comp_ptr_ttypes_const): Likewise. 13403 * typeck2.c (process_init_constructor): Likewise. 13404 134052000-04-30 Scott Snyder <snyder@fnal.gov> 13406 13407 * decl.c (finish_destructor_body): Use the base destructor when 13408 destroying virtual bases. 13409 134102000-04-30 Mark Mitchell <mark@codesourcery.com> 13411 13412 * expr.c (cplus_expand_expr): Preserve temporaries when expanding 13413 STMT_EXPRs. 13414 * optimize.c (struct inline_data): Add target_exprs field. 13415 (declare_return_variable): When a function returns an aggregate, 13416 use the variable declared in the TARGET_EXPR as the remapped 13417 DECL_RESULT. 13418 (expand_call_inline): Update the pending target_exprs stack. 13419 (optimize_function): Initialize the stack. 13420 13421 * decl2.c (finish_file): Fix typo in comment. 13422 13423 * method.c (emit_thunk): Don't try to return a `void' value. 13424 13425 * optimize.c (initialize_inlined_parameters): If the parameter is 13426 addressable, we need to make a new VAR_DECL, even if the 13427 initializer is constant. 13428 134292000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro> 13430 13431 * decl.c (grok_op_properties): Add an extra check of argtypes. 13432 134332000-04-27 Mark Mitchell <mark@codesourcery.com> 13434 13435 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying 13436 variables. 13437 (initialize_inlined_parameters): Try to avoid creating new 13438 VAR_DECLs. 13439 134402000-04-27 Alex Samuel <samuel@codesourcery.com> 13441 13442 * lex.c (my_get_run_time): Remove. 13443 (init_filename_times): Use get_run_time instead of my_get_run_time. 13444 (check_newline): Likewise. 13445 (dump_time_statistics): Likewise. 13446 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead 13447 of computing elapsed time explicitly. 13448 134492000-04-26 Mark Mitchell <mark@codesourcery.com> 13450 13451 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P. 13452 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P. 13453 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P 13454 before calling decl_constant_value. 13455 * class.c (check_bitfield_decl): Likewise. 13456 * cvt.c (ocp_convert): Likewise. 13457 (convert): Likewise. 13458 * decl.c (compute_array_index_type): Likewise. 13459 (build_enumerator): Likewise. 13460 * decl2.c (check_cp_case_value): Likewise. 13461 * pt.c (convert_nontype_argument): Likewise. 13462 (tsubst): Likewise. 13463 * typeck.c (decay_conversion): Likewise. 13464 (build_compound_expr): Likewise. 13465 (build_reinterpret_cast): Likewise. 13466 (build_c_cast): Likewise. 13467 (convert_for_assignment): Likewise. 13468 134692000-04-26 Jason Merrill <jason@casey.cygnus.com> 13470 13471 * decl.c (finish_function): Don't play games with DECL_INLINE. 13472 134732000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr> 13474 13475 * ir.texi: Correct typo. 13476 134772000-04-25 Martin v. L�wis <loewis@informatik.hu-berlin.de> 13478 13479 * decl.c (grokdeclarator): Reject VLAs as members. 13480 134812000-04-24 Gabriel Dos Reis <gdr@codesourcery.com> 13482 13483 * call.c (standard_conversion): Accept conversion between 13484 COMPLEX_TYPEs. 13485 13486 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE. 13487 134882000-04-24 Zack Weinberg <zack@wolery.cumb.org> 13489 13490 * decl2.c (finish_file): Remove double setup for accounting 13491 compile time. 13492 134932000-04-24 Robert Lipe <robertlipe@usa.net> 13494 13495 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD. 13496 134972000-04-23 Benjamin Kosnik <bkoz@cygnus.com> 13498 13499 * new.cc (set_new_handler): Needs to be in std::. 13500 135012000-04-23 Mark Mitchell <mark@codesourcery.com> 13502 13503 * cp-tree.h (lang_decl): Remove pretty_function_p. 13504 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the 13505 language-specific node. 13506 * decl.c (cp_make_fname_decl): Use build_decl, not 13507 build_lang_decl, to build the variables. 13508 (grokvardecl): Don't call build_lang_decl for local variables in 13509 templates. 13510 (grokdeclarator): Don't call build_lang_decl for local type 13511 declarations in templates. 13512 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated 13513 zero'd memory, rather than calling memset. 13514 * pt.c: Include hashtab.h. 13515 (local_specializations): New variable. 13516 (retrieve_local_specialization): Use it. 13517 (register_local_specialization): Likewise. 13518 (tsubst_decl): Don't assume local variables have 13519 DECL_LANG_SPECIFIC. 13520 (instantiate_decl): Set up local_specializations. 13521 * Makefile.in (HTAB_H): New variable. 13522 135232000-04-23 Richard Henderson <rth@cygnus.com> 13524 13525 * typeck.c (c_expand_asm_operands): Restore the original 13526 contents of the output list. 13527 135282000-04-22 Gabriel Dos Reis <gdr@codesourcery.com> 13529 13530 * ir.texi: Document complex number representation. 13531 135322000-04-20 Nathan Sidwell <nathan@codesourcery.com> 13533 13534 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi. 13535 (target_incomplete_p): New function. 13536 (tinfo_base_init): Create comdat NTBS name variable. 13537 (ptr_initializer): Add non_public parameter. Calculate it. 13538 (ptmd_initializer): Likewise. 13539 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo. 13540 (create_real_tinfo_var): Add non_public parameter. Use it. 13541 Push proxy into global namespace. 13542 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask): 13543 New enumeration. 13544 * inc/typeinfo (type_info::before, type_info::operator==): 13545 Compare __name addresses. 13546 13547 * tinfo2.cc: Remove new-abi builtins comment. 13548 135492000-04-20 Jason Merrill <jason@casey.cygnus.com> 13550 13551 * typeck.c (build_x_function_call): Resolve an OFFSET_REF. 13552 13553 * call.c (joust): Exit early if we get the same function, too. 13554 13555 * decl2.c (key_method): Return NULL_TREE for template classes. 13556 (import_export_class): Don't need to check for template classes. 13557 135582000-04-18 Zack Weinberg <zack@wolery.cumb.org> 13559 13560 * lex.c: Remove references to cccp.c. 13561 135622000-04-18 Mark Mitchell <mark@codesourcery.com> 13563 13564 * cp-tree.h (lang_decl_flags): Remove const_memfunc and 13565 volatile_memfunc. Add destructor_attr. Adjust dummy. 13566 (DECL_DESTRUCTOR_P): Use destructor_attr. 13567 (DECL_CONST_MEMFUNC_P): Reimplement. 13568 (DECL_VOLATILE_MEMFUNC_P): Remove. 13569 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS. 13570 (overrides): Use DECL_DESTRUCTOR_P. 13571 (check_for_override): Likewise. 13572 * decl.c (start_function): Likewise. 13573 * decl2.c (grokfclassfn): Likewise. 13574 (check_classfn): Likewise. 13575 (grok_function_init): Likewise. 13576 135772000-04-17 Mark Mitchell <mark@codesourcery.com> 13578 13579 * decl2.c (grokfield): Issue error on illegal data member 13580 declaration. 13581 13582Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com> 13583 13584 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL. 13585 135862000-04-16 Mark Mitchell <mark@codesourcery.com> 13587 13588 * class.c (build_vtable_entry): Don't build thunks for type-info 13589 functions. 13590 135912000-04-16 Jason Merrill <jason@casey.cygnus.com> 13592 13593 * decl.c (decls_match): Allow a redeclaration of a builtin to 13594 specify args while the builtin did not. 13595 135962000-04-15 Mark Mitchell <mark@codesourcery.com> 13597 13598 * cp-tree.def (THUNK_DECL): Add to documentation. 13599 * cp-tree.h (flag_huge_objects): Declare. 13600 * class.c (modify_vtable_entry): Tidy. 13601 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables. 13602 Calculate delta appropriately for the new ABI. 13603 (dfs_modify_vtables): Use it. 13604 (modify_all_vtables): Fix thinko in code to add overriding copies 13605 of functions to primary vtables. 13606 (build_clone): Fix typo in comment. 13607 (clone_function_decl): Correct order of destructors in vtable. 13608 (build_vbase_offset_vtbl_entries): Adjust comment. 13609 (dfs_vcall_offset_queue_p): Remove. 13610 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX. 13611 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases. 13612 (build_vtable_entry): Correct check for pure virtual functions. 13613 Don't declare flag_huge_objects. 13614 * decl.c (flag_huge_objects): Remove declaration. 13615 * method.c (make_thunk): Tweak mangling for vcall offset thunks. 13616 Use int_size_in_bytes. 13617 (emit_thunk): Handle vcall offset thunks. 13618 13619Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 13620 13621 * decl2.c (parse_time, varconst_time): Delete declarations. 13622 (finish_file): Delete LINENO declaration. 13623 START_TIME and THIS_TIME now long. 13624 136252000-04-13 Nathan Sidwell <nathan@codesourcery.com> 13626 13627 * class.c (build_base_field): Reformat comment. 13628 13629 * inc/cxxabi.h (stddef.h): Comment inclusion. 13630 (__base_class_info::__offset): Comment shift. 13631 136322000-04-12 Mark Mitchell <mark@codesourcery.com> 13633 13634 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro. 13635 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER. 13636 (cp_push_exception_identifier): New macro. 13637 (DECL_COMPLETE_DESTRUCTOR_P): New macro. 13638 (DECL_BASE_DESTRUCTOR_P): Likewise. 13639 (DECL_DELETING_DESTRUCTOR_P): Likewise. 13640 (get_vtbl_decl_for_binfo): Fix formatting. 13641 (in_charge_arg_for_name): New macro. 13642 (maybe_build_cleanup_and_delete): Remove declaration. 13643 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P. 13644 (in_charge_arg_for_name): New function. 13645 (build_new_method_call): Use it. Handle cloned destructors. 13646 (build_clone): Don't make the base constructor virtual. 13647 Automatically defer generated functions. 13648 (clone_function_decl): Handle destructors, too. 13649 (clone_constructors_and_destructors): Likewise. 13650 (create_vtable_ptr): Don't create a vtable entry for a cloned 13651 function. 13652 * decl.c (predefined_identifier): Add ctor_or_dtor_p. 13653 (initialize_predefined_identifiers): Update appropriately. 13654 (finish_destructor_body): Simplify. 13655 (maybe_build_cleanup_and_delete): Remove. 13656 * except.c (expand_throw): Handle new-ABI destructors. 13657 * init.c (expand_cleanup_for_base): Use base_dtor_identifier. 13658 (build_dtor_call): New function. 13659 (build_delete): Use it. Simplify. 13660 * optimize.c (maybe_clone_body): Handle destructors. 13661 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P. 13662 13663 * exception.cc (cleanup_fn): New typedef. 13664 (CALL_CLEANUP): New macro. 13665 (cp_eh_info): Use them. 13666 (__cp_push_exception): Likewise. 13667 (__cp_pop_exception): Likewise. 13668 136692000-04-11 Mark Mitchell <mark@codesourcery.com> 13670 13671 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER. 13672 (complete_dtor_identifier): New macro. 13673 (CLASSTYPE_FIRST_CONVERSION): Remove. 13674 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro. 13675 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise. 13676 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise. 13677 (CLASSTYPE_CONSTRUCTORS): Likewise. 13678 (CLASSTYPE_DESTRUCTORS): Likewise. 13679 (lang_decl): Add cloned_function. 13680 (DECL_COMPLETE_CONSTRUCTOR_P): New macro. 13681 (DECL_BASE_CONSTRUCTOR_P): Likewise. 13682 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise. 13683 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise. 13684 (DECL_CLONED_FUNCTION_P): Likewise. 13685 (DECL_CLONED_FUNCTION): Likewise. 13686 (clone_function_decl): Declare. 13687 (maybe_clone_body): Likewise. 13688 * call.c (build_user_type_conversion_1): Call complete object 13689 constructors in the new ABI. 13690 (build_new_method_call): Don't add in-charge parameters under the 13691 new ABI. 13692 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P, 13693 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and 13694 CLASSTYPE_DESTRUCTOR_SLOT. 13695 (build_clone): New function. 13696 (clone_function_decl): Likewise. 13697 (clone_constructors_and_destructors): Likewise. 13698 (check_bases_and_members): Use it. 13699 * decl.c (iniitialize_predefined_identifiers): Initialize 13700 complete_dtor_identifier. 13701 (finish_function): Don't add extra code to a clone. 13702 (lang_mark_tree): Mark cloned_function. 13703 * decl2.c (mark_used): Don't bother trying to instantiate things 13704 we synthesized. 13705 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice. 13706 * method.c (set_mangled_name_for_decl): Don't treat clones as 13707 constructors. 13708 (synthesize_method): Sythesize cloned functions, not the clones. 13709 * optimize.c (inline_data): Update comment on ret_label. 13710 (remap_block): Don't assume DECL_INITIAL exists. 13711 (copy_body_r): Allow ret_label to be NULL. 13712 (maybe_clone_body): Define. 13713 * pt.c (tsubst_decl): Handle clones. 13714 (instantiate_clone): New function. 13715 (instantiate_template): Use it. 13716 (set_mangled_name_for_template_decl): Don't treat clones as 13717 constructors. 13718 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT, 13719 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT. 13720 * semantics.c (expand_body): Clone function bodies as necessary. 13721 13722 * optimize.c (remap_decl): Avoid sharing structure for arrays 13723 whose size is only known at run-time. 13724 * tree.c (copy_tree_r): Don't copy PARM_DECLs. 13725 13726 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr 13727 to has_in_charge_parm_p. 13728 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ... 13729 (DECL_HAS_IN_CHARGE_PARM_P): ... this. 13730 (DECL_COPY_CONSTRUCTOR_P): New macro. 13731 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P. 13732 (build_user_type_conversion_1): Likewise. 13733 (convert_like_real): Likewise. 13734 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P. 13735 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P. 13736 (copy_args_p): Likewise. 13737 (grok_ctor_properties): Likewise. 13738 (start_function): Likewise. 13739 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it. 13740 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P. 13741 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P. 13742 * method.c (do_build_copy_constructor): Use 13743 DECL_HAS_IN_CHARGE_PARM_P. 13744 (synthesize_method): Likewise. 13745 * pt.c (instantiate_template): Remove goto. 13746 * tree.c (build_cplus_method_type): Remove mention of obstacks in 13747 comment. 13748 13749 * cp-tre.h (finish_function): Change prototype. 13750 * decl.c (end_cleanup_fn): Adjust caller. 13751 (finish_function): Take only one parameter. 13752 * decl2.c (finish_objects): Adjust caller. 13753 (finish_static_storage_duration_function): Likewise. 13754 * method.c (emit_thunk): Likewise. 13755 * parse.y: Likewise. 13756 * parse.c: Regenerated. 13757 * pt.c (instantiate_decl): Likewise. 13758 * rtti.c (synthesize_tinfo_fn): Likewise. 13759 * semantics.c (expand_body): Likewise. 13760 13761 * cp-tree.h (copy_decl): New function. 13762 * class.c (finish_struct_1): Use it. 13763 * lex.c (copy_decl): Define it. 13764 * pt.c (tsubst_decl): Likewise. 13765 * tree.c (copy_template_template_parm): Likewise. 13766 13767 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and 13768 has_nonpublic_assign_ref. 13769 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare. 13770 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise. 13771 * class.c (finish_struct_methods): Don't set 13772 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF. 13773 (interface_only): Don't declare. 13774 (interface_unknown): Likewise. 13775 137762000-04-11 Martin v. L�wis <loewis@informatik.hu-berlin.de> 13777 13778 * tree.h (HAVE_TEMPLATES): Remove definition. 13779 * lang-options.h (-fthis-is-variable): Remove documentation. 13780 137812000-04-10 Jason Merrill <jason@casey.cygnus.com> 13782 13783 * class.c (instantiate_type): Handle object-relative template-id. 13784 13785 * semantics.c (finish_expr_stmt): Call convert_to_void here. 13786 * decl.c (cplus_expand_expr_stmt): Not here. 13787 13788 * rtti.c (build_dynamic_cast_1): Call non_lvalue. 13789 Initialize exprtype earlier. 13790 13791 * parse.y (fn.def1): Check for defining types in return types. 13792 13793 * decl.c (check_tag_decl): Notice extra fundamental types. 13794 Diagnose empty decls in classes, too. 13795 13796 * decl.c (grokdeclarator): Don't override an anonymous name if no 13797 declarator was given. 13798 13799 * cvt.c (convert_to_void): Call resolve_offset_ref. 13800 13801 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF. 13802 13803 * decl2.c (decl_namespace): Handle getting a type. 13804 13805 * typeck.c (build_c_cast): Re-enable warning for cast between 13806 pointer and integer of different size. 13807 138082000-04-10 Nathan Sidwell <nathan@codesourcery.com> 13809 13810 * inc/cxxabi.h (__pointer_type_info): Add restrict and 13811 incomplete flags. 13812 (__pointer_type_info::__pointer_catch): New virtual function. 13813 (__pointer_to_member_type_info): Derive from 13814 __pointer_type_info. Adjust. 13815 (__pointer_to_member_type_info::__do_catch): Remove. 13816 (__pointer_to_member_type_info::__is_pointer_p): Declare. 13817 (__pointer_to_member_type_info::__pointer_catch): Declare. 13818 * rtti.c (qualifier_flags): Add restrict flag. 13819 (ptmd_initializer): Reorder members. 13820 (create_tinfo_types): Expand comments. Reorder 13821 ptmd_desc_type_node members. 13822 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p): 13823 Implement. 13824 (__pointer_type_info::__do_catch): Move specific code into 13825 __pointer_catch. Call it. 13826 (__pointer_type_info::__pointer_catch): Non-pointer-to-member 13827 specific catch checking. Fix void conversion check. 13828 (__pointer_to_member_type_info::__do_catch): Remove. 13829 (__pointer_to_member_type_info::__pointer_catch): Implement. 13830 138312000-04-10 Martin v. L�wis <loewis@informatik.hu-berlin.de> 13832 13833 * lex.c (init_parse): Remove traces of classof and headof. 13834 * decl2.c (flag_operator_names): Default to 1. 13835 (lang_decode_option): Do not set it for -ansi. 13836 138372000-04-09 Mark Mitchell <mark@codesourcery.com> 13838 13839 * cp-tree.h (struct lang_decl): Remove main_decl_variant. 13840 (DECL_MAIN_VARIANT): Remove. 13841 * decl.c (duplicate_decls): Don't set it. 13842 (start_function): Likewise. 13843 (lang_mark_tree): Don't mark it. 13844 * decl2.c (defer_fn): Don't use it. 13845 * lex.c (retrofit_lang_decl): Don't set it. 13846 * pt.c (tsubst_decl): Likewise. 13847 * ptree.c (print_lang_decl): Don't print it. 13848 * typeck.c (mark_addressable): Don't use it. 13849 138502000-04-09 Nathan Sidwell <nathan@codesourcery.com> 13851 13852 * vec.cc: Include <new> and <exception>. 13853 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup. 13854 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or 13855 terminate. 13856 (__cxa_vec_delete): Catch dtor exceptions. 13857 138582000-04-09 Nathan Sidwell <nathan@codesourcery.com> 13859 13860 Prepend __ to implementation defined names. 13861 * inc/typeinfo (type_info): Rename _name to __name. 13862 (type_info::type_info): Rename parameter. 13863 (type_info::operator==, type_info::operator!=, 13864 type_info::before): Likewise. 13865 (type_info::is_pointer_p, type_info::is_function_p, 13866 type_info::do_catch, type_info::do_upcast): Prepend __. Rename 13867 parameters. 13868 * inc/cxxabi.h 13869 (__fundamental_type_info::__fundamental_type_info) Rename parameters. 13870 (__pointer_type_info::__pointer_type_info): Likewise. 13871 (__pointer_type_info::is_pointer_p, 13872 __pointer_type_info::do_catch): Prepend __. Rename parameters. 13873 (__array_type_info::__array_type_info): Rename parameters. 13874 (__function_type_info::__function_type_info): Likewise. 13875 (__function_type_info::is_function_p): Prepend __. 13876 (__enum_type_info::__enum_type_info): Rename parameters. 13877 (__pointer_to_member_type_info::__pointer_to_member_type_info): 13878 Likewise. 13879 (__pointer_to_member_type_info::do_catch): Prepend __. Rename 13880 parameters. 13881 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __. 13882 (__class_type_info::__class_type_info): Rename parameters. 13883 (__class_type_info::sub_kind): Prepend __. Adjust member names. 13884 (__class_type_info::upcast_result, 13885 __class_type_info::dyncast_result): Prepend __. Move definition 13886 into tinfo.cc. 13887 (__class_type_info::do_upcast, __class_type_info::do_catch, 13888 __class_type_info::find_public_src, 13889 __class_type_info::do_dyncast, 13890 __class_type_info::do_find_public_src): Prepend __. Rename 13891 parameters. 13892 (__si_class_type_info::__si_class_type_info): Rename parameters. 13893 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast, 13894 __si_class_type_info::do_find_public_src): Prepent __. Rename 13895 parameters. 13896 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters. 13897 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast, 13898 __vmi_class_type_info::do_find_public_src): Prepent __. Rename 13899 parameters. 13900 (__dynamic_cast): Rename parameters. 13901 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p, 13902 type_info::do_catch, type_info::do_upcast): Prepend __. 13903 (contained_p, public_p, virtual_p, contained_public_p, 13904 contained_nonpublic_p, contained_nonvirtual_p): Adjust. 13905 (__class_type_info::do_catch, 13906 __class_type_info::do_upcast): Prepend __. Adjust. 13907 (__class_type_info::__upcast_result, 13908 __class_type_info::__dyncast_result): Move from inc/cxxabi.h. 13909 Adjust. 13910 (__class_type_info::find_public_src): Prepend __. Adjust. 13911 (__class_type_info::do_find_public_src, 13912 __si_class_type_info::do_find_public_src, 13913 __vmi_class_type_info::do_find_public_src): Likewise. 13914 (__class_type_info::do_dyncast, 13915 __si_class_type_info::do_dyncast, 13916 __vmi_class_type_info::do_dyncast): Likewise. 13917 (__class_type_info::do_upcast, 13918 __si_class_type_info::do_upcast, 13919 __vmi_class_type_info::do_upcast): Likewise. 13920 (__dynamic_cast): Adjust. 13921 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __. 13922 (__function_type_info::is_function_p): Likewise. 13923 (__pointer_type_info::do_catch): Likewise. Adjust. 13924 (__pointer_to_member_type_info::do_catch): Likewise. Adjust. 13925 (__throw_type_match_rtti_2): Adjust. 13926 (__is_pointer): Adjust. 13927 139282000-04-08 Mark Mitchell <mark@codesourcery.com> 13929 13930 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER. 13931 (complete_ctor_identifier): New macro. 13932 (special_function_kind): Add sfk_copy_constructor and 13933 sfk_assignment_operator. 13934 (LOOKUP_HAS_IN_CHARGE): Remove. 13935 (cons_up_default_function): Rename to ... 13936 (implicitly_declare_fn): ... this. 13937 * call.c (build_new_method_call): Add in-charge parameters for 13938 constructors here. 13939 * class.c (add_implicitly_declared_members): Change parameter name 13940 from cant_have_assignment to cant_have_const_assignment. 13941 Replace calls to cons_up_default_function to implicitly_declare_fn. 13942 * cvt.c (ocp_convert): Use complete_ctor_identifier. 13943 * decl.c (initialize_predefined_identifiers): Initialize it. 13944 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of 13945 complex expression. 13946 * init.c (expand_default_init): Don't calculate the in-charge 13947 parameter here. 13948 (build_new_1): Likewise. 13949 * lex.c (cons_up_default_function): Move to method.c. 13950 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P. 13951 (implicitly_declare_fn): New function. 13952 * typeck.c (build_static_cast): Use complete_ctor_identifier. 13953 (build_modify_expr): Likewise. 13954 * typeck2.c (build_functional_cast): Likewise. 13955 13956 Under the new ABI, constructors don't return `this'. 13957 * cp-tree.h (warn_reorder): Declare. 13958 (special_function_kind): New enum. 13959 (global_base_init_list): Remove declaration. 13960 (emit_base_init): Don't return a value. 13961 (check_base_init): Don't declare. 13962 (is_aggr_typedef): Likewise. 13963 * decl.c (check_special_function_return_type): New function. 13964 (return_types): Remove. 13965 (grokdeclarator): Use check_special_function_return_type. 13966 (start_function): Don't initialize ctor_label under the new ABI. 13967 (finish_construtor_body): Don't create a corresponding LABEL_STMT. 13968 * init.c (begin_init_stmts): Move to top of file. 13969 (finish_init_stmts): Likewise. 13970 (warn_reorder): Don't declare. 13971 (emit_base_init): Don't create a STMT_EXPR here. Don't return a 13972 value. 13973 (check_base_init): Remove. 13974 (is_aggr_typedef): Likewise. 13975 (build_new_1): Don't use the return value of a constructor. 13976 * semantics.c (setup_vtbl_ptr): Don't use the return value 13977 of emit_base_init. 13978 * typeck.c (check_return_expr): Don't magically convert return 13979 statements into `return this' in constructors under the new ABI. 13980 13981 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER, 13982 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER. 13983 (base_ctor_identifier): New macro. 13984 (base_dtor_identifier): Likewise. 13985 (deleting_dtor_identifier): Likewise. 13986 * decl.c: Don't include obstack.h. 13987 (obstack_chunk_alloc): Don't define. 13988 (obstack_chunk_free): Likewise. 13989 (struct predefined_identifier): New type. 13990 (initialize_predefined_identifiers): New function. 13991 (init_decl_processing): Use it. 13992 (debug_temp_inits): Remove. 13993 (start_method): Don't call preserve_data. 13994 (hack_incomplete_structures): Update comment. 13995 * init.c (init_init_processing): Don't initialize 13996 nelts_identifier. 13997 (build_offset_rf): Remove dead code. 13998 (build_delete): Use CLASSTYPE_N_BASECLASSES. 13999 * search.c (init_search_processing): Don't initialize 14000 vptr_identifier. 14001 140022000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 14003 14004 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide 14005 some sign_compare warnings. 14006 140072000-04-07 Nathan Sidwell <nathan@codesourcery.com> 14008 14009 Rename abi::__vmi_class_type_info members. 14010 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases, 14011 base_list, detail_masks members to vmi_flags, vmi_base_count, 14012 vmi_bases and vmi_flags_masks respectively. 14013 (__vmi_class_type_info::vmi_flags_masks): Rename 14014 details_unknown_mask to flags_unknown_mask. 14015 * tinfo.cc (__class_type_info::do_upcast): Adjust. 14016 (__vmi_class_type_info::do_find_public_src): Adjust. 14017 (__vmi_class_type_info::do_dyncast): Adjust. 14018 (__vmi_class_type_info::do_upcast): Adjust. 14019 140202000-04-07 Nathan Sidwell <nathan@codesourcery.com> 14021 14022 * tinfo.cc (convert_to_base): New function. 14023 (get_vbase_offset): Remove. Move into convert_to_base. 14024 (__vmi_class_type_info::do_find_public_src): Adjust. 14025 (__vmi_class_type_info::do_dyncast): Adjust. 14026 (__vmi_class_type_info::do_upcast): Adjust. 14027 140282000-04-06 Jason Merrill <jason@yorick.cygnus.com> 14029 14030 * tinfo.cc (operator=): Use __builtin_strcmp. 14031 * tinfo2.cc (before): Likewise. 14032 140332000-04-06 Mark Mitchell <mark@codesourcery.com> 14034 14035 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred. 14036 (DECL_SAVED_INLINE): Rename to ... 14037 (DECL_DEFERRED_FN): ... this. 14038 (in_function_p): Remove declaration. 14039 (mark_inline_for_output): Rename to ... 14040 (defer_fn): ... this. 14041 * decl.c (finish_function): Adjust call to mark_inline_for_output. 14042 (in_function_p): Remove definition. 14043 * decl2.c (saved_inlines): Rename to ... 14044 (deferred_fns): ... this. 14045 (saved_inlines_used): Rename to ... 14046 (deferred_fns_used): ... this. 14047 (mark_inline_for_output): Rename to ... 14048 (defer_fn): ... this. 14049 (finish_file): Adjust accordingly. 14050 (init_decl2): Likewise. 14051 * lex.c (cons_up_default_function): Likewise. 14052 * pt.c (mark_decl_instantiated): Likewise. 14053 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any 14054 circumstances. 14055 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output. 14056 * semantics.c (expand_body): Defer more functions. 14057 140582000-04-06 Nathan Sidwell <nathan@codesourcery.com> 14059 14060 * vec.cc: New file. 14061 * Make-lang.in (CXX_LIB2FUNCS): Add it. 14062 (vec.o): Build it. 14063 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor, 14064 __cxa_vec_delete): Declare. 14065 140662000-04-06 Nathan Sidwell <nathan@codesourcery.com> 14067 14068 * rtti.c (dfs_class_hint_mark): New static function. 14069 (dfs_class_hint_unmark): New static function. 14070 (class_hint_flags): Use them. 14071 140722000-04-05 Benjamin Kosnik <bkoz@cygnus.com> 14073 14074 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE. 14075 140762000-04-05 Mark Mitchell <mark@codesourcery.com> 14077 14078 * cp-tree.h (instantiate_decl): Change prototype. 14079 * decl2.c (mark_used): Adjust call. 14080 * optimize.c (inlinable_function_p): Adjust handling of templates. 14081 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl. 14082 (do_type_instantiation): Likewise. 14083 (instantiate_decl): Defer more templates. 14084 (instantiate_pending_templates): Adjust logic to handle inline 14085 friend functions. 14086 14087 * Makefile.in (GGC_H): New variable. Use it throughout in place 14088 of ggc.h. 14089 14090 * call.c: Don't include obstack.h. Include ggc.h. 14091 (obstack_chunk_alloc): Don't define. 14092 (obstack_chunk_free): Likewise. 14093 (add_candidate): Allocate the z_candidate with ggc_alloc_obj. 14094 * decl.c (push_switch): Use xmalloc to allocate the cp_switch. 14095 (pop_switch): Free it. 14096 14097 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs. 14098 14099 * dump.c (dequeue_and_dump): Don't try to print the bit_position 14100 if we don't have a DECL_FIELD_OFFSET. 14101 14102Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz> 14103 14104 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of 14105 special_function_p. 14106 141072000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 14108 14109 * cfns.gperf (hash, libc_name_p): Prototype. 14110 14111 * rtti.c (build_dynamic_cast_1): Constification. 14112 14113 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes. 14114 14115 * semantics.c (deferred_type_access_control): Prototype. 14116 141172000-04-04 Mark Mitchell <mark@codesourcery.com> 14118 14119 Correct many new ABI issues regarding vbase and vcall offset 14120 layout. 14121 * cp-tree.h (BINFO_VTABLE): Document. 14122 (struct lang_type): Tweak formatting. 14123 (BINFO_PRIMARY_BINFO): Add to documentation. 14124 (CLASSTYPE_VSIZE): Fix typo in comment. 14125 (CLASSTYPE_VBASECLASSES): Update documentation. 14126 (BINFO_VBASE_MARKED): Remove. 14127 (SET_BINFO_VBASE_MARKED): Likewise. 14128 (CLEAR_BINFO_VBASE_MARKED): Likewise. 14129 (BINFO_FIELDS_MARKED): Remove. 14130 (SET_BINFO_FIELDS_MARKED): Likewise. 14131 (CLEAR_BINFO_FIELDS_MARKED): Likewise. 14132 (enum access_kind): New enumeration. 14133 (num_extra_vtbl_entries): Remove declaration. 14134 (size_extra_vtbl_entries): Likewise. 14135 (get_vtbl_decl_for_binfo): New function. 14136 (dfs_vbase_unmark): Remove declaration. 14137 (mark_primary_bases): Likewise. 14138 * class.c (SAME_FN): Remove. 14139 (struct vcall_offset_data_s): Move definition. 14140 (build_vbase_pointer): Use `build', not `build_binary_op', to 14141 access the vbase pointer under the new ABI. 14142 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo. 14143 (build_primary_vtable): Likewise. 14144 (dfs_mark_primary_bases): Move here from search.c. 14145 (mark_primary_bases): Likewise. 14146 (determine_primary_bases): Under the new ABI, don't make a base 14147 class a primary base just because we don't yet have any virtual 14148 functions. 14149 (layout_vtable_decl): Use get_vtbl_decl_for_binfo. 14150 (num_vfun_entries): Remove. 14151 (dfs_count_virtuals): Likewise. 14152 (num_extra_vtbl_entries): Likewise. 14153 (size_extra_vtbl_entries): Likewise. 14154 (layout_virtual_bases): Iterate in inheritance graph order under 14155 the new ABI. 14156 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to 14157 indicate that a vfield is present. 14158 (init_class_processing): Initialize access_public_node, etc., from 14159 ak_public, etc. 14160 (get_vtbl_decl_for_binfo): New function. 14161 (dump_class_hierarchy_r): Likewise. 14162 (dump_class_hierarchy): Use it. 14163 (finish_vtbls): Build the vtbls in inheritance graph order. 14164 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer. 14165 (initialize_vtable): Use get_vtbl_decl_for_binfo. 14166 (accumulate_vtbl_inits): Add comments explaining why a pre-order 14167 walk is required. 14168 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location 14169 where the vptr points, even for primary vtables. 14170 (build_vtbl_initializer): Adjust handling of vbase and vcall 14171 offsets. 14172 (build_vcall_and_vbase_vtable_entries): New function. 14173 (dfs_build_vbase_offset_vtbl_entries): Remove. 14174 (build_vbase_offset_vtbl_entries): Reimplement. 14175 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that 14176 were already handled in a primary base class vtable. 14177 (build_vcall_offset_vtbl_entries): Adjust. 14178 (build_rtti_vtbl_entries): Adjust. 14179 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo. 14180 * init.c (expand_virtual_init): Simplify. 14181 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo. 14182 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr. 14183 * search.c (BINFO_ACCESS): New macro. 14184 (SET_BINFO_ACCESS): Likewise. 14185 (dfs_access_in_type): Manipulate access_kinds, not access nodes. 14186 (access_in_type): Likewise. 14187 (dfs_accessible_p): Likewise. 14188 (protected_accessible_p): Likewise. 14189 (lookup_fnfields_1): Adjust documentation. 14190 (dfs_mark_primary_bases): Move to class.c 14191 (mark_primary_bases): Likewise. 14192 (dfs_vbase_unmark): Remove. 14193 (virtual_context): Use BINFO_FOR_VBASE. 14194 (dfs_get_vbase_types): Simplify. 14195 (dfs_build_inheritance_graph_order): New function. 14196 (get_vbase_types): Use it. 14197 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo. 14198 14199 * tinfo.cc (get_vbase_offset): New function. 14200 (__vmi_class_type_info::do_find_public_src): Use it. 14201 (__vmi_class_type_info::do_dyncast): Likewise. 14202 (__vmi_class_type_info::do_upcast): Likewise. 14203 142042000-04-03 Zack Weinberg <zack@wolery.cumb.org> 14205 14206 * lang-specs.h: Pass -fno-show-column to the preprocessor. 14207 142082000-03-30 Nathan Sidwell <nathan@codesourcery.com> 14209 14210 * rtti.c (class_hint_flags): Rename flags. 14211 (class_initializer): Remove flags. 14212 (synthesize_tinfo_var): Combine offset and flags. Add flags 14213 for __vmi_class_type_info. 14214 (create_tinfo_types): Remove flags from __class_type_info and 14215 __si_class_type_info. Merge flags and offset from 14216 base_class_type_info. 14217 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags. 14218 (__base_class_info::is_virtual_p): Adjust. 14219 (__base_class_info::is_public_p): Adjust. 14220 (__base_class_info::offset): New accessor. 14221 (__class_type_info::details): Remove member. 14222 (__class_type_info::__class_type_info): Lose details. 14223 (__class_type_info::detail_masks): Remove. 14224 (__si_class_type_info::__si_class_type_info): Lose details. 14225 (__vmi_class_type_info::details): New member. 14226 (__vmi_class_type_info::__vmi_class_type_info): Adjust. 14227 (__vmi_class_type_info::detail_masks): New member. 14228 * tinfo.cc (__class_type_info::do_upcast): Initialize result 14229 with unknown_details_mask. 14230 (__vmi_class_type_info::do_find_public_src): Adjust 14231 (__vmi_class_type_info::do_dyncast): Adjust. 14232 (__vmi_class_type_info::do_upcast): Set result details, if 14233 needed. Adjust. 14234 (__dynamic_cast): Temporarily #if out optimization. 14235 142362000-03-29 Nathan Sidwell <nathan@codesourcery.com> 14237 14238 * rtti.c (get_tinfo_decl): Mark used. 14239 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only 14240 mark as dealt with, if we output it. 14241 142422000-03-28 Mark Mitchell <mark@codesourcery.com> 14243 14244 * class.c: Reorganize to put virtual function table initialization 14245 machinery at the end of the file. 14246 142472000-03-28 Jason Merrill <jason@casey.cygnus.com> 14248 14249 * class.c (finish_struct): Use bitsize_zero_node. 14250 * pt.c (instantiate_class_template): Likewise. 14251 142522000-03-28 Mark Mitchell <mark@codesourcery.com> 14253 14254 Put RTTI entries at negative offsets in new ABI. 14255 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first 14256 vbase offset at index -3, not -1. 14257 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not 14258 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases. 14259 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff. 14260 (build_rtti_vtbl_entries): New function. 14261 (set_rtti_entry): Remove. 14262 (build_primary_vtable): Don't use it. 14263 (build_secondary_vtable): Likewise. 14264 (start_vtable): Remove. 14265 (first_vfun_index): New function. 14266 (set_vindex): Likewise. 14267 (add_virtual_function): Don't call start_vtable. Do call 14268 set_vindex. 14269 (set_primary_base): Rename parameter. 14270 (determine_primary_base): Likewise. 14271 (num_vfun_entries): Don't use skip_rtti_stuff. 14272 (num_extra_vtbl_entries): Include RTTI information. 14273 (build_vtbl_initializer): Use build_rtti_vtbl_entries. 14274 (skip_rtti_stuff): Remove. 14275 (dfs_modify_vtables): Don't use it. 14276 (modify_all_vtables): Don't use start_vtable. Do use set_vindex. 14277 (layout_nonempty_base_or_field): Update size handling. 14278 (create_vtable_ptr): Tweak. 14279 (layout_class_type): Adjust parameter names. 14280 (finish_struct_1): Simplify. 14281 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation. 14282 (skip_rtti_stuff): Remove. 14283 (first_vfun_index): New function. 14284 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove. 14285 (dfs_vtable_path_marked_real_bases_queue_p): Remove. 14286 (marked_vtable_pathp): Declare. 14287 (unmarked_vtable_pathp): Likewise. 14288 * error.c (dump_expr): Use first_vfun_index to calculate vtable 14289 offsets. 14290 * rtti.c (build_headof): Look for RTTI at negative offsets. 14291 (get_tinfo_decl_dynamic): Likewise. 14292 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL 14293 here. 14294 (create_pseudo_type_info): Do it here instead. Adjust so that 14295 vptr points at first virtual function. 14296 * search.c (marked_vtable_pathp): Make it global. 14297 (unmarked_vtable_pathp): Likewise. 14298 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove. 14299 (dfs_vtable_path_marked_real_bases_queue_p): Likewise. 14300 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff. 14301 (get_pure_virtuals): Likewise. 14302 (expand_upcast_fixups): Likewise. 14303 * tree.c (debug_binfo): Likewise. 14304 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate 14305 negative offset. 14306 14307Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 14308 14309 * class.c (check_field_decl): Fix typo. 14310 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS. 14311 (check_methods): Likewise. 14312 (check_field_decls): Likewise. 14313 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT. 14314 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT): 14315 Use DECL_RESULT_FLD, not DECL_RESULT. 14316 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT. 14317 * lex.c (identifier_type): Likewise. 14318 * pt.c (determine_specialization, lookup_template_class): Likewise. 14319 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise. 14320 (resolve_overloaded_unification, more_specialized): Likewise. 14321 * semantics.c (finish_member_declaration): Likewise. 14322 * typeck.c (build_x_function_call): Likewise. 14323 143242000-03-26 Mark Mitchell <mark@codesourcery.com> 14325 14326 * class.c (layout_empty_base): Handle empty bases with non-byte 14327 alignment. 14328 (build_base_field): Likewise. 14329 (layout_virtual_bases): Likewise. 14330 14331 * class.c (finish_struct_1): Fix typo in this change: 14332 14333 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 14334 143352000-03-25 Mark Mitchell <mark@codesourcery.com> 14336 14337 * decl.c (grokdeclarator): Count partial specializations when 14338 keeping track of how many template classes have been seen. 14339 14340 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT. 14341 14342Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 14343 14344 * class.c (build_vbase_pointer_fields): layout_field now place_field. 14345 (get_vfield_offset): Use byte_position. 14346 (set_rtti_entry): Set OFFSET to ssizetype zero. 14347 (get_binfo_offset_as_int): Deleted. 14348 (dfs_record_base_offsets): Use tree_low_cst. 14349 (dfs_search_base_offsets): Likewise. 14350 (layout_nonempty_base_or_field): Reflect changes in RLI format 14351 and call byte_position. 14352 (layout_empty_base): Convert offset to ssizetype. 14353 (build_base_field): use rli_size_unit_so_far. 14354 (dfs_propagate_binfo_offsets): Do computation in proper type. 14355 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. 14356 (layout_class_type): Reflect changes in RLI names and fields. 14357 (finish_struct_1): Set DECL_FIELD_OFFSET. 14358 * dump.c (dequeue_and_dump): Call bit_position. 14359 * expr.c (cplus_expand_constant): Use byte_position. 14360 * rtti.c (expand_class_desc): Use bitsize_one_node. 14361 * typeck.c (build_component_addr): Use byte_position and don't 14362 special case for zero offset. 14363 143642000-03-24 Nathan Sidwell <nathan@codesourcery.com> 14365 14366 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P. 14367 14368 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi 14369 tinfo object. 14370 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting 14371 vtable. 14372 143732000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 14374 14375 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and 14376 DECL_P macros. 14377 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name, 14378 make_typename_type, check_initializer, cp_finish_decl, 14379 xref_tag): Likewise. 14380 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree, 14381 decl_namespace, arg_assoc_template_arg, arg_assoc, 14382 validate_nonmember_using_decl, do_class_using_decl): Likewise. 14383 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of, 14384 args_to_string): Likewise. 14385 * friend.c (is_friend): Likewise. 14386 * lex.c (note_got_semicolon, note_list_got_semicolon, 14387 is_global): Likewise. 14388 * method.c (build_overload_nested_name, build_overload_value, 14389 build_qualified_name, build_qualified_name, hack_identifier): Likewise. 14390 * parse.y (typename_sub, typename_sub1): Likewise. 14391 * pt.c (push_inline_template_parms_recursive, check_template_shadow, 14392 process_partial_specialization, convert_template_argument, 14393 template_args_equal, add_pending_template, lookup_template_class, 14394 for_each_template_parm_r, maybe_fold_nontype_arg, 14395 tsubst, instantiate_template, type_unification_real, unify, 14396 instantiate_pending_templates, set_mangled_name_for_template_decl): 14397 Likewise. 14398 * repo.c (repo_get_id, repo_template_used): Likewise. 14399 * search.c (lookup_field_1): Likewise. 14400 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise. 14401 * xref.c (classname): Likewise. 14402 144032000-03-22 Mark Mitchell <mark@codesourcery.com> 14404 14405 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation. 14406 (CANONICAL_BINFO): New macro. 14407 (BINFO_NEW_VTABLE_MARKED): Use it. 14408 (SET_BINFO_NEW_VTABLE_MARKED): Likewise. 14409 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise. 14410 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE, 14411 not TREE_TYPE. 14412 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED. 14413 (build_secondary_vtable): Likewise. 14414 (dfs_finish_vtbls): Likewise. 14415 (dfs_accumulate_vtbl_inits): Likewise. 14416 (accumulate_vtbl_inits): New function. 14417 (finish_vtbls): Make sure that virtual bases come after 14418 non-virtual bases in the vtable group. 14419 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL. 14420 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED. 14421 * search.c (struct vbase_info): Move definition. 14422 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED. 14423 (unmarked_new_vtable_p): Likewise. 14424 (dfs_mark_vtable_path): Remove. 14425 (dfs_mark_new_vtable): Remove. 14426 (dfs_unmark_new_vtable): Likewise. 14427 (dfs_clear_search_slot): Likewise. 14428 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED. 14429 (dfs_clear_vbase_slots): Likewise. 14430 (init_vbase_pointers): LIkewise. 14431 144322000-03-22 Jason Merrill <jason@casey.cygnus.com> 14433 14434 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a 14435 SIZETYPE to a non-SIZETYPE. 14436 144372000-03-21 Mark Mitchell <mark@codesourcery.com> 14438 14439 * class.c (layout_virtual_bases): Adjust names in conditionally 14440 compiled code. 14441 14442 * class.c (record_base_offsets): New function. 14443 (layout_conflict_p): Likewise. 14444 (layout_nonempty_base_or_field): Use it. 14445 (layout_empty_base): New function. 14446 (build_base_field): Use it. 14447 (build_base_fields): Update comment. 14448 (layout_virtual_bases): Fold in a little code form 14449 layout_basetypes. Use layout_empty_base. 14450 (layout_basetypes): Remove. 14451 (end_of_class): New function. 14452 (layout_class_type): Use it. Adjust. 14453 14454 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment. 14455 (fntype_p): Remove. 14456 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in 14457 comment. 14458 (dfs_skip_nonprimary_vbases_markedp): Likewise. 14459 * typeck.c (fntype_p): Remove. 14460 14461 * cp-tree.h (TI_SPEC_INFO): Remove. 14462 (CLASSTYPE_TI_SPEC_INFO): Likewise. 14463 * pt.c (process_partial_specialization): Likewise. 14464 14465 * class.c (build_base_field): Fix thinko in computation of binfo 14466 offsets. 14467 14468 * tree.c (mark_local_for_remap_p): Mark variables declared in 14469 TARGET_EXPRs as well. 14470 144712000-03-21 Nathan Sidwell <nathan@codesourcery.com> 14472 14473 * typeck.c (require_complete_type, complete_type, 14474 complete_type_or_else, c_sizeof, c_sizeof_nowarn, 14475 build_array_ref, convert_arguments, pointer_diff, 14476 build_x_unary_op, build_unary_op, build_c_cast, 14477 build_modify_expr): Use COMPLETE_TYPE_P etc. 14478 * call.c (is_complete, convert_like_real, 14479 build_new_method_call): Likewise. 14480 * class.c (build_vbase_pointer_fields, check_bases, 14481 build_base_field, finish_struct_1, pushclass): Likewise. 14482 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise. 14483 * decl.c (maybe_process_template_type_declaration, pushtag, 14484 pushdecl, redeclaration_error_message, start_decl, start_decl_1, 14485 layout_var_decl, check_initializer, cp_finish_decl, 14486 grokdeclarator, require_complete_types_for_parms, 14487 grok_op_properties, xref_tag, xref_basetypes, 14488 check_function_type): Likewise. 14489 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise. 14490 * friend.c (do_friend): Likewise. 14491 * init.c (build_offset_ref): Likewise. 14492 * parse.y (structsp): Likewise. 14493 * pt.c (maybe_process_partial_specialization, 14494 tsubst_friend_function, instantiate_class_template, tsubst, 14495 do_type_instantiation, instantiate_pending_templates): Likewise. 14496 * repo.c (repo_get_id): Likewise. 14497 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1, 14498 synthesize_tinfo_var, emit_support_tinfos): Likewise. 14499 * search.c (lookup_fnfields_1, lookup_conversions): Likewise. 14500 * semantics.c (begin_class_definition): Likewise. 14501 * tree.c (build_cplus_method_type): Likewise. 14502 * typeck2.c (digest_init, build_functional_cast, 14503 add_exception_specifier): Likewise. 14504 * parse.h, parse.c: Regenerated. 14505 145062000-03-21 Nathan Sidwell <nathan@codesourcery.com> 14507 14508 * inc/cxxabi.h: New header file. Define new-abi entry points. 14509 (__pointer_type_info::target): Rename member to ... 14510 (__pointer_type_info::type): ... here. 14511 (__base_class_info::type): Rename member to ... 14512 (__base_class_info::base): ... here. 14513 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h 14514 * cp-tree.h (CPTI_ABI): New global tree enumeration. 14515 (abi_node): New global tree node. 14516 * decl.c (abi_node): Document. 14517 (init_decl_processing): Initialize abi_node. 14518 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi. 14519 (get_vmi_pseudo_type_info): Likewise. 14520 (create_tinfo_types): Likewise. 14521 (emit_support_tinfos): Likewise. 14522 * tinfo.h (cxxabi.h): Include for new-abi. 14523 Move rtti class definitions to new header file. 14524 * tinfo.cc (abi): Use the namespace. 14525 (std): Move new abi rtti classes from here ... 14526 (__cxxabiv1): ... to here. 14527 * tinfo2.cc (cxxabi.h): Include for new-abi. 14528 Move rtti class definitions to new header file. 14529 (std): Move new abi rtti classes from here ... 14530 (__cxxabiv1): ... to here. 14531 * inc/typeinfo (__class_type_info): Move into __cxxabiv1 14532 namespace. 14533 145342000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu> 14535 Jason Merrill <jason@casey.cygnus.com> 14536 14537 * method.c (build_overload_int): Use host_integerp. 14538 145392000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 14540 14541 * init.c (build_offset_ref): Handle the case of a templated member 14542 function. 14543 145442000-03-19 Martin v. L�wis <loewis@informatik.hu-berlin.de> 14545 14546 * except.c (expand_exception_blocks): Clear catch_clauses_last. 14547 145482000-03-18 Mark Mitchell <mark@codesourcery.com> 14549 14550 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro. 14551 * class.c (check_bitfield_decl): Turn illegal bitfields into 14552 non-bitfields. 14553 (dfs_propagate_binfo_offsets): Adjust for new size_binop 14554 semantics. 14555 (dfs_offset_for_unshared_vbases): Likewise. 14556 * cvt.c (cp_convert_to_pointer): Convert NULL to a 14557 pointer-to-member correctly under the new ABI. 14558 * expr.c (cplus_expand_constant): Don't use cp_convert when 14559 turning an offset into a pointer-to-member. 14560 * init.c (resolve_offset_ref): Don't adjust pointers-to-members 14561 when dereferencing them under the new ABI. 14562 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation 14563 of pointers-to-members under the new ABI. 14564 14565 * class.c (check_bitfield_decl): Remove restriction on really long 14566 bitfields. 14567 (layout_class_type): Implement new ABI handling of bitfields 14568 longer than their types. 14569 145702000-03-18 Martin v. L�wis <loewis@informatik.hu-berlin.de> 14571 14572 * parse.y (extdefs): Call ggc_collect. 14573 * parse.c: Regenerated. 14574 145752000-03-18 Nathan Sidwell <nathan@codesourcery.com> 14576 14577 * class.c (build_base_field): Use TYPE_ALIGN to examine a type. 14578 (note_name_declared_in_class): Use OVL_CURRENT to get at a 14579 potential overload. 14580 14581Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 14582 14583 * class.c (build_vbase_path): Use integer_zerop. 14584 (build_vtable_entry): Use tree_low_cst. 14585 (get_vfield_offset): Use bit_position. 14586 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT. 14587 Use tree_low_cst. 14588 (check_bitfield_decl): Set DECL_SIZE using convert. 14589 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop. 14590 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT. 14591 Use tree_low_cst. 14592 (finish_struct_1): Use bit_position. 14593 (dump_class_hierarchy): Use tree_low_cst. 14594 * cp-tree.h (min_precision): Add declaration. 14595 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst. 14596 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst. 14597 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst. 14598 * expr.c (cplus_expand_constant): Use bit_position. 14599 * init.c (build_vec_init): Use host_integerp and tree_low_cst. 14600 * rtti.c (get_base_offset): Use bit_position. 14601 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int, 14602 host_integerp, and tree_low_cst. 14603 (pointer_int_sum): Use integer_zerop. 14604 (build_component_addr): Use bit_position. 14605 146062000-03-17 Nathan Sidwell <nathan@codesourcery.com> 14607 14608 * typeck.c (require_complete_type): Don't assume size_zero_node. 14609 (complete_type_or_else): Likewise. 14610 146112000-03-16 Steven Grady <grady@digitaldeck.com> 14612 Jason Merrill <jason@casey.cygnus.com> 14613 14614 * rtti.c (build_dynamic_cast_1): Improve diagnostics. 14615 146162000-03-16 Nathan Sidwell <nathan@codesourcery.com> 14617 14618 * decl2.c (grokfield): Bail out if type is error_mark_node. 14619 146202000-03-15 Nathan Sidwell <nathan@codesourcery.com> 14621 14622 * tinfo2.cc (__ptr_to_member_data): Rename to ... 14623 (__pointer_to_member_data): ... here. Adjust. 14624 * rtti.c (create_tinfo_types): Adjust. 14625 146262000-03-15 Nathan Sidwell <nathan@codesourcery.com> 14627 14628 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove. 14629 * decl.c (ref_desc_type_node): Undocument. 14630 * rtti.c (ptr_ref_initializer): Rename to ... 14631 (ptr_initializer): ... here. Adjust comments. 14632 (ptmd_initializer): Fix comment thinko. 14633 (synthesize_tinfo_var): Remove REFERENCE_TYPE case. 14634 (create_tinfo_types): Remove ref_desc_type_node init. 14635 * tinfo2.cc (__reference_type_info): Remove. 14636 146372000-03-15 Nathan Sidwell <nathan@codesourcery.com> 14638 14639 * decl.c (cp_finish_decl): Remove obsolete comment. 14640 14641 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning. 14642 146432000-03-14 Mark Mitchell <mark@codesourcery.com> 14644 14645 * cp-tree.h: Tweak documentation. 14646 * class.c (build_vbase_pointer_fields): Layout the fields, too. 14647 (avoid_overlap): Remove. 14648 (get_binfo_offset_as_int): New function. 14649 (dfs_serach_base_offsets): Likewise. 14650 (layout_nonempty_base_or_field): Likewise. 14651 (build_base_field): Layout fields here. Avoid placing two objects 14652 of the same type at the same address, under the new ABI. 14653 (build_base_fields): Adjust accordingly. 14654 (create_vtable_ptr): Return the new field, but don't attach it to 14655 TYPE_FIELDS. 14656 (remove_base_field): Remove. 14657 (remove_base_fields): Remove. 14658 (layout_basetypes): Adjust accordingly. 14659 (layout_class_type): Call layout_field for each field, rather than 14660 just making a wholesale call to layout_type. 14661 146622000-03-14 Jeff Sturm <jsturm@sigma6.com> 14663 14664 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw. 14665 146662000-03-13 Jason Merrill <jason@casey.cygnus.com> 14667 14668 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P. 14669 14670 * except.c (dtor_nothrow): New fn. 14671 (do_pop_exception): Use it. Take type parm. 14672 (push_eh_cleanup): Take type parm. 14673 (expand_start_catch_block): Pass it. 14674 (build_eh_type_type_ref): Accept null type. 14675 146762000-03-12 Mark Mitchell <mark@codesourcery.com> 14677 14678 * cp-tree.h (revert_static_member_fn): Change prototype. 14679 * decl.c (grokfndecl): Adjust call to revert_static_member_fn. 14680 (grok_op_properties): Likewise. 14681 (start_function): Likewise. 14682 (revert_static_member_fn): Simplify. 14683 * pt.c (check_explicit_specialization): Adjust call to 14684 revert_static_member_fn. 14685 146862000-03-11 Mark Mitchell <mark@codesourcery.com> 14687 14688 * cp-tree.h (scope_kind): New type. 14689 (tmpl_spec_kind): Likewise. 14690 (declare_pseudo_global_level): Remove. 14691 (pseudo_global_level_p): Rename to template_parm_scope_p. 14692 (pushlevel): Remove declaration. 14693 (begin_scope): New function. 14694 (finish_scope): Likewise. 14695 (current_tmpl_spec_kind): Likewise. 14696 * decl.c (struct binding_level): Shorten parm_flag to 2 bits. 14697 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p. 14698 Add template_spec_p. 14699 (toplevel_bindings_p): Adjust. 14700 (declare_pseudo_global_level): Remove. 14701 (pseudo_global_level_p): Rename to template_parm_scope_p. 14702 (current_tmpl_spec_kind): New function. 14703 (begin_scope): Likewise. 14704 (finish_scope): Likewise. 14705 (maybe_push_to_top_level): Adjust. 14706 (maybe_process_template_type_declaration): Likewise. 14707 (pushtag): Likewise. 14708 (pushdecl_nonclass_level): Likewise. 14709 (lookup_tag): Likewise. 14710 (grokfndecl): Handle member template specializations. Share 14711 constructor and non-constructor code. 14712 * decl2.c (check_classfn): Handle member template specializations. 14713 * pt.c (begin_template_parm_list): Use begin_scope. 14714 (begin_specialization): Likewise. 14715 (end_specialization): Likewise. 14716 (check_explicit_specialization): Use current_tmpl_spec_kind. 14717 Handle member template specializations. 14718 (end_template_decl): Use finish_scope. Remove call to 14719 get_pending_sizes. 14720 (push_template_decl_real): Remove bogus error message. 14721 (tsubst_decl): Fix typo in code contained in comment. 14722 (instantiate_template): Handle member template specializations. 14723 (most_general_template): Likewise. 14724 147252000-03-11 Gabriel Dos Reis <gdr@codesourcery.com> 14726 14727 * lex.c (whitespace_cr): Compress consecutive calls to warning(). 14728 (do_identifier): Ditto for error(). 14729 14730 * pt.c (convert_nontype_argument): Ditto for cp_error(). 14731 (convert_template_argument): Ditto for cp_pedwarn(). 14732 147332000-03-11 Jason Merrill <jason@casey.cygnus.com> 14734 14735 * exception.cc (__check_null_eh_spec): New fn. 14736 * except.c (expand_end_eh_spec): Call it if the spec is throw(). 14737 147382000-03-10 Jason Merrill <jason@casey.cygnus.com> 14739 14740 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE. 14741 * except.c (expand_end_eh_spec): Add the return type. 14742 * rtti.c (throw_bad_cast): Add the parmtypes. 14743 (throw_bad_typeid): Likewise. 14744 14745 * semantics.c (expand_stmt): Only leave out rtl for unused 14746 artificials, and set DECL_IGNORED_P on them as well. 14747 * decl.c (wrapup_globals_for_namespace): Likewise. 14748 147492000-03-09 Nathan Sidwell <nathan@codesourcery.com> 14750 14751 * decl.c (maybe_commonize_var): Skip all artificial decls. 14752 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN. 14753 147542000-03-10 Jason Merrill <jason@casey.cygnus.com> 14755 14756 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs. 14757 * cp-tree.h: Declare flag_enforce_eh_specs. 14758 * decl.c (store_parm_decls, finish_function): Check it. 14759 14760 C library functions don't throw. 14761 * Makefile.in (cfns.h): New target. 14762 (except.o): Depend on it. 14763 * Make-lang.in (cc1plus): Depend on cfns.gperf. 14764 * cfns.gperf: New file. 14765 * cfns.h: Generated. 14766 * except.c: Include it. 14767 (nothrow_libfn_p): New fn. 14768 * decl.c (grokfndecl): Use it. 14769 * cp-tree.h: Declare it. 14770 14771 * decl.c (push_overloaded_decl_1, auto_function, 14772 define_function): Lose. 14773 (build_library_fn_1): New static fn. 14774 (builtin_function): Use it. 14775 (get_atexit_node): Use build_library_fn_ptr. 14776 (build_library_fn, build_cp_library_fn, build_library_fn_ptr, 14777 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn, 14778 push_void_library_fn, push_throw_library_fn): New fns. 14779 * cp-tree.h: Declare them. 14780 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID. 14781 (throw_bad_cast_node, throw_bad_typeid_node): Lose. 14782 * except.c (init_exception_processing, call_eh_info, do_pop_exception, 14783 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns. 14784 * rtti.c (build_runtime_decl): Lose. 14785 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, 14786 build_dynamic_cast_1, expand_si_desc, expand_class_desc, 14787 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns. 14788 14789 * call.c (build_call): Remove result_type parm. 14790 Call mark_used on unused artificial fns. 14791 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust. 14792 147932000-03-09 Jason Merrill <jason@casey.cygnus.com> 14794 14795 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as 14796 appropriate. 14797 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL. 14798 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set 14799 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate. 14800 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1, 14801 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc, 14802 expand_generic_desc): Likewise. 14803 148042000-03-08 Nathan Sidwell <nathan@codesourcery.com> 14805 14806 * exception.cc (__cp_pop_exception): Cleanup the original object. 14807 148082000-03-08 Nathan Sidwell <nathan@codesourcery.com> 14809 14810 * decl.c (grok_op_properties): Merge conversion to void warning 14811 with other silly op warnings. 14812 148132000-03-08 Jason Merrill <jason@casey.cygnus.com> 14814 14815 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of 14816 array CONSTRUCTOR elements. Don't use expr_tree_cons. 14817 148182000-03-08 Nathan Sidwell <nathan@codesourcery.com> 14819 14820 * decl.c (cp_make_fname_decl): New function. 14821 (wrapup_globals_for_namespace): Don't emit unused static vars. 14822 (init_decl_processing): Remove comment about use of 14823 array_domain_type. Set make_fname_decl. 14824 (cp_finish_decl): Remove __FUNCTION__ nadgering. 14825 * semantics.c (begin_compound_stmt): Remove 14826 current_function_name_declared flagging. 14827 (expand_stmt): Don't emit unused local statics. 14828 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls 14829 specially. 14830 148312000-03-08 Nathan Sidwell <nathan@codesourcery.com> 14832 14833 * typeck.c (convert_for_assignment): Don't look at array 14834 initializer. 14835 * call.c (convert_like_real): Likewise. 14836 148372000-03-07 Jason Merrill <jason@casey.cygnus.com> 14838 14839 Add initial support for '\uNNNN' specifier. 14840 * lex.c (read_ucs): New fn. 14841 (readescape, skip_white_space): Call it. 14842 (is_extended_char, is_extended_char_1): New fns. 14843 (utf8_extend_token): New fn, #if 0'd out. 14844 (real_yylex): Treat extended chars like letters. 14845 14846 * search.c (note_debug_info_needed): Walk the bases even if we 14847 weren't deferring the type itself. 14848 148492000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 14850 14851 * decl2.c (finish_objects): Constify a char*. 14852 14853 * method.c (emit_thunk): Likewise. 14854 148552000-03-06 Nathan Sidwell <nathan@codesourcery.com> 14856 14857 * typeck.c (dubious_conversion_warnings): Look through 14858 REFERENCE_TYPE. 14859 14860Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 14861 14862 * class.c (dfs_modify_vtables): I is now unsigned. 14863 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int. 14864 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT. 14865 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned. 14866 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. 14867 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned. 14868 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR): 14869 Call integer_all_onesp. 14870 * typeck2.c (process_init_constructor): Use compare_tree_int. 14871 14872 * lang-specs.h (as): Don't call if -syntax-only. 14873 148742000-03-06 Mark Mitchell <mark@codesourcery.com> 14875 14876 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set 14877 RTL_EXPR_HAS_NO_SCOPE after all. 14878 148792000-03-05 Mark Mitchell <mark@codesourcery.com> 14880 14881 * expr.c (cplus_expand_expr, case STMT_EXPR): Use 14882 expand_start_stmt_expr and expand_end_stmt_expr directly. Set 14883 RTL_EXPR_HAS_NO_SCOPE. 14884 14885 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little 14886 later. 14887 14888 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P. 14889 148902000-03-05 Nathan Sidwell <nathan@codesourcery.com> 14891 14892 * call.c (convert_like): Macrofy. 14893 (convert_like_with_context): New macro. 14894 (convert_like_real): Renamed from convert_like. Add calling 14895 context parameters, for diagnostics. Add recursive flag. Call 14896 dubious_conversion_warnings for outer conversion. 14897 (build_user_type_conversion): Use convert_like_with_context. 14898 (build_over_call): Likewise. Don't warn about dubious 14899 conversions here. Adjust convert_default_arg calls. 14900 (convert_default_arg): Add context parameters for diagnostics. 14901 Pass through to convert_like_with_context. 14902 * cp-tree.h (convert_default_arg): Add context parameters. 14903 (dubious_conversion_warnings): Prototype new function. 14904 * typeck.c (convert_arguments): Adjust convert_default_arg call. 14905 (dubious_conversion_warnings): New function, broken 14906 out of convert_for_assignment. 14907 (convert_for_assignment): Adjust. 14908 149092000-03-03 Jason Merrill <jason@casey.cygnus.com> 14910 14911 * decl2.c (key_method): Break out from... 14912 (import_export_vtable, import_export_class): ...here. 14913 14914 * decl.c (finish_function): Don't mess with flag_keep_inline_functions. 14915 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context. 14916 14917 * search.c (note_debug_info_needed, dfs_debug_mark, 14918 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme. 14919 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed. 14920 149212000-03-03 Nathan Sidwell <nathan@codesourcery.com> 14922 14923 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix 14924 typos. 14925 149262000-03-02 Mark Mitchell <mark@codesourcery.com> 14927 14928 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ... 14929 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this. 14930 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro. 14931 (lang_type): Split gets_new into has_new and has_array_new. 14932 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 14933 (TYPE_GETS_NEW): Split into ... 14934 (TYPE_HAS_NEW_OPERATOR): ... this, and ... 14935 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this. 14936 (DECL_ARRAY_DELETE_OPERATOR_P): New macro 14937 (build_op_new_call): Don't declare. 14938 (build_new_1): Likewise. 14939 * call.c (build_op_new_call): Remove. 14940 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR 14941 instead of TYPE_NEEDS_DESTRUCTOR. 14942 (finish_struct_bits): Likewise. 14943 (add_implicitly_declared_members): Likewise. 14944 (check_field_decl): Likewise. 14945 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it 14946 correctly under the new ABI. 14947 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR 14948 instead of TYPE_NEEDS_DESTRUCTOR. 14949 (initialize_local_var): Likewise. 14950 (destroy_local_var): Likewise. 14951 (cp_finish_decl): Likewise. 14952 (register_dtor_fn): Likewise. 14953 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and 14954 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set 14955 TYPE_VEC_DELETE_TAKES_SIZE here. 14956 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and 14957 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. 14958 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 14959 (finish_destructor_body): Likewise. 14960 (maybe_build_cleanup_1): Likewise. 14961 * decl2.c (do_static_destruction): Likewise. 14962 * init.c (build_new_1): Make it static. 14963 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 14964 (expand_cleanup_for_base): Likewise. 14965 (get_cookie_size): New function. 14966 (build_new_1): Handle array-new cookies correctly under the new 14967 ABI. 14968 (build_vec_delete_1): Likewise. 14969 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 14970 (build_delete): Likewise. 14971 (build_vec_delete): Handle array-new cookies correctly under the new 14972 ABI. 14973 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 14974 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and 14975 TYPE_HAS_ARRAY_NEW_OPERATOR. 14976 * ptree.c (print_lang_type): Check them. 14977 * search.c (context_for_name_lookup): Fix typo in comment. 14978 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR. 14979 * tree.c (break_out_cleanups): Likewise. 14980 (build_cplus_array_test_1): Likewise. 14981 (cp_build_qualified_type_real): Likewise. 14982 * typeck.c (complete_type): Likewise. 14983 14984 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of 14985 the command-line, not the end. 14986 149872000-03-01 Jason Merrill <jason@casey.cygnus.com> 14988 14989 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG. 14990 149912000-03-02 Tom Tromey <tromey@cygnus.com> 14992 14993 * cp-tree.h (build_java_class_ref): Declare. 14994 * init.c (build_java_class_ref): No longer static. 14995 * except.c (expand_throw): Generate a Java-style `throw' if the 14996 thrown object is a "Java" object. 14997 (initialize_handler_parm): Generate a Java-style lookup of 14998 exception info if the caught object is a "Java" object. 14999 (catch_language, catch_language_init): New globals. 15000 (decl_is_java_type): New function. 15001 (expand_start_catch_block): Don't call push_eh_info() or 15002 push_eh_cleanup() when handling a Java-style "catch". Pass Java 15003 class reference to build_catch_block. 15004 15005Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 15006 15007 * typeck.c (comptypes): Treat sizetype like its language equivalent. 15008 150092000-03-01 Bernd Schmidt <bernds@cygnus.co.uk> 15010 15011 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize 15012 to merge reference/pointer code and fix incorrect warnings. 15013 150142000-02-29 Jason Merrill <jason@casey.cygnus.com> 15015 15016 * search.c (protected_accessible_p): Use context_for_name_lookup. 15017 15018 * init.c (construct_virtual_bases): Fix thinko. 15019 * typeck.c (expand_ptrmemfunc_cst): Fix thinko. 15020 150212000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de> 15022 15023 * decl.c (current_function_decl): Move to toplev.c. 15024 150252000-02-29 Nathan Sidwell <nathan@codesourcery.com> 15026 15027 * pt.c (fn_type_unification): Unify return type, whenever 15028 provided. 15029 (get_bindings_real): Only pass return type when necessary. 15030 Remove explicit return type check. 15031 * class.c (resolve_address_of_overloaded_function): Pass desired 15032 return type to fn_type_unification. 15033 15034Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 15035 15036 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear 15037 DECL_FIELD_SIZE. 15038 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not 15039 DECL_FIELD_SIZE. 15040 * rtti.c (expand_class_desc): Likewise. 15041 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name. 15042 (THUNK_VCALL_OFFSET): Likewise. 15043 (THUNK_DELTA): Reflect changes in ../tree.h. 15044 150452000-02-28 Jason Merrill <jason@casey.cygnus.com> 15046 15047 * search.c (protected_accessible_p): Also allow the access if 15048 the member is public in DERIVED. Lose TYPE parm. 15049 (friend_accessible_p): Lose TYPE parm. 15050 (accessible_p): Adjust. 15051 15052Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 15053 15054 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop 15055 on things that are not sizes; ssize_binop deleted. 15056 Call size_diffop when appropriate. 15057 (dfs_build_vcall_offset_vtbl_entries): Likewise. 15058 (build_primary_vtable, build_secondary_vtable): Likewise. 15059 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise. 15060 Variable I is HOST_WIDE_INT. 15061 (get_vfield_offset): Pass proper types to size_binop. 15062 (size_extra_vtbl_entries, layout_virtual_bases): Likewise. 15063 (finish_struct_1): Likewise. 15064 (skip_rtti_stuff): Arg N is now pointer to signed. 15065 (layout_class_type): Use size_zero_node. 15066 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed. 15067 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop. 15068 * decl.c (complete_arry_type): Pass proper types to size_binop. 15069 (xref_basetypes): BINFO_OFFSET is sizetype. 15070 * error.c (dump_expr): Don't use size_binop non-sizes. 15071 * expr.c (cplus_expand_constant): Pass proper types to size_binop. 15072 * init.c (construct_virtual_bases): Fix type error. 15073 (build_vec_delete_1): Pass proper type to size_binop and don't 15074 fold result. 15075 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype. 15076 * rtti.c (get_base_offset): Pass proper type to size_binop. 15077 * search.c (dfs_find_vbases): Fix type error. 15078 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed. 15079 (dfs_get_vbase_types): BINFO_OFFSET is sizetype. 15080 * tree.c (debug_binfo): Variable N is signed. 15081 Use HOST_WIDE_INT_PRINT_DEC. 15082 * typeck.c (comptypes): sizetype is same as equivalent integer type. 15083 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT, 15084 size_one_node and size_zero_node. 15085 (c_alignof): Use size_one_node. 15086 (build_component_addr): Pass proper types to size_binop. 15087 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes. 15088 150892000-02-26 Jason Merrill <jason@casey.cygnus.com> 15090 15091 Implement class scope using-declarations for functions. 15092 * class.c (handle_using_decl): Call add_method for used functions. 15093 Use IDENTIFIER_CLASS_VALUE to check for conflicts. 15094 (add_method): Used functions are hidden by local functions. 15095 (check_bases_and_members): Handle using-decls before finalizing 15096 CLASSTYPE_METHOD_VEC. 15097 * call.c (add_function_candidate): Add ctype parm; if nonzero, 15098 override the type of 'this' accordingly. 15099 (add_template_candidate, add_template_candidate_real): Add ctype parm. 15100 (convert_class_to_reference, build_user_type_conversion_1, 15101 build_new_function_call, build_object_call, build_new_op, 15102 build_new_method_call): Pass ctype parm. 15103 15104 * search.c (lookup_member): Put rval_binfo, not basetype_path, in 15105 the baselink. 15106 * call.c (convert_class_to_reference, build_user_type_conversion_1, 15107 build_new_function_call, build_object_call, build_new_op, 15108 build_new_method_call, build_op_delete_call): Don't get basetype_path 15109 from a baselink. 15110 * typeck.c (build_component_ref): Likewise. 15111 * init.c (build_offset_ref): Likewise. 15112 (resolve_offset_ref): Don't call enforce_access. 15113 Call build_scoped_ref. 15114 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it 15115 would cause an error or if -pedantic. 15116 * class.c (alter_access): Lose binfo parm. 15117 151182000-02-26 Mark Mitchell <mark@codesourcery.com> 15119 15120 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into 15121 types. 15122 151232000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at> 15124 15125 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info 15126 pseudo_type_info creation into the std namespace 15127 151282000-02-26 Mark Mitchell <mark@codesourcery.com> 15129 15130 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF. 15131 (import_export_class): Remove declaration. 15132 * decl2.c (import_export_class): Make it static. 15133 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR, 15134 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, 15135 EXPR_WITH_FILE_LOCATION. 15136 * lex.c (check_newline): Tweak filename/lineno setting. 15137 * semantics.c (begin_while_stmt): Fix typo in comment. 15138 15139Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 15140 15141 * lang-options.h (-fmessage-length=): Add missing option. 15142 15143 * Make-lang.in (CXX_SRCS): Add .h files and sort list. 15144 151452000-02-26 Zack Weinberg <zack@wolery.cumb.org> 15146 15147 * Make-lang.in: Delete refs to LIBGCC2_DEPS. 15148 15149Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com> 15150 15151 * optimize.c (expand_call_inline): Emit the return label before 15152 evaluating the return value. 15153 151542000-02-24 Mark Mitchell <mark@codesourcery.com> 15155 15156 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather 15157 than duplicating functionality here. 15158 * optimize.c: Include input.h. 15159 (expand_call_inline): Use push_srcloc and pop_srcloc. 15160 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note. 15161 * parse.c: Regenerated. 15162 * Makefile.in (lex.o): Depend on input.h. 15163 (optimize.o): Likewise. 15164 151652000-02-24 Nathan Sidwell <nathan@codesourcery.com> 15166 15167 * decl.c (grokdeclarator): Diagnose qualifiers on non-member 15168 function type, rather than ICE. 15169 151702000-02-23 Jason Merrill <jason@casey.cygnus.com> 15171 15172 * decl.c (grokdeclarator): Call decl_type_access_control. 15173 * parse.y (parse_end_decl): Don't call decl_type_access_control if 15174 decl is null. 15175 151762000-02-23 Nathan Sidwell <nathan@codesourcery.com> 15177 15178 * decl.c (decls_match): Remove obsolete static member nadgering. 15179 151802000-02-21 Martin v. L�wis <loewis@informatik.hu-berlin.de> 15181 15182 * decl.c (grokdeclarator): Change ANSI to ISO. 15183 * lex.c (consume_string, readescape, do_identifier): Likewise. 15184 (parse_float, real_yylex): Likewise. 15185 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise. 15186 (unary_expr, new_initializer, cast_expr, primary, primary_no_id, 15187 new_type_id, maybe_label_decls, simple_stmt, 15188 for.init.statement): Likewise. 15189 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise. 15190 * semantics.c (finish_named_return_value): Likewise. 15191 * parse.c: Regenerate. 15192 151932000-02-21 Mark Mitchell <mark@codesourcery.com> 15194 15195 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro. 15196 (CPTI_CLASS_STAR_TYPE): Remove. 15197 (vtable_index_type): Likewise. 15198 (class_star_type_node): Remove. 15199 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI. 15200 (build_binary_op_nodefault): Remove. 15201 * call.c (build_new_op): Use build_binary_op instead of 15202 build_binary_op_nodefault. 15203 * decl.c (init_decl_processing): Remove class_star_type_node 15204 initialization. Make delta_type_node ptrdiff_type_node under the 15205 new ABI. Initialize vtable_index_type. 15206 (build_ptrmemfunc_type): Build different structures for the new 15207 ABI. 15208 (build_enumerator): Use build_binary_op instead of 15209 build_binary_op_nodefault. 15210 * method.c (build_overload_value): Mangle pointers-to-members 15211 appropriately under the new ABI. 15212 * typeck.c (build_array_ref): Use build_binary_op instead of 15213 build_binary_op_nodefault. 15214 (get_member_function_from_ptrfunc): Adjust for the new ABI. 15215 (build_binary_op_nodefault): Rename to ... 15216 (build_binary_op): ... this. Remove old version. Adjust for 15217 pointer-to-member comparisons under the new ABI. 15218 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI. 15219 (build_ptrmemfunc): Adjust for the new ABI. 15220 (expand_ptrmemfunc_cst): Likewise. 15221 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI. 15222 (pfn_from_ptrmemfunc): Adjust for the new ABI. 15223 152242000-02-21 Gabriel Dos Reis <gdr@codesourcery.com> 15225 15226 * call.c (build_object_call): Compress consecutive calls to 15227 cp_error. 15228 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'. 15229 (build_op_delete_call): Adjust message formatting. 15230 15231 * class.c (check_bases): Compress consecutive calls to 15232 cp_pedwarn. 15233 (finish_struct_anon): Say 'ISO C++'. 15234 15235 * decl.c (start_decl): Same here. 15236 (grok_reference_init): Likewise. 15237 (grokfndecl): Correct message formatting. 15238 (grokfndecl): Improve diagnostic. 15239 (check_static_variable_definition): Likewise. Say 'ISO C++' 15240 (compute_array_index_type): Say 'ISO C++' 15241 (create_array_type_for_decl): Compress consecutive calls to 15242 cp_error. 15243 (grokdeclarator): Say 'ISO C++' 15244 (grok_op_properties): Likewise. 15245 15246 * decl2.c (delete_sanity): Clairify diagnostic. 15247 (check_member_template): Same here. 15248 (grok_function_init): Use consistent terminology. 15249 15250 * expr.c (do_case): Say 'ISO C++' 15251 15252 * friend.c (do_friend): Compress consecutive calls to warning. 15253 152542000-02-20 Mark Mitchell <mark@codesourcery.com> 15255 15256 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro. 15257 * class.c (build_secondary_vtable): Reorganize. Don't create a 15258 new vtable under the new ABI. 15259 (layout_vtable_decl): Don't add num_extra_vtbl_entries when 15260 computing the size. 15261 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return 15262 the initializing elements. 15263 (initialize_vtable): New function. 15264 (dfs_finish_vtbls): Use it. 15265 (dfs_accumulate_vtbl_inits): New function. 15266 (finish_vtbls): Merge primary and secondary vtables under the new 15267 ABI. 15268 (finish_struct_1): Remove redundant call to layout_vtable_decl. 15269 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that 15270 aren't VAR_DECLs. 15271 15272 * class.c (build_vtable): New function, split out from ... 15273 (get_vtable_decl): ... here, and ... 15274 (build_secondary_vtable): ... here. 15275 15276 * pt.c (tsubst_decl): Fix formatting. 15277 15278Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> 15279 15280 * class.c (build_primary_vtable, layout_vtable_decl): Likewise. 15281 (avoid_overlap, build_base_field): Likewise. 15282 (build_base_field, build_base_fields, is_empty_class): 15283 Test DECL_SIZE with integer_zero. 15284 (layout_class_type): Set CLASSTYPE_SIZE_UNIT. 15285 * cp-tree.h (struct lang_type): New field size_unit. 15286 (CLASSTYPE_SIZE_UNIT): New macro. 15287 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT. 15288 (cp_finish_decl): Delete -Wlarger-than processing. 15289 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT. 15290 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT. 15291 * tree.c (make_binfo): binfo vector is one entry longer. 15292 (walk_tree): Walk DECL_SIZE_UNIT. 15293 152942000-02-19 Mark Mitchell <mark@codesourcery.com> 15295 15296 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in 15297 comment. 15298 (build_vtable_entry): Don't assume all vtable entries are 15299 functions. 15300 (build_vtbl_initializer): Adjust accordingly. 15301 (get_vtable_decl): Fix formatting. 15302 153032000-02-18 Jason Merrill <jason@casey.cygnus.com> 15304 15305 * semantics.c (deferred_type_access_control): Walk the entire 15306 type_lookups list. 15307 (save_type_access_control): Rename from 15308 initial_deferred_type_access_control. Just remember the value. 15309 (decl_type_access_control): New fn. 15310 (begin_function_definition): Use deferred_type_access_control, after 15311 we've started the function. Set type_lookups to error_mark_node. 15312 * parse.y (frob_specs, fn.def1): Adjust. 15313 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns. 15314 (parse_end_decl, parse_bitfield0, parse_method): New fns. 15315 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them. 15316 (after_type_component_declarator0): Likewise. 15317 (after_type_component_declarator): Likewise. 15318 (notype_component_declarator): Likewise. 15319 * cp-tree.h: Adjust. 15320 15321 * decl.c (redeclaration_error_message): Allow redeclaration of 15322 namespace-scope decls. 15323 153242000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de> 15325 15326 * typeck2.c (my_friendly_abort): Use GCCBUGURL. 15327 153282000-02-17 Mark Mitchell <mark@codesourcery.com> 15329 15330 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT. 15331 * decl2.c (grokclassfn): Likewise. 15332 15333 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS. 15334 15335 * decl2.c (lang_decode_option): Don't set default message length 15336 here. 15337 * lex.c (lang_init_options): Set it here. 15338 153392000-02-16 Mark Mitchell <mark@codesourcery.com> 15340 15341 Make DECL_CONTEXT mean the class in which a member function was 15342 declared, even for a virtual function. 15343 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust. 15344 (DECL_FRIEND_CONTEXT): New macro. 15345 (DECL_REAL_CONTEXT): Remove. 15346 (SET_DECL_FRIEND_CONTEXT): Likewise. 15347 (DECL_VIRTUAL_CONTEXT): Adjust. 15348 (DECL_CLASS_SCOPE_P): Use TYPE_P. 15349 (add_friends): Remove. 15350 (hack_decl_function_context): Likewise. 15351 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with 15352 CP_DECL_CONTEXT. 15353 (build_over_call): Fix indentation. Use DECL_CONTEXT 15354 instead of DECL_CLASS_CONTEXT. 15355 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise. 15356 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT. 15357 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 15358 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT. 15359 (build_base_field): Likewise. 15360 (finish_struct_1): Likewise. 15361 (build_self_reference): Likewise. 15362 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not 15363 DECL_REAL_CONTEXT. 15364 (pushtag): Use decl_function_context, not 15365 hack_decl_function_context. 15366 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. 15367 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT. 15368 (pushdecl): Remove bogus code. 15369 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT. 15370 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. 15371 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 15372 Use decl_function_context, nothack_decl_function_context. 15373 (grokvardecl): Don't set DECL_CLASS_CONTEXT. 15374 (grokdeclarator): Likewise. Use decl_function_context, not 15375 hack_decl_function_context. 15376 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT. 15377 (start_function): Use DECL_FRIEND_CONTEXT, not 15378 DECL_CLASS_CONTEXT. Use decl_function_context, not 15379 hack_decl_function_context. 15380 (finish_function): Use decl_function_context, not 15381 hack_decl_function_context. 15382 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not 15383 DECL_CLASS_CONTEXT. 15384 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT. 15385 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT. 15386 (grokfield): Likewise. 15387 (finish_builtin_type): Likewise. 15388 (finish_vtable_vardec): Use decl_function_context, not 15389 hack_decl_function_context. 15390 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 15391 (start_static_initialization_or_destruction): Likewise. 15392 (finish_static_initialization_or_destruction): Likewise. 15393 (mark_used): Adjust logic for deciding when to synthesize methods. 15394 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not 15395 DECL_REAL_CONTEXT. 15396 * error.c (dump_function_decl): Use DECL_CONTEXT, not 15397 DECL_CLASS_CONTEXT. 15398 * friend.c (is_friend): Likewise. 15399 (add_friends): Remove. 15400 (do_friend): Use SET_DECL_FRIEND_CONTEXT. 15401 * lex.c (begin_definition_of_inclass_inline): Use 15402 decl_function_context, not hack_decl_function_context. 15403 (process_next_inline): Likewise. 15404 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT. 15405 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not 15406 DECL_CLASSS_CONTEXT. 15407 (hack_identifier): Likewise. 15408 (synthesize_method): Use decl_function_context, not 15409 hack_decl_function_context. 15410 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not 15411 DECL_REAL_CONTEXT. 15412 (is_member_template): Use decl_function_context, not 15413 hack_decl_function_context. Use DECL_CONTEXT, not 15414 DECL_CLASS_CONTEXT. 15415 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not 15416 DECL_CLASS_CONTEXT. 15417 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not 15418 DECL_REAL_CONTEXT. 15419 (push_template_decl_real): Likewise. 15420 (instantiate_class_template): Don't call add_friends. 15421 (tsubst_default_argument): Use DECL_CONTEXT, not 15422 DECL_REAL_CONTEXT. 15423 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT. 15424 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 15425 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not 15426 DECL_CLASS_CONTEXT. 15427 * repo.c (repo_inline_used): Likewise. 15428 * search.c (current_scope): Adjust for new _CONTEXT macros. 15429 (context_for_name_lookup): Use CP_DECL_CONTEXT, not 15430 DECL_REAL_CONTEXT. 15431 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT. 15432 (lookup_fnfields_here):Likewise. 15433 (check_final_overrider): Likewise. 15434 (init_vbase_pointers): Likewise. 15435 (virtual_context): Likewise. 15436 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT. 15437 (expand_body): Use decl_function_context, not 15438 hack_decl_function_context. 15439 * tree.c (hack_decl_function_context): Remove. 15440 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not 15441 DECL_CLASS_CONTEXT. 15442 * typeck2.c (error_not_base_type): Likewise. 15443 154442000-02-15 Jason Merrill <jason@casey.cygnus.com> 15445 15446 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE. 15447 154482000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 15449 15450 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h. 15451 154522000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk> 15453 15454 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec. 15455 154562000-01-16 Gabriel Dos Reis <gdr@codesourcery.com> 15457 15458 * decl2.c (lang_decode_option): Enable automatic line wrapping. 15459 154602000-02-13 Jason Merrill <jason@casey.cygnus.com> 15461 15462 * parse.y (frob_specs): Split out... 15463 (parse_decl): From here. 15464 (fn.def2): Call initial_deferred_type_access_control. 15465 (after_type_component_declarator0): Call frob_specs. 15466 (notype_component_declarator0): Likewise. 15467 * search.c (friend_accessible_p): Nested classes are friends of their 15468 enclosing classes. 15469 154702000-02-10 Mark Mitchell <mark@codesourcery.com> 15471 15472 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be 15473 used to create an implicit temporary. 15474 15475 * class.c (dfs_modify_vtables): Tweak calculation of functions to 15476 override. 15477 154782000-02-08 Nathan Sidwell <nathan@acm.org> 15479 15480 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to 15481 strip array element qualifiers too. 15482 154832000-02-07 Mark Mitchell <mark@codesourcery.com> 15484 15485 * decl.c (store_parm_decls): Don't build cleanups for parameters 15486 while processing_template_decl. 15487 154882000-02-07 Jason Merrill <jason@casey.cygnus.com> 15489 15490 * cp-tree.h (struct saved_scope): Add incomplete field. 15491 (namespace_scope_incomplete): New macro. 15492 * decl.c (pushdecl): Use it. 15493 (hack_incomplete_structures): Use it. See through artificial 15494 binding levels. 15495 (mark_saved_scope): Mark it. 15496 15497 Implement access control for nested types. 15498 * search.c (type_access_control): New fn. 15499 (accessible_p): Now we do perform access control for types. 15500 * semantics.c (deferred_type_access_control): New fn. 15501 (initial_deferred_type_access_control): New fn. 15502 (begin_function_definition): Call it. Add lookups parm. 15503 * decl.c (struct binding_level): Add this_class field. 15504 (pushlevel_class): Set it. 15505 (mark_binding_level): Mark it. 15506 (lookup_name_real): Use it. Call type_access_control. 15507 (mark_saved_scope): Mark lookups field. 15508 * cp-tree.h (flagged_type_tree): Add lookups field. 15509 (struct saved_scope): Add lookups field. 15510 (type_lookups): New macro. 15511 * parse.y (declmods): Now <ftype>. 15512 (parse_decl): Add lookups parm. Call 15513 initial_deferred_type_access_control. 15514 (lang_extdef): Clear type_lookups. 15515 (typed_declspecs, declmods, typespec): Set lookups field. 15516 (initdcl): Call deferred_type_access_control. 15517 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0, 15518 component_decl_1, named_parm): Adjust. 15519 * friend.c (is_friend): Nested classes are friends of their 15520 enclosing classes. 15521 15522 * class.c (currently_open_derived_class): New fn. 15523 * method.c (hack_identifier): Use it. 15524 15525 * lex.c (do_identifier): Remove obsolete code. 15526 15527 * parse.y (typed_typespecs): Propagate new_type_flag properly. 15528 155292000-02-05 Zack Weinberg <zack@wolery.cumb.org> 15530 15531 * tinfo.h: Remove apostrophes from C++ comment (xgettext 15532 thinks this file is plain C). 15533 155342000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 15535 15536 * Makefile.in (call.o): Depend on $(EXPR_H). 15537 15538 * call.c: Include "expr.h". 15539 15540 * class.c (dump_class_hierarchy): Add prototype. 15541 15542 * search.c (dfs_get_pure_virtuals): Likewise. 15543 155442000-02-1 Ulrich Drepper <drepper@redhat.com> 15545 15546 * parse.y (simple_stmt): Allow :: token in asm parameter list. 15547 * parse.c: Rebuilt. 15548 15549Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com> 15550 15551 * class.c (build_vtbl_or_vbase_field): New parameter fcontext. 15552 Store it in DECL_FCONTEXT. 15553 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers. 15554 155552000-01-31 Jason Merrill <jason@casey.cygnus.com> 15556 15557 * tinfo.h (old abi): #include "tconfig.h". 15558 * tinfo.cc (convert_to_base): Move into old abi section. 15559 155602000-01-31 Mark Mitchell <mark@codesourcery.com> 15561 15562 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation. 15563 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO. 15564 (BINFO_PRIMARY_BINFO): New macro. 15565 (BF_DELTA): Rename to ... 15566 (BV_DELTA): ... this. 15567 (BF_VCALL_INDEX): Rename to ... 15568 (BV_VCALL_INDEX): ... this. 15569 (BF_FN): Rename to ... 15570 (BV_FN): ... this. 15571 * class.c (build_vbase_path): Adjust for changes to reverse_path. 15572 (set_rtti_entry): Rename BF_ macros to BV_ variants. 15573 (modify_vtable_entry): Simplify. 15574 (add_virtual_function): Rename BF_ macros to BV_ variants. 15575 (build_vtable_initializer): Likewise. 15576 (get_class_offset_1): Remove. 15577 (dfs_get_class_offset): Likewise. 15578 (get_class_offset): Likewise. 15579 (dfs_find_final_overrider): New function. 15580 (find_final_overrider): Likewise. 15581 (modify_one_vtable): Remove. 15582 (dfs_find_base): New function. 15583 (dfs_modify_vtables): Fold modify_one_vtable in here. Use 15584 find_final_overrider. 15585 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new 15586 virtuals. 15587 (dfs_fixup_vtable_deltas): Remove. 15588 (override_one_vtable): Remove. 15589 (merge_overrides): Likewise. 15590 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for 15591 unreal chilren of virtual bases. 15592 (finish_struct_1): Don't use merge_overrides. Don't use 15593 dfs_fixup_vtable_deltas. 15594 * tree.c (reverse_path): Return a TREE_LIST, not a chain of 15595 BINFOs. 15596 155972000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl> 15598 Jason Merrill <jason@yorick.cygnus.com> 15599 15600 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT. 15601 156022000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at> 15603 15604 * exception.cc (__throw_bad_typeid): Add missing std::. 15605 156062000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 15607 15608 * cp-tree.h (make_thunk): PROTO -> PARAMS. 15609 156102000-01-31 Nathan Sidwell <sidwell@codesourcery.com> 15611 15612 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi. 15613 15614 Runtime support for new-abi rtti. 15615 * inc/typeinfo (type_info::operator!=): Define in class. 15616 (type_info::before, type_info::name, type_info::operator==, 15617 type_info::operator!=): Define new ABI implementations. 15618 (type_info::is_pointer_p, type_info::is_function_p): Declare 15619 new virtual functions. 15620 (type_info::do_catch, type_info::do_upcast): Likewise. 15621 15622 * tinfo.h (__base_class_info): Define new class. 15623 (__class_type_info): Likewise. 15624 (__si_class_type_info): Likewise. 15625 (__vmi_class_type_info): Likewise. 15626 (__dynamic_cast): Prototype. 15627 15628 * tinfo.cc: Conditionalize old and new rtti mechanisms. 15629 (type_info::is_pointer_p): Define new function. 15630 (type_info::is_function_p): Likewise. 15631 (type_info::do_catch): Likewise. 15632 (type_info::do_upcast): Likewise. 15633 (vtable_prefix): New structure for vtable access. 15634 (adjust_pointer): Define new template function. 15635 (contained_p, public_p, virtual_p, contained_public_p, 15636 contained_nonpublic_p, contained_nonvirtual_p): Define new 15637 functions. 15638 (nonvirtual_base_type): New local variable. 15639 (__class_type_info::~__class_type_info): Define. 15640 (__si_class_type_info::~__si_class_type_info): Likewise. 15641 (__vmi_class_type_info::~__vmi_class_type_info): Likewise. 15642 (__class_type_info::do_catch): Define new function. 15643 (__class_type_info::do_upcast): Likewise. 15644 (__class_type_info::find_public_src): Likewise. 15645 (__class_type_info::do_find_public_src): Likewise. 15646 (__si_class_type_info::do_find_public_src): Likewise. 15647 (__vmi_class_type_info::do_find_public_src): Likewise. 15648 (__class_type_info::do_dyncast): Likewise. 15649 (__si_class_type_info::do_dyncast): Likewise. 15650 (__vmi_class_type_info::do_dyncast): Likewise. 15651 (__class_type_info::do_upcast): Likewise. 15652 (__si_class_type_info::do_upcast): Likewise. 15653 (__vmi_class_type_info::do_upcast): Likewise. 15654 (__dynamic_cast): Likewise. 15655 15656 * tinfo2.cc (__fundamental_type_info): Define new class. 15657 (__pointer_type_info): Likewise. 15658 (__reference_type_info): Likewise. 15659 (__array_type_info): Likewise. 15660 (__function_type_info): Likewise. 15661 (__enum_type_info): Likewise. 15662 (__ptr_to_member_type_info): Likewise. 15663 (__fundamental_type_info::~__fundamental_type_info): Define. 15664 (__pointer_type_info::~__pointer_type_info): Likewise. 15665 (__reference_type_info::~__reference_type_info): Likewise. 15666 (__array_type_info::~__array_type_info): Likewise. 15667 (__function_type_info::~__function_type_info): Likewise. 15668 (__enum_type_info::~__enum_type_info): Likewise. 15669 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise. 15670 (__pointer_type_info::do_catch): Define new function. 15671 (__ptr_to_member_type_info::do_catch): Define new function. 15672 15673 (__throw_type_match_rtti_2): Use new ABI interface, if enabled. 15674 (__is_pointer): Likewise. 15675 15676 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti. 15677 156782000-01-30 Mark Mitchell <mark@codesourcery.com> 15679 15680 * cp/class.c (build_vtable): Rename to build_primary_vtable. 15681 (prepare_fresh_vtable): Rename to build_secondary_vtable. 15682 (make_new_vtable): New function. 15683 (modify_vtable_entry): Handle generation of new vtables correctly. 15684 (modify_one_vtable): Remove unused parameter. 15685 (dfs_fixup_vtable_deltas): Likewise. 15686 (override_one_vtable): Use build_secondary_vtable. 15687 (finish_struct_1): Use build_primary_vtable and 15688 build_secondary_vtable. 15689 156902000-01-28 Ulrich Drepper <drepper@redhat.com> 15691 15692 * cp/decl.c: Adjust variable names, comments, help strings. 15693 156942000-01-29 Nathan Sidwell <nathan@acm.org> 15695 15696 * new2.cc (operator delete[]): Use operator delete, don't assume 15697 implementation. 15698 156992000-01-29 Nathan Sidwell <sidwell@codesourcery.com> 15700 15701 * class.c (build_vtbl_initializer): Add argument to 15702 build_vtable_entry call. 15703 157042000-01-27 Mark Mitchell <mark@codesourcery.com> 15705 15706 * cp-tree.def (THUNK_DECL): Discuss vcall indices. 15707 * cp-tree.h (BINFO_VIRTUALS): Update documentation. 15708 (BF_DELTA): New macro. 15709 (BF_VCALL_INDEX): Likewise. 15710 (BF_FN): Likewise. 15711 (THUNK_VCALL_OFFSET): Likewise. 15712 (make_thunk): Change prototype. 15713 * class.c (build_vtable_entry): Integrate 15714 build_vtable_entry_for_fn. Handle vcall indices. 15715 (build_vtable_entry_for_fn): Remove. 15716 (set_rtti_entry): Handle vcall indices. Use BF_DELTA, 15717 BF_VCALL_INDEX, BF_FN. 15718 (modify_vtable_entry): Integrate common code from 15719 modify_one_vtable and dfs_fixup_vtable_deltas. 15720 (add_virtual_function): Set BF_VCALL_INDEX. 15721 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX, 15722 and BF_FN. 15723 (modify_one_vtable): Simplify. 15724 (dfs_fixup_vtable_deltas): Likewise. 15725 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 15726 * method.c (make_thunk): Handle vcall indices. 15727 157282000-01-28 Nathan Sidwell <sidwell@codesourcery.com> 15729 15730 Compiler side new abi rtti (not enabled). 15731 * cp-tree.h (new_abi_rtti_p): New macro. 15732 (emit_support_tinfos): Prototype new function. 15733 (tinfo_decl_p): Likewise. 15734 (emit_tinfo_decl): Likwise. 15735 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor 15736 macros. 15737 (doing_runtime): New local static. 15738 (init_rtti_processing): Add new-abi initializer. 15739 (get_tinfo_decl): Add new-abi logic. 15740 (tinfo_from_decl): Likewise. 15741 (build_dynamic_cast_1): Likewise. 15742 (qualifier_flags): New static function. 15743 (tinfo_base_init): Likewise. 15744 (generic_initializer): Likewise. 15745 (ptr_ref_initializer): Likewise. 15746 (ptmd_initializer): Likewise. 15747 (class_hint_flags): Likewise. 15748 (class_initializer): Likewise. 15749 (synthesize_tinfo_var): Likewise. 15750 (create_real_tinfo_var): Likewise. 15751 (create_pseudo_type_info): Likewise. 15752 (get_vmi_pseudo_type_info): Likewise. 15753 (create_tinfo_types): Likewise. 15754 (emit_support_tinfos): New global function. 15755 (tinfo_decl_p): New global predicate. 15756 (emit_tinfo_decl): New global function. 15757 * class.c (set_rtti_entry): Generalize for old and new rtti. 15758 (build_vtbl_initializer): Likewise. 15759 * decl2.c (finish_file): Likewise. 15760 15761Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com> 15762 15763 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t) 15764 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))). 15765 15766Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com> 15767 15768 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit 15769 for scopes. 15770 157712000-01-26 Jason Merrill <jason@casey.cygnus.com> 15772 15773 * pt.c (unify): Use fold, not maybe_fold_nontype_arg. 15774 15775Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk> 15776 15777 * optimize.c (calls_setjmp_r): Supply new argument 15778 to special_function_p. 15779 157802000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 15781 15782 * call.c: PROTO -> PARAMS. 15783 * class.c: Likewise. 15784 * cp-tree.h: Likewise. 15785 * cvt.c: Likewise. 15786 * decl.c: Likewise. 15787 * decl.h: Likewise. 15788 * decl2.c: Likewise. 15789 * dump.c: Likewise. 15790 * errfn.c: Likewise. 15791 * error.c: Likewise. 15792 * except.c: Likewise. 15793 * expr.c: Likewise. 15794 * init.c: Likewise. 15795 * input.c: Likewise. 15796 * lex.c: Likewise. 15797 * lex.h: Likewise. 15798 * method.c: Likewise. 15799 * optimize.c: Likewise. 15800 * parse.y: Likewise. 15801 * pt.c: Likewise. 15802 * repo.c: Likewise. 15803 * rtti.c: Likewise. 15804 * search.c: Likewise. 15805 * semantics.c: Likewise. 15806 * spew.c: Likewise. 15807 * tree.c: Likewise. 15808 * typeck.c: Likewise. 15809 * typeck2.c: Likewise. 15810 * xref.c: Likewise. 15811 158122000-01-25 Richard Henderson <rth@cygnus.com> 15813 15814 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR. 15815 158162000-01-25 Mark Mitchell <mark@codesourcery.com> 15817 15818 * cp-tree.h (vcall_offset_in_vtable_p): New macro. 15819 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment. 15820 (struct vcall_offset_data_s): New type. 15821 (dfs_vcall_offset_queue_p): New function. 15822 (dfs_build_vcall_offset_vtbl_entries): Likewise. 15823 (build_vcall_offset_vtbl_entries): Likewise. 15824 (layout_vtable_decl): Likewise. 15825 (num_vfun_entries): Likewise. 15826 (num_extra_vtbl_entries): Add the entries for vcall offsets. 15827 (build_vtbl_initializer): Likewise. 15828 (dfs_finish_vtabls): Use layout_vtable_decl. 15829 (modify_one_vtables): Always duplicate vtables under the new ABI. 15830 (finish_struct_1): Use layout_vtable_decl. 15831 158322000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 15833 15834 * decl.c (member_function_or_else): Change third arg from a format 15835 specifier to an `enum overload_flags'. Callers changed. 15836 158372000-01-25 Gabriel Dos Reis <gdr@codesourcery.com> 15838 15839 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof, 15840 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast, 15841 build_const_cast, get_delta_difference, check_return_expr): Avoid 15842 ANSI string concatenation usage. 15843 158442000-01-24 Mark Mitchell <mark@codesourcery.com> 15845 15846 * class.c (layout_class_type): Put the fields required to make a 15847 class non-empty at the end, not the beginning, of the TYPE_FIELDs 15848 list. 15849 158502000-01-24 Jason Merrill <jason@casey.cygnus.com> 15851 15852 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a 15853 template. 15854 15855 * decl2.c (mark_used): Do instantiate inlines that have been 15856 explicitly instantiated. 15857 158582000-01-24 Richard Henderson <rth@cygnus.com> 15859 15860 * call.c (build_over_call): Use expand_tree_builtin. 15861 * typeck.c (build_function_call_real): Likewise. 15862 (build_binary_op_nodefault): Handle unordered compares. 15863 158642000-01-24 Nathan Sidwell <sidwell@codesourcery.com> 15865 15866 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New 15867 cp_tree_index values. 15868 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node): 15869 New global node #defines for them. 15870 * rtti.c (call_void_fn): Replace with ... 15871 (build_runtime_decl): ... new static function. 15872 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl. 15873 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl. 15874 (build_dynamic_cast_1): Always produce correctly typed result. 15875 Explicitly produce type_info addresses. Use dynamic_cast_node. 15876 * exception.cc (__throw_bad_cast): Return `void *'. 15877 (__throw_bad_typeid): Return `const type_info &'. 15878 158792000-01-24 Nathan Sidwell <sidwell@codesourcery.com> 15880 15881 * cp-tree.h (get_vtable_decl): Prototype new function. 15882 * class.c (get_vtable_decl): New function. Broken out from ... 15883 (build_vtable): ... here. Use it. 15884 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created 15885 by get_vtable_decl. 15886 158872000-01-24 Nathan Sidwell <sidwell@codesourcery.com> 15888 15889 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE, 15890 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE, 15891 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations. 15892 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE, 15893 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE, 15894 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations. 15895 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ... 15896 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here. 15897 (CPTI_TINFO_VAR_ID): New enumeration. 15898 (__tp_desc_type_node, __access_mode_type_node, 15899 __bltn_desc_type_node, __user_desc_type_node, 15900 __class_desc_type_node, __ptr_desc_type_node, 15901 __attr_desc_type_node, __func_desc_type_node, 15902 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines. 15903 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node, 15904 ref_desc_type_node, ary_desc_type_node, func_desc_type_node, 15905 enum_desc_type_node, class_desc_type_node, 15906 si_class_desc_type_node, vmi_class_desc_type_node, 15907 ptmd_desc_type_node, base_desc_type_node): New #defines. 15908 (tinfo_fn_id, tinfo_fn_type): Rename to ... 15909 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust. 15910 (tinfo_var_id): New enumeration. 15911 (DECL_TINFO_FN_P): Augment comment. 15912 * decl.c (cp_global_trees): Adjust documentation. 15913 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id, 15914 tinfo_decl_type and tinfo_var_id. 15915 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type. 15916 (build_typeid): Remove unused variable. 15917 (get_tinfo_var): Use tinfo_var_id. 15918 (tinfo_name): New static function. 15919 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type. 15920 (tinfo_from_decl): Likewise. 15921 (get_base_offset): New static function, broken out of 15922 expand_class_desc. 15923 (expand_si_desc): Use tinfo_name. 15924 (expand_class_desc): Likewise. Lose local static variable. 15925 Use base_desc_type_node. Use get_base_offset. 15926 (expand_ptr_desc): Use tinfo_name. 15927 (expand_attr_desc): Likewise. 15928 (expand_generic_desc): Likewise. 15929 15930 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence. 15931 * tinfo.h (__GXX_ABI_VERSION): Test value and existence. 15932 159332000-01-23 Mark Mitchell <mark@codesourcery.com> 15934 15935 * cp-tree.h (__eprintf): Remove declaration. 15936 * tree.c (__eprintf): Remove definition. 15937 159382000-01-23 Zack Weinberg <zack@rabi.columbia.edu> 15939 Mark Mitchell <mark@codesourcery.com> 15940 15941 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N, 15942 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings. 15943 159442000-01-23 Brad Lucier <lucier@math.purdue.edu> 15945 15946 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly. 15947 159482000-01-23 Mark Mitchell <mark@codesourcery.com> 15949 15950 * cp-tree.h (register_dtor_fn): New function. 15951 * decl.c (destroy_local_static): Rename to ... 15952 (register_dtor_fn): ... this. Give it external linkage. 15953 (expand_static_init): Use it. 15954 * decl2.c (do_static_initialization): Likewise, if using 15955 __cxa_atexit. 15956 (do_static_destruction): Check that __cxa_atexit is not in use. 15957 (finish_file): Don't call do_static_destruction if using 15958 __cxa_atexit. 15959 15960 * typeck.c (convert_arguments): Restore two-message error 15961 reporting. 15962 159632000-01-20 Nathan Sidwell <sidwell@codesourcery.com> 15964 15965 Remap dynamic cast hint values to be consistent across ABIs. 15966 * search.c (dynamic_cast_base_recurse): Remap generated value. 15967 (get_dynamic_cast_base_type): Adjust documentation. 15968 * tinfo.h (__user_type_info::dyncast): Likewise. 15969 (__user_type_info::find_public_subobj): Remap BOFF meaning. 15970 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning. 15971 (__class_type_info::do_dyncast): Likewise. 15972 (__class_type_info::do_find_public_subobj): Likewise. 15973 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter. 15974 159752000-01-19 Gabriel Dos Reis <gdr@codesourcery.com> 15976 15977 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn. 15978 15979 * typeck2.c (incomplete_type_error): Restore previous 15980 cp_error and cp_error_at call sequence. 15981 159822000-01-20 Brad Lucier <lucier@math.purdue.edu> 15983 15984 * class.c (dump_class_hierarchy): Make format agree with argument; 15985 cast pointer to unsigned long and print with %lx. 15986 159872000-01-19 Gabriel Dos Reis <gdr@codesourcery.com> 15988 15989 * decl2.c (lang_decode_option): Set default line-wrap length to 72. 15990 15991 * typeck.c (composite_pointer_type, common_type, 15992 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref, 15993 build_function_call_real, convert_arguments, 15994 build_binary_op_nodefault, pointer_int_sum, pointer_diff, 15995 build_unary_op, mark_addressable, build_compound_expr, 15996 build_static_cast, build_reinterpret_cast, build_const_cast, 15997 build_c_cast, build_modify_expr, get_delta_difference, 15998 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 15999 'ISO C++'. Fusion consecutive calls to diagnostic message routines 16000 into a single one. 16001 * typeck2.c (readonly_error, abstract_virtuals_error, 16002 process_init_constructor, check_for_new_type): Likewise. 16003 160042000-01-19 Mark Mitchell <mark@codesourcery.com> 16005 16006 * tree.c (bot_manip): Set DECL_CONTEXT for newly created 16007 VAR_DECLs. 16008 160092000-01-18 Nathan Sidwell <sidwell@codesourcery.com> 16010 16011 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype. 16012 (build_x_typeid): Likewise. 16013 (get_tinfo_fn): Likewise. 16014 (get_tinfo_fn_unused): Rename to ... 16015 (get_tinfo_decl): ... here. 16016 * rtti.c (build_headof): Replace logic error with assertion. 16017 (get_tinfo_fn_dynamic): Rename to ... 16018 (get_tinfo_decl_dynamic): ... here. Make static. Use 16019 complete_type_or_else. 16020 (build_x_typeid): Move into ... 16021 (build_typeid): ... here. Adjust call to 16022 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify 16023 throw_bad_typeid expression. 16024 (get_tinfo_fn_unused): Rename to ... 16025 (get_tinfo_decl): ... here. Adjust comment. 16026 (get_tinfo_fn): Delete. 16027 (tinfo_from_decl): New static function. 16028 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl. 16029 (get_typeid): Use complete_type_or_else. 16030 (build_dynamic_cast_1): Adjust calls to 16031 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression. 16032 * parse.y (primary): Adjust call to build_typeid. 16033 * except.c (build_eh_type_type_ref): Adjust call to 16034 get_tinfo_decl. Mark as used. 16035 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl. 16036 * decl2.c (build_expr_from_tree): Adjust call to build_typeid. 16037 * parse.c: Regenerated. 16038 160392000-01-17 Mark Mitchell <mark@codesourcery.com> 16040 16041 * class.c (fixed_type_or_null): Don't clear NONNULL. Document 16042 calling convention. 16043 (resolves_to_fixed_type_p): Document calling convention. 16044 * rtti.c (build_x_typeid): Initialize NONNULL. 16045 16046 * cp-tree.h (build_shared_int_cst): New function. 16047 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity. 16048 * class.c (modify_vtable_entry): Likewise. 16049 (add_virtual_function): Split out code to generated shared 16050 INTEGER_CSTs to build_share_int_cst. 16051 (modify_all_vtables): Handle all the overridden functions here. 16052 Add overridden functions from non-primary virtual bases to the 16053 primary vtable. 16054 (finish_struct_1): Adjust call to modify_all_vtables. Add 16055 overridden functions from non-primary bases to the vtable. 16056 * tree.c (build_shared_int_cst): New function. 16057 16058 * cp-tree.h (scratchalloc): Remove. 16059 (build_scratch_list): Likewise. 16060 * call.c (convert_class_to_reference): Replace build_scratch_list 16061 and build_expr_list with build_tree_list. 16062 (add_candidate): Replace scratchalloc with expralloc. Note memory 16063 leak. 16064 (build_user_type_conversion_1): Replace build_scratch_list 16065 and build_expr_list with build_tree_list. 16066 (build_new_op): Likewise. 16067 (build_op_delete_call): Likewise. 16068 (convert_like): Likewise. 16069 * cvt.c (ocp_convert): Likewise. 16070 * decl.c (start_decl): Likewise. 16071 (start_function): Likewise. 16072 (finish_destructor_body): Likewise. 16073 (maybe_build_cleanup_1): Likewise. 16074 * decl2.c (reparse_decl_as_expr): Likewise. 16075 * init.c (perform_member_init): Likewise. 16076 (expand_cleanup_for_base): Likewise. 16077 (build_builtin_delete_call): Likewise. 16078 (build_new_1): Likewise. 16079 (build_delete): Likewise. 16080 * method.c (do_build_assign_ref): Likewise. 16081 * parse.y (already_scoped_stmt): Likewise. 16082 (nontrivial_exprlist): Likewise. 16083 (net_initializer): Likewise. 16084 (initlist): Likewise. 16085 * parse.c: Regenerated. 16086 * rtti.c (build_x_typeid): Likewise. 16087 (build_dynamic_cast_1): Likewise. 16088 * typeck.c (build_x_compound_expr): Likewise. 16089 (build_static_cast): Likewise. 16090 (build_modify_expr): Likewise. 16091 16092 * cp-tree.h (DECL_VINDEX): Add documentation. 16093 * class.c (build_vtable_entry): Likewise. 16094 (start_vtable): Add comment. 16095 (add_virtual_function): Replace pending_hard_virtuals with 16096 overridden_virtuals and pending_virtuals with new_virtuals. 16097 Replace redundant assignments with assertions. 16098 (check_for_override): Add comment. 16099 (check_bases_and_members): Replace pending_hard_virtuals with 16100 overridden_virtuals and pending_virtuals with new_virtuals. 16101 (create_vtbl_ptr): Likewise. 16102 (layout_class_type): Likewise. 16103 (finish_struct_1): Likewise. Add comments. 16104 161052000-01-16 Mark Mitchell <mark@codesourcery.com> 16106 16107 * class.c (finish_struct_1): Replace redundant code with 16108 assertions. 16109 16110 * cp-tree.h (flag_new_abi): Move. 16111 (flag_use_cxa_atexit): Likewise. 16112 (flag_honor_std): Likewise. 16113 (flag_rtti): Likewise. 16114 (vbase_offsets_in_vtable_p): Define. 16115 (vptrs_present_everywhere_p): Likewise. 16116 (TYPE_CONTAINS_VPTR_P): Likewise. 16117 (dfs_walk_real): Declare. 16118 * class.c (build_vbase_pointer_fields): Check 16119 vbase_offsets_in_vtable_p. 16120 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in 16121 BINFO_VPTR_FIELD. 16122 (build_vbase_offset_vtbl_entries): Simplify. 16123 (build_vbase_offset_vtbl_entries): Adjust. 16124 (build_vbase_pointer): Add ability to look up vbase offsets in 16125 vtable. 16126 (start_vtable): New function. 16127 (add_virtual_function): Use it. 16128 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P. 16129 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p. 16130 (build_vtbl_initializer): Take the type of the complete object as 16131 input. Use it to correctly calculate vbase offsets. 16132 (dfs_finish_vtbls): Pass the complete type to 16133 build_vtbl_initializer. 16134 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P. 16135 (create_vtable_ptr): Create a vtable even if there are no 16136 new virtual functions, under the new ABI. 16137 (finish_struct_1): Likewise. 16138 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P. 16139 * decl.c (exapnd_static_init): Remove call to 16140 preserve_initializer. 16141 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in 16142 vtables. 16143 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order. 16144 (expand_virtual_init): Use vbase_offsets_in_vtable_p. 16145 (construct_virtual_bases): Don't initialize virtual base pointers 16146 under the new ABI. 16147 (build_aggr_init): Clean up comment. 16148 (expand_aggr_init_1): Likewise. 16149 * rtti.c (expand_class_desc): Store the virtual function table 16150 index where the vbase offset lives in the offset field. 16151 * search.c (dfs_walk_real): Make it global. 16152 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P. 16153 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD. 16154 16155 * tinfo.h (USItype): Make it signed under the new ABI. 16156 * tinfo.cc (convert_to_base): New function. Encapsulate base 16157 conversion logic here. 16158 (__class_type_info::do_upcast): Use it. 16159 (__class_type_info::do_dyncast): Likewise. 16160 (__class_type_info::do_find_public_subobj): Likewise. 16161 16162 * init.c (construct_virtual_bases): Don't look up the addresses of 16163 virtual bases at run-time. 16164 16165 * class.c (build_vbase_pointer): Relocate. 16166 (build_vbase_pointer_fields): Likewise. 16167 (dfs_build_vbase_offset_vtbl_entries): Likewise. 16168 (build_vbase_offset_vtbl_entries): Likewise. 16169 16170 * decl.c (init_decl_processing): Complain if -fnew-abi 16171 -fno-vtable-thunks is used. 16172 16173 * decl2.c (lang_decode_option): Don't couple flag_honor_std to 16174 flag_new_abi. 16175 161762000-01-15 Mark Mitchell <mark@codesourcery.com> 16177 16178 * cp-tree.h (num_extra_vtbl_entries): New function. 16179 (size_extra_vtbl_entries): Likewise. 16180 (dfs_vtable_path_unmark): Likewise. 16181 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise. 16182 (dfs_vtable_path_marked_real_bases_queue_p): Likewise. 16183 * class.c (num_extra_vtbl_entries): New function. 16184 (size_extra_vtbl_entries): Likewise. 16185 (dfs_build_vbase_offset_vtbl_entries): New function. 16186 (build_vbase_offset_vtbl_entries): Likewise. 16187 (build_vtbl_initializer): Use it. 16188 (finish_struct_1): Adjust vtable sizes (using 16189 num_extra_vtbl_entries). 16190 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a 16191 THUNK_DECL is non-NULL before expanding it. 16192 * init.c (expand_virtual_init): Adjust the vtable pointer by 16193 size_extra_vtbl_entries before storing it. 16194 * search.c (get_shared_vase_if_not_primary): Adjust prototype. 16195 Handle TREE_LIST parameters here, not in the dfs_* functions. 16196 (dfs_unmarked_real_bases_queue_p): Adjust. 16197 (dfs_marked_real_bases_queue_p): Likewise. 16198 (dfs_vtable_path_unmarked_real_bases_queue_p): New function. 16199 (dfs_vtable_path_marked_real_bases_queue_p): New function. 16200 (dfs_vtable_path_unmark): Likewise. 16201 162022000-01-14 Mark Mitchell <mark@codesourcery.com> 16203 16204 * optimize.c (copy_body_r): Clear the operand three of a 16205 TARGET_EXPR when copying it. 16206 162072000-01-14 Martin v. L�wis <loewis@informatik.hu-berlin.de> 16208 16209 * method.c (build_decl_overload_real): Check whether we are in :: 16210 before returning __builtin_new/delete. 16211 162122000-01-13 Mark Mitchell <mark@codesourcery.com> 16213 16214 * pt.c (tsubst_friend_function): Improve comment. 16215 (instantiate_decl): Avoid crashing when a "nested" function is 16216 instantiated from the top level. 16217 16218 * dump.c (dqeueue_and_dump): Dump 16219 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION. 16220 162212000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16222 16223 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'. 16224 162252000-01-13 Nathan Sidwell <sidwell@codesourcery.com> 16226 16227 * g++spec.c (lang_specific_driver): Add -fnew-abi if 16228 ENABLE_NEW_GXX_ABI defined. 16229 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o, 16230 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o, 16231 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch. 16232 162332000-01-12 Mark Mitchell <mark@codesourcery.com> 16234 16235 * decl.c (start_cleanup_fn): Call pushdecl. 16236 16237 * call.c (convert_class_to_reference): Fix typos. 16238 (build_conditional_expr): Handle errors gracefully. 16239 * class.c (push_nested_class): Likewise. 16240 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro. 16241 (DECL_THIS_EXTERN): Use it. 16242 (DECL_THIS_STATIC): Likewise. 16243 * cvt.c (convert_to_void): Handle errors gracefully. 16244 (build_expr_type_conversion): Likewise. 16245 * decl.c (maybe_push_decl): Likewise. 16246 (start_decl_1): Likewise. 16247 (require_complete_types_for_parms): Likewise. 16248 * parse.y (structsp): Likewise. 16249 (base_class): Likewise. 16250 * parse.c: Regenerated. 16251 * pt.c (finish_member_template_decl): Likewise. 16252 * typeck.c (decay_conversion): Likewise. 16253 16254 * cp-tree.h (dfs_skip_vbases): New function. 16255 (find_vbase_instance): Likewise. 16256 * class.c (determine_primary_base): Allow a nearly empty base to 16257 serve as a primary base class under the new ABI. 16258 (get_class_offset_1): Rename to ... 16259 (dfs_get_class_offset): ... this. Simplify. Don't issue error 16260 messages here. 16261 (get_class_offset): Use it. Issue error messages here. 16262 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to 16263 find the right copies of virtual bases. 16264 (fixup_vtable_deltas1): Rename to ... 16265 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual 16266 bases as primary bases. 16267 (fixup_vtable_deltas): Remove. 16268 (override_one_vtable): Handle virtual bases as primary bases. 16269 (merge_overrides): Likewise. 16270 (finish_struct_1): Likewise. 16271 (dump_class_hierarchy): Dump primary-ness of bases as well. 16272 * search.c (mark_primary_bases): Use a pre-order traversal to 16273 handle primary virtual bases. 16274 (dfs_skip_vbases): New fiunction. 16275 (expand_upcast_fixups): Adjust to handle primary virtual bases. 16276 (fixup_virtual_upcast_offsets): Likewise. 16277 (fixup_all_virtual_upcast_offsets): Likewise. 16278 (dfs_find_vbase_instances): New function. 16279 (find_vbase_instance): Likewise. 16280 162812000-01-11 Mumit Khan <khan@xraylith.wisc.edu> 16282 16283 * lex.c (DIR_SEPARATOR): Delete macro. 16284 162852000-01-12 Gabriel Dos Reis <gdr@codesourcery.com> 16286 16287 * decl2.c (lang_decode_option): Handle automatic line wrapping 16288 option. 16289 162902000-01-11 Mark Mitchell <mark@codesourcery.com> 16291 16292 * friend.c (do_friend): Don't resolve scopes when processing 16293 template declarations, even if the qualifying scope doesn't 16294 involve template parameters. 16295 162962000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com> 16297 16298 * class.c (dfs_modify_vtables_queue_p): Remove. 16299 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p 16300 and dfs_marked_real_bases_queue_p instead of 16301 dfs_modify_vtables_queue_p. 16302 16303 * class.c (build_vbase_path): Simplify. 16304 (dfs_propagate_binfo_offsets): New function. 16305 (propagate_binfo_offsets): Use it. 16306 (remove_base_field): Simplify. 16307 (dfs_set_offset_for_vbases): Remove. 16308 (dfs_set_offset_for_shared_vbases): New function. 16309 (dfs_set_offset_for_unshared_vbases): Likewise. 16310 (layout_virtual_bases): Use them. 16311 (layout_basetypes): Don't call propagate_binfo_offsets. 16312 * search.c (dfs_get_vbase_types): Clone completely fresh binfos 16313 for the vbases. 16314 16315 * class.c (build_base_field): New function, split out from ... 16316 (build_base_fields): ... here. Use it. Allocate primary bases 16317 first, under the new ABI. 16318 (get_vtable_entry): Remove. 16319 (remove_base_field): New function, split out from ... 16320 (remove_base_fields): ... here. Adjust since primary bases come 16321 first under the new ABI. 16322 16323 * cp-tree.h (expand_direct_vtbls_init): Remove declaration. 16324 (initialize_vtbl_ptrs): New function. 16325 (expand_indirect_vtbls_init): Change prototype. 16326 (convert_pointer_to_vbase): Declare. 16327 * init.c (expand_direct_vtbls_init): Remove. 16328 (dfs_initialize_vtbl_ptrs): New function. 16329 (initialize_vtbl_ptrs): Likewise. 16330 (emit_base_init): Use initialize_vtbl_ptrs. 16331 * search.c (convert_pointer_to_vbase): Make it global. 16332 (expand_indirect_vtbls_init): Remove vtable initialization code. 16333 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs. 16334 16335 * class.c (dfs_finish_vtbls): New function. 16336 (finish_vtbls): Use it. 16337 (dump_class_hierarchy): New function. 16338 16339 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition. 16340 (BINFO_VBASE_PRIMARY_P): New macro. 16341 (BINFO_VIRTUALS): Add to documentation. 16342 (SET_BINFO_PRIMARY_MARKED_P): Remove. 16343 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. 16344 (dfs_mark_primary_bases_queue_p): Likewise. 16345 (dfs_unmarked_real_bases_queue_p): New function. 16346 (dfs_marked_real_bases_queue_p): Likewise. 16347 * search.c (dfs_mark_primary_bases): Adjust. 16348 (mark_primary_bases): Likewise. 16349 (get_shared_vbase_if_not_primary): New function. 16350 (dfs_unmarked_real_bases_queue_p): Likewise. 16351 (dfs_marked_real_bases_queue_p): Likewise. 16352 (dfs_get_pure_virtuals): Simplify. 16353 (get_pure_virtuals): Likewise. 16354 163552000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16356 16357 * lex.c: Include tm_p.h. 16358 163592000-01-07 Nathan Sidwell <sidwell@codesourcery.com> 16360 16361 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro. 16362 163632000-01-06 Jason Merrill <jason@casey.cygnus.com> 16364 16365 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT. 16366 * pt.c (instantiate_decl): Defer comdat templates that might not be 16367 needed. 16368 16369 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT. 16370 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT. 16371 (finish_file): Likewise. 16372 16373 * decl2.c (import_export_class): Undo 12/14 change. 16374 16375 * error.c (dump_decl): operator new, not operatornew. 16376 16377 * class.c (field_decl_cmp): A nontype is "greater" than a type. 16378 * search.c (lookup_field_1): Look for the last field with the 16379 desired name. 16380 163812000-01-05 Nathan Sidwell <nathan@acm.org> 16382 16383 * decl2.c (lookup_arg_dependent): Deal with FNS not being a 16384 FUNCTION_DECL. 16385 163862000-01-05 Nathan Sidwell <nathan@acm.org> 16387 16388 * typeck.c (build_static_cast): Don't strip target qualifiers 16389 when casting from a class. 16390 163912000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 16392 16393 * class.c (warn_hidden): Initialize variable `fndecl'. 16394 163952000-01-03 Ulrich Drepper <drepper@cygnus.com> 16396 16397 * decl.c (flag_isoc9x): New variable to be able to use code in 16398 c-common.c. For now always zero. 16399 164002000-01-03 Mark Mitchell <mark@codesourcery.com> 16401 16402 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation. 16403 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN 16404 or unshare_base_binfos for virtual bases here. 16405 * search.c (dfs_get_vbase_types): Do it here. 16406 (get_vbase_types): Adjust. 16407 164082000-01-02 Mark Mitchell <mark@codesourcery.com> 16409 16410 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition. 16411 (BINFO_PRIMARY_MARKED_P): Use flag 5. 16412 (SET_BINFO_PRIMARY_MARKED_P): Likewise. 16413 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. 16414 (unmark_primary_bases): Remove declaration. 16415 (unmarkedp): Declare. 16416 (dfs_vbase_unmark): Likewise. 16417 * class.c (determine_primary_base): Return immediately if there 16418 are no base classes. Call mark_primary_bases here. 16419 (modify_all_direct_vtables): Remove. 16420 (modify_all_indirect_vtables): Remove. 16421 (dfs_modify_vtables_queue_p): New function. 16422 (dfs_modify_vtables): New function. 16423 (modify_all_vtables): Use them. 16424 (build_base_fields): Build FIELD_DECLs for primary virtual base 16425 classes. 16426 (create_vtable_ptr): Don't call determine_primary_base here. 16427 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ... 16428 (dfs_set_offset_for_vbases): ... this. 16429 (layout_virtual_bases): Use it. 16430 (layout_class_type): Call determine_primary_base here. 16431 * search.c (unmarkedp): Make it global. 16432 (shared_marked_p): Simplify. 16433 (shared_unmarked_p): Likewise. 16434 (dfs_primary_bases_queue_p): Remove. 16435 (dfs_unmark_primary_bases): Likewise. 16436 (unmark_primary_bases): Likewise. 16437 (mark_primary_bases): Simplify. 16438 (get_pure_virtuals): Don't call mark_primary_bases here. 16439 (dfs_vbase_unmark): New function. 16440 (get_vbase_types): Simplify. 16441 16442 * class.c (struct base_info): Remove. 16443 (determine_primary_base): Take has_virtual_p rather than a 16444 base_info as input. Don't calculate max_has_virtual. 16445 (finish_struct_bits): Remove max_has_virtual argument. 16446 (create_vtable_ptr): Remove max_has_virtual_p argument. 16447 (layout_virtual_bases): Remove max argument. 16448 (layout_basetypes): Likewise. 16449 (layout_class_type): Remove max_has_virtual_p argument. 16450 (finish_struct_1): Remove max_has_virtual. 16451 16452 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function. 16453 (layout_basetypes): Remove. 16454 * class.c (propagate_binfo_offsets): Moved here from tree.c. 16455 Update to handle primary virtual bases. 16456 (remove_base_fields): New function, split out from 16457 layout_basetypes. 16458 (dfs_mark_primary_bases_and_set_vbase_offsets): New function. 16459 (layout_virtual_bases): New function, split out from 16460 layout_basetypes. Update to handle primary virtual bases. 16461 (layout_basetypes): Moved here from tree.c. Use 16462 remove_base_fields and layout_virtual_bases. 16463 * search.c (dfs_mark_primary_bases_queue_p): New function. 16464 (mark_primary_bases): Use it. 16465 * tree.c (CEIL): Remove. 16466 (propagate_binfo_offsets): Remove. 16467 (layout_basetypes): Remove. 16468 164692000-01-01 Mark Mitchell <mark@codesourcery.com> 16470 16471 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES. 16472 (BINFO_PRIMARY_MARKED_P): New macro. 16473 (SET_BINFO_PRIMARY_MARKED_P): Likewise. 16474 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise. 16475 (mark_primary_bases): New function. 16476 (unmark_primary_bases): Likewise. 16477 * search.c (get_abstract_virtuals_1): Remove. 16478 (dfs_mark_primary_bases): New function. 16479 (mark_primary_bases): Likewise. 16480 (dfs_unmark_primary_bases): Likewise. 16481 (unmark_primary_bases): Likewise. 16482 (dfs_get_pure_virtuals): Likewise. 16483 164842000-01-01 Mark Mitchell <mark@codesourcery.com> 16485 16486 * cp-tree.h (skip_rtti_stuff): Adjust prototype. 16487 * class.c (skip_rtti_stuff): Reorganize parameters and return value. 16488 (modify_one_vtable): Adjust. 16489 (fixup_vtable_deltas1): Likewise. 16490 (override_one_vtable): Likewise. 16491 * search.c (get_abstract_virtuals_1): Likewise. 16492 (get_pure_virtuals): Likewise. 16493 (expand_upcast_fixups): Likewise. 16494 * tree.c (debug_binfo): Likewise. 16495 16496 * class.c (build_vtable): Don't return a value. Don't rebuild 16497 vtables for bases that have already been handled. 16498 (prepare_fresh_vtable): Don't rebuild vtables for bases that have 16499 already been handled. 16500 (modify_one_vtable): Adjust accordingly. 16501 (fixup_vtable_deltas1): Likewise. 16502 (finish_struct_1): Likewise. 16503 165042000-01-01 Martin v. L�wis <loewis@informatik.hu-berlin.de> 16505 16506 * call.c (build_new_method_call): Also check destructors. 16507