1 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
3 * lex.c (lang_init_options): Default diagnostic message maximum
4 length to 80, when line-wrapping.
6 2000-08-20 Mark Mitchell <mark@codesourcery.com>
8 * class.c (build_vtbl_initializer): Clear the entire
9 vtbl_init_data. Start keeping track of the functions for which we
10 have created vcall offsets here.
11 (dfs_build_vcall_offset_vtbl_entries): Remove.
12 (build_vcall_offset_vtbl_entries): Reimplement.
13 (add_vcall_offset_vtbl_entries_r): New function.
14 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
15 computing when vcall offsets are necessary.
17 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
19 * decl.c (member_function_or_else): Use cp_error ... %T.
20 (grokdeclarator): Likewise.
21 (start_method): Likewise.
22 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
24 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
26 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
29 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
31 * cp-tree.h (PTRMEM_OK_P): New macro.
32 (itf_ptrmem_ok): New enumeration value.
33 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
34 argument. Diagnose implicit pointer to member.
35 (instantiate_type): Don't diagnose implicit pointer to member
36 here. Pass itf_ptrmem_ok if ok. Adjust calls to
37 resolve_address_of_overloaded_function.
38 * init.c (build_offset_ref): Set PTRMEM_OK_P.
39 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
40 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
41 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
42 (build_unary_op): Deal with single non-static member in
45 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
47 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
49 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
51 * cp-tree.h (enum_name_string): Remove prototype.
52 (report_case_error): Remove prototype.
53 * cp/typeck2.c (enum_name_string): Remove.
54 (report_case_error): Remove.
55 * error.c (dump_expr): Deal with enum values directly.
56 Correctly negate integer constant.
58 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
60 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
61 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
62 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
63 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
64 (__cxa_vec_new): Use __cxa_vec_new2.
65 (__cxa_vec_delete): Use __cxa_vec_delete2.
67 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
69 * vec.cc (__cxa_vec_new): Set "C" linkage.
70 (__cxa_vec_ctor): Likewise.
71 (__cxa_vec_cctor): Likewise.
72 (__cxa_vec_dtor): Likewise.
73 (__cxa_vec_delete): Likewise.
74 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
75 (__cxa_vec_ctor): Likewise.
76 (__cxa_vec_cctor): Likewise.
77 (__cxa_vec_dtor): Likewise.
78 (__cxa_vec_delete): Likewise.
80 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
82 * class.c (instantiate_type): Reinstate local variable
83 deleted in previous change.
85 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
88 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
90 * cp-tree.h (instantiate_type_flags): New enumeration.
91 (instantiate_type): Change parameter.
92 * class.c (instantiate_type): Adjust prototype. Adjust.
93 * call.c (standard_conversion): Adjust instantiate_type call.
94 (reference_binding): Likewise.
95 (build_op_delete_call): Likewise.
96 (convert_like_real): Likewise.
97 * cvt.c (cp_convert_to_pointer): Likewise.
98 (convert_to_reference): Likewise.
99 * pt.c (convert_nontype_argument): Likewise.
100 * typeck.c (build_binary_op): Likewise.
101 (build_ptrmemfunc): Likewise.
102 (convert_for_assignment): Likewise.
104 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
106 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
107 (current_aggr): Define.
108 * decl.c (grokdeclarator): Make sure a friend class is an
109 elaborated type specifier.
110 * parse.y (current_aggr): Remove static definition.
111 (cp_parse_init): Adjust.
112 (structsp): Clear and restore current_aggr.
113 (component_decl_list): Clear current_aggr.
115 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
116 aggregate tag on the typename's context.
118 * pt.c (tsubst_friend_class): Return error_mark_node, if
120 (instantiate_class_template): Ignore error_mark_node friend types.
122 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
124 * cvt.c (warn_ref_binding): New static function, broken out of ...
125 (convert_to_reference): ... here. Use it.
127 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
129 * parse.y (template_arg): Add rule for template qualified with
132 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
134 * decl2.c (add_function): Reorganize.
135 (arg_assoc): Do not consider function template decls.
137 2000-08-11 Jason Merrill <jason@redhat.com>
139 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
142 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
144 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
145 (lookup_nested_tag): Likewise.
147 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
150 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
152 * parse.y (named_complex_class_head_sans_basetype): Remove
155 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
157 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
158 explicit TEMPLATE_ID_EXPR args.
159 (build_expr_from_tree, case CALL_EXPR): Likewise.
161 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
163 * decl.c (check_tag_decl): Diagnose typename's which don't
166 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
168 * init.c (build_aggr_init): Reject bogus array initializers
171 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
173 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
175 * cp/tinfo.cc (__dynamic_cast): Likewise.
176 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
178 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
180 * cvt.c (convert_to_pointer_force): Fix error message when
181 attempting to cast from ambiguous base.
183 2000-08-08 Jason Merrill <jason@redhat.com>
185 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
186 (tsubst_template_arg_vector): Likewise.
188 * decl2.c (build_anon_union_vars): Choose the largest field; don't
189 assume that one will be as large as the union.
191 2000-08-07 Kazu Hirata <kazu@hxi.com>
193 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
194 * decl.c (pop_labels): Likewise.
196 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
198 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
200 (__pointer_to_member_type_info): Likewise.
201 (__base_class_info): Likewise.
202 (__class_type_info): Likewise.
203 (__si_class_type_info): Likewise.
204 (__vmi_class_type_info): Likewise.
205 * tinfo.cc (__si_class_type_info::__do_find_public_src):
206 Changed member names to match specifications.
207 (__vmi_class_type_info::__do_find_public_src): Likewise.
208 (__si_class_type_info::__do_dyncast): Likewise.
209 (__vmi_class_type_info::__do_dyncast): Likewise.
210 (__si_class_type_info::__do_upcast): Likewise.
211 (__vmi_class_type_info::__do_upcast): Likewise.
212 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
213 (__pbase_type_info::__pointer_catch): Likewise.
214 (__pointer_type_info::__pointer_catch): Likewise.
215 (__pointer_to_member_type_info::__pointer_catch): Likewise.
218 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
220 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
221 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
222 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
224 2000-08-04 Mark Mitchell <mark@codesourcery.com>
226 * cp-tree.h (add_method): Change prototype.
227 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
228 Don't double the size of the method vector in the error case.
229 (handle_using_decl): Adjust call to add_method.
230 (add_implicitly_declared_members): Likewise.
231 (clone_function_decl): Likewise.
232 * decl2.c (check_classfn): Likewise.
233 * semantics.c (finish_member_declaration): Likewise.
235 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
237 * decl.c (flag_isoc94): New variable.
239 2000-08-02 Jason Merrill <jason@redhat.com>
241 * pt.c (do_type_instantiation): Add complain parm; don't complain
242 if called recursively.
243 * cp-tree.h, parse.y: Adjust.
245 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
247 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
248 -Wno-strict-prototypes.
250 * g++spec.c: Adjust type of second argument to
251 lang_specific_driver, and update code as necessary.
253 * cp-tree.h: Don't prototype min_precision here.
254 (my_friendly_assert): Cast expression to void.
255 * semantics.c (do_poplevel): Initialize scope_stmts.
257 2000-08-02 Mark Mitchell <mark@codesourcery.com>
259 * cp-tree.h (DECL_NEEDED_P): Tweak.
261 2000-07-28 Jason Merrill <jason@redhat.com>
263 * lang-specs.h: Use %i in rule for .ii files.
265 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
267 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
269 2000-07-30 Mark Mitchell <mark@codesourcery.com>
271 Allow indirect primary bases.
272 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
274 (CLASSTYPE_VFIELD_PARENT): Remove.
275 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
276 (BINFO_PRIMARY_BINFO): Remove.
277 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
278 (BINFO_VBASE_PRIMARY_P): Likewise.
279 (BINFO_PRIMARY_BASE_OF): New macro.
280 (BINFO_INDIRECT_PRIMARY_P): Likewise.
281 (get_primary_binfo): New function.
282 * decl.c (lang_mark_tree): Make lang_type::primary_base.
283 * class.c (vcall_offset_data_s): Rename to ...
284 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
286 (get_derived_offset): Use get_primary_binfo.
287 (dfs_mark_primary_bases): Adjust handling of virtual primary
289 (mark_primary_bases): Likewise.
290 (set_primary_base): Take a binfo, not an integer, as a
291 representation of the primary base.
292 (indirect_primary_base_p): Remove.
293 (determine_primary_base): Adjust for indirect primary bases.
294 (dfs_find_final_overrider): Fix typo in coment.
295 (update_vtable_entry_for_fn): Use get_primary_binfo.
296 (layout_nonempty_base_or_field): Tweak.
297 (build_base_fields): Adjust for new primary base semantics.
298 (dfs_propagate_binfo_offsets): Remove.
299 (propagate_binfo_offsets): Rewrite.
300 (dfs_set_offset_for_shared_vbases): Remove.
301 (layout_virtual_bases): Don't use it.
302 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
304 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
305 CLASSTYPE_VFIELD_PARENT.
306 (dfs_get_primary_binfo): New function.
307 (get_primary_binfo): Likewise.
308 (dump_class_hierarchy_r): Tweak printing of primary bases.
309 (build_vtbl_initializer): Fix typo in comments. Use
311 (build_vcall_and_vbase_vtbl_entries): Likewise.
312 (build_vbaes_offset_vtbl_entries): Likewise.
313 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
314 BV_VCALL_INDEX to handle indirect primary bases.
315 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
316 (build_rtti_vtbl_entries): Likewise.
317 * search.c (get_shared_vbase_if_not_primary): Tweak.
318 (find_vbase_instance): Likewise.
319 (binfo_for_vtable): Simplify.
320 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
321 (make_binfo): Make it have 11 entries.
323 2000-07-30 Alex Samuel <samuel@codesourcery.com>
325 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
326 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
327 ascertaining primaryness.
328 (G): Remove template_args.
329 (decl_is_template_id): New function.
330 (write_encoding): Use decl_is_template_id.
331 (write_name): Likewise. Handle type_decls. Get main variant of
333 (write_nested_name): Likewise.
334 (write_prefix): Likewise.
335 (write_template_prefix): Likewise.
336 (write_special_name_constructor): Remove defunct production from
338 (write_bare_function_type): Remove comment about absent parameter.
339 (write_template_template_arg): Add missing grammar production to
342 2000-07-27 Jason Merrill <jason@redhat.com>
344 * decl.c (duplicate_decls): If common_type produces a non-typedef
345 type for a typedef, just use the old type.
347 2000-07-27 Mark Mitchell <mark@codesourcery.com>
349 * cp-tree.h (function_depth): Declare.
350 (verify_stmt_tree): Likewise.
351 (find_tree): Likewise.
352 * decl.c (function_depth): Give it external linkage.
353 * optimize.c (optimize_function): Increment and decrement it.
354 * tree.c (verify_stmt_tree_r): New function.
355 (verify_stmt_tree): Likewise.
356 (find_tree_r): Likewise.
357 (find_tree): Likewise.
359 2000-07-27 Jason Merrill <jason@redhat.com>
361 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
363 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
365 2000-07-26 Mark Mitchell <mark@codesourcery.com>
367 * decl.c (start_cleanup_fn): Mark the function as `inline'.
368 * decl2.c (get_guard): Call cp_finish_decl, not
369 rest_of_decl_compilation, for local guards.
370 * lex.c (do_identifier): Remove unused variable.
372 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
374 * parse.y: Add missing ';'.
376 2000-07-26 Mark Mitchell <mark@codesourcery.com>
378 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
381 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
383 Kill strict_prototype. Backwards compatibility only for
384 non NO_IMPLICIT_EXTERN_C systems.
385 * cp-tree.h (flag_strict_prototype): Remove.
386 (strict_prototype): Remove.
387 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
388 * decl.c (maybe_push_to_top_level): Adjust.
389 (pop_from_top_level): Adjust.
390 (decls_match): Only allow sloppy parm matching for ancient
392 (init_decl_processing): Adjust.
393 (grokdeclarator): Adjust.
394 * decl2.c (flag_strict_prototype): Remove.
395 (strict_prototype): Remove.
396 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
397 (lang_f_options): Remove "strict-prototype".
398 (unsupported-options): Add "strict-prototype".
399 * lex.c (do_identifier): Adjust.
400 (do_scoped_id): Adjust.
401 * parse.y (empty_parms): Adjust.
402 * class.c (push_lang_context): Adjust.
403 (pop_lang_context): Adjust.
404 * typeck.c (comp_target_parms): Adjust.
406 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
408 * decl.c (poplevel): Deal with anonymous variables at for scope.
409 (maybe_inject_for_scope_var): Likewise.
411 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
413 * decl.c: Remove all signal handling code, now done in toplev.c.
415 2000-07-23 Mark Mitchell <mark@codesourcery.com>
417 * decl.c (make_rtl_for_nonlocal_decl): Rework.
419 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
422 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
424 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
425 Define my_friendly_assert and my_friendly_abort as macros
426 which may call friendly_abort. Prototype friendly abort, not
427 my_friendly_abort or my_friendly_assert.
428 * decl.c (signal_catch): Report the signal caught in the error
429 message. Call fatal directly.
430 * typeck2.c (ack, my_friendly_assert): Delete.
431 (my_friendly_abort): Rename to friendly_abort. Expect file,
432 line, and function parameters. Report the abort code, then
433 call fancy_abort. Do not mask an abort if errors have
436 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
438 * typeck.c (comp_target_parms): Remove obsolete parameter.
439 (comp_target_types): Adjust.
441 2000-07-17 Jason Merrill <jason@redhat.com>
443 * typeck.c (mark_addressable): Never set TREE_USED.
444 * call.c (build_call): Don't abort on calls to library functions
445 that have been declared normally.
447 * typeck.c (build_binary_op): Fix grammar in warning.
449 * exception.cc (__eh_free): Fix prototype.
451 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
453 * decl.c (pushdecl): Handle seeing an OVERLOAD in
454 IDENTIFIER_NAMESPACE_VALUE.
456 2000-07-16 Mark Mitchell <mark@codesourcery.com>
458 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
459 * method.c (use_thunk): Correct handling of vcall offsets.
461 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
463 * .cvsignore: parse.h and parse.c have no cp- prefix.
465 2000-07-13 Mark Mitchell <mark@codesourcery.com>
467 * .cvsignore: New file.
469 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
471 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
473 2000-07-12 Mark Mitchell <mark@codesourcery.com>
475 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
479 2000-07-11 Mark Mitchell <mark@codesourcery.com>
481 * class.c (layout_class_type): Add pointers to virtual bases after
482 base classes under the old ABI.
484 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
486 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
487 (finish_continue_stmt): Likewise.
488 (begin_for_stmt): Remove call to note_level_for_for.
489 (finish_goto_stmt): Change call from build_min_nt
491 (finish_expr_stmt): Likewise.
492 (begin_if_stmt): Likewise.
493 (begin_while_stmt): Likewise.
494 (finish_while_stmt): Likewise.
495 (finish_return_stmt): Likewise.
496 (begin_for_stmt): Likewise.
497 (finish_for_stmt): Likewise.
498 (finish_break_stmt): Likewise.
499 (begin_switch_stmt): Likewise.
500 (finish_case_label): Likewise.
501 (genrtl_try_block): Likewise.
502 (begin_try_block): Likewise.
503 (begin_handler): Likewise.
504 (begin_compound_stmt): Likewise.
505 (finish_asm_stmt): Likewise.
506 (finish_label_stmt): Likewise.
507 (add_decl_stmt): Likewise.
508 (finish_subobject): Likewise.
509 (finish_decl_cleanup): Likewise.
510 (finish_named_return_value): Likewise.
511 (setup_vtbl_ptr): Likewise.
512 (add_scope_stmt): Likewise.
513 * decl.c (finish_constructor_body): Likewise.
514 (finish_destructor_body): Likewise.
515 * optimize.c (copy_body_r): Likewise.
516 (initialize_inlined_parameters): Likewise.
517 (declare_return_variable): Likewise.
518 (expand_call_inline): Likewise.
520 2000-07-10 Jakub Jelinek <jakub@redhat.com>
522 * semantics.c (expand_body): Sync interface information
523 at the end of function body expansion.
525 2000-07-09 Jason Merrill <jason@redhat.com>
527 * init.c (build_new_1): Bail early if the call to new fails.
529 * decl.c (compute_array_index_type): Check specifically for
530 an INTEGER_CST, not just TREE_CONSTANT.
532 * decl.c (duplicate_decls): Don't call duplicate_decls on
533 the DECL_TEMPLATE_RESULT.
534 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
537 * error.c (dump_template_bindings): Don't crash if we had an
538 invalid argument list.
540 * typeck.c (c_expand_start_case): Do narrowing here.
541 * semantics.c (finish_switch_cond): Not here.
543 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
545 * parse.y (asm_clobbers): Do string concatenation.
547 2000-07-09 Mark Mitchell <mark@codesourcery.com>
549 * decl.c (pushtag): Don't put local classes in template functions
550 on the local_classes list.
552 2000-07-04 Scott Snyder <snyder@fnal.gov>
554 * decl2.c (get_guard): Add missing return for old ABI local
557 2000-07-09 Mark Mitchell <mark@codesourcery.com>
559 * cp-tree.h (char_type_p): New function.
560 * decl.c (init_decl_processing): Don't initialize
561 signed_wchar_type_node or unsigned_wchar_type_node.
562 (complete_array_type): Handle brace-enclosed string-constants.
563 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
564 * tree.c (char_type_p): New function.
565 * typeck2.c (digest_init): Use char_type_p.
567 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
569 * pt.c (tsubst): Don't layout type, if it's error_mark.
571 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
573 * pt.c (instantiate_pending_templates): Reset template level.
575 2000-07-05 Jason Merrill <jason@redhat.com>
577 * call.c (joust): Don't complain about `operator char *()' beating
578 `operator const char *() const'.
580 2000-07-04 scott snyder <snyder@fnal.gov>
581 Jason Merrill <jason@redhat.com>
583 * repo.c (repo_get_id): Handle the case where a class with virtual
584 bases has a null TYPE_BINFO_VTABLE.
586 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
587 Jason Merrill <jason@redhat.com>
589 * parse.y (member_init): Just pass in the type.
590 * init.c (expand_member_init): Handle getting a type.
592 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
593 Jason Merrill <jason@redhat.com>
595 * decl.c (finish_function): Warn if a function has no return
597 Suggested by Andrew Koenig.
598 * typeck.c (check_return_expr): Do set current_function_returns_value
599 if we got an error_mark_node.
601 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
603 * decl2.c (push_decl_namespace): Push the original namespace.
605 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
607 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
608 * semantics.c (begin_class_definition): Clear it.
610 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
612 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
613 (genrtl_expr_stmt): Likewise.
614 (genrtl_decl_stmt): Likewise.
615 (genrtl_if_stmt): Likewise.
616 (genrtl_while_stmt): Likewise.
617 (genrtl_do_stmt): Likewise.
618 (genrtl_return_stmt): Likewise.
619 (genrtl_for_stmt): Likewise.
620 (genrtl_break_stmt): Likewise.
621 (genrtl_continue_stmt): Likewise.
622 (genrtl_scope_stmt): Likewise.
623 (genrtl_switch_stmt): Likewise.
624 (genrtl_case_label): Likewise.
625 (genrtl_begin_compound_stmt): Likewise.
626 (genrtl_finish_compound_stmt): Likewise.
627 (genrtl_compound_stmt): Likewise.
628 (genrtl_asm_stmt): Likewise.
630 * init.c (begin_init_stmts): Remove call to
631 genrtl_begin_compound_stmt.
632 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
634 * semantics.c (lang_expand_stmt): Changed call to
635 genrtl_compound_stmt to ignore return value.
637 2000-07-02 Mark Mitchell <mark@codesourcery.com>
639 * mangle.c (canonicalize_for_substitution): Return the canonical
642 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
644 * typeck.c (commonparms): Remove obstack manipulations.
646 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
648 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
650 * Makefile.in (OBJS): Added ../c-semantics.o.
653 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
655 (struct stmt_tree): Added comment.
656 (current_function_name_declared): Removed.
657 (stmts_are_full_exprs_p): Likewise.
658 (genrtl_do_pushlevel): Likewise.
659 (genrtl_clear_out_block): Likewise.
660 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
661 (DECL_ANON_UNION_ELEMS): Likewise.
662 (emit_local_var): Likewise.
663 (make_rtl_for_local_static): Likewise.
665 (expand_stmt): Likewise.
666 (genrtl_decl_cleanup): Likewise.
667 (c_expand_asm_operands): Likewise.
668 (c_expand_return): Likewise.
669 (c_expand_start_case): Likewise.
671 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
672 (emit_local_var): Likewise.
673 (initialize_local_var): Change reference to
674 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
675 Change reference to stmts_are_full_exprs_p to
676 current_stmt_tree->stmts_are_full_exprs_p.
677 (push_cp_function_context): Likewise.
679 * expect.c (expand_throw): Change reference to
680 stmts_are_full_exprs_p.
682 * init.c (build_aggr_init): Change reference to
683 stmts_are_full_exprs_p.
684 (build_vec_init): Likewise.
686 * optimize.c (maybe_clone_body): Change reference to
687 current_function_name_declared to
688 cp_function_chain->name_declared.
690 * pt.c (instantiate_decl): Change reference to
691 current_function_name_declared to
692 cp_function_chain->name_declared.
694 * semantics.c (expand_cond): Moved declaration to c-common.h.
695 (genrtl_do_pushlevel): Moved to c-semantics.c.
696 (genrtl_clear_out_block): Likewise.
697 (genrtl_goto_stmt): Likewise.
698 (genrtl_expr_stmt): Likewise.
699 (genrtl_decl_stmt): Likewise.
700 (gerntl_if_stmt): Likewise.
701 (genrtl_while_stmt): Likewise.
702 (genrtl_do_stmt): Likewise.
703 (genrtl_return_stmt): Likewise.
704 (genrtl_for_stmt): Likewise.
705 (genrtl_break_stmt): Likewise.
706 (genrtl_continue_stmt): Likewise.
707 (genrtl_scope_stmt): Likewise.
708 (genrtl_switch_stmt): Likewise.
709 (genrtl_case_label): Likewise.
710 (genrtl_begin_compound_stmt): Likewise.
711 (genrtl_finish_compound_stmt): Likewise.
712 (genrtl_compound_stmt): Likewise.
713 (genrtl_asm_stmt): Likewise.
714 (genrtl_decl_cleanup): Likewise.
715 (expand_cond): Likewise.
716 (expand_stmt): Renamed to ...
717 (lang_expand_stmt): ... this.
718 (lang_expand_expr_stmt): Initialize.
719 (set_current_function_name_declared): Likewise.
720 (stmts_are_full_exprs_p): Likewise.
721 (current_function_name_declared): Likewise.
722 (anon_aggr_type_p): Likewise.
723 (do_poplevel): Change reference to
724 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
725 Change reference to stmts_are_full_exprs_p to
726 current_stmt_tree->stmts_are_full_exprs_p.
727 (add_tree): Likewise.
728 (finish_expr_stmt): Likewise.
729 (prep_stmt): Likewise.
730 (lang_expand_stmt): Likewise.
731 (begin_compound_stmt): Change reference to
732 current_function_name_declared to
733 cp_function_chain->name_declared and call to
734 current_function_name_declared().
735 (setup_vtbl_ptr): Likewise.
736 (genrtl_do_poplevel): Removed.
738 2000-06-30 Jason Merrill <jason@redhat.com>
740 * init.c (init_init_processing): Go back to aligning like
741 double_type_node for old ABI.
742 (get_cookie_size): Make cookie larger if we get a type that needs
744 (build_vec_delete): Call it.
746 * typeck.c (qualify_type_recursive): New fn.
747 (composite_pointer_type): Use it.
748 (build_binary_op): Use composite_pointer_type.
750 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
751 Jason Merrill <jason@redhat.com>
753 * typeck.c (check_return_expr): Don't complain about returning
754 NULL from operator new if -fcheck-new.
755 * cp-tree.h: Declare flag_check_new here.
758 2000-06-28 Alex Samuel <samuel@codesourcery.com>
760 * mangle.c (find_substitution): Use same_type_p.
761 (write_encoding): Don't check for substitutions.
763 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
765 * parse.y (expr_no_comma_rangle): New non-terminal.
766 (template_parm): Use it for default parameter case.
767 (template_arg): Use it.
768 (expr_no_commas): Remove commented out undefined extensions.
769 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
770 * parse.h, parse.c: Rebuilt.
772 2000-06-30 Mark Mitchell <mark@codesourcery.com>
774 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
775 (finish_asm_stmt): Do it here, instead.
777 * cp-tree.h (ridpointers): Don't declare.
778 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
779 (record_builtin_java_type): Likewise.
780 (init_decl_processing): Likewise.
781 * lex.c: Move inclusion of lex.h.
782 (ridpointers): Don't define.
783 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
785 * lex.h (enum rid): Rename to ...
786 (enum cp_rid): ... this.
787 (ridpointers): Don't declare.
788 * parse.y: Move inclusion of lex.h.
789 * parse.c: Regenerated.
790 * spew.c: Move inclusion of lex.h.
792 * cp-tree.h (struct language_function): Remove temp_name_counter.
793 (temp_name_counter): Remove.
794 (get_temp_name): Change prototype.
795 (get_guard): New function.
796 (get_guard_cond): Likewise.
797 (set_guard): Likewise.
798 * cvt.c (build_up_reference): Adjust call to get_temp_name.
799 * decl.c (expand_static_init): Use get_guard and friends to
800 implement guard variables.
801 * decl2.c (get_temp_name): Assume that the variables created are
803 (get_sentry): Rename to ...
804 (get_guard): ... this. Implement new ABI guard variables.
805 (get_guard_bits): New function.
806 (get_guard_cond): Likewise.
807 (set_guard): Likewise.
808 (start_static_initialization_or_destruction): Use them.
809 (do_static_initialization): Replace sentry with guard throughout.
810 (do_static_destruction): Likewise.
811 * init.c (create_temporary_var): Add comment.
813 2000-06-28 Alex Samuel <samuel@codesourcery.com>
815 * mangle.c (find_substitution): Use same_type_p.
816 (write_encoding): Don't check for substitutions.
818 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
820 * parse.y (expr_no_comma_rangle): New non-terminal.
821 (template_parm): Use it for default parameter case.
822 (template_arg): Use it.
823 (expr_no_commas): Remove commented out undefined extensions.
824 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
825 * parse.h, parse.c: Rebuilt.
827 2000-06-29 Mark Mitchell <mark@codesourcery.com>
829 * cp-tree.h (flag_const_strings): Remove.
830 (warn_parentheses): Likewise.
831 (warn_format): Likewise.
832 (common_type): Likewise.
833 (default_conversion): Likewise.
834 (build_binary_op): Likewise.
835 (cp_build_binary_op): New macro.
836 * call.c (build_new_op): Use cp_build_binary_op instead of
838 * class.c (build_vtable_entry_ref): Likewise.
839 * decl.c (expand_static_init): Likewise.
840 (compute_array_index_type): Likewise.
841 (build_enumerator): Likewise.
842 * decl2.c (delete_sanity): Likewise.
843 (start_static_initialization_or_destruction): Likewise.
844 * error.c (dump_type_suffix): Likewise.
845 * init.c (resolve_offset_ref): Likewise.
846 (build_new): Likewise.
847 (build_new_1): Likewise.
848 (build_vec_delete_1): Likewise.
849 (build_vec_init): Likewise.
850 (build_delete): Likewise.
851 * rtti.c (synthesize_tinfo_fn): Likewise.
852 (synthesize_tinfo_var): Likewise.
853 * search.c (expand_upcast_fixups): Likewise.
854 (fixup_all_virtual_upcast_offsets): Likewise.
855 * typeck.c (build_array_ref): Likewise.
856 (get_member_function_from_ptrfunc): Likewise.
857 (build_binary_op): Add parameter.
858 (pointer_int_sum): Use cp_build_binary_op.
859 (pointer_diff): Likewise.
860 (build_modify_expr): Likewise.
861 (get_delta_difference): Likewise.
862 (build_ptrmemfunc): Likewise.
864 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
866 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
867 * decl.c (create_implicit_typedef): Adjust.
868 * decl2.c (build_artificial_parm): Adjust.
869 * method.c (implicitly_declare_fn): Adjust.
870 * pt.c (push_inline_template_parms_recursive): Adjust.
871 (process_template_parm): Adjust.
872 (overloaded_template_name): Adjust.
873 * semantics.c (finish_template_template_parm): Adjust.
875 2000-06-28 Mark Mitchell <mark@codesourcery.com>
877 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
878 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
879 where to emit thunks.
880 (build_vtt): Adjust call to build_vtt_inits.
881 (build_vtt_inits): Add parameter to indicate whether or not
882 sub-VTTs for virtual bases should be included. Adjust handling of
883 construction vtables.
884 (get_matching_base): New function.
885 (dfs_build_vtt_inits): Rename to ...
886 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
887 construction vtables.
888 (dfs_fixup_binfo_vtbls): Likewise.
889 (build_ctor_vtbl_groups): Build construction vtables for virtual
891 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
892 to build construction vtbls.
893 (dfs_accumulate_vtbl_inits): Adjust handling of
894 construction vtables.
896 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
899 2000-06-27 Mark Mitchell <mark@codesourcery.com>
901 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
903 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
905 * search.c (hides): Remove.
906 (is_subobject_of_p): Add most_derived parameter. Use
908 (lookup_field_queue_p): Adjust.
909 (lookup_field_r): Adjust.
911 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
913 * decl2.c (handle_class_head): Bash typedefs to the type's main
916 2000-06-25 Mark Mitchell <mark@codesourcery.com>
918 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
919 (begin_global_stmt_expr): ... this.
920 (genrtl_finish_stmt_expr): Rename to ...
921 (finish_global_stmt_expr): ... this.
922 * init.c (begin_init_stmts): Adjust calls.
923 (finish_init_stmts): Likewise.
924 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
925 (begin_global_stmt_expr): ... this.
926 (genrtl_finish_stmt_expr): Rename to ...
927 (finish_global_stmt_expr): ... this.
929 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
931 * search.c (lookup_member): Fix typo in comment.
933 2000-06-24 Jason Merrill <jason@redhat.com>
935 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
936 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
938 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
940 * parse.y (complex_direct_notype_declarator): Support global_scope.
941 * Makefile.in: Adjust conflict count.
943 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
945 * parse.y (template_arg): Convert TEMPLATE_DECL
946 that is a template template paramter to
947 TEMPLATE_TEMPLATE_PARM here.
949 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
950 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
951 (copy_template_template_parm): Adjust prototype.
952 * decl.c (grokdeclarator): Remove dead code.
953 * pt.c (process_template_parm): Tidy.
954 (lookup_template_class): Construct nodes in
955 copy_template_template_parm.
956 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
957 lookup_template_class. Use TYPE_TI_TEMPLATE.
958 * tree.c (copy_template_template_parm): Add NEWARGS
960 (mapcar): Adjust call to copy_template_template_parm.
961 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
962 * method.c (build_template_template_parm_names): Change error
963 code to avoid compilation warning.
965 * gxxint.texi: Document template template parameter
968 2000-06-21 Alex Samuel <samuel@codesourcery.com>
970 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
971 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
972 (cp-demangle.o): New rule.
973 (dyn-string.o): Likewise.
974 * inc/cxxabi.h (__cxa_demangle): New declaration.
976 2000-06-22 Mark Mitchell <mark@codesourcery.com>
978 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
979 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
980 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
982 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
983 (make_thunk): Change prototype.
984 (emit_thunk): Rename to use_thunk.
985 (mangle_thunk): Change prototype.
986 * class.c (get_derived_offset): Simplify.
987 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
988 BV_GENERATE_THUNK_WITH_VTABLE_P.
989 (build_primary_vtable): Simplify.
990 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
991 (dfs_find_base): Remove.
992 (update_vtable_entry_for_fn): Correct bug in finding the base
993 where a virtual function was first declared. Figure out whether
994 or not to emit a vcall-thunk with the vtables in which it appears.
995 Correct logic for deciding whether to use an ordinary thunk, or a
997 (finish_struct_1): Remove unnecssary code.
998 (build_vtbl_initializer): Use ssize_int for the running counter of
1000 (build_vtbl_initializer): Only use vcall thunks where necessary.
1001 Mark thunks as needing to be emitted with their vtables, or not.
1002 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
1003 indices. Use size_binop.
1004 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
1005 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
1007 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
1008 (build_vtable_entry): Mark thunks as needing to be emitted with
1009 their vtables, or not.
1010 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
1011 * decl2.c (mark_vtable_entries): Use use_thunk instead of
1013 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
1015 * error.c (dump_expr): Use BV_FN.
1016 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
1018 * method.c (make_thunk): Likewise.
1019 (emit_thunk): Rename to use_thunk. Allow callers to decide
1020 whether or not to actually emit the thunk. Adjust for changes in
1021 representation of vcall offsets.
1022 * search.c (dfs_get_pure_virtuals): Use BV_FN.
1023 * semantics.c (emit_associated_thunks): New function.
1024 (expand_body): Use it.
1025 * ir.texi: Adjust decriptions of thunks.
1027 2000-06-22 Jason Merrill <jason@redhat.com>
1029 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
1030 (tsubst_friend_function): Copy it here.
1032 * decl.c (grok_op_properties): Fix typo.
1034 * decl2.c (delete_sanity): Clarify warning, avoid failure on
1037 * pt.c (check_explicit_specialization): Clarify error.
1039 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
1040 an old OVERLOAD when we're declaring a non-function.
1041 (pushdecl, destroy_local_var): Check for error_mark_node.
1042 (warn_extern_redeclared_static): Also bail early if
1044 (push_overloaded_decl): Ignore an old error_mark_node.
1046 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
1048 * call.c (build_x_va_arg): Check if in a template decl.
1049 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
1051 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
1053 * class.c (push_lang_context): TYPE_NAME gets you to the Java
1055 * decl.c (check_goto): Computed gotos assumed OK.
1057 2000-06-20 Jason Merrill <jason@redhat.com>
1059 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
1060 for which we don't need to look for instantiations.
1062 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
1064 * parse.y (program): Always call finish_translation_unit.
1065 * parse.c, parse.h: Rebuilt.
1067 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
1069 * method.c: Don't include hard-reg-set.h.
1071 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
1073 * rtti.c (get_base_offset): Cope when vbase field is in a base.
1075 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
1077 * call.c (build_conditional_expr): Use VOID_TYPE_P.
1078 * cvt.c (cp_convert_to_pointer): Likewise.
1079 (convert_to_void): Likewise.
1080 * error.c (dump_expr): Likewise.
1081 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
1082 * init.c (build_delete): Likewise.
1083 * method.c (emit_thunk): Likewise.
1084 * optmize.c (declare_return_variable): Likewise.
1085 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1086 (get_typeid): Likewise.
1087 (build_dynamic_cast_1): Likewise.
1088 * typeck.c (composite_pointer_type): Likewise.
1089 (common_type): Likewise.
1090 (build_indirect_ref): Likewise.
1091 (build_binary_op): Likewise.
1092 (build_x_compound_expr): Likewise.
1093 (check_return_expr): Likewise.
1094 * typeck2.c (add_exception_specifier): Likewise.
1096 * mangle.c (write_method_parms): Use direct comparison for end
1099 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
1101 * cp-tree.h (genrtl_try_block): Declare function.
1102 (genrtl_handler): Likewise.
1103 (genrtl_catch_block): Likewise.
1104 (genrtl_ctor_stmt): Likewise.
1105 (genrtl_subobject): Likewise.
1106 (genrtl_decl_cleanup): Likewise.
1107 (genrtl_do_poplevel): Likewise.
1108 (genrtl_do_pushlevel): Likewise.
1109 (genrtl_clear_out_block): Likewise.
1110 (genrtl_goto_stmt): Likewise.
1111 (genrtl_expr_stmt): Likewise.
1112 (genrtl_decl_stmt): Likewise.
1113 (genrtl_if_stmt): Likewise.
1114 (genrtl_while_stmt): Likewise.
1115 (genrtl_do_stmt): Likewise.
1116 (genrtl_return_stmt): Likewise.
1117 (genrtl_for_stmt): Likewise.
1118 (genrtl_break_stmt): Likewise.
1119 (genrtl_continue_stmt): Likewise.
1120 (genrtl_scope_stmt): Likewise.
1121 (genrtl_switch_stmt): Likewise.
1122 (genrtl_case_label): Likewise.
1123 (genrtl_begin_compound_stmt): Likewise.
1124 (genrtl_finish_compound_stmt): Likewise.
1125 (genrtl_compound_stmt): Likewise.
1126 (genrtl_asm_stmt): Likewise.
1127 (genrtl_named_return_value): Likewise.
1128 (genrtl_begin_stmt_expr): Likewise.
1129 (genrtl_finish_stmt_expr): Likewise.
1130 (finish_for_stmt): Removed first argument.
1131 (finish_switch_stmt): Likewise.
1133 * semantics.c (genrtl_try_block): Define function.
1134 (genrtl_handler): Likewise.
1135 (genrtl_catch_block): Likewise.
1136 (genrtl_ctor_stmt): Likewise.
1137 (genrtl_subobject): Likewise.
1138 (genrtl_decl_cleanup): Likewise.
1139 (genrtl_do_poplevel): Likewise.
1140 (genrtl_do_pushlevel): Likewise.
1141 (genrtl_clear_out_block): Likewise.
1142 (genrtl_goto_stmt): Likewise.
1143 (genrtl_expr_stmt): Likewise.
1144 (genrtl_decl_stmt): Likewise.
1145 (genrtl_if_stmt): Likewise.
1146 (genrtl_while_stmt): Likewise.
1147 (genrtl_do_stmt): Likewise.
1148 (genrtl_return_stmt): Likewise.
1149 (genrtl_for_stmt): Likewise.
1150 (genrtl_break_stmt): Likewise.
1151 (genrtl_continue_stmt): Likewise.
1152 (genrtl_scope_stmt): Likewise.
1153 (genrtl_switch_stmt): Likewise.
1154 (genrtl_case_label): Likewise.
1155 (genrtl_begin_compound_stmt): Likewise.
1156 (genrtl_finish_compound_stmt): Likewise.
1157 (genrtl_compound_stmt): Likewise.
1158 (genrtl_asm_stmt): Likewise.
1159 (genrtl_named_return_value): Likewise.
1160 (genrtl_begin_stmt_expr): Likewise.
1161 (genrtl_finish_stmt_expr): Likewise.
1162 (finish_for_stmt): Removed first argument and generate rtl
1164 (finish_switch_stmt): Likewise.
1165 (do_poplevel): Removed generate rtl specific code.
1166 (do_pushlevel): Likewise.
1167 (add_tree): Likewise.
1168 (finish_goto_stmt): Likewise.
1169 (finish_expr_stmt): Likewise.
1170 (begin_if_stmt): Likewise.
1171 (finish_if_stmt_cond): Likewise.
1172 (finish_then_clause): Likewise.
1173 (begin_else_clause): Likewise.
1174 (finish_else_clause): Likewise.
1175 (finish_if_stmt): Likewise.
1176 (clear_out_block): Likewise.
1177 (begin_while_stmt): Likewise.
1178 (finish_while_stmt_cond): Likewise.
1179 (finish_while_stmt): Likewise.
1180 (begin_do_stmt): Likewise.
1181 (finish_do_body): Likewise.
1182 (finish_do_stmt): Likewise.
1183 (finish_return_stmt): Likewise.
1184 (begin_for_stmt): Likewise.
1185 (finish_for_init_stmt): Likewise.
1186 (finish_for_cond): Likewise.
1187 (finish_for_expr): Likewise.
1188 (finish_break_stmt): Likewise.
1189 (finish_continue_stmt): Likewise.
1190 (begin_switch_stmt): Likewise.
1191 (finish_switch_cond): Likewise.
1192 (finish_case_label): Likewise.
1193 (begin_try_block): Likewise.
1194 (begin_function_try_block): Likewise.
1195 (finish_try_block): Likewise.
1196 (finish_cleanup_try_block): Likewise.
1197 (finish_cleanup): Likewise.
1198 (finish_function_try_block): Likewise.
1199 (finish_handler_sequence): Likewise.
1200 (finish_function_handler_sequence): Likewise.
1201 (begin_handler): Likewise.
1202 (finish_handler_parms): Likewise.
1203 (begin_catch_block): Likewise.
1204 (finish_handler): Likewise.
1205 (begin_compound_stmt): Likewise.
1206 (finish_compound_stmt): Likewise.
1207 (finish_asm_stmt): Likewise.
1208 (finish_label_stmt): Likewise.
1209 (finish_label_decl): Likewise.
1210 (finish_subobject): Likewise.
1211 (finish_decl_cleanup): Likewise.
1212 (finish_named_return_value): Likewise.
1213 (begin_stmt_expr): Likewise.
1214 (finish_stmt_expr): Likewise.
1216 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
1217 to call genrtl_expr_stmt when appropriate.
1219 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
1220 begin_compound_expr to call genrtl_begin_stmt_expr and
1221 genrtl_begin_compound_expr when appropriate.
1222 (finish_init_stmts): Changed calls to finish_compound_expr and
1223 finish_stmt_expr to call genrtl_finish_compound_expr and
1224 genrtl_finish_stmt_expr when appropriate.
1225 (expand_default_init): Changed call to finish_expr_stmt to call
1226 genrtl_expr_stmt when appropriate.
1227 (build_vec_init): Likewise.
1229 * parse.y (simple_stmt): Removed first argument from call to
1230 finish_for_stmt. Removed first argument from call to
1233 * parse.c: Regenerated.
1235 * pt.c (tsubst_expr): Removed first argument from call to
1236 finish_for_stmt. Removed first argument from call to
1239 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
1241 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
1242 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
1244 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
1245 (cplus_tree_code_length[]): Likewise.
1246 (cplus_tree_code_name[]): Likewise.
1247 (init_parse): Added call to add_c_tree_codes. Changed
1248 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
1250 2000-06-16 Mark Mitchell <mark@codesourcery.com>
1252 * cp-tree.h (finish_mem_initializers): Declare.
1253 (count_trees): Likewise.
1254 * parse.y (base_init): Use finish_mem_initializers.
1255 * semantics.c (finish_mem_initializers): New function.
1257 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
1258 the number of trees.
1260 (count_trees): Don't use it.
1262 2000-06-15 Jason Merrill <jason@redhat.com>
1264 * tree.c (count_trees): New debugging function.
1266 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
1267 * init.c (build_member_call): Pull out the name of a DECL.
1269 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
1270 * semantics.c (expand_body): Push to TV_INTEGRATION here.
1271 * optimize.c (optimize_function): Not here.
1272 * pt.c (instantiate_decl): Push to TV_PARSE.
1274 2000-06-15 Mark Mitchell <mark@codesourcery.com>
1276 * cp-tree.h (struct language_function): Remove x_base_init_list
1277 and x_member_init_list.
1278 (current_base_init_list): Remove.
1279 (current_member_init_list): Likewise.
1280 (setup_vtbl_ptr): Change prototype.
1281 (emit_base_init): Likewise.
1282 (expand_member_init): Likewise.
1283 (reinit_parse_for_function): Remove.
1284 * decl.c (save_function_data): Don't clear x_base_init_list and
1286 (mark_language_function): Don't mark them.
1287 * init.c (perform_member_init): Tweak comment.
1288 (sort_member_init): Take the list of initializers as an argument.
1289 (sort_base_init): Likewise.
1290 (emit_base_init): Likewise.
1291 (expand_member_init): Return the initializer. Don't use global
1293 * lex.c (reinit_parse_for_function): Remove.
1294 * method.c (build_template_parm_names): Correct substitution.
1295 (do_build_copy_constructor): Don't use current_member_init_list
1296 and current_base_init_list.
1297 (synthesize_method): Likewise.
1298 * parse.y (base_init): Split mem-initializers into
1299 base-initializers and field-initializers.
1300 (member_init_list): Build up the list here.
1301 (member_init): Return the initializer.
1302 (fn.depfn): Don't use reinit_parse_for_function.
1303 * parse.c: Regenerated.
1304 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
1306 (tsubst_expr): Don't use current_member_init_list
1307 and current_base_init_list.
1308 (tsubst_expr_values): Rename to ...
1309 (tsubst_initializer_list): ... this. Use convert_from_reference.
1310 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
1311 and current_base_init_list.
1312 (begin_function_definition): Don't call reinit_parse_for_function.
1314 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
1316 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
1319 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
1321 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
1323 * cp-tree.h (IF_COND): Move to c-common.h.
1324 (THEN_CLAUSE): Likewise.
1325 (ELSE_CLAUSE): Likewise.
1326 (WHILE_COND): Likewise.
1327 (WHILE_BODY): Likewise.
1328 (DO_COND): Likewise.
1329 (DO_BODY): Likewise.
1330 (RETURN_EXPR): Likewise.
1331 (EXPR_STMT_EXPR): Likewise.
1332 (FOR_INIT_STMT): Likewise.
1333 (FOR_COND): Likewise.
1334 (FOR_EXPR): Likewise.
1335 (FOR_BODY): Likewise.
1336 (SWITCH_COND): Likewise.
1337 (SWITCH_BODY): Likewise.
1338 (CASE_LOW): Likewise.
1339 (CASE_HIGH): Likewise.
1340 (GOTO_DESTINATION): Likewise.
1341 (COMPOUND_BODY): Likewise.
1342 (ASM_CV_QUAL): Likewise.
1343 (ASM_STRING): Likewise.
1344 (ASM_OUTPUTS): Likewise.
1345 (ASM_INPUTS): Likewise.
1346 (ASM_CLOBBERS): Likewise.
1347 (DECL_STMT_DECL): Likewise.
1348 (STMT_EXPR_STMT): Likewise.
1349 (LABEL_STMT_LABEL): Likewise.
1350 (SCOPE_BEGIN_P): Likewise.
1351 (SCOPE_END_P): Likewise.
1352 (SCOPE_STMT_BLOCK): Likewise.
1353 (SCOPE_NULLIFIED_P): Likewise.
1354 (SCOPE_NO_CLEANUPS_P): Likewise.
1355 (SCOPE_PARTIAL_P): Likewise.
1356 (ASM_VOLATILE_P): Likewise.
1357 (STMT_LINENO): Likewise.
1358 (STMT_LINENO_FOR_FN_P): Likewise.
1360 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
1361 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
1362 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
1363 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
1364 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
1366 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
1368 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
1369 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
1371 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
1372 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
1373 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
1375 2000-06-14 Mark Mitchell <mark@codesourcery.com>
1377 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
1378 * class.c (dfs_find_final_overrider): Set it appropriately.
1379 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
1380 avoid unneeded secondary vptrs.
1382 2000-06-13 Jakub Jelinek <jakub@redhat.com>
1384 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
1385 (check_bitfield_decl, check_field_decl): Likewise.
1386 (build_vtbl_or_vbase_field, build_base_field): Likewise.
1387 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
1388 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
1389 (xfer_tag, finish_enum): Likewise.
1390 * decl2.c (finish_builtin_type): Likewise.
1391 * init.c (init_init_processing): Likewise.
1392 * pt.c (instantiate_class_template): Likewise.
1393 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
1394 * cp-tree.h (struct lang_type): Add user_align member.
1395 (CLASSTYPE_USER_ALIGN): Define.
1397 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1399 * Make-lang.in (c++.install-common): Install g++-cross in
1400 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
1401 $(target_alias)-g++ and $(target_alias)-c++.
1403 2000-06-12 Mark Mitchell <mark@codesourcery.com>
1405 * class.c (vcall_offset_data_s): Add last_init and fns.
1406 (overrides): Rename to same_signature_p.
1407 (dfs_find_final_overrider): Adjust accordingly.
1408 (mark_overriders): Likewise.
1409 (warn_hidden): Likewise.
1410 (build_vtbl_initializer): Reorganize machinery for building things
1411 at negative offsets.
1412 (build_vcall_and_vbase_vtbl_entries): Likewise.
1413 (build_vbase_offset_vtbl_entries): Likewise.
1414 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
1415 offset entries. Do not create two entries for functions with the
1417 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
1418 (build_rtti_vtbl_entries): Reorganize machinery for building things
1419 at negative offsets.
1421 * optimize.c (expand_call_inline): Don't recurse into the code
1422 used to initialize the parameters more than once.
1424 2000-06-11 Mark Mitchell <mark@codesourcery.com>
1426 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
1427 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
1428 (find_substitution): Only use the `Sa' substitution for
1429 std::allocator, not instantiations of it.
1430 (write_template_prefix): Move comment. Only use a TREE_LIST to
1431 represent substitutions for a member template.
1432 (write_array_type): Mangle array dimensions correctly.
1433 * optimize.c (maybe_clone_body): Copy more information from the
1435 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
1436 on the regenerated declaration.
1438 2000-06-11 Chip Salzenberg <chip@valinux.com>
1439 Mark Mitchell <mark@codesourcery.com>
1441 * class.c (build_vtable): Clarify comment.
1442 (build_ctor_vtbl_group): Pass the most derived type to
1445 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1447 * decl2.c (compare_options): Don't needlessly cast away const-ness.
1449 2000-06-10 Mark Mitchell <mark@codesourcery.com>
1451 * decl.c (add_binding): Handle duplicate declarations of external
1454 2000-06-09 Chip Salzenberg <chip@valinux.com>
1455 Mark Mitchell <mark@codesourcery.com>
1457 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
1459 (write_signed_number): New macro.
1460 (write_unsigned_number): Likewise.
1461 (write_source_name): Use them.
1462 (write_number): Handle signed and unsigned values.
1463 (write_integer_cst): Use tree_int_cst_sgn, and use
1464 write_unsigned_number or write_signed_number as appropriate.
1465 (write_discriminator): Use write_unsigned_number or
1466 write_signed_number as appropriate.
1467 (write_template_arg_literal): Likewise.
1468 (write_array_type): Use tree_low_cst.
1469 (write_template_parm): Use write_unsigned_number or
1470 write_signed_number as appropriate.
1471 (write_substitution): Adjust call to write_number.
1472 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
1473 (write_expression): Handle non-type template arguments of
1474 reference type correctly.
1475 (mangle_thunk): Use write_signed_number.
1477 2000-06-09 Chip Salzenberg <chip@valinux.com>
1479 * mangle.c (find_substition): Don't mangle objects with typename
1480 substitutions (e.g. "cin" as "Si").
1482 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
1484 * call.c (add_candidate): Use ggc_alloc_cleared.
1485 * decl.c (lookup_label): Likewise.
1486 * lex.c (retrofit_lang_decl): Likewise.
1488 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
1490 * semantics.c (expand_body): Push to TV_EXPAND.
1491 * optimize.c (optimize_function): Push to TV_INTEGRATION.
1492 * decl.c (start_function): Always call announce_function.
1494 * tinfo2.cc: Just declare abort.
1496 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
1498 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
1499 whenever @ is a symbolic name.
1501 2000-06-08 Jakub Jelinek <jakub@redhat.com>
1503 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
1505 2000-06-07 Mark Mitchell <mark@codesourcery.com>
1507 * decl.c (pushdecl): Look up functions by DECL_NAME, not
1508 DECL_ASSEMBLER_NAME.
1510 2000-06-06 Mark Mitchell <mark@codesourcery.com>
1512 * decl2.c (c_language): Define.
1514 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
1516 * lex.c (lang_init_options): Tweak.
1518 * decl2.c: Remove #inclusion of diagnostic.h
1519 (lang_decode_option): Move diagnostic formatting options to
1522 * lang-options.h: Remove documentation for diagnostic options.
1524 * Makefile.in (lex.o): Depends upon diagnostic.h
1526 2000-06-06 Mark Mitchell <mark@codesourcery.com>
1528 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
1529 the same DECL_RESULT, it's not a redefinition.
1530 * pt.c (tsubst_decl): Remove code to handle illegal
1533 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
1535 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
1537 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
1539 * search.c (maybe_suppress_debug_info): Don't check
1540 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
1542 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
1545 Remember instantiation context in deferred instantiations.
1546 * cp-tree.h (struct tinst_level): Remove.
1547 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
1548 * pt.c (current_tinst_level): Now a tree.
1549 (print_template_context, push_tinst_level, pop_tinst_level,
1550 tinst_for_decl): Adjust.
1551 (reopen_tinst_level): New fn.
1552 (init_pt): Register current_tinst_level as a root.
1553 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
1554 of the pending templates list.
1555 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
1556 * lex.c (extract_interface_info): Adjust.
1557 * decl2.c (warn_if_unknown_interface): Adjust.
1559 2000-06-05 Mark Mitchell <mark@codesourcery.com>
1561 * class.c (indirect_primary_base_p): New function.
1562 (determine_primary_base): Use it.
1564 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
1566 Update new-abi dynamic cast algorithm.
1567 * tinfo.cc (__class_type_info::__dyncast_result): Add
1568 whole_details. Adjust constructor.
1569 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
1570 Avoid unnecessary searching.
1571 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
1573 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1575 * decl.c (init_decl_processing): Don't call record_component_aliases.
1576 * tree.c (build_cplus_array_type_1): Likewise.
1578 2000-06-04 Mark Mitchell <mark@codesourcery.com>
1580 * ir.texi: Correct typo.
1581 * mangle.c (write_expression): Handle non-type template arguments
1582 with reference type.
1583 * method.c (build_overload_value): Likewise.
1584 * pt.c (convert_nontype_argument): Explicitly represent conversion
1585 to a reference with an ADDR_EXPR.
1586 (unify): Always unify arguments in left-to-right order.
1588 2000-06-03 Alex Samuel <samuel@codesourcery.com>
1589 Mark Mitchell <mark@codesourcery.com>
1591 * Make-lang.in (CXX_SRCS): Add mangle.c.
1592 * Makefile.in (CXX_OBJS): Add mangle.o.
1593 (mangle.o): New rule.
1595 * class.c (local_classes): New variable.
1596 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
1597 (get_vtt_name): Use mangle_vtt_name for new ABI.
1598 (init_class_processing): Initialize local_classes.
1599 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
1600 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
1601 (std_identifier): New macro.
1602 (DECL_VOLATILE_MEMFUNC_P): New macro.
1603 (DECL_NAMESPACE_STD_P): Likewise.
1604 (local_classes): Declare.
1605 (get_mostly_instantiated_function_type): Declare.
1606 (init_mangle): Declare.
1607 (mangle_decl): Likewise.
1608 (mangle_type_string): Likewise.
1609 (mangle_type): Likewise.
1610 (mangle_typeinfo_for_type): Likewise.
1611 (mangle_typeinfo_string_for_type): Likewise.
1612 (mangle_vtbl_for_type): Likewise.
1613 (mangle_vtt_for_type): Likewise.
1614 (mangle_ctor_vtbl_for_type): Likewise.
1615 (mangle_thunk): Likewise.
1616 (mangle_conv_op_name_for_type): Likewise.
1617 (mangle_guard_variable): Likewise.
1618 * decl.c (pushtag): Keep track of local classes.
1619 (initialize_predefined_identifiers): Initialize std_identifier.
1620 (init_decl_processing): Use std_identifier.
1621 (start_decl): Don't treat instantiations as specializations.
1622 (grokdeclarator): Likewise.
1623 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
1624 name for fully-instantiated templates.
1625 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
1626 destructors with the new ABI.
1627 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
1628 (grokfield): Use mangle_type for new ABI.
1629 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
1630 (get_sentry): Use mangle_guard_variable for new ABI.
1631 (start_static_initialization_or_destruction): Likewise.
1632 * expr.c (extract_aggr_init): Remove.
1633 (extract_scalar_init): Likewise.
1634 (extract_init): Remove #if 0'd code.
1635 * mangle.c: New function.
1636 * method.c (build_mangled_name): Assert not flag_new_abi.
1637 (build_static_name): Likewise.
1638 (build_decl_overload_real): Likewise.
1639 (build_typename_overload): Likewise.
1640 (build_overload_with_type): Likewise.
1641 (build_overload_name): Likewise.
1642 (get_ctor_vtbl_name): Likewise.
1643 (start_squangling): Likewise.
1644 (get_id_2): Likewise.
1645 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
1646 (init_method): Call init_mangle for new ABI.
1647 (make_thunk): Call mangle_thunk for new ABI.
1648 * operators.def: Correct new ABI manglings for the `%' operator.
1650 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
1651 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
1652 (lookup_template_class): Call mangle_decl for new ABI.
1653 (get_mostly_instantiated_function_type): New function.
1654 (set_mangled_name_for_template_decl): Use it.
1655 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
1656 the new ABI. Use mangle_conv_op_name_for_type for instantiated
1657 conversion op names.
1658 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
1659 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
1660 (tinfo_base_init): Likewise. Mangle typeinfo string name with
1661 mangle_typeinfo_string_for_type.
1663 2000-06-03 Mark Mitchell <mark@codesourcery.com>
1665 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
1666 (INNERMOST_TEMPLATE_ARGS): New macro.
1667 (innermost_args): Remove.
1668 (get_innermost_template_args): New function.
1669 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
1670 * error.c (dump_function_decl): Be caution when using
1671 most_general_template.
1672 * method.c (build_template_parm_names): Use
1673 INNERMOST_TEMPLATE_ARGS.
1674 * pt.c (add_to_template_args): Tidy comment
1675 (get_innermost_template_args): New function.
1676 (check_explicit_specialization): Clear DECL_INITIAL for a new
1678 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
1680 (push_template_decl): Always register specializations of the most
1682 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
1683 (coerce_template_parms): Likewise.
1684 (lookup_template_class): Likewise.
1685 (innermost_args): Remove.
1686 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
1687 (tsubst_decl): Handle tricky specializations. Use
1688 get_innermost_template_args.
1689 (instantiate_template): Simplify handling of partial
1691 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
1692 (most_general_template): Reimplement, in a more straightforward
1694 (regenerate_decl_from_template): Tweak formatting. Use
1695 TMPL_ARGS_DEPTH for clarity.
1696 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
1698 * dump.c (dequeue_and_dump): Dump information about thunks.
1700 2000-06-01 Richard Henderson <rth@cygnus.com>
1702 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
1704 2000-06-01 Richard Henderson <rth@cygnus.com>
1706 * decl2.c (unsupported_options): Fix typo, make const.
1707 (lang_decode_option): Fix bsearch argument order.
1709 2000-06-01 Mark Mitchell <mark@codesourcery.com>
1711 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
1714 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1716 * cp-tree.h (c_get_alias_set): Deleted.
1717 * Makefile.in (decl.o): Include ../expr.h.
1718 * decl.c (expr.h): Include.
1719 (init_decl_processing): Call record_component_aliases for arrays.
1720 (grokdeclarator): Likewise.
1721 Set TREE_ADDRESSABLE for fields that aren't bitfields.
1722 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
1724 2000-05-31 Mark Mitchell <mark@codesourcery.com>
1726 Remove guiding declaration support.
1727 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
1728 (flag_guiding_decls): Remove.
1729 * call.c (build_user_type_conversion_1): Remove support for
1731 (build_new_function_call): Likewise.
1732 (build_new_op): Likewise.
1733 (build_new_method_call): Likewise.
1734 * decl.c (start_function): Likewise.
1735 * friend.c (is_friend): Likewise.
1736 (do_friend): Likewise.
1737 * decl2.c ((flag_dump_translation_unit): Make it const.
1738 (flag_guiding_decls): Remove.
1739 (unsupported_options): New variable
1740 (compare_options): New function.
1741 (lang_decode_option): Use them.
1743 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
1745 * method.c (mangle_expression): Adjust test for legal expression
1748 * pt.c (instantiate_decl): Save and restore the local
1749 specializations list.
1751 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
1753 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
1755 2000-05-30 Mark Mitchell <mark@codesourcery.com>
1757 * call.c (add_template_candidate_real): Handle member template
1758 constructors for classes with virtual bases.
1759 (build_user_type_conversion_1): Use in_charge_arg_for_name.
1760 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
1762 * ir.texi: Update thunk documentation.
1764 * call.c (joust): Fix handling of overloaded builtin operators.
1766 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
1768 * cp-tree.h (DECL_ANTICIPATED): New macro.
1769 Document new use of DECL_LANG_FLAG_7.
1770 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
1771 in the user namespace.
1772 * lex.c (do_identifier): If the identifier's declaration has
1773 DECL_ANTICIPATED on, it has not yet been declared. But do not
1774 replace it with an ordinary implicit declaration.
1776 * tinfo2.cc: Include stdlib.h.
1778 2000-05-29 Mark Mitchell <mark@codesourcery.com>
1780 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
1781 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
1784 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
1786 * decl2.c (lang_decode_option): Use skip_leading_substring instead
1789 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
1791 * operators.def (<?): Duplicated, should have been...
1794 2000-05-27 Alex Samuel <samuel@codesourcery.com>
1795 Mark Mitchell <mark@codesourcery.com>
1797 * cp-tree.h (ansi_opname): Make it a macro.
1798 (ansi_assopname): Likewise.
1799 (struct lang_decl_flags): Add assignment_operator_p.
1800 (struct lang_decl): Add operator_code.
1801 (DECL_VTT_PARM): Adjust.
1802 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
1803 overloaded operator.
1804 (SET_OVERLOADED_OPERATOR_CODE): New macro.
1805 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
1806 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
1807 (opname_tab): Remove.
1808 (assignop_tab): Likewise.
1809 (operator_name_info_t): New type.
1810 (operator_name_info): New variable.
1811 (assignment_operator_name_info): Likewise.
1812 (build_cp_library_fn): Remove declaration.
1813 (push_cp_library_fn): Likewise.
1814 (operator_name_string): Likewise.
1815 (build_decl_overload): Likewise.
1816 * call.c (print_z_candidates): Simplify.
1817 (build_object_call): Adjust usage of ansi_opname. Use
1818 DECL_OVERLOADED_OPERATOR_P.
1819 (op_error): Adjust operator name lookup.
1820 (build_conditional_expr): Adjust usage of ansi_opname.
1821 (build_new_op): Likewise.
1822 (build_op_delete_call): Likewise.
1823 (build_over_call): Likewise.
1824 (joust): Use DECL_OVERLOADED_OPERATOR_P.
1825 * decl.c (duplicate_decls): Copy operator_code.
1826 (init_decl_processing): Adjust parameters to push_cp_library_fn.
1827 (builtin_function): Adjust parameters to build_library_fn_1.
1828 (build_library_fn_1): Accept an overloaded operator code.
1829 (build_library_fn): Pass ERROR_MARK.
1830 (build_cp_library_fn): Accept an overloaded operator code.
1831 (push_cp_library_fn): Likewise.
1832 (grokfndecl): Tweak.
1833 (grokdeclarator): Simplify code to compute names of overloaded
1834 operators. Adjust use of ansi_opname.
1835 (ambi_op_p): Work on tree_codes, not identifiers.
1836 (unary_op_p): Likewise.
1837 (grok_op_properties): Likewise.
1838 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
1839 (lang_mark_tree): Don't try to mark the operator_code.
1840 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
1841 * error.c (dump_decl): Remove special handling for operator
1843 (dump_function_name): Likewise.
1844 (dump_expr): Adjust name lookup of operators.
1845 (op_to_string): Simplify.
1846 (assop_to_string): Likewise.
1847 * init.c (build_new_1): Adjust use of ansi_opname.
1848 * lex.c (opname_tab): Remove.
1849 (assignop_tab): Likewise.
1850 (ansi_opname): Likewise.
1851 (ansi_assopname): Likewise.
1852 (operator_name_string): Likewise.
1853 (reinit_lang_specific): Likewise.
1854 (operator_name_info): New variable.
1855 (assignment_operator_name_info): Likewise.
1856 (init_operators): New function.
1857 (init_parse): Use it.
1858 (do_identifier): Adjust use of ansi_opname.
1859 * method.c (mangle_expression): Don't use ansi_opname for
1861 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
1862 (build_decl_overload): Remove.
1863 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
1864 (do_build_assign_ref): Adjust use of ansi_opname.
1865 (synthesize_method): Likewise.
1866 (implicitly_declare_fn): Likewise.
1867 * operators.def: New file.
1868 * parse.y (operator): Adjust use of ansi_opname.
1869 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
1870 (set_mangled_name_for_template_decl): Don't play games with
1872 (special_function_p): Adjust use of ansi_opname.
1873 * typeck.c (check_return_expr): Likewise.
1874 * Make-lang.in (cc1plus): Depend on operators.def.
1875 * Makefile.in (lex.o): Likewise.
1878 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
1880 * Make-lang.in (cplib2.ready): Eradicate.
1882 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1884 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
1885 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
1886 (built_min, cp_tree_equal): Likewise.
1888 2000-05-26 Mark Mitchell <mark@codesourcery.com>
1890 * class.c (layout_nonempty_base_or_field): Replace
1891 `record_layout_info' with `record_layout_info_s'.
1893 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
1896 * cp-tree.h (struct language_function): x_named_labels is now
1897 a struct named_label_list*.
1898 * decl.c (struct named_label_use_list): Renamed from...
1899 (struct named_label_list): ...this. New struct.
1900 (push_binding_level): Don't set eh_region.
1901 (note_level_for_eh): New fn.
1902 (pop_label): Take label and old value directly.
1903 (pop_labels): Adjust for new named_labels format.
1904 (lookup_label): Likewise.
1905 (poplevel): Note characteristics of a binding level containing a
1906 named label. Mess with named label lists earlier.
1907 (mark_named_label_lists): New fn.
1908 (mark_lang_function): Call it.
1909 (use_label): New fn, split out from...
1910 (make_label_decl): ...here. Don't call it.
1911 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
1912 check_previous_gotos): New fns, split out from...
1913 (define_label): ...here.
1914 (check_switch_goto): New fn.
1915 (define_case_label): Call it.
1916 (check_goto): New fn.
1917 * semantics.c (finish_goto_stmt): Call it and use_label.
1918 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
1919 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
1921 2000-05-26 Mark Mitchell <mark@codesourcery.com>
1923 * class.c (build_vtable_entry_ref): Correct usage of
1924 get_vtbl_decl_for_binfo.
1926 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
1927 * method.c (implicitly_declare_fn): Not here.
1929 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
1931 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
1932 (CPTI_PTMD_DESC_TYPE): ... here.
1933 (ptmd_desc_type_node): Rename to ...
1934 (ptm_desc_type_node): ... here.
1936 * rtti.c (ptmd_initializer): Rename to ...
1937 (ptm_initializer): ... here.
1938 (sythesize_tinfo_var): Adjust. Deal with pointer to member
1940 (create_tinfo_types): Adjust.
1942 2000-05-25 Mark Mitchell <mark@codesourcery.com>
1944 Finish implementation of VTTs.
1945 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
1946 CPTI_VTT_PARM_IDENTIFIER.
1947 (vtt_parm_identifier): New macro.
1948 (vtt_parm_type): Likewise.
1949 (BINFO_SUBVTT_INDEX): Likewise.
1950 (BINFO_VPTR_INDEX): Likewise.
1951 (struct lang_decl): Add vtt_parm.
1952 (DECL_VTT_PARM): New macro.
1953 (DECL_USE_VTT_PARM): Likewise.
1954 (DECL_NEEDS_VTT_PARM_P): Likewise.
1955 (get_vtt_name): Declare.
1956 (build_artifical_parm): Likewise.
1957 (fixup_all_virtual_upcast_offsets): Likewise.
1958 (expand_indirect_vtbls_init): Remove.
1959 * call.c (build_new_method_call): Pass the vtt to subobject
1960 constructors and destructors.
1961 * class.c (get_vtt_name): Give it external linkage.
1962 (build_clone): Handle the magic VTT parameters for clones.
1963 (clone_function_decl): Fix typo in comment.
1964 (build_vtt): Keep track of the indices in the VTTs where various
1965 entities are stored.
1966 (build_vtt_inits): Likewise.
1967 (dfs_build_vtt_inits): Likewise.
1968 (build_ctor_vtbl_group): Tweak type of construction vtables.
1969 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
1970 primary bases, when building construction vtables.
1971 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
1972 (initialize_predefined_identifiers): Add vtt_parm_identifier.
1973 (init_decl_processing): Initialize vtt_parm_type.
1974 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
1975 (lang_mark_tree): Make vtt_parm.
1976 * decl2.c (build_artificial_parm): New function.
1977 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
1978 (grokclassfn): Use build_artificial_parm.
1979 * init.c (initialize_vtbl_ptrs): Call
1980 fixup_all_virtual_upcast_offsets directly.
1981 (perform_member_init): Use the complete subobject destructor for
1983 (build_vtbl_address): New function.
1984 (expand_virtual_init): Handle VTTs.
1985 * optimize (maybe_clone_body): Likewise.
1986 * search.c (fixup_all_virtual_upcast_offsets): Give it external
1988 (expand_indirect_vtbls_init): Remove.
1989 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
1990 * tree.c (make_binfo): Make them bigger.
1992 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
1994 * inc/cxxabi.h (__pbase_type_info): Define, based on
1995 __pointer_type_info.
1996 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
1997 (__pointer_to_member_type_info): Likewise.
1998 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
1999 (__pointer_to_member_type_info::__is_pointer_p): Remove.
2000 (__pointer_type_info::__do_catch): Rename to ...
2001 (__pbase_type_info::__do_catch): ... here. Adjust.
2002 (__pbase_type_info::__pointer_catch): Implement.
2003 (__pointer_type_info::__pointer_catch): Adjust.
2004 (__pointer_to_member_type_info::__pointer_catch): Adjust.
2006 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
2008 * tinfo.h (__user_type_info::contained_virtual_p): New
2010 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
2012 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
2013 diamond shaped heirarchy. Add early out for mixed diamond and
2014 duplicate shaped heirarchy.
2016 2000-05-24 Mark Mitchell <mark@codesourcery.com>
2018 * cp-tree.h (build_delete): Change prototype.
2019 (build_vec_delete): Likewise.
2020 * call.c (build_scoped_method_call): Use special_function_kind
2021 values to indicate the kind of destruction to be done.
2022 (build_method_call): Likewise.
2023 * decl.c (finish_destructor_body): Likewise.
2024 (maybe_build_cleanup_1): Likewise. Rename to ...
2025 (maybe_build_cleanup): ... this.
2026 * decl2.c (delete_sanity): Use special_function_kind
2027 values to indicate the kind of destruction to be done.
2028 (build_cleanup): Likewise.
2029 * init.c (perform_member_init): Likewise.
2030 (build_vec_delete_1): Likewise.
2031 (build_dtor_call): Simplify.
2032 (build_delete): Use special_function_kind
2033 values to indicate the kind of destruction to be done.
2034 (build_vbase_delete): Likewise.
2035 (build_vec_delete): Likewise.
2037 * init.c (sort_member_init): Fix typo in error message generation
2040 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
2042 * semantics.c (begin_class_definition): make the packed
2043 attribute be sensitive to the "-fpack-struct" command line flag
2045 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
2047 Update new-abi upcast algorithm.
2048 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
2049 prototype and meaning of return value.
2050 (__si_class_type_info::__do_upcast): Likewise.
2051 (__vmi_class_type_info::__do_upcast): Likewise.
2052 * tinfo.cc (__class_type_info::__upcast_result): Replace
2053 whole2dst with part2dst. Adjust ctor.
2054 (__class_type_info::__do_upcast): Adjust call of worker function.
2055 (__class_type_info::__do_upcast): Adjust.
2056 (__si_class_type_info::__do_upcast): Adjust. Use parent's
2058 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
2059 virtual base in diamond heirarchy bug.
2061 2000-05-23 Mark Mitchell <mark@codesourcery.com>
2063 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
2064 and bitfield to tinfo_fn_p.
2065 (DECL_TINFO_FN_P): Adjust.
2066 (SET_DECL_TINFO_FN_P): Likewise.
2067 (DECL_MUTABLE_P): Likewise.
2068 (DECL_C_BIT_FIELD): Likewise.
2069 (SET_DECL_C_BIT_FIELD): Likewise.
2070 (CLEAR_DECL_C_BIT_FIELD): Likewise.
2071 (DECL_UNINLINABLE): Likewise.
2072 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
2073 (handle_using_decl): Remove assertion.
2074 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
2075 to build FIELD_DECLs.
2076 (build_base_field): Likewise.
2077 (layout_class_type): Likewise.
2078 * decl.c (init_decl_processing): Likewise.
2079 (build_ptrmemfunc_type): Likewise.
2080 (grokdeclarator): Likewise.
2081 * decl2.c (grok_x_components): Likewise.
2082 * except.c (call_eh_info): Likewise.
2083 * init.c (init_init_processing): Likewise.
2084 * rtti.c (expand_class_desc): Likewise.
2085 (create_pseudo_type_info): Likewise.
2086 (get_vmi_pseudo_type_info): Likewise.
2087 (create_tinfo_types): Likewise.
2088 * ptree.c (print_lang_decl): Adjust.
2089 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
2090 before checking DECL_MUTABLE_P.
2092 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
2093 parameters for template functions.
2094 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
2095 destructors as well as constructors.
2097 2000-05-22 Mark Mitchell <mark@codesourcery.com>
2099 * class.c (build_ctor_vtbl_group): Set inits.
2100 * optimize.c (maybe_clone_body): Set DECL_INLINE and
2101 DECL_THIS_INLINE appropriately for clones.
2103 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
2104 (DECL_CONV_FN_P): Simplify.
2105 (DECL_OPERATOR): Remove.
2106 (language_to_string): Declare.
2107 * decl.c (duplicate_decls): Fix typo in comment.
2108 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
2109 (grok_op_properties): Use DECL_CONV_FN_P instead of
2110 IDENTIFIER_TYPENAME_P.
2111 * dump.c (dequeue_and_dump): Dump the language linkage of
2113 * error.c (language_to_string): Give it external linkage.
2114 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
2115 (implicitly_declare_fn): Set DECL_LANGUAGE.
2116 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
2117 IDENTIFIER_TYPENAME_P.
2118 (tsubst_decl): Likewise.
2119 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
2120 * semantics.c (finish_member_declaration): Don't mark members of
2121 classes declared in an extern "C" region as extern "C".
2123 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2125 * decl2.c (qualified_lookup_using_namespace): Look through
2128 * decl.c (push_using_decl): Return the old decl on namespace level.
2130 2000-05-21 Mark Mitchell <mark@codesourcery.com>
2132 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
2133 (VTT_NAME_PREFIX): New macro.
2134 (CTOR_VTBL_NAME_PREFIX): Likewise.
2135 (get_ctor_vtbl_name): New function.
2136 * class.c (get_vtable_name): Simplify.
2137 (get_vtt_name): New function.
2138 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
2139 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
2140 when a virtual base becomes primary.
2141 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
2143 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
2144 additional parameters.
2145 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
2146 (initialize_array): New function.
2147 (build_vtt): Likewise.
2148 (build_vtt_inits): Likewise.
2149 (dfs_build_vtt_inits): Likewise.
2150 (dfs_fixup_binfo_vtbls): Likewise.
2151 (build_ctor_vtbl_group): Likewise.
2152 (initialize_vtable): Use initialize_array.
2153 (accumulate_vtbl_inits): Reimplement to handle construction
2155 (dfs_accumulate_vtbl_inits): Likewise.
2156 (bulid_vtbl_initializer): Adjust parameter name.
2157 * method.c (build_typename_overload): Remove #if 0'd code.
2158 (get_ctor_vtbl_name): New function.
2159 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
2160 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
2162 * cp-tree.h (struct lang_type): Remove search_slot.
2163 (CLASSTYPE_SEARCH_SLOT): Remove.
2164 (emit_base_init): Change prototype.
2165 (initialize_vtbl_ptrs): Likewise.
2166 (expand_indirect_vtbls_init): Likewise.
2167 (clear_search_slots): Remove.
2168 * decl.c (lang_mark_tree): Don't mark search_slot.
2169 * init.c (initialize_vtbl_ptrs): Simplify.
2170 (emit_base_init): Likewise.
2171 * search.c (struct vbase_info): Document decl_ptr.
2172 (convert_pointer_to_single_level): Remove.
2173 (dfs_find_vbases): Remove.
2174 (dfs_init_base_pointers): Simplify.
2175 (dfs_clear_vbase_slots): Remove.
2176 (dfs_vtable_path_unmark): New function.
2177 (init_vbase_pointers): Simplify.
2178 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
2179 (expand_indirect_vtbls_init): Simplify. Don't call
2180 mark_all_temps_used.
2181 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
2182 initialize_vtbl_ptrs.
2184 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
2186 * except.c: Add static prototypes.
2188 2000-05-20 H.J. Lu <hjl@gnu.org>
2190 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
2192 2000-05-19 Mark Mitchell <mark@codesourcery.com>
2194 Don't create a separate copy of virtual bases for the
2195 CLASSTYPE_VBASECLASSES list.
2196 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
2197 (BINFO_FOR_VBASE): Remove.
2198 (CANONICAL_BINFO): Adjust.
2199 (binfo_for_vbase): New function.
2200 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
2201 instead of BINFO_FOR_VBASE.
2202 (build_vbase_pointer): Likewise.
2203 (build_secondary_vtable): Likewise.
2204 (dfs_mark_primary_bases): Likewise.
2205 (mark_primary_bases): Likewise.
2206 (layout_nonempty_base_or_field): Likewise.
2207 (dfs_set_offset_for_shared_vbases): Likewise.
2208 (dfs_set_offset_for_unshared_vbases): Likewise.
2209 (layout_virtual_bases): Likewise. Adjust for changes to the
2210 CLASSTYPE_VBASECLASSES list.
2211 (dump_class_hierarchy_r): Use binfo_for_vbase
2212 instead of BINFO_FOR_VBASE.
2213 (dump_class_hierarchy): Likewise.
2214 (finish_vtbls): Likewise.
2215 (build_vtbl_initializer): Adjust for changes to the
2216 CLASSTYPE_VBASECLASSES list.
2217 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
2218 * decl.c (finish_destructor_body): Adjust for changes to the
2219 CLASSTYPE_VBASECLASSES list.
2220 * init.c (sort_base_init): Use binfo_for_vbase.
2221 (construct_virtual_bases): Adjust for changes to the
2222 CLASSTYPE_VBASECLASSES list.
2223 (expand_member_init): Use binfo_for_vbase.
2224 (build_vbase_delete): Adjust for changes to the
2225 CLASSTYPE_VBASECLASSES list.
2226 * method.c (do_build_copy_constructor): Likewise.
2227 * rtti.c (get_base_offset): Use binfo_for_vbase.
2228 (expand_class_desc): Remove #if 0'd code.
2229 * search.c (struct vbase_info): Remove vbase_types.
2230 (get_base_distance): Use binfo_for_vbase.
2231 (lookup_field_queue_p): Use CANONICAL_BINFO.
2232 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
2233 (get_pure_virtuals): Adjust for changes to the
2234 CLASSTYPE_VBASECLASSES list.
2235 (dfs_find_vbases): Use binfo_for_vbase.
2236 (dfs_init_vbase_pointers): Likewise.
2237 (init_vbase_pointers): Don't initialize vi.vbase_types.
2238 (virtual_context): Use binfo_for_vbase.
2239 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
2240 CLASSTYPE_VBASECLASSES list.
2241 (expand_indirect_vtbls_init): Simplify.
2242 (dfs_get_vbase_types): Don't replicate virtual bases.
2243 (find_vbase_instance): Use binfo_for_vbase.
2244 (binfo_for_vbase): New function.
2245 * typeck.c (get_delta_difference): Use binfo_for_vbase.
2247 2000-05-17 Mark Mitchell <mark@codesourcery.com>
2249 * decl2.c (finish_anon_union): Generalize error messages to handle
2250 anonymous structures.
2251 * init.c (perform_member_init): Remove `name' parameter.
2252 (build_field_list): New function.
2253 (sort_member_init): Handle anonymous union initialization order
2254 correctly. Check for multiple initializations of the same union.
2255 (emit_base_init): Don't look up fields by name here.
2256 (expand_member_init): Record the result of name lookup for future
2258 * typeck.c (build_component_ref): Fix formatting.
2260 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
2262 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
2263 * typeck.c (build_x_compound_expr): Replace warn_unused with
2266 * decl2.c (lang_decode_option): Update -Wall unused flags by
2267 calling set_Wunused.
2269 2000-05-16 Mark Mitchell <mark@codesourcery.com>
2271 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
2272 * init.c (dfs_vtable_path_unmark): Remove.
2273 * search.c (marked_new_vtable_p): Likewise.
2274 (unmarked_new_vtable_p): Likewise.
2275 (dfs_search_slot_nonempty_p): Likewise.
2276 (dfs_mark): Likewise.
2277 (dfs_vtable_path_unmark): Likewise.
2278 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
2279 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
2280 (dfs_init_vbase_pointers): Remove special-case new ABI code.
2281 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
2282 (init_vbase_pointers): Simplify.
2283 (expand_indirect_vtbls_init): Likewise.
2285 * class.c (copy_virtuals): New function.
2286 (build_primary_table): Use it.
2287 (build_secondary_vtable): Likewise.
2288 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
2289 indicate that no vcall offset is required.
2290 (add_virtual_function): Likewise.
2291 (modify_all_vtables): Likewise.
2292 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
2293 (dfs_accumulate_vtbl_inits): Likewise.
2294 (build_vtbl_initializer): Make changes to handle construction
2296 (dfs_build_vcall_offset_vtbl_entries): Likewise.
2297 (build_rtti_vtbl_entries): Likewise.
2298 (build_vtable_entries): Handle a NULL vcall_index.
2300 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
2302 * decl2.c (lang_decode_option): Fix thinko.
2304 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
2306 * except.c (check_handlers): New fn.
2307 * cp-tree.h: Declare it.
2308 * semantics.c (finish_handler_sequence): Call it.
2309 (finish_function_handler_sequence): Likewise.
2310 (finish_handler_parms): Set TREE_TYPE on the handler.
2311 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
2312 * search.c (get_base_distance_recursive): If protect>1, ignore
2314 (get_base_distance): Don't reduce watch_access.
2316 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
2318 * lex.c: #include diagnostic.h.
2319 (lang_init_options): Set default prefixing rules.
2321 * lang-options.h: Add -fdiagnostics-show-location=.
2323 * decl2.c: #include diagnostic.h.
2324 (lang_decode_option): Handle -fdiagnostics-show-location=.
2326 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
2328 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
2329 * vec.cc: Revert my 2000-05-07 change.
2331 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
2333 * class.c (check_field_decls): Complain about non-static data
2334 members with same name as class in class with constructor.
2336 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
2338 * decl.c (grokdeclarator): Allow non-static data members with
2341 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
2343 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
2344 and pending_inline.filename. Update prototypes.
2345 * decl.c (define_label): Constify filename parameter.
2346 * decl2.c (warn_if_unknown_interface): Constify local char *.
2347 * input.c Constify input_source.filename. Don't declare
2348 input_filename or lineno. Constify filename parameter to feed_input.
2349 * lex.c (init_parse): Constify parameter and return value.
2350 (cp_pragma_interface, cp_pragma_implementation): Constify
2352 (reinit_parse_for_method, reinit_parse_for_block,
2353 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
2354 Constify local char *.
2355 * pt.c: Don't declare lineno or input_filename.
2356 (print_template_context, tsubst_friend_function, tsubst_decl,
2357 tsubst, instantiate_decl): Constify local char *.
2358 * semantics.c (expand_body): Constify local char *.
2359 * tree.c (build_srcloc): Constify filename parameter.
2360 * typeck.c (c_expand_asm_operands): Constify filename
2363 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
2365 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
2368 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
2370 * inc/cxxabi.h: Fix typos in comment.
2371 (__base_class_info::__offset): Use a static_cast.
2373 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
2375 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
2376 of std::size_t and std::ptrdiff_t respectively.
2377 * tinfo.cc: Likewise.
2380 2000-05-06 Richard Henderson <rth@cygnus.com>
2382 * typeck.c (build_c_cast): Don't warn integer->pointer size
2383 mismatch for constants.
2385 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
2387 * rtti.c (ptmd_initializer): Set non-public, if class is
2390 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
2391 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2392 __cxa_vec_delete): Likewise.
2393 * tinfo.cc (__dynamic_cast): Likewise.
2394 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2395 __cxa_vec_delete): Likewise.
2397 2000-05-04 Mark Mitchell <mark@codesourcery.com>
2399 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
2400 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
2401 (lang_decl_flags): Add vcall_offset.
2402 (THUNK_VCALL_OFFSET): Use it.
2403 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
2404 * method.c (make_thunk): Create the lang_decl here, not in
2406 (emit_thunk): Make generic thunks into ordinary functions once
2407 they have been fed to expand_body.
2408 * semantics.c (expand_body): Set current_function_is_thunk here.
2410 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2412 * class.c (update_vtable_entry_for_fn): Prototype.
2414 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
2417 * search.c (dfs_build_inheritance_graph_order): Prototype.
2419 2000-05-04 Mark Mitchell <mark@codesourcery.com>
2421 * cp-tree.h (special_function_kind): Add various kinds of
2423 (special_function_p): New function.
2424 * class.c (overrides): Don't let one kind of destructor override
2426 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
2427 whether or not to instantiate a template.
2428 * tree.c (special_function_p): Define.
2430 2000-05-03 Mark Mitchell <mark@codesourcery.com>
2432 * cp-tree.def (THUNK_DECL): Remove.
2433 * cp-tree.h (DECL_THUNK_P): New macro.
2434 (DECL_NON_THUNK_FUNCTION_P): Likewise.
2435 (DECL_EXTERN_C_FUNCTION_P): Likewise.
2436 (SET_DECL_THUNK_P): Likewise.
2437 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
2438 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
2439 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
2440 * decl.c (decls_match): Use DECL_EXTERN_C_P.
2441 (duplicate_decls): Likewise.
2442 (pushdecl): Likewise. Adjust thunk handling.
2443 (grokfndecl): Use DECL_EXTERN_C_P.
2444 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
2445 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
2446 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
2447 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
2448 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
2449 DECL_NO_STATIC_CHAIN.
2450 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
2451 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
2452 * search.c (covariant_return_p): Remove THUNK_DECL handling.
2455 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
2457 * tree.c (walk_tree): Set lineno.
2459 2000-05-01 Mark Mitchell <mark@codesourcery.com>
2461 * exception.cc: Update license notice.
2463 * new1.cc: Likewise.
2464 * new2.cc: Likewise.
2465 * tinfo.cc: Likewise.
2466 * tinfo2.cc: Likewise.
2468 * inc/cxxabi.h: Likewise.
2469 * inc/exception: Likewise.
2470 * inc/new: Likewise.
2471 * inc/new.h: Likewise.
2472 * inc/typeinfo: Likewise.
2474 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
2476 * tree.c (build_target_expr_with_type): If we already have a
2477 TARGET_EXPR, just return it.
2479 * optimize.c (initialize_inlined_parameters): Don't generate an
2480 EXPR_STMT if we can just use DECL_INITIAL.
2481 * decl.c (emit_local_var): Only make the initialization a
2482 full-expression if stmts_are_full_exprs_p.
2484 2000-05-01 Mark Mitchell <mark@codesourcery.com>
2486 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
2488 * call.c (standard_conversion): Use it.
2489 (direct_reference_binding): Likewise.
2490 (build_over_call): Likewise.
2491 (is_properly_derived_from): Likewise.
2492 (compare_ics): Likewise.
2493 * class.c (resolves_to_fixed_type_p): Likewise.
2494 * optimize.c (declare_return_variable): Likewise.
2495 * pt.c (is_specialization_of): Likewise.
2497 * typeck.c (comp_target_parms): Likeiwse.
2498 (build_static_cast): Likewise.
2499 (build_reinterpret_cast): Likewise.
2500 (build_const_cast): Likewise.
2501 (comp_ptr_ttypes_real): Likewise.
2502 (comp_ptr_ttypes_const): Likewise.
2503 * typeck2.c (process_init_constructor): Likewise.
2505 2000-04-30 Scott Snyder <snyder@fnal.gov>
2507 * decl.c (finish_destructor_body): Use the base destructor when
2508 destroying virtual bases.
2510 2000-04-30 Mark Mitchell <mark@codesourcery.com>
2512 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
2514 * optimize.c (struct inline_data): Add target_exprs field.
2515 (declare_return_variable): When a function returns an aggregate,
2516 use the variable declared in the TARGET_EXPR as the remapped
2518 (expand_call_inline): Update the pending target_exprs stack.
2519 (optimize_function): Initialize the stack.
2521 * decl2.c (finish_file): Fix typo in comment.
2523 * method.c (emit_thunk): Don't try to return a `void' value.
2525 * optimize.c (initialize_inlined_parameters): If the parameter is
2526 addressable, we need to make a new VAR_DECL, even if the
2527 initializer is constant.
2529 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
2531 * decl.c (grok_op_properties): Add an extra check of argtypes.
2533 2000-04-27 Mark Mitchell <mark@codesourcery.com>
2535 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
2537 (initialize_inlined_parameters): Try to avoid creating new
2540 2000-04-27 Alex Samuel <samuel@codesourcery.com>
2542 * lex.c (my_get_run_time): Remove.
2543 (init_filename_times): Use get_run_time instead of my_get_run_time.
2544 (check_newline): Likewise.
2545 (dump_time_statistics): Likewise.
2546 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
2547 of computing elapsed time explicitly.
2549 2000-04-26 Mark Mitchell <mark@codesourcery.com>
2551 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
2552 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
2553 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
2554 before calling decl_constant_value.
2555 * class.c (check_bitfield_decl): Likewise.
2556 * cvt.c (ocp_convert): Likewise.
2557 (convert): Likewise.
2558 * decl.c (compute_array_index_type): Likewise.
2559 (build_enumerator): Likewise.
2560 * decl2.c (check_cp_case_value): Likewise.
2561 * pt.c (convert_nontype_argument): Likewise.
2563 * typeck.c (decay_conversion): Likewise.
2564 (build_compound_expr): Likewise.
2565 (build_reinterpret_cast): Likewise.
2566 (build_c_cast): Likewise.
2567 (convert_for_assignment): Likewise.
2569 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
2571 * decl.c (finish_function): Don't play games with DECL_INLINE.
2573 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
2575 * ir.texi: Correct typo.
2577 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2579 * decl.c (grokdeclarator): Reject VLAs as members.
2581 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
2583 * call.c (standard_conversion): Accept conversion between
2586 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
2588 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
2590 * decl2.c (finish_file): Remove double setup for accounting
2593 2000-04-24 Robert Lipe <robertlipe@usa.net>
2595 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
2597 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
2599 * new.cc (set_new_handler): Needs to be in std::.
2601 2000-04-23 Mark Mitchell <mark@codesourcery.com>
2603 * cp-tree.h (lang_decl): Remove pretty_function_p.
2604 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
2605 language-specific node.
2606 * decl.c (cp_make_fname_decl): Use build_decl, not
2607 build_lang_decl, to build the variables.
2608 (grokvardecl): Don't call build_lang_decl for local variables in
2610 (grokdeclarator): Don't call build_lang_decl for local type
2611 declarations in templates.
2612 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
2613 zero'd memory, rather than calling memset.
2614 * pt.c: Include hashtab.h.
2615 (local_specializations): New variable.
2616 (retrieve_local_specialization): Use it.
2617 (register_local_specialization): Likewise.
2618 (tsubst_decl): Don't assume local variables have
2620 (instantiate_decl): Set up local_specializations.
2621 * Makefile.in (HTAB_H): New variable.
2623 2000-04-23 Richard Henderson <rth@cygnus.com>
2625 * typeck.c (c_expand_asm_operands): Restore the original
2626 contents of the output list.
2628 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
2630 * ir.texi: Document complex number representation.
2632 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
2634 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
2635 (target_incomplete_p): New function.
2636 (tinfo_base_init): Create comdat NTBS name variable.
2637 (ptr_initializer): Add non_public parameter. Calculate it.
2638 (ptmd_initializer): Likewise.
2639 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
2640 (create_real_tinfo_var): Add non_public parameter. Use it.
2641 Push proxy into global namespace.
2642 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
2644 * inc/typeinfo (type_info::before, type_info::operator==):
2645 Compare __name addresses.
2647 * tinfo2.cc: Remove new-abi builtins comment.
2649 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
2651 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
2653 * call.c (joust): Exit early if we get the same function, too.
2655 * decl2.c (key_method): Return NULL_TREE for template classes.
2656 (import_export_class): Don't need to check for template classes.
2658 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
2660 * lex.c: Remove references to cccp.c.
2662 2000-04-18 Mark Mitchell <mark@codesourcery.com>
2664 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
2665 volatile_memfunc. Add destructor_attr. Adjust dummy.
2666 (DECL_DESTRUCTOR_P): Use destructor_attr.
2667 (DECL_CONST_MEMFUNC_P): Reimplement.
2668 (DECL_VOLATILE_MEMFUNC_P): Remove.
2669 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
2670 (overrides): Use DECL_DESTRUCTOR_P.
2671 (check_for_override): Likewise.
2672 * decl.c (start_function): Likewise.
2673 * decl2.c (grokfclassfn): Likewise.
2674 (check_classfn): Likewise.
2675 (grok_function_init): Likewise.
2677 2000-04-17 Mark Mitchell <mark@codesourcery.com>
2679 * decl2.c (grokfield): Issue error on illegal data member
2682 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
2684 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
2686 2000-04-16 Mark Mitchell <mark@codesourcery.com>
2688 * class.c (build_vtable_entry): Don't build thunks for type-info
2691 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
2693 * decl.c (decls_match): Allow a redeclaration of a builtin to
2694 specify args while the builtin did not.
2696 2000-04-15 Mark Mitchell <mark@codesourcery.com>
2698 * cp-tree.def (THUNK_DECL): Add to documentation.
2699 * cp-tree.h (flag_huge_objects): Declare.
2700 * class.c (modify_vtable_entry): Tidy.
2701 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
2702 Calculate delta appropriately for the new ABI.
2703 (dfs_modify_vtables): Use it.
2704 (modify_all_vtables): Fix thinko in code to add overriding copies
2705 of functions to primary vtables.
2706 (build_clone): Fix typo in comment.
2707 (clone_function_decl): Correct order of destructors in vtable.
2708 (build_vbase_offset_vtbl_entries): Adjust comment.
2709 (dfs_vcall_offset_queue_p): Remove.
2710 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
2711 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
2712 (build_vtable_entry): Correct check for pure virtual functions.
2713 Don't declare flag_huge_objects.
2714 * decl.c (flag_huge_objects): Remove declaration.
2715 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
2716 Use int_size_in_bytes.
2717 (emit_thunk): Handle vcall offset thunks.
2719 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2721 * decl2.c (parse_time, varconst_time): Delete declarations.
2722 (finish_file): Delete LINENO declaration.
2723 START_TIME and THIS_TIME now long.
2725 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
2727 * class.c (build_base_field): Reformat comment.
2729 * inc/cxxabi.h (stddef.h): Comment inclusion.
2730 (__base_class_info::__offset): Comment shift.
2732 2000-04-12 Mark Mitchell <mark@codesourcery.com>
2734 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
2735 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
2736 (cp_push_exception_identifier): New macro.
2737 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
2738 (DECL_BASE_DESTRUCTOR_P): Likewise.
2739 (DECL_DELETING_DESTRUCTOR_P): Likewise.
2740 (get_vtbl_decl_for_binfo): Fix formatting.
2741 (in_charge_arg_for_name): New macro.
2742 (maybe_build_cleanup_and_delete): Remove declaration.
2743 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
2744 (in_charge_arg_for_name): New function.
2745 (build_new_method_call): Use it. Handle cloned destructors.
2746 (build_clone): Don't make the base constructor virtual.
2747 Automatically defer generated functions.
2748 (clone_function_decl): Handle destructors, too.
2749 (clone_constructors_and_destructors): Likewise.
2750 (create_vtable_ptr): Don't create a vtable entry for a cloned
2752 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
2753 (initialize_predefined_identifiers): Update appropriately.
2754 (finish_destructor_body): Simplify.
2755 (maybe_build_cleanup_and_delete): Remove.
2756 * except.c (expand_throw): Handle new-ABI destructors.
2757 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
2758 (build_dtor_call): New function.
2759 (build_delete): Use it. Simplify.
2760 * optimize.c (maybe_clone_body): Handle destructors.
2761 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
2763 * exception.cc (cleanup_fn): New typedef.
2764 (CALL_CLEANUP): New macro.
2765 (cp_eh_info): Use them.
2766 (__cp_push_exception): Likewise.
2767 (__cp_pop_exception): Likewise.
2769 2000-04-11 Mark Mitchell <mark@codesourcery.com>
2771 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
2772 (complete_dtor_identifier): New macro.
2773 (CLASSTYPE_FIRST_CONVERSION): Remove.
2774 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
2775 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
2776 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
2777 (CLASSTYPE_CONSTRUCTORS): Likewise.
2778 (CLASSTYPE_DESTRUCTORS): Likewise.
2779 (lang_decl): Add cloned_function.
2780 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
2781 (DECL_BASE_CONSTRUCTOR_P): Likewise.
2782 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
2783 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
2784 (DECL_CLONED_FUNCTION_P): Likewise.
2785 (DECL_CLONED_FUNCTION): Likewise.
2786 (clone_function_decl): Declare.
2787 (maybe_clone_body): Likewise.
2788 * call.c (build_user_type_conversion_1): Call complete object
2789 constructors in the new ABI.
2790 (build_new_method_call): Don't add in-charge parameters under the
2792 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
2793 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
2794 CLASSTYPE_DESTRUCTOR_SLOT.
2795 (build_clone): New function.
2796 (clone_function_decl): Likewise.
2797 (clone_constructors_and_destructors): Likewise.
2798 (check_bases_and_members): Use it.
2799 * decl.c (iniitialize_predefined_identifiers): Initialize
2800 complete_dtor_identifier.
2801 (finish_function): Don't add extra code to a clone.
2802 (lang_mark_tree): Mark cloned_function.
2803 * decl2.c (mark_used): Don't bother trying to instantiate things
2805 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
2806 * method.c (set_mangled_name_for_decl): Don't treat clones as
2808 (synthesize_method): Sythesize cloned functions, not the clones.
2809 * optimize.c (inline_data): Update comment on ret_label.
2810 (remap_block): Don't assume DECL_INITIAL exists.
2811 (copy_body_r): Allow ret_label to be NULL.
2812 (maybe_clone_body): Define.
2813 * pt.c (tsubst_decl): Handle clones.
2814 (instantiate_clone): New function.
2815 (instantiate_template): Use it.
2816 (set_mangled_name_for_template_decl): Don't treat clones as
2818 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
2819 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
2820 * semantics.c (expand_body): Clone function bodies as necessary.
2822 * optimize.c (remap_decl): Avoid sharing structure for arrays
2823 whose size is only known at run-time.
2824 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
2826 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
2827 to has_in_charge_parm_p.
2828 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
2829 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
2830 (DECL_COPY_CONSTRUCTOR_P): New macro.
2831 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
2832 (build_user_type_conversion_1): Likewise.
2833 (convert_like_real): Likewise.
2834 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
2835 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
2836 (copy_args_p): Likewise.
2837 (grok_ctor_properties): Likewise.
2838 (start_function): Likewise.
2839 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
2840 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
2841 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
2842 * method.c (do_build_copy_constructor): Use
2843 DECL_HAS_IN_CHARGE_PARM_P.
2844 (synthesize_method): Likewise.
2845 * pt.c (instantiate_template): Remove goto.
2846 * tree.c (build_cplus_method_type): Remove mention of obstacks in
2849 * cp-tre.h (finish_function): Change prototype.
2850 * decl.c (end_cleanup_fn): Adjust caller.
2851 (finish_function): Take only one parameter.
2852 * decl2.c (finish_objects): Adjust caller.
2853 (finish_static_storage_duration_function): Likewise.
2854 * method.c (emit_thunk): Likewise.
2855 * parse.y: Likewise.
2856 * parse.c: Regenerated.
2857 * pt.c (instantiate_decl): Likewise.
2858 * rtti.c (synthesize_tinfo_fn): Likewise.
2859 * semantics.c (expand_body): Likewise.
2861 * cp-tree.h (copy_decl): New function.
2862 * class.c (finish_struct_1): Use it.
2863 * lex.c (copy_decl): Define it.
2864 * pt.c (tsubst_decl): Likewise.
2865 * tree.c (copy_template_template_parm): Likewise.
2867 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
2868 has_nonpublic_assign_ref.
2869 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
2870 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
2871 * class.c (finish_struct_methods): Don't set
2872 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
2873 (interface_only): Don't declare.
2874 (interface_unknown): Likewise.
2876 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2878 * tree.h (HAVE_TEMPLATES): Remove definition.
2879 * lang-options.h (-fthis-is-variable): Remove documentation.
2881 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
2883 * class.c (instantiate_type): Handle object-relative template-id.
2885 * semantics.c (finish_expr_stmt): Call convert_to_void here.
2886 * decl.c (cplus_expand_expr_stmt): Not here.
2888 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
2889 Initialize exprtype earlier.
2891 * parse.y (fn.def1): Check for defining types in return types.
2893 * decl.c (check_tag_decl): Notice extra fundamental types.
2894 Diagnose empty decls in classes, too.
2896 * decl.c (grokdeclarator): Don't override an anonymous name if no
2897 declarator was given.
2899 * cvt.c (convert_to_void): Call resolve_offset_ref.
2901 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
2903 * decl2.c (decl_namespace): Handle getting a type.
2905 * typeck.c (build_c_cast): Re-enable warning for cast between
2906 pointer and integer of different size.
2908 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
2910 * inc/cxxabi.h (__pointer_type_info): Add restrict and
2912 (__pointer_type_info::__pointer_catch): New virtual function.
2913 (__pointer_to_member_type_info): Derive from
2914 __pointer_type_info. Adjust.
2915 (__pointer_to_member_type_info::__do_catch): Remove.
2916 (__pointer_to_member_type_info::__is_pointer_p): Declare.
2917 (__pointer_to_member_type_info::__pointer_catch): Declare.
2918 * rtti.c (qualifier_flags): Add restrict flag.
2919 (ptmd_initializer): Reorder members.
2920 (create_tinfo_types): Expand comments. Reorder
2921 ptmd_desc_type_node members.
2922 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
2924 (__pointer_type_info::__do_catch): Move specific code into
2925 __pointer_catch. Call it.
2926 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
2927 specific catch checking. Fix void conversion check.
2928 (__pointer_to_member_type_info::__do_catch): Remove.
2929 (__pointer_to_member_type_info::__pointer_catch): Implement.
2931 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2933 * lex.c (init_parse): Remove traces of classof and headof.
2934 * decl2.c (flag_operator_names): Default to 1.
2935 (lang_decode_option): Do not set it for -ansi.
2937 2000-04-09 Mark Mitchell <mark@codesourcery.com>
2939 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
2940 (DECL_MAIN_VARIANT): Remove.
2941 * decl.c (duplicate_decls): Don't set it.
2942 (start_function): Likewise.
2943 (lang_mark_tree): Don't mark it.
2944 * decl2.c (defer_fn): Don't use it.
2945 * lex.c (retrofit_lang_decl): Don't set it.
2946 * pt.c (tsubst_decl): Likewise.
2947 * ptree.c (print_lang_decl): Don't print it.
2948 * typeck.c (mark_addressable): Don't use it.
2950 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
2952 * vec.cc: Include <new> and <exception>.
2953 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
2954 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
2956 (__cxa_vec_delete): Catch dtor exceptions.
2958 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
2960 Prepend __ to implementation defined names.
2961 * inc/typeinfo (type_info): Rename _name to __name.
2962 (type_info::type_info): Rename parameter.
2963 (type_info::operator==, type_info::operator!=,
2964 type_info::before): Likewise.
2965 (type_info::is_pointer_p, type_info::is_function_p,
2966 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
2969 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
2970 (__pointer_type_info::__pointer_type_info): Likewise.
2971 (__pointer_type_info::is_pointer_p,
2972 __pointer_type_info::do_catch): Prepend __. Rename parameters.
2973 (__array_type_info::__array_type_info): Rename parameters.
2974 (__function_type_info::__function_type_info): Likewise.
2975 (__function_type_info::is_function_p): Prepend __.
2976 (__enum_type_info::__enum_type_info): Rename parameters.
2977 (__pointer_to_member_type_info::__pointer_to_member_type_info):
2979 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
2981 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
2982 (__class_type_info::__class_type_info): Rename parameters.
2983 (__class_type_info::sub_kind): Prepend __. Adjust member names.
2984 (__class_type_info::upcast_result,
2985 __class_type_info::dyncast_result): Prepend __. Move definition
2987 (__class_type_info::do_upcast, __class_type_info::do_catch,
2988 __class_type_info::find_public_src,
2989 __class_type_info::do_dyncast,
2990 __class_type_info::do_find_public_src): Prepend __. Rename
2992 (__si_class_type_info::__si_class_type_info): Rename parameters.
2993 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
2994 __si_class_type_info::do_find_public_src): Prepent __. Rename
2996 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
2997 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
2998 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
3000 (__dynamic_cast): Rename parameters.
3001 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
3002 type_info::do_catch, type_info::do_upcast): Prepend __.
3003 (contained_p, public_p, virtual_p, contained_public_p,
3004 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
3005 (__class_type_info::do_catch,
3006 __class_type_info::do_upcast): Prepend __. Adjust.
3007 (__class_type_info::__upcast_result,
3008 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
3010 (__class_type_info::find_public_src): Prepend __. Adjust.
3011 (__class_type_info::do_find_public_src,
3012 __si_class_type_info::do_find_public_src,
3013 __vmi_class_type_info::do_find_public_src): Likewise.
3014 (__class_type_info::do_dyncast,
3015 __si_class_type_info::do_dyncast,
3016 __vmi_class_type_info::do_dyncast): Likewise.
3017 (__class_type_info::do_upcast,
3018 __si_class_type_info::do_upcast,
3019 __vmi_class_type_info::do_upcast): Likewise.
3020 (__dynamic_cast): Adjust.
3021 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
3022 (__function_type_info::is_function_p): Likewise.
3023 (__pointer_type_info::do_catch): Likewise. Adjust.
3024 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
3025 (__throw_type_match_rtti_2): Adjust.
3026 (__is_pointer): Adjust.
3028 2000-04-08 Mark Mitchell <mark@codesourcery.com>
3030 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
3031 (complete_ctor_identifier): New macro.
3032 (special_function_kind): Add sfk_copy_constructor and
3033 sfk_assignment_operator.
3034 (LOOKUP_HAS_IN_CHARGE): Remove.
3035 (cons_up_default_function): Rename to ...
3036 (implicitly_declare_fn): ... this.
3037 * call.c (build_new_method_call): Add in-charge parameters for
3039 * class.c (add_implicitly_declared_members): Change parameter name
3040 from cant_have_assignment to cant_have_const_assignment.
3041 Replace calls to cons_up_default_function to implicitly_declare_fn.
3042 * cvt.c (ocp_convert): Use complete_ctor_identifier.
3043 * decl.c (initialize_predefined_identifiers): Initialize it.
3044 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
3046 * init.c (expand_default_init): Don't calculate the in-charge
3048 (build_new_1): Likewise.
3049 * lex.c (cons_up_default_function): Move to method.c.
3050 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
3051 (implicitly_declare_fn): New function.
3052 * typeck.c (build_static_cast): Use complete_ctor_identifier.
3053 (build_modify_expr): Likewise.
3054 * typeck2.c (build_functional_cast): Likewise.
3056 Under the new ABI, constructors don't return `this'.
3057 * cp-tree.h (warn_reorder): Declare.
3058 (special_function_kind): New enum.
3059 (global_base_init_list): Remove declaration.
3060 (emit_base_init): Don't return a value.
3061 (check_base_init): Don't declare.
3062 (is_aggr_typedef): Likewise.
3063 * decl.c (check_special_function_return_type): New function.
3064 (return_types): Remove.
3065 (grokdeclarator): Use check_special_function_return_type.
3066 (start_function): Don't initialize ctor_label under the new ABI.
3067 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
3068 * init.c (begin_init_stmts): Move to top of file.
3069 (finish_init_stmts): Likewise.
3070 (warn_reorder): Don't declare.
3071 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
3073 (check_base_init): Remove.
3074 (is_aggr_typedef): Likewise.
3075 (build_new_1): Don't use the return value of a constructor.
3076 * semantics.c (setup_vtbl_ptr): Don't use the return value
3078 * typeck.c (check_return_expr): Don't magically convert return
3079 statements into `return this' in constructors under the new ABI.
3081 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
3082 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
3083 (base_ctor_identifier): New macro.
3084 (base_dtor_identifier): Likewise.
3085 (deleting_dtor_identifier): Likewise.
3086 * decl.c: Don't include obstack.h.
3087 (obstack_chunk_alloc): Don't define.
3088 (obstack_chunk_free): Likewise.
3089 (struct predefined_identifier): New type.
3090 (initialize_predefined_identifiers): New function.
3091 (init_decl_processing): Use it.
3092 (debug_temp_inits): Remove.
3093 (start_method): Don't call preserve_data.
3094 (hack_incomplete_structures): Update comment.
3095 * init.c (init_init_processing): Don't initialize
3097 (build_offset_rf): Remove dead code.
3098 (build_delete): Use CLASSTYPE_N_BASECLASSES.
3099 * search.c (init_search_processing): Don't initialize
3102 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3104 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
3105 some sign_compare warnings.
3107 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
3109 Rename abi::__vmi_class_type_info members.
3110 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
3111 base_list, detail_masks members to vmi_flags, vmi_base_count,
3112 vmi_bases and vmi_flags_masks respectively.
3113 (__vmi_class_type_info::vmi_flags_masks): Rename
3114 details_unknown_mask to flags_unknown_mask.
3115 * tinfo.cc (__class_type_info::do_upcast): Adjust.
3116 (__vmi_class_type_info::do_find_public_src): Adjust.
3117 (__vmi_class_type_info::do_dyncast): Adjust.
3118 (__vmi_class_type_info::do_upcast): Adjust.
3120 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
3122 * tinfo.cc (convert_to_base): New function.
3123 (get_vbase_offset): Remove. Move into convert_to_base.
3124 (__vmi_class_type_info::do_find_public_src): Adjust.
3125 (__vmi_class_type_info::do_dyncast): Adjust.
3126 (__vmi_class_type_info::do_upcast): Adjust.
3128 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
3130 * tinfo.cc (operator=): Use __builtin_strcmp.
3131 * tinfo2.cc (before): Likewise.
3133 2000-04-06 Mark Mitchell <mark@codesourcery.com>
3135 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
3136 (DECL_SAVED_INLINE): Rename to ...
3137 (DECL_DEFERRED_FN): ... this.
3138 (in_function_p): Remove declaration.
3139 (mark_inline_for_output): Rename to ...
3140 (defer_fn): ... this.
3141 * decl.c (finish_function): Adjust call to mark_inline_for_output.
3142 (in_function_p): Remove definition.
3143 * decl2.c (saved_inlines): Rename to ...
3144 (deferred_fns): ... this.
3145 (saved_inlines_used): Rename to ...
3146 (deferred_fns_used): ... this.
3147 (mark_inline_for_output): Rename to ...
3148 (defer_fn): ... this.
3149 (finish_file): Adjust accordingly.
3150 (init_decl2): Likewise.
3151 * lex.c (cons_up_default_function): Likewise.
3152 * pt.c (mark_decl_instantiated): Likewise.
3153 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
3155 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
3156 * semantics.c (expand_body): Defer more functions.
3158 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
3161 * Make-lang.in (CXX_LIB2FUNCS): Add it.
3163 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
3164 __cxa_vec_delete): Declare.
3166 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
3168 * rtti.c (dfs_class_hint_mark): New static function.
3169 (dfs_class_hint_unmark): New static function.
3170 (class_hint_flags): Use them.
3172 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
3174 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
3176 2000-04-05 Mark Mitchell <mark@codesourcery.com>
3178 * cp-tree.h (instantiate_decl): Change prototype.
3179 * decl2.c (mark_used): Adjust call.
3180 * optimize.c (inlinable_function_p): Adjust handling of templates.
3181 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
3182 (do_type_instantiation): Likewise.
3183 (instantiate_decl): Defer more templates.
3184 (instantiate_pending_templates): Adjust logic to handle inline
3187 * Makefile.in (GGC_H): New variable. Use it throughout in place
3190 * call.c: Don't include obstack.h. Include ggc.h.
3191 (obstack_chunk_alloc): Don't define.
3192 (obstack_chunk_free): Likewise.
3193 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
3194 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
3195 (pop_switch): Free it.
3197 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
3199 * dump.c (dequeue_and_dump): Don't try to print the bit_position
3200 if we don't have a DECL_FIELD_OFFSET.
3202 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
3204 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
3207 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3209 * cfns.gperf (hash, libc_name_p): Prototype.
3211 * rtti.c (build_dynamic_cast_1): Constification.
3213 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
3215 * semantics.c (deferred_type_access_control): Prototype.
3217 2000-04-04 Mark Mitchell <mark@codesourcery.com>
3219 Correct many new ABI issues regarding vbase and vcall offset
3221 * cp-tree.h (BINFO_VTABLE): Document.
3222 (struct lang_type): Tweak formatting.
3223 (BINFO_PRIMARY_BINFO): Add to documentation.
3224 (CLASSTYPE_VSIZE): Fix typo in comment.
3225 (CLASSTYPE_VBASECLASSES): Update documentation.
3226 (BINFO_VBASE_MARKED): Remove.
3227 (SET_BINFO_VBASE_MARKED): Likewise.
3228 (CLEAR_BINFO_VBASE_MARKED): Likewise.
3229 (BINFO_FIELDS_MARKED): Remove.
3230 (SET_BINFO_FIELDS_MARKED): Likewise.
3231 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
3232 (enum access_kind): New enumeration.
3233 (num_extra_vtbl_entries): Remove declaration.
3234 (size_extra_vtbl_entries): Likewise.
3235 (get_vtbl_decl_for_binfo): New function.
3236 (dfs_vbase_unmark): Remove declaration.
3237 (mark_primary_bases): Likewise.
3238 * class.c (SAME_FN): Remove.
3239 (struct vcall_offset_data_s): Move definition.
3240 (build_vbase_pointer): Use `build', not `build_binary_op', to
3241 access the vbase pointer under the new ABI.
3242 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
3243 (build_primary_vtable): Likewise.
3244 (dfs_mark_primary_bases): Move here from search.c.
3245 (mark_primary_bases): Likewise.
3246 (determine_primary_bases): Under the new ABI, don't make a base
3247 class a primary base just because we don't yet have any virtual
3249 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
3250 (num_vfun_entries): Remove.
3251 (dfs_count_virtuals): Likewise.
3252 (num_extra_vtbl_entries): Likewise.
3253 (size_extra_vtbl_entries): Likewise.
3254 (layout_virtual_bases): Iterate in inheritance graph order under
3256 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
3257 indicate that a vfield is present.
3258 (init_class_processing): Initialize access_public_node, etc., from
3260 (get_vtbl_decl_for_binfo): New function.
3261 (dump_class_hierarchy_r): Likewise.
3262 (dump_class_hierarchy): Use it.
3263 (finish_vtbls): Build the vtbls in inheritance graph order.
3264 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
3265 (initialize_vtable): Use get_vtbl_decl_for_binfo.
3266 (accumulate_vtbl_inits): Add comments explaining why a pre-order
3268 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
3269 where the vptr points, even for primary vtables.
3270 (build_vtbl_initializer): Adjust handling of vbase and vcall
3272 (build_vcall_and_vbase_vtable_entries): New function.
3273 (dfs_build_vbase_offset_vtbl_entries): Remove.
3274 (build_vbase_offset_vtbl_entries): Reimplement.
3275 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
3276 were already handled in a primary base class vtable.
3277 (build_vcall_offset_vtbl_entries): Adjust.
3278 (build_rtti_vtbl_entries): Adjust.
3279 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
3280 * init.c (expand_virtual_init): Simplify.
3281 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
3282 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
3283 * search.c (BINFO_ACCESS): New macro.
3284 (SET_BINFO_ACCESS): Likewise.
3285 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
3286 (access_in_type): Likewise.
3287 (dfs_accessible_p): Likewise.
3288 (protected_accessible_p): Likewise.
3289 (lookup_fnfields_1): Adjust documentation.
3290 (dfs_mark_primary_bases): Move to class.c
3291 (mark_primary_bases): Likewise.
3292 (dfs_vbase_unmark): Remove.
3293 (virtual_context): Use BINFO_FOR_VBASE.
3294 (dfs_get_vbase_types): Simplify.
3295 (dfs_build_inheritance_graph_order): New function.
3296 (get_vbase_types): Use it.
3297 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
3299 * tinfo.cc (get_vbase_offset): New function.
3300 (__vmi_class_type_info::do_find_public_src): Use it.
3301 (__vmi_class_type_info::do_dyncast): Likewise.
3302 (__vmi_class_type_info::do_upcast): Likewise.
3304 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
3306 * lang-specs.h: Pass -fno-show-column to the preprocessor.
3308 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
3310 * rtti.c (class_hint_flags): Rename flags.
3311 (class_initializer): Remove flags.
3312 (synthesize_tinfo_var): Combine offset and flags. Add flags
3313 for __vmi_class_type_info.
3314 (create_tinfo_types): Remove flags from __class_type_info and
3315 __si_class_type_info. Merge flags and offset from
3316 base_class_type_info.
3317 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
3318 (__base_class_info::is_virtual_p): Adjust.
3319 (__base_class_info::is_public_p): Adjust.
3320 (__base_class_info::offset): New accessor.
3321 (__class_type_info::details): Remove member.
3322 (__class_type_info::__class_type_info): Lose details.
3323 (__class_type_info::detail_masks): Remove.
3324 (__si_class_type_info::__si_class_type_info): Lose details.
3325 (__vmi_class_type_info::details): New member.
3326 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
3327 (__vmi_class_type_info::detail_masks): New member.
3328 * tinfo.cc (__class_type_info::do_upcast): Initialize result
3329 with unknown_details_mask.
3330 (__vmi_class_type_info::do_find_public_src): Adjust
3331 (__vmi_class_type_info::do_dyncast): Adjust.
3332 (__vmi_class_type_info::do_upcast): Set result details, if
3334 (__dynamic_cast): Temporarily #if out optimization.
3336 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
3338 * rtti.c (get_tinfo_decl): Mark used.
3339 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
3340 mark as dealt with, if we output it.
3342 2000-03-28 Mark Mitchell <mark@codesourcery.com>
3344 * class.c: Reorganize to put virtual function table initialization
3345 machinery at the end of the file.
3347 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
3349 * class.c (finish_struct): Use bitsize_zero_node.
3350 * pt.c (instantiate_class_template): Likewise.
3352 2000-03-28 Mark Mitchell <mark@codesourcery.com>
3354 Put RTTI entries at negative offsets in new ABI.
3355 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
3356 vbase offset at index -3, not -1.
3357 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
3358 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
3359 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
3360 (build_rtti_vtbl_entries): New function.
3361 (set_rtti_entry): Remove.
3362 (build_primary_vtable): Don't use it.
3363 (build_secondary_vtable): Likewise.
3364 (start_vtable): Remove.
3365 (first_vfun_index): New function.
3366 (set_vindex): Likewise.
3367 (add_virtual_function): Don't call start_vtable. Do call
3369 (set_primary_base): Rename parameter.
3370 (determine_primary_base): Likewise.
3371 (num_vfun_entries): Don't use skip_rtti_stuff.
3372 (num_extra_vtbl_entries): Include RTTI information.
3373 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
3374 (skip_rtti_stuff): Remove.
3375 (dfs_modify_vtables): Don't use it.
3376 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
3377 (layout_nonempty_base_or_field): Update size handling.
3378 (create_vtable_ptr): Tweak.
3379 (layout_class_type): Adjust parameter names.
3380 (finish_struct_1): Simplify.
3381 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
3382 (skip_rtti_stuff): Remove.
3383 (first_vfun_index): New function.
3384 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
3385 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
3386 (marked_vtable_pathp): Declare.
3387 (unmarked_vtable_pathp): Likewise.
3388 * error.c (dump_expr): Use first_vfun_index to calculate vtable
3390 * rtti.c (build_headof): Look for RTTI at negative offsets.
3391 (get_tinfo_decl_dynamic): Likewise.
3392 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
3394 (create_pseudo_type_info): Do it here instead. Adjust so that
3395 vptr points at first virtual function.
3396 * search.c (marked_vtable_pathp): Make it global.
3397 (unmarked_vtable_pathp): Likewise.
3398 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
3399 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
3400 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
3401 (get_pure_virtuals): Likewise.
3402 (expand_upcast_fixups): Likewise.
3403 * tree.c (debug_binfo): Likewise.
3404 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
3407 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3409 * class.c (check_field_decl): Fix typo.
3410 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
3411 (check_methods): Likewise.
3412 (check_field_decls): Likewise.
3413 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
3414 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
3415 Use DECL_RESULT_FLD, not DECL_RESULT.
3416 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
3417 * lex.c (identifier_type): Likewise.
3418 * pt.c (determine_specialization, lookup_template_class): Likewise.
3419 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
3420 (resolve_overloaded_unification, more_specialized): Likewise.
3421 * semantics.c (finish_member_declaration): Likewise.
3422 * typeck.c (build_x_function_call): Likewise.
3424 2000-03-26 Mark Mitchell <mark@codesourcery.com>
3426 * class.c (layout_empty_base): Handle empty bases with non-byte
3428 (build_base_field): Likewise.
3429 (layout_virtual_bases): Likewise.
3431 * class.c (finish_struct_1): Fix typo in this change:
3433 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3435 2000-03-25 Mark Mitchell <mark@codesourcery.com>
3437 * decl.c (grokdeclarator): Count partial specializations when
3438 keeping track of how many template classes have been seen.
3440 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
3442 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3444 * class.c (build_vbase_pointer_fields): layout_field now place_field.
3445 (get_vfield_offset): Use byte_position.
3446 (set_rtti_entry): Set OFFSET to ssizetype zero.
3447 (get_binfo_offset_as_int): Deleted.
3448 (dfs_record_base_offsets): Use tree_low_cst.
3449 (dfs_search_base_offsets): Likewise.
3450 (layout_nonempty_base_or_field): Reflect changes in RLI format
3451 and call byte_position.
3452 (layout_empty_base): Convert offset to ssizetype.
3453 (build_base_field): use rli_size_unit_so_far.
3454 (dfs_propagate_binfo_offsets): Do computation in proper type.
3455 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
3456 (layout_class_type): Reflect changes in RLI names and fields.
3457 (finish_struct_1): Set DECL_FIELD_OFFSET.
3458 * dump.c (dequeue_and_dump): Call bit_position.
3459 * expr.c (cplus_expand_constant): Use byte_position.
3460 * rtti.c (expand_class_desc): Use bitsize_one_node.
3461 * typeck.c (build_component_addr): Use byte_position and don't
3462 special case for zero offset.
3464 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
3466 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
3468 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
3470 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
3473 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3475 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
3477 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
3478 make_typename_type, check_initializer, cp_finish_decl,
3479 xref_tag): Likewise.
3480 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
3481 decl_namespace, arg_assoc_template_arg, arg_assoc,
3482 validate_nonmember_using_decl, do_class_using_decl): Likewise.
3483 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
3484 args_to_string): Likewise.
3485 * friend.c (is_friend): Likewise.
3486 * lex.c (note_got_semicolon, note_list_got_semicolon,
3487 is_global): Likewise.
3488 * method.c (build_overload_nested_name, build_overload_value,
3489 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
3490 * parse.y (typename_sub, typename_sub1): Likewise.
3491 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
3492 process_partial_specialization, convert_template_argument,
3493 template_args_equal, add_pending_template, lookup_template_class,
3494 for_each_template_parm_r, maybe_fold_nontype_arg,
3495 tsubst, instantiate_template, type_unification_real, unify,
3496 instantiate_pending_templates, set_mangled_name_for_template_decl):
3498 * repo.c (repo_get_id, repo_template_used): Likewise.
3499 * search.c (lookup_field_1): Likewise.
3500 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
3501 * xref.c (classname): Likewise.
3503 2000-03-22 Mark Mitchell <mark@codesourcery.com>
3505 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
3506 (CANONICAL_BINFO): New macro.
3507 (BINFO_NEW_VTABLE_MARKED): Use it.
3508 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
3509 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
3510 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
3512 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3513 (build_secondary_vtable): Likewise.
3514 (dfs_finish_vtbls): Likewise.
3515 (dfs_accumulate_vtbl_inits): Likewise.
3516 (accumulate_vtbl_inits): New function.
3517 (finish_vtbls): Make sure that virtual bases come after
3518 non-virtual bases in the vtable group.
3519 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
3520 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3521 * search.c (struct vbase_info): Move definition.
3522 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3523 (unmarked_new_vtable_p): Likewise.
3524 (dfs_mark_vtable_path): Remove.
3525 (dfs_mark_new_vtable): Remove.
3526 (dfs_unmark_new_vtable): Likewise.
3527 (dfs_clear_search_slot): Likewise.
3528 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3529 (dfs_clear_vbase_slots): Likewise.
3530 (init_vbase_pointers): LIkewise.
3532 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
3534 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
3535 SIZETYPE to a non-SIZETYPE.
3537 2000-03-21 Mark Mitchell <mark@codesourcery.com>
3539 * class.c (layout_virtual_bases): Adjust names in conditionally
3542 * class.c (record_base_offsets): New function.
3543 (layout_conflict_p): Likewise.
3544 (layout_nonempty_base_or_field): Use it.
3545 (layout_empty_base): New function.
3546 (build_base_field): Use it.
3547 (build_base_fields): Update comment.
3548 (layout_virtual_bases): Fold in a little code form
3549 layout_basetypes. Use layout_empty_base.
3550 (layout_basetypes): Remove.
3551 (end_of_class): New function.
3552 (layout_class_type): Use it. Adjust.
3554 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
3556 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
3558 (dfs_skip_nonprimary_vbases_markedp): Likewise.
3559 * typeck.c (fntype_p): Remove.
3561 * cp-tree.h (TI_SPEC_INFO): Remove.
3562 (CLASSTYPE_TI_SPEC_INFO): Likewise.
3563 * pt.c (process_partial_specialization): Likewise.
3565 * class.c (build_base_field): Fix thinko in computation of binfo
3568 * tree.c (mark_local_for_remap_p): Mark variables declared in
3569 TARGET_EXPRs as well.
3571 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
3573 * typeck.c (require_complete_type, complete_type,
3574 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
3575 build_array_ref, convert_arguments, pointer_diff,
3576 build_x_unary_op, build_unary_op, build_c_cast,
3577 build_modify_expr): Use COMPLETE_TYPE_P etc.
3578 * call.c (is_complete, convert_like_real,
3579 build_new_method_call): Likewise.
3580 * class.c (build_vbase_pointer_fields, check_bases,
3581 build_base_field, finish_struct_1, pushclass): Likewise.
3582 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
3583 * decl.c (maybe_process_template_type_declaration, pushtag,
3584 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
3585 layout_var_decl, check_initializer, cp_finish_decl,
3586 grokdeclarator, require_complete_types_for_parms,
3587 grok_op_properties, xref_tag, xref_basetypes,
3588 check_function_type): Likewise.
3589 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
3590 * friend.c (do_friend): Likewise.
3591 * init.c (build_offset_ref): Likewise.
3592 * parse.y (structsp): Likewise.
3593 * pt.c (maybe_process_partial_specialization,
3594 tsubst_friend_function, instantiate_class_template, tsubst,
3595 do_type_instantiation, instantiate_pending_templates): Likewise.
3596 * repo.c (repo_get_id): Likewise.
3597 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
3598 synthesize_tinfo_var, emit_support_tinfos): Likewise.
3599 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
3600 * semantics.c (begin_class_definition): Likewise.
3601 * tree.c (build_cplus_method_type): Likewise.
3602 * typeck2.c (digest_init, build_functional_cast,
3603 add_exception_specifier): Likewise.
3604 * parse.h, parse.c: Regenerated.
3606 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
3608 * inc/cxxabi.h: New header file. Define new-abi entry points.
3609 (__pointer_type_info::target): Rename member to ...
3610 (__pointer_type_info::type): ... here.
3611 (__base_class_info::type): Rename member to ...
3612 (__base_class_info::base): ... here.
3613 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
3614 * cp-tree.h (CPTI_ABI): New global tree enumeration.
3615 (abi_node): New global tree node.
3616 * decl.c (abi_node): Document.
3617 (init_decl_processing): Initialize abi_node.
3618 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
3619 (get_vmi_pseudo_type_info): Likewise.
3620 (create_tinfo_types): Likewise.
3621 (emit_support_tinfos): Likewise.
3622 * tinfo.h (cxxabi.h): Include for new-abi.
3623 Move rtti class definitions to new header file.
3624 * tinfo.cc (abi): Use the namespace.
3625 (std): Move new abi rtti classes from here ...
3626 (__cxxabiv1): ... to here.
3627 * tinfo2.cc (cxxabi.h): Include for new-abi.
3628 Move rtti class definitions to new header file.
3629 (std): Move new abi rtti classes from here ...
3630 (__cxxabiv1): ... to here.
3631 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
3634 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
3635 Jason Merrill <jason@casey.cygnus.com>
3637 * method.c (build_overload_int): Use host_integerp.
3639 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3641 * init.c (build_offset_ref): Handle the case of a templated member
3644 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3646 * except.c (expand_exception_blocks): Clear catch_clauses_last.
3648 2000-03-18 Mark Mitchell <mark@codesourcery.com>
3650 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
3651 * class.c (check_bitfield_decl): Turn illegal bitfields into
3653 (dfs_propagate_binfo_offsets): Adjust for new size_binop
3655 (dfs_offset_for_unshared_vbases): Likewise.
3656 * cvt.c (cp_convert_to_pointer): Convert NULL to a
3657 pointer-to-member correctly under the new ABI.
3658 * expr.c (cplus_expand_constant): Don't use cp_convert when
3659 turning an offset into a pointer-to-member.
3660 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
3661 when dereferencing them under the new ABI.
3662 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
3663 of pointers-to-members under the new ABI.
3665 * class.c (check_bitfield_decl): Remove restriction on really long
3667 (layout_class_type): Implement new ABI handling of bitfields
3668 longer than their types.
3670 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3672 * parse.y (extdefs): Call ggc_collect.
3673 * parse.c: Regenerated.
3675 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
3677 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
3678 (note_name_declared_in_class): Use OVL_CURRENT to get at a
3681 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3683 * class.c (build_vbase_path): Use integer_zerop.
3684 (build_vtable_entry): Use tree_low_cst.
3685 (get_vfield_offset): Use bit_position.
3686 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
3688 (check_bitfield_decl): Set DECL_SIZE using convert.
3689 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
3690 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
3692 (finish_struct_1): Use bit_position.
3693 (dump_class_hierarchy): Use tree_low_cst.
3694 * cp-tree.h (min_precision): Add declaration.
3695 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
3696 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
3697 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
3698 * expr.c (cplus_expand_constant): Use bit_position.
3699 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
3700 * rtti.c (get_base_offset): Use bit_position.
3701 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
3702 host_integerp, and tree_low_cst.
3703 (pointer_int_sum): Use integer_zerop.
3704 (build_component_addr): Use bit_position.
3706 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
3708 * typeck.c (require_complete_type): Don't assume size_zero_node.
3709 (complete_type_or_else): Likewise.
3711 2000-03-16 Steven Grady <grady@digitaldeck.com>
3712 Jason Merrill <jason@casey.cygnus.com>
3714 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
3716 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
3718 * decl2.c (grokfield): Bail out if type is error_mark_node.
3720 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
3722 * tinfo2.cc (__ptr_to_member_data): Rename to ...
3723 (__pointer_to_member_data): ... here. Adjust.
3724 * rtti.c (create_tinfo_types): Adjust.
3726 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
3728 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
3729 * decl.c (ref_desc_type_node): Undocument.
3730 * rtti.c (ptr_ref_initializer): Rename to ...
3731 (ptr_initializer): ... here. Adjust comments.
3732 (ptmd_initializer): Fix comment thinko.
3733 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
3734 (create_tinfo_types): Remove ref_desc_type_node init.
3735 * tinfo2.cc (__reference_type_info): Remove.
3737 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
3739 * decl.c (cp_finish_decl): Remove obsolete comment.
3741 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
3743 2000-03-14 Mark Mitchell <mark@codesourcery.com>
3745 * cp-tree.h: Tweak documentation.
3746 * class.c (build_vbase_pointer_fields): Layout the fields, too.
3747 (avoid_overlap): Remove.
3748 (get_binfo_offset_as_int): New function.
3749 (dfs_serach_base_offsets): Likewise.
3750 (layout_nonempty_base_or_field): Likewise.
3751 (build_base_field): Layout fields here. Avoid placing two objects
3752 of the same type at the same address, under the new ABI.
3753 (build_base_fields): Adjust accordingly.
3754 (create_vtable_ptr): Return the new field, but don't attach it to
3756 (remove_base_field): Remove.
3757 (remove_base_fields): Remove.
3758 (layout_basetypes): Adjust accordingly.
3759 (layout_class_type): Call layout_field for each field, rather than
3760 just making a wholesale call to layout_type.
3762 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
3764 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
3766 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
3768 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
3770 * except.c (dtor_nothrow): New fn.
3771 (do_pop_exception): Use it. Take type parm.
3772 (push_eh_cleanup): Take type parm.
3773 (expand_start_catch_block): Pass it.
3774 (build_eh_type_type_ref): Accept null type.
3776 2000-03-12 Mark Mitchell <mark@codesourcery.com>
3778 * cp-tree.h (revert_static_member_fn): Change prototype.
3779 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
3780 (grok_op_properties): Likewise.
3781 (start_function): Likewise.
3782 (revert_static_member_fn): Simplify.
3783 * pt.c (check_explicit_specialization): Adjust call to
3784 revert_static_member_fn.
3786 2000-03-11 Mark Mitchell <mark@codesourcery.com>
3788 * cp-tree.h (scope_kind): New type.
3789 (tmpl_spec_kind): Likewise.
3790 (declare_pseudo_global_level): Remove.
3791 (pseudo_global_level_p): Rename to template_parm_scope_p.
3792 (pushlevel): Remove declaration.
3793 (begin_scope): New function.
3794 (finish_scope): Likewise.
3795 (current_tmpl_spec_kind): Likewise.
3796 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
3797 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
3798 Add template_spec_p.
3799 (toplevel_bindings_p): Adjust.
3800 (declare_pseudo_global_level): Remove.
3801 (pseudo_global_level_p): Rename to template_parm_scope_p.
3802 (current_tmpl_spec_kind): New function.
3803 (begin_scope): Likewise.
3804 (finish_scope): Likewise.
3805 (maybe_push_to_top_level): Adjust.
3806 (maybe_process_template_type_declaration): Likewise.
3807 (pushtag): Likewise.
3808 (pushdecl_nonclass_level): Likewise.
3809 (lookup_tag): Likewise.
3810 (grokfndecl): Handle member template specializations. Share
3811 constructor and non-constructor code.
3812 * decl2.c (check_classfn): Handle member template specializations.
3813 * pt.c (begin_template_parm_list): Use begin_scope.
3814 (begin_specialization): Likewise.
3815 (end_specialization): Likewise.
3816 (check_explicit_specialization): Use current_tmpl_spec_kind.
3817 Handle member template specializations.
3818 (end_template_decl): Use finish_scope. Remove call to
3820 (push_template_decl_real): Remove bogus error message.
3821 (tsubst_decl): Fix typo in code contained in comment.
3822 (instantiate_template): Handle member template specializations.
3823 (most_general_template): Likewise.
3825 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
3827 * lex.c (whitespace_cr): Compress consecutive calls to warning().
3828 (do_identifier): Ditto for error().
3830 * pt.c (convert_nontype_argument): Ditto for cp_error().
3831 (convert_template_argument): Ditto for cp_pedwarn().
3833 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
3835 * exception.cc (__check_null_eh_spec): New fn.
3836 * except.c (expand_end_eh_spec): Call it if the spec is throw().
3838 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
3840 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
3841 * except.c (expand_end_eh_spec): Add the return type.
3842 * rtti.c (throw_bad_cast): Add the parmtypes.
3843 (throw_bad_typeid): Likewise.
3845 * semantics.c (expand_stmt): Only leave out rtl for unused
3846 artificials, and set DECL_IGNORED_P on them as well.
3847 * decl.c (wrapup_globals_for_namespace): Likewise.
3849 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
3851 * decl.c (maybe_commonize_var): Skip all artificial decls.
3852 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
3854 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
3856 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
3857 * cp-tree.h: Declare flag_enforce_eh_specs.
3858 * decl.c (store_parm_decls, finish_function): Check it.
3860 C library functions don't throw.
3861 * Makefile.in (cfns.h): New target.
3862 (except.o): Depend on it.
3863 * Make-lang.in (cc1plus): Depend on cfns.gperf.
3864 * cfns.gperf: New file.
3865 * cfns.h: Generated.
3866 * except.c: Include it.
3867 (nothrow_libfn_p): New fn.
3868 * decl.c (grokfndecl): Use it.
3869 * cp-tree.h: Declare it.
3871 * decl.c (push_overloaded_decl_1, auto_function,
3872 define_function): Lose.
3873 (build_library_fn_1): New static fn.
3874 (builtin_function): Use it.
3875 (get_atexit_node): Use build_library_fn_ptr.
3876 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
3877 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
3878 push_void_library_fn, push_throw_library_fn): New fns.
3879 * cp-tree.h: Declare them.
3880 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
3881 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
3882 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
3883 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
3884 * rtti.c (build_runtime_decl): Lose.
3885 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
3886 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
3887 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
3889 * call.c (build_call): Remove result_type parm.
3890 Call mark_used on unused artificial fns.
3891 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
3893 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
3895 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
3897 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
3898 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
3899 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
3900 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
3901 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
3902 expand_generic_desc): Likewise.
3904 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
3906 * exception.cc (__cp_pop_exception): Cleanup the original object.
3908 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
3910 * decl.c (grok_op_properties): Merge conversion to void warning
3911 with other silly op warnings.
3913 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
3915 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
3916 array CONSTRUCTOR elements. Don't use expr_tree_cons.
3918 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
3920 * decl.c (cp_make_fname_decl): New function.
3921 (wrapup_globals_for_namespace): Don't emit unused static vars.
3922 (init_decl_processing): Remove comment about use of
3923 array_domain_type. Set make_fname_decl.
3924 (cp_finish_decl): Remove __FUNCTION__ nadgering.
3925 * semantics.c (begin_compound_stmt): Remove
3926 current_function_name_declared flagging.
3927 (expand_stmt): Don't emit unused local statics.
3928 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
3931 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
3933 * typeck.c (convert_for_assignment): Don't look at array
3935 * call.c (convert_like_real): Likewise.
3937 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
3939 Add initial support for '\uNNNN' specifier.
3940 * lex.c (read_ucs): New fn.
3941 (readescape, skip_white_space): Call it.
3942 (is_extended_char, is_extended_char_1): New fns.
3943 (utf8_extend_token): New fn, #if 0'd out.
3944 (real_yylex): Treat extended chars like letters.
3946 * search.c (note_debug_info_needed): Walk the bases even if we
3947 weren't deferring the type itself.
3949 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3951 * decl2.c (finish_objects): Constify a char*.
3953 * method.c (emit_thunk): Likewise.
3955 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
3957 * typeck.c (dubious_conversion_warnings): Look through
3960 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3962 * class.c (dfs_modify_vtables): I is now unsigned.
3963 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
3964 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
3965 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
3966 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
3967 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
3968 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
3969 Call integer_all_onesp.
3970 * typeck2.c (process_init_constructor): Use compare_tree_int.
3972 * lang-specs.h (as): Don't call if -syntax-only.
3974 2000-03-06 Mark Mitchell <mark@codesourcery.com>
3976 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
3977 RTL_EXPR_HAS_NO_SCOPE after all.
3979 2000-03-05 Mark Mitchell <mark@codesourcery.com>
3981 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
3982 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
3983 RTL_EXPR_HAS_NO_SCOPE.
3985 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
3988 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
3990 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
3992 * call.c (convert_like): Macrofy.
3993 (convert_like_with_context): New macro.
3994 (convert_like_real): Renamed from convert_like. Add calling
3995 context parameters, for diagnostics. Add recursive flag. Call
3996 dubious_conversion_warnings for outer conversion.
3997 (build_user_type_conversion): Use convert_like_with_context.
3998 (build_over_call): Likewise. Don't warn about dubious
3999 conversions here. Adjust convert_default_arg calls.
4000 (convert_default_arg): Add context parameters for diagnostics.
4001 Pass throught to convert_like_with_context.
4002 * cp-tree.h (convert_default_arg): Add context parameters.
4003 (dubious_conversion_warnings): Prototype new function.
4004 * typeck.c (convert_arguments): Adjust convert_default_arg call.
4005 (dubious_conversion_warnings): New function, broken
4006 out of convert_for_assignment.
4007 (convert_for_assignment): Adjust.
4009 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
4011 * decl2.c (key_method): Break out from...
4012 (import_export_vtable, import_export_class): ...here.
4014 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
4015 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
4017 * search.c (note_debug_info_needed, dfs_debug_mark,
4018 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
4019 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
4021 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
4023 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
4026 2000-03-02 Mark Mitchell <mark@codesourcery.com>
4028 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
4029 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
4030 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
4031 (lang_type): Split gets_new into has_new and has_array_new.
4032 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4033 (TYPE_GETS_NEW): Split into ...
4034 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
4035 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
4036 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
4037 (build_op_new_call): Don't declare.
4038 (build_new_1): Likewise.
4039 * call.c (build_op_new_call): Remove.
4040 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4041 instead of TYPE_NEEDS_DESTRUCTOR.
4042 (finish_struct_bits): Likewise.
4043 (add_implicitly_declared_members): Likewise.
4044 (check_field_decl): Likewise.
4045 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
4046 correctly under the new ABI.
4047 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4048 instead of TYPE_NEEDS_DESTRUCTOR.
4049 (initialize_local_var): Likewise.
4050 (destroy_local_var): Likewise.
4051 (cp_finish_decl): Likewise.
4052 (register_dtor_fn): Likewise.
4053 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
4054 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
4055 TYPE_VEC_DELETE_TAKES_SIZE here.
4056 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
4057 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
4058 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4059 (finish_destructor_body): Likewise.
4060 (maybe_build_cleanup_1): Likewise.
4061 * decl2.c (do_static_destruction): Likewise.
4062 * init.c (build_new_1): Make it static.
4063 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4064 (expand_cleanup_for_base): Likewise.
4065 (get_cookie_size): New function.
4066 (build_new_1): Handle array-new cookies correctly under the new
4068 (build_vec_delete_1): Likewise.
4069 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4070 (build_delete): Likewise.
4071 (build_vec_delete): Handle array-new cookies correctly under the new
4073 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4074 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
4075 TYPE_HAS_ARRAY_NEW_OPERATOR.
4076 * ptree.c (print_lang_type): Check them.
4077 * search.c (context_for_name_lookup): Fix typo in comment.
4078 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4079 * tree.c (break_out_cleanups): Likewise.
4080 (build_cplus_array_test_1): Likewise.
4081 (cp_build_qualified_type_real): Likewise.
4082 * typeck.c (complete_type): Likewise.
4084 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
4085 the command-line, not the end.
4087 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
4089 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
4091 2000-03-02 Tom Tromey <tromey@cygnus.com>
4093 * cp-tree.h (build_java_class_ref): Declare.
4094 * init.c (build_java_class_ref): No longer static.
4095 * except.c (expand_throw): Generate a Java-style `throw' if the
4096 thrown object is a "Java" object.
4097 (initialize_handler_parm): Generate a Java-style lookup of
4098 exception info if the caught object is a "Java" object.
4099 (catch_language, catch_language_init): New globals.
4100 (decl_is_java_type): New function.
4101 (expand_start_catch_block): Don't call push_eh_info() or
4102 push_eh_cleanup() when handling a Java-style "catch". Pass Java
4103 class reference to build_catch_block.
4105 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4107 * typeck.c (comptypes): Treat sizetype like its language equivalent.
4109 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
4111 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
4112 to merge reference/pointer code and fix incorrect warnings.
4114 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
4116 * search.c (protected_accessible_p): Use context_for_name_lookup.
4118 * init.c (construct_virtual_bases): Fix thinko.
4119 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
4121 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
4123 * decl.c (current_function_decl): Move to toplev.c.
4125 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
4127 * pt.c (fn_type_unification): Unify return type, whenever
4129 (get_bindings_real): Only pass return type when necessary.
4130 Remove explicit return type check.
4131 * class.c (resolve_address_of_overloaded_function): Pass desired
4132 return type to fn_type_unification.
4134 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4136 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
4138 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
4140 * rtti.c (expand_class_desc): Likewise.
4141 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
4142 (THUNK_VCALL_OFFSET): Likewise.
4143 (THUNK_DELTA): Reflect changes in ../tree.h.
4145 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
4147 * search.c (protected_accessible_p): Also allow the access if
4148 the member is public in DERIVED. Lose TYPE parm.
4149 (friend_accessible_p): Lose TYPE parm.
4150 (accessible_p): Adjust.
4152 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4154 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
4155 on things that are not sizes; ssize_binop deleted.
4156 Call size_diffop when appropriate.
4157 (dfs_build_vcall_offset_vtbl_entries): Likewise.
4158 (build_primary_vtable, build_secondary_vtable): Likewise.
4159 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
4160 Variable I is HOST_WIDE_INT.
4161 (get_vfield_offset): Pass proper types to size_binop.
4162 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
4163 (finish_struct_1): Likewise.
4164 (skip_rtti_stuff): Arg N is now pointer to signed.
4165 (layout_class_type): Use size_zero_node.
4166 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
4167 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
4168 * decl.c (complete_arry_type): Pass proper types to size_binop.
4169 (xref_basetypes): BINFO_OFFSET is sizetype.
4170 * error.c (dump_expr): Don't use size_binop non-sizes.
4171 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
4172 * init.c (construct_virtual_bases): Fix type error.
4173 (build_vec_delete_1): Pass proper type to size_binop and don't
4175 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
4176 * rtti.c (get_base_offset): Pass proper type to size_binop.
4177 * search.c (dfs_find_vbases): Fix type error.
4178 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
4179 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
4180 * tree.c (debug_binfo): Variable N is signed.
4181 Use HOST_WIDE_INT_PRINT_DEC.
4182 * typeck.c (comptypes): sizetype is same as equivalent integer type.
4183 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
4184 size_one_node and size_zero_node.
4185 (c_alignof): Use size_one_node.
4186 (build_component_addr): Pass proper types to size_binop.
4187 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
4189 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
4191 Implement class scope using-declarations for functions.
4192 * class.c (handle_using_decl): Call add_method for used functions.
4193 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
4194 (add_method): Used functions are hidden by local functions.
4195 (check_bases_and_members): Handle using-decls before finalizing
4196 CLASSTYPE_METHOD_VEC.
4197 * call.c (add_function_candidate): Add ctype parm; if non-zero,
4198 override the type of 'this' accordingly.
4199 (add_template_candidate, add_template_candidate_real): Add ctype parm.
4200 (convert_class_to_reference, build_user_type_conversion_1,
4201 build_new_function_call, build_object_call, build_new_op,
4202 build_new_method_call): Pass ctype parm.
4204 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
4206 * call.c (convert_class_to_reference, build_user_type_conversion_1,
4207 build_new_function_call, build_object_call, build_new_op,
4208 build_new_method_call, build_op_delete_call): Don't get basetype_path
4210 * typeck.c (build_component_ref): Likewise.
4211 * init.c (build_offset_ref): Likewise.
4212 (resolve_offset_ref): Don't call enforce_access.
4213 Call build_scoped_ref.
4214 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
4215 would cause an error or if -pedantic.
4216 * class.c (alter_access): Lose binfo parm.
4218 2000-02-26 Mark Mitchell <mark@codesourcery.com>
4220 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
4223 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
4225 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
4226 pseudo_type_info creation into the std namespace
4228 2000-02-26 Mark Mitchell <mark@codesourcery.com>
4230 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
4231 (import_export_class): Remove declaration.
4232 * decl2.c (import_export_class): Make it static.
4233 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
4234 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
4235 EXPR_WITH_FILE_LOCATION.
4236 * lex.c (check_newline): Tweak filename/lineno setting.
4237 * semantics.c (begin_while_stmt): Fix typo in comment.
4239 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4241 * lang-options.h (-fmessage-length=): Add missing option.
4243 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
4245 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
4247 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
4249 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
4251 * optimize.c (expand_call_inline): Emit the return label before
4252 evaluating the return value.
4254 2000-02-24 Mark Mitchell <mark@codesourcery.com>
4256 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
4257 than duplicating functionality here.
4258 * optimize.c: Include input.h.
4259 (expand_call_inline): Use push_srcloc and pop_srcloc.
4260 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
4261 * parse.c: Regenerated.
4262 * Makefile.in (lex.o): Depend on input.h.
4263 (optimize.o): Likewise.
4265 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
4267 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
4268 function type, rather than ICE.
4270 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
4272 * decl.c (grokdeclarator): Call decl_type_access_control.
4273 * parse.y (parse_end_decl): Don't call decl_type_access_control if
4276 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
4278 * decl.c (decls_match): Remove obsolete static member nadgering.
4280 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4282 * decl.c (grokdeclarator): Change ANSI to ISO.
4283 * lex.c (consume_string, readescape, do_identifier): Likewise.
4284 (parse_float, real_yylex): Likewise.
4285 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
4286 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
4287 new_type_id, maybe_label_decls, simple_stmt,
4288 for.init.statement): Likewise.
4289 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
4290 * semantics.c (finish_named_return_value): Likewise.
4291 * parse.c: Regenerate.
4293 2000-02-21 Mark Mitchell <mark@codesourcery.com>
4295 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
4296 (CPTI_CLASS_STAR_TYPE): Remove.
4297 (vtable_index_type): Likewise.
4298 (class_star_type_node): Remove.
4299 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
4300 (build_binary_op_nodefault): Remove.
4301 * call.c (build_new_op): Use build_binary_op instead of
4302 build_binary_op_nodefault.
4303 * decl.c (init_decl_processing): Remove class_star_type_node
4304 initialization. Make delta_type_node ptrdiff_type_node under the
4305 new ABI. Initialize vtable_index_type.
4306 (build_ptrmemfunc_type): Build different structures for the new
4308 (build_enumerator): Use build_binary_op instead of
4309 build_binary_op_nodefault.
4310 * method.c (build_overload_value): Mangle pointers-to-members
4311 appropriately under the new ABI.
4312 * typeck.c (build_array_ref): Use build_binary_op instead of
4313 build_binary_op_nodefault.
4314 (get_member_function_from_ptrfunc): Adjust for the new ABI.
4315 (build_binary_op_nodefault): Rename to ...
4316 (build_binary_op): ... this. Remove old version. Adjust for
4317 pointer-to-member comparisons under the new ABI.
4318 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
4319 (build_ptrmemfunc): Adjust for the new ABI.
4320 (expand_ptrmemfunc_cst): Likewise.
4321 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
4322 (pfn_from_ptrmemfunc): Adjust for the new ABI.
4324 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
4326 * call.c (build_object_call): Compress consecutive calls to
4328 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
4329 (build_op_delete_call): Adjust message formatting.
4331 * class.c (check_bases): Compress consecutive calls to
4333 (finish_struct_anon): Say 'ISO C++'.
4335 * decl.c (start_decl): Same here.
4336 (grok_reference_init): Likewise.
4337 (grokfndecl): Correct message formatting.
4338 (grokfndecl): Improve diagnostic.
4339 (check_static_variable_definition): Likewise. Say 'ISO C++'
4340 (compute_array_index_type): Say 'ISO C++'
4341 (create_array_type_for_decl): Compress consecutive calls to
4343 (grokdeclarator): Say 'ISO C++'
4344 (grok_op_properties): Likewise.
4346 * decl2.c (delete_sanity): Clairify diagnostic.
4347 (check_member_template): Same here.
4348 (grok_function_init): Use consistent terminology.
4350 * expr.c (do_case): Say 'ISO C++'
4352 * friend.c (do_friend): Compress consecutive calls to warning.
4354 2000-02-20 Mark Mitchell <mark@codesourcery.com>
4356 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
4357 * class.c (build_secondary_vtable): Reorganize. Don't create a
4358 new vtable under the new ABI.
4359 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
4361 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
4362 the initializing elements.
4363 (initialize_vtable): New function.
4364 (dfs_finish_vtbls): Use it.
4365 (dfs_accumulate_vtbl_inits): New function.
4366 (finish_vtbls): Merge primary and secondary vtables under the new
4368 (finish_struct_1): Remove redundant call to layout_vtable_decl.
4369 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
4372 * class.c (build_vtable): New function, split out from ...
4373 (get_vtable_decl): ... here, and ...
4374 (build_secondary_vtable): ... here.
4376 * pt.c (tsubst_decl): Fix formatting.
4378 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4380 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
4381 (avoid_overlap, build_base_field): Likewise.
4382 (build_base_field, build_base_fields, is_empty_class):
4383 Test DECL_SIZE with integer_zero.
4384 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
4385 * cp-tree.h (struct lang_type): New field size_unit.
4386 (CLASSTYPE_SIZE_UNIT): New macro.
4387 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
4388 (cp_finish_decl): Delete -Wlarger-than processing.
4389 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
4390 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
4391 * tree.c (make_binfo): binfo vector is one entry longer.
4392 (walk_tree): Walk DECL_SIZE_UNIT.
4394 2000-02-19 Mark Mitchell <mark@codesourcery.com>
4396 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
4398 (build_vtable_entry): Don't assume all vtable entries are
4400 (build_vtbl_initializer): Adjust accordingly.
4401 (get_vtable_decl): Fix formatting.
4403 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
4405 * semantics.c (deferred_type_access_control): Walk the entire
4407 (save_type_access_control): Rename from
4408 initial_deferred_type_access_control. Just remember the value.
4409 (decl_type_access_control): New fn.
4410 (begin_function_definition): Use deferred_type_access_control, after
4411 we've started the function. Set type_lookups to error_mark_node.
4412 * parse.y (frob_specs, fn.def1): Adjust.
4413 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
4414 (parse_end_decl, parse_bitfield0, parse_method): New fns.
4415 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
4416 (after_type_component_declarator0): Likewise.
4417 (after_type_component_declarator): Likewise.
4418 (notype_component_declarator): Likewise.
4419 * cp-tree.h: Adjust.
4421 * decl.c (redeclaration_error_message): Allow redeclaration of
4422 namespace-scope decls.
4424 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
4426 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
4428 2000-02-17 Mark Mitchell <mark@codesourcery.com>
4430 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
4431 * decl2.c (grokclassfn): Likewise.
4433 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
4435 * decl2.c (lang_decode_option): Don't set default message length
4437 * lex.c (lang_init_options): Set it here.
4439 2000-02-16 Mark Mitchell <mark@codesourcery.com>
4441 Make DECL_CONTEXT mean the class in which a member function was
4442 declared, even for a virtual function.
4443 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
4444 (DECL_FRIEND_CONTEXT): New macro.
4445 (DECL_REAL_CONTEXT): Remove.
4446 (SET_DECL_FRIEND_CONTEXT): Likewise.
4447 (DECL_VIRTUAL_CONTEXT): Adjust.
4448 (DECL_CLASS_SCOPE_P): Use TYPE_P.
4449 (add_friends): Remove.
4450 (hack_decl_function_context): Likewise.
4451 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
4453 (build_over_call): Fix indentation. Use DECL_CONTEXT
4454 instead of DECL_CLASS_CONTEXT.
4455 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
4456 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
4457 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4458 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
4459 (build_base_field): Likewise.
4460 (finish_struct_1): Likewise.
4461 (build_self_reference): Likewise.
4462 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
4464 (pushtag): Use decl_function_context, not
4465 hack_decl_function_context.
4466 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4467 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
4468 (pushdecl): Remove bogus code.
4469 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
4470 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4471 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4472 Use decl_function_context, nothack_decl_function_context.
4473 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
4474 (grokdeclarator): Likewise. Use decl_function_context, not
4475 hack_decl_function_context.
4476 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
4477 (start_function): Use DECL_FRIEND_CONTEXT, not
4478 DECL_CLASS_CONTEXT. Use decl_function_context, not
4479 hack_decl_function_context.
4480 (finish_function): Use decl_function_context, not
4481 hack_decl_function_context.
4482 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
4484 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
4485 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
4486 (grokfield): Likewise.
4487 (finish_builtin_type): Likewise.
4488 (finish_vtable_vardec): Use decl_function_context, not
4489 hack_decl_function_context.
4490 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4491 (start_static_initialization_or_destruction): Likewise.
4492 (finish_static_initialization_or_destruction): Likewise.
4493 (mark_used): Adjust logic for deciding when to synthesize methods.
4494 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
4496 * error.c (dump_function_decl): Use DECL_CONTEXT, not
4498 * friend.c (is_friend): Likewise.
4499 (add_friends): Remove.
4500 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
4501 * lex.c (begin_definition_of_inclass_inline): Use
4502 decl_function_context, not hack_decl_function_context.
4503 (process_next_inline): Likewise.
4504 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4505 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
4506 DECL_CLASSS_CONTEXT.
4507 (hack_identifier): Likewise.
4508 (synthesize_method): Use decl_function_context, not
4509 hack_decl_function_context.
4510 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
4512 (is_member_template): Use decl_function_context, not
4513 hack_decl_function_context. Use DECL_CONTEXT, not
4515 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
4517 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
4519 (push_template_decl_real): Likewise.
4520 (instantiate_class_template): Don't call add_friends.
4521 (tsubst_default_argument): Use DECL_CONTEXT, not
4523 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
4524 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4525 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
4527 * repo.c (repo_inline_used): Likewise.
4528 * search.c (current_scope): Adjust for new _CONTEXT macros.
4529 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
4531 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4532 (lookup_fnfields_here):Likewise.
4533 (check_final_overrider): Likewise.
4534 (init_vbase_pointers): Likewise.
4535 (virtual_context): Likewise.
4536 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
4537 (expand_body): Use decl_function_context, not
4538 hack_decl_function_context.
4539 * tree.c (hack_decl_function_context): Remove.
4540 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
4542 * typeck2.c (error_not_base_type): Likewise.
4544 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
4546 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
4548 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4550 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
4552 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
4554 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
4556 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
4558 * decl2.c (lang_decode_option): Enable automatic line wrapping.
4560 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
4562 * parse.y (frob_specs): Split out...
4563 (parse_decl): From here.
4564 (fn.def2): Call initial_deferred_type_access_control.
4565 (after_type_component_declarator0): Call frob_specs.
4566 (notype_component_declarator0): Likewise.
4567 * search.c (friend_accessible_p): Nested classes are friends of their
4570 2000-02-10 Mark Mitchell <mark@codesourcery.com>
4572 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
4573 used to create an implicit temporary.
4575 * class.c (dfs_modify_vtables): Tweak calculation of functions to
4578 2000-02-08 Nathan Sidwell <nathan@acm.org>
4580 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
4581 strip array element qualifiers too.
4583 2000-02-07 Mark Mitchell <mark@codesourcery.com>
4585 * decl.c (store_parm_decls): Don't build cleanups for parameters
4586 while processing_template_decl.
4588 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
4590 * cp-tree.h (struct saved_scope): Add incomplete field.
4591 (namespace_scope_incomplete): New macro.
4592 * decl.c (pushdecl): Use it.
4593 (hack_incomplete_structures): Use it. See through artificial
4595 (mark_saved_scope): Mark it.
4597 Implement access control for nested types.
4598 * search.c (type_access_control): New fn.
4599 (accessible_p): Now we do perform access control for types.
4600 * semantics.c (deferred_type_access_control): New fn.
4601 (initial_deferred_type_access_control): New fn.
4602 (begin_function_definition): Call it. Add lookups parm.
4603 * decl.c (struct binding_level): Add this_class field.
4604 (pushlevel_class): Set it.
4605 (mark_binding_level): Mark it.
4606 (lookup_name_real): Use it. Call type_access_control.
4607 (mark_saved_scope): Mark lookups field.
4608 * cp-tree.h (flagged_type_tree): Add lookups field.
4609 (struct saved_scope): Add lookups field.
4610 (type_lookups): New macro.
4611 * parse.y (declmods): Now <ftype>.
4612 (parse_decl): Add lookups parm. Call
4613 initial_deferred_type_access_control.
4614 (lang_extdef): Clear type_lookups.
4615 (typed_declspecs, declmods, typespec): Set lookups field.
4616 (initdcl): Call deferred_type_access_control.
4617 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
4618 component_decl_1, named_parm): Adjust.
4619 * friend.c (is_friend): Nested classes are friends of their
4622 * class.c (currently_open_derived_class): New fn.
4623 * method.c (hack_identifier): Use it.
4625 * lex.c (do_identifier): Remove obsolete code.
4627 * parse.y (typed_typespecs): Propagate new_type_flag properly.
4629 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
4631 * tinfo.h: Remove apostrophes from C++ comment (xgettext
4632 thinks this file is plain C).
4634 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4636 * Makefile.in (call.o): Depend on $(EXPR_H).
4638 * call.c: Include "expr.h".
4640 * class.c (dump_class_hierarchy): Add prototype.
4642 * search.c (dfs_get_pure_virtuals): Likewise.
4644 2000-02-1 Ulrich Drepper <drepper@redhat.com>
4646 * parse.y (simple_stmt): Allow :: token in asm parameter list.
4649 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
4651 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
4652 Store it in DECL_FCONTEXT.
4653 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
4655 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
4657 * tinfo.h (old abi): #include "tconfig.h".
4658 * tinfo.cc (convert_to_base): Move into old abi section.
4660 2000-01-31 Mark Mitchell <mark@codesourcery.com>
4662 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
4663 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
4664 (BINFO_PRIMARY_BINFO): New macro.
4665 (BF_DELTA): Rename to ...
4666 (BV_DELTA): ... this.
4667 (BF_VCALL_INDEX): Rename to ...
4668 (BV_VCALL_INDEX): ... this.
4669 (BF_FN): Rename to ...
4671 * class.c (build_vbase_path): Adjust for changes to reverse_path.
4672 (set_rtti_entry): Rename BF_ macros to BV_ variants.
4673 (modify_vtable_entry): Simplify.
4674 (add_virtual_function): Rename BF_ macros to BV_ variants.
4675 (build_vtable_initializer): Likewise.
4676 (get_class_offset_1): Remove.
4677 (dfs_get_class_offset): Likewise.
4678 (get_class_offset): Likewise.
4679 (dfs_find_final_overrider): New function.
4680 (find_final_overrider): Likewise.
4681 (modify_one_vtable): Remove.
4682 (dfs_find_base): New function.
4683 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
4684 find_final_overrider.
4685 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
4687 (dfs_fixup_vtable_deltas): Remove.
4688 (override_one_vtable): Remove.
4689 (merge_overrides): Likewise.
4690 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
4691 unreal chilren of virtual bases.
4692 (finish_struct_1): Don't use merge_overrides. Don't use
4693 dfs_fixup_vtable_deltas.
4694 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
4697 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
4698 Jason Merrill <jason@yorick.cygnus.com>
4700 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
4702 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
4704 * exception.cc (__throw_bad_typeid): Add missing std::.
4706 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4708 * cp-tree.h (make_thunk): PROTO -> PARAMS.
4710 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
4712 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
4714 Runtime support for new-abi rtti.
4715 * inc/typeinfo (type_info::operator!=): Define in class.
4716 (type_info::before, type_info::name, type_info::operator==,
4717 type_info::operator!=): Define new ABI implementations.
4718 (type_info::is_pointer_p, type_info::is_function_p): Declare
4719 new virtual functions.
4720 (type_info::do_catch, type_info::do_upcast): Likewise.
4722 * tinfo.h (__base_class_info): Define new class.
4723 (__class_type_info): Likewise.
4724 (__si_class_type_info): Likewise.
4725 (__vmi_class_type_info): Likewise.
4726 (__dynamic_cast): Prototype.
4728 * tinfo.cc: Conditionalize old and new rtti mechanisms.
4729 (type_info::is_pointer_p): Define new function.
4730 (type_info::is_function_p): Likewise.
4731 (type_info::do_catch): Likewise.
4732 (type_info::do_upcast): Likewise.
4733 (vtable_prefix): New structure for vtable access.
4734 (adjust_pointer): Define new template function.
4735 (contained_p, public_p, virtual_p, contained_public_p,
4736 contained_nonpublic_p, contained_nonvirtual_p): Define new
4738 (nonvirtual_base_type): New local variable.
4739 (__class_type_info::~__class_type_info): Define.
4740 (__si_class_type_info::~__si_class_type_info): Likewise.
4741 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
4742 (__class_type_info::do_catch): Define new function.
4743 (__class_type_info::do_upcast): Likewise.
4744 (__class_type_info::find_public_src): Likewise.
4745 (__class_type_info::do_find_public_src): Likewise.
4746 (__si_class_type_info::do_find_public_src): Likewise.
4747 (__vmi_class_type_info::do_find_public_src): Likewise.
4748 (__class_type_info::do_dyncast): Likewise.
4749 (__si_class_type_info::do_dyncast): Likewise.
4750 (__vmi_class_type_info::do_dyncast): Likewise.
4751 (__class_type_info::do_upcast): Likewise.
4752 (__si_class_type_info::do_upcast): Likewise.
4753 (__vmi_class_type_info::do_upcast): Likewise.
4754 (__dynamic_cast): Likewise.
4756 * tinfo2.cc (__fundamental_type_info): Define new class.
4757 (__pointer_type_info): Likewise.
4758 (__reference_type_info): Likewise.
4759 (__array_type_info): Likewise.
4760 (__function_type_info): Likewise.
4761 (__enum_type_info): Likewise.
4762 (__ptr_to_member_type_info): Likewise.
4763 (__fundamental_type_info::~__fundamental_type_info): Define.
4764 (__pointer_type_info::~__pointer_type_info): Likewise.
4765 (__reference_type_info::~__reference_type_info): Likewise.
4766 (__array_type_info::~__array_type_info): Likewise.
4767 (__function_type_info::~__function_type_info): Likewise.
4768 (__enum_type_info::~__enum_type_info): Likewise.
4769 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
4770 (__pointer_type_info::do_catch): Define new function.
4771 (__ptr_to_member_type_info::do_catch): Define new function.
4773 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
4774 (__is_pointer): Likewise.
4776 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
4778 2000-01-30 Mark Mitchell <mark@codesourcery.com>
4780 * cp/class.c (build_vtable): Rename to build_primary_vtable.
4781 (prepare_fresh_vtable): Rename to build_secondary_vtable.
4782 (make_new_vtable): New function.
4783 (modify_vtable_entry): Handle generation of new vtables correctly.
4784 (modify_one_vtable): Remove unused parameter.
4785 (dfs_fixup_vtable_deltas): Likewise.
4786 (override_one_vtable): Use build_secondary_vtable.
4787 (finish_struct_1): Use build_primary_vtable and
4788 build_secondary_vtable.
4790 2000-01-28 Ulrich Drepper <drepper@redhat.com>
4792 * cp/decl.c: Adjust variable names, comments, help strings.
4794 2000-01-29 Nathan Sidwell <nathan@acm.org>
4796 * new2.cc (operator delete[]): Use operator delete, don't assume
4799 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
4801 * class.c (build_vtbl_initializer): Add argument to
4802 build_vtable_entry call.
4804 2000-01-27 Mark Mitchell <mark@codesourcery.com>
4806 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
4807 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
4808 (BF_DELTA): New macro.
4809 (BF_VCALL_INDEX): Likewise.
4811 (THUNK_VCALL_OFFSET): Likewise.
4812 (make_thunk): Change prototype.
4813 * class.c (build_vtable_entry): Integrate
4814 build_vtable_entry_for_fn. Handle vcall indices.
4815 (build_vtable_entry_for_fn): Remove.
4816 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
4817 BF_VCALL_INDEX, BF_FN.
4818 (modify_vtable_entry): Integrate common code from
4819 modify_one_vtable and dfs_fixup_vtable_deltas.
4820 (add_virtual_function): Set BF_VCALL_INDEX.
4821 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
4823 (modify_one_vtable): Simplify.
4824 (dfs_fixup_vtable_deltas): Likewise.
4825 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
4826 * method.c (make_thunk): Handle vcall indices.
4828 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
4830 Compiler side new abi rtti (not enabled).
4831 * cp-tree.h (new_abi_rtti_p): New macro.
4832 (emit_support_tinfos): Prototype new function.
4833 (tinfo_decl_p): Likewise.
4834 (emit_tinfo_decl): Likwise.
4835 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
4837 (doing_runtime): New local static.
4838 (init_rtti_processing): Add new-abi initializer.
4839 (get_tinfo_decl): Add new-abi logic.
4840 (tinfo_from_decl): Likewise.
4841 (build_dynamic_cast_1): Likewise.
4842 (qualifier_flags): New static function.
4843 (tinfo_base_init): Likewise.
4844 (generic_initializer): Likewise.
4845 (ptr_ref_initializer): Likewise.
4846 (ptmd_initializer): Likewise.
4847 (class_hint_flags): Likewise.
4848 (class_initializer): Likewise.
4849 (synthesize_tinfo_var): Likewise.
4850 (create_real_tinfo_var): Likewise.
4851 (create_pseudo_type_info): Likewise.
4852 (get_vmi_pseudo_type_info): Likewise.
4853 (create_tinfo_types): Likewise.
4854 (emit_support_tinfos): New global function.
4855 (tinfo_decl_p): New global predicate.
4856 (emit_tinfo_decl): New global function.
4857 * class.c (set_rtti_entry): Generalize for old and new rtti.
4858 (build_vtbl_initializer): Likewise.
4859 * decl2.c (finish_file): Likewise.
4861 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
4863 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
4864 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
4866 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
4868 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
4871 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
4873 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
4875 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
4877 * optimize.c (calls_setjmp_r): Supply new argument
4878 to special_function_p.
4880 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4882 * call.c: PROTO -> PARAMS.
4883 * class.c: Likewise.
4884 * cp-tree.h: Likewise.
4888 * decl2.c: Likewise.
4890 * errfn.c: Likewise.
4891 * error.c: Likewise.
4892 * except.c: Likewise.
4895 * input.c: Likewise.
4898 * method.c: Likewise.
4899 * optimize.c: Likewise.
4900 * parse.y: Likewise.
4904 * search.c: Likewise.
4905 * semantics.c: Likewise.
4908 * typeck.c: Likewise.
4909 * typeck2.c: Likewise.
4912 2000-01-25 Richard Henderson <rth@cygnus.com>
4914 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
4916 2000-01-25 Mark Mitchell <mark@codesourcery.com>
4918 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
4919 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
4920 (struct vcall_offset_data_s): New type.
4921 (dfs_vcall_offset_queue_p): New function.
4922 (dfs_build_vcall_offset_vtbl_entries): Likewise.
4923 (build_vcall_offset_vtbl_entries): Likewise.
4924 (layout_vtable_decl): Likewise.
4925 (num_vfun_entries): Likewise.
4926 (num_extra_vtbl_entries): Add the entries for vcall offsets.
4927 (build_vtbl_initializer): Likewise.
4928 (dfs_finish_vtabls): Use layout_vtable_decl.
4929 (modify_one_vtables): Always duplicate vtables under the new ABI.
4930 (finish_struct_1): Use layout_vtable_decl.
4932 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4934 * decl.c (member_function_or_else): Change third arg from a format
4935 specifier to an `enum overload_flags'. Callers changed.
4937 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
4939 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
4940 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
4941 build_const_cast, get_delta_difference, check_return_expr): Avoid
4942 ANSI string concatenation usage.
4944 2000-01-24 Mark Mitchell <mark@codesourcery.com>
4946 * class.c (layout_class_type): Put the fields required to make a
4947 class non-empty at the end, not the beginning, of the TYPE_FIELDs
4950 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
4952 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
4955 * decl2.c (mark_used): Do instantiate inlines that have been
4956 explicitly instantiated.
4958 2000-01-24 Richard Henderson <rth@cygnus.com>
4960 * call.c (build_over_call): Use expand_tree_builtin.
4961 * typeck.c (build_function_call_real): Likewise.
4962 (build_binary_op_nodefault): Handle unordered compares.
4964 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
4966 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
4967 cp_tree_index values.
4968 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
4969 New global node #defines for them.
4970 * rtti.c (call_void_fn): Replace with ...
4971 (build_runtime_decl): ... new static function.
4972 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
4973 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
4974 (build_dynamic_cast_1): Always produce correctly typed result.
4975 Explicitly produce type_info addresses. Use dynamic_cast_node.
4976 * exception.cc (__throw_bad_cast): Return `void *'.
4977 (__throw_bad_typeid): Return `const type_info &'.
4979 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
4981 * cp-tree.h (get_vtable_decl): Prototype new function.
4982 * class.c (get_vtable_decl): New function. Broken out from ...
4983 (build_vtable): ... here. Use it.
4984 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
4987 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
4989 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
4990 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
4991 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
4992 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
4993 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
4994 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
4995 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
4996 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
4997 (CPTI_TINFO_VAR_ID): New enumeration.
4998 (__tp_desc_type_node, __access_mode_type_node,
4999 __bltn_desc_type_node, __user_desc_type_node,
5000 __class_desc_type_node, __ptr_desc_type_node,
5001 __attr_desc_type_node, __func_desc_type_node,
5002 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
5003 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
5004 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
5005 enum_desc_type_node, class_desc_type_node,
5006 si_class_desc_type_node, vmi_class_desc_type_node,
5007 ptmd_desc_type_node, base_desc_type_node): New #defines.
5008 (tinfo_fn_id, tinfo_fn_type): Rename to ...
5009 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
5010 (tinfo_var_id): New enumeration.
5011 (DECL_TINFO_FN_P): Augment comment.
5012 * decl.c (cp_global_trees): Adjust documentation.
5013 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
5014 tinfo_decl_type and tinfo_var_id.
5015 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
5016 (build_typeid): Remove unused variable.
5017 (get_tinfo_var): Use tinfo_var_id.
5018 (tinfo_name): New static function.
5019 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
5020 (tinfo_from_decl): Likewise.
5021 (get_base_offset): New static function, broken out of
5023 (expand_si_desc): Use tinfo_name.
5024 (expand_class_desc): Likewise. Lose local static variable.
5025 Use base_desc_type_node. Use get_base_offset.
5026 (expand_ptr_desc): Use tinfo_name.
5027 (expand_attr_desc): Likewise.
5028 (expand_generic_desc): Likewise.
5030 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
5031 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
5033 2000-01-23 Mark Mitchell <mark@codesourcery.com>
5035 * cp-tree.h (__eprintf): Remove declaration.
5036 * tree.c (__eprintf): Remove definition.
5038 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
5039 Mark Mitchell <mark@codesourcery.com>
5041 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
5042 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
5044 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
5046 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
5048 2000-01-23 Mark Mitchell <mark@codesourcery.com>
5050 * cp-tree.h (register_dtor_fn): New function.
5051 * decl.c (destroy_local_static): Rename to ...
5052 (register_dtor_fn): ... this. Give it external linkage.
5053 (expand_static_init): Use it.
5054 * decl2.c (do_static_initialization): Likewise, if using
5056 (do_static_destruction): Check that __cxa_atexit is not in use.
5057 (finish_file): Don't call do_static_destruction if using
5060 * typeck.c (convert_arguments): Restore two-message error
5063 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
5065 Remap dynamic cast hint values to be consistent across ABIs.
5066 * search.c (dynamic_cast_base_recurse): Remap generated value.
5067 (get_dynamic_cast_base_type): Adjust documentation.
5068 * tinfo.h (__user_type_info::dyncast): Likewise.
5069 (__user_type_info::find_public_subobj): Remap BOFF meaning.
5070 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
5071 (__class_type_info::do_dyncast): Likewise.
5072 (__class_type_info::do_find_public_subobj): Likewise.
5073 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
5075 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
5077 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
5079 * typeck2.c (incomplete_type_error): Restore previous
5080 cp_error and cp_error_at call sequence.
5082 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
5084 * class.c (dump_class_hierarchy): Make format agree with argument;
5085 cast pointer to unsigned long and print with %lx.
5087 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
5089 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
5091 * typeck.c (composite_pointer_type, common_type,
5092 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
5093 build_function_call_real, convert_arguments,
5094 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
5095 build_unary_op, mark_addressable, build_compound_expr,
5096 build_static_cast, build_reinterpret_cast, build_const_cast,
5097 build_c_cast, build_modify_expr, get_delta_difference,
5098 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
5099 'ISO C++'. Fusion consecutive calls to diagnotic message routines
5101 * typeck2.c (readonly_error, abstract_virtuals_error,
5102 process_init_constructor, check_for_new_type): Likewise.
5104 2000-01-19 Mark Mitchell <mark@codesourcery.com>
5106 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
5109 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
5111 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
5112 (build_x_typeid): Likewise.
5113 (get_tinfo_fn): Likewise.
5114 (get_tinfo_fn_unused): Rename to ...
5115 (get_tinfo_decl): ... here.
5116 * rtti.c (build_headof): Replace logic error with assertion.
5117 (get_tinfo_fn_dynamic): Rename to ...
5118 (get_tinfo_decl_dynamic): ... here. Make static. Use
5119 complete_type_or_else.
5120 (build_x_typeid): Move into ...
5121 (build_typeid): ... here. Adjust call to
5122 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
5123 throw_bad_typeid expression.
5124 (get_tinfo_fn_unused): Rename to ...
5125 (get_tinfo_decl): ... here. Adjust comment.
5126 (get_tinfo_fn): Delete.
5127 (tinfo_from_decl): New static function.
5128 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
5129 (get_typeid): Use complete_type_or_else.
5130 (build_dynamic_cast_1): Adjust calls to
5131 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
5132 * parse.y (primary): Adjust call to build_typeid.
5133 * except.c (build_eh_type_type_ref): Adjust call to
5134 get_tinfo_decl. Mark as used.
5135 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
5136 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
5137 * parse.c: Regenerated.
5139 2000-01-17 Mark Mitchell <mark@codesourcery.com>
5141 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
5143 (resolves_to_fixed_type_p): Document calling convention.
5144 * rtti.c (build_x_typeid): Initialize NONNULL.
5146 * cp-tree.h (build_shared_int_cst): New function.
5147 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
5148 * class.c (modify_vtable_entry): Likewise.
5149 (add_virtual_function): Split out code to generated shared
5150 INTEGER_CSTs to build_share_int_cst.
5151 (modify_all_vtables): Handle all the overridden functions here.
5152 Add overridden functions from non-primary virtual bases to the
5154 (finish_struct_1): Adjust call to modify_all_vtables. Add
5155 overridden functions from non-primary bases to the vtable.
5156 * tree.c (build_shared_int_cst): New function.
5158 * cp-tree.h (scratchalloc): Remove.
5159 (build_scratch_list): Likewise.
5160 * call.c (convert_class_to_reference): Replace build_scratch_list
5161 and build_expr_list with build_tree_list.
5162 (add_candidate): Replace scratchalloc with expralloc. Note memory
5164 (build_user_type_conversion_1): Replace build_scratch_list
5165 and build_expr_list with build_tree_list.
5166 (build_new_op): Likewise.
5167 (build_op_delete_call): Likewise.
5168 (convert_like): Likewise.
5169 * cvt.c (ocp_convert): Likewise.
5170 * decl.c (start_decl): Likewise.
5171 (start_function): Likewise.
5172 (finish_destructor_body): Likewise.
5173 (maybe_build_cleanup_1): Likewise.
5174 * decl2.c (reparse_decl_as_expr): Likewise.
5175 * init.c (perform_member_init): Likewise.
5176 (expand_cleanup_for_base): Likewise.
5177 (build_builtin_delete_call): Likewise.
5178 (build_new_1): Likewise.
5179 (build_delete): Likewise.
5180 * method.c (do_build_assign_ref): Likewise.
5181 * parse.y (already_scoped_stmt): Likewise.
5182 (nontrivial_exprlist): Likewise.
5183 (net_initializer): Likewise.
5184 (initlist): Likewise.
5185 * parse.c: Regenerated.
5186 * rtti.c (build_x_typeid): Likewise.
5187 (build_dynamic_cast_1): Likewise.
5188 * typeck.c (build_x_compound_expr): Likewise.
5189 (build_static_cast): Likewise.
5190 (build_modify_expr): Likewise.
5192 * cp-tree.h (DECL_VINDEX): Add documentation.
5193 * class.c (build_vtable_entry): Likewise.
5194 (start_vtable): Add comment.
5195 (add_virtual_function): Replace pending_hard_virtuals with
5196 overridden_virtuals and pending_virtuals with new_virtuals.
5197 Replace redundant assignments with assertions.
5198 (check_for_override): Add comment.
5199 (check_bases_and_members): Replace pending_hard_virtuals with
5200 overridden_virtuals and pending_virtuals with new_virtuals.
5201 (create_vtbl_ptr): Likewise.
5202 (layout_class_type): Likewise.
5203 (finish_struct_1): Likewise. Add comments.
5205 2000-01-16 Mark Mitchell <mark@codesourcery.com>
5207 * class.c (finish_struct_1): Replace redundant code with
5210 * cp-tree.h (flag_new_abi): Move.
5211 (flag_use_cxa_atexit): Likewise.
5212 (flag_honor_std): Likewise.
5213 (flag_rtti): Likewise.
5214 (vbase_offsets_in_vtable_p): Define.
5215 (vptrs_present_everywhere_p): Likewise.
5216 (TYPE_CONTAINS_VPTR_P): Likewise.
5217 (dfs_walk_real): Declare.
5218 * class.c (build_vbase_pointer_fields): Check
5219 vbase_offsets_in_vtable_p.
5220 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
5222 (build_vbase_offset_vtbl_entries): Simplify.
5223 (build_vbase_offset_vtbl_entries): Adjust.
5224 (build_vbase_pointer): Add ability to look up vbase offsets in
5226 (start_vtable): New function.
5227 (add_virtual_function): Use it.
5228 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
5229 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
5230 (build_vtbl_initializer): Take the type of the complete object as
5231 input. Use it to correctly calculate vbase offsets.
5232 (dfs_finish_vtbls): Pass the complete type to
5233 build_vtbl_initializer.
5234 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
5235 (create_vtable_ptr): Create a vtable even if there are no
5236 new virtual functions, under the new ABI.
5237 (finish_struct_1): Likewise.
5238 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
5239 * decl.c (exapnd_static_init): Remove call to
5240 preserve_initializer.
5241 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
5243 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
5244 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
5245 (construct_virtual_bases): Don't initialize virtual base pointers
5247 (build_aggr_init): Clean up comment.
5248 (expand_aggr_init_1): Likewise.
5249 * rtti.c (expand_class_desc): Store the virtual function table
5250 index where the vbase offset lives in the offset field.
5251 * search.c (dfs_walk_real): Make it global.
5252 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
5253 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
5255 * tinfo.h (USItype): Make it signed under the new ABI.
5256 * tinfo.cc (convert_to_base): New function. Encapsulate base
5257 conversion logic here.
5258 (__class_type_info::do_upcast): Use it.
5259 (__class_type_info::do_dyncast): Likewise.
5260 (__class_type_info::do_find_public_subobj): Likewise.
5262 * init.c (construct_virtual_bases): Don't look up the addresses of
5263 virtual bases at run-time.
5265 * class.c (build_vbase_pointer): Relocate.
5266 (build_vbase_pointer_fields): Likewise.
5267 (dfs_build_vbase_offset_vtbl_entries): Likewise.
5268 (build_vbase_offset_vtbl_entries): Likewise.
5270 * decl.c (init_decl_processing): Complain if -fnew-abi
5271 -fno-vtable-thunks is used.
5273 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
5276 2000-01-15 Mark Mitchell <mark@codesourcery.com>
5278 * cp-tree.h (num_extra_vtbl_entries): New function.
5279 (size_extra_vtbl_entries): Likewise.
5280 (dfs_vtable_path_unmark): Likewise.
5281 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
5282 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
5283 * class.c (num_extra_vtbl_entries): New function.
5284 (size_extra_vtbl_entries): Likewise.
5285 (dfs_build_vbase_offset_vtbl_entries): New function.
5286 (build_vbase_offset_vtbl_entries): Likewise.
5287 (build_vtbl_initializer): Use it.
5288 (finish_struct_1): Adjust vtable sizes (using
5289 num_extra_vtbl_entries).
5290 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
5291 THUNK_DECL is non-NULL before expanding it.
5292 * init.c (expand_virtual_init): Adjust the vtable pointer by
5293 size_extra_vtbl_entries before storing it.
5294 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
5295 Handle TREE_LIST parameters here, not in the dfs_* functions.
5296 (dfs_unmarked_real_bases_queue_p): Adjust.
5297 (dfs_marked_real_bases_queue_p): Likewise.
5298 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
5299 (dfs_vtable_path_marked_real_bases_queue_p): New function.
5300 (dfs_vtable_path_unmark): Likewise.
5302 2000-01-14 Mark Mitchell <mark@codesourcery.com>
5304 * optimize.c (copy_body_r): Clear the operand three of a
5305 TARGET_EXPR when copying it.
5307 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5309 * method.c (build_decl_overload_real): Check whether we are in ::
5310 before returning __builtin_new/delete.
5312 2000-01-13 Mark Mitchell <mark@codesourcery.com>
5314 * pt.c (tsubst_friend_function): Improve comment.
5315 (instantiate_decl): Avoid crashing when a "nested" function is
5316 instantiated from the top level.
5318 * dump.c (dqeueue_and_dump): Dump
5319 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
5321 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5323 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
5325 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
5327 * g++spec.c (lang_specific_driver): Add -fnew-abi if
5328 ENABLE_NEW_GXX_ABI defined.
5329 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
5330 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
5331 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
5333 2000-01-12 Mark Mitchell <mark@codesourcery.com>
5335 * decl.c (start_cleanup_fn): Call pushdecl.
5337 * call.c (convert_class_to_reference): Fix typos.
5338 (build_conditional_expr): Handle errors gracefully.
5339 * class.c (push_nested_class): Likewise.
5340 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
5341 (DECL_THIS_EXTERN): Use it.
5342 (DECL_THIS_STATIC): Likewise.
5343 * cvt.c (convert_to_void): Handle errors gracefully.
5344 (build_expr_type_conversion): Likewise.
5345 * decl.c (maybe_push_decl): Likewise.
5346 (start_decl_1): Likewise.
5347 (require_complete_types_for_parms): Likewise.
5348 * parse.y (structsp): Likewise.
5349 (base_class): Likewise.
5350 * parse.c: Regenerated.
5351 * pt.c (finish_member_template_decl): Likewise.
5352 * typeck.c (decay_conversion): Likewise.
5354 * cp-tree.h (dfs_skip_vbases): New function.
5355 (find_vbase_instance): Likewise.
5356 * class.c (determine_primary_base): Allow a nearly empty base to
5357 serve as a primary base class under the new ABI.
5358 (get_class_offset_1): Rename to ...
5359 (dfs_get_class_offset): ... this. Simplify. Don't issue error
5361 (get_class_offset): Use it. Issue error messages here.
5362 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
5363 find the right copies of virtual bases.
5364 (fixup_vtable_deltas1): Rename to ...
5365 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
5366 bases as primary bases.
5367 (fixup_vtable_deltas): Remove.
5368 (override_one_vtable): Handle virtual bases as primary bases.
5369 (merge_overrides): Likewise.
5370 (finish_struct_1): Likewise.
5371 (dump_class_hierarchy): Dump primary-ness of bases as well.
5372 * search.c (mark_primary_bases): Use a pre-order traversal to
5373 handle primary virtual bases.
5374 (dfs_skip_vbases): New fiunction.
5375 (expand_upcast_fixups): Adjust to handle primary virtual bases.
5376 (fixup_virtual_upcast_offsets): Likewise.
5377 (fixup_all_virtual_upcast_offsets): Likewise.
5378 (dfs_find_vbase_instances): New function.
5379 (find_vbase_instance): Likewise.
5381 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
5383 * lex.c (DIR_SEPARATOR): Delete macro.
5385 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
5387 * decl2.c (lang_decode_option): Handle automatic line wrapping
5390 2000-01-11 Mark Mitchell <mark@codesourcery.com>
5392 * friend.c (do_friend): Don't resolve scopes when processing
5393 template declarations, even if the qualifying scope doesn't
5394 involve template parameters.
5396 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
5398 * class.c (dfs_modify_vtables_queue_p): Remove.
5399 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
5400 and dfs_marked_real_bases_queue_p instead of
5401 dfs_modify_vtables_queue_p.
5403 * class.c (build_vbase_path): Simplify.
5404 (dfs_propagate_binfo_offsets): New function.
5405 (propagate_binfo_offsets): Use it.
5406 (remove_base_field): Simplify.
5407 (dfs_set_offset_for_vbases): Remove.
5408 (dfs_set_offset_for_shared_vbases): New function.
5409 (dfs_set_offset_for_unshared_vbases): Likewise.
5410 (layout_virtual_bases): Use them.
5411 (layout_basetypes): Don't call propagate_binfo_offsets.
5412 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
5415 * class.c (build_base_field): New function, split out from ...
5416 (build_base_fields): ... here. Use it. Allocate primary bases
5417 first, under the new ABI.
5418 (get_vtable_entry): Remove.
5419 (remove_base_field): New function, split out from ...
5420 (remove_base_fields): ... here. Adjust since primary bases come
5421 first under the new ABI.
5423 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
5424 (initialize_vtbl_ptrs): New function.
5425 (expand_indirect_vtbls_init): Change prototype.
5426 (convert_pointer_to_vbase): Declare.
5427 * init.c (expand_direct_vtbls_init): Remove.
5428 (dfs_initialize_vtbl_ptrs): New function.
5429 (initialize_vtbl_ptrs): Likewise.
5430 (emit_base_init): Use initialize_vtbl_ptrs.
5431 * search.c (convert_pointer_to_vbase): Make it global.
5432 (expand_indirect_vtbls_init): Remove vtable initialization code.
5433 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
5435 * class.c (dfs_finish_vtbls): New function.
5436 (finish_vtbls): Use it.
5437 (dump_class_hierarchy): New function.
5439 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
5440 (BINFO_VBASE_PRIMARY_P): New macro.
5441 (BINFO_VIRTUALS): Add to documentation.
5442 (SET_BINFO_PRIMARY_MARKED_P): Remove.
5443 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5444 (dfs_mark_primary_bases_queue_p): Likewise.
5445 (dfs_unmarked_real_bases_queue_p): New function.
5446 (dfs_marked_real_bases_queue_p): Likewise.
5447 * search.c (dfs_mark_primary_bases): Adjust.
5448 (mark_primary_bases): Likewise.
5449 (get_shared_vbase_if_not_primary): New function.
5450 (dfs_unmarked_real_bases_queue_p): Likewise.
5451 (dfs_marked_real_bases_queue_p): Likewise.
5452 (dfs_get_pure_virtuals): Simplify.
5453 (get_pure_virtuals): Likewise.
5455 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5457 * lex.c: Include tm_p.h.
5459 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
5461 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
5463 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
5465 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
5466 * pt.c (instantiate_decl): Defer comdat templates that might not be
5469 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
5470 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
5471 (finish_file): Likewise.
5473 * decl2.c (import_export_class): Undo 12/14 change.
5475 * error.c (dump_decl): operator new, not operatornew.
5477 * class.c (field_decl_cmp): A nontype is "greater" than a type.
5478 * search.c (lookup_field_1): Look for the last field with the
5481 2000-01-05 Nathan Sidwell <nathan@acm.org>
5483 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
5486 2000-01-05 Nathan Sidwell <nathan@acm.org>
5488 * typeck.c (build_static_cast): Don't strip target qualifiers
5489 when casting from a class.
5491 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5493 * class.c (warn_hidden): Initialize variable `fndecl'.
5495 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
5497 * decl.c (flag_isoc9x): New variable to be able to use code in
5498 c-common.c. For now always zero.
5500 2000-01-03 Mark Mitchell <mark@codesourcery.com>
5502 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
5503 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
5504 or unshare_base_binfos for virtual bases here.
5505 * search.c (dfs_get_vbase_types): Do it here.
5506 (get_vbase_types): Adjust.
5508 2000-01-02 Mark Mitchell <mark@codesourcery.com>
5510 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
5511 (BINFO_PRIMARY_MARKED_P): Use flag 5.
5512 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
5513 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5514 (unmark_primary_bases): Remove declaration.
5515 (unmarkedp): Declare.
5516 (dfs_vbase_unmark): Likewise.
5517 * class.c (determine_primary_base): Return immediately if there
5518 are no base classes. Call mark_primary_bases here.
5519 (modify_all_direct_vtables): Remove.
5520 (modify_all_indirect_vtables): Remove.
5521 (dfs_modify_vtables_queue_p): New function.
5522 (dfs_modify_vtables): New function.
5523 (modify_all_vtables): Use them.
5524 (build_base_fields): Build FIELD_DECLs for primary virtual base
5526 (create_vtable_ptr): Don't call determine_primary_base here.
5527 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
5528 (dfs_set_offset_for_vbases): ... this.
5529 (layout_virtual_bases): Use it.
5530 (layout_class_type): Call determine_primary_base here.
5531 * search.c (unmarkedp): Make it global.
5532 (shared_marked_p): Simplify.
5533 (shared_unmarked_p): Likewise.
5534 (dfs_primary_bases_queue_p): Remove.
5535 (dfs_unmark_primary_bases): Likewise.
5536 (unmark_primary_bases): Likewise.
5537 (mark_primary_bases): Simplify.
5538 (get_pure_virtuals): Don't call mark_primary_bases here.
5539 (dfs_vbase_unmark): New function.
5540 (get_vbase_types): Simplify.
5542 * class.c (struct base_info): Remove.
5543 (determine_primary_base): Take has_virtual_p rather than a
5544 base_info as input. Don't calculate max_has_virtual.
5545 (finish_struct_bits): Remove max_has_virtual argument.
5546 (create_vtable_ptr): Remove max_has_virtual_p argument.
5547 (layout_virtual_bases): Remove max argument.
5548 (layout_basetypes): Likewise.
5549 (layout_class_type): Remove max_has_virtual_p argument.
5550 (finish_struct_1): Remove max_has_virtual.
5552 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
5553 (layout_basetypes): Remove.
5554 * class.c (propagate_binfo_offsets): Moved here from tree.c.
5555 Update to handle primary virtual bases.
5556 (remove_base_fields): New function, split out from
5558 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
5559 (layout_virtual_bases): New function, split out from
5560 layout_basetypes. Update to handle primary virtual bases.
5561 (layout_basetypes): Moved here from tree.c. Use
5562 remove_base_fields and layout_virtual_bases.
5563 * search.c (dfs_mark_primary_bases_queue_p): New function.
5564 (mark_primary_bases): Use it.
5565 * tree.c (CEIL): Remove.
5566 (propagate_binfo_offsets): Remove.
5567 (layout_basetypes): Remove.
5569 2000-01-01 Mark Mitchell <mark@codesourcery.com>
5571 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
5572 (BINFO_PRIMARY_MARKED_P): New macro.
5573 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
5574 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5575 (mark_primary_bases): New function.
5576 (unmark_primary_bases): Likewise.
5577 * search.c (get_abstract_virtuals_1): Remove.
5578 (dfs_mark_primary_bases): New function.
5579 (mark_primary_bases): Likewise.
5580 (dfs_unmark_primary_bases): Likewise.
5581 (unmark_primary_bases): Likewise.
5582 (dfs_get_pure_virtuals): Likewise.
5584 2000-01-01 Mark Mitchell <mark@codesourcery.com>
5586 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
5587 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
5588 (modify_one_vtable): Adjust.
5589 (fixup_vtable_deltas1): Likewise.
5590 (override_one_vtable): Likewise.
5591 * search.c (get_abstract_virtuals_1): Likewise.
5592 (get_pure_virtuals): Likewise.
5593 (expand_upcast_fixups): Likewise.
5594 * tree.c (debug_binfo): Likewise.
5596 * class.c (build_vtable): Don't return a value. Don't rebuild
5597 vtables for bases that have already been handled.
5598 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
5599 already been handled.
5600 (modify_one_vtable): Adjust accordingly.
5601 (fixup_vtable_deltas1): Likewise.
5602 (finish_struct_1): Likewise.
5604 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5606 * call.c (build_new_method_call): Also check destructors.