11999-12-31 Mark Mitchell <mark@codesourcery.com> 2 3 * cp-tree.h (VF_NORMAL_VALUE): Remove. 4 * class.c (struct base_info): Remove vfield, vfields, and rtti. 5 (set_primary_base): New function, split out from ... 6 (finish_base_struct): ... here. Rename to ... 7 (determine_primary_base): ... this. Simplify. 8 (create_vtable_ptr): Tweak accordingly. 9 (finish_struct_1): Simplify. 10 11 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation. 12 (CLASSTYPE_N_BASECLASSES): Likewise. 13 (BINFO_FOR_VBASE): New macro. 14 (get_vbase_types): Change prototype. 15 * class.c (build_vbase_path): Use BINFO_FOR_VBASE. 16 (prepare_fresh_vtable): Likewise. 17 (finish_vtbls): Likewise. 18 (get_class_offset_1): Likewise. 19 (modify_all_indirect_vtables): Likewise. 20 (build_vbase_pointer_fields): Likewise. 21 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here. 22 * init.c (sort_base_init): Use BINFO_FOR_VBASE. 23 (expand_member_init): Likewise. 24 * search.c (get_base_distance): Likewise. 25 (lookup_field_queue_p): Likewise. 26 (virtual_context): Likewise. 27 (get_vbase_types): Don't return a value. Set 28 CLASSTYPE_VBASECLASSES here. 29 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE. 30 311999-12-30 Mark Mitchell <mark@codesourcery.com> 32 33 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS. 34 351999-12-29 Mark Mitchell <mark@codesourcery.com> 36 37 * class.c (create_vtable_ptr): Put the vtable at the beginning of 38 the class, not the end, in the new ABI. 39 * tree.c (propagate_binfo_offsets): Do the right thing for the new 40 ABI. 41 421999-12-29 Mark Mitchell <mark@codesourcery.com> 43 44 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy. 45 (CLASSTYPE_NEARLY_EMPTY_P): New macro. 46 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P. 47 (check_field_decls): Likewise. 48 (check_bases_and_members): Likewise. 49 501999-12-28 Mark Mitchell <mark@codesourcery.com> 51 52 * cp-tree.h (do_inline_function_hair): Remove. 53 * class.c (layout_class_type): New function, split out from 54 finish_struct_1. 55 (fixup_pending_inline): Likewise. 56 (fixup_inline_methods): New function. 57 * method.c (fixup_pending_inline): Remove. 58 (do_inline_function_hair): Likewise. 59 60 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the 61 new ABI. 62 63 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals. 64 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ... 65 (CLASSTYPE_PURE_VIRTUALS): ... this. 66 (lang_decl_flags): Replace abstract_virtual with pure_virtual. 67 (DECL_ABSTRACT_VIRTUAL_P): Rename to ... 68 (DECL_PURE_VIRTUAL_P): ... this. 69 (get_abstract_virtuals): Rename to ... 70 (get_pure_virtuals): ... this. 71 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with 72 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with 73 CLASSTYPE_PURE_VIRTUALS. 74 * class.c (build_vtable_entry): Likewise. 75 (finish_struct_bits): Likewise. Call get_pure_virtuals, not 76 get_abstract_virtuals. 77 (build_vtbl_initializer): Likewise. 78 (override_one_vtable): Likewise. 79 (check_methods): Likewise. 80 * decl.c (duplicate_decls): Likewise. 81 (redeclaration_error_message): Likewise. 82 (lang_mark_tree): Likewise. 83 * decl2.c (grok_function_init): Likewise. 84 (import_export_vtable): Likewise. 85 (import_expor_class): Likewise. 86 * typeck2.c (abstract_virtuals_error): Likewise. 87 * xref.c (GNU_xref_member): Likewise. 88 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals. 89 901999-12-26 Zack Weinberg <zack@wolery.cumb.org> 91 92 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING 93 throughout. 94 951999-12-26 Mark Mitchell <mark@codesourcery.com> 96 97 * decl.c (store_return_init): Use mode of old RTL generated for 98 DECL_RESULT, not the mode of DECL_RESULT itself. 99 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE 100 for functions that used named return values. 101 1021999-12-24 Mark Mitchell <mark@codesourcery.com> 103 104 * semantics.c (expand_body): Use 105 note_deferral_of_defined_inline_function. 106 1071999-12-22 Mark Mitchell <mark@codesourcery.com> 108 109 * dump.c (dequeue_and_dump): Handle CTOR_STMTs. 110 1111999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br> 112 113 * error.c (dump_decl): Support named return values. 114 1151999-12-20 Mark Mitchell <mark@codesourcery.com> 116 117 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments. 118 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro. 119 (CLASSTYPE_PRIMARY_BINFO): Likewise. 120 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF, 121 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here. 122 (check_bases_and_members): Set them here instead. 123 (create_vtable_ptr): New function, split out from ... 124 (finish_struct_1): ... here. Use it. Tidy. Use 125 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO. 126 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as 127 the first field in the class. 128 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle 129 seeing TYPE_VFIELD as the first field in the class. 130 131 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ... 132 (TYPE_POLYMORPHIC_P): ... this. 133 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ... 134 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this. 135 (TREE_CALLS_NEW): Remove. 136 (TREE_MANGLED): Likewise. 137 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, 138 and TYPE_POLYMORPHIC_P. 139 * class.c (check_bases): Likewise. 140 (finish_base_struct): Likewise. 141 (finish_struct_bits): Likewise. 142 (check_for_override): Likewise. 143 (finish_struct_1): Likewise. 144 (get_vfield_name): Likewise. 145 * decl.c (xref_basetypes): Likewise. 146 * decl2.c (import_export_class): Likewise. 147 (import_export_decl): Likewise. 148 * error.c (dump_function_decl): Likewise. 149 * pt.c (instantiate_class_template): Likewise. 150 * repo.c (repo_inline_used): Likewise. 151 * rtti.c (build_headof): Likewise. 152 (get_tinfo_fn_dynamic): Likewise. 153 (build_x_typeid): Likewise. 154 (get_tinfo_var): Likewise. 155 (build_dynamic_cast_1): Likewise. 156 (synthesize_tinfo_fn): Likewise. 157 * search.c (lookup_field_1): Likewise. 158 (dfs_debug_mark): Likewise. 159 (maybe_suppress_debug_info): Likewise. 160 * typeck.c (build_component_ref): Likewise. 161 (build_component_addr): Likewise. 162 * typeck2.c (process_init_constructor): Likewise. 163 1641999-12-20 Nathan Sidwell <nathan@acm.org> 165 166 * typeck.c (strip_all_pointer_quals): New static function. 167 (build_static_cast): Use it. Don't use at_least_as_qualified_p. 168 1691999-12-16 Mark Mitchell <mark@codesourcery.com> 170 171 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE. 172 (dso_handle_node): New macro. 173 (flag_use_cxa_atexit): New variable. 174 (declare_global_var): New function. 175 (start_anon_func): Remove declaration. 176 (end_anon_func): Likewise. 177 * decl.c (get_atexit_node): New function, split out from 178 destroy_local_static. Handle flag_use_cxa_atexit. 179 (get_dso_handle_node): Likewise. 180 (start_cleanup_fn): Renamed from start_anon_func. Moved here from 181 except.c. Handle flag_use_cxa_atexit. 182 (end_cleanup_fn): Renamed from end_anon_func. Moved here from 183 except.c. 184 (declare_global_var): New variable. 185 (destroy_local_static): Handle flag_use_cxa_atexit. 186 * decl2.c (flag_use_cxa_atexit): New variable. 187 (lang_f_options): Likewise. 188 * except.c (start_anon_func): Remove. 189 (end_anon_func): Liekwise. 190 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit. 191 * rtti.c (get_tinfo_var): Use declare_global_var. 192 1931999-12-16 Mark Mitchell <mark@codesourcery.com> 194 195 * class.c (check_field_decls): Don't return a value. 196 (avoid_overlap): Moved here from tree.c. 197 (build_base_fields): Likewise. 198 (check_bases): New function, split out from finish_base_struct. 199 (check_bases_and_members): New function, split out from 200 finish_struct_1. 201 (struct base_info): Remove cant_have_default_ctor, 202 cant_have_const_ctor, cant_have_asn_ref. 203 (finish_base_struct): Split semantic analysis into check_bases. 204 (finish_struct_methods): Fix bogus assertion. 205 (check_field_decls): Call finish_struct_anon here. 206 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES. 207 (finish_struct_1): Use check_bases_and_members. Reorganize. 208 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation. 209 (build_base_fields): Don't declare. 210 * tree.c (avoid_overlap): Remove. 211 (build_base_fields): Likewise. 212 213 * optimize.c (struct inline_data): Remove scope_stmt. 214 (remap_block): Don't use insert_block_after_note. Don't update 215 scope_stmt. 216 (expand_call_inline): Don't update scope_stmt. 217 (optimize_function): Don't initialize scope_stmt. 218 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted 219 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes. 220 2211999-12-15 Mark Mitchell <mark@codesourcery.com> 222 223 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS 224 out of the class, rather than taking them as parameters. 225 (build_vbase_pointer_fields): Move here from tree.c. 226 (build_vtbl_or_vbase_field): New function. 227 (check_methods): Likewise. 228 (remove_zero_width_bitfields): Likewise. 229 (add_virtual_function): Use tree_cons instead of temp_tree_cons. 230 (delete_duplicate_fields_1): Tidy. Don't delete duplicate 231 USING_DECLs here. 232 (finish_struct_methods): Handle the case where there are no 233 methods here. 234 (get_basefndecls): Use tree_cons instead of temp_tree_cons. 235 (check_field_decls): Call delete_duplicate_fields here. 236 (finish_struct_1): Tidy. Use check_methods and 237 remove_zero_width_bitfields. 238 * cp-tree.h (build_vbase_pointer_fields): Remove. 239 * decl.c (grokdeclarator): Use tree_cons instead of 240 temp_tree_cons. 241 * decl2.c (qualified_lookup_using_namespace): Use tree_cons 242 instead of temp_tree_cons. 243 * lex.c (cons_up_default_function): Remove dead code. 244 * method.c (fixup_pending_inline): New function, split out from ... 245 (do_inline_function_hair): ... here. 246 * tree.c (build_vbase_pointer_fields): Remove. 247 2481999-12-15 Jason Merrill <jason@casey.cygnus.com> 249 250 * tree.c (walk_tree): Walk operand subtrees in forward order. 251 * optimize.c (expand_call_inline): Likewise. 252 (optimize_function): Initialize id->scope_stmt to something useful. 253 (remap_block): Assume id->scope_stmt has a useful value. 254 2551999-12-15 Nathan Sidwell <nathan@acm.org> 256 257 * typeck.c (build_c_cast): Expand warning message. Move pointer 258 alignment warning to after the cast. Don't warn about pointer 259 alignment when given a pointer to incomplete. 260 2611999-12-15 Richard Henderson <rth@cygnus.com> 262 263 * cp-tree.h (make_aggr_type): Declare. 264 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE. 265 (make_aggr_type): New. 266 267 * decl.c (build_typename_type, init_decl_processing): Use it. 268 (build_ptrmemfunc_type, xref_tag): Likewise. 269 * except.c (call_eh_info): Likewise. 270 * init.c (init_init_processing): Likewise. 271 * pt.c (process_template_parm, lookup_template_class): Likewise. 272 * rtti.c (expand_class_desc): Likewise. 273 * semantics.c (begin_class_definition, finish_typeof): Likewise. 274 * tree.c (copy_template_template_parm): Likewise. 275 2761999-12-15 Jason Merrill <jason@yorick.cygnus.com> 277 278 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using 279 sizeof (struct tree_common). 280 2811999-12-14 Jason Merrill <jason@casey.cygnus.com> 282 283 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the 284 outermost block to point to the inlined function decl. 285 286 * error.c (dump_decl): operator==, not operator ==. 287 (op_to_string): Likewise. 288 289 * decl.c (compute_array_index_type): Handle null name. 290 291 * decl2.c (ambiguous_decl): Fix to match comment. 292 (lookup_using_namespace): Adjust. 293 294 * decl2.c (import_export_class): Don't ignore dllimport. 295 2961999-12-14 Mark Mitchell <mark@codesourcery.com> 297 298 * class.c (check_field_decls): Split out from ... 299 (finish_struct_1): ... here. Use it. Tidy. 300 301 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter. 302 * optimize.c (copy_body_r): Pass it. 303 * tree.c (remap_save_expr): Clear walk_subtrees for an 304 already-handled SAVE_EXPR. 305 (cp_unsave_r): Pass walk_subtrees to remap_save_expr. 306 307 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS. 308 * ir.texi (DECL_NAMESPACE_ALIAS): Document it. 309 310 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION. 311 3121999-12-14 Mumit Khan <khan@xraylith.wisc.edu> 313 314 * class.c (finish_base_struct): Allow multiple COM base classes 315 as well as non-COM bases as long as it's not the leftmost. 316 3171999-12-13 Mumit Khan <khan@xraylith.wisc.edu> 318 319 * lex.c (saving_parse_to_obstack): New global. 320 (reinit_parse_for_block): Use. 321 (reinit_parse_for_expr): Use. 322 (check_newline): Use. 323 3241999-12-13 Mark Mitchell <mark@codesourcery.com> 325 326 * optimize.c (initialize_inlined_parameters): Take FN to which the 327 parameters belong as an argument. 328 (expand_call_inline): Expand calls into the parameter 329 initializations before pushing the function onto the list of 330 functions we are presently expanding. 331 3321999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 333 334 * class.c (get_vtable_name): Use a literal format string and 335 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT. 336 (prepare_fresh_vtable): Likewise. 337 338 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of 339 VTABLE_NAME_FORMAT. 340 341 * decl.c (make_rtl_for_local_static): Remove unused variable `type'. 342 343 * init.c (build_vec_init): Initialize variable `try_body'. 344 345 * lex.c (yyerror): Don't call a variadic function with a 346 non-literal format string. 347 348 * optimize.c (optimize_function): Call memset, not bzero. 349 350 * pt.c (for_each_template_parm_r): Add static prototype. 351 3521999-12-09 Andreas Jaeger <aj@suse.de> 353 354 * except.c (expand_throw): Add static attribute to match 355 prototype. 356 357 * Makefile.in (semantics.o): Add dependency on output.h. 358 * semantics.c: Include output.h for declaration of 359 make_function_rtl. 360 3611999-12-09 Mark Mitchell <mark@codesourcery.com> 362 363 * decl.c (init_decl_processing): Reenable inlining on trees. 364 (finish_function): Likewise. 365 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here. 366 * semantics.c (simplify_aggr_init_exprs): New function. 367 (expand_body): Use it. 368 * tree.c (walk_tree): Special-case TARGET_EXPRs since they 369 sometimes present the same sub-tree twice. 370 371 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not 372 `csl'. 373 374 * semantics.c (finish_switch_cond): Do conversions here, not ... 375 * typeck.c (c_expand_start_case): Here. 376 377 * semantics.c (do_poplevel): Remove unused variable. 378 3791999-12-06 Mark Mitchell <mark@codesourcery.com> 380 381 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE 382 unless we're declaring the variable in question. 383 3841999-12-06 Mark Mitchell <mark@codesourcery.com> 385 386 * decl.c (init_decl_processing): #if 0 last patch. 387 (finish_function): Likewise. 388 3891999-12-05 Mark Mitchell <mark@codesourcery.com> 390 391 * decl.c (init_decl_processing): Set flag_inline_trees if 392 !flag_no_inline. 393 394 * cp-tree.h (calls_setjmp_p): Declare. 395 * decl.c (finish_function): Mark functions that call setjmp as 396 uninlinable. 397 * optimize.c (calls_setjmp_r): New function. 398 (calls_setjmp_p): Likewise. 399 4001999-12-04 Mark Mitchell <mark@codesourcery.com> 401 402 * optimize.c (expand_call_inline): Wrap the expanded call in an 403 EXPR_WITH_FILE_LOCATION node to get correct line numbers for 404 inlined functions. 405 406 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add 407 in_target_cleanup_p. 408 (remap_decl): New function. 409 (remap_block): Likewise. 410 (copy_scope_stmt): Likewise. 411 (copy_body_r): Use remap_decl and copy_scope_stmt. 412 (copy_body): Use VARRAY_TOP_TREE. 413 (initialize_inlined_parameters): Likewise. 414 (declare_return_variable): Likewise. 415 (inlinable_function_p): Check flag_inline_trees. 416 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs 417 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the 418 parameters of the inlined function. 419 (optimize_function): Prevent recursion into partially complete 420 functions. 421 422 * cp-tree.def (SCOPE_STMT): Take one operand. 423 * cp-tree.h (SCOPE_STMT_BLOCK): New macro. 424 (SCOPE_NULLIFIED_P): Redefine. 425 (SCOPE_NO_CLEANUPS_P): New macro. 426 (add_scope_stmt): Change prototype. 427 * decl.c (poplevel): Tidy. Warn about unused variables here. 428 Record SCOPE_STMT_BLOCKs. 429 (finish_function): Keep DECL_INITIAL for functions that might be 430 inlined. 431 * ir.texi: Document SCOPE_NO_CLEANUPS_P. 432 * semantics.c: Include rtl.h. 433 (add_scope_stmt): Return the new scope statement and, for an 434 end-of-scope statement, its matching begin statement. Don't set 435 SCOPE_NULLIFIED_P. 436 (do_pushlevel): Simplify, now that we are always 437 function-at-a-time. 438 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs. 439 (expand_stmt): Don't call expand_start_bindings or 440 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set. 441 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting 442 SCOPE_NULLIFIED_P. 443 * Makefile.in (semantics.o): Depend on RTL_H. 444 445 * decl2.c (pending_statics_used): Make it a macro. 446 (saved_inlines_used): Likewise. 447 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE. 448 (mark_inline_for_output): Likewise. 449 (ssdf_decls_used): Remove. 450 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE. 451 (generate_ctor_or_dtor_function): Adjust accordingly. 452 4531999-11-24 Geoffrey Keating <geoffk@cygnus.com> 454 Greg McGary <gkm@gnu.org> 455 456 * decl.c (duplicate_decls): Merge 457 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, 458 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK. 459 4601999-12-02 Mike Stump <mrs@wrs.com> 461 462 * init.c (perform_member_init): Handle parse errors better. 463 4641999-12-01 Mark Mitchell <mark@codesourcery.com> 465 466 * cp-tree.h (min_tree_cons): Remove. 467 (scratch_ovl_cons): Likewise. 468 * decl.c (saveable_obstack): Don't declare. 469 (duplicate_decls): Tweak error-message. 470 (initialize_local_var): Explicitly mark the definition as static. 471 (finish_function): Call permanent_allocation, just so 472 that the middle-end sees the obstacks it expects. 473 (mark_cp_function_context): Likewise. 474 * init.c (build_new): Don't use min_tree_cons. 475 * lex.c (permanent_obstack): Don't declare. 476 (current_obstack, saveable_obstack): Likewise. 477 * spew.c (current_obstack, saveable_obstack): Likewise. 478 * tree.c (current_obstack, saveable_obstack): Likewise. 479 (scratch_ovl_cons): Remove. 480 (build_min_nt): Don't mess with obstacks. 481 (build_min): Likewise. 482 (min_tree_cons): Remove 483 * typeck.c (build_component_ref): Don't use scratch_ovl_cons. 484 (build_x_function_call): Likewise. 485 (build_c_cast): Don't use min_tree_cons. 486 4871999-11-29 Mark Mitchell <mark@codesourcery.com> 488 489 * pt.c (tsubst_decl): Robustify. 490 4911999-11-27 Mark Mitchell <mark@codesourcery.com> 492 493 * decl2.c (finish_file): Call expand_body for inline functions 494 that will be written out but that do not yet have RTL. 495 * semantics.c (expand_body): Do not generate RTL For inline 496 functions that do not yet need to be written out. 497 4981999-11-25 Mark Mitchell <mark@codesourcery.com> 499 500 * Make-lang.in (CXX_SRCS): Add optimize.c. 501 * Makefile.in (CXX_OBJS): Add optimize.o. 502 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H). 503 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust. 504 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise. 505 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise. 506 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise. 507 (dump.o): Likewise. 508 (optimize.o): New target. 509 * class.c: Don't include splay-tree.h. 510 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT. 511 * cp-tree.h: Include splay-tree.h. 512 (DECL_UNINLINABLE): New macro. 513 (CTOR_BEGIN_P, CTOR_END_P): New macros. 514 (flag_inline_trees): New variable. 515 (local_variable_p): New function. 516 (nonstatic_local_decl_p): Likewise. 517 (optimize_function): Likewise. 518 (cplus_unsave_expr_now): Remove. 519 (copy_tree_r): Declare. 520 (remap_save_expr): Likewise. 521 * decl.c (local_variable_p): Don't 522 make it static. 523 (local_variable_p_walkfn): New function. 524 (make_rtl_for_local_static): Remove code to try to avoid writing 525 out static constants. 526 (emit_local_var): Fix indentation. 527 (nonstatic_local_decl_p): New function. 528 (check_default_argument): Use local_variable_p_walkfn, not 529 local_variable_p, when walking the tree. 530 (start_function): Set the DECL_CONTEXT for automatically generated 531 labels. 532 (finish_constructor_body): Use CTOR_STMT to mark the end of a 533 constructor. 534 * decl2.c: Don't include splay-tree.h. 535 (flag_inline_trees): Define. 536 * dump.c: Don't include 537 splay-tree.h. 538 * except.c (expand_end_catch_block): Fix comment formatting. 539 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables. 540 (expand_throw): Tidy comment. 541 * init.c (build_vec_delete_1): Use create_temporary_var. 542 * lex.c (cplus_tree_code_type): Make it static. 543 (cplus_tree_code_length): Likewise. 544 (cplus_tree_code_name): Likewise. 545 * optimize.c: New file. 546 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions 547 with computed gotos. 548 (setup_vtbl_ptr): Mark the beginnings of constructors with 549 CTOR_STMT. 550 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE. 551 (expand_body): Call optimize_function. Save bodies if we're doing 552 inlining on trees. 553 * tree.c: Don't include splay-tree.h. Include insn-config.h and 554 integrate.h. 555 (copy_tree_r): Make it public. 556 (statement_code_p): New function. 557 (mark_local_for_remap_r): Likewise. 558 (cp_usave_r): Likewise. 559 (cp_unsave): Likewise. 560 (build_cplus_new): Set DECL_CONTEXT for temporary variables. 561 (walk_tree): Walk into `s' class nodes. Walk statement chains. 562 (copy_tree_r): Handle 's' class nodes. Restore chains for 563 statements. Nullify scopes. Don't copy types. 564 (init_tree): Set lang_unsave to cp_unsave. 565 (remap_save_expr): Define. 566 * ir.texi: Document CTOR_STMT. 567 5681999-11-24 Jason Merrill <jason@casey.cygnus.com> 569 570 * search.c (note_debug_info_needed): Do perform this optimization 571 for dwarf2. 572 (maybe_suppress_debug_info): Likewise. Start by clearing 573 TYPE_DECL_SUPPRESS_DEBUG. 574 5751999-11-24 Mark Mitchell <mark@codesourcery.com> 576 577 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs. 578 579 * decl2.c (finish_vtable_vardecl): Don't prune vtables here. 580 5811999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 582 583 * decl.c (pushdecl, grokdeclarator): Don't call a variadic 584 function with a non-literal format string. 585 586 * lex.c (do_identifier): Likewise. 587 588 * typeck.c (build_unary_op): Likewise. 589 5901999-11-23 Mark Mitchell <mark@codesourcery.com> 591 592 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation. 593 5941999-11-22 Mark Mitchell <mark@codesourcery.com> 595 596 * cp-tree.def (CTOR_COMPLETE): New tree node. 597 * decl.c (finish_constructor_body): Add it, to mark the end of the 598 constructor. 599 (finish_function): Don't call end_protect_partials here. 600 * ir.texi (CTOR_COMPLETE): Document it. 601 * semantics.c (expand_stmt): Handle it. 602 603 * cp-tree.def (FUNCTION_NAME): New tree node. 604 * cp-tree.h (current_function_name_declared): Tweak documentation. 605 (lang_decl_flags): Add pretty_function_p, adjust dummy. 606 (DECL_PRETTY_FUNCTION_P): New macro. 607 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__, 608 etc., in a template function. Use at_function_scope_p instead of 609 expanding it inline. 610 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations 611 specially. 612 (tsubst): Handle FUNCTION_NAME. 613 (tsubst_copy): Likewise. 614 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__, 615 etc. in instantiation. 616 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc., 617 even in template functions. 618 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the 619 conditional scope at the top of a destructor. 620 621 * error.c (dump_function_decl): Use `[ with ... ]' syntax for 622 specializations too. 623 6241999-11-22 Nathan Sidwell <nathan@acm.org> 625 626 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT 627 when actually negative. 628 629 * typeck.c (convert_for_assignment): Expand comment about 630 strange NULL check, moved from ... 631 (convert_for_initialization): ... here. Remove unneeded 632 code. 633 6341999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br> 635 636 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument. 637 * init.c (build_vec_delete, build_vec_delete_1): Likewise. 638 Always destruct virtual bases of array components, but never 639 delete them. 640 (build_vec_init): Adjust invocations. 641 (build_delete): Likewise. 642 * decl2.c (delete_sanity): Likewise. 643 6441999-11-19 Nathan Sidwell <nathan@acm.org> 645 646 * cp-tree.h (grok_method_quals): Return this pointer qualifiers. 647 * decl.c (grokdeclarator): Adjust calls to grok_method_quals. 648 * decl2.c (grok_method_quals): Accept `restrict' as applying to 649 the object pointer. Return such qualifiers. 650 (grokclassfn): Apply this pointer qualifiers. Cleanup unused 651 variables. 652 6531999-11-18 Mark Mitchell <mark@codesourcery.com> 654 655 * except.c (expand_end_catch_block): Fix typo. 656 (expand_exception_blocks): Simplify. Don't call 657 expand_leftover_cleanups. 658 6591999-11-15 Jason Merrill <jason@casey.cygnus.com> 660 661 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic. 662 * pt.c (tsubst, case INTEGER_TYPE): Call it. 663 Check uses_template_parms. 664 665 * class.c (finish_struct): If we're a local class in a template 666 function, add a TAG_DEFN. 667 * pt.c (lookup_template_class): If this is a local class in a 668 template function, call pushtag. 669 (tsubst_expr, case TAG_DEFN): Handle classes, too. 670 671 Emit debug info with the vtable. 672 * search.c (maybe_suppress_debug_info): New function... 673 * class.c (finish_struct_1): ...split out from here. 674 * cp-tree.h: Declare it. 675 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG 676 if we're writing out the vtable. 677 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 678 note_debug_info_needed): #if 0 out. 679 6801999-11-14 Mark Mitchell <mark@codesourcery.com> 681 682 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro. 683 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not 684 TREE_PERMANENT. 685 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P. 686 * decl2.c (lookup_arg_dependent): Use it. 687 688 * cp-tree.h (cp_finish_decl): Change prototype. 689 (finish_static_data_member_decl): Likewise. 690 (push_permanent_obstack): Remove declaration. 691 (push_expression_obstack): Likewise. 692 (push_scratch_obstack): Likewise. 693 (DECL_TEMPLATE_PARM_P): Robustify. 694 (SET_DECL_TEMPLATE_PARM_P): New macro. 695 * class.c (add_method): Don't manipulate obstacks. 696 (finish_vtbls): Likewise. 697 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl. 698 * decl.c (binding_for_name): Don't manipulate obstacks. 699 (maybe_push_to_top_level): Likewise. 700 (pop_from_top_level): Likewise. 701 (duplicate_decls): Likewise. 702 (pushdecl): Likewise. 703 (implicitly_declare): Likewise. 704 (build_typename_type): Likewise. 705 (start_decl): Likewise. 706 (cp_finish_decl): Likewise. 707 (finish_decl): Likewise. 708 (destroy_local_static): Likewise. 709 (expand_static_init): Likewise. 710 (complete_array_type): Likewise. 711 (grokvardecl): Likewise. 712 (build_ptrmemfnc_type): Likewise. 713 (grokdeclarator): Likewise. 714 (xref_tag): Likewise. 715 (xref_basetypes): Likewise. 716 (start_enum): Likewise. 717 (finish_enum): Likewise. 718 (start_function): Likewise. 719 (finish_function): Likewise. 720 (start_method): Adjust call to cp_finish_decl. 721 * decl2.c (finish_static_data_member_decl): Don't manipulate 722 obstacks. 723 (grokfield): Likewise. 724 (grokbitfield): Likewise. 725 (get_temp_name): Likewise. 726 (get_sentry): Likewise. 727 (fnish_file): Likewise. 728 (lookup_arg_dependent): Likewise. 729 * except.c (call_eh_info): Likewise. 730 (push_eh_info): Likewise. 731 (do_pop_exception): Likewise. 732 (initialize_handler_parm): Likewise. 733 (expand_end_eh_spec): Likewise. 734 (alloc_eh_object): Likewise. 735 (expand_throw): Likewise. 736 * expr.c (extract_scalar_init): Likewise. 737 * init.c (build_java_class_ref): Likewise. 738 * lex.c (get_time_identifier): Likewise. 739 (snarf_defarg): Likewise. 740 (add_defarg_fn): Likewise. 741 (is_global): Simplify. 742 (do_identifier): Don't check TREE_PERMANENT. 743 * method.c (emit_thunk): Don't manipulate obstacks. 744 * parse.y (condition): Adjust call to cp_finish_decl. 745 (primary): Likewise. 746 (initdcl): Likewise. 747 (initdcl0_innards): Likewise. 748 (nomods_initdcl0): Likewise. 749 * pt.c (push_inline_template_parms_recursive): Use 750 SET_DECL_TEMPLATE_PARM_P. 751 (process_template_parm): Likewise. 752 (lookup_template_class): Don't manipulate obstacks. 753 (instantiate_class_template): Adjust call to 754 finish_static_data_member_decl. 755 (tsubst_decl): Don't manipulate obstacks. 756 (tsubst_expr): Likewise. 757 (instantiate_template): Likewise. 758 (instantiate_decl): Adjust calls to cp_finish_decl. 759 * rtti.c (call_void_fn): Don't manipulate obstacks. 760 (get_tinfo_var): Likewise. 761 (get_tinfo_fn_unused): Likewise. 762 (build_dynamic_cast_1): Likewise. 763 (expand_si_desc): Likewise. 764 (expand_class_desc): Likewise. 765 (expand_ptr_desc): Likewise. 766 (expand_attr_desc): Likewise. 767 (expand_generic_desc): Likewise. 768 (synthesize_tinfo_fn): Likewise. 769 * search.c (expand_upcast_fixups): Likewise. 770 * semantics.c (finish_asm_stmt): Likewise. 771 (finish_named_return_value): Likewise. 772 (begin_class_definition): Likewise. 773 (finish_class_definition): Likewise. 774 (finish_typeof): Likewise. 775 * tree.c (build_cplus_method_type): Likewise. 776 (reverse_path): Likewise. 777 (copy_template_template_parm): Likewise. 778 (build_expr_ptr_wrapper): Likewise. 779 (push_expression_obstack): Remove. 780 (push_permanent_obstack): Likewise. 781 * typeck.c (mark_addressable): Likewise. 782 7831999-11-13 Mark Mitchell <mark@codesourcery.com> 784 785 * call.c (build_conditional_expr): Use build_target_expr_with_type. 786 (convert_like): Likewise. 787 (build_over_call): Likewise. 788 * cp-tree.h (build_target_expr): Remove. 789 (build_target_expr_with_type): New function. 790 * cvt.c (build_up_reference): Use get_target_expr. 791 * decl.c (build_target_expr): Move to ... 792 * tree.c (build_target_expr): Here. Make it static. 793 (build_target_expr_with_type): New function. Set DECL_CONTEXT on 794 the temporary VAR_DECLs. 795 (get_target_expr): Use it. 796 7971999-11-13 Jason Merrill <jason@yorick.cygnus.com> 798 799 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT. 800 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT. 801 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn. 802 * class.c (set_rtti_entry): Use it. 803 8041999-11-12 Mark Mitchell <mark@codesourcery.com> 805 806 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups 807 here. 808 * semantics.c (finish_expr_stmt): Call it here instead. Move 809 default_conversion logic to semantic-analysis time. 810 8111999-11-12 Jason Merrill <jason@yorick.cygnus.com> 812 813 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT. 814 815Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com> 816 817 * init.c (init_init_processing): Re-instated Nov 11 patch after 818 approval. 819 820Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com> 821 822 * init.c (init_init_processing): Undo patch from Nov 11, 1999. 823 Patch had not been approved yet. 824 8251999-11-12 Mark Mitchell <mark@codesourcery.com> 826 827 * decl.c (compute_array_index_type): New function, split out from 828 grokdeclarator. 829 (create_array_type_for_decl): Likewise. 830 (grokdeclarator): Use them. 831 832 * semantics.c (expand_stmt): Don't suspend_momentary or 833 resume_momentary. 834 835Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com> 836 837 * init.c (init_init_processing): Header information for 838 arrays allocated via `new' should have the same alignment used by 839 malloc. 840 8411999-11-10 Mark Mitchell <mark@codesourcery.com> 842 843 * error.c (dump_function_name): Don't crash if given a friend 844 pseudo-instantiation. 845 846 * cp-tree.h (build_enumerator): Change prototype. 847 * decl.c (enum_next_value): Remove. 848 (enum_overflow): Likewise. 849 (init_decl_processing): Don't register enum_next_value as a root. 850 (start_enum): Clear TYPE_VALUES for a redefined enum. 851 (finish_enum): Reset the type of enumeration constants. 852 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when 853 we don't need to. Maintain the TYPE_VALUES list and look there 854 for the previously defined enumeration constant. Let enumeration 855 constants have the type of their values until the enumeration type 856 is complete. 857 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value. 858 (structsp): Adjust. 859 * parse.c: Regenerated. 860 * pt.c (tsubst_enum): Adjust according to build_enumerator changes. 861 862Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be> 863 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 864 865 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'. 866 8671999-11-09 Mark Mitchell <mark@codesourcery.com> 868 869 * cp-tree.h (language_function): Remove x_last_dtor_insn and 870 x_last_parm_cleanup_insn. 871 * decl.c (last_dtor_insn): Remove. 872 (last_parm_cleanup_insn): Likewise. 873 (expand_start_early_try_stmts): Don't set them. 874 (store_parm_decls): Likewise. 875 (save_function_data): Or save them. 876 (mark_lang_function): Or mark them. 877 8781999-11-08 Mark Mitchell <mark@codesourcery.com> 879 880 * decl.c (store_parm_decls): Generate cleanup code at 881 semantic-analysis time. Destroy objects in the correct order. 882 8831999-11-07 Mark Mitchell <mark@codesourcery.com> 884 885 * cp-tree.h (begin_new_placement): Remove. 886 (finish_new_placement): Likewise. 887 * class.c (finish_struct_1): Don't suspend_momentary or 888 resume_momentary. 889 * decl.c (grokdeclarator): Likewise. 890 (maybe_build_cleanup_1): Likewise. 891 * except.c (push_eh_cleanup): Likewise. 892 (build_terminate_handler): Likewise. 893 * init.c (build_new_1): Likewise. 894 * parse.y (parse_decl): Change prototype. 895 (initdecls, notype_initdecls, initdcl): Don't return int. 896 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise. 897 (.begin_new_placement): Remove. 898 (.finish_new_placement): Likewise. 899 (nonmomentary_expr): Likewise. 900 (suspend_mom): Likewise. 901 (condition): Don't suspend_momentary, resume_momentary, or keep 902 track of need to resume. 903 (unary_expr): Likewise. 904 (new_placement): Likewise. 905 (decl): Likewise. 906 (structsp): Likewise. 907 (new_type_id): Likewise. 908 (maybe_parmlist): Likewise. 909 (direct_after_type_declaration): Likewise. 910 (direct_new_declarator): Likewise. 911 (direct_abstract_declaration): Likewise. 912 * parse.c: Regenerated. 913 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary. 914 * semantics.c (begin_new_placement): Remove. 915 (finish_new_placement): Likewise. 916 9171999-11-05 Martin v. L�wis <loewis@informatik.hu-berlin.de> 918 919 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro. 920 (DECL_TEMPLATE_INFO): Use it. 921 * decl.c (warn_extern_redeclared_static): Do nothing for 922 TEMPLATE_DECLs. 923 * decl2.c (mark_used): Explicitly check for function or variable. 924 * semantics.c (finish_unary_op_expr): Check whether result is also 925 an INTEGER_CST. 926 9271999-11-05 Mark Mitchell <mark@codesourcery.com> 928 929 * Makefile.in (typeck2.o): Depend on output.h. 930 * typeck2.c: Include output.h. 931 932 * decl.c (flag_ansi): Remove declaration. 933 934 * pt.c (tinst_level_tick): Make it static. 935 (last_template_error_tick): Likewise. 936 937 * cp-tree.h (mapcar): Remove declaration. 938 (search_tree): Likewise. 939 (walk_tree_fn): New typedef. 940 (walk_tree): New function. 941 * tree.c (bot_manip): Change prototype. Adjust to be called via 942 walk_tree. 943 (bot_replace): Likewise. 944 (no_linkage_helper): Likewise. 945 (copy_tree_r): New function. 946 (search_tree): Rename, and adjust, to become ... 947 (walk_tree): New function. 948 (mapcar): Remove. 949 (target_remap): Remove. 950 (target_remap_count): Likewise. 951 (break_out_target_exprs): Use walk_tree. 952 * decl.c (local_variable_p): Change prototype. 953 (check_default_argument): Use walk_tree. 954 * pt.c (for_each_template_parm_r): New function, split out from ... 955 (for_each_template_parm): Here. Use it, via walk_tree. 956 9571999-11-03 Mark Mitchell <mark@codesourcery.com> 958 959 * class.c (check_bitfield_decl): New function, split out from 960 finish_stuct_1. 961 (check_field_decl): Likewise. Recursively examine members of 962 anonymous structs. 963 (finish_struct_1): Use them. 964 * cp-tree.h (ANON_UNION_TYPE_P): New macro. 965 9661999-11-02 Mark Mitchell <mark@codesourcery.com> 967 968 * decl.c (grokfndecl): Remove dead code. 969 970 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses. 971 9721999-11-02 Scott Snyder <snyder@fnal.gov> 973 974 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and 975 IMAGPART_EXPR. 976 * pt.c (tsubst_copy): Likewise. 977 9781999-11-01 Jason Merrill <jason@yorick.cygnus.com> 979 980 * decl2.c (maybe_make_one_only): Always make things comdat on 981 ELF targets, too. 982 9831999-10-31 Mark Mitchell <mark@codesourcery.com> 984 985 * decl.c (finish_function): Call free_after_parsing for functions 986 we are not immediately turning into RTL. 987 9881999-10-31 Brendan Kehoe <brendan@cygnus.com> 989 990 * cp-tree.h (flag_dump_translation_unit): Add decl. 991 992Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net> 993 994 * lex.c (yylex): Accept 'f' in mantissa of hex float constant. 995 9961999-10-30 Mark Mitchell <mark@codesourcery.com> 997 998 * decl.c (pop_cp_function_context): Don't call free on a NULL 999 pointer. 1000 * semantics.c: Include ggc.h. 1001 (expand_body): Do garbage-collection after processing a template 1002 function. Clear DECL_SAVED_TREE after generating RTL for a 1003 function. 1004 * Makefile.in (semantics.o): Depend on ggc.h. 1005 10061999-10-29 Mark Mitchell <mark@codesourcery.com> 1007 1008 * cp-tree.h (make_typename_type): Change prototype. 1009 * decl.c (make_typename_type): Only complain if so requested. 1010 * parse.y (nested_name_specifier): Adjust calls. 1011 (typename_sub0): Likewise. 1012 (typename_sub1): Likewise. 1013 * parse.c: Regenerated. 1014 * pt.c (convert_template_argument): Pass complain to 1015 make_typename_type. 1016 (tsubst): Likewise. 1017 10181999-10-28 Mark Mitchell <mark@codesourcery.com> 1019 1020 * semantics.c (finish_handler): End the scope of the handler 1021 before attaching it to the statement-tree. 1022 10231999-10-28 Ian Lance Taylor <ian@zembu.com> 1024 1025 * rtti.c (build_dynamic_cast_1): Give a better error message for 1026 an attempt to dynamic_cast from a non-polymorphic type. 1027 10281999-10-27 Mark Mitchell <mark@codesourcery.com> 1029 1030 * cp-tree.h (make_temp_vec): Remove. 1031 (make_scratch_vec): Likewise. 1032 * call.c (add_function_candidate): Use make_tree_vec. 1033 (add_conv_candidate): Likewise. 1034 (build_builtin_candidate): Likewise. 1035 (add_template_candidate_real): Likewise. 1036 * class.c (resolve_address_of_overloaded_function): Likewise. 1037 * decl.c (start_function): Don't fool with the momentary obstack. 1038 (finish_function): Likewise. 1039 * init.c (expand_direct_vtbls_init): Likewise. 1040 (begin_init_stmts): Likewise. 1041 (finish_init_stmts): Likewise. 1042 * pt.c (add_to_template_args): Use make_tree_vec. 1043 (check_explicit_specialization): Likewise. 1044 (coerce_template_parms): Likewise. 1045 (lookup_template_class): Don't fool with the momentary obstack. 1046 (instantiate_class_template): Likewise. 1047 (tsubst_template_arg_vector): Use make_tree_vec. 1048 (tsubst_aggr_type): Don't fool with the momentary obstack. 1049 (tsubst_decl): Likewise. Use make_tree_vec. 1050 (try_one_overload): Likewise. 1051 (try_class_unification): Don't fool with the momentary obstack. 1052 (get_bindings_real): Use make_tree_vec. 1053 (set_mangled_name_for_template_decl): Likewise. 1054 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack. 1055 * semantics.c (finish_expr_stmt): Likewise. 1056 (finish_do_stmt): Likewise. 1057 (finish_for_expr): Likewise. 1058 (finish_switch_cond): Likewise. 1059 (do_pushlevel): Likewise. 1060 (do_poplevel): Likewise. 1061 * tree.c (make_temp_vec): Remove. 1062 1063 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump 1064 CLEANUP_P for a TRY_BLOCK. 1065 * ir.texi: Document SAVE_EXPR. 1066 1067Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com) 1068 1069 * call.c (build_over_call): Check that the built-in function is 1070 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS. 1071 * typeck.c (build_function_call_real): Similarly. 1072 10731999-10-26 Mark Mitchell <mark@codesourcery.com> 1074 1075 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call 1076 remember_end_note. 1077 10781999-10-24 Mark Mitchell <mark@codesourcery.com> 1079 1080 * decl.c (push_overloaded_decl_1): Use pushdecl. 1081 1082 * decl.c (auto_function): Replace #ifdef'd __inline with just 1083 plain inline. 1084 * lex.c (my_get_run_time): Likeise. 1085 (yyprint): Likewise. 1086 (identifier_type): Likewise. 1087 * method.c (start_squangling): Likewise. 1088 (end_squangling): Likewise. 1089 (icat): Likewise. 1090 (old_backref_index): Likewise. 1091 (flush_repeats): Likewise. 1092 (issue_ktype): Likewise. 1093 * parse.y (empty_parms): Likewise. 1094 * parse.c: Regenerated. 1095 10961999-10-21 Mark Mitchell <mark@codesourcery.com> 1097 1098 * dump.c (dequeue_and_dump): Replace several uses of 1099 queue_and_dump_index with dump_child. 1100 11011999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1102 1103 * expr.c: Include tm_p.h. 1104 11051999-10-21 Mark Mitchell <mark@codesourcery.com> 1106 1107 * cp-tree.h (SCOPE_PARTIAL_P): New macro. 1108 (pushlevel_temporary): Remove. 1109 (add_scope_stmt): New function. 1110 * decl.c (pushlevel_temporary): Remove. 1111 (poplevel): Use add_scope_stmt. 1112 (start_decl_1): Likewise. 1113 * semantics.c (add_scope_stmt): New function. 1114 (do_pushlevel): Use it. 1115 (do_poplevel): Use it. 1116 (expand_stmt): Check SCOPE_PARTIAL_P. 1117 1118 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node. 1119 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR. 1120 * expr.c (cplus_expand_expr): Expand it. 1121 * ir.texi: Document EMPTY_CLASS_EXPR. 1122 11231999-10-20 Mark Mitchell <mark@codesourcery.com> 1124 1125 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template 1126 parameters as having namespace scope. 1127 11281999-10-19 Mark Mitchell <mark@codesourcery.com> 1129 1130 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove. 1131 (mangling_flags): New type. 1132 (build_overload_int): Change prototype. 1133 (build_overload_value): Likewise. 1134 (numeric_output_need_bar): Improve comment. 1135 (mangle_expression): New function, broken out from ... 1136 (build_overload_int): Here. 1137 (build_overload_value): Adjust for use of mangling flags. Don't 1138 warn about real-valued template parameters here. Do handle 1139 complex expressions involving real-valued template parameters. 1140 (build_template_parm_names): Encase non-type template parameters 1141 in underscores, if necessary. 1142 (process_overload_item): Remove conditional on 1143 PARM_CAN_BE_ARRAY_TYPE. 1144 11451999-10-17 Mark Mitchell <mark@codesourcery.com> 1146 1147 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR. 1148 1149 * ir.texi: Clean up documentation of RETURN_INIT. 1150 11511999-10-15 Greg McGary <gkm@gnu.org> 1152 1153 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified". 1154 (lang_init): Set default for flag_bounds_check if still "unspecified". 1155 11561999-10-13 Andrew Haley <aph@cygnus.com> 1157 1158 * class.c (finish_struct_1): Force alignment of non-bitfields to 1159 BITS_PER_UNIT. 1160 1161Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk> 1162 1163 * typeck2.c (process_init_constructor): Handle empty constructors. 1164 11651999-10-13 Jason Merrill <jason@yorick.cygnus.com> 1166 1167 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL. 1168 1169 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size 1170 array error. 1171 11721999-10-13 Mark Mitchell <mark@codesourcery.com> 1173 1174 * decl.c (make_rtl_for_local_static): Don't create register RTL 1175 for addressable constants. 1176 11771999-10-13 Nathan Sidwell <nathan@acm.org> 1178 1179 * cp-tree.h (build_x_va_arg): Prototype new function. 1180 * call.c (build_x_va_arg): Define it. 1181 * parse.y (unary_expr): Call build_x_va_arg. 1182 1183 * cp-tree.h (convert_type_from_ellipsis): Prototype new function. 1184 * call.c (convert_type_from_ellipsis): Define it. 1185 * decl.c (init_decl_processing): Set lang_type_promotes_to. 1186 1187 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates. 1188 11891999-10-11 Jason Merrill <jason@yorick.cygnus.com> 1190 1191 * class.c (fixed_type_or_null): Always set *nonnull. 1192 11931999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1194 1195 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing 1196 __GNUC__ and __GNUC_MINOR__. 1197 11981999-10-09 Mark Mitchell <mark@codesourcery.com> 1199 1200 * cp-tree.h (make_rtl_for_local_static): New function. 1201 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for 1202 local statics ... 1203 (make_rtl_for_local_static): Here. 1204 * semantics.c (expand_stmt): Use make_rtl_for_local_static. 1205 12061999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1207 1208 * method.c: Include tm_p.h. 1209 12101999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> 1211 1212 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type. 1213 * lex.c (cp_make_lake_type): Likewise. 1214 * tree.c (init_tree): Init make_lang_type_fn. 1215 12161999-10-07 Mark Mitchell <mark@codesourcery.com> 1217 1218 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch 1219 parameter. 1220 1221 * semantics.c (expand_stmt): Don't pretend to have asmspecs for 1222 local statics if we don't really have them. 1223 1224 * ir.texi: Improve documentation for STMT_EXPR. Describe 1225 CLEANUP_POINT_EXPR. 1226 12271999-10-07 Jason Merrill <jason@yorick.cygnus.com> 1228 1229 * class.c (build_vtable_entry_ref): Use finish_asm_stmt. 1230 12311999-10-07 Greg McGary <gkm@gnu.org> 1232 1233 * class.c (finish_struct_1): Use simpler method of 1234 removing elements of a singly-linked list which doesn't 1235 lose for classes without data members. 1236 12371999-10-07 Mark Mitchell <mark@codesourcery.com> 1238 1239 * friend.c (make_friend_class): Robustify. 1240 1241 * semantics.c (finish_object_call_expr): Reject calls to template 1242 types. 1243 12441999-10-06 Mark Mitchell <mark@codesourcery.com> 1245 1246 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR. 1247 1248 * cp-tree.h (CLASSTYPE_VFIELD): Remove. 1249 * call.c (build_vfield_ref): Use TYPE_VFIELD, not 1250 CLASSTYPE_VFIELD. 1251 * class.c (get_vfield_offset): Likewise. 1252 (finish_base_struct): Likewise. 1253 (modify_one_vtable): Likewise. 1254 (fixup_vtable_deltas): Likewise. 1255 (finish_struct_1): Likewise. 1256 * init.c (expand_virtual_init): Likewise. 1257 * search.c (lookup_field_1): Likewise. 1258 (expand_upcast_fixups): Likewise. 1259 * typeck.c (build_component_ref): Likewise. 1260 (build_binary_op_nodefault): Likewise. 1261 1262 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD. 1263 * ir.texi: Document TYPE_VFIELD. 1264 12651999-10-06 Brendan Kehoe <brendan@cygnus.com> 1266 1267 * decl.c (grokdeclarator): Only warn about nonzero arrays if 1268 !in_system_header (linux socketbits.h can give this for 1269 __cmsg_data, which is using a GNU extension). 1270 12711999-10-05 Mark Mitchell <mark@codesourcery.com> 1272 1273 * decl2.c (start_static_storage_duration_function): Push the 1274 function declaration so it ends up in namespace scope. 1275 1276 * dump.c (DUMP_CHILDREN): Remove. 1277 (DUMP_BINFO): Adjust. 1278 (struct dump_node_info): Remove dump_children_p. 1279 (queue_and_dump_type): Remove dump_children_p parameter. 1280 (queue): Don't set dump_children_p. 1281 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to 1282 queue_and_dump_index. 1283 (dequeue_and_dump): Unconditionally print children. Adjust calls 1284 to functions mentioned above. 1285 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue. 1286 1287 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR. 1288 * dump.c (dequeue_and_dump): Dump them. 1289 1290 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors. 1291 1292 * decl.c (start_function): Set current_in_charge_parm for 1293 constructors, too, where appropriate. 1294 * search.c (fixup_all_virtual_upcast_offsets): New function. 1295 (expand_indirect_vtbls_init): Use it. 1296 12971999-10-04 Nathan Sidwell <nathan@acm.org> 1298 1299 * decl2.c (grok_alignof): Don't decay lvalues. 1300 1301 * init.c (build_new): Remove unused variable. 1302 13031999-10-04 Mark Mitchell <mark@codesourcery.com> 1304 1305 * cp-tree.h (struct language_function): Remove static_labelno. 1306 (static_labelno): Remove macro. 1307 * method.c (build_overload_nested_name): Make static_labelno 1308 static here. 1309 1310 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL, 1311 to decide whether or not a function is defined. 1312 1313 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for 1314 situations where make_node will do it automatically. 1315 * decl.c (grok_reference_init): Likewise. 1316 (expand_static_init): Likewise. 1317 (do_static_initialization): Likewise. 1318 * init.c (perform_member_init): Likewise. 1319 (expand_aggr_init_1): Likewise. 1320 (build_new_1): Likewise. 1321 * method.c (do_build_copy_constructor): Likewise. 1322 (do_build_assign_ref): Likewise. 1323 * search.c (expand_upcast_fixups): Likewise. 1324 * semantics.c (finish_stmt_expr): Likewise. 1325 * typeck.c (build_unary_op): Likewise. 1326 (check_return_expr): Likewise. 1327 13281999-10-04 Jason Merrill <jason@yorick.cygnus.com> 1329 1330 * init.c (build_vec_delete_1): Fold COND_EXPRs. 1331 13321999-10-03 Mark Mitchell <mark@codesourcery.com> 1333 1334 * cp-tree.def (VEC_INIT_EXPR): Remove. 1335 * cp-tree.h (struct stmt_tree): New type. 1336 (struct saved_scope): Remove firstobj. Add x_saved_tree, 1337 x_stmt_tree. 1338 (class_cache_firstobj): Remove. 1339 (struct language_function): Remove stmts_are_full_exprs_p, 1340 x_last_tree, and x_last_expr_type. Add x_stmt_tree. 1341 (current_stmt_tree): New macro. 1342 (last_tree): Adjust. 1343 (last_expr_type): Likewise. 1344 (doing_semantic_analysis_p): Simplify. 1345 (stmts_are_full_exprs_p): Adjust. 1346 (begin_tree): Remove prototype. 1347 (end_tree): Likewise. 1348 (begin_stmt_tree): Change prototype. 1349 (finish_stmt_tree): Likewise. 1350 (building_stmt_tree): Simplify. 1351 * decl.c (mark_stmt_tree): New function. 1352 (mark_saved_scope): Use it. 1353 (start_function): Rearrange slightly to call begin_stmt_tree 1354 earlier. 1355 (save_function_data): Tweak. 1356 (finish_function): Adjust call to finish_stmt_tree. 1357 (mark_lang_function): Use mark_stmt_tree. 1358 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR. 1359 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR. 1360 (build_vec_init): Remove creation of stand-in initializer. 1361 * pt.c (begin_tree): Remove. 1362 (end_tree): Likewise. 1363 * semantics.c (SET_LAST_STMT): New macro. Use it throughout. 1364 (begin_compound_stmt): Handle a compound-statement outside of a 1365 function. 1366 (begin_stmt_expr): Handle a statement-expression outsidef of a 1367 function. 1368 (finish_stmt_expr): Likewise. 1369 (begin_class_definition): Don't call begin_tree. 1370 (finish_inline_definitions): Don't call end_tree. 1371 (begin_stmt_tree): Take a pointer to tree, not a function as input. 1372 (finish_stmt_tree): Likewise. 1373 * tree.c (search_tree): Don't handle VEC_INIT_EXPR. 1374 (mapcar): Likewise. 1375 1376 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily. 1377 * parse.c: Regenerated. 1378 1379 * dump.c (dqueue_and_dump): Dump bitfieldness. 1380 1381 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for 1382 bitfields, rather than DECL_BIT_FIELD. 1383 * ir.texi: Document how to tell whether or not a field is a 1384 bitfield. 1385 1386 * lex.c (make_lang_type): Fix typo in comment. 1387 13881999-10-01 Jason Merrill <jason@yorick.cygnus.com> 1389 1390 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues. 1391 13921999-10-01 Mark Mitchell <mark@codesourcery.com> 1393 1394 * pt.c (tsubst_decl): If the type of a template instantiation is 1395 bogus, so is the whole instantiation. 1396 13971999-09-30 Mark Mitchell <mark@codesourcery.com> 1398 1399 * decl.c (initialize_local_var): Handle static variables here. 1400 (cp_finish_decl): Tweak handling of function-scope static 1401 variables. 1402 * semantics.c (expand_stmt): Handle DECL_STMTs for static 1403 variables. 1404 1405 * method.c (emit_thunk): Don't crash when -fsyntax-only. 1406 1407 * cp-tree.h (lang_decl_flags): Add global_ctor_p and 1408 global_dtor_p. Add init_priority. 1409 (DECL_ACCESS): Adjust accordingly. 1410 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros. 1411 (GLOBAL_INIT_PRIORITY): Likewise. 1412 * decl.c (lang_mark_tree): Adjust accordingly. 1413 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 1414 and GLOBAL_INIT_PRIORITY. 1415 * dump.c (dequeue_and_dump): Print them. 1416 * ir.texi: Document them. 1417 1418 * decl2.c (struct priority_info_s): Remove initialization_sequence 1419 and destruction_sequence. 1420 (start_static_storage_duration_function): Return the body of the 1421 function. Convert for function-at-a-time mode. 1422 (generate_inits_for_priority): Remove. 1423 (finish_static_storage_duration_function): Change prototype. 1424 Adjust for function-at-a-time mode. 1425 (do_static_initialization): Likewise. 1426 (do_static_destruction): Likewise. 1427 (do_static_initialization_and_destruction): Remove. 1428 (start_static_initialization_or_destruction): New function. 1429 (finish_static_initialization_or_destruction): Likewise. 1430 (get_priority_info): Don't manipulation initialization_sequence or 1431 destruction_sequence. 1432 (prune_vars_needing_no_initialization): New function. 1433 (write_out_vars): Likewise. 1434 (finish_file): Use the various new functions instead of the old. 1435 1436Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com> 1437 1438 * cp-tree.h (warn_float_equal): Declare. 1439 * decl2.c (warn_float_equal): Define. 1440 (lang_decode_option): Recognize -W[no-]float-equal. 1441 * typeck.c (build_binary_op_nodefault): Conditionally warn 1442 about equality tests of floating point types. 1443 14441999-09-29 Jason Merrill <jason@yorick.cygnus.com> 1445 1446 Support normal type_info-based EH mechanisms with -fno-rtti. 1447 * except.c (build_eh_type_type): Remove special -fno-rtti handling. 1448 (build_eh_type_type_ref): Likewise. 1449 (build_eh_type): Remove. 1450 (expand_throw): Call build_eh_type_type, not build_eh_type. 1451 * decl2.c (import_export_decl): Don't associate the tinfo fn with 1452 the vtable if -fno-rtti. 1453 * decl.c (init_decl_processing): Always init_rtti_processing. 1454 1455 * rtti.c (get_typeid): Don't complain about -fno-rtti. 1456 1457 * class.c (class_cache_obstack, class_obstack): Remove. 1458 (init_class_processing): Don't initialize class_obstack. 1459 (push_cache_obstack): Remove. 1460 (pushclass): Don't call it. 1461 * cp-tree.h: Remove prototype for push_cache_obstack. 1462 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove. 1463 (pushlevel_class): Don't push_decl_level. 1464 (poplevel_class): Don't pop_stack_level. 1465 (push_class_level_binding): Don't push_cache_obstack. 1466 (init_decl_processing): Don't initialize decl_obstack. 1467 * search.c (push_class_decls): Don't push_cache_obstack. 1468 * tree.c (list_hash_add): Put hash node on permanent_obstack. 1469 (hash_tree_cons): Don't mess with obstacks. 1470 (print_lang_statistics): Don't print stats for class_obstack and 1471 decl_obstack. 1472 14731999-09-29 Mark Mitchell <mark@codesourcery.com> 1474 1475 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL. 1476 * ir.texi: Document DECL_EXTERNAL. 1477 1478 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs. 1479 * ir.texi: Document THUNK_DECLs. 1480 1481 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c. 1482 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise. 1483 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise. 1484 * error.c (dump_template_bindings): Remove unused parameter. 1485 Handle multiple levels of template parameters. 1486 (dump_template_decl): Use `parms', not `args', for template 1487 parameters. Fix thinko. 1488 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass 1489 flags to dump_template_bindings. 1490 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h. 1491 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise. 1492 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise. 1493 (tsubst_copy): Clarify variable name. 1494 (most_general_template): Robustify. 1495 14961999-09-29 Nathan Sidwell <nathan@acm.org> 1497 1498 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME 1499 to change primary template rendering. 1500 15011999-09-29 Mark Mitchell <mark@codesourcery.com> 1502 1503 * cp-tree.h (UPT_TEMPLATE): Remove. 1504 (UPT_PARMS): Likewise. 1505 (DECL_NEEDED_P): New macro. 1506 * decl2.c (finish_vtable_vardecl): Use it. 1507 (finish_objects): Don't crash with -fsyntax-only. 1508 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when 1509 -fsyntax-only. 1510 * pt.c (tsubst_friend_function): Remove FIXME that talks about 1511 obstacks. 1512 (tsubst_expr): Correct handling of function try-blocks. 1513 * semantics.c: Include flags.h. 1514 (expand_body): Don't do RTL generation if -fsyntax-only. 1515 * Makefile.in (semantics.o): Depends on flags.h. 1516 15171999-09-28 Gabriel Dos Reis <gdr@codesourcery.com> 1518 1519 * pt.c (most_general_template): Adjust declaration. 1520 1521 * cp-tree.h: (most_general_template): Declare. 1522 1523 * error.c (dump_template_value): Rename to ... 1524 (dump_template_argument): This. 1525 (dump_template_argument_list): New function. 1526 (dump_type): Use it. 1527 (dump_template_parameter): New function. 1528 (dump_template_decl): Use it. 1529 (dump_template_bindings): New function. 1530 (dump_function_decl): Use it. Pretty print function template 1531 instantiations. 1532 15331999-09-28 Nathan Sidwell <nathan@acm.org> 1534 1535 * decl.c (grokdeclarator): Distinguish parameter context for 1536 diagnostics. Tidy up missing type diagnostic. 1537 Diagnose `explicit' in one place. Diagnose `mutable' in one place. 1538 15391999-09-28 Mark Mitchell <mark@codesourcery.com> 1540 1541 * ir.texi: Improve documentation for TARGET_EXPR. 1542 15431999-09-27 Nathan Sidwell <nathan@acm.org> 1544 1545 Augment stringification of trees. 1546 * cp-tree.h (tree_string_flags): New error stringifying enumeration. 1547 (fndecl_as_string, type_as_string_real, args_as_string, 1548 code_as_string, language_as_string, parm_as_string, 1549 op_as_string, assop_as_string, cv_as_string): Remove. 1550 (type_as_string, decl_as_string, expr_as_string): Adjust prototype. 1551 (context_as_string): Declare new function. 1552 * error.c (cp_printers): Move definition. 1553 (OB_UNPUT): Remove. 1554 (OB_END_TEMPLATE_ID): Adjust. 1555 (interesting_scope_p): Remove. 1556 (dump_scope): New static function. 1557 (dump_qualifiers): Adjust prototype, reimplement. 1558 (dump_template_value): Use tree_string_flags. 1559 (dump_type_real): Move back to dump_type. 1560 (dump_type): Adjust prototype. Use tree_string_flags. 1561 (dump_aggr_type): Likewise. Use dump_template_parms. 1562 (dump_type_prefix): Adjust prototype. Use tree_string_flags. 1563 Return pad flag. 1564 (dump_type_suffix): Adjust prototype. Use tree_string_flags. 1565 (dump_simple_decl): Likewise. 1566 (dump_decl): Likewise. Use dump_template_decl. 1567 (dump_template_decl): New static function broken out of dump_decl. 1568 (dump_function_decl): Adjust prototype. Use tree_string_flags. 1569 (dump_parameters): Likewise. Prefix space. 1570 (dump_exception_spec): Adjust prototype. Use tree_string_flags. 1571 (dump_function_name): Likewise. Use dump_template_parms. 1572 (dump_template_parms): New static function broken out of 1573 dump_function_name. 1574 (dump_expr_list): Adjust prototype. Use tree_string_flags. 1575 (dump_expr): Likewise. 1576 (fndecl_as_string): Removed 1577 (type_as_string_real): Removed 1578 (dump_binary_op): Adjust prototype. Use tree_string_flags. 1579 (dump_unary_op): Likewise. 1580 (type_as_string): Likewise. 1581 (expr_as_string): Likewise. 1582 (decl_as_string): Likewise. 1583 (context_as_string): New function. 1584 (lang_decl_name): Adjust. 1585 (decl_to_string): New static print callback. 1586 (expr_to_string): Likewise. 1587 (fndecl_to_string): Likewise. 1588 (code_as_string): Renamed to ... 1589 (code_to_string): ... here. Adjust. 1590 (language_as_string): Renamed to ... 1591 (language_to_string): ... here. Adjust. 1592 (parm_as_string): Renamed to ... 1593 (parm_to_string): ... here. 1594 (op_as_string): Renamed to ... 1595 (op_to_string): ... here. 1596 (assop_as_string): Renamed to ... 1597 (assop_to_string): ... here. 1598 (type_to_string): New static print callback. 1599 (args_as_string): Renamed to ... 1600 (args_to_string): ... here. Adjust. 1601 (cv_as_string): Renamed to ... 1602 (cv_to_string): ... here. Adjust. 1603 * pt.c (mangle_class_name_for_template): Use tree_string_flags. 1604 (print_template_context): Likewise. 1605 16061999-09-26 Mark Mitchell <mark@codesourcery.com> 1607 1608 * cp-tree.h (expand_throw): Remove prototype. 1609 * except.c (expand_throw): Make it static. Use tree-generation 1610 functions, rather than RTL-generation functions. 1611 (build_throw): Use it. 1612 * expr.c: Include except.h. 1613 (cplus_expand_expr): Don't call expand_throw here. 1614 * Makefile.in (expr.o): Depend on except.h. 1615 * ir.texi: Update documentation for THROW_EXPR. 1616 1617 * decl.c (start_function): Set x_dont_save_pending_sizes rather 1618 than calling get_pending_sizes. 1619 * init.c (build_new): Don't save and restore 1620 immediate_size_expand; instead, assert that it has the expected 1621 value already. 1622 16231999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 1624 1625 * lex.c (compiler_error): Add missing call to va_end(). 1626 16271999-09-25 Mark Mitchell <mark@codesourcery.com> 1628 1629 * dump.c (dequeue_and_dump): Handle RESULT_DECL. 1630 * ir.texi: Document RESULT_DECL and DECL_RESULT. 1631 1632 * cp-tree.h (check_return_expr): New function. 1633 * decl.c (finish_constructor_body): New function. 1634 (pushdecl): Put global friend functions in namespace binding 1635 level, not the class binding level. 1636 (finish_destructor_body): Make sure the dtor_label is always 1637 defined. Fix typo in comment. 1638 (finish_function): Move generation of constructor-termination code 1639 to semantic-analysis time. Move generation of implicit `main' 1640 return value to semantic-analysis time. 1641 * semantics.c (finish_return_stmt): Generate goto's to 1642 ctor_label/dtor_label here. Use check_return_expr to do semantic 1643 analysis on the returned expression. 1644 * typeck.c (maybe_warn_about_returning_address_of_local): New 1645 function split out from c_expand_return. 1646 (check_return_expr): Likewise. 1647 (c_expand_return): Just generate the RTL for the return. 1648 16491999-09-24 Mark Mitchell <mark@codesourcery.com> 1650 1651 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro. 1652 (cleanup_type): Likewise. 1653 (search_tree): Change prototype. 1654 * decl.c (local_variable_p): Adjust for new interface to 1655 search_tree. 1656 (check_default_argument): Likewise. 1657 * error.c (dump_expr): Handle INIT_EXPR. 1658 * except.c (expand_throw): Don't make cleanup_type a local static. 1659 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR. 1660 * init.c (build_new): Call build_new_1 directly, rather than 1661 building a NEW_EXPR. 1662 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when 1663 processing file-scope initializers. 1664 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR. 1665 * tree.c: Include splay-tree.h 1666 (no_linkage_helper): Adjust for new interface to search_tree. 1667 (search_tree): Pass around pointers to tree nodes, rather than the 1668 nodes themselves. Handle VEC_INIT_EXPR. 1669 (no_linkage_check): Adjust for new interface to search_tree. 1670 (mapcar): Handle VEC_INIT_EXPR. 1671 (target_remap): New variable. 1672 (bot_manip): Use it. 1673 (bot_replace): New function. 1674 (break_out_target_exprs): Use it to remap all variables used in a 1675 default argument expression. 1676 * typeck.c (build_modify_expr): Don't crash when outside a 1677 function and presented with an INIT_EXPR assignment 1678 * Makefile.in (tree.o): Depend on splay-tree.h. 1679 1680Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk> 1681 1682 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than 1683 DECL_BUILT_IN. 1684 (builtin_function): New arg CLASS. Arg CODE now of type int. All 1685 callers changed. 1686 Set the builtin's DECL_BUILT_IN_CLASS. 1687 16881999-09-24 Mark Mitchell <mark@codesourcery.com> 1689 1690 * decl.c (pushdecl): Don't make local declarations of extern 1691 variables give the variable a DECL_CONTEXT for the function. 1692 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify. 1693 Don't accidentally make RTL for local declarations. 1694 (emit_local_var): Handle declarations with asm-specifiers here. 1695 16961999-09-23 Mark Mitchell <mark@codesourcery.com> 1697 1698 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss 1699 STMT_IS_FULL_EXPR_P. 1700 1701 * cp-tree.h (language_function): Add cannot_inline. 1702 * decl.c (start_function): Restore current_function_cannot_inline 1703 from the saved value. 1704 (save_function_data): Save current_function_cannot_inline. 1705 * decl2.c (start_objects): Change prototype. Build the function 1706 in function-at-a-time mode. 1707 (finish_objects): Likewise. 1708 (generate_ctor_or_dtor_function): Adjust accordingly. 1709 1710 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro. 1711 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS. 1712 Don't call expand_anon_union_decl here 1713 * semantics.c (exapnd_stmt): Call it here, instead. 1714 * typeck.c (mark_addressable): Addressed variables are implicitly 1715 used. 1716 17171999-09-23 Martin v. L�wis <loewis@informatik.hu-berlin.de> 1718 1719 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro. 1720 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise. 1721 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK. 1722 * cp-tree.h: Add tree checking macros to various tree access 1723 macros. 1724 * ptree.c (print_lang_decl): Test for function or variable 1725 before accessing template info. 1726 17271999-09-23 Jason Merrill <jason@yorick.cygnus.com> 1728 1729 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node. 1730 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__. 1731 * decl2.c (lang_f_options): Add -fshort-wchar. 1732 * cp-tree.h: Declare flag_short_wchar. 1733 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 1734 int' for wchar_t. 1735 17361999-09-23 Martin v. L�wis <loewis@informatik.hu-berlin.de> 1737 1738 * ir.texi: Fix formatting errors and typos. 1739 17401999-09-22 Mark Mitchell <mark@codesourcery.com> 1741 1742 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT. 1743 1744 * decl.c (pushdecl): Do create a binding for extern "C" functions, 1745 but not for their DECL_ASSEMBLER_NAMEs. 1746 (lookup_name_current_level): Fix formatting. 1747 (xref_tag): Likewise. 1748 * decl2.c (start_objects): Mark static constructors and 1749 destructors as used. 1750 17511999-09-22 Jason Merrill <jason@yorick.cygnus.com> 1752 1753 * decl.c (define_case_label): Don't crash if we're not in a switch. 1754 1755 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags. 1756 * lang-options.h: Restore -fthis-is-variable. Remove help strings 1757 for unsupported flags. 1758 17591999-09-21 Jason Merrill <jason@yorick.cygnus.com> 1760 1761 * decl2.c (lang_decode_option): Accept and ignore -finit-priority. 1762 Accept and warn about -fthis-is-variable. 1763 17641999-09-21 Mark Mitchell <mark@codesourcery.com> 1765 1766 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT, 1767 CLEANUP_STMT, and SCOPE_STMT. 1768 1769 * decl2.c (lang_decode_option): Adjust, in the wake of recent 1770 changes to option processing. 1771 17721999-09-21 Martin v. L�wis <loewis@informatik.hu-berlin.de> 1773 1774 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of 1775 function pointer from pmfs with no object given. 1776 (convert_for_assignment): Do not return error when converting 1777 pmfs. 1778 17791999-09-21 Alex Samuel <samuel@codesourcery.com> 1780 1781 * lex.c (internal_filename): New variable. 1782 (INTERNAL_FILENAME): New macro. 1783 (init_parse): Allocate internal_filename and mark as root. Use it 1784 instead of a string constant. 1785 17861999-09-21 Nathan Sidwell <nathan@acm.org> 1787 1788 Reimplement dynamic cast and catch matching. 1789 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function 1790 * search.c (dynamic_cast_base_recurse): New function. 1791 (get_dynamic_cast_base_type): New function for dynamic cast. 1792 * rtti.c (build_dynamic_cast_1): Determine source and target 1793 class relationship. Call __dynamic_cast_2. 1794 * tinfo.h (__user_type_info::upcast): New catch dispatcher. 1795 (__user_type_info::dyncast): New dynamic cast dispatcher. 1796 (__user_type_info::sub_kind): New nested enumeration. 1797 (__user_type_info::contained_p): sub_kind predicate. 1798 (__user_type_info::contained_public_p): Likewise. 1799 (__user_type_info::contained_nonpublic_p): Likewise. 1800 (__user_type_info::contained_nonvirtual_p: Likewise. 1801 (__user_type_info::upcast_result): New nested struct. 1802 (__user_type_info::dyncast_result): New nested struct. 1803 (*::do_upcast): New catch function. 1804 (*::do_dyncast): New dynamic cast function. 1805 (__user_type_info::find_public_subobj): New dynamic cast 1806 helper dispatcher. 1807 (*::do_find_public_subobj): New dynamic cast helper function. 1808 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher. 1809 (__user_type_info::dyncast): Define dynamic cast dispatcher. 1810 (*::do_upcast): Define catch function. 1811 (*::do_dyncast): Define dynamic cast function. 1812 (*::do_find_public_subobj): Define dynamic cast helper function. 1813 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast. 1814 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast. 1815 (__dynamic_cast_2): New dynamic cast runtime. 1816 18171999-09-20 Mark Mitchell <mark@codesourcery.com> 1818 1819 * cp-tree.h (finish_stmt_expr): Change prototype. 1820 * expr.c (cplus_expand_expr): Adjust call accordingly. 1821 * init.c (finish_init_stmts): Likewise. 1822 * parse.y (primary): Likewise. 1823 * pt.c (tsubst_copy): Likewise. 1824 * semantics.c (finish_stmt_expr): Don't take two parameters. 1825 Don't remove generated BLOCKs from the block-tree. 1826 1827 Remove support for assigning to `this'. 1828 * NEWS: Note that fact. 1829 * class.c (build_vbase_path): Don't check flag_this_is_variable. 1830 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove. 1831 (language_function): Remove assigns_this, just_assigned_this, and 1832 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p. 1833 (base_init_expr): Remove. 1834 (current_vcalls_possible_p): New macro. 1835 (vtbls_set_up_p): Likewise. 1836 (emit_base_init): Change prototype. 1837 * decl.c (finish_destructor_body): New function, split out from 1838 finish_function. 1839 (current_function_assigns_this): Remove. 1840 (current_function_just_assigned_this): Likewise. 1841 (start_function): Don't set them. 1842 (finish_function): Don't check them. Don't emit 1843 base-initialization code here. Generate code for destructors when 1844 doing semantic analysis. 1845 (finish_stmt): Don't check current_function_just_assigned_this. 1846 * decl2.c (lang_f_options): Remove this-is-variable. 1847 (lang_decode_option): Likewise. 1848 (grokclassfn): Don't check flag_this_is_variable. 1849 * init.c (emit_base_init): Return the expression generated. 1850 (construct_virtual_bases): Don't push/pop obstacks. Fix 1851 typo. 1852 (build_new_1): Don't check flag_this_is_variable. 1853 (get_temp_regvar): Don't set DECL_REGISTER. 1854 (build_vec_init): Don't call use_variable. 1855 * lang-options.h: Remove "-fthis-is-variable" and 1856 "-fno-this-is-variable". 1857 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS. 1858 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not 1859 expand_expr_stmt. 1860 * semantics.c (finish_expr_stmt_real): Rename to ... 1861 (finish_expr_stmt): This. Remove assigned_this parameter. 1862 (begin_if_stmt): Call do_pushlevel before starting the statement. 1863 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less 1864 blocks. 1865 (setup_vtbl_ptr): Emit initialization code for bases and members 1866 at semantic-analysis time. Emit code to initialize vtables in 1867 destructors here. 1868 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real. 1869 Don't handle CTOR_INITIALIZER any more. 1870 * typeck.c (build_modify_expr): Don't check for assignments to 1871 this. 1872 (c_expand_return): Don't suggest assigning to `this'. 1873 1874 * Makefile.in (decl.o): Depend on RTL_H. 1875 (decl2.o): Likewise. 1876 (class.o): Likewise. 1877 (call.o): Likewise. 1878 (method.o): Likewise. 1879 (search.o): Likewise. 1880 (tree.o): Likewise. 1881 (pt.o): Likewise. 1882 1883 * decl.c (duplicate_decls): When a builtin function is redeclared 1884 as static, make sure it is mangled correctly. 1885 1886 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add 1887 detail about the statement-tree. 1888 18891999-09-20 Nathan Sidwell <nathan@acm.org> 1890 1891 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER. 1892 18931999-09-20 Nick Clifton <nickc@cygnus.com> 1894 1895 * decl2.c (lang_decode_option): Extend comment. 1896 1897Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk> 1898 1899 * typeck.c: Include "tm_p.h". 1900 19011999-09-19 Mark Mitchell <mark@codesourcery.com> 1902 1903 * ir.texi: New file. 1904 19051999-09-19 Paul Burchard <burchard@pobox.com> 1906 1907 * semantics.c (expand_stmt): Initialize return value. 1908 19091999-09-18 Paul Burchard <burchard@pobox.com> 1910 1911 * gxxint.texi: G++ now implements namespaces. 1912 19131999-09-18 Mark Mitchell <mark@codesourcery.com> 1914 1915 * decl.c (pop_label): Don't warn about unused labels more than 1916 once. 1917 * semantics.c (finish_goto_stmt): Always marked used labels as 1918 used. 1919 1920 * decl.c (layout_var_decl): Change prototype. Call layout_decl 1921 even when the declaration is external. 1922 (cp_finish_decl): Adjust call to layout_var_decl. 1923 * pt.c (tsubst_expr): Make sure to initialize stmt before using it. 1924 19251999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de> 1926 1927 * typeck.c (get_member_function_from_ptrfunc): Always consider 1928 virtuality inside member pointer. 1929 19301999-09-17 Mark Mitchell <mark@codesourcery.com> 1931 1932 Turn on function-at-a-time processing. 1933 * cp-tree.h (doing_semantic_analysis_p): New macro. 1934 (SF_DEFAULT): Define to zero, not SF_EXPAND. 1935 (start_handler_parms): Change prototype. 1936 (expand_start_catch_block): Likewise. 1937 (expand_end_catch_block): Likewise. 1938 (expand_start_eh_spec): Likewise. 1939 (expand_end_eh_spec): Declare. 1940 (finish_handler_parms): Change prototype. 1941 (begin_catch_block): Declare. 1942 (finish_handler): Change prototype. 1943 (do_pushlevel): Declare. 1944 (do_poplevel): Likewise. 1945 * decl.c (pushlevel): Don't create 1946 binding levels when not doing semantic analysis. 1947 (poplevel): Don't pop them. 1948 (pushdecl): Assert that we are never called when not doing 1949 semantic analysis. 1950 (pushdecl_top_level): Use push_to_top_level. 1951 (make_label_decl): Don't fiddle with obstacks. Make RTL For the 1952 label when expanding. 1953 (cp_finish_decl): Only inject for-scope variables when doing 1954 semantic analysis. Add comments. 1955 (start_handler_parms): Return the handler parm. 1956 (start_function): Reorganize. Don't clear DECL_INITIAL if it is 1957 already set. Reinitialize from saved function data if available. 1958 Don't pushlevel when not doing semantic analysis. 1959 (store_parm_decls): Only generate RTL when expanding. Only 1960 pushdecl when doing semantic analysis. Set 1961 current_eh_spec_try_block if appropriate. 1962 (finish_function): Simplify. Use do_pushlevel and do_poplevel. 1963 Combine common code. Don't poplevel when not doing semantic 1964 analysis. 1965 (push_cp_function_context): Don't expand functions without an 1966 explicit call to expand_body. 1967 (mark_lang_function): Make eh_spec_try_block and 1968 x_scope_stmt_stack. 1969 * except.c (expand_end_eh_spec): Don't 1970 declare. 1971 (process_start_catch_block): Likewise. 1972 (push_eh_cleanup): Use finish_decl_cleanup. 1973 (initialize_handler_parm): New function. 1974 (expand_start_catch_block): Use it. 1975 (expand_end_catch_block): Use tree-generation functions, not 1976 RTL-generation functions. 1977 (expand_start_eh_spec): Likewise. 1978 (expand_end_eh_spec): Likewise. 1979 (expand_exception_blocks): Simplify. 1980 (start_anon_func): Use do_pushlevel. 1981 (end_anon_func): Use do_poplvel. Call expand_body for the 1982 function. 1983 * expr.c (do_case): Don't call define_case_label. 1984 * init.c (create_temporary_var): Set DECL_CONTEXT for local 1985 variables. 1986 * method.c (emit_thunk): Call expand_body for the 1987 thunk. 1988 (sythesize_method): Likewise. 1989 * parse.y (handler_args): Give it ttype. 1990 (eat_saved_input): Call expand_body. 1991 (base_init): Use do_pushlevel. 1992 (pending_inline): Call expand_body. 1993 (handler): Adjust calls to finish_handler_parms and 1994 finish_handler. 1995 (handler_args): Don't call expand_start_catch_block. Return the 1996 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling. 1997 * parse.c: Regenerated. 1998 * rtti.c (synthesize_tinfo_fn): Call finish_function. 1999 * semantics.c (do_pushlevel): Give it external linkage. Build 2000 SCOPE_STMTs. 2001 (do_poplevel): Likewise. 2002 (finish_case_label): Call define_case_label when doing semantic 2003 analysis. 2004 (finish_goto_stmt): Create RTL for labels. 2005 (finish_function_try_block): Set in_function_try_handler 2006 unconditionally. 2007 (finish_function_handler_sequence): Unset it. 2008 (finish_handler_parms): Use expand_start_catch_block even when 2009 building a statement-tree. 2010 (begin_catch_block): New function. 2011 (finish_handler): Move a little RTL-generation logic here. 2012 (finish_decl_cleanup): Allow cleanups for empty declarations. 2013 (finish_named_return_value): Don't pushdecl when not doing 2014 semantic analysis. 2015 (expand_stmt): Don't do semantic analysis for variable 2016 declarations. Handle START_CATCH_STMT. Call expand_label 2017 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust 2018 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT. 2019 (expand_body): Let expand_stmt handle CTOR_INITIALIZER, 2020 RETURN_INIT and function try blocks. 2021 2022 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add 2023 x_scope_stmt_stack. Add x_in_charge_parm. 2024 (current_eh_spec_try_block): New macro. 2025 (current_scope_stmt_stack): Likewise. 2026 (current_in_charge_parm): Likewise. 2027 * decl.c (start_function): Initialize current_in_charge_parm. 2028 (finish_function): Use current_in_charge_parm rather than looking 2029 up __in_chrg. 2030 * search.c (expand_indirect_vtbls_init): Likewise. 2031 2032 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps. 2033 (TRY_BLOCK): Likewise. 2034 (HANDLER): Likewise. 2035 (START_CATCH_STMT): New tree node. 2036 (SCOPE_STMT): Likewise. 2037 * cp-tree.h (SCOPE_BEGIN_P): New macro. 2038 (SCOPE_NULLIFIED_P): Likewise. 2039 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy. 2040 (struct lang_decl): Add saved_language_function. 2041 (DECL_PENDING_INLINE_INFO): Adjust documentation. 2042 (DECL_PENDING_INLINE_P): New macro. 2043 (TYPE_TI_ARGS): Fix typo in comment. 2044 (DECL_SAVED_TREE): Add to documentation. 2045 (DECL_SAVED_FUNCTION_DATA): New macro. 2046 (START_CATCH_TYPE): Likewise. 2047 (SCOPE_END_P): New macro. 2048 (declare_parm_level): Don't declare. 2049 * decl.c (mark_lang_function): New function, split out from 2050 mark_cp_function_context. 2051 (save_function_data): New function. 2052 (declare_parm_level): Remove. 2053 (finish_function): Use save_function_data to squirrel away 2054 important stuff for later use. 2055 (mark_cp_function_context): Use mark_function_data. 2056 (lang_mark_tree): Likewise. 2057 * lex.c (begin_definition_of_inclass_inline): Set 2058 DECL_PENDING_INLINE_P. 2059 (store_pending_inline): Clear it. 2060 * pt.c (tsubst_decl): Likewise. 2061 20621999-09-17 Nathan Sidwell <nathan@acm.org> 2063 2064 * call.c (perform_implicit_conversion): Deal with error_mark_node. 2065 20661999-09-17 Mark Mitchell <mark@codesourcery.com> 2067 2068 * decl.c (warn_extern_redeclared_static): Don't get confused by 2069 static member functions. 2070 (duplicate_decls): Merge DECL_THIS_STATIC. 2071 2072 * decl.c (expand_static_init): Make sure assignments to local 2073 statics actually occur. 2074 20751999-09-17 Mark Mitchell <mark@codesourcery.com> 2076 2077 * cp-tree.h (poplevel_class): Declare. 2078 * class.c (popclass): Use poplevel_class, not poplevel. 2079 * decl.c (poplevel_class): Don't make it static. Don't return a 2080 value. 2081 (poplevel): Don't call poplevel_class; abort in a class 2082 binding level is seen. 2083 * semantics.c (finish_translation_unit): Use pop_everything. 2084 * parse.y (member_init): Allow errors. 2085 (pending_inline): Call finish_function. 2086 * parse.c: Regenerated. 2087 * Makefile.in (CONFLICTS): Adjust. 2088 20891999-09-17 Gabriel Dos Reis <gdr@codesourcery.com> 2090 2091 * error.c: Reduce code duplication. 2092 (dump_template_value): New function. 2093 (dump_type_real): Use it. 2094 (dump_decl): Likewise. 2095 (dump_function_name): Likewise. 2096 (dump_function_decl): Don't be too talkative about function return 2097 type variety. 2098 20991999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2100 2101 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero. 2102 2103 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy. 2104 21051999-09-16 Jason Merrill <jason@yorick.cygnus.com> 2106 2107 * decl2.c (finish_file): Also call check_global_declarations for 2108 the pending_statics list. 2109 21101999-09-15 Jason Merrill <jason@yorick.cygnus.com> 2111 2112 * lex.c (cp_pragma_implementation): Allow #pragma implementation 2113 in header files. 2114 21151999-09-15 Richard Henderson <rth@cygnus.com> 2116 2117 * lex.c (mark_impl_file_chain): Follow the next chain. 2118 21191999-09-15 Mark Mitchell <mark@codesourcery.com> 2120 2121 * decl.c (warn_extern_redeclared_static): Simplify. Catch 2122 problems with extern "C" functions redeclared as static. 2123 (duplicate_decls): When a builtin is redeclared static, make the 2124 new function have internal linkage. 2125 21261999-09-15 Mark Mitchell <mark@codesourcery.com> 2127 2128 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR. 2129 * pt.c (tsubst_copy): Likewise. 2130 * tree.c (search_tree): Likewise. 2131 (mapcar): Likewise. 2132 21331999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2134 2135 * typeck2.c (ack): Don't declare progname. 2136 21371999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br> 2138 2139 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy 2140 filenames with ggc_alloc_string. 2141 21421999-09-14 Mark Mitchell <mark@codesourcery.com> 2143 2144 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 2145 TARGET_EXPR. 2146 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on 2147 the TARGET_EXPR. 2148 * cvt.c (build_up_reference): Likewise. 2149 * tree.c (build_cplus_new): Likewise. 2150 (get_target_expr): Likewise. 2151 2152Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org> 2153 2154 * Makefile.in: Prepend $(SHELL) to move-if-change calls. 2155 21561999-09-13 Mark Mitchell <mark@codesourcery.com> 2157 2158 * cp-tree.h (build_target_expr): New function. 2159 * call.c (build_conditional_expr): Use build_target_expr. 2160 (convert_like): Likewise. 2161 (build_over_call): Likewise. 2162 * cvt.c (build_up_reference): Likewise. 2163 * decl.c (build_cleanup_on_safe_obstack): Fold into ... 2164 (destroy_local_var): Here. 2165 (build_target_expr): New function. 2166 * tree.c (build_cplus_new): Use it. 2167 (get_target_expr): Likewise. 2168 21691999-09-13 Nathan Sidwell <nathan@acm.org> 2170 2171 * typeck.c (expr_sizeof): Don't decay arrays and functions. 2172 Remove misleading comment. 2173 (build_compound_expr): Don't decay arrays. 2174 21751999-09-13 Jason Merrill <jason@yorick.cygnus.com> 2176 2177 * call.c (build_conditional_expr): Always use a TARGET_EXPR for 2178 class rvalues again. 2179 2180Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2181 2182 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h. 2183 2184 * g++spec.c: Include gcc.h. 2185 (lang_specific_driver): Constify a char*. Call xcalloc, not 2186 xmalloc/bzero. All calls to the function pointer parameter now 2187 explicitly call `fatal'. 2188 21891999-09-12 Mark Mitchell <mark@codesourcery.com> 2190 2191 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs. 2192 * cvt.c (ocp_convert): Complete the from and destination types. 2193 Adjust warning about functions always being `true' in conditionals. 2194 * decl.c (duplicate_decls): Don't play funny games with abort. 2195 * error.c (dump_expr): Handle OVERLOADs. 2196 * spew.c (probe_obstack): Remove. 2197 * typeck.c (condition_conversion): Use perform_implicit_conversion. 2198 21991999-09-12 Bernd Schmidt <bernds@cygnus.co.uk> 2200 2201 * cp-tree.h (auto_function, define_function): Adjust prototypes. 2202 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers 2203 changed. 2204 (auto_function): Likewise, for CODE arg. 2205 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to... 2206 (builtin_function): ... here. 2207 22081999-09-11 Mark Mitchell <mark@codesourcery.com> 2209 2210 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion. 2211 (init_decl_processing): Don't set TREE_PERMANENT for the 2212 error_mark_node. 2213 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs. 2214 (grokdeclarator): Likewise. 2215 (grokparms): Don't check TREE_PERMANENT when building up lists. 2216 * decl2.c (grokfield): Don't assert TREE_PERMANENT. 2217 (mark_inline_for_output): Likewise. 2218 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT. 2219 * init.c (build_offset_ref): Don't check TREE_PERMANENT. 2220 * lex.c (check_newline): Don't check ggc_p; it is always one. 2221 * pt.c (process_template_parm): Don't check TREE_PERMANENT. 2222 * spew.c (yylex): Don't copy_node or probe_obstacks for 2223 non-permanent CONSTANTs and STRINGs. 2224 * tree.c (build_cplus_array_type_1): Don't fuss with 2225 TREE_PERMANENT on ARRAY_TYPEs. 2226 2227 * cp-tree.def (CLEANUP_STMT): New node. 2228 * cp-tree.h (language_function): Add name_declared. 2229 (current_function_name_declared): New macro. 2230 (CLEANUP_DECL): New macro. 2231 (CLEANUP_EXPR): Likewise. 2232 (emit_local_var): Likewise. 2233 (finish_decl_cleanup): New function. 2234 * cvt.c (build_up_reference): Simplify. 2235 (ocp_convert): Remove dead code. 2236 * decl.c (start_decl): Remove call to add_decl_stmt. 2237 (grok_reference_init): Adjust, to handle bindings temporaries to 2238 references. Remove dead code. 2239 (initialize_local_var): Don't generate RTL for 2240 declarations here, or build cleanups here. Don't fuss with 2241 obstacks. Replace expand_start_target_temps calls with explicit 2242 setting of stms_are_full_exprs_p. 2243 (destroy_local_var): New function. 2244 (emit_local_var): Likewise. 2245 (cp_finish_decl): Use them, as appropriate. 2246 (start_function): Announce template functions. 2247 (store_parm_decls): Don't call declare_function_name here. 2248 (finish_stmt): Don't start emit base-initialization code when just 2249 building the statement-tree. 2250 * init.c (create_temporary_var): Move add_decl_stmt call ... 2251 (get_temp_regvar): Here. 2252 * pt.c (tsubst_expr): Make DECL_INITIAL look like what 2253 cp_finish_decl would expect. Don't call add_decl_stmt. 2254 * semantics.c (begin_compound_stmt): Call declare_function_name, 2255 if appropriate. 2256 (finish_decl_cleanup): New function. 2257 (expand_stmt): Use emit_local_var to output variables. 2258 (expand_body): Set current_function_name_declared. 2259 22601999-09-10 Mark Mitchell <mark@codesourcery.com> 2261 2262 * cp-tree.h (finish_cleanup_try_block): New function. 2263 * semantics.c (finish_cleanup_try_block): Add comment. 2264 2265Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk> 2266 2267 * cp-tree.h: Delete declarations for all tree nodes now moved to 2268 global_trees. 2269 * decl.c: Delete their definitions. 2270 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE, 2271 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't 2272 provide defaults. 2273 (init_decl_processing): Call build_common_tree_nodes and 2274 build_common_tree_nodes_2 instead of building their nodes here. 2275 Don't add gc roots for them. 2276 22771999-09-10 Mark Mitchell <mark@codesourcery.com> 2278 2279 * cp-tree.h (language_function): Rename expanding_p to 2280 x_expanding_p. Rename named_label_uses to x_named_label_uses. 2281 (expanding_p): Adjust accordingly. 2282 (TREE_VIA_PRIVATE): Fix typo in comment. 2283 (DECL_REFERENCE_SLOT): Remove. 2284 (SET_DECL_REFERENCE_SLOT): Likewise. 2285 * decl.c (named_label_uses): Adjust. Remove chicken comment. 2286 (push_overloaded_decl): Don't truncate the chain of bindings when 2287 adding an overloaded function. 2288 (grok_reference_init): Don't use DECL_REFERENCE_SLOT. 2289 (initialize_local_var): Fix typo in comment. 2290 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up. 2291 * decl2.c (start_objects): Make the fact that we are expanding 2292 the generated function right away explicit. 2293 (start_static_storage_duration_function): Likewise. 2294 (finish_file): Fix typo in comment. 2295 * init.c (build_vec_init): Correct bugs in handling cleanups. 2296 * semantics.c (maybe_convert_cond): New function. 2297 (FINISH_COND): Always store the condition, even if there's 2298 a declaration. 2299 (finish_if_stmt_cond): Use maybe_convert_cond. 2300 (finish_while_stmt_cond): Likewise. 2301 (finish_do_stmt): Likewise. 2302 (finish_for_cond): Likewise. 2303 (expand_cond): Adjust. 2304 2305 * cp-tree.h (FN_TRY_BLOCK_P): New macro. 2306 * init.c (perform_member_init): Remove obstack machinations. 2307 (expand_cleanup_for_base): Likewise. 2308 (finish_init_stmts): Mark the statement-expression as used. 2309 * method.c (emit_thunk): Use tree-generating functions, not 2310 RTL. 2311 (do_build_copy_constructor): Likewise. 2312 (do_build_assign_ref): Likewise. 2313 (synthesize_method): Likewise. Keep track of line numbers. 2314 * pt.c (tsubst_expr): Handle various kinds of try blocks. 2315 * semantics.c (expand_stmts): Remove. 2316 (begin_function_try_block): Set FN_TRY_BLOCK_P. 2317 (finish_function_try_block): Be careful rechaining 2318 function try blocks. 2319 (expand_stmt): Loop through all the statements at a given level. 2320 (exapnd_body): Be careful with line-numbers here too. Prepare for 2321 being called directly from the parser. 2322 2323 * cp-tree.h (finish_function): Adjust prototype. 2324 * decl.c (finish_function): Return the function compiled. 2325 * pt.c (instantiate_decl): Don't play games with obstacks. 2326 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF. 2327 (search_tree): Likewise. 2328 * typeck.c: Fix typo in comment. 2329 * typeck2.c (store_init_value): Add comment. 2330 2331 * cp-tree.h (CPTI_ATEXIT): New macro. 2332 (atexit_node): Likewise. 2333 * decl.c (destroy_local_static): New function, broken out from ... 2334 (expand_static_init): Here. 2335 2336 * rtti.c (get_tinfo_var): These should always be global 2337 (expand_si_desc): Use tree, not RTL, functions to generate code. 2338 (expand_class_desc): Likewise. 2339 (expand_ptr_desc): Likewise. 2340 (expand_attr_desc): Likewise. 2341 (expand_generic_desc): Likewise. 2342 (synthesize_tinfo_fn): Likewise. 2343 23441999-09-09 Mark Mitchell <mark@codesourcery.com> 2345 2346 * semantics.c (RECHAIN_STMTS): Remove `last' parameter. 2347 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with 2348 RECHAIN_STMTS. 2349 (RECHAIN_STMST_FROM_CHAIN): Likewise. 2350 2351 * parse.y (simple_stmt): Fix typo in last change. 2352 2353 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro. 2354 (STMT_IS_FULL_EXPR_P): Likewise. 2355 (STMT_LINENO_FOR_FN_P): Likewise. 2356 (prep_stmt): New function. 2357 (building_stmt_tree): Tweak for safety. 2358 * pt.c (tsubst_expr): Use prep_stmt throughout. 2359 (add_tree): Move it to semantics.c 2360 * semantics.c (add_tree): Move it here. 2361 (finish_expr_stmt_real): New function. 2362 (finish_expr_stmt): Use it. 2363 (finish_if_stmt_cond): Use FINISH_COND. 2364 (finish_while_stmt_cond): Likewise. 2365 (finish_for_cond): Likewise. 2366 (finish_stmt_tree): Tweak line-number handling. 2367 (prep_stmt): New function. 2368 (expand_stmt): Use it. 2369 2370 * cp-tree.h (begin_switch_stmt): Adjust prototype. 2371 (finish_switch_cond): Likewise. 2372 * parse.y (simple_stmt): Adjust accordingly. 2373 * parse.c: Regenerated. 2374 * pt.c (tsubst_expr): Adjust accordingly. 2375 * semantics.c (expand_cond): New function. 2376 (FINISH_COND): New macro. 2377 (begin_switch_stmt): Build the SWITCH_STMT here. 2378 (finish_switch_stmt_cond): Not here. 2379 (expand_stmt): Adjust calls to begin_switch_stmt and 2380 finish_switch_cond. Use expand_cond throughout. 2381 2382 * dump.c (dequeue_and_dump): Dump types for constants. 2383 Describe DECL_ARG_TYPE more intuitively. 2384 Handle ARRAY_REF. 2385 2386 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC. 2387 (lang_cleanup_tree): Remove. 2388 * lex.c (make_lang_type): Use ggc_alloc to allocate 2389 TYPE_LANG_SPECIFIC. 2390 2391 Reorganize per-function data. 2392 * cp-tree.h (saved_scope): Add function_decl, bindings. 2393 (language_function): Rename binding_level to bindings. 2394 (cp_function_chain): Use the current_function, not the 2395 outer_function_chain. 2396 (current_class_ptr): Make it work, even when there's no 2397 current function. 2398 (current_class_ref): Likewise. 2399 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 2400 macros. 2401 (clear_temp_name): Remove. 2402 * decl.c (check_function_type): New function, broken out from 2403 start_function. 2404 (current_binding_level): Adjust definition. 2405 (pushlevel): Simplify. 2406 (poplevel): Don't use named_label_uses when we're outside 2407 a function scope. 2408 (mark_saved_scope): Mark function_decl and bindings. 2409 (maybe_push_to_top_level): Don't unconditionally push a new 2410 function context. Save bindings and the current_function_decl. 2411 Don't clear named_labels. 2412 (pop_from_top_level): Pop function context if appropriate. 2413 (init_decl_processing): Set init_lang_status and free_lang_status, 2414 rather than save_lang_status and restore_lang_status. 2415 (start_function): Take SF_* flags. Don't clear per-function data. 2416 Reorder and simplify to use new per-function data code. Add 2417 asserts. 2418 (store_parm_decls): Don't call init_function_start here. 2419 (finish_function): Adjust for new handling of per-function data. 2420 (push_cp_function_context): Simplify. 2421 (mark_cp_function_context): Change binding_level to bindings. 2422 * decl2.c (clear_temp_name): Remove. 2423 (start_objects): Use SF flags to start_function. 2424 (start_static_storage_duration_function): Likewise. 2425 * except.c (start_anon_func): Remove redundant calls to 2426 push_function_context_to. Use SF flags to start function. 2427 (end_anon_func): Remove redundant call to pop_function_context 2428 from. 2429 * lex.c (reinit_parse_for_function): Don't initialize per-function 2430 data. 2431 * method.c (emit_thunk): Clear current_function after calling 2432 assemble_end_function. Use SF flags for start_function. 2433 (synthesize_method): Use SF flags for start_function. 2434 * parse.c: Regenerated. 2435 * parse.y (fn.defpen): Likewise. 2436 (pending_inline): Clear current_function, even if something goes 2437 wrong. 2438 * pt.c (instantiate_decl): Use SF flags to start_function. 2439 Don't save and restore expanding_p. 2440 (add_tree): Handle the case where we are outside any function. 2441 (end_tree): Likewise. 2442 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function. 2443 * semantics.c (begin_function_definition): Likewise. 2444 (expand_body): Likewise. 2445 24461999-09-09 Nathan Sidwell <nathan@acm.org> 2447 2448 * cp-tree.h (convert_to_void): Prototype new function. 2449 (require_complete_type_in_void): Remove prototype. 2450 * cvt.c (convert_to_void): New function. 2451 (ocp_convert): Use convert_to_void. 2452 * decl.c (cplus_expand_expr_stmt): Likewise, for complete 2453 expressions. 2454 * typeck.c (require_complete_type_in_void): Remove function. 2455 (build_compound_expr): Use convert_to_void. 2456 (build_static_cast): Likewise. 2457 (build_c_cast): Likewise. 2458 * semantics.c (finish_expr_stmt): Do not decay full expressions. 2459 2460 * typeck.c (build_x_compound_expr): Add FIXME. 2461 24621999-09-08 Mark Mitchell <mark@codesourcery.com> 2463 2464 * cp-tree.h (scratch_tree_cons): Remove. 2465 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons, 2466 and perm_tree_cons with plain tree_cons. 2467 * class.c: Likewise. 2468 * decl.c: Likewise. 2469 * decl2.c: Likewise. 2470 * except.c: Likewise. 2471 * expr.c: Likewise. 2472 * init.c: Likewise. 2473 * lex.c: Likewise. 2474 * method.c: Likewise. 2475 * parse.y: Likewise. 2476 * pt.c: Likewise. 2477 * repo.c: Likewise. 2478 * rtti.c: Likewise. 2479 * search.c: Likewise. 2480 * typeck.c: Likewise. 2481 * parse.c: Regenerated. 2482 * tree.c (build_srcloc): Simplify. 2483 24841999-09-08 Bruce Korb autogen@linuxbox.com 2485 2486 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails. 2487 24881999-09-08 Mark Mitchell <mark@codesourcery.com> 2489 2490 * cp-tree.h (lang_decl_flags): Remove permanent_attr. 2491 Remove next. 2492 (LANG_DECL_PERMANENT): Remove. 2493 * decl.c (duplicate_decls): Don't mess about with obstacks trying 2494 to free memory. 2495 (lang_mark_tree): Mark DECL_LANG_SPECIFIC. 2496 * lex.c (free_lang_decl_chain): Remove. 2497 (build_lang_decl): Don't use obstacks. 2498 (retrofit_lang_decl): Likewise. 2499 (copy_lang_decl): Likewise. 2500 2501 * cp-tree.h (saved_scope): Remove old_binding_level and 2502 function_decl. Tidy up. 2503 * decl.c (mark_saved_scope): Don't set them. 2504 (maybe_push_to_top_level): Clear memory. 2505 2506 * decl.c (layout_var_decl): Change prototype. Don't complete 2507 types for external objects. 2508 (check_initializer): Likewise. Tidy. 2509 (initialize_local_var): Complete types here. 2510 (cp_finish_decl): Not here. Reorganize a little. 2511 (grokvardecl): Don't complete types here. 2512 2513 * decl.c (start_function): Clear last_dtor_insn and 2514 last_parm_cleanup_insn. 2515 (push_cp_function_context): Just copy over a little of 2516 the old context, not all of it. 2517 2518 * cp-tree.h (copy_to_permanent): Remove. 2519 (permanent_p): Likewise. 2520 * decl.c (building_typename_type): Don't use copy_to_permanent. 2521 (start_decl): Likewise. 2522 (grok_reference_init): Likewise. 2523 (cp_finish_decl): Likewise. 2524 * init.c (build_new_1): Don't use mapcar. 2525 (build_vec_delete_1): Don't use copy_to_permanent. 2526 (build_vec_init): Likewise. 2527 * parse.y (primary): Likewise. 2528 * parse.c: Regenerated. 2529 * pt.c (push_template_decl_real): Don't use copy_to_permanent. 2530 (lookup_template_class): Likewise. 2531 (tsubst_friend_function): Likewise. 2532 (instantiate_class_template): Likewise. 2533 (tsubst_decl): Likewise. 2534 (tsubst): Likewise. 2535 (instantiate_template): Likewise. 2536 (unify): Likewise. 2537 * rtti.c (get_tinfo_fn): Likewise. 2538 (build_dynamic_cast): Likewise. 2539 * semantics.c (finish_if_stmt_cond): Likewise. 2540 (finish_while_stmt_cond): Likewise. 2541 (finish_do_stmt): Likewise. 2542 (finish_for_cond): Likewise. 2543 (finish_for_expr): Likewise. 2544 (finish_cleanup): Likewise. 2545 (add_decl_stmt): Likewise. 2546 (finish_named_return_value): Likewise. 2547 (finish_qualified_call_expr): Likewise. 2548 * tree.c (perm_manip): Remove. 2549 (build_exception_variant): Don't use copy_to_permanent. 2550 (permanent_p): Remove. 2551 (copy_to_permament): Remove. 2552 (build_min_nt): Don't use copy_to_permanent. 2553 (build_min): Likewise. 2554 (min_tree_cons): Likewise. 2555 * typeckc.c (build_static_cast): Likewise. 2556 (build_reinterpret_cast): Likewise. 2557 (build_const_cast): Likewise. 2558 25591999-09-07 Mark Mitchell <mark@codesourcery.com> 2560 2561 * decl.c (ggc_p): Set it to 1. 2562 (mark_saved_scope): Add prototype. 2563 25641999-09-07 Richard Henderson <rth@cygnus.com> 2565 2566 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete. 2567 * typeck.c (self_promoting_args_p): Delete. 2568 25691999-09-07 Jason Merrill <jason@yorick.cygnus.com> 2570 2571 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT. 2572 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove. 2573 25741999-09-07 Mark Mitchell <mark@codesourcery.com> 2575 2576 * Makefile.in (tree.o): Depend on ggc.h. 2577 * class.c (make_method_vec): Remove. 2578 (free_method_vec): Likewise. 2579 (free_method_vecs): Remove. 2580 (add_method): Don't use them. 2581 * cp-tree.def (PTRMEM_CST): Make it longer. 2582 (TEMPLATE_PARM_INDEX): Make it shorter. 2583 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro. 2584 (template_parm_index): Remove RTL field. 2585 (ptrmem_cst): Add RTL field. 2586 (finish_function): Removed parameter. 2587 (process_next_inline): Change prototype. 2588 (init_cplus_unsave): Rename to init_tree. 2589 (binding_init): Remove. 2590 * decl.c (free_binding_nodes): Remove. 2591 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P. 2592 (pop_binding): Don't use free_binding_nodes. 2593 (free_binding_vecs): Remove. 2594 (store_bindings): Don't use them. 2595 (pop_from_top_level): Likewise. 2596 (lookup_namespace_name): Simplify. 2597 (build_typename_type): Don't use obstack_free. 2598 (unqualified_namespace_lookup): Simplify. 2599 (lookup_name_real): Simplify. 2600 (start_function): Remove comment about leaks. 2601 (finish_function): Removed nested parameter. Call 2602 expand_end_bindings even when building_stmt_tree. 2603 Call ggc_push_context and ggc_pop_context around 2604 rest_of_compilation, if necessary. 2605 (mark_cp_function_context): Handle a NULL language-context. 2606 (lang_mark_false_label_stack): Fix typo. 2607 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD, 2608 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on 2609 pointer to method types. 2610 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC. 2611 * decl2.c (finish_objects): Adjust call to finish_function. 2612 (finish_static_store_duration_function): Likewise. 2613 (do_nonmember_using_decl): Remove call to binding_init. 2614 * except.c (end_anon_func): Adjust call to finish_function. 2615 * lex.c (mark_impl_file_chain): New function. 2616 (init_parse): Call init_tree, not init_cplus_unsave. 2617 Add GC roots. 2618 (cp_pramga_interface): Use xmalloc, not permalloc. 2619 (cp_pragma_implementation): Likewise. 2620 (begin_definition_of_inclass_inline): Simplify. 2621 (process_next_inline): Adjust prototype. 2622 (do_scoped_id): Don't call binding_init. 2623 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc. 2624 * method.c (emit_thunk): Adjust call to finish_function. 2625 (synthesize_method): Likewise. 2626 * parse.y (%union): Add a new `pi' variant. 2627 (PRE_PARSED_FUNCTION_DECL): Use it. 2628 (fn.defpen): Likewise. 2629 (fndef): Adjust call to finish_function. 2630 * pt.c (instantiate_decl): Likewise. 2631 * rtti.c (syntheisze_tinfo_fn): Likewise. 2632 * semantics.c (expand_body): Likewise. 2633 * tree.c: Include ggc.h. 2634 (mark_list_hash): New function. 2635 (binding_init): Remove. 2636 (init_cplus_unsave): Rename to ... 2637 (init_tree): This. Add GC roots. 2638 26391999-09-05 Mark Mitchell <mark@codesourcery.com> 2640 2641 Get ready for garbage collection. 2642 * Makefile.in (CXX_TREE_H): Add varray.h 2643 (lex.o): Depend on ggc.h. 2644 (decl.o): Likewise. 2645 (decl2.o): Likewise. 2646 (method.o): Likewise. 2647 (search.o): Likewise. 2648 (pt.o): Likewise. 2649 (repo.o): Likewise. 2650 * class.c: Include ggc.h. 2651 (current_class_name): Remove. 2652 (current_class_type): Likewise. 2653 (current_access_specifier): Likewise. 2654 (previous_class_type): Likewise. 2655 (previous_class_values): Likewise. 2656 (class_cache_firstobj): Likewise. 2657 (current_lang_base): Likewise. 2658 (current_lang_stack): Likewise. 2659 (current_lang_stacksize): Likewise. 2660 (lang_name_c): Likewise. 2661 (lang_name_cplusplus): Likewise. 2662 (lang_name_java): Likewise. 2663 (current_lang_name): Likewise. 2664 (base_layout_decl): Likewise. 2665 (access_default_node): Likewise. 2666 (access_public_node): Likewise. 2667 (access_protected_node): Likewise. 2668 (access_private_node): Likewise. 2669 (access_default_virtual_node): Likewise. 2670 (access_public_virtual_node): Likewise. 2671 (access_protected_virtual_node): Likewise. 2672 (access_private_virtual_node): Likewise. 2673 (signed_zero_node): Likewise. 2674 (init_class_processing): Don't build base_layout_decl. 2675 (push_lang_context): Adjust now that current_lang_base is a varray. 2676 (pop_lang_context): Likewise. 2677 * cp-tree.h: Include varray.h. 2678 (cp_global_trees): Add access_default, access_public, 2679 access_protected, access_private, access_default_virtual, 2680 access_public_virtual, access_protected_virtual, 2681 access_private_virtual, ctor_identifier, delta2_identifier, 2682 delta_identifier, dtor_identifier, in_charge_identifier, 2683 index_identifier, nelts_identifier, this_identifier, 2684 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier, 2685 lang_name_c, lang_name_cplusplus, lang_name_java, 2686 empty_except_spec, null, jclass, minus_one, terminate. 2687 (saved_scope): Move here from decl.c. Define globals in terms of 2688 saved_scope: current_namespace, current_class_name, 2689 current_class_type, current_access_specifier, current_lang_stack, 2690 current_lang_base, current_lang_name, current_function_parms, 2691 current_template_parms, processing_template_decl, 2692 processing_specialization, processing_explicit_instantiation, 2693 previous_class_type, previous_class_values, class_cache_firstobj. 2694 (scope_chain): New variable. 2695 (init_pt): New function. 2696 * decl.c (current_namespace): Remove. 2697 (this_identifier, in_charge_identifier, ctor_identifier): Likewise. 2698 (dtor_identifier, pfn_identifier, index_identifier): Likewise. 2699 (delta_identifier, delta2_identifier): Likewise. 2700 (pfn_or_delta2_identifier, tag_identifier): Likewise 2701 (vt_off_identifier, empty_except_spec, null_node): Likewise. 2702 (current_function_parms, current_lang_base): Remove. 2703 (current_lang_stack, previous_class_values): Remove. 2704 (class_binding_level): Macroize. 2705 (saved_scope): Remove. 2706 (current_saved_scope): Rename to scope_chain. 2707 (mark_saved_scope): Adjust for new scope structure. 2708 (maybe_push_to_top_level): Likewise. 2709 (pop_from_top_level): Likewise. 2710 (duplicate_decls): Adjust now that current_lang_base is a varray. 2711 (build_typename_type): Call ggc_add_tree_hash_table_root. 2712 (init_decl_processing): Call init_pt. Call push_to_top_level to 2713 set up globals. Add GC roots. 2714 (xref_basetypes): Adjust now that current_lang_base is a varray. 2715 * decl.h (this_identifier): Remove. 2716 (in_charge_identifier): Likewise. 2717 * decl2.c: Don't include varray.h. 2718 (current_namespace): Remove. 2719 (init_decl2): Add GC roots. 2720 * except.c (Terminate): Remove. 2721 (init_exception_processing): Use terminate_node instead. 2722 (build_terminate_handler): Likewise. 2723 * init.c (nc_nelts_field_id): Remove. 2724 (minus_one): Likewise. 2725 (init_init_processing): Use minus_one_node and nelts_identifier 2726 instead. Add GC roots. 2727 (jclass_node): Remove. 2728 (build_new_1): Use nelts_identifier. 2729 (build_vec_init): Likewise. 2730 (build_vec_delete): Likewise. 2731 * lex.c: Include ggc.h. 2732 (defarg_fn): Move declaration early. 2733 (defarg_parms): Likewise. 2734 (init_parse): Add GC roots. 2735 (handle_cp_pragma): Remove redundant declaration of 2736 pending_vtables. 2737 * method.c: Include ggc.h. 2738 (btypelist): Make it a varray. All uses changed. 2739 (ktypelist): Likewise. 2740 (init_method): Add GC roots. 2741 * pt.c: Don't include varray.h. Include ggc.h. 2742 (current_template_parms): Remove. 2743 (processing_template_decl): Likewise. 2744 (processing_specialization): Likewise. 2745 (processing_explicit_instantiation): Likewise. 2746 (init_pt): New function. 2747 * repo.c: Include ggc.h. 2748 (init_repo): Add GC roots. 2749 * search.c: Don't include varray.h. 2750 (_vptr_name): Remove. 2751 (lookup_field_1): Use vtpr_identifier instead. 2752 (expand_indirect_vtbls_init): Remove redundant declaration of 2753 in_charge_identifier. 2754 (init_search_processing): Use vptr_identifier. 2755 27561999-09-05 Richard Henderson <rth@cygnus.com> 2757 Bernd Schmidt <bernds@cygnus.co.uk> 2758 Mark Mitchell <mark@codesourcery.com> 2759 2760 * Makefile.in (parse.o): Depend on ggc.h. 2761 (decl2.o): Depend on ggc.h. 2762 (init.o): Depend on ggc.h. 2763 * cp-tree.h (init_decl2): Declare. 2764 (cp_parse_init): Likewise. 2765 * decl.c (ggc_p): Define to zero. 2766 (mark_saved_scope): New function. 2767 (init_decl_processing): Call cp_parse_init, and cp_decl2. 2768 Register GC roots. 2769 (expand_static_init): Add GC roots. 2770 * decl2.c: Include ggc.h. 2771 (init_decl2): New function. 2772 * init.c: Include ggc.h. 2773 (init_init_processing): Add GC roots. 2774 * parse.y: Include ggc.h. 2775 (cp_parse_init): New function. 2776 27771999-09-04 Mark Mitchell <mark@codesourcery.com> 2778 2779 * decl.c (init_decl_processing): Set mark_lang_status. 2780 (lang_mark_false_label_stack): Adjust prototype. 2781 * decl2.c (grok_function_init): Remove extraneous declaration of 2782 abort_fndecl. 2783 2784 * Make-lang.in (cc1plus): Remove dependency on GGC. 2785 * Makefile.in (OBJS): Don't mention ggc-simple.o. 2786 (OBJDEPS): Don't mention ggc-simple.o. 2787 2788 * Make-lang.in (cc1plus): Depend on $(GGC). 2789 * Makefile.in (OBJS): Add ggc-simple.o. 2790 (OBJDEPS): Likewise. 2791 * cp-tree.h (language_function): Rename members to `x_' versions; 2792 we now have x_named_labels, x_ctor_label, x_dtor_label, 2793 x_base_init_list, x_member_init_list, x_base_init_expr, 2794 x_current_class_ptr, x_current_class_ref, x_last_tree, 2795 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and 2796 x_result_rtx. 2797 (dtor_label, ctor_label, current_base_init_list, 2798 current_member_init_list, base_init_expr, current_class_ptr, 2799 current_class_ref, last_tree, last_expr_type): Adjust accordingly. 2800 * decl.c: Include ggc.h. 2801 (last_dtor_insn): Adjust to use x_ names. 2802 (last_parm_cleanup_insn): Likewise. 2803 (original_result_rtx): Likewise. 2804 (named_labels): Likewise. 2805 (mark_binding_level): New function. 2806 (mark_cp_function_context): Likewise. 2807 (mark_false_label_stack): Likewise. 2808 (lang_mark_tree): Likewise. 2809 (lang_cleanup_tree): Likewise. 2810 28111999-09-03 Mark Mitchell <mark@codesourcery.com> 2812 2813 * Makefile.in (CXX_TREE_H): Include function.h. 2814 (decl.o): Don't depend on function.h. 2815 (decl2.o): Likewise. 2816 (typeck.o): Likewise. 2817 (init.o): Likewise. 2818 (method.o): Likewise. 2819 * cp-tree.h: Include function.h. 2820 (cp_function): Rename to language_function. Remove next. 2821 (cp_function_chain): Make it a macro, not a variable. 2822 (push_cp_function_context): Don't declare. 2823 (pop_cp_function_context): Likewise. 2824 * decl.c: Don't include function.h. 2825 (push_cp_function_context): Make it static. Make it suitable for 2826 a save_lang_status callback. 2827 (pop_cp_function_context): Likewise. 2828 (maybe_push_to_top_level): Call push_function_context_to, not 2829 push_cp_function_context. 2830 (pop_from_top_level): Call pop_function_context_from, not 2831 pop_cp_function_context. 2832 (init_decl_processing): Set save_lang_status and 2833 restore_lang_status. Call push_function_context_to, not 2834 push_cp_function_context. 2835 (cp_function_chain): Remove. 2836 * decl2.c: Don't include function.h. 2837 * except.c: Don't include function.h. 2838 (start_anon_func): Call push_function_context_to, not 2839 push_cp_function_context. 2840 (end_anon_func): Call pop_function_context_from, not 2841 pop_cp_function_context. 2842 * init.c: Don't include function.h. 2843 * lex.c (begin_definition_of_inclass_inline): Call 2844 push_function_context_to, not push_cp_function_context. 2845 (process_next_inline): Call pop_function_context_from, not 2846 pop_cp_function_context. 2847 * method.c: Don't include function.h. 2848 (synthesize_method): Call push_function_context_to, not 2849 push_cp_function_context. Call pop_function_context_from, not 2850 pop_cp_function_context. 2851 * typeck.c: Don't include function.h. 2852 2853 * decl.c (expand_static_init): Tweak handling of static 2854 initializations for objects without constructors. 2855 28561999-09-03 Nathan Sidwell <nathan@acm.org> 2857 2858 * typeck.c (build_indirect_ref): Reject dereference of pointer to 2859 void. 2860 28611999-09-02 Mark Mitchell <mark@codesourcery.com> 2862 2863 * cp-tree.h (cp_function): Move here, from decl.c. 2864 (cp_function_chain): Declare. 2865 (dtor_label): New macro, instead of variable. 2866 (ctor_label): Likewise. 2867 (current_base_init_list): Likewise. 2868 (current_member_init_list): Likewise. 2869 (base_init_expr): Likewise. 2870 (current_class_ptr): Likewise. 2871 (current_class_ref): Likewise. 2872 (last_tree): Likewise. 2873 (last_expr_type): Likewise. 2874 (current_function_returns_value): Likewise. 2875 (current_function_returns_null): Likewise. 2876 (current_function_just_assigned_this): Likewise. 2877 (current_function_parms_stored): Likewise. 2878 (temp_name_counter): Likewise. 2879 (static_labelno): Likewise. 2880 (expanding_p): Likewise. 2881 (stmts_are_full_exprs_p): Likewise. 2882 (in_function_try_handler): Likewise. 2883 (lang_type): Remove nested type_flags. All uses changed. 2884 * call.c (ctor_label): Remove. 2885 (dtor_label): Likewise. 2886 * class.c (current_class_ptr): Remove. 2887 (current_class_ref): Likewise. 2888 * decl.c (static_labelno): Remove. 2889 (dtor_label): Likewise. 2890 (last_dtor_insn): New macro, instead of variable. 2891 (last_parm_cleanup_insn): Likewise. 2892 (original_result_rtx): Likewise. 2893 (in_function_try_handler): Remove. 2894 (named_label_uses): New macro, instead of variable. 2895 (named_labels): Likewise. 2896 (current_function_returns_value): Remove. 2897 (current_function_returns_null): Likewise. 2898 (current_function_assigns_this): New macro, instead of variable. 2899 (current_function_just_assigned_this): Likewise. 2900 (current_binding_level): Likewise. 2901 (init_decl_processing): Call push_cp_function_context. 2902 (cp_function): Move to cp-tree.h 2903 (cp_function_chain): Make it global. 2904 (temp_name_counter): Remove. 2905 (push_cp_function_context): Simplify. 2906 (pop_cp_function_context): Likewise. 2907 * decl2.c (temp_name_counter): Remove. 2908 * init_c (current_base_init_list): Likewise. 2909 (current_member_init_list): Likewise. 2910 (base_init_expr): Likewise. 2911 * method.c (static_labelno): Likewise. 2912 * pt.c (last_tree): Likewise. 2913 * semantics.c (expanding_p): Likewise. 2914 (stmts_are_full_exprs_p): Likewise. 2915 (last_expr_type): Likewise. 2916 * typeck.c (dtor_label): Likewise. 2917 (ctor_label): Likewise. 2918 29191999-09-01 Alex Samuel <samuel@codesourcery.com> 2920 2921 * decl2.c (arg_assoc_template_arg): New prototype. New function. 2922 (arg_assoc_class): Use arg_assoc_template_arg for template 2923 arguments. 2924 (arg_assoc): Likewise. 2925 * pt.c (mangle_class_name_for_template): Allow member template 2926 template arguments. 2927 29281999-09-02 Nathan Sidwell <nathan@acm.org> 2929 2930 * call.c (build_conditional_expr): Warn on enum mismatches. 2931 (convert_arg_to_ellipsis): Move non-pod check to after 2932 conversion. 2933 29341999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2935 2936 * gxx.gperf (hash, is_reserved_word): Add prototypes. 2937 2938 * init.c (build_vec_init): Initialize variable `try_block'. 2939 2940 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts. 2941 Likewise for bzero/memset. 2942 (token_getch, token_put_back): Add static prototypes. Remove 2943 `inline' from the definitions. 2944 (retrofit_lang_decl): Call memset, not bzero, to avoid casts. 2945 29461999-09-01 Mark Mitchell <mark@codesourcery.com> 2947 2948 * cp-tree.h (lang_type): Move align into type_flags. 2949 (CLASSTYPE_ALIGN): Adjust accordingly. 2950 * call.c (direct_reference_binding): Remove misleading comment. 2951 29521999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2953 2954 * parse.y (language_string): Constify. 2955 29561999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2957 2958 * repo.c (getpwd): Don't prototype. 2959 * xref.c (getpwd): Likewise 2960 29611999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2962 2963 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a. 2964 Remove hacks for stuff which now comes from libiberty. 2965 29661999-08-30 Jason Merrill <jason@yorick.cygnus.com> 2967 2968 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo. 2969 29701999-08-30 Mark Mitchell <mark@codesourcery.com> 2971 2972 * cp-tree.h (begin_init_stmts): Declare. 2973 (finish_init_stmts): Likewise. 2974 * cvt.c (build_up_reference): Wrap the declaration of a temporary 2975 in a statement-expression so that we will see it when expanding 2976 tree structure later. 2977 * init.c (begin_init_stmts): Don't make it static. 2978 (finish_init_stmts): Likewise. 2979 2980 * cp-tree.h (start_handler_parms): New function. 2981 (expand_start_catch_block): Take only one parameter. 2982 (start_handler_parms): New function. 2983 * decl.c (start_handler_parms): Define it. 2984 * except.c (process_start_catch_block): Take only one parameter. 2985 Don't call grokdeclarator here. 2986 (expand_start_catch_block): Don't call grokdeclarator here, 2987 either. 2988 * parse.y (handler_args): Adjust call to 2989 expand_start_catch_block. Use start_handler_parms. 2990 * pt.c (push_template_decl_real): Make permanent lists have 2991 permanent elements. 2992 (tsubst_expr): Adjust calls to expand_start_catch_block 2993 appropriately. 2994 * semantics.c (expand_stmt): Likewise. 2995 29961999-08-29 Alex Samuel <samuel@codesourcery.com> 2997 2998 * pt.c (push_template_decl_real): Use template declaration from 2999 class type if it exists. 3000 30011999-08-29 Mark Mitchell <mark@codesourcery.com> 3002 3003 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition. 3004 (maybe_inject_for_scope_var): Declare it. 3005 (initialize_local_var): Likewise. 3006 * decl.c (maybe_inject_for_scope_var): Make it global. 3007 (initialize_local_var): Likewise. Move cleanup handling here, 3008 from cp_finish_decl. 3009 (make_rtl_for_nonlocal_decl): Use 3010 push_obstacks_nochange/pop_obstacks, rather than 3011 end_temporary_allocation/resume_temporary_allocation. 3012 (cp_finish_decl): Try to complete the type of a variable when it 3013 is declared. Move cleanup-handling to initialize_local_var. 3014 (expand_static_init): Use tree-building code, rather than 3015 RTL-building code. 3016 * decl2.c (get_temp_name): Assert non-initializedness of 3017 temporaries. 3018 * init.c (create_temporary_var): Move RTL-assigning code to ... 3019 (get_temp_regvar): Here. 3020 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here. 3021 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just 3022 call initialize_local_var to generate initialization code. 3023 30241999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3025 3026 * cp-tree.h (fndecl_as_string, type_as_string, 3027 type_as_string_real, args_as_string, decl_as_string, 3028 expr_as_string, code_as_string, language_as_string, 3029 parm_as_string, op_as_string, assop_as_string, cv_as_string, 3030 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*. 3031 3032 * errfn.c (cp_printer): Likewise. 3033 3034 * error.c (cp_printer, fndecl_as_string, type_as_string_real, 3035 type_as_string, expr_as_string, decl_as_string, lang_decl_name, 3036 cp_file_of, code_as_string, language_as_string, parm_as_string, 3037 op_as_string, assop_as_string, args_as_string, cv_as_string): 3038 Likewise. 3039 3040 * tree.c (lang_printable_name): Likewise. 3041 30421999-08-28 Richard Henderson <rth@cygnus.com> 3043 3044 * decl2.c (arg_assoc_class): Bail if the class is a builtin type. 3045 30461999-08-28 Mark Mitchell <mark@codesourcery.com> 3047 3048 * cp-tree.h (strip_array_types): New function. 3049 * decl.c (maybe_deduce_size_from_array_init): New function, split 3050 out from cp_finish_decl. 3051 (layout_var_decl): Likewise. 3052 (maybe_commonize_var): Likewise. 3053 (maybe_inject_for_scope_var): Likewise. 3054 (initialize_local_var): Likewise. 3055 (build_cleanup_on_safe_obstack): Likewise. 3056 (check_initializer): Likewise. 3057 (make_rtl_for_nonlocal_decl): Likewise. 3058 (cp_finish_decl): Use them. 3059 * typeck.c (strip_array_types): New function. 3060 3061 * cp-tree.def (LABEL_STMT): New tree node. 3062 * cp-tree.h (LABEL_STMT_LABEL): New macro. 3063 (shadow_label): Remove. 3064 (declare_local_label): New function. 3065 (finish_label_decl): Likewise. 3066 * decl.c (make_label_decl): New function, split out from 3067 lookup_label. 3068 (shadowed_labels): Remove. 3069 (binding_level): Add shadowed_labels. 3070 (clear_binding_level): Remove. 3071 (push_binding_level): Just bzero the new binding level. 3072 (pushlevel): Fix indentation. 3073 (pop_label): New function. 3074 (pop_labels): Likewise, split out from poplevel. 3075 (poplevel): Pop local labels. Use pop_labels. 3076 (maybe_push_to_top_level): Don't clear shadowed_labels. 3077 (lookup_label): Use make_label_decl. 3078 (shadow_label): Remove. 3079 (declare_local_label): New function. 3080 (define_label): Simplify. 3081 (start_function): Don't clear shadowed_labels. 3082 (cp_function): Remove shadowed_labels. 3083 (push_cp_function_context): Don't save shadowed_labels. 3084 (pop_cp_function_context): Don't restore it. 3085 * dump.c (dequeue_and_dump): Handle LABEL_STMT. 3086 * parse.y (label_decl): Use finish_label_decl. 3087 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label 3088 declarations. 3089 * semantics.c (finish_label_stmt): Add a LABEL_STMT when 3090 building_stmt_tree. 3091 (finish_label_decl): New function. 3092 (expand_stmt): Handle LABEL_STMTs and local label declarations. 3093 30941999-08-26 Mark Mitchell <mark@codesourcery.com> 3095 3096 * decl.c (lookup_label): Build labels on the permanent obstack 3097 when building statement trees. Don't build RTL for labels when 3098 building statement trees. 3099 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when 3100 building statement trees. 3101 (finish_label_stmt): Likewise. 3102 (expand_stmt): Adjust accordingly. 3103 * pt.c (tsubst_expr); Likewise. 3104 (do_decl_instantiation): Robustify. 3105 3106 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro. 3107 * tree.c (build_cplus_new): Set it. 3108 * expr.c (cplus_expand_expr): Use it. 3109 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR. 3110 3111 * decl.c (store_parm_decls): Reset immediate_size_expand. 3112 (finish_function): Likewise. 3113 3114 * tree.c (cplus_unsave_expr_now): Don't return a value. 3115 3116 * semantics.c (do_poplevel): Always initialize the return value. 3117 31181999-08-26 Gavin Romig-Koch <gavin@cygnus.com> 3119 3120 * cp-tree.h (cplus_unsave_expr_now) : Correct return type. 3121 * tree.h (cplus_unsave_expr_now) : Same. 3122 31231999-08-25 Mark Mitchell <mark@codesourcery.com> 3124 3125 * decl.c (grokdeclarator): Amend comment. 3126 * except.c (expand_start_catch_block): Call push_template_decl for 3127 catch-block parameters. 3128 * method.c (synthesize_method): Build an empty compound statement 3129 for the body of a constructor. 3130 31311999-08-25 Jason Merrill <jason@yorick.cygnus.com> 3132 3133 * tree.c (cp_build_qualified_type_real): If we're asking for the 3134 same quals we already have, just return. 3135 31361999-08-25 Mark Mitchell <mark@codesourcery.com> 3137 3138 * cp-tree.def (SUBOBJECT): New tree node. 3139 * cp-tree.h (CLEANUP_P): New macro. 3140 (SUBOBJECT_CLEANUP): Likewise. 3141 (keep_next_level): Add parameter. 3142 (get_temp_regvar): Don't declare. 3143 (emit_base_init): Remove parameter. 3144 (expand_aggr_init): Rename to build_aggr_init. 3145 (expand_vec_init): Rename to build_vec_init. 3146 (do_pushlevel): Remove. 3147 (do_poplevel): Likewise. 3148 (finish_cleanup): New function. 3149 (finish_subobject): Likewise. 3150 (stmts_are_full_exprs_p): New variable. 3151 * decl.c (keep_next_level): Add parameter. 3152 (cp_finish_decl): Use build_aggr_init, not 3153 expand_aggr_init. Use finish_expr_stmt to expand the code. 3154 (expand_static_init): Use tree-generating, not RTL-generating, 3155 functions to handle the initialization. 3156 (start_function): Remove dead code. Always have a momentary 3157 obstack inside the function, even before hitting the first curly 3158 brace. 3159 (cplus_expand_expr_stmt): Move calls to 3160 expand_{start,end}_target_temps into semantics.c. 3161 (cp_function): Add stmts_are_full_exprs_p. 3162 (push_cp_function_context): Save it. 3163 (pop_cp_function_context): Restore it. 3164 * decl2.c (get_temp_regvar): Move to init.c. 3165 (do_static_initialization): Use build_{aggr,vec}_init. 3166 (do_static_destruction): Fix typo in comment. 3167 * dump.c (dequeue_and_dump): Handle INIT_EXPR. 3168 * except.c (expand_throw): Use create_temporary_var. 3169 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init. 3170 * init.c (expand_vec_init_try_block): Remove. 3171 (expand_vec_init_catch_clause): Likewise. 3172 (get_temp_regvar): New function. 3173 (begin_init_stmts): Likewise. 3174 (finish_init_stmts): Likewise. 3175 (perform_member_init): Use build_{aggr,vec}_init. Build up tree 3176 structure here. 3177 (emit_base_init): Likewise. Remove unused parameter. 3178 (expand_virtual_init): Likewise. 3179 (expand_cleanup_for_base): Use finish_subobject. 3180 (expand_aggr_vbase_init_1): Simplify. 3181 (construct_virtual_bases): Use tree-generating functions to build 3182 up initialization. 3183 (expand_aggr_init): Likewise. Rename to build_aggr_init. 3184 (expand_default_init): Likewise. 3185 (expand_aggr_init_1): Likewise. 3186 (expand_vec_init): Rename to build_vec_init. 3187 * method.c (do_build_copy_constructor): Use tree-generating 3188 functions. Don't call clear_last_expr. 3189 (do_build_assign_ref): Likewise. 3190 (synthesize_method): Call clear_last_expr here. 3191 * parse.y (base_init): Don't call clear_last_expr here. 3192 (nodecls): Likewise. 3193 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set. 3194 * semantics.c (do_pushlevel): Move to here. 3195 (do_poplevel): Likewise. 3196 (stmts_are_full_exprs_p): New variable. 3197 (finish_expr_stmt): Handle logic for temoprary cleanup here. 3198 (finish_for_stmt): Use finish_expr_stmt. 3199 (finish_cleanup): New function. 3200 (finish_function_try_block): Fix indentation. 3201 (finish_subobject): New function. 3202 (setup_vtbl_ptr): Call keep_next_level here. 3203 (finish_stmt_expr): Handle a block with no scope inside the 3204 statement-expression. 3205 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle 3206 SUBOBJECT. 3207 * tree.c (search_tree): Handle INIT_EXPR. 3208 (mapcar): Likewise. 3209 * typeck.c (build_modify_expr): Don't build an RTL_EXPR. 3210 * typeck2.c (store_init_value): Change expand_aggr_init to 3211 build_aggr_init in comment. 3212 32131999-08-25 Mark Mitchell <mark@codesourcery.com> 3214 3215 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs. 3216 32171999-08-25 Nathan Sidwell <nathan@acm.org> 3218 3219 * decl2.c (handle_class_head): Be graceful about additional 3220 scope qualifiers. Adjust comments to reflect reality. 3221 32221999-08-24 Jason Merrill <jason@yorick.cygnus.com> 3223 3224 * call.c (build_conditional_expr): Fix typo. 3225 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an 3226 lvalue before trying to mess with the sides. 3227 3228 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly. 3229 3230Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu> 3231 3232 * g++spec.c (lang_specific_driver): Add room for NULL in arglist. 3233 32341999-08-23 Jason Merrill <jason@yorick.cygnus.com> 3235 3236 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2. 3237 Return arbitrary pointer or NULL. 3238 (check_eh_spec): Call __throw_type_match_rtti_2. 3239 * tinfo.h (*::dcast): Return int. Add valp parm. 3240 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers. 3241 * tinfo2.cc (__throw_type_match_rtti_2): Likewise. 3242 (__throw_type_match_rtti): Now just a wrapper. 3243 3244 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind. 3245 (init_exception_processing): Don't initialize them. 3246 32471999-08-23 Paul Burchard <burchard@pobox.com> 3248 3249 * decl.c (check_default_argument): Fix typo. 3250 32511999-08-22 Mark Mitchell <mark@codesourcery.com> 3252 3253 * cp-tree.def (STMT_EXPR): Fix typo in node name. 3254 3255 * dump.c (dump_next_stmt): New function. 3256 (dequeue_and_dump): Use it. 3257 3258 * pt.c (tsubst_copy): Make sure to initialize return value for a 3259 STMT_EXPR, even when processing_template_decl. 3260 * semantics.c (finish_stmt_expr): A statement-expression whose 3261 last statement is not an expression-statement has type `void'. 3262 32631999-08-20 Mark Mitchell <mark@codesourcery.com> 3264 3265 * semantics.c (finish_stmt_expr): Fix typo in comment. 3266 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR. 3267 (mapcar): Likewise. 3268 * init.c (build_vec_delete_1): Make the children of a permanent 3269 BIND_EXPR permanent. 3270 * pt.c (register_specialization): Don't register a specialization 3271 more than once. 3272 32731999-08-18 Andrew Haley <aph@cygnus.com> 3274 3275 * method.c (process_overload_item): Call build_mangled_C9x_name () 3276 for all integer parameter types larger than long long. 3277 32781999-08-19 Mark Mitchell <mark@codesourcery.com> 3279 3280 * pt.c (redeclare_class_template): Merge default template 3281 arguments in both directions. 3282 3283 * typeck.c (common_type): Undo 1999-08-18 change. Remove 3284 compiler_error message. 3285 32861999-08-19 Jason Merrill <jason@yorick.cygnus.com> 3287 3288 * cp-tree.h: Declare flag_use_repository. 3289 * pt.c (do_decl_instantiation): Don't complain about duplicate 3290 instantiation with -frepo. 3291 (do_type_instantiation): Likewise. 3292 3293 * pt.c (push_template_decl_real): Complain about everything 3294 that isn't a valid template. 3295 3296 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't 3297 affect inlines. 3298 32991999-08-19 Mark Mitchell <mark@codesourcery.com> 3300 3301 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code. 3302 * decl2.c (build_expr_from_tree): Handle it. 3303 * error.c (dump_expr): Likewise. 3304 * pt.c (for_each_template_parm): Likewise. 3305 (tsubst_copy): Likewise. 3306 * tree.c (search_tree): Likewise. 3307 * semantics.c (finish_pseudo_destructor_call): Create it. 3308 33091999-08-18 Mark Mitchell <mark@codesourcery.com> 3310 3311 * search.c (setup_class_bindings): Robustify. 3312 * typeck.c (common_type): Use same_type_p, not pointer equality, 3313 to compare types. 3314 3315 * cp-tree.h (build_lang_field_decl): Remove. 3316 * class.c (build_vtable): Replace calls to build_lang_field_decl 3317 with build_lang_decl. 3318 (prepare_fresh_vtable): Likewise. 3319 (finish_struct_1): Likewise. 3320 (init_class_processing): Likewise. 3321 * decl.c (push_using_decl): Likewise. 3322 (init_decl_processing): Likewise. 3323 (grokvardecl): Likewise. 3324 (build_ptrmemfunc_type): Likewise. 3325 (grokdeclarator): Likewise. 3326 (build_enumerator): Likewise. 3327 * decl2.c (grok_x_components): Likewise. 3328 (do_class_using_decl): Likewise. 3329 * except.c (call_eh_info): Likewise. 3330 * init.c (init_init_processing): Likewise. 3331 * rtti.c (expand_class_decl): Likewise. 3332 * tree.c (build_base_fields): Likewise. 3333 (build_vbase_pointer_fields): Likewise. 3334 * lex.c (build_lang_decl): Build declarations on the permanent 3335 obstack if we're building statmeent trees. 3336 (retrofit_lang_decl): Handle both the full lang_decl and also the 3337 smaller lang_decl_flags here. 3338 (build_lang_field_decl): Remove. 3339 * pt.c (push_template_decl_real): Issue errors for variable 3340 declarations that are not static members. 3341 33421999-08-18 Richard Henderson <rth@cygnus.com> 3343 3344 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too. 3345 (mapcar): Likewise. 3346 33471999-08-17 Mark Mitchell <mark@codesourcery.com> 3348 3349 * cp-tree.h (back_end_hook): New variable. 3350 * decl2.c (back_end_hook): Define it. 3351 (finish_file): If it's non-NULL, call it. 3352 3353 * decl.c (add_decl_to_level): New function. 3354 (push_local_binding): Use it. 3355 (find_binding): Fix typo in comment. 3356 (pushdecl): Use add_decl_to_level. Put templates on the 3357 corresponding namespace-scope binding levels. 3358 * dump.c (dequeue_and_dump): Print the specializations of a 3359 template. 3360 * pt.c (push_template_decl_real): Don't push a template multiple 3361 times. 3362 33631999-08-17 Mark Mitchell <mark@codesourcery.com> 3364 3365 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro. 3366 (CALL_DECLARATOR_QUALS): Likewise. 3367 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise. 3368 * decl.c (grokdeclarator): Adjust to use them. 3369 * decl2.c (grokfield): Likewise. 3370 (reparse_absdcl_as_casts): Likewise. 3371 * lex.c (make_call_declarator): Likewise. 3372 (set_quals_and_spec): Likewise. 3373 * pt.c (tsubst): Likewise. 3374 * tree.c (mapcar): Remove special hack to handle third operand of 3375 a CALL_EXPR. 3376 33771999-08-16 Mark Mitchell <mark@codesourcery.com> 3378 3379 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro. 3380 * class.c (build_vtable): Use build_lang_field_decl to build the 3381 VAR_DECLs for vtables. 3382 (prepare_fresh_vtable): Likewise. 3383 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if 3384 CAN_HAVE_FULL_LANG_DECL_P. 3385 (push_using_decl): Use build_lang_decl to build USING_DECLs. 3386 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs. 3387 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P. 3388 (build_lang_field_decl): Likewise. 3389 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much 3390 to copy. 3391 3392 * cp-tree.def (STMT_EXPR): New tree node. 3393 * cp-tree.h (STMT_EXPR_STMT): New macro. 3394 (store_return_init): Change prototype. 3395 (finish_named_return_value): New function. 3396 (expand_stmt): Likewise. 3397 (expand_body): Likewise. 3398 (begin_stmt_tree): Likewise. 3399 (finish_stmt_tree): Likewise. 3400 (expanding_p): New variable. 3401 (last_expr_type): Likewise. 3402 (building_stmt_tree): New macro. 3403 * decl.c (start_function): Use building_stmt_tree, not 3404 processing_template_decl, where appropriate. 3405 (store_parm_decls): Likewise. 3406 (store_return_init): Move most of the body to semantics.c. 3407 (finish_function): Use building_stmt_tree. 3408 (finish_stmt): Clear last_expr_type here. 3409 (cp_function): Add expanding_p, last_tree, last_expr_type. 3410 (push_cp_function_context): Save them. 3411 (pop_cp_function_context): Restore them. 3412 * decl2.c (setup_vtbl_ptr): Move to semantics.c. 3413 * error.c (dump_expr): Handle STMT_EXPR. 3414 * except.c (expand_start_catch_block): Use building_stmt_tree. 3415 Use add_decl_stmt. 3416 * expr.c (cplus_expand_expr): Handle STMT_EXPR. 3417 (do_case): Move add_tree call to semantics.c. 3418 * parse.y (return_init): Use finish_named_return_value. 3419 (for.init.statement): Use finish_expr_stmt. 3420 * parse.c: Regenerated. 3421 * pt.c (do_pushlevel): Move to semantics.c. 3422 (do_poplevel): Likewise. 3423 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR. 3424 (tsubst_expr): Don't expand all the way to RTL here. Handle 3425 RETURN_INIT and CTOR_INITIALIZER. 3426 (instantiate_decl): Call expand_body after tsubst'ing into 3427 DECL_SAVED_TREE. 3428 * semantics.c (expand_stmts): New function. 3429 (expanding_p): New variable. 3430 (last_expr_type): Likewise. 3431 (finish_expr_stmt): Use building_stmt_tree. 3432 (begin_if_stmt): Likewise. 3433 (finish_if_stmt_cond): Likewise. 3434 (finish_then_clause): Likewise. 3435 (begin_else_clause): Likewise. 3436 (finish_else_clause): Likewise. 3437 (begin_while_stmt): Likewise. 3438 (finish_while_stmt_cond): Likewise. 3439 (finish_while_stmt): Likewise. 3440 (finish_do_body): Likewise. 3441 (finish_do_stmt): Likewise. 3442 (finish_return_stmt): Likewise. 3443 (begin_for_stmt): Likewise. 3444 (fnish_for_init_stmt): Likewise. 3445 (finish_for_cond): Likewise. 3446 (finish_for_expr): Likewise. 3447 (finish_for_stmt): Likewise. 3448 (finish_break_stmt): Likewise. 3449 (finish_continue_stmt): Likewise. 3450 (finish_switch_cond): Likewise. 3451 (finish_switch_stmt): Likewise. 3452 (finish_case_label): Call add_tree here if necessary. 3453 (finish_goto_statement): Use building_stmt_tree. 3454 (begin_try_block): Likewise. 3455 (begin_function_try_block): Likewise. 3456 (finish_try_block): Likewise. 3457 (finish_function_try_block): Likewise. 3458 (finish_handler_sequence): Likewise. 3459 (finish_function_handler_sequence): Likewise. 3460 (begin_handler): Likewise. 3461 (finish_handler_parms): Likewise. 3462 (finish_handler): Likewise. 3463 (begin_compound_stmt): Likewise. 3464 (finish_compound_stmt): Likewise. 3465 (finish_asm_stmt): Likewise. 3466 (finish_label_stmt): Likewise. 3467 (finish_named_return_value): New function. 3468 (setup_vtbl_ptr): Moved here from decl2.c. 3469 (do_pushlevel): Moved here from pt.c. 3470 (do_poplevel): Likewise. 3471 (begin_stmt_expr): Use building_stmt_tree. 3472 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR, 3473 when building_stmt_tree. 3474 (begin_stmt_tree): New function. 3475 (finish_stmt_tree): Likewise. 3476 (expand_stmt): Likewise. 3477 (expand_body): Likewise. 3478 * tree.c (build_cplus_method_type): Make sure the argument types 3479 end up on the same obstack as the METHOD_TYPE. 3480 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR, 3481 THROW_EXPR, STMT_EXPR. 3482 (mapcar): Break out common cases. Handle COMPOUND_EXPR, 3483 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than 3484 sorry, if an unsupported node is encountered. 3485 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR. 3486 (c_expand_return): Don't call add_tree here. 3487 34881999-08-15 Mark Mitchell <mark@codesourcery.com> 3489 3490 * pt.c (check_default_tmpl_args): Don't check in local scopes. 3491 (tsubst_decl): Make sure the declaration is on a saveable 3492 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local 3493 variable. 3494 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs. 3495 34961999-08-14 Jason Merrill <jason@yorick.cygnus.com> 3497 3498 Speed up Koenig lookup. 3499 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm 3500 to return namespaces we've looked at. 3501 * decl2.c (lookup_using_namespace): Likewise. 3502 (add_function): Don't call ovl_member. 3503 (lookup_arg_dependent): Initialize k.namespaces to the list of 3504 namespaces seen in unqualified lookup. 3505 * call.c (equal_functions): Move here from tree.c. 3506 (joust): Use it to handle duplicate candidates. 3507 * tree.c (ovl_member): Use ==. 3508 35091999-08-13 Mark Mitchell <mark@codesourcery.com> 3510 3511 * cp-tree.def (DECL_STMT): Make it smaller. 3512 * cp-tree.h (lang_decl_flags): Move saved_tree to ... 3513 (lang_decl): ... here. Add next. 3514 (DECL_SAVED_TREE): Adjust accordingly. 3515 (DECL_IMPLICIT_TYPEDEF_P): New macro. 3516 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise. 3517 (DECL_STMT_DECL): Likewise. 3518 (create_implicit_typedef): New function. 3519 (maybe_push_decl): Likewise. 3520 (tsubst_default_argument): New function. 3521 (at_function_scope_p): Likewise. 3522 (add_decl_stmt): Likewise. 3523 (push_permanent_obstack): Likewise. 3524 * call.c (convert_default_arg): Use tsubst_default_argument. 3525 * class.c (add_method): Use push_permanent_obstack. 3526 (build_self_reference): Create a TEMPLATE_DECL for the 3527 self-reference, if necessary. 3528 * decl.c (pseudo_global_level_p): Only look at the current binding 3529 level. 3530 (push_binding): Use push_permanent_obstack. 3531 (create_implicit_typedef): New function. 3532 (pushtag): Use it. 3533 (duplicate_decls): Use push_permanent_obstack. 3534 (maybe_push_decl): New function. 3535 (start_decl): Use it. Remove dead code. Use add_decl_stmt. 3536 (start_decl_1): Remove dead code. 3537 (cp_finish_decl): Remove DECL_STMT handling here. Don't use 3538 pseudo_global_level_p. 3539 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a 3540 template. 3541 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use 3542 pseudo_global_level_p. 3543 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in 3544 a template. 3545 (get_sentry): Use push_permanent_obstack. 3546 * dump.c (dequeue_and_dump): Enable DECL_STMT. 3547 * except.c (call_eh_info): Use push_permanent_obstack. 3548 (build_eh_type_ref): Likewise. 3549 (do_pop_exception): Likewise. 3550 (expand_eh_spec): Likewise. 3551 (alloc_eh_object): Likewise. 3552 (expand_throw): Likewise. 3553 * init.c (build_java_class_ref): Likewise. 3554 * lex.c (get_time_identifier): Likewise. 3555 (free_lang_decl_chain): Correct type. 3556 (retrofit_lang_decl): Adjust accordingly. 3557 (build_lang_field_decl): Likewise. 3558 * lex.h (free_lang_decl_chain): Likewise. 3559 * parse.y (lang_extdef): Don't use pseudo_global_level_p. 3560 * parse.c: Regenerated. 3561 * pt.c (tsubst_default_arguments): New function. 3562 (retrieve_local_specialization): Likewise. 3563 (register_local_specialization): Likewise. 3564 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use 3565 pseudo_global_level_p to determine whether or not a template is 3566 primary. 3567 (lookup_template_class): Likewise. Use create_implicit_typedef. 3568 (instantiate_class_template): Call tsubst_default_arguments for 3569 member functions, if appropriate. 3570 (tsubst_default_argument): New function. 3571 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs. 3572 * search.c (at_function_scope_p): New function. 3573 * semantics.c (finish_asm_stmt): Use push_permanent_obstack. 3574 (finish_label_stmt): Likewise. 3575 (add_decl_stmt): New function. 3576 (begin_class_definition): Likewise. 3577 (finish_typeof): Likewise. 3578 * tree.c (copy_template_template_parm): Likewise. 3579 (copy_to_permanent): Likewise. 3580 (push_permanent_obstack): Define. 3581 (mark_addressable): Use it. 3582 * typeck.c (mark_addressable): Likewise. 3583 35841999-08-13 Gavin Romig-Koch <gavin@cygnus.com> 3585 3586 * cp-tree.h (init_cplus_unsave): New. 3587 (cplus_unsave_expr_now): New. 3588 * lex.c (init_parse): Call init_cplus_unsave. 3589 * tree.c (init_cplus_unsave): New. 3590 (cplus_unsave_expr_now): New. 3591 35921999-08-13 Mark Mitchell <mark@codesourcery.com> 3593 3594 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and 3595 decl_constant_value to simplify array bounds. 3596 35971999-08-11 Jason Merrill <jason@yorick.cygnus.com> 3598 3599 * lang-options.h: Add -fms-extensions. 3600 * cp-tree.h: Declare flag_ms_extensions. 3601 * decl2.c: Define it. 3602 * class.c (instantiate_type): Don't complain about taking the address 3603 of a bound member function if -fms-extensions. 3604 * typeck.c (build_unary_op): Likewise. 3605 * decl.c (grokdeclarator): Or about implicit int. 3606 * init.c (resolve_offset_ref): Or about implicit '&'. 3607 36081999-08-11 Mark Mitchell <mark@codesourcery.com> 3609 3610 * cp-tree.h (minimal_parse_mode): Remove. 3611 (finish_label_stmt): New function. 3612 * decl.c (saved_scope): Remove minimal parse mode. 3613 (maybe_push_to_top_level): Don't save it. 3614 (pop_from_top_level): Don't restore it. 3615 (define_label): Split out template-handling code to semantics.c. 3616 (start_decl): Don't use minimal_parse_mode. 3617 (cp_finish_decl): Likewise. 3618 (start_function): Don't increment it. 3619 (store_return_init): Don't use it. 3620 (finish_function): Don't decrement it. 3621 * parse.y (label_colon): Use finish_label_stmt throughout. 3622 * parse.c: Regenerated. 3623 * pt.c (minimal_parse_mode): Don't define it. 3624 (tsubst_expr): Use finish_label_stmt. 3625 * semantics.c (finish_label_stmt): New function. 3626 3627 * dump.c (queue): Be careful when computing bitmasks. 3628 (dequeue_and_dump): Describe binfos as binfos, not as 3629 vectors. 3630 3631 * parse.y (pedantic): Give it itype. Adjust usage accordingly 3632 throughout. 3633 * parse.c: Regenerated. 3634 3635 * Make-lang.in (CXX_SRCS): Remove sig.c. 3636 * Makefile.in (CXX_OBJS): Remove sig.o. 3637 (sig.o): Remove. 3638 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove. 3639 (CPTI_SIGNATURE_TYPE): Likewise. 3640 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise. 3641 (opaque_type_node): Likewise. 3642 (signature_type_node): Likewise. 3643 (sigtable_entry_type): Likewise. 3644 (flag_handle_signatures): Likewise. 3645 (lang_type): Remove is_signature, is_signature_pointer, 3646 is_signature_reference, has_opaque_typedecls, 3647 sigtables_has_been_generated. Adjust dummy. Remove signature, 3648 signature_pointer_to, signature_reference_to. 3649 (IS_SIGNATURE): Remove. 3650 (SET_SIGNATURE): Remove. 3651 (CLEAR_SIGNATURE): Remove. 3652 (IS_SIGNATURE_POINTER): Remove. 3653 (IS_SIGNATURE_REFERENCE): Remove. 3654 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove. 3655 (SIGTABLE_HAS_BEEN_GENERATED): Remove. 3656 (CLASSTYPE_SIGNATURE): Remove. 3657 (SIGNATURE_TYPE): Remove. 3658 (SIGNATURE_METHOD_VEC): Remove. 3659 (SIGNATURE_POINTER_TO): Remove. 3660 (SIGNATURE_REFERENCE_TO): Remove. 3661 (lang_decl_flags): Remove is_default_implementation. Rename 3662 memfunc_pointer_to to saved_tree. 3663 (IS_DEFAULT_IMPLEMENTATION): Remove. 3664 (DECL_MEMFUNC_POINTER_TO): Remove. 3665 (DECL_MEMFUNC_POINTING_TO): Remove. 3666 (DECL_SAVED_TREE): Adjust definition. 3667 (tag_types): Remove signature_type_node. 3668 (SIGNATURE_FIELD_NAME): Remove. 3669 (SIGNATURE_FIELD_NAME_FORMAT): Likewise. 3670 (SIGNATURE_OPTR_NAME): Likewise. 3671 (SIGNATURE_SPTR_NAME): Likewise. 3672 (SIGNATURE_POINTER_NAME): Likewise. 3673 (SIGNATURE_POINTER_NAME_FORMAT): Likewise. 3674 (SIGNATURE_REFERENCE_NAME): Likewise. 3675 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise. 3676 (SIGTABLE_PTR_TYPE): Likewise. 3677 (SIGTABLE_NAME_FORMAT): Likewise. 3678 (SIGTABLE_NAME_FORMAT_LONG): Likewise. 3679 (SIGTABLE_TAG_NAME): Likewise. 3680 (SIGTABLE_VB_OFF_NAME): Likewise. 3681 (SIGTABLE_VT_OFF_NAME): Likewise. 3682 (finish_base_specifiers): Change prototype. 3683 (build_signature_pointer_type): Remove. 3684 (build_signature_reference_type): Remove. 3685 (build_signature_pointer_constructor): Remove. 3686 (build_signature_method_call): Remove. 3687 (build_optr_ref): Likewise. 3688 (append_signature_fields): Likewise. 3689 (signature_error): Likewise. 3690 * call.c (build_this): Remove signature support. 3691 (build_over_call): Likewise. 3692 (build_new_method_call): Likewise. 3693 * class.c (add_implicitly_declared_members): Likewise. 3694 (finish_struct_1): Likewise. 3695 (finish_struct): Likewise. 3696 * cvt.c (cp_convert_to_pointer): Likewise. 3697 (convert_to_pointer_force): Likewise. 3698 (ocp_convert): Likewise. 3699 * decl.c (sigtable_decl_p): Remove. 3700 (init_decl_processing): Remove support for signatures. 3701 (cp_finish_decl): Likewise. 3702 (grokdeclarator): Likewise. 3703 (grokparms): Likewise. 3704 (xref_tag): Likewise. 3705 (start_function): Likewise. 3706 (start_method): Likewise. 3707 * decl2.c (finish_sigtable_vardecl): Remove. 3708 (flag_handle_signatures): Remove. 3709 (lang_f_options): Remove handle-signatures. 3710 (grokfield): Remove support for signatures. 3711 (grokbitfield): Likewise. 3712 (finish_file): Likewise. 3713 (reparse_absdcl_as_casts): Likewise. 3714 * error.c (dump_type_real): Likewise. 3715 (dump_function_decl): Likewise. 3716 * friend.c (make_friend_class): Likewise. 3717 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof. 3718 * hash.h: Regenerated. 3719 * init.c (build_new_1): Remove support for signatures. 3720 * lang-options.h: Remove -fhandle-signatures, 3721 -fno-handle-signatures. 3722 * lex.c (init_parse): Remove support for signatures. 3723 (yyprint): Likewise. 3724 * lex.h (rid): Remove RID_SIGNATURE. 3725 * method.c (build_decl_overload_real): Remove support for 3726 signatures. 3727 (hack_identifier): Likewise. 3728 * parse.y (base_class): Likewise. 3729 (base_class.1): Likewise. 3730 (access_specifier): Likewise. 3731 * search.c (lookup_member): Likewise. 3732 * semantics.c (finish_qualified_object_call_expr): Likewise. 3733 (finish_template_type_parm): Likewise. 3734 (begin_class_definition): Likewise. 3735 (finish_base_specifier): Likewise. 3736 * sig.c: Remove. 3737 * tree.c (build_cplus_method_type): Remove support for signatures. 3738 * typeck.c (require_complete_type): Likewise. 3739 (c_sizeof): Likewise. 3740 (c_alignof): Likewise. 3741 (build_object_ref): Likewise. 3742 (build_component_ref): Likewise. 3743 (build_indirect_ref): Likewise. 3744 (build_c_cast): Likewise. 3745 (build_modify_expr): Likewise. 3746 (convert_for_initialization): Likewise. 3747 * typeck2.c (signature_error): Remove. 3748 (store_init_value): Remove support for signatures. 3749 (digest_init): Likewise. 3750 (build_x_arrow): Likewise. 3751 (build_functional_cast): Likewise. 3752 * xref.c (GNU_xref_decl): Likewise. 3753 37541999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de> 3755 3756 * lex.c (do_identifier): Remove unnecessary lookup of class field. 3757 37581999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de> 3759 3760 * decl2.c (set_decl_namespace): Do not complain about non-matching 3761 decls if processing a template. 3762 37631999-08-09 Mark Mitchell <mark@codesourcery.com> 3764 3765 * decl.c (build_ptrmemfunc_type): Handle qualified 3766 pointer-to-member types here. 3767 * tree.c (cp_build_qualified_type_real): Simplify handling here. 3768 37691999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3770 3771 * lex.c (lang_identify): Likewise. 3772 37731999-08-09 Bernd Schmidt <bernds@cygnus.co.uk> 3774 3775 * Makefile.in: Update dependencies. 3776 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with 3777 NULL_RTX. 3778 * decl.c: Include "function.h" 3779 (cleanup_label, return_label): Delete declarations. 3780 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX. 3781 (finish_function): Rename last_parm_insn variable to 3782 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX. 3783 * decl2.c: Include "function.h". 3784 (rtl_expr_chain): Delete declaration. 3785 * method.c: Include "function.h" 3786 * tree.c (build_vbase_pointer_fields): Don't initialize 3787 DECL_SAVED_INSNS with NULL_RTX. 3788 * typeck.c: Include "function.h" 3789 37901999-08-09 Jason Merrill <jason@yorick.cygnus.com> 3791 3792 * semantics.c (begin_function_try_block, finish_function_try_block, 3793 finish_function_handler_sequence): New fns. 3794 * parse.y (function_try_block): Use them. 3795 * pt.c (instantiate_decl): Likewise. 3796 3797 * cp-tree.h: Declare in_function_try_handler. 3798 * decl.c: Define it. 3799 (start_function): Clear it. 3800 (struct cp_function, push_cp_function_context): Save it. 3801 (pop_cp_function_context): Restore it. 3802 * parse.y (function_try_block): Set and clear it. 3803 * except.c (expand_end_catch_block): Rethrow if we reach the end 3804 of a function-try-block handler in a ctor or dtor. 3805 * typeck.c (c_expand_return): Complain about returning from a 3806 function-try-block handler of a ctor. 3807 3808 * parse.y (function_try_block): Call end_protect_partials 3809 before expand_start_all_catch. 3810 38111999-08-08 Jason Merrill <jason@yorick.cygnus.com> 3812 3813 * decl.c (struct binding_level): Add eh_region field. 3814 (push_binding_level): Set it. 3815 (define_label): Complain about jumping into an EH block. 3816 3817 * ptree.c (print_lang_type): Print the real type of a PMF. 3818 Print what exceptions a fn type throws. 3819 38201999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 3821 3822 * class.c (count_fields, add_fields_to_vec): Add static prototype. 3823 3824 * cp-tree.h (opname_tab, assignop_tab, operator_name_string, 3825 get_id_2, composite_pointer_type, dump_node_to_file): Constify a 3826 char*. 3827 3828 * decl.c (named_label_list, cp_finish_decl, grokdeclarator): 3829 Constify a char*. 3830 3831 * decl2.c (finish_static_data_member_decl, grokfield): Constify a 3832 char*. 3833 3834 * dump.c (queue_and_dump_index, dump_int, dump_string, 3835 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify 3836 a char*. 3837 (dump_stmt): Add static prototype. 3838 3839 * errfn.c (cp_thing): Constify a char*. 3840 3841 * error.c (dump_unary_op, dump_binary_op, aggr_variety, 3842 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name, 3843 dump_expr): Constify a char*. 3844 3845 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc, 3846 read_line_number): Add static prototype. 3847 (opname_tab, assignop_tab, operator_name_string): Constify a char*. 3848 (real_yylex): Move label `letter' into the scope where it is used. 3849 3850 * method.c (build_mangled_template_parm_index, build_overload_int, 3851 build_decl_overload_real, get_id_2): Constify a char*. 3852 3853 * search.c (check_final_overrider): Make static. 3854 3855 * typeck.c (composite_pointer_type): Constify a char*. 3856 38571999-08-06 Jason Merrill <jason@yorick.cygnus.com> 3858 3859 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that 3860 we're looking at a class. 3861 3862 * decl.c (lookup_name_real): Set the complain flag if we're 3863 looking for a namespace member. 3864 3865 * lex.c (real_yylex): We can have a number with no digits. 3866 3867 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions. 3868 3869 * search.c (binfo_from_vbase): New fn. 3870 * cp-tree.h: Declare it. 3871 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion 3872 from pointer to member of virtual base. 3873 * typeck.c (get_delta_difference): Likewise. 3874 38751999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br> 3876 3877 * pt.c (tsubst): Use build_index_type to build in-template array 3878 index type. Fixes g++.oliva/dwarf1.C. 3879 * decl.c (grokdeclarator): Likewise, just for consistency, as it 3880 doesn't seem to trigger the bug without it. 3881 38821999-08-06 Jason Merrill <jason@yorick.cygnus.com> 3883 3884 * typeck2.c (add_exception_specifier): Use complete_type. 3885 38861999-08-06 Mark Mitchell <mark@codesourcery.com> 3887 3888 * error.c (dump_expr): Handle EXACT_DIV_EXPR. 3889 (dump_binary_op): Bulletproof. 3890 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR]. 3891 * tree.c (search_tree): Don't enumerate all the nodes of classes 3892 `1', `2', and `<'; handle them generically. Don't be sorry about 3893 "unrecognized tree codes"; just abort. 3894 (no_linkage_check): Don't do linkage checks for templates. 3895 3896 * tree.c (cp_build_qualified_type_real): Handle 3897 pointer-to-member-function types correctly. 3898 38991999-08-05 Jason Merrill <jason@yorick.cygnus.com> 3900 3901 * decl.c (pushdecl): Only give an error for shadowing a parm 3902 from *this* function. 3903 3904Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com) 3905 3906 * typeck2.c: Update URLs and mail addresses. 3907 39081999-08-04 Nathan Sidwell <nathan@acm.org> 3909 3910 * cp-tree.h (empty_except_spec): New global var. 3911 (compexcepttypes): Remove prototype. 3912 (comp_except_specs): Prototype new global function. 3913 (add_exception_specifier): Prototype new global function. 3914 * decl.c (empty_except_spec): Define new global var. 3915 (duplicate_decls): Use comp_except_specs, reword error message. 3916 (init_decl_processing): Initialize empty_except_spec. 3917 Adjust build_exception_variant calls. 3918 * parse.y (exception_specification_opt): Use empty_except_spec. 3919 (ansi_raise_identifier): Call check_for_new_type. 3920 (ansi_raise_identifiers): Use add_exception_specifier. 3921 * pt.c (tsubst): Use add_exception_specifier to build exception 3922 specifier. 3923 * search.c (check_final_overrider): New static function, broken 3924 out of get_matching_virtual. Check throw specifiers, reword 3925 diagnostics. 3926 (get_matching_virtual): Use check_final_overrider. 3927 * tree.c (build_exception_variant): Use comp_except_specs. 3928 * typeck.c (compexcepttypes): Remove. 3929 (comp_except_types): New static function, helper for 3930 comp_except_specs. Compare two types as exception specifiers. 3931 (comp_except_specs): New global function, compare two exception 3932 specifiers. 3933 (comptypes): Adjust for comp_except_specs. 3934 * typeck2.c (add_exception_specifier): New global function. 3935 3936 * class.c (check_for_override): Reword error message. 3937 39381999-08-03 Nathan Sidwell <nathan@acm.org> 3939 3940 * call.c (convert_arg_to_ellipsis): Use pod_type_p. 3941 * cp-tree.h (struct lang_type): Added non_pod_class flag. 3942 (CLASSTYPE_NON_POD_P): New macro to access it. 3943 * class.c (finish_struct_1): Determine non-PODness. 3944 Check for arrays of pointers (-Weffc++). 3945 Remove array inspection duplicated code. 3946 * tree.c (pod_type_p): Detect non-pod non-aggregate types. 3947 Use CLASSTYPE_NON_POD_P. 3948 39491999-08-03 Nathan Sidwell <nathan@acm.org> 3950 3951 * class.c (duplicate_tag_error): Preserve template information. 3952 39531999-08-03 Nathan Sidwell <nathan@acm.org> 3954 3955 * decl.c (start_enum): Show location of previous definition. 3956 * parse.y (enumlist_opt): New reduction. 3957 (structsp): Simplify enum rules to use enumlist_opt. 3958 39591999-08-03 Jason Merrill <jason@yorick.cygnus.com> 3960 3961 * lex.c (yyprint): Handle PFUNCNAME. 3962 3963 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only 3964 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR. 3965 39661999-08-03 Mumit Khan <khan@xraylith.wisc.edu> 3967 3968 * decl.c (start_decl): Set attributes before duplicate_decls call. 3969 39701999-08-02 Mark Mitchell <mark@codesourcery.com> 3971 3972 * Make-lang.in (CXX_SRCS): Add dump.c. 3973 * Makefile.in (CXX_OBJS): Add dump.o. 3974 (dump.o): New target. 3975 * cp-tree.h (DECL_CONV_FN_P): Document. 3976 (DECL_OVERLOADED_OPERATOR_P): New function. 3977 (TYPE_PTRMEM_CLASS_TYPE): New macro. 3978 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise. 3979 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE. 3980 (ASM_VOLATILE_P): New macro. 3981 (STMT_LINENO): Likewise. 3982 (cp_namespace_decls): New function. 3983 (dump_node_to_file): New function. 3984 * decl.c (cp_namespace_decls): New function. 3985 (walk_namespaces_r): Use it. 3986 (wrapup_globals_for_namespace): Likewise. 3987 * decl2.c (flag_dump_translation_unit): New variable. 3988 (lang_decode_option): Handle -fdump-translation-unit. 3989 (finish_file): If flag_dump_translation_unit is set, dump the 3990 translation unit. 3991 * dump.c: New file. 3992 * lang-options.h: Add -fdump-translation-unit. 3993 * pt.c (tsubst_template_parms): Robustify. 3994 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P. 3995 (tsubst_expr): Use STMT_LINENO. 3996 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check 3997 for invalid cv-qualifiers even while building templates. 3998 39991999-08-02 Richard Henderson <rth@cygnus.com> 4000 4001 * call.c: Include defaults.h instead of expr.h. 4002 * decl.c: Likewise. 4003 * pt.c: Likewise. 4004 * typeck.c: Include defaults.h. 4005 40061999-08-02 Mark Mitchell <mark@codesourcery.com> 4007 4008 * lex.c (errorcount, sorrycount): Don't declare. 4009 * repo.c (errorcount, sorrycount): Likewise. 4010 * typeck2.c (errorcount, sorrycount): Likewise. 4011 40121999-08-02 Jakub Jelinek <jj@ultra.linux.cz> 4013 4014 * call.c (convert_default_arg, build_over_call): Change all uses of 4015 PROMOTE_PROTOTYPES, so that it tests it as a C expression. 4016 Ensure expr.h is included. 4017 * decl.c (grokparams): Ditto. 4018 * pt.c (tsubst_decl): Ditto. 4019 * typeck.c (convert_arguments): Ditto. 4020 40211999-08-02 Jason Merrill <jason@yorick.cygnus.com> 4022 4023 * class.c (mark_overriders): Fix order of args to overrides. 4024 (warn_hidden): Likewise. Fix for having virtual and non-virtual 4025 functions with the same name. 4026 40271999-08-02 Richard Henderson <rth@cygnus.com> 4028 4029 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null. 4030 40311999-08-01 Mark Mitchell <mark@codesourcery.com> 4032 4033 * call.c (build_conditional_expr): Fix typo in comment. 4034 40351999-08-01 Bernd Schmidt <bernds@cygnus.co.uk> 4036 4037 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack, 4038 case_stack; use in_control_zone_p. 4039 * typeck.c (c_expand_return): Likewise. 4040 40411999-07-31 Bernd Schmidt <bernds@cygnus.co.uk> 4042 4043 * except.c (catch_clauses): Delete declaration. 4044 40451999-07-30 Mark Mitchell <mark@codesourcery.com> 4046 4047 * call.c (build_conditional_expr): Call convert_from_reference to 4048 avoid reference/non-reference type confusion. Fix typo. 4049 40501999-07-30 Richard Henderson <rth@cygnus.com> 4051 4052 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c. 4053 * cp-tree.h (initializer_constant_valid_p): Remove. 4054 40551999-07-28 Mark Mitchell <mark@codesourcery.com> 4056 4057 * call.c (conditional_conversion): Don't build BASE_CONVs for 4058 conversions between things that have the same type. 4059 (build_conditional_expr): Tweak. 4060 (convert_like): Some BASE_CONVs really do require the generation 4061 of code. 4062 4063 * init.c (perform_member_init): Don't go through build_modify_expr 4064 for simple initializations. 4065 40661999-07-27 Jason Merrill <jason@yorick.cygnus.com> 4067 4068 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro. 4069 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for 4070 virtual functions and MI. Simplify. 4071 4072 * method.c: Remove prototype for largest_union_member. 4073 * pt.c (determine_specialization): Fix uninitialized warning. 4074 * lex.c (real_yylex): Likewise. 4075 40761999-07-27 Mark Mitchell <mark@codesourcery.com> 4077 4078 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS 4079 here too. 4080 4081 * cp-tree.h (BINFO_VIRTUALS): Document new format. 4082 * class.c (modify_one_vtable): Change prototype accordingly. 4083 (modify_all_vtables): Likewise. 4084 (modify_all_direct_vtables): Likewise. 4085 (modify_all_indirect_vtables): Likewise. 4086 (build_vtable_entry_for_fn): New function. 4087 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format. 4088 (modify_vtable_entry): Likewise. 4089 (add_virtual_function): Likewise. 4090 (build_vtbl_initializer): New function. 4091 (finish_vtbls): Simplify for new BINFO_VIRTUALS format. 4092 (fixup_vtable_deltas1): Likewise. 4093 (fixup_vtable_deltas): Likewise. 4094 (override_one_vtable): Likewise. 4095 (finish_struct_1): Likewise. 4096 4097 * error.c (dump_expr): Likewise. 4098 * search.c (get_abstract_virtuals_1): Likewise. 4099 (get_abstract_virtuals): Likewise. 4100 (expand_upcast_fixups): Likewise. 4101 * tree.c (debug_binfo): Likewise. 4102 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to 4103 __pure_virtual here. 4104 41051999-07-26 Mark Mitchell <mark@codesourcery.com> 4106 4107 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error 4108 as per 1999-07-26 change. 4109 4110 * typeck.c (c_sizeof): Don't allow non-static data members. 4111 (expr_sizeof): Likewise. 4112 41131999-07-26 Jason Merrill <jason@yorick.cygnus.com> 4114 4115 * input.c (feed_input): Only touch lineno and input_filename 4116 if !USE_CPPLIB. Save the old values before setting the new ones. 4117 4118 * input.c (feed_input): Add file, line parms. 4119 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust. 4120 (real_yylex): Check linemode before input_redirected(). 4121 4122 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL 4123 from op new to warning. 4124 41251999-07-26 Mark Mitchell <mark@codesourcery.com> 4126 4127 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion. 4128 * call.c: All uses changed. 4129 * typeck.c: Likewise. 4130 41311999-07-26 Nathan Sidwell <nathan@acm.org> 4132 4133 * exception.cc (__cplus_type_matcher): Match __eh_matcher 4134 prototype. 4135 41361999-07-26 Mark Mitchell <mark@codesourcery.com> 4137 4138 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro. 4139 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance. 4140 (strip_top_quals): Declare. 4141 (ncp_convert): Likewise. 4142 (type_after_usual_arithmetic_conversions): Likewise. 4143 (composite_pointer_type): Likewise. 4144 * call.c (strip_top_quals): Don't make it static. 4145 (promoted_arithmetic_type_p): New function. 4146 (conditional_conversion): Likewise. 4147 (null_ptr_cst_p): Allow `false' as a NULL pointer constant. 4148 (standard_conversion): Use same_type_p. Don't build BASE_CONVs 4149 for converting a type to itself. 4150 (reference_binding): Honor LOOKUP_NO_TEMP_BIND. 4151 (implicit_conversion): Make sure the from and to types are 4152 complete. 4153 (add_builtin_candidate): Correct handling of ?: operator. 4154 (add_builtin_candidates): Improve documentation. 4155 (build_conditional_expr): New function. 4156 (can_convert): Implement in terms of can_convert_arg. 4157 (ncp_convert): New function. 4158 * typeck.c (type_after_usual_arithmetic_conversions): New 4159 function, split out from common_type. 4160 (composite_pointer_type): New function, split out from 4161 build_conditional_expr. 4162 (common_type): Use type_after_usual_arithmetic_conversions. 4163 Remove redundant attribute merging. 4164 (comptypes): Tidy. Handle COMPLEX_TYPE. 4165 (build_binary_op_nodefault): Use null_ptr_cst_p. 4166 (build_conditional_expr): Remove. 4167 (convert_for_assignment): Use new conversion functions. 4168 4169 * cp-tree.h (abstract_virtuals_error): Change declaration. 4170 * typeck2.c (abstract_virtuals_error): Check to see if an error 4171 occurred, and return a boolean value accordingly. 4172 (build_functional_cast): Adjust accordingly. 4173 * class.c (finish_struct_1): Likewise. 4174 * cvt.c (ocp_convert): Likewise. 4175 * decl.c (cp_finish_decl): Likewise. 4176 (grokparams): Likewise. 4177 (grok_op_properties): Likewise. 4178 (start_function): Likewise. 4179 * init.c (build_new_1): Likewise. 4180 4181 * pt.c (unify): Don't get confused by pointers-to-member functions. 4182 4183 * search.c (build_cplus_new): Robustify. 4184 41851999-07-24 Richard Henderson <rth@cygnus.com> 4186 4187 * gxx.gperf (__builtin_va_arg): New. 4188 * parse.y (VA_ARG): New token. 4189 (unary_expr): Recognize it. 4190 4191Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com) 4192 4193 * g++FAQ.texi: Deleted per Joe Buck's request. 4194 * Makefile.in: Corresponding changes. 4195 41961999-07-23 Jason Merrill <jason@yorick.cygnus.com> 4197 4198 * lex.c: Sync with C frontend. 4199 (whitespace_cr): New fn. 4200 (skip_white_space): Use it. 4201 (init_parse): Reorder. 4202 (yyprint): Support CONSTANT. 4203 (pragma_getc, pragma_ungetc): Bring back. 4204 (read_line_number): Change in_system_header directly. 4205 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file. 4206 (parse_float): Update to C version. 4207 (yylex): Handle '$' under the letter case. 4208 Remove looking_for_typename handling. 4209 Support hex floating point constants. 4210 Follow C's lead for choosing type of integer constants. 4211 Rearrange stuff to match C frontend. 4212 (yyungetc, reinit_parse_for_block, yylex): Support indent_level. 4213 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC. 4214 42151999-07-23 Mark Mitchell <mark@codesourcery.com> 4216 4217 * call.c (reference_binding): Tweak. 4218 (mayble_handle_implicit_object): Use direct_reference_binding to 4219 create the right implicit conversion sequence. 4220 42211999-07-22 Mark Mitchell <mark@codesourcery.com> 4222 4223 * pt.c (convert_nontype_argument): Don't call decl_constant_value 4224 if we're converting to a reference type. 4225 4226 * call.c (NEED_TEMPORARY_P): New macro. 4227 (standard_conversion): Set it, for derived-to-base conversions. 4228 (reference_related_p): New function. 4229 (reference_compatible_p): Likewise. 4230 (convert_class_to_reference): Likewise. 4231 (direct_reference_binding): Likewise. 4232 (reference_binding): Rework for standards-compliance. 4233 (convert_like): Adjust accordingly. 4234 (maybe_handle_ref_bind): Simplify; the right conversion sequences 4235 are now built up in reference_binding. 4236 (initialize_reference): New function. 4237 * cp-tree.h (ICS_USER_FLAG): Document. 4238 (ICS_THIS_FLAG): Likewise. 4239 (ICS_BAD_FLAG): Likewise. 4240 (NEED_TEMPORARY_P): Likewise. 4241 (cp_lvalue_kind): New type. 4242 (real_lvalue_p): Return it. 4243 * error.c (dump_expr): Provide more accurate representation for 4244 AGGR_INIT_EXPRs. 4245 * init.c (expand_default_init): Do not try to perform implicit 4246 conversions for a brace-enclosed initializer. 4247 * search.c (lookup_conversions): Document. 4248 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate 4249 appropriately. 4250 (real_lvalue_p): Adjust accordingly. 4251 (lvalue_p): Likewise. 4252 (build_cplus_new): Don't allow the creation of an abstract class. 4253 * typeck.c (convert_for_initialization): Use initialize_reference. 4254 42551999-07-21 Gavin Romig-Koch <gavin@cygnus.com> 4256 4257 * lex.c (real_yylex) : Correct the test for overflow when lexing 4258 integer literals. 4259 42601999-07-20 Jason Merrill <jason@yorick.cygnus.com> 4261 4262 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL, 4263 not DECL_BUILT_IN, to determine if a function is internally declared. 4264 (duplicate_decls): Likewise. Improve handling of builtins. 4265 (push_overloaded_decl): Remove special handling of builtins. 4266 4267 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P. 4268 4269 * decl.c (grokdeclarator): Pull out decl_constant_value in 4270 templates, too. 4271 4272 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm. 4273 * cp-tree.h, pt.c, semantics.c: Adjust. 4274 * method.c (largest_union_member): Remove. 4275 4276 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed. 4277 4278 * lex.c (token_getch, token_put_back): New fns. 4279 (real_yylex): Use them. 4280 4281 * lex.c (lang_init): Generalize. 4282 (lang_init_options): Tell cpplib this is C++. 4283 (nextchar): Remove. Replace uses with put_back. 4284 (skip_white_space): Handle linemode here. Optimize for cpplib. 4285 (extend_token_buffer_to): New fn. 4286 (extend_token_buffer): Use it. 4287 (read_line_number, check_newline): Just deal with tokens. 4288 (real_yylex): More cpplib optimizations. Simplify. Don't produce 4289 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here. 4290 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING. 4291 * parse.y (PAREN_STAR_PAREN): Remove. 4292 * input.c: Don't use the putback machinery with cpplib. 4293 (sub_getch): Fold back into getch. 4294 (getch): Don't handle linemode here. 4295 (feed_input): Unget any text in the token buffer. 4296 4297 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info, 4298 nextyychar, nextyylval): Remove. 4299 43001999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com> 4301 Jason Merrill <jason@yorick.cygnus.com> 4302 4303 * lex.c (indent_level): New variable. 4304 (init_parse): Set cpp_token to CPP_DIRECTIVE. 4305 (consume_string): Make this smart about USE_CPPLIB. 4306 (yyungetc): Use put_back function. 4307 (pragma_getc, pragma_ungetc): Functions deleted. 4308 (check_newline): Rewrite to be intelligent about USE_CPPLIB. 4309 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and 4310 pragma_ungetc. 4311 (real_yylex): Rewrite to be intelligent about USE_CPPLIB. 4312 Also, clean up cases where we redundantly set token_buffer[0]. 4313 (read_line_number): New fn. 4314 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB. 4315 (end_input): Call cpp_pop_buffer if USE_CPPLIB. 4316 (sub_getch): Conditionalize out code that's not appropriate if 4317 USE_CPPLIB. 4318 (put_back): Rewrite in case USE_CPPLIB is defined. 4319 (input_redirected): Ditto. 4320 4321Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk> 4322 4323 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by 4324 c_global_trees and accessor macros defined in c-common.h. 4325 (cp_tree_index): New enumeration. 4326 (cp_global_trees): Declare new array. Add accessor macros for it, and 4327 delete declarations of tree nodes replaced by it. 4328 (builtin_function): Delete macro, add declaration for new function. 4329 Include c-common.h. 4330 * decl.c: Delete definitions for tree nodes that were replaced by 4331 cp_global_trees and c_global_trees. 4332 (init_decl_processing): Call c_common_nodes_and_builtins; delete code 4333 to generate the common builtins here. 4334 (builtin_function): New function. 4335 * decl2.c (abort_fndecl): Delete declaration. 4336 * except.c (expand_builtin_return_address): Delete declaration. 4337 (builtin_return_address_fndecl): Delete variable. 4338 (const_ptr_type_node): Delete declaration. 4339 * lex.c (cons_up_default_function): Delete declaration of 4340 void_list_node. 4341 * parse.y (void_list_node): Delete declaration. 4342 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type): 4343 Delete variables. 4344 (const_string_type_node): Delete declaration. 4345 * search.c (abort_fndecl): Delete declaration. 4346 * Makefile.in: Update dependencies. 4347 43481999-07-19 Mark Mitchell <mark@codesourcery.com> 4349 4350 * pt.c (check_default_tmpl_args): Move test for missing default 4351 arguments here, from ... 4352 (end_template_parm_list): Here. 4353 43541999-07-18 Mark Mitchell <mark@codesourcery.com> 4355 4356 * decl.c (lookup_nested_type): Remove. 4357 (pushtag): Don't call it. 4358 4359Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com) 4360 4361 * Makefile.in (INTERFACE): Bump to 2. 4362 43631999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br> 4364 4365 * typeck2.c (my_friendly_abort): Updated URL with bug reporting 4366 instructions to gcc.gnu.org. Removed e-mail address. 4367 43681999-07-17 Mark Mitchell <mark@codesourcery.com> 4369 4370 * pt.c (determine_specialization): Tighten error-checking. 4371 (end_template_parm_list): Likewise. 4372 43731999-07-14 Mark Mitchell <mark@codesourcery.com> 4374 4375 * pt.c (check_default_tmpl_args): Handle friends defined in the 4376 class just like member functions defined in the class. 4377 43781999-07-09 Michael Tiemann <tiemann@happy.cygnus.com> 4379 Jason Merrill <jason@yorick.cygnus.com> 4380 4381 * cp-tree.h (struct lang_decl): Added field for storing sorted 4382 FIELD_DECLs (used in TYPE_DECLs). 4383 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union. 4384 (DECL_SORTED_FIELDS): New macro. 4385 * class.c (method_name_cmp): New function. 4386 (finish_struct_methods): Modified to support sorting and searching 4387 methods. 4388 (finish_struct_anon): Changed code in inner loop to use ELT rather 4389 than UELT (which required an extra indirection for every reference). 4390 (field_decl_cmp): New function to support sorting FIELD_DECLs. 4391 (finish_struct_1): Sort fields. 4392 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them. 4393 (lookup_fnfields_1): Search sorted methods in METHOD_VEC. 4394 Also, switch to using array indexing rather than a changing pointer. 4395 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have 4396 DECL_SORTED_FIELDS. 4397 43981999-07-09 Jason Merrill <jason@yorick.cygnus.com> 4399 4400 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style 4401 casts in system headers or extern "C" blocks. 4402 4403 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation 4404 errors to pedwarn. 4405 44061999-07-09 Michael Tiemann <tiemann@happy.cygnus.com> 4407 4408 * decl2.c (write_virtuals): Deleted declaration. 4409 * cp-tree.h (write_virtuals): Deleted extern declaration. 4410 * class.c (finish_struct_1): Removed #if 0'd code that mentions 4411 write_virtuals. 4412 * semantics.c (begin_class_definition): Rewrite code to not depend 4413 on write_virtuals. 4414 4415 * lex.c (cp_pragma_interface): New function. 4416 (cp_pragma_implementation): Likewise. 4417 (handle_cp_pragma): Call them. 4418 4419 * typeck.c (comptypes): Simplify C code in look_hard. 4420 4421 * xref.c (PALLOC): Use xcalloc, not calloc. 4422 (SALLOC): Use xmalloc, not malloc. 4423 4424 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary. 4425 4426 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS 4427 is NO_DEBUG. 4428 4429 * decl.c (duplicate_decls): If a redeclaration doesn't match the 4430 initial declaration, then don't save the inline info and by all 4431 means don't mark the function as a builtin function. 4432 4433 * decl.c (lookup_name_real): Set NONCLASS to 1 if 4434 CURRENT_CLASS_TYPE is 0. 4435 4436 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to 4437 NULL_TREE. 4438 4439 * ptree.c (print_lang_type): Added vtable-needs-writing. 4440 4441Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br> 4442 4443 * decl2.c (mark_vtable_entries): Fix check for rtti offset. 4444 44451999-07-06 Gavin Romig-Koch <gavin@cygnus.com> 4446 4447 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) : 4448 Merged into c-common. 4449 44501999-07-05 Dave Brolley <brolley@cygnus.com> 4451 4452 * lex.c (errorcount): Declare it. 4453 (finish_parse): Update errorcount for when using CPPLIB. 4454 44551999-07-05 Mark Mitchell <mark@codesourcery.com> 4456 4457 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template 4458 parameters. 4459 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro. 4460 * decl.c (push_class_binding): Use it. 4461 (lookup_name_real): Likewise. 4462 44631999-07-02 Gavin Romig-Koch <gavin@cygnus.com> 4464 4465 * cp-tree.h (widest_integer_literal_type_node, 4466 widest_unsigned_literal_type) : New. 4467 * decl.c (widest_integer_literal_type_node, 4468 widest_unsigned_literal_type) : New. 4469 (init_decl_processing): Handle/use the two new types. 4470 * lex.c (real_yylex): Same. 4471 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) : 4472 Same. 4473 44741999-07-01 Mark Mitchell <mark@codesourcery.com> 4475 4476 * decl.c (grokdeclarator): Don't give names "for linkage purposes" 4477 to anonymous cv-qualified types. 4478 44791999-07-01 Gavin Romig-Koch <gavin@cygnus.com> 4480 4481 * lex.c (real_yylex) : Change integer literal overflow handling to 4482 be like c-lex.c. 4483 4484 * lex.c (real_yylex): Improve 'integer constant out of range' messages. 4485 44861999-06-28 Richard Henderson <rth@cygnus.com> 4487 4488 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call. 4489 44901999-06-28 Jason Merrill <jason@yorick.cygnus.com> 4491 4492 * error.c (dump_type_real): Handle TREE_LIST again. 4493 4494 * typeck.c (comp_target_parms): Don't complain about 4495 converting from () to (...) if !flag_strict_prototype. 4496 4497 * decl.c (grokdeclarator): Update the names of all variants when 4498 de-anonymizing. 4499 45001999-06-21 Mark Mitchell <mark@codesourcery.com> 4501 4502 * init.c (expand_aggr_vbase_init): Rename to 4503 construct_virtual_bases. Conditionalize construction here, 4504 rather than ... 4505 (emit_base_init): Here. 4506 45071999-06-19 Mark Mitchell <mark@codesourcery.com> 4508 4509 * semantics.c (finish_asm_stmt): Apply decay conversions to 4510 input operands. 4511 4512 * decl.c (expand_static_init): When building an anonymous function 4513 for use with atexit, compute its body before and after entering 4514 the function. 4515 4516 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and 4517 EXIT_EXPR. 4518 45191999-06-18 Mark Mitchell <mark@codesourcery.com> 4520 4521 * init.c (expand_aggr_vbase_init): Add flag parameter. 4522 (build_partial_cleanup_for): Remove, inlining into .. 4523 (expand_cleanup_for_base): ... here. Take flag parameter. 4524 (emit_base_init): Pass the in_chrg parameter to 4525 emit_aggr_vbase_init. 4526 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base. 4527 45281999-06-16 Mark Mitchell <mark@codesourcery.com> 4529 4530 * decl2.c (import_export_decl): Use same_type_p, rather than 4531 relying on pointer-equality for types. 4532 4533 * method.c (do_build_copy_constructor): Simplify. 4534 4535 * call.c (build_method_call): Remove bogus code for two-argument 4536 delete. 4537 * init.c (build_new_1): Expand on comment, and remove dead code. 4538 4539 * init.c (expand_cleanup_for_base): New function, split out 4540 from ... 4541 (emit_base_init): Here. 4542 (expand_aggr_vbase_init): Use it. 4543 45441999-06-15 Mark Mitchell <mark@codesourcery.com> 4545 4546 * cp-tree.h (class_cache_firstobj): Declare. 4547 (maybe_push_cache_obstack): Rename to push_cache_obstack. 4548 * class.c (permanent_obstack): Remove declaration. 4549 (class_cache_firstobj): Make it global. 4550 (add_method): Don't use permanent_obstack directly. 4551 (pushclass): Only free the class_cache_obstack if we know how far 4552 back to free it. 4553 (maybe_push_cache_obstack): Rename to push_cache_obstack. 4554 * decl.c: Remove dead comment. 4555 (saved_scope): Add class_cache_firstobj. 4556 (push_to_top_level): Save it. 4557 (pop_from_top_level): Restore it. 4558 (push_class_level_binding): Use push_cache_obstack, not 4559 maybe_push_cache_obstack. 4560 * search.c (push_class_decls): Likewise. 4561 45621999-06-14 Martin von L�wis <loewis@informatik.hu-berlin.de> 4563 4564 * pt.c (tsubst_friend_function): Push into namespace of friend 4565 function before pushdecl'ing it. 4566 45671999-06-14 Nathan Sidwell <nathan@acm.org> 4568 4569 * call.c (build_new_op): Remove REF_BIND from all operands. 4570 45711999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br> 4572 4573 * init.c (build_new_1): Look up operator delete even if there was 4574 no explicit new placement. 4575 45761999-06-08 Nathan Sidwell <nathan@acm.org> 4577 4578 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out 4579 of ... 4580 (build_throw): ... here. Call it. 4581 (process_start_catch_block): Call it. 4582 45831999-06-07 Mark Mitchell <mark@codesourcery.com> 4584 4585 * search.c (convert_pointer_to_single_level): Reimplement without 4586 using get_binfo. 4587 45881999-06-06 Mark Mitchell <mark@codesourcery.com> 4589 4590 * method.c (is_back_referenceable_type): Back-reference bools when 4591 not squangling. 4592 45931999-06-07 Dave Brolley <brolley@cygnus.com> 4594 4595 * lex.c (real_yylex): Replace unused bytes from bad multibyte char. 4596 * input.c (putback_buffer): New structure type. 4597 (putback): Replaces putback_char member. 4598 (putback): Replaces putback_char static variable. 4599 (feed_input): Use putback. 4600 (end_input): Use putback. 4601 (sub_getch): Use putback. 4602 (put_back): Use putback. 4603 46041999-06-05 Mark Mitchell <mark@codesourcery.com> 4605 4606 * decl.c (grokdeclarator): Fix typo in last change. 4607 46081999-06-04 Jason Merrill <jason@yorick.cygnus.com> 4609 4610 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack. 4611 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise. 4612 46131999-06-04 Nathan Sidwell <nathan@acm.org> 4614 4615 * except.c (build_throw): Check throw expression validity. 4616 46171999-06-03 Mark Mitchell <mark@codesourcery.com> 4618 4619 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned 4620 just because flag_signed_bitfields is false. 4621 46221999-06-03 Nathan Sidwell <nathan@acm.org> 4623 4624 * semantics.c (begin_class_definition): Update the struct's 4625 location here ... 4626 * class.c (finish_struct): ... rather than here. 4627 4628 * decl.c (make_typename_type): Don't rely on uninitialized 4629 variable. 4630 46311999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 4632 4633 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'. 4634 46351999-05-31 Mark Mitchell <mark@codesourcery.com> 4636 4637 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange 4638 and friends rather than messing with current_obstack directly. 4639 (cp_build_qualified_type_real): Rework ARRAY_TYPE 4640 allocation to match practice throughout the rest of the 4641 compiler. 4642 46431999-05-30 Mark Mitchell <mark@codesourcery.com> 4644 4645 * lex.c (make_lang_type): Create TYPE_BINFO for 4646 TEMPLATE_TYPE_PARMs just like for non-template types. 4647 4648 * decl.c (start_decl): Move checks on initialization to ... 4649 (cp_finish_decl): Here. Tidy formatting slightly. 4650 46511999-05-28 Mark Mitchell <mark@codesourcery.com> 4652 4653 * decl.c (add_binding): Don't complain about a redeclaration of a 4654 semantically identical typedef in a local scope. 4655 46561999-05-28 Nathan Sidwell <nathan@acm.org> 4657 4658 * decl.c (complete_array_type): Allocate off same obstack. Fix 4659 DO_DEFAULT comment to match reality. 4660 4661 * friend.c (make_friend_class): Fix diagnostic typo. 4662 46631999-05-28 Mark Mitchell <mark@codesourcery.com> 4664 4665 * decl.c (lookup_namespace_name): Handle getting a 4666 TEMPLATE_ID_EXPR. 4667 (expand_static_init): Don't call pushdecl for implicitly declared 4668 `atexit' used to register destructors. 4669 46701999-05-25 Mark Mitchell <mark@codesourcery.com> 4671 4672 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to 4673 initialize a vtable. 4674 4675 * cp-tree.h (NAMESPACE_LEVEL): Reformat. 4676 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes 4677 by combining TEMPLATE_INFO and LEVEL into a single union. 4678 (DECL_TEMPLATE_INFO): Reformat. 4679 (DECL_SAVED_TREE): Document. 4680 (DECL_TEMPLATE_INJECT): Remove. 4681 * class.c (finish_struct): Remove code to deal with 4682 DECL_TEMPLATE_INJECT. 4683 4684 * decl.c (maybe_process_template_type_declaration): Handle all new 4685 types in templates uniformly. 4686 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not 4687 DECL_CONTEXT. 4688 * pt.c (lookup_template_class): Inject template instantiations of 4689 forward-declarations. 4690 (instantiate_class_template): Remove code processing 4691 DECL_TEMPLATE_INJECT. 4692 4693 * pt.c (lookup_template_class): Tweak lookup to find member 4694 templates. 4695 4696 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into 4697 ASM_CV_QUAL. 4698 * semantics.c (finish_asm_stmt): Make strings permanent if they're 4699 used in a template. 4700 47011999-05-25 Jason Merrill <jason@yorick.cygnus.com> 4702 4703 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both 4704 parts of pointer to data member types. 4705 47061999-05-24 Mark Mitchell <mark@codesourcery.com> 4707 4708 * decl2.c (mark_vtable_entries): Don't make a copy of a function, 4709 and then make it look like `abort'. Just use `abort' instead. 4710 4711 * typeck.c (build_static_cast): Don't allow static_casts that cast 4712 away constness. 4713 (casts_away_constness_r): New function. 4714 (casts_away_constness): Likewise. 4715 4716 * decl.c (lookup_tag): Remove code no longer needed after 4717 name-lookup improvements. 4718 * decl2.c (handle_class_head): Make error-recovery more robust. 4719 * friend.c (make_friend_class): Reject templated typename types. 4720 * lex.c (is_global): A template parameter isn't global. 4721 * parse.y (class_head): Robustify. 4722 * parse.c: Regenerated. 4723 47241999-05-22 Mark Mitchell <mark@codesourcery.com> 4725 4726 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs, 4727 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs. 4728 4729 * cp-tree.h (push_nested_namespace): Declare. 4730 (pop_nested_namespace): Likewise. 4731 * decl.c (push_nested_namespace): New function. 4732 (pop_nested_namespace): Likewise. 4733 * pt.c (instantiate_class_template): Use them. 4734 4735 * tree.c (mapcar): Handle NON_LVALUE_EXPR. 4736 4737 * cp-tree.h (cplus_expand_constant): Declare. 4738 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're 4739 converted from one pointer-to-object type to another. 4740 * expr.c (cplus_expand_constant): Don't make it static. 4741 * typeck.c (build_component_ref): Don't crash when presented with 4742 a component which is a TEMPLATE_DECL. 4743 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a 4744 cast from a pointer-to-member constant to its own type does not 4745 result in a valid non-type template argument. 4746 47471999-05-21 Mark Mitchell <mark@codesourcery.com> 4748 Nathan Sidwell <nathan@acm.org> 4749 4750 * Make-lang.in (cc1plus): Make it depend on gxx.gperf. 4751 * cp-tree.h: Fix typo in documentation on pointers-to-members. 4752 (cp_build_qualified_type): Make it a macro. 4753 (cp_build_qualified_type_real): Declare. 4754 * decl.c (grokdeclarator): Remove misleading comment. Avoid 4755 problem with template parameters and restrict-qualification. 4756 * gxx.gperf: Replace NORID with RID_UNUSED throughout. 4757 * hash.h: Regenerated. 4758 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into 4759 the enumeration. 4760 (NORID): Remove definition. 4761 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real. 4762 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs. 4763 (fn_type_unification): Check that the function type resulting from 4764 the deduction is legal. 4765 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially. 4766 (unify): Use cp_build_qualified_type_real. 4767 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs. 4768 (cp_build_qualified_type): Rename to ... 4769 (cp_build_qualified_type_real): Add additional COMPLAIN parameter 4770 and modify appropriately. 4771 4772 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to 4773 reveal optimization opportunities. 4774 4775 * pt.c (tsubst): Don't issue error messages when we're not 4776 complaining, even if we see a qualified function type. 4777 (check_cv_quals_for_unify): Don't allow a qualified function 4778 type. 4779 47801999-05-20 Jason Merrill <jason@yorick.cygnus.com> 4781 4782 * class.c (instantiate_type): Downgrade errors for object-dependent 4783 memfn refs to pedwarn. 4784 47851999-05-20 Mark Mitchell <mark@codesourcery.com> 4786 4787 * decl.c (grokdeclarator): Don't treat [] as indicating a 4788 zero-sized array in a typedef. 4789 4790 * call.c (build_object_call): Don't look at DECL_NAME for a type. 4791 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK. 4792 (typeck.c): Or TYPE_MAIN_VARIANT for a type. 4793 4794 * pt.c (for_each_template_parm): Rework to match documentation. 4795 Don't be fooled by a COMPONENT_REF with no TREE_TYPE. 4796 47971999-05-20 Jason Merrill <jason@yorick.cygnus.com> 4798 4799 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P. 4800 4801 * class.c (finish_base_struct): Allow non-COM bases for COM classes 4802 except at the leftmost position. 4803 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable): 4804 Pass the binfo's class, not the most derived, to skip_rtti_stuff. 4805 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise. 4806 4807 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue. 4808 (build_cplus_new): Make sure that what we return is of the right type. 4809 48101999-05-20 Mark Mitchell <mark@codesourcery.com> 4811 4812 * cp-tree.h (make_ptrmem_cst): New function. 4813 * expr.c (cplus_expand_constant): Split out from ... 4814 (cplus_expand_expr): Here. Use cplus_expand_constant. 4815 (init_cplus_expand): Set lang_expand_constant. 4816 * pt.c (convert_nontype_argument): Use make_ptrmem_cst. 4817 4818 * tree.c (make_ptrmem_cst): Define. 4819 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst. 4820 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst. 4821 48221999-05-19 Mark Mitchell <mark@codesourcery.com> 4823 4824 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P. 4825 4826 * decl2.c (start_static_storage_duration_function): Fix comment. 4827 (finish_file): Create static storage duration functions lazily. 4828 48291999-05-19 Jason Merrill <jason@yorick.cygnus.com> 4830 4831 Implement anonymous structs. 4832 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P. 4833 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust. 4834 * class.c (finish_struct_1): Remove redundant check for anon struct. 4835 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union. 4836 (check_tag_decl): Check for anonymous struct here. 4837 * decl2.c (build_anon_union_vars): Catch anon struct at file scope. 4838 * init.c (sort_member_init, emit_base_init): Handle getting fields 4839 as well as names in current_member_init_list. 4840 (perform_member_init): Handle getting an anon aggr. 4841 * method.c (do_build_assign_ref): Don't descend into anon aggrs. 4842 (do_build_copy_constructor): Likewise. 4843 48441999-05-19 Mark Mitchell <mark@codesourcery.com> 4845 4846 * tree.c (cp_build_qualified_type): Don't allow qualified function 4847 types. 4848 4849Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu> 4850 4851 * gxxint.texi: Fix typo. 4852 48531999-05-19 Jason Merrill <jason@yorick.cygnus.com> 4854 4855 * call.c (find_scoped_type, resolve_scope_to_name): Lose. 4856 * class.c (finish_struct_1): Use CLASS_TYPE_P. 4857 * ptree.c (print_lang_type): Likewise. 4858 * typeck.c (build_modify_expr, c_expand_asm_operands): Use 4859 IS_AGGR_TYPE_CODE. 4860 * typeck2.c (digest_init): Likewise. 4861 48621999-05-18 Jason Merrill <jason@yorick.cygnus.com> 4863 4864 * call.c (joust): Compare the types of the conv ops, not the 4865 target types of the conversions. 4866 4867Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu> 4868 4869 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc 4870 was not given. 4871 48721999-05-17 Mark Mitchell <mark@codesourcery.com> 4873 4874 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation. 4875 * decl.c (grokfndecl): Don't allow inline declarations of friend 4876 template specializations, or friend template specializations with 4877 default arguments. 4878 * pt.c (tsubst): Handle substitution into array types that does 4879 not yield a fixed upper bound, even when not processing a 4880 template. 4881 (tsubst_copy): Deal with the fact that the second operand to a 4882 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC. 4883 * search.c (marked_pushdecls_p): Don't descend into 4884 TEMPLATE_TYPE_PARMs and the like. 4885 (unmarked_pushdecls_p): Likewise. 4886 4887 * call.c (build_over_call): Don't throw away 4888 initializations/copies of empty classes; use MODIFY_EXPR and 4889 INIT_EXPR as for non-empty classes. 4890 * class.c (finish_struct_1): Put the padding byte for an empty 4891 class on the TYPE_NONCOPIED_PARTS list for the class. 4892 48931999-05-16 Mark Mitchell <mark@codesourcery.com> 4894 4895 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that 4896 indicate a reference to a field that is a qualified name. 4897 48981999-05-16 Jason Merrill <jason@yorick.cygnus.com> 4899 4900 * decl2.c (finish_objects): Don't use .?tors.* if we don't have 4901 ASM_OUTPUT_CONSTRUCTOR. 4902 4903 * friend.c (do_friend): Add attrlist arg. Remove support for 4904 getting a non-decl as 'decl'. 4905 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or 4906 rtl. 4907 (grokdeclarator): Adjust. 4908 * cp-tree.h: Adjust. 4909 49101999-05-16 Mark Mitchell <mark@codesourcery.com> 4911 4912 * cp-tree.h (permanent_p): New function. 4913 * init.c (build_new_1): Use mapcar, not copy_node, to copy a 4914 possibly complex tree node. 4915 * tree.c (mapcar): Adjust comments, and follow coding standards in 4916 conditional. 4917 (permanent_p): New function. 4918 49191999-05-13 Per Bothner <bothner@cygnus.com> 4920 4921 * class.c (push_lang_context): Turn off DECL_IGNORED_P for 4922 primitive Java types, if we actually see `extern "Java"'. 4923 49241999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu> 4925 4926 * lang-specs.h: Pass -$ to the preprocessor. 4927 49281999-05-10 Jason Merrill <jason@yorick.cygnus.com> 4929 4930 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too. 4931 Don't bother wrapping an OFFSET_TYPE around unknown_type_node. 4932 (resolve_offset_ref): Don't handle a raw baselink. 4933 * cvt.c (build_expr_type_conversion): Likewise. 4934 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment, 4935 convert_for_initialization): Likewise. 4936 * class.c (instantiate_type): Handle seeing a baselink under an 4937 OFFSET_REF. 4938 * error.c (dump_expr): Likewise. 4939 * pt.c (for_each_template_parm): Likewise. 4940 (resolve_overloaded_unification): Likewise. 4941 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise. 4942 * typeck.c (expr_sizeof): Also complain about other permutations 4943 of overloaded functions. 4944 49451999-05-07 Jason Merrill <jason@yorick.cygnus.com> 4946 4947 * init.c (resolve_offset_ref): Don't return a raw method. 4948 Use BASELINK_P. 4949 * typeck.c (decay_conversion): Don't handle a raw method. 4950 Resolve all OFFSET_REFs. 4951 (get_member_function_from_ptrfunc): 0 is a valid vtable index. 4952 (build_binary_op_nodefault): Handle resolving overloaded fns. Use 4953 same_type_p for pmf bits. Don't use build_binary_op to compare 4954 raw pointers to methods. 4955 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE, 4956 to decide when to call resolve_offset_ref. 4957 (build_c_cast, convert_for_initialization): Likewise. 4958 * cvt.c (build_expr_type_conversion): Likewise. 4959 49601999-05-06 Nathan Sidwell <nathan@acm.org> 4961 4962 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class. 4963 49641999-05-05 Mark Mitchell <mark@codesourcery.com> 4965 4966 * decl2.c (start_objects): Don't let static constructors and 4967 destructors get inlined. 4968 4969 * parse.y (nested_name_specifier): Make sure ordinary types are 4970 complete, just like template types. 4971 * parse.c: Regenerated. 4972 4973 * pt.c (check_explicit_specialization): Improve error messages. 4974 49751999-05-04 Martin von L�wis <loewis@informatik.hu-berlin.de> 4976 4977 * typeck.c (string_conv_p): Use same_type_p to check whether we 4978 try to convert between char and wchar_t. 4979 49801999-05-03 Mark Mitchell <mark@codesourcery.com> 4981 4982 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous 4983 lookup to error_mark_node here. 4984 (lookup_member): Revise documentation. Add comments. Don't set 4985 the TREE_TYPE to error_mark_node here, and don't build up an extra 4986 TREE_LIST for ambiguous lookups. 4987 (setup_class_bindings): Adjust accordingly. 4988 (push_class_decls): Revise out-of-date comments. 4989 4990 * typeck.c (build_const_cast): Tighten checks for legality. 4991 49921999-05-02 Martin von L�wis <loewis@informatik.hu-berlin.de> 4993 4994 * init.c (build_member_call): Lookup names coming from 4995 namespace-scoped LOOKUP_EXPR. 4996 49971999-05-03 Jim Blandy <jimb@zwingli.cygnus.com> 4998 4999 * gxxint.texi: Add documentation for 'I'. 5000 50011999-05-02 Martin von L�wis <loewis@informatik.hu-berlin.de> 5002 5003 * tinfo.cc (operator==): Qualify type_info with std::. 5004 50051999-05-02 Mark Mitchell <mark@codesourcery.com> 5006 5007 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy. 5008 (DECL_COMDAT): Remove definition. 5009 50101999-05-01 Mark Mitchell <mark@codesourcery.com> 5011 5012 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous 5013 change. 5014 50151999-04-30 Mark Mitchell <mark@codesourcery.com> 5016 5017 * class.c (build_vtable): Use build_lang_decl when building 5018 vtables, not just build_decl. 5019 (prepare_fresh_vtable): Likewise. 5020 * decl.c (wrapup_globals_for_namespace): Mark vtables as 5021 DECL_EXTERNAL when calling wrapup_global_declarations. 5022 * decl2.c (priority_info_s): Add initializations_p and 5023 destructions_p members. 5024 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED, 5025 when deciding what vtables to write out. 5026 (ssdf_decls): New variable. 5027 (ssdf_decls_used): Likewise. 5028 (start_static_storage_duration_function): Deal with being called 5029 multiple times. Avoid inlining this function. 5030 (generate_inits_for_priority): Deal with reuse of priority map. 5031 (get_priority_info): Clear initializations_p and destructions_p. 5032 (do_static_initialization): Tweak comment. 5033 (do_static_destruction): Likewise. Fix condition on sentries for 5034 destruction. 5035 (generate_ctor_or_dtor_function): Call all of the static storage 5036 duration functions. 5037 (generate_ctor_or_dtor_function_for_priority): Check 5038 initializations_p and destructions_p to see what priorities need 5039 initialization functions. 5040 (finish_file): Rework to generate multiple static storage duration 5041 functions, rather than just one. 5042 5043 * typeck.c (build_const_cast): Tweak last change to handle 5044 templates correctly. 5045 5046 * typeck.c (build_const_cast): Disallow use of const_cast to 5047 anything but a pointer or reference type. 5048 50491999-04-30 Nathan Sidwell <nathan@acm.org> 5050 5051 * decl.c (cp_finish_decl): Don't permit arrays of abstract or 5052 signature type. 5053 50541999-04-29 Mark Mitchell <mark@codesourcery.com> 5055 5056 * decl2.c (do_static_destruction): Remove obsolete FIXME comment. 5057 (finish_file): Indent comments properly. 5058 50591999-04-29 Richard Henderson <rth@cygnus.com> 5060 5061 * decl2.c (do_static_initialization): Call do_pending_stack_adjust. 5062 (do_static_destruction): Likewise. 5063 50641999-04-29 Nathan Sidwell <nathan@acm.org> 5065 5066 * cp-tree.h (TYPE_NOTHROW_P): New macro. 5067 * decl2.c (delete_sanity): Warn on deleting void *. 5068 * init.c (build_new_1): Use TYPE_NOTHROW_P. 5069 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from 5070 throwing operator new. 5071 50721999-04-28 Nathan Sidwell <nathan@acm.org> 5073 5074 * cp-tree.h (build_component_addr): Remove prototype. 5075 * typeck.c (build_component_addr): Make static. Remove MSG 5076 argument. 5077 (build_component_addr): Remove MSG parameter, clean up 5078 comment. 5079 (build_x_function_call): Use cp_error. 5080 (build_unary_op): Adjust call of build_component_addr. 5081 50821999-04-28 Mark Mitchell <mark@codesourcery.com> 5083 5084 * pt.c (tsubst_friend_class): Check for NULL. 5085 5086Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> 5087 5088 * search.c (binfo_for_vtable): Initialize bfvi.var. 5089 50901999-04-27 Nathan Sidwell <nathan@acm.org> 5091 5092 * rtti.c (build_x_typeid): Check rtti is enabled. 5093 50941999-04-26 Mark Mitchell <mark@codesourcery.com> 5095 5096 * search.c (is_subobject_of_p): Make sure we're looking at the 5097 right baseclasses. 5098 50991999-04-26 Marc Espie <espie@cvs.openbsd.org> 5100 5101 * Make-lang.in (cplib2.ready): Don't depend on phony targets. 5102 51031999-04-23 Mark Mitchell <mark@codesourcery.com> 5104 5105 * decl2.c (finish_file): Tweak handling of extern inlines so that 5106 they are not unnecessarily put out. 5107 5108 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and 5109 such as base classes. 5110 51111999-04-22 Brendan Kehoe <brendan@cygnus.com> 5112 5113 * tree.c (build_exception_variant): Fix typo: use the chain of U, 5114 not trying V, while cycling through U. 5115 51161999-04-22 Mark Mitchell <mark@codesourcery.com> 5117 5118 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and 5119 preserves_first_arg. Enlarge dummy accordingly. 5120 (DECL_TINFO_FN_P): New macro. 5121 (SET_DECL_TINFO_FN_P): Likeiwse. 5122 (DECL_RETURNS_FIRST_ARG): Remove. 5123 (DECL_PRESERVES_THIS): Likewise. 5124 (DECL_INIT_PRIORITY): New macro. 5125 (finish_struct_1): Change prototype. 5126 (cat_namespace_levels): Remove prototype. 5127 (vtable_decl_p): New prototype. 5128 (vtype_decl_p): Likewise. 5129 (sigtable_decl_p): Likewise. 5130 (walk_globals_pred): New typedef. 5131 (walk_globals_fn): Likewise. 5132 (walk_globals): New prototype. 5133 (walk_namespaces_fn): New typedef. 5134 (walk_namespaces): New prototype. 5135 (wrapup_globals_for_namespace): Likewise. 5136 (walk_vtables): Remove prototype. 5137 (walk_sigtables): Likewise. 5138 (instantiate_pending_templates): New prototype. 5139 * class.c (finish_struct_1): Don't return a value. 5140 * decl.h (pending_statics): Remove declaration. 5141 * decl.c (walk_namespaces_r): New function. 5142 (walk_globals_r): Likewise. 5143 (vtable_decl_p): Likewise. 5144 (vtype_decl_p): Likewise. 5145 (sigtable_decl_p): Likewise. 5146 (walk_namespaces): Likewise. 5147 (walk_globals_data): New type. 5148 (walk_globals): New function. 5149 (wrapup_globals_for_namespace): Likewise. 5150 (expand_static_init): Remove assertion. Remove redundancy in 5151 conditional. Don't put static data members in static_aggregates 5152 Tidy. 5153 (finish_function): Remove redundancy in conditional. Don't set 5154 DECL_RETURNS_FIRST_ARG. 5155 (cat_namespace_levels): Remove. 5156 * decl2.c: Include splay-tree.h and varray.h. 5157 (priority_info_s): New structure. 5158 (finish_vtable_vardecl): Change prototype. Adjust for new calling 5159 conventions. 5160 (prune_vtable_vardecl): Likewise. 5161 (finish_sigtable_vardecl): Likewise. 5162 (setup_initp): Remove. 5163 (do_dtors): Remove. 5164 (do_ctors): Remove. 5165 (start_static_storage_duration_function): New function. 5166 (generate_inits_for_priority): Likewise. 5167 (finish_static_storage_duration_function): Likewise. 5168 (get_priority_info): Likewise. 5169 (do_static_initialization): Likewise. 5170 (do_static_destruction): Likewise. 5171 (do_static_initialization_and_destruction): Likewise. 5172 (generate_ctor_or_dtor_function): Likewise. 5173 (generate_ctor_and_dtor_functions_for_priority): Likewise. 5174 (pending_statics): Make it a varray. 5175 (pending_statics_used): New variable. 5176 (saved_inlines): Make it a varray. 5177 (saved_inlines_used): New variable. 5178 (finish_static_data_member): Change method of updating 5179 pending_statics. 5180 (mark_inline_for_output): Remove #if 0'd code. Change method of 5181 updating saved_inlines. 5182 (walk_vtables): Remove. 5183 (walk_sigtables): Likewise. 5184 (import_export_decl): Use DECL_TINFO_FN_P. 5185 (pending_templates): Remove declaration. 5186 (maybe_templates): Likewise. 5187 (static_aggregates_initp): Likewise. 5188 (setup_initp): Likewise. 5189 (finish_objects): Simplify. 5190 (INITIALIZE_P_IDENTIFIER): New macro. 5191 (PRIORITY_IDENTIFIER): New macro. 5192 (SSDF_IDENTIFIER): New macro. 5193 (initialize_p_decl): New variable. 5194 (priority_decl): Likewise. 5195 (ssdf_decl): Likewise. 5196 (priority_info_map): Likewise. 5197 (finish_file): Recode output of static intializers and other 5198 file-scope finalization tasks. 5199 * error.c (OB_END_TEMPLATE_ID): New macro. 5200 (dump_type_real): Use it. 5201 (dump_decl): Likewise. 5202 (dump_function_name): Likewise. 5203 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals 5204 interface. 5205 (check_newline): Use walk_globals, not walk_vtables. 5206 * pt.c (pending_tempalte_expansions): Remove. 5207 (set_vardecl_interface_info): Likewise. 5208 (pending_templates): Make static. 5209 (maybe_templates): Likewise. 5210 (instantiate_class_template): Adjust call to finish_struct_1. 5211 (instantiate_pending_templates): New function. 5212 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P. 5213 * tree.c (static_aggregates_initp): Remove. 5214 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY 5215 instead. 5216 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h. 5217 5218 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes 5219 with the RTL code RETURN. 5220 * hash.h: Regenerated. 5221 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD. 5222 * parse.y: Replace RETURN with RETURN_KEYWORD throughout. 5223 * parse.c: Regenerated. 5224 * pt.c: Include varray.h. Include rtl.h since varray.h requires 5225 it. 5226 (inline_parm_levels): New variable. 5227 (inline_parm_levels_used): Likewise. 5228 (maybe_begin_member_template_processing): Update them. 5229 (maybe_end_member_template_processing): Use them, rather than 5230 guessing how many levels to pop. 5231 5232 * decl.c (make_typename_type): Tighten error-checking. 5233 52341999-04-20 Mark Mitchell <mark@codesourcery.com> 5235 5236 * cp-tree.h (build_binary_op): Remove unneeded parameter. 5237 * class.c (build_vrable_entry_ref): Adjust call to 5238 build_binary_op. 5239 * decl.c (expand_static_init): Likewise. 5240 (grokdeclarator): Likewise. 5241 (finish_function): Likewise. 5242 * decl2.c (delete_sanity): Likewise. 5243 (do_dtors): Likewise. 5244 (do_ctors): Likewise. 5245 * error.c (dump_type_suffix): Likewise. 5246 * expr.c (cplus_expand_expr): Likewise. 5247 * init.c (resolve_offset_ref): Likewise. 5248 (build_new): Likewise. 5249 (build_new_1): Likewise. 5250 (build_vec_delete_1): Likewise. 5251 (expand_vec_init_catch_clause): Likewise. 5252 (build_delete): Likewise. 5253 * pt.c (tsubst): Likewise. 5254 * rtti.c (synthesize_tinfo_fn): Likewise. 5255 * search.c (expand_upcast_fixups): Likewise. 5256 (expand_direct_vtbls_init): Likewise. 5257 * typeck.c (get_member_function_from_ptrfunc): Likewise. 5258 (build_binary_op_nodefault): Likewise. 5259 (point_int_sum): Likewise. 5260 (pointer_diff): Likewise. 5261 (build_unary_op): Likewise. 5262 (build_modify_expr): Likewise. 5263 (get_delta_difference): Likewise. 5264 (build_ptrmemfunc): Likewise. 5265 (expand_ptrmemfunc_cst): Likewise. 5266 52671999-04-20 Jason Merrill <jason@yorick.cygnus.com> 5268 5269 * decl.c (grokfndecl): Always call cplus_decl_attributes. 5270 * decl2.c (grokfield): Pass attrlist to grokdeclarator. 5271 52721999-04-19 Mark Mitchell <mark@codesourcery.com> 5273 5274 * cp-tree.h (finish_static_data_member_decl): New function. 5275 * decl2.c (finish_static_data_member_decl): Split out from ... 5276 (grokfield): Here. 5277 * pt.c (instantiate_class_template): Use it here instead of 5278 trying to fake it. 5279 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME; 5280 finish_static_data_member_decl will do that. Explicit set 5281 DECL_EXTERNAL to match non-template processing. 5282 52831999-04-18 Mark Mitchell <mark@codesourcery.com> 5284 5285 * cp-tree.h (finish_class_definition): Add parameter. 5286 * parse.y (structsp): Use it. Don't call pop_scope here. 5287 * parse.c: Regenerated. 5288 * semantics.c (finish_class_definition): Pop it here. 5289 52901999-04-17 Mark Mitchell <mark@codesourcery.com> 5291 5292 * decl.c (xref_tag): Revise handling of nested template 5293 declarations. 5294 * pt.c (check_explicit_specialization): Tweak handling of friend 5295 templates in template classes. 5296 (tsubst_friend_class): Handle friend declarations for nested 5297 member template classes. 5298 52991999-04-16 Mark Mitchell <mark@codesourcery.com> 5300 5301 * class.c (finish_struct): Remove unused variable. 5302 (pushclass): Likewise. 5303 (invalidate_class_lookup_cache): Likewise. 5304 * cp-tree.def (TYPENAME_TYPE): Improve documentation. 5305 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME 5306 doesn't get obliterated. 5307 (make_typename_type): Handle template classes correctly. 5308 5309 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove. 5310 (storetags): Declare. 5311 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG. 5312 (pushclass): Likewise. Use storetags to install tag declarations, 5313 not pushtag. 5314 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG. 5315 * decl.c (storetags): Make it global. 5316 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an 5317 implicit typename declaration. 5318 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG. 5319 * method.c (hack_identifier): Likewise. 5320 * search.c (lookup_member): Likewise. 5321 5322 * decl.c (warn_about_implicit_typename_lookup): New function. 5323 (lookup_name_real): Use it. Rework handling of implicit typename 5324 extension. 5325 53261999-04-15 Mark Mitchell <mark@codesourcery.com> 5327 5328 * cp-tree.h (lookup_nested_field): Remove. 5329 * class.c (push_nested_class): Handle UNION_TYPEs. 5330 (pop_nested_class): Likewise. 5331 * decl.c (lookup_name_real): Don't call lookup_nested_field. 5332 (start_decl): Use push_nested_class, not just pushclass. 5333 (cp_finish_decl): Use pop_nested_class, not just popclass. 5334 * search.c (lookup_nested_field): Remove. 5335 5336 * cp-tree.h (lang_type): Add documentation. 5337 * decl2.c (handle_class_head): Create template declarations here, 5338 as appropriate. 5339 * parse.y (class_head): Return whether or not we entered a new 5340 scope, as well as the type named. 5341 (named_class_head): Likewise. 5342 (named_complex_class_head_sans_basetype): Likewise. 5343 (structsp): Adjust accordingly. Pop scope when required. 5344 * parse.c: Regenerated. 5345 * pt.c (check_default_tmpl_args): Robustify. 5346 (redeclare_class_template): Likewise. 5347 (instantiate_class_template): An instantiation of an 5348 anonymous union is itself an anonymous union. 5349 * semantics.c (begin_class_definition): Don't create template 5350 declarations here. 5351 53521999-04-15 Jason Merrill <jason@yorick.cygnus.com> 5353 5354 * parse.y (after_type_declarator_intern): New nonterminal. 5355 (after_type_declarator): Use it. 5356 (direct_after_type_declarator): Likewise. Move above 5357 nonnested_type to fix reduce/reduce conflict resolution. 5358 (declmods): Reducing from just 'attributes' has EMPTY precedence. 5359 * Makefile.in (CONFLICTS): Update. 5360 5361 * decl.c (define_label): Downgrade error for jumping over a 5362 non-POD decl to pedwarn. 5363 53641999-04-14 Mark Mitchell <mark@codesourcery.com> 5365 5366 * cp-tree.h (popclass): Change declaration. 5367 (pop_nested_class): Likewise. 5368 (poplevel_class): Remove declaration. 5369 * call.c (convert_default_argument): Pass no arguments to 5370 popclass. 5371 * class.c (finish_struct_1): Likewise. 5372 (finish_struct): Likewise. 5373 (popclass): Remove argument. Simplify code accordingly. 5374 (pop_nested_class): Likewise. 5375 * decl.c (poplevel_class): Declare it here, and make it static. 5376 (poplevel): Handle class scopes. 5377 (poplevel_class): Don't take an rgument. Simplify. 5378 (pop_everything): Pass no arguments to pop_nested_class. 5379 (cp_finish_decl): Pass no arguments to popclass. 5380 (grokdeclarator): Pass no arguments to pop_nested_class. 5381 (finish_function): Likewise. 5382 * decl2.c (grokfield): Likewise. 5383 (pop_scope): Pass no arguments to popclass. 5384 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class. 5385 * pt.c (instantiate_class_template): Move call to pushclass, and 5386 document. Pass no arguments to popclass. 5387 (regenerate_decl_from_template): Likewise. 5388 53891999-04-14 Jason Merrill <jason@yorick.cygnus.com> 5390 5391 * typeck.c (build_unary_op): Handle taking the address of a unique 5392 bound non-static member function. 5393 53941999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de> 5395 5396 * lang-options.h (-Wdeprecated): New flag. 5397 * decl2.c (warn_deprecated): New flag. 5398 (lang_decode_option): Deprecated this-is-variable, 5399 external-templates, alt-external-templates. 5400 Support -Wdeprecated. 5401 * errfn.c (cp_deprecated): New function. 5402 54031999-04-13 Jason Merrill <jason@yorick.cygnus.com> 5404 5405 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead 5406 of the decls themselves. 5407 5408 * pt.c (tsubst_function_type): Copy attributes over. 5409 5410 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority 5411 and com_interface. 5412 * cp-tree.h: Add prototype. 5413 * decl.c (init_decl_processing): Set valid_lang_attribute. 5414 54151999-04-13 Mark Mitchell <mark@codesourcery.com> 5416 5417 * class.c (finish_struct_1): Look at the const-ness of the field's 5418 type, not the TREE_READONLY-ness of the declaration. 5419 * method.c (synthesize_method): Likewise. 5420 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when 5421 creating new declarations. 5422 54231999-04-13 Mike Stump <mrs@wrs.com> 5424 5425 * decl2.c (import_export_decl): Because vtables always reference 5426 virtual functions, even if they are inlined, don't allow 5427 -fno-implement-inlines to not emit them, instead, emit them with 5428 the vtable. 5429 * decl.c (start_function): Likewise. 5430 54311999-04-12 Jason Merrill <jason@yorick.cygnus.com> 5432 5433 * cp-tree.h (struct lang_type): Add com_interface. 5434 (CLASSTYPE_COM_INTERFACE): New macro. 5435 * class.c (set_rtti_entry): COM interface classes have no RTTI 5436 entries in their vtables; adjust. 5437 (add_virtual_function, finish_base_struct, skip_rtti_stuff, 5438 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable, 5439 finish_struct_1): Likewise. 5440 * decl2.c (mark_vtable_entries): Likewise. 5441 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise. 5442 * search.c (get_abstract_virtuals_1, get_abstract_virtuals, 5443 expand_upcast_fixups): Likewise. 5444 * tree.c (debug_binfo): Likewise. 5445 5446 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro. 5447 * typeck.c (comptypes): If we get it, ignore attributes. 5448 * class.c (instantiate_type): Use BASELINK_P. Change complain 5449 parameter to flags; 2 means ignore attributes. 5450 * call.c (build_op_delete_call): Pass it. 5451 5452 * decl.c (xref_tag): Only complain once about using a typedef-name 5453 with 'struct'. Downgrade to pedwarn. 5454 5455 * decl.c (grokdeclarator): Allow [] syntax for zero-length array. 5456 5457 * parse.y (absdcl_intern): New nonterminal. 5458 (absdcl, direct_abstract_declarator): Use it. 5459 5460 * pt.c (lookup_template_class): Look through implict typename. 5461 54621999-04-11 Mark Mitchell <mark@codesourcery.com> 5463 5464 * friend.c (add_friend): Deal gracefully with error_mark_node. 5465 * method.c (build_overload_value): Handle pointers-to-members as 5466 template parameters. 5467 5468 * decl.c (push_binding): Fix typo in comment. 5469 54701999-04-10 Mark Mitchell <mark@codesourcery.com> 5471 5472 * error.c (dump_type_real): If a typename is a template-id, put 5473 out the template arguments. 5474 (dump_expr): Handle TEMPLATE_ID_EXPR. 5475 * pt.c (lookup_template_class): Now that full arguments are 5476 available everywhere, remove code that tried to guess them. 5477 54781999-04-09 Mark Mitchell <mark@codesourcery.com> 5479 5480 * decl.c (make_typename_type): Complain if we don't find a type 5481 when trying to make a typename type for a non-template type. 5482 54831999-04-09 Jason Merrill <jason@yorick.cygnus.com> 5484 5485 * decl.c (start_decl): Pass attributes to grokdeclarator. 5486 (grokdeclarator): Handle attributes on constructor-syntax 5487 initializers. 5488 54891999-04-08 Mark Mitchell <mark@codesourcery.com> 5490 5491 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands 5492 don't have types. 5493 5494 * search.c (template_self_reference_p): Tweak. 5495 54961999-04-07 Mark Mitchell <mark@codesourcery.com> 5497 5498 * init.c (build_offset_ref): Don't build yet another weird data 5499 structure to describe overloaded functions. 5500 55011999-04-06 Mark Mitchell <mark@codesourcery.com> 5502 5503 * cp-tree.h (BASELINK_P): New macro. 5504 (SET_BASELINK_P): Likewise. 5505 * init.c (build_member_call): Remove needless assignment in if 5506 statement. 5507 * search.c (lookup_field_r): Fix handling when we are looking 5508 specifically for a type; these are not hidden by functions and 5509 variables. 5510 (lookup_member): Use SET_BASELINK_P. 5511 * tree.c (is_overloaded_fn): Use BASELINK_P. 5512 (really_overloaed_fn): Likewise. 5513 (get_first_fn): Likewise. 5514 55151999-04-05 Mark Mitchell <mark@codesourcery.com> 5516 5517 * decl.c (lookup_name_current_level): Tweak, and improve 5518 documentation. 5519 5520 * class.c (maybe_fixup_vptrs): Remove declaration. 5521 (build_class_init_list): Likewise. 5522 * decl.c (pushdecl_class_level): Call check_template_shadow here 5523 ... 5524 (push_class_level_binding): ... not here. 5525 * search.c (dfs_push_type_decls): Only avoid 5526 template-self-reference TYPE_DECLs if they are from base classes. 5527 55281999-04-04 Mark Mitchell <mark@codesourcery.com> 5529 5530 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL 5531 nodes. Tidy. 5532 55331999-04-03 Jason Merrill <jason@yorick.cygnus.com> 5534 5535 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose. 5536 (finish_struct_1): Don't call build_class_init_list. 5537 55381999-04-02 Mark Mitchell <mark@codesourcery.com> 5539 5540 * tinfo.h (__class_type_info): Fix illegal declaration. 5541 5542 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment. 5543 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro. 5544 (IDENTIFIER_CLASS_VALUE): Improve documentation. 5545 (is_properly_derived_from): Declare. 5546 (invalidate_class_lookup_cache): Likewise. 5547 (maybe_maybe_note_name_used_in_class): Likewise. 5548 (note_name_declared_in_class): Likewise. 5549 (push_using_decl): Remove duplicate declaration. 5550 (id_in_current_class): Remove declaration. 5551 (push_class_binding): Change prototype. 5552 (clear_identitifer_class_values): Declare. 5553 * call.c (is_properly_derived_from): Make it global. 5554 (build_new_function_call): Be careful about updating candidates. 5555 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when 5556 asked to make illegal calls. 5557 * class.c: Include splay-tree.h. 5558 (class_stack_node): Add names_used slot. 5559 (check_member_decl_is_same_in_complete_scope): Remove. 5560 (add_method): Fix comment. Push the declaration into class 5561 scope. 5562 (finish_struct_1): When popping the class, pop the bindings too. 5563 Remove check for data member/function member conflict. 5564 (finish_struct): Remove calls to 5565 check_member_decl_is_same_in_complete_scope. Change calls to 5566 popclass. 5567 (pushclass): Clear names_used in the class stack entry. 5568 Use invalidate_class_lookup_cache to remove cached entries, rather 5569 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE 5570 before entering a new class. Remove dead code. Don't mess with 5571 current_function_decl when pushing declarations. 5572 (invalidate_class_lookup_cache): New function, split out from ... 5573 (popclass): Here. Clean up names_used on our way out. 5574 (instantiate_type): Adjust. 5575 (build_self_reference): Don't push the declaration here. 5576 (maybe_note_name_used_in_class): New function. 5577 (note_name_declared_in_class): Likewise. 5578 * decl.c (add_binding): Change prototype. 5579 (find_class_binding_level): New function. 5580 (innermost_nonclass_level): Likewise. 5581 (current_binding_level): Update documentation. 5582 (inner_binding_level): Remove. Replace with current_binding_level 5583 throughout. 5584 (push_binding_level): Remove special handling of 5585 class_binding_level. 5586 (pop_binding_level): Likewise. Use find_class_binding_level. 5587 (suspend_binding_level): Likewise. 5588 (global_bindings_p): Use innermost_nonclass_level. 5589 (toplevel_bindings_p): Likewise. 5590 (namespace_bindings_p): Likewise. 5591 (pseudo_global_level_p): Likewise. 5592 (push_binding): Clear INHERITED_VALUE_BINDING_P. 5593 (add_binding): Check for illegal multiple declarations. Return a 5594 value indicating whether or not the new binding was legal. 5595 (push_local_binding): Skip over class binding levels. Check 5596 return value from add_binding. 5597 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call 5598 note_name_declared_in_class. 5599 (pushlevel_class): Remove "fake out the rest of the compiler" 5600 code. 5601 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs. 5602 (clear_identifier_class_values): New function. 5603 (pop_from_top_level): Use it. 5604 (pop_everything): Tweak. 5605 (maybe_process_template_type_declaration): Don't push the 5606 declaration for the template here. 5607 (pushtag): Don't push tag declarations into class scope here. 5608 (pushdecl): Apply DeMorgan's law for readability. 5609 (pushdecl_class_level): Remove special-case code for 5610 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions. 5611 (push_class_level_bindng): Deal with inherited bindings. 5612 (lookup_name_real): Remove special-case code for 5613 TYPE_BEING_DEFINED, and some implicit typename magic. 5614 (grokdeclarator): Handle COMPONENT_REF for a template function. 5615 (build_enumerator): Don't call pushdecl_class_level here. 5616 (id_in_current_class): Remove. 5617 * decl2.c (grokfield): Don't call pushdecl_class_level or 5618 check_template_shadow. 5619 * errfn.c (cp_file_of): Don't declare. 5620 (cp_line_of): Likewise. 5621 * error.c (dump_decl): Handle an OVERLOAD. 5622 (cp_file_of): Likewise. 5623 (cp_line_of): Likewise. 5624 * init.c (build_member_call): Handle a COMPONENT_REF. 5625 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not 5626 pushdecl_class_level. 5627 * method.c (hack_identifier): Build COMPONENT_REFs for references 5628 to member templates as well as member functions. Remove dead 5629 code. 5630 * parse.y (left_curly): Remove. 5631 (nonnested_type): Call maybe_note_name_used_in_class, not 5632 pushdecl_class_level. 5633 * parse.c: Regenerated. 5634 (nested_name_specifier_1): Likewise. 5635 * pt.c (check_explicit_specialization): Adjust, for robustness. 5636 (check_template_shadow): Handle OVERLOADs. 5637 (build_template_decl): Set DECL_CONSTRUCTOR_P on the 5638 TEMPLATE_DECL, if appropriate. 5639 * search.c (envelope_add_decl): Remove. 5640 (dfs_pushdecls): Likewise. 5641 (dfs_compress_decls): Likewise. 5642 (dfs_push_decls): New function. 5643 (dfs_push_type_decls): Likewise. 5644 (setup_class_bindings): Likewise. 5645 (template_self_reference_p): Likewise. 5646 (lookup_field_r): Use it. 5647 (looup_member): Remove old comment. Deal with ambiguity. 5648 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls, 5649 and remove envelope processing. 5650 * semantics.c (begin_class_definition): Let pushclass push 5651 declarations for base classes. 5652 (finish_member_declaration): Push declarations into class scope. 5653 * typeck.c (build_component_ref): Just put an OVERLOAD into the 5654 COMPONENT_REF, not a TREE_LIST of an OVERLOAD. 5655 (build_x_function_call): Deal with OVERLOAD. Handle template-ids. 5656 * Makefile.in (class.o): Depend on splay-tree.h. 5657 5658Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org> 5659 5660 * cvt.c (convert_pointer_to_real): Use same_type_p. 5661 * typeck.c (comp_target_types): Use same_type_p. 5662 56631999-03-31 Jason Merrill <jason@yorick.cygnus.com> 5664 5665 * semantics.c (begin_inline_definitions, 5666 finish_inline_definitions): Rename from finish_default_args and 5667 begin_inline_definitions, respectively, to something that isn't a 5668 total lie. :) 5669 * parse.y (structsp): Adjust. 5670 5671 * tree.c (hash_tree_cons): Remove obsolete via_* parms. 5672 (list_hash_lookup): Likewise. 5673 (hash_tree_chain): Adjust. 5674 * pt.c (tsubst): Adjust. 5675 (tsubst_arg_types): Use plain hash_tree_cons. 5676 * cp-tree.h (hash_tree_cons_simple): Lose. 5677 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons. 5678 5679Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5680 5681 * Makefile.in (hash.h): Generate using gperf language 'C', not 5682 'KR-C', so gperf uses the `const' keyword on strings. 5683 5684 * gxx.gperf (resword): Const-ify a char*. 5685 56861999-03-30 Jason Merrill <jason@yorick.cygnus.com> 5687 5688 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST, 5689 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES, 5690 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH, 5691 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST, 5692 CLASSTYPE_BINFO_AS_LIST): Remove cruft. 5693 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c, 5694 tree.c: Adjust. 5695 56961999-03-29 Jason Merrill <jason@yorick.cygnus.com> 5697 5698 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall. 5699 57001999-03-28 Jason Merrill <jason@yorick.cygnus.com> 5701 5702 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops. 5703 57041999-03-27 Mark Mitchell <mark@codesourcery.com> 5705 5706 * cp-tree.h (add_friend): Declare. 5707 (add_friends): Likewise. 5708 * friend.c (add_friend): Make it global. Don't add to 5709 DECL_BEFRIENDING_CLASSES if the befriending class is a template. 5710 (add_friends): Make it global. 5711 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the 5712 befriending class is a template. 5713 * parse.y (component_decl_1): Fix typo in comment. 5714 * parse.c: Regenerated. 5715 * pt.c (instantiate_class_template): Use add_friend and 5716 add_friends rather that duplicating some of their functionality 5717 here. 5718 57191999-03-27 Jason Merrill <jason@yorick.cygnus.com> 5720 5721 * call.c (build_field_call): Unify 'this' and non-'this' cases. 5722 5723 * typeck.c (build_indirect_ref): Check for 'this' sooner. 5724 5725Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5726 5727 * call.c (op_error): Const-ify a char*. 5728 (add_candidate, source_type, add_warning): Add static prototype. 5729 (print_z_candidates): Const-ify a char*. 5730 5731 * class.c (resolve_address_of_overloaded_function, 5732 fixed_type_or_null, build_vtable_entry_ref): Add static prototype. 5733 (get_vtable_name, finish_struct_1): Const-ify a char*. 5734 5735 * cvt.c (convert_to_reference): Likewise. 5736 5737 * decl.c (redeclaration_error_message, record_builtin_type, 5738 record_unknown_type, member_function_or_else, bad_specifiers): 5739 Likewise. 5740 (find_binding, select_decl, unqualified_namespace_lookup, 5741 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name): 5742 Add static prototype. 5743 (warn_extern_redeclared_static, duplicate_decls, pushdecl, 5744 implicitly_declare, record_builtin_java_type, define_function, 5745 grok_op_properties, tag_name): Const-ify a char*. 5746 5747 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const. 5748 (define_function, finish_builtin_type): Const-ify a char*. 5749 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn, 5750 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args. 5751 (file_name_nondirectory): Const-ify a char*. 5752 (init_filename_times): Don't prototype. 5753 (compiler_error): Prototype. 5754 (yyerror, init_repo): Const-ify a char*. 5755 (build_srcloc): Don't prototype. 5756 (build_x_indirect_ref, build_indirect_ref, build_component_addr): 5757 Const-ify a char*. 5758 (warn_for_assignment): Don't prototype. 5759 (convert_for_initialization, readonly_error, check_for_new_type, 5760 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call): 5761 Const-ify a char*. 5762 5763 * decl2.c (acceptable_java_type, output_vtable_inherit, 5764 setup_initp, start_objects, finish_objects, do_dtors, do_ctors, 5765 merge_functions, decl_namespace, validate_nonmember_using_decl, 5766 do_nonmember_using_decl): Add static prototype. 5767 (lang_f_options): Const-ify a char*. 5768 (finish_builtin_type): Likewise. 5769 (add_function, arg_assoc_namespace, arg_assoc_class): Add static 5770 prototype. 5771 5772 * errfn.c: Include cp-tree.h. 5773 (cp_thing): Add static prototype. 5774 (compiler_error): Don't protoptype. 5775 (cp_compiler_error): Cast `compiler_error' to `errorfn' before 5776 passing it to `cp_thing'. 5777 5778 * error.c (interesting_scope_p): Add static prototype. 5779 5780 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify 5781 a char*. 5782 5783 * init.c (compiler_error): Don't prototype. 5784 (member_init_ok_or_else): Const-ify a char*. 5785 (build_java_class_ref): Add static prototype. 5786 5787 * lex.c (compiler_error): Don't prototype. 5788 (get_time_identifier, interface_strcmp, extend_token_buffer, 5789 handle_cp_pragma): Const-ify a char*. 5790 (is_global, init_filename_times): Add static prototype. 5791 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*. 5792 (compiler_error): Change from fixed args to variable args. 5793 (yyerror): Const-ify a char*. 5794 5795 * parse.y (cond_stmt_keyword): Const-ify a char*. 5796 (parse_decl): Add static prototype. 5797 5798 * pt.c (template_args_equal, print_template_context): Likewise. 5799 (print_candidates, check_default_tmpl_args): Const-ify a char*. 5800 (instantiate_class_template): Likewise. 5801 5802 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise. 5803 5804 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc, 5805 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise. 5806 5807 * search.c (lookup_field_info, lookup_member): Likewise. 5808 (lookup_member): Cast the first argument of `bzero' to a PTR. 5809 5810 * sig.c (compiler_error): Don't prototype. 5811 (build_signature_pointer_or_reference_nam): Const-ify a char*. 5812 (get_sigtable_name, build_member_function_pointer): Likewise. 5813 5814 * tree.c (compiler_error): Don't prototype. 5815 (no_linkage_helper, build_srcloc): Add static prototype. 5816 (build_vbase_pointer_fields): Const-ify a char*. 5817 (__eprintf): Don't unnecessarily handle `const' when !__STDC__. 5818 5819 * typeck.c (compiler_error): Don't prototype. 5820 (convert_for_assignment): Const-ify a char*. 5821 (comp_cv_target_types): Add static prototype. 5822 (build_x_indirect_ref, build_indirect_ref, convert_arguments, 5823 build_component_addr, build_unary_op, convert_for_initialization): 5824 Const-ify a char*. 5825 5826 * typeck2.c (ack): Add static prototype and change from fixed args 5827 to variable args. 5828 (readonly_error, check_for_new_type): Const-ify a char*. 5829 5830 * xref.c (_XREF_FILE, find_file, filename, fctname, declname, 5831 fixname, open_xref_file, classname, GNU_xref_begin): Likewise. 5832 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'. 5833 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call, 5834 gen_assign, GNU_xref_member): Const-ify a char*. 5835 58361999-03-25 Martin von L�wis <loewis@informatik.hu-berlin.de> 5837 5838 * gxxint.texi: Remove old discussion on copying virtual bases. 5839 58401999-03-25 Zack Weinberg <zack@rabi.columbia.edu> 5841 5842 * Make-lang.in: Remove all references to g++.o/g++.c. 5843 Link g++ from gcc.o. 5844 58451999-03-25 Jason Merrill <jason@yorick.cygnus.com> 5846 5847 * decl2.c (comdat_linkage): Treat vtables like functions. 5848 58491999-03-25 Mark Mitchell <mark@codesourcery.com> 5850 5851 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES. 5852 58531999-03-25 Nathan Sidwell <nathan@acm.org> 5854 5855 * decl.c (init_decl_processing): Add `signed' type as a synonym 5856 for `int'. 5857 58581999-03-25 Jason Merrill <jason@yorick.cygnus.com> 5859 5860 * typeck.c (common_type): Handle cv-qual unification for pointers 5861 to members. 5862 5863 * decl.c (unqualified_namespace_lookup): Return error_mark_node 5864 on error. 5865 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing. 5866 * lex.c (do_identifier): If we got error_mark_node, call 5867 lookup_name again. 5868 58691999-03-24 Martin von L�wis <loewis@informatik.hu-berlin.de> 5870 5871 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty 5872 classes. 5873 58741999-03-24 Jason Merrill <jason@yorick.cygnus.com> 5875 5876 * decl.c (lookup_name_real): Do nested field lookup regardless of 5877 TYPE_BEING_DEFINED. 5878 58791999-03-24 Mark Mitchell <mark@codesourcery.com> 5880 5881 * cp-tree.h (lang_type): Remove has_assignment and 5882 has_real_assignment. Add befriending_classes. 5883 (TYPE_HAS_ASSIGNMENT): Remove. 5884 (TYPE_HAS_REAL_ASSIGNMENT): Likewise. 5885 (CLASSTYPE_BEFRIENDING_CLASSES): New macro. 5886 (lang_decl): Document. 5887 (DECL_BEFRIENDING_CLASSES): New macro. 5888 (FRIEND_NAME): Move declaration to more obvious location. 5889 (FRIEND_DECLS): Likewise. 5890 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT. 5891 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES. 5892 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT. 5893 (grok_op_properties): Likewise. 5894 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS. 5895 (add_friend): Likewise. Don't do weird things with assignment 5896 operators. Update DECL_BEFRIENDING_CLASSES. 5897 (add_friends): Don't do weird things with assignment operators. 5898 (make_friend_class): Likewise. Update 5899 CLASSTYPE_BEFRIENDING_CLASSES. 5900 * pt.c (instantiate_class_template): Don't set 5901 TYPE_HAS_ASSIGNMENT. 5902 (tsubst_copy): Substitute the TREE_TYPE for more unary 5903 expressions. 5904 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT. 5905 * search.c (protected_accessible_p): New function. 5906 (friend_accessible_p): Likewise. 5907 (accessible_p): Use them. 5908 59091999-03-23 Mark Mitchell <mark@codesourcery.com> 5910 5911 * pt.c (convert_nontype_argument): Don't create things that aren't 5912 PTRMEM_CSTs when applying a qualification conversion to a 5913 PTRMEM_CST. 5914 59151999-03-23 Mark Mitchell <mark@codesourcery.com> 5916 5917 * Makefile.in (OBJS): Don't mention hash.o. 5918 (OBJDEPS): Likewise. 5919 59201999-03-23 Jason Merrill <jason@yorick.cygnus.com> 5921 5922 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors. 5923 * decl.c (expand_static_init): Make sure we don't add any after 5924 then. 5925 5926 * decl.c (cp_finish_decl): Move intelligence about handling 5927 DECL_COMDAT for variables from here... 5928 * decl2.c (comdat_linkage): ...to here. 5929 (maybe_make_one_only): Tweak. 5930 (import_export_decl): Call comdat_linkage for variables, too. 5931 (finish_file): Handle template statics properly. 5932 59331999-03-22 Mark Mitchell <mark@codesourcery.com> 5934 5935 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG. 5936 Document internals of pointer-to-member-functions. 5937 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc. 5938 (PFN_FROM_PTRMEMFUNC): Likewise. 5939 (build_type_conversion): Remove unused parameter. 5940 (build_ptrmemfunc1): Declare. 5941 (expand_ptrmemfunc_cst): New function. 5942 (delta2_from_ptrmemfunc): Likewise. 5943 (pfn_from_ptrmemfunc): Likewise. 5944 * cvt.c (cp_convert_to_pointer): Remove unused parameter to 5945 build_type_conversion. Use TYPE_PTRMEM_P for readability. 5946 (convert_to_reference): Remove unused parameter to 5947 build_type_conversion. 5948 (ocp_convert): Likewise. 5949 (build_user_type_conversion): Likewise. 5950 * error.c (dump_expr): Handle NULL pointer-to-member functions. 5951 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions. 5952 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs 5953 open when handling pointer-to-member functions. 5954 * pt.c (convert_nontype_argument): Clean up error messages. Be 5955 more stringent with pointers-to-members. 5956 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global. 5957 (build_unary_op): Tidy ever-so-slightly. 5958 (build_conditional_expr): Remove extra parameter to 5959 build_type_conversion. 5960 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function 5961 we're using. 5962 (expand_ptrmemfunc_cst): Define. 5963 (delta2_from_ptrmemfunc): Likewise. 5964 (pfn_from_ptrmemfunc): Likewise. 5965 59661999-03-19 Mark Mitchell <mark@codesourcery.com> 5967 5968 * init.c (build_member_call): Handle template-id expressions 5969 correctly. 5970 * typeck.c (build_x_function_call): Likewise. 5971 59721999-03-19 Chip Salzenberg <chip@perlsupport.com> 5973 5974 * friend.c (make_friend_class): Avoid core dump when 5975 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC(). 5976 59771999-03-18 Jason Merrill <jason@yorick.cygnus.com> 5978 5979 * decl.c (start_function): Suppress normal linkage heuristics 5980 for #pragma interface under MULTIPLE_SYMBOL_SPACES. 5981 59821999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br> 5983 5984 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c. 5985 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in. 5986 59871999-03-17 Martin von L�wis <loewis@informatik.hu-berlin.de> 5988 5989 * parse.y (named_complex_class_head_sans_basetype): 5990 Do not push a scope for error_mark_node. 5991 (maybe_base_class_list): Likewise. 5992 5993 * decl.c (start_decl): Check for error_mark_node as a type. 5994 Detected by g++.brendan/array-refs.C. 5995 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C. 5996 (maybe_build_cleanup_1): Likewise. Detected by 5997 g++.jason/incomplete1.C. 5998 5999 * tree.c (build_dummy_object): Use void_zero_node instead of the 6000 error_mark_node. 6001 (is_dummy_object): Check for such a node. 6002 Detected by g++.bob/inherit1.C 6003 60041999-03-16 Jason Merrill <jason@yorick.cygnus.com> 6005 6006 * method.c (old_backref_index): Split out... 6007 (flush_repeats): From here. Rename back from try_old_backref. 6008 (build_mangled_name): Put back some old-style repeat handling. 6009 6010Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6011 6012 * lex.c: Don't include setjmp.h. 6013 (parse_float): New static function. 6014 (pf_args): New struct. 6015 (real_yylex): Use them in call to `do_float_handler'. 6016 60171999-03-15 Mark Mitchell <mark@markmitchell.com> 6018 6019 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here. 6020 * tree.c (layout_basetypes): Not here. 6021 * search.c (dfs_search): Remove; no longer used. 6022 60231999-03-12 Mark Mitchell <mark@markmitchell.com> 6024 6025 * decl2.c (validate_nonmember_using_decl): Issue sensible 6026 error-messages on bogus qualifiers. 6027 60281999-03-14 Jason Merrill <jason@yorick.cygnus.com> 6029 6030 * call.c (add_function_candidate): Fix uninitialized variable. 6031 6032 * Makefile.in (search.o): Add dependency on varray.h. 6033 60341999-03-13 Jason Merrill <jason@yorick.cygnus.com> 6035 6036 * decl.c (duplicate_decls): Use same_type_p. 6037 * method.c (try_old_backref): Renamed from flush_repeats. Use 6038 same_type_p. Don't try to handle repeats. Return success. 6039 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support 6040 calls from old-style code, too. 6041 (check_ktype): Use same_type_p. 6042 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT. 6043 (build_qualified_name): Simplify logic. 6044 (process_overload_item): Strip typedefs and quals at the top. 6045 (build_mangled_name_for_type_with_Gcode): Remove call to 6046 type_canonical_variant. 6047 (build_mangled_name): Likewise. Remove support for old-style 6048 repeats, which have been disabled since 2.7.2. Don't mess with 6049 TREE_USED. 6050 (build_decl_overload_real): Don't mess with TREE_USED. 6051 60521999-03-13 Nathan Sidwell <nathan@acm.org> 6053 6054 * error.c (cp_printers): Add 'F' escape character. 6055 (dump_type_real): Remove TREE_LIST (fnargs) printing. 6056 Functionality moved to dump_parameters. 6057 (dump_type_suffix): Use dump_parameters and dump_exception_spec. 6058 (dump_function_decl): Extend meaning of V parameter. Use 6059 dump_parameters and dump_exception_spec. 6060 (dump_parameters): New static function. 6061 (dump_exception_spec): New static function. 6062 (fndecl_as_string): Change argument semantics. Use 6063 dump_function_decl directly. 6064 6065 * sig.c (build_signature_table_constructor): Use cp_error. 6066 60671999-03-13 Martin von L�wis <loewis@informatik.hu-berlin.de> 6068 6069 * semantics.c (finish_switch_cond): Handle error cases gracefully. 6070 Detected by g++.law/enum5.C. 6071 6072 * typeck.c (build_modify_expr): Check for errors after resolving 6073 offsets. Detected by g++.brendan/static1.C. 6074 6075 * decl.c (complete_array_type): Ignore initial_value if it is an 6076 error. Detected by g++.benjamin/17930.C. 6077 6078 * typeck2.c (process_init_constructor): Return error if one argument 6079 is in error. Detected by g++.benjamin/13478.C. 6080 60811999-03-12 Martin von L�wis <loewis@informatik.hu-berlin.de> 6082 6083 * decl.c (select_decl): Allow class templates when we need types. 6084 * decl2.c (ambiguous_decl): Likewise. 6085 60861999-03-12 Mark Mitchell <mark@markmitchell.com> 6087 6088 * lex.c (do_identifier): Correct call to enforce_access. 6089 * search.c (accessible_p): Tweak comment. 6090 60911999-03-10 Mark Mitchell <mark@markmitchell.com> 6092 6093 * semantics.c (begin_class_definition): Call build_self_reference. 6094 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs. 6095 6096 * search.c (assert_canonical_unmarked): Fix typo in prototype. 6097 6098 * search.c (dfs_canonical_queue): New function. 6099 (dfs_assert_unmarked_p): Likewise. 6100 (assert_canonical_unmarked): Likewise. 6101 (access_in_type): Use it. 6102 (accessible_p): Likewise. Walk the whole tree when umarking. 6103 6104 * sig.c (build_signature_table_constructor): Use accessible_p 6105 instead of compute_access. 6106 61071999-03-09 Jason Merrill <jason@yorick.cygnus.com> 6108 6109 * call.c (add_builtin_candidates): Handle overloaded conversion ops. 6110 61111999-03-09 Mark Mitchell <mark@markmitchell.com> 6112 6113 * cp-tree.h (flag_access_control): Declare. 6114 (TREE_VIA_PPUBLIC): Document. 6115 (DECL_NONSTATIC_MEMBER_P): New macro. 6116 (enforce_access): Return an indication of whether or not access 6117 was permitted. 6118 (build_self_reference): Change prototype. 6119 (compute_access): Replace with ... 6120 (accessible_p): New function. 6121 (dfs_walk): Change prototype. 6122 (dfs_unmark): Likewise. 6123 (markedp): Likewise. 6124 * call.c (enforce_access): Use accessible_p. 6125 * class.c (build_self_reference): Insert the declaration into the 6126 list of members for this type, and make it public. 6127 * decl.c (xref_basetypes): Avoid ill-timed recursion. 6128 * init.c (build_offset_ref): Use lookup_member, not three separate 6129 name-lookups. Call enforce_access rather than checking for 6130 illegal accesses here. 6131 (resolve_offset_ref): Likewise. 6132 * lex.c (do_identifier): Likewise. 6133 * method.c (hack_identifier): Likewise. 6134 * parse.y (self_reference): Remove. 6135 (opt_component_decl_list): Don't use it. 6136 * parse.c: Regenerated. 6137 * pt.c (print_candidates): Generalize to handle lists of 6138 overloaded functions. 6139 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's 6140 not set. 6141 (get_template_base): Use new calling convention for dfs_walk. 6142 * search.c: Include varray.h. Add prototypes. 6143 (dfs_walk): Accept a data pointer to pass to the work functions. 6144 All callers changed. All work functions changed. 6145 (breadth_first_search): Rename to bfs_walk, and make consistent 6146 with dfs_walk. 6147 (dfs_walk_real): New function. 6148 (canonical_binfo): New function. 6149 (context_for_name_lookup): Likewise. 6150 (shared_marked_p): Likewise. 6151 (shared_unmarked_p): Likewise. 6152 (lokup_field_queue_p): Likewise. 6153 (lookup_field_r): Generalize to handle both functions and fields. 6154 (lookup_field): Just call lookup_member. 6155 (lookup_fnfields): Likewise. 6156 (lookup_member): Move body of lookup_field here and generalize. 6157 (dfs_accessible_queue_p): Likewise. 6158 (dfs_accessible_p): Likewise. 6159 (dfs_access_in_type): Likewise. 6160 (access_in_type): Likewise. 6161 (compute_access): Remove, and replace with ... 6162 (accessible_p): New function. 6163 (vbase_types): Remove. 6164 (vbase_decl_ptr_intermediate): Likewise. 6165 (vbase_decl_ptr): Likewise. 6166 (vbase_init_result): Likewise. 6167 (closed_envelopes): Likewise. 6168 (bvtable): Likewise. 6169 61701999-03-09 Jason Merrill <jason@yorick.cygnus.com> 6171 6172 * call.c (add_function_candidate): Check for proper number of args 6173 before checking the validity of those args. 6174 61751999-03-06 Jason Merrill <jason@yorick.cygnus.com> 6176 6177 * cp-tree.h (struct lang_type): Add anon_union field. 6178 (ANON_UNION_TYPE_P): Use it instead of examining type. 6179 (SET_ANON_UNION_TYPE_P): New macro. 6180 * decl.c (check_tag_decl): Use it. 6181 6182 * search.c (compute_access): Handle non-type contexts earlier, and 6183 handle NULL_TREE. 6184 6185 * tree.c (build_exception_variant): Use copy_to_permanent. 6186 6187 * decl2.c (setup_initp): Give statics with no priority the default 6188 priority here. 6189 (do_dtors, do_ctors, finish_file): Remove special handling of 6190 non-prioritized statics. 6191 61921999-03-05 Mark Mitchell <mark@markmitchell.com> 6193 6194 * cp-tree.h (ANON_UNION_TYPE_P): Robustify. 6195 * decl.c (make_typename_type): Don't issue an error if an 6196 immediate lookup fails; it migt be resolved later. 6197 * friend.c (is_friend): Add comment. 6198 * search.c (breadth_first_search): Add POSTFN and DATA 6199 parameters. Tidy. All callers changed. 6200 (lookup_field_queue_p): New function. 6201 (lookup_field_r): Likewise. 6202 (lookup_field_post): Likewise. 6203 (lookup_field): Use them, via breadth_first_search, instead of 6204 duplicating logic. 6205 (compute_access): Robustify. 6206 (lookup_fnfield_info): New structure. 6207 62081999-03-05 Jason Merrill <jason@yorick.cygnus.com> 6209 6210 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again. 6211 62121999-03-03 Jason Merrill <jason@yorick.cygnus.com> 6213 6214 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4 6215 cc happy. 6216 6217 * decl2.c (import_export_class): Also return if 6218 CLASSTYPE_INTERFACE_ONLY is set. 6219 62201999-03-03 Martin von L�wis <loewis@informatik.hu-berlin.de> 6221 6222 * decl.c (push_overloaded_decl): Only overwrite the old binding if 6223 there was one. 6224 * decl2.c (do_local_using_decl): Fix loop termination. 6225 62261999-03-02 Mark Mitchell <mark@markmitchell.com> 6227 6228 * cp-tree.h (determine_specialization): Don't declare. 6229 * pt.c (determine_specialization): Make it static. Eliminate 6230 complain parameter. Note that decl is always non-NULL now, and 6231 simplify accordingly. 6232 6233 * decl.c (maybe_push_to_top_level): Always call 6234 push_cp_function_context. 6235 (pop_from_top_level): Always call pop_cp_function_context. 6236 62371999-02-26 Nathan Sidwell <nathan@acm.org> 6238 6239 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful 6240 diagnostics. 6241 * cp-tree.h (complete_type_or_else): Added VALUE parameter. 6242 * init.c (build_new_1): Extra arg to complete_type_or_else. 6243 (build_delete): Likewise. 6244 * typeck.c (require_complete_type): Likewise. 6245 (pointer_int_sum): Likewise. 6246 (pointer_diff): Likewise. 6247 (build_component_ref): Likewise. 6248 6249 * typeck2.c (incomplete_type_error): Always use cp_error. 6250 Show declaration of undefined type, if appropriate. 6251 Deal with UNKNOWN_TYPE nodes. 6252 6253 * typeck.c (require_complete_type): Use TYPE_SIZE as 6254 size_zero_node to mean incomplete type. 6255 (require_complete_type_in_void): New function. 6256 (build_compound_expr): Call complete_type_in_void for LHS. 6257 (build_c_cast): Call complete_type_in_void for void cast. 6258 * cvt.c (ocp_convert): Call complete_type_in_void for void cast. 6259 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to 6260 require_complete_type_in_void. Call it. 6261 * cp-tree.h (require_complete_type_in_void): Prototype new function. 6262 6263 * typeck.c (convert_arguments): Use alternative format for 6264 function decls. Don't require_complete_type here. Simplify 6265 diagnostic printing. 6266 (convert_for_initialization): Don't require_complete_type on RHS yet. 6267 * call.c (convert_arg_to_ellipsis): Call require_complete_type. 6268 6269 * call.c (build_over_call): Cope with qualified void return type. 6270 * semantics.c (finish_call_expr): Likewise. 6271 * typeck.c (build_function_call_real): Likewise. 6272 (c_expand_return): Likewise. 6273 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type. 6274 6275 * call.c (print_z_candidates): Use alternate print format, to be 6276 consistent with (pt.c) print_candidates. 6277 * method.c (hack_identifier): List candidate members. 6278 * search.c (lookup_field): Build ambiguous list, and show it, if 6279 ambiguous. 6280 62811999-02-26 Mark Mitchell <mark@markmitchell.com> 6282 6283 * typeck.c (decay_conversion): Don't confuse constant array 6284 variables with their initializers. 6285 6286 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when 6287 merging decls. 6288 * pt.c (regenerate_decl_from_template): Tweak for clarity. 6289 (instantiate_decl): Mark a decl instantiated before regenerating 6290 it to avoid recursion. 6291 * tree.c (mapcar): Don't call decl_constant_value unless we know 6292 something is TREE_READONLY_DECL_P. 6293 6294 * class.c (check_for_override): Don't stop checking when we find 6295 the first overridden function. Delete #if 0'd code. 6296 * search.c (get_matching_virtual): Likewise. 6297 62981999-02-25 Richard Henderson <rth@cygnus.com> 6299 6300 * lang-specs.h: Define __FAST_MATH__ when appropriate. 6301 63021999-02-24 Mike Stump <mrs@wrs.com> 6303 6304 * typeck.c (convert_for_assignment): Allow boolean integral constant 6305 expressions to convert to null pointer. 6306 63071999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de> 6308 6309 * decl.c (lookup_namespace_name): Resolve namespace aliases. 6310 6311 * class.c (push_nested_class): Allow namespaces. 6312 6313 * decl2.c (set_decl_namespace): Add friendp parameter. 6314 * decl.c (grokfndecl): Pass it. 6315 (grokvardecl): Likewise. 6316 * cp-tree.h: Change declaration. 6317 63181999-02-24 Jason Merrill <jason@yorick.cygnus.com> 6319 6320 * pt.c (tsubst): Allow an array of explicit size zero. 6321 63221999-02-23 Jason Merrill <jason@yorick.cygnus.com> 6323 6324 * errfn.c: Change varargs code to look like toplev.c. 6325 6326 * method.c (process_modifiers): Don't prepend 'U' for char or 6327 wchar_t. 6328 63291999-02-20 Craig Burley <craig@jcb-sc.com> 6330 6331 * Make-lang.in (cplib2.ready): Don't consider updating 6332 cplib2 stuff if the current directory isn't writable, as 6333 it won't work (such as during a `make install'). 6334 6335Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org) 6336 6337 * decl2.c (start_objects): Make file scope constructors and 6338 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and 6339 ASM_OUTPUT_DESTRUCTOR are defined. 6340 63411999-02-19 Mark Mitchell <mark@markmitchell.com> 6342 6343 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment. 6344 (fn_type_unification): Adjust prototype. 6345 (lookup_fnfields_1): Declare. 6346 * call.c (add_template_candidate_real): Adjust call to 6347 fn_type_unification. 6348 * class.c (add_method): Don't allow duplicate declarations of 6349 constructors or destructors. 6350 (resolve_address_of_overloaded_function): Remove unused variable. 6351 Adjust call to fn_type_unification. 6352 * decl.c (grokfndecl): Be more robust in the face of illegal 6353 specializations. 6354 * decl2.c (check_classfn): Remove hokey handling of member 6355 templates. 6356 * pt.c (determine_specialization): Improve comments. Adjust to 6357 handle template argument deduction as per the standard. 6358 (check_explicit_specialization): Fix comment spacing. Handle 6359 type-conversion operators correctly. Improve error-recovery. 6360 (fn_type_unification): Remove EXTRA_FN_ARG parameter. 6361 (get_bindings_real): Simplify handling of static members. 6362 * search.c (lookup_fnfields_1): Make it have external linkage. 6363 * typeck.c (compparms): Fix comment. 6364 (build_unary_op): Don't try to figure out which template 6365 specialization is being referred to when when the address-of 6366 operator is used with a template function. 6367 6368Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6369 6370 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const' 6371 keyword to match an analogous change at the top level. 6372 6373 * tree.c (lvalue_or_else): Likewise. 6374 63751999-02-17 Mark Mitchell <mark@markmitchell.com> 6376 6377 * decl.c (xref_basetypes): Comment. 6378 * pt.c (instantiate_class_template): Use xref_basetypes. 6379 63801999-02-16 Mark Mitchell <mark@markmitchell.com> 6381 6382 * cp-tree.h (tsubst): Change prototype. 6383 (tsubst_expr): Likewise. 6384 (tsubst_copy): Likewise. 6385 (type_unification): Remove prototype. 6386 * call.c (convert_default_arg): Adjust call to tsubst_expr. 6387 * class.c (resolve_address_of_overloaded_function): Just use 6388 fn_type_unification. 6389 * decl.c (grokdeclarator): Adjust call to tsubst. 6390 * method.c (build_template_parm_names): Likewise. 6391 * pt.c (GTB_VIA_VIRTUAL): New macro. 6392 (GTB_IGNORE_TYPE): Likewise. 6393 (resolve_overloaded_unification): Add `complain' parameter. 6394 (try_one_overload): Likewise. 6395 (tsubst_template_arg_vector): Likewise. 6396 (tsubst_template_parms): Likewise. 6397 (tsubst_aggr_type): Likewise. 6398 (tsubst_arg_types): Likewise. 6399 (tsubst_call_declarator_parms): Likewise. 6400 (unify): Remove explicit_mask. 6401 (type_unification_real): Likewise. 6402 (get_template_base_recursive): Likewise. 6403 (coerce_template_template_parms): Provide prototype. 6404 (tsubst_function_type): Likewise. 6405 (try_class_unification): New function. 6406 All callers changed to use new complain parameter. 6407 (get_template_base): Use try_class_unification. 6408 (unify): Adjust handling of classes derived from template types. 6409 (fn_type_unification): Substitute explicit arguments before 6410 unification. 6411 64121999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu> 6413 6414 * decl.c (pushdecl): Remove dead code. 6415 64161999-02-16 Jason Merrill <jason@yorick.cygnus.com> 6417 6418 * decl2.c (finish_objects): Fix code I missed in previous change. 6419 64201999-02-13 Jason Merrill <jason@yorick.cygnus.com> 6421 6422 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node. 6423 (grokdeclarator): Don't expect error_mark_node from grokfndecl. 6424 6425 * pt.c (maybe_process_partial_specialization): Complain about 6426 'template <>' on non-specialization. 6427 64281999-02-10 Jason Merrill <jason@yorick.cygnus.com> 6429 6430 * decl.c (grokdeclarator): Catch weird declarators. 6431 * decl2.c (finish_file): Don't abort because of namespace parsing 6432 failure. 6433 (check_decl_namespace): Remove. 6434 64351999-02-09 Mark Mitchell <mark@markmitchell.com> 6436 6437 * cp-tree.h (get_template_base): Don't declare. 6438 (dfs_walk): Declare. 6439 (dfs_unmark): Likewise. 6440 (markedp): Likewise. 6441 * pt.c (unify): Remove duplicate declaration. Pass tparms and 6442 targs to get_template_base. 6443 (get_template_base_recursive): Move here from search.c. Check to 6444 see that the base found can be instantiated to form the desired 6445 type. 6446 (get_template_base): Likewise. 6447 (get_class_bindings): Simplify. 6448 * search.c (get_template_base_recursive): Move to pt.c. 6449 (get_template_base): Likewise. 6450 (markedp): Make it global. 6451 (dfs_walk): Likewise. 6452 (dfs_unmark): Likewise. 6453 64541999-02-07 Jason Merrill <jason@yorick.cygnus.com> 6455 6456 * pt.c (maybe_process_partial_specialization): Complain about 6457 specialization in wrong namespace. 6458 * tree.c (decl_namespace_context): New fn. 6459 64601999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu> 6461 6462 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM. 6463 * pt.c (coerce_template_template_parms): Handle nested 6464 template template parameters. 6465 6466Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com) 6467 6468 * typeck2.c: Update email addresses. 6469 64701999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu> 6471 6472 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag 6473 turned off. 6474 64751999-02-04 Jason Merrill <jason@yorick.cygnus.com> 6476 6477 * lex.c (retrofit_lang_decl): Split out... 6478 (build_lang_decl): From here. 6479 * decl.c (pushdecl): Call it for functions generated by the middle 6480 end that don't have DECL_LANG_SPECIFIC. 6481 * cp-tree.h: Declare it. 6482 6483 * decl2.c: Remove flag_init_priority. Always enable initp stuff. 6484 (start_objects, finish_objects): Only use special 6485 init_priority code if the user specified a priority. 6486 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp 6487 objects. 6488 6489Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr> 6490 6491 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and 6492 mkstemp.o. Get them from libiberty now. 6493 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o. 6494 6495Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> 6496 6497 * decl2.c (lang_decode_option): Use read_integral_parameter. 6498 64991999-02-01 Mark Mitchell <mark@markmitchell.com> 6500 6501 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED 6502 before calling complete_type_or_else. 6503 6504Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6505 6506 * input.c (inline): Don't define, its handled by system.h. 6507 6508Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu> 6509 6510 * decl2.c: Don't define flag_no_ident here. Don't process 6511 -f(no-)ident here. 6512 * cp-tree.h: Don't declare flag_no_ident here. 6513 * lang-specs.h: Map -Qn to -fno-ident. 6514 65151999-01-28 Jason Merrill <jason@yorick.cygnus.com> 6516 6517 * cp-tree.h (struct tree_binding): Replace scope field with a union. 6518 (BINDING_SCOPE): Adjust. 6519 * decl.c (BINDING_LEVEL): Adjust. 6520 65211999-01-26 Jason Merrill <jason@yorick.cygnus.com> 6522 6523 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of 6524 member constants. 6525 6526 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in 6527 a ctor initializer. 6528 6529 * tree.c (equal_functions): Fix name in prototype. 6530 6531 * decl.c (push_local_binding): Add FLAGS argument. 6532 (pushdecl, push_overloaded_decl): Pass it. 6533 * decl2.c (do_local_using_decl): Likewise. 6534 * cp-tree.h: Adjust prototype. 6535 * decl.c (poplevel): Fix logic. 6536 6537 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST. 6538 (poplevel): Handle that. Fix logic for removing TREE_LISTs. 6539 (cat_namespace_levels): Don't loop forever. 6540 65411999-01-25 Richard Henderson <rth@cygnus.com> 6542 6543 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test. 6544 65451999-01-25 Jason Merrill <jason@yorick.cygnus.com> 6546 6547 * class.c (resolve_address_of_overloaded_function): Mark the 6548 chosen function used. 6549 6550 * call.c (build_call): Make sure that a function coming in has 6551 been marked used already. 6552 * decl.c (expand_static_init): Call mark_used instead of 6553 assemble_external. 6554 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec, 6555 alloc_eh_object, expand_throw): Likewise. 6556 * init.c (build_builtin_delete_call): Likewise. 6557 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1, 6558 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc, 6559 expand_generic_desc): Likewise. 6560 65611999-01-25 Martin von L�wis <loewis@informatik.hu-berlin.de> 6562 6563 * tree.c (equal_functions): New function. 6564 (ovl_member): Call it. 6565 65661999-01-24 Jason Merrill <jason@yorick.cygnus.com> 6567 6568 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf. 6569 65701999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de> 6571 6572 * decl.c (decls_match): Return 1 if old and new are identical. 6573 (push_overloaded_decl): Set OVL_USED when PUSH_USING. 6574 65751999-01-24 Jason Merrill <jason@yorick.cygnus.com> 6576 6577 * decl.c (start_function): Make member functions one_only on windows. 6578 * decl2.c (import_export_decl): Likewise. 6579 6580 * decl.c (grokdeclarator): Don't complain about implicit int in 6581 a system header. Change same-name field check to not complain in 6582 a system header instead of within extern "C". 6583 65841999-01-21 Mark Mitchell <mark@markmitchell.com> 6585 6586 * cp-tree.h (PUSH_GLOBAL): New macro. 6587 (PUSH_LOCAL): Likewise. 6588 (PUSH_USING): Likewise. 6589 (namespace_bindings_p): Declare. 6590 (push_overloaded_decl): Likewise. 6591 * decl.c (push_overloaded_decl): Don't make it static. Check for 6592 illegal declarations after using declarations here. 6593 (namespace_bindings_p): Likewise. 6594 (duplicate_decls): Don't consider declarations from different 6595 namespaces to be the same. 6596 (pushdecl): Use symbolic PUSH_ constants in calls to 6597 push_overloaded_decl. 6598 (push_overloaded_decl_1): Likewise. 6599 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling. 6600 (do_nonmember_using_decl): Check for illegal using declarations 6601 after ordinary declarations here. 6602 (do_local_using_decl): Call pushdecl to insert declarations. 6603 66041999-01-21 Jason Merrill <jason@yorick.cygnus.com> 6605 6606 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo. 6607 66081999-01-21 Mark Mitchell <mark@markmitchell.com> 6609 6610 * tree.c (build_cplus_array_type_1): Don't call build_array_type 6611 for types involving template parameters. 6612 6613 * cp-tree.h (PARM_DECL_EXPR): Delete. 6614 (convert_default_arg): Change prototype. 6615 (check_default_argument): Declare. 6616 (search_tree): Likewise. 6617 * call.c (convert_default_arg): Take the function to which the 6618 default argument belongs as a parameter, and do any necessary 6619 instantiation here, instead of ... 6620 (build_over_call): Here. 6621 * decl.c (local_variable_p): New function. 6622 (check_default_argument): Likewise, split out and tidied from ... 6623 (grokparms): Here. 6624 * error.c (dump_expr): Don't set PARM_DECL_EXPR. 6625 * pt.c (tsubst_call_declarator_parms): New function. 6626 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing 6627 with CALL_EXPRs, rather than trying to be clever. 6628 (tsubst): Use tsubst_call_declarator_parms. 6629 * tree.c (search_tree): Don't make it static. 6630 * typeck.c (convert_arguments): Use new interface to 6631 convert_default_arg. 6632 66331999-01-20 Mark Mitchell <mark@markmitchell.com> 6634 6635 * error.c (dump_function_decl): Don't print the argument types for 6636 a function when the verbosity level is negative. 6637 6638 * call.c (build_over_call): Check format attributes at call-time. 6639 6640 * pt.c (tsubst_copy): Fix comment. 6641 (unify): Don't allow unification with variable-sized arrays. 6642 6643 * semantics.c (finish_stmt_expr): When processing a template make 6644 the BIND_EXPR long-lived. 6645 66461999-01-19 Jason Merrill <jason@yorick.cygnus.com> 6647 6648 * decl2.c (finish_vtable_vardecl): Make vtables comdat here. 6649 (import_export_vtable): Not here. 6650 66511999-01-18 Jason Merrill <jason@yorick.cygnus.com> 6652 6653 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique 6654 non-static member function. 6655 66561999-01-18 Nathan Sidwell <nathan@acm.org> 6657 6658 * class.c (instantiate_type): Only diagnose illegal address of member 6659 function if complaining. 6660 6661 * decl.c (lookup_name_real): Remove duplicate code. 6662 66631999-01-18 Jason Merrill <jason@yorick.cygnus.com> 6664 6665 * tree.c (copy_template_template_parm): Use permanent_obstack. 6666 66671999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu> 6668 6669 * pt.c (unify): Remove restrictions on deduction of argument 6670 of template template parameters. 6671 66721999-01-18 Nathan Sidwell <nathan@acm.org> 6673 6674 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs. 6675 6676 * class.c (resolve_address_of_overloaded_function): Show list of 6677 all candidates, when none of them match. 6678 66791999-01-18 Chip Salzenberg <chip@perlsupport.com> 6680 6681 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up 6682 definition of 'casting away const' in reinterpret_cast<>. 6683 66841999-01-18 Graham <grahams@rcp.co.uk> 6685 6686 * cvt.c: Add include for decl.h, remove extern for 6687 static_aggregates which is now provided by decl.h. 6688 6689 * Makefile.in (cvt.o): Add dependency for decl.h and missing 6690 dependencies for convert.h and flags.h. 6691 66921999-01-18 Nathan Sidwell <nathan@acm.org> 6693 6694 * decl2.c (do_dtors): Set current location to that of the 6695 decl, for sensible diagnostics and debugging. 6696 (check_classfn): Issue `incomplete type' error, if 6697 class is not defined. 6698 66991999-01-16 Jason Merrill <jason@yorick.cygnus.com> 6700 6701 * cp-tree.h: Add prototype for bound_pmf_p. 6702 67031999-01-16 Jason Merrill <jason@yorick.cygnus.com> 6704 Manfred Hollstein <manfred@s-direktnet.de> 6705 6706 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only 6707 -Wreturn-type. 6708 67091999-01-16 Nathan Sidwell <nathan@acm.org> 6710 6711 * cp-tree.h (struct lang_type): Added has_mutable flag. 6712 (CLASSTYPE_HAS_MUTABLE): New macro to access it. 6713 (TYPE_HAS_MUTABLE_P): New macro to read it. 6714 (cp_has_mutable_p): Prototype for new function. 6715 * class.c (finish_struct_1): Set has_mutable from members. 6716 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if 6717 it contains a mutable. 6718 * typeck.c (cp_has_mutable_p): New function. 6719 67201999-01-15 Mark Mitchell <mark@markmitchell.com> 6721 6722 * pt.c (process_template_parm): Ignore top-level qualifiers on 6723 non-type parameters. 6724 6725 * decl.c (start_function): Use current_function_parms in the call 6726 to require_complete_type_for_parms, not the probably empty 6727 DECL_ARGUMENTS. 6728 67291999-01-14 Jason Merrill <jason@yorick.cygnus.com> 6730 6731 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile. 6732 6733 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means 6734 that we don't suppress the other copies. 6735 * lex.c (handle_cp_pragma): Likewise. 6736 67371999-01-13 Mark Mitchell <mark@markmitchell.com> 6738 6739 * decl.c (grokdeclarator): Undo 1998-12-14 change. 6740 * tree.c (build_cplus_array_type_1): Likewise. 6741 * pt.c (instantiate_class_template): Remove misleading comment. 6742 (tsubst_aggr_type): Substitute if there are template parameters, 6743 regardless of whether or not they use template arguments. 6744 (unify): Likewise, but for unification. 6745 67461999-01-12 Richard Henderson <rth@cygnus.com> 6747 6748 * cp-tree.h (flag_permissive): Declare extern. 6749 67501999-01-06 Mark Mitchell <mark@markmitchell.com> 6751 6752 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT 6753 here. 6754 (lang_type): Add is_partial_instantiation. Decrease width of 6755 dummy. 6756 (PARTIAL_INSTANTIATION_P): New macro. 6757 (OPERATOR_TYPENAME_P): Remove. 6758 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not 6759 OPERATOR_TYPENAME_P. 6760 (grok_op_properties): Likewise. 6761 * friend.c (do_friend): Handle friends that are member functions 6762 correctly. 6763 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT. 6764 * pt.c (instantiate_class_template): Rework for clarity. Avoid 6765 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do 6766 any more partial instantiation than is absolutely necessary for 6767 implicit typename. Set PARTIAL_INSTANTIATION_P. 6768 (tsubst_decl): Use IDENTIFIER_TYPENAME_P. 6769 * semantics.c (begin_class_definition): Handle partial 6770 specializations of a type that was previously partially 6771 instantiated. 6772 6773Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net. 6774 6775 * g++spec.c (LIBSTDCXX): Provide default definition. 6776 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++". 6777 6778Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 6779 6780 * Make-lang.in (g++.o): Depend on prefix.h. 6781 67821999-01-04 Jason Merrill <jason@yorick.cygnus.com> 6783 6784 * tree.c (bound_pmf_p): New fn. 6785 * typeck.c (build_c_cast): Use it. 6786 6787 * decl.c (grok_op_properties): Use same_type_p. 6788