1 2000-08-25 Mark Mitchell <mark@codesourcery.com>
3 * decl.c (grokfndecl): Require that `main' return an `int'.
4 * mangle.c (write_encoding): Don't mangle return types for
7 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
9 * error.c (tree_formatting_info): New data type.
10 (tree_being_formatted): New macro.
11 (tree_formatting_flags): Likewise.
12 (put_whitespace): Likewise.
13 (print_tree_identifier): Likewise.
14 (print_identifier): Likewise.
15 (cp_tree_printer, print_function_argument_list, print_declaration,
16 print_expression, print_function_declaration,
17 print_function_parameter, print_type, print_cv_qualifier): New
19 (init_error): Initialize lang_printer.
21 2000-08-24 Jason Merrill <jason@redhat.com>
23 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
26 2000-08-24 Greg McGary <greg@mcgary.org>
28 * cp-tree.h (MAIN_NAME_P): Remove macro.
30 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
32 * error.c (print_instantiation_context): Don't forget to flush the
35 2000-08-23 Jason Merrill <jason@redhat.com>
37 * typeck.c (build_ptrmemfunc): Save the input pmf.
39 * method.c (process_modifiers): Use same_type_p.
41 2000-08-23 Mark Mitchell <mark@codesourcery.com>
43 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
44 * mangle.c (write_function_type): Change prototype.
45 (write_encoding): Don't mangle return types for
46 constructors or destructors.
47 (write_type): Adjust call to write_function_type.
48 * pt.c (instantiate_template): Instantiate alternate entry points
49 when instantiating the main function.
51 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
53 * error.c (cp_print_error_function): Don't use embedded '\n' in
56 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
58 * decl.c (init_decl_processing): Remove bogus initialization.
59 * error.c (lang_print_error_function): Restore here.
60 (init_error): Initialize print_error_function.
62 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
64 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
66 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
68 * Makefile.in (error.o): Depends on diagnostic.h
70 * cp-tree.h (problematic_instantiation_changed,
71 record_last_problematic_instantiation, current_instantiation,
72 print_instantiation_context): Declare.
73 (maybe_print_template_context): Remove.
75 * decl.c (init_decl_processing): Set print_error_function to NULL.
76 (lang_print_error_function): Remove, since we're using a new
79 * error.c: #include diagnostic.h
80 (function_category): New function.
81 (cp_diagnostic_starter): Likewise.
82 (cp_diagnostic_finalizer): Likewise.
83 (cp_print_error_function): Likewise.
84 (maybe_print_instantiation_context): Likewise.
85 (print_instantiation_full_context): Likewise.
86 (print_instantiation_partial_context): Likewise.
87 (print_instantiation_context): Define.
88 (init_error): Initialize diagnostic pager and finalizer.
90 * pt.c (problematic_instantiation_changed): Define.
91 (record_last_problematic_instantiation): Likewise.
92 (current_instantiation): Likewise.
93 (maybe_print_template_context): Remove.
94 (print_template_context): Likewise.
95 (current_tinst_level): Make static to reflect Brendan Kehoe's
97 (push_tinst_level): Call print_instantiation_context.
99 2000-08-21 Nix <nix@esperi.demon.co.uk>
101 * lang-specs.h: Do not process -o or run the assembler if
104 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
106 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
108 * decl2.c (lang_decode_option): Disable gettext attributes for
111 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
113 * lex.c (lang_init_options): Default diagnostic message maximum
114 length to 80, when line-wrapping.
116 2000-08-20 Mark Mitchell <mark@codesourcery.com>
118 * class.c (build_vtbl_initializer): Clear the entire
119 vtbl_init_data. Start keeping track of the functions for which we
120 have created vcall offsets here.
121 (dfs_build_vcall_offset_vtbl_entries): Remove.
122 (build_vcall_offset_vtbl_entries): Reimplement.
123 (add_vcall_offset_vtbl_entries_r): New function.
124 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
125 computing when vcall offsets are necessary.
127 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
129 * decl.c (member_function_or_else): Use cp_error ... %T.
130 (grokdeclarator): Likewise.
131 (start_method): Likewise.
132 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
134 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
136 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
139 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
141 * cp-tree.h (PTRMEM_OK_P): New macro.
142 (itf_ptrmem_ok): New enumeration value.
143 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
144 argument. Diagnose implicit pointer to member.
145 (instantiate_type): Don't diagnose implicit pointer to member
146 here. Pass itf_ptrmem_ok if ok. Adjust calls to
147 resolve_address_of_overloaded_function.
148 * init.c (build_offset_ref): Set PTRMEM_OK_P.
149 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
150 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
151 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
152 (build_unary_op): Deal with single non-static member in
155 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
157 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
159 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
161 * cp-tree.h (enum_name_string): Remove prototype.
162 (report_case_error): Remove prototype.
163 * cp/typeck2.c (enum_name_string): Remove.
164 (report_case_error): Remove.
165 * error.c (dump_expr): Deal with enum values directly.
166 Correctly negate integer constant.
168 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
170 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
171 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
172 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
173 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
174 (__cxa_vec_new): Use __cxa_vec_new2.
175 (__cxa_vec_delete): Use __cxa_vec_delete2.
177 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
179 * vec.cc (__cxa_vec_new): Set "C" linkage.
180 (__cxa_vec_ctor): Likewise.
181 (__cxa_vec_cctor): Likewise.
182 (__cxa_vec_dtor): Likewise.
183 (__cxa_vec_delete): Likewise.
184 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
185 (__cxa_vec_ctor): Likewise.
186 (__cxa_vec_cctor): Likewise.
187 (__cxa_vec_dtor): Likewise.
188 (__cxa_vec_delete): Likewise.
190 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
192 * class.c (instantiate_type): Reinstate local variable
193 deleted in previous change.
195 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
198 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
200 * cp-tree.h (instantiate_type_flags): New enumeration.
201 (instantiate_type): Change parameter.
202 * class.c (instantiate_type): Adjust prototype. Adjust.
203 * call.c (standard_conversion): Adjust instantiate_type call.
204 (reference_binding): Likewise.
205 (build_op_delete_call): Likewise.
206 (convert_like_real): Likewise.
207 * cvt.c (cp_convert_to_pointer): Likewise.
208 (convert_to_reference): Likewise.
209 * pt.c (convert_nontype_argument): Likewise.
210 * typeck.c (build_binary_op): Likewise.
211 (build_ptrmemfunc): Likewise.
212 (convert_for_assignment): Likewise.
214 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
216 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
217 (current_aggr): Define.
218 * decl.c (grokdeclarator): Make sure a friend class is an
219 elaborated type specifier.
220 * parse.y (current_aggr): Remove static definition.
221 (cp_parse_init): Adjust.
222 (structsp): Clear and restore current_aggr.
223 (component_decl_list): Clear current_aggr.
225 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
226 aggregate tag on the typename's context.
228 * pt.c (tsubst_friend_class): Return error_mark_node, if
230 (instantiate_class_template): Ignore error_mark_node friend types.
232 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
234 * cvt.c (warn_ref_binding): New static function, broken out of ...
235 (convert_to_reference): ... here. Use it.
237 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
239 * parse.y (template_arg): Add rule for template qualified with
242 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
244 * decl2.c (add_function): Reorganize.
245 (arg_assoc): Do not consider function template decls.
247 2000-08-11 Jason Merrill <jason@redhat.com>
249 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
252 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
254 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
255 (lookup_nested_tag): Likewise.
257 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
260 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
262 * parse.y (named_complex_class_head_sans_basetype): Remove
265 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
267 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
268 explicit TEMPLATE_ID_EXPR args.
269 (build_expr_from_tree, case CALL_EXPR): Likewise.
271 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
273 * decl.c (check_tag_decl): Diagnose typename's which don't
276 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
278 * init.c (build_aggr_init): Reject bogus array initializers
281 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
283 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
285 * cp/tinfo.cc (__dynamic_cast): Likewise.
286 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
288 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
290 * cvt.c (convert_to_pointer_force): Fix error message when
291 attempting to cast from ambiguous base.
293 2000-08-08 Jason Merrill <jason@redhat.com>
295 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
296 (tsubst_template_arg_vector): Likewise.
298 * decl2.c (build_anon_union_vars): Choose the largest field; don't
299 assume that one will be as large as the union.
301 2000-08-07 Kazu Hirata <kazu@hxi.com>
303 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
304 * decl.c (pop_labels): Likewise.
306 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
308 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
310 (__pointer_to_member_type_info): Likewise.
311 (__base_class_info): Likewise.
312 (__class_type_info): Likewise.
313 (__si_class_type_info): Likewise.
314 (__vmi_class_type_info): Likewise.
315 * tinfo.cc (__si_class_type_info::__do_find_public_src):
316 Changed member names to match specifications.
317 (__vmi_class_type_info::__do_find_public_src): Likewise.
318 (__si_class_type_info::__do_dyncast): Likewise.
319 (__vmi_class_type_info::__do_dyncast): Likewise.
320 (__si_class_type_info::__do_upcast): Likewise.
321 (__vmi_class_type_info::__do_upcast): Likewise.
322 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
323 (__pbase_type_info::__pointer_catch): Likewise.
324 (__pointer_type_info::__pointer_catch): Likewise.
325 (__pointer_to_member_type_info::__pointer_catch): Likewise.
328 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
330 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
331 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
332 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
334 2000-08-04 Mark Mitchell <mark@codesourcery.com>
336 * cp-tree.h (add_method): Change prototype.
337 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
338 Don't double the size of the method vector in the error case.
339 (handle_using_decl): Adjust call to add_method.
340 (add_implicitly_declared_members): Likewise.
341 (clone_function_decl): Likewise.
342 * decl2.c (check_classfn): Likewise.
343 * semantics.c (finish_member_declaration): Likewise.
345 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
347 * decl.c (flag_isoc94): New variable.
349 2000-08-02 Jason Merrill <jason@redhat.com>
351 * pt.c (do_type_instantiation): Add complain parm; don't complain
352 if called recursively.
353 * cp-tree.h, parse.y: Adjust.
355 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
357 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
358 -Wno-strict-prototypes.
360 * g++spec.c: Adjust type of second argument to
361 lang_specific_driver, and update code as necessary.
363 * cp-tree.h: Don't prototype min_precision here.
364 (my_friendly_assert): Cast expression to void.
365 * semantics.c (do_poplevel): Initialize scope_stmts.
367 2000-08-02 Mark Mitchell <mark@codesourcery.com>
369 * cp-tree.h (DECL_NEEDED_P): Tweak.
371 2000-07-28 Jason Merrill <jason@redhat.com>
373 * lang-specs.h: Use %i in rule for .ii files.
375 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
377 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
379 2000-07-30 Mark Mitchell <mark@codesourcery.com>
381 Allow indirect primary bases.
382 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
384 (CLASSTYPE_VFIELD_PARENT): Remove.
385 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
386 (BINFO_PRIMARY_BINFO): Remove.
387 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
388 (BINFO_VBASE_PRIMARY_P): Likewise.
389 (BINFO_PRIMARY_BASE_OF): New macro.
390 (BINFO_INDIRECT_PRIMARY_P): Likewise.
391 (get_primary_binfo): New function.
392 * decl.c (lang_mark_tree): Make lang_type::primary_base.
393 * class.c (vcall_offset_data_s): Rename to ...
394 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
396 (get_derived_offset): Use get_primary_binfo.
397 (dfs_mark_primary_bases): Adjust handling of virtual primary
399 (mark_primary_bases): Likewise.
400 (set_primary_base): Take a binfo, not an integer, as a
401 representation of the primary base.
402 (indirect_primary_base_p): Remove.
403 (determine_primary_base): Adjust for indirect primary bases.
404 (dfs_find_final_overrider): Fix typo in coment.
405 (update_vtable_entry_for_fn): Use get_primary_binfo.
406 (layout_nonempty_base_or_field): Tweak.
407 (build_base_fields): Adjust for new primary base semantics.
408 (dfs_propagate_binfo_offsets): Remove.
409 (propagate_binfo_offsets): Rewrite.
410 (dfs_set_offset_for_shared_vbases): Remove.
411 (layout_virtual_bases): Don't use it.
412 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
414 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
415 CLASSTYPE_VFIELD_PARENT.
416 (dfs_get_primary_binfo): New function.
417 (get_primary_binfo): Likewise.
418 (dump_class_hierarchy_r): Tweak printing of primary bases.
419 (build_vtbl_initializer): Fix typo in comments. Use
421 (build_vcall_and_vbase_vtbl_entries): Likewise.
422 (build_vbaes_offset_vtbl_entries): Likewise.
423 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
424 BV_VCALL_INDEX to handle indirect primary bases.
425 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
426 (build_rtti_vtbl_entries): Likewise.
427 * search.c (get_shared_vbase_if_not_primary): Tweak.
428 (find_vbase_instance): Likewise.
429 (binfo_for_vtable): Simplify.
430 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
431 (make_binfo): Make it have 11 entries.
433 2000-07-30 Alex Samuel <samuel@codesourcery.com>
435 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
436 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
437 ascertaining primaryness.
438 (G): Remove template_args.
439 (decl_is_template_id): New function.
440 (write_encoding): Use decl_is_template_id.
441 (write_name): Likewise. Handle type_decls. Get main variant of
443 (write_nested_name): Likewise.
444 (write_prefix): Likewise.
445 (write_template_prefix): Likewise.
446 (write_special_name_constructor): Remove defunct production from
448 (write_bare_function_type): Remove comment about absent parameter.
449 (write_template_template_arg): Add missing grammar production to
452 2000-07-27 Jason Merrill <jason@redhat.com>
454 * decl.c (duplicate_decls): If common_type produces a non-typedef
455 type for a typedef, just use the old type.
457 2000-07-27 Mark Mitchell <mark@codesourcery.com>
459 * cp-tree.h (function_depth): Declare.
460 (verify_stmt_tree): Likewise.
461 (find_tree): Likewise.
462 * decl.c (function_depth): Give it external linkage.
463 * optimize.c (optimize_function): Increment and decrement it.
464 * tree.c (verify_stmt_tree_r): New function.
465 (verify_stmt_tree): Likewise.
466 (find_tree_r): Likewise.
467 (find_tree): Likewise.
469 2000-07-27 Jason Merrill <jason@redhat.com>
471 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
473 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
475 2000-07-26 Mark Mitchell <mark@codesourcery.com>
477 * decl.c (start_cleanup_fn): Mark the function as `inline'.
478 * decl2.c (get_guard): Call cp_finish_decl, not
479 rest_of_decl_compilation, for local guards.
480 * lex.c (do_identifier): Remove unused variable.
482 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
484 * parse.y: Add missing ';'.
486 2000-07-26 Mark Mitchell <mark@codesourcery.com>
488 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
491 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
493 Kill strict_prototype. Backwards compatibility only for
494 non NO_IMPLICIT_EXTERN_C systems.
495 * cp-tree.h (flag_strict_prototype): Remove.
496 (strict_prototype): Remove.
497 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
498 * decl.c (maybe_push_to_top_level): Adjust.
499 (pop_from_top_level): Adjust.
500 (decls_match): Only allow sloppy parm matching for ancient
502 (init_decl_processing): Adjust.
503 (grokdeclarator): Adjust.
504 * decl2.c (flag_strict_prototype): Remove.
505 (strict_prototype): Remove.
506 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
507 (lang_f_options): Remove "strict-prototype".
508 (unsupported-options): Add "strict-prototype".
509 * lex.c (do_identifier): Adjust.
510 (do_scoped_id): Adjust.
511 * parse.y (empty_parms): Adjust.
512 * class.c (push_lang_context): Adjust.
513 (pop_lang_context): Adjust.
514 * typeck.c (comp_target_parms): Adjust.
516 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
518 * decl.c (poplevel): Deal with anonymous variables at for scope.
519 (maybe_inject_for_scope_var): Likewise.
521 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
523 * decl.c: Remove all signal handling code, now done in toplev.c.
525 2000-07-23 Mark Mitchell <mark@codesourcery.com>
527 * decl.c (make_rtl_for_nonlocal_decl): Rework.
529 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
532 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
534 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
535 Define my_friendly_assert and my_friendly_abort as macros
536 which may call friendly_abort. Prototype friendly abort, not
537 my_friendly_abort or my_friendly_assert.
538 * decl.c (signal_catch): Report the signal caught in the error
539 message. Call fatal directly.
540 * typeck2.c (ack, my_friendly_assert): Delete.
541 (my_friendly_abort): Rename to friendly_abort. Expect file,
542 line, and function parameters. Report the abort code, then
543 call fancy_abort. Do not mask an abort if errors have
546 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
548 * typeck.c (comp_target_parms): Remove obsolete parameter.
549 (comp_target_types): Adjust.
551 2000-07-17 Jason Merrill <jason@redhat.com>
553 * typeck.c (mark_addressable): Never set TREE_USED.
554 * call.c (build_call): Don't abort on calls to library functions
555 that have been declared normally.
557 * typeck.c (build_binary_op): Fix grammar in warning.
559 * exception.cc (__eh_free): Fix prototype.
561 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
563 * decl.c (pushdecl): Handle seeing an OVERLOAD in
564 IDENTIFIER_NAMESPACE_VALUE.
566 2000-07-16 Mark Mitchell <mark@codesourcery.com>
568 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
569 * method.c (use_thunk): Correct handling of vcall offsets.
571 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
573 * .cvsignore: parse.h and parse.c have no cp- prefix.
575 2000-07-13 Mark Mitchell <mark@codesourcery.com>
577 * .cvsignore: New file.
579 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
581 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
583 2000-07-12 Mark Mitchell <mark@codesourcery.com>
585 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
589 2000-07-11 Mark Mitchell <mark@codesourcery.com>
591 * class.c (layout_class_type): Add pointers to virtual bases after
592 base classes under the old ABI.
594 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
596 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
597 (finish_continue_stmt): Likewise.
598 (begin_for_stmt): Remove call to note_level_for_for.
599 (finish_goto_stmt): Change call from build_min_nt
601 (finish_expr_stmt): Likewise.
602 (begin_if_stmt): Likewise.
603 (begin_while_stmt): Likewise.
604 (finish_while_stmt): Likewise.
605 (finish_return_stmt): Likewise.
606 (begin_for_stmt): Likewise.
607 (finish_for_stmt): Likewise.
608 (finish_break_stmt): Likewise.
609 (begin_switch_stmt): Likewise.
610 (finish_case_label): Likewise.
611 (genrtl_try_block): Likewise.
612 (begin_try_block): Likewise.
613 (begin_handler): Likewise.
614 (begin_compound_stmt): Likewise.
615 (finish_asm_stmt): Likewise.
616 (finish_label_stmt): Likewise.
617 (add_decl_stmt): Likewise.
618 (finish_subobject): Likewise.
619 (finish_decl_cleanup): Likewise.
620 (finish_named_return_value): Likewise.
621 (setup_vtbl_ptr): Likewise.
622 (add_scope_stmt): Likewise.
623 * decl.c (finish_constructor_body): Likewise.
624 (finish_destructor_body): Likewise.
625 * optimize.c (copy_body_r): Likewise.
626 (initialize_inlined_parameters): Likewise.
627 (declare_return_variable): Likewise.
628 (expand_call_inline): Likewise.
630 2000-07-10 Jakub Jelinek <jakub@redhat.com>
632 * semantics.c (expand_body): Sync interface information
633 at the end of function body expansion.
635 2000-07-09 Jason Merrill <jason@redhat.com>
637 * init.c (build_new_1): Bail early if the call to new fails.
639 * decl.c (compute_array_index_type): Check specifically for
640 an INTEGER_CST, not just TREE_CONSTANT.
642 * decl.c (duplicate_decls): Don't call duplicate_decls on
643 the DECL_TEMPLATE_RESULT.
644 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
647 * error.c (dump_template_bindings): Don't crash if we had an
648 invalid argument list.
650 * typeck.c (c_expand_start_case): Do narrowing here.
651 * semantics.c (finish_switch_cond): Not here.
653 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
655 * parse.y (asm_clobbers): Do string concatenation.
657 2000-07-09 Mark Mitchell <mark@codesourcery.com>
659 * decl.c (pushtag): Don't put local classes in template functions
660 on the local_classes list.
662 2000-07-04 Scott Snyder <snyder@fnal.gov>
664 * decl2.c (get_guard): Add missing return for old ABI local
667 2000-07-09 Mark Mitchell <mark@codesourcery.com>
669 * cp-tree.h (char_type_p): New function.
670 * decl.c (init_decl_processing): Don't initialize
671 signed_wchar_type_node or unsigned_wchar_type_node.
672 (complete_array_type): Handle brace-enclosed string-constants.
673 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
674 * tree.c (char_type_p): New function.
675 * typeck2.c (digest_init): Use char_type_p.
677 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
679 * pt.c (tsubst): Don't layout type, if it's error_mark.
681 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
683 * pt.c (instantiate_pending_templates): Reset template level.
685 2000-07-05 Jason Merrill <jason@redhat.com>
687 * call.c (joust): Don't complain about `operator char *()' beating
688 `operator const char *() const'.
690 2000-07-04 scott snyder <snyder@fnal.gov>
691 Jason Merrill <jason@redhat.com>
693 * repo.c (repo_get_id): Handle the case where a class with virtual
694 bases has a null TYPE_BINFO_VTABLE.
696 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
697 Jason Merrill <jason@redhat.com>
699 * parse.y (member_init): Just pass in the type.
700 * init.c (expand_member_init): Handle getting a type.
702 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
703 Jason Merrill <jason@redhat.com>
705 * decl.c (finish_function): Warn if a function has no return
707 Suggested by Andrew Koenig.
708 * typeck.c (check_return_expr): Do set current_function_returns_value
709 if we got an error_mark_node.
711 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
713 * decl2.c (push_decl_namespace): Push the original namespace.
715 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
717 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
718 * semantics.c (begin_class_definition): Clear it.
720 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
722 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
723 (genrtl_expr_stmt): Likewise.
724 (genrtl_decl_stmt): Likewise.
725 (genrtl_if_stmt): Likewise.
726 (genrtl_while_stmt): Likewise.
727 (genrtl_do_stmt): Likewise.
728 (genrtl_return_stmt): Likewise.
729 (genrtl_for_stmt): Likewise.
730 (genrtl_break_stmt): Likewise.
731 (genrtl_continue_stmt): Likewise.
732 (genrtl_scope_stmt): Likewise.
733 (genrtl_switch_stmt): Likewise.
734 (genrtl_case_label): Likewise.
735 (genrtl_begin_compound_stmt): Likewise.
736 (genrtl_finish_compound_stmt): Likewise.
737 (genrtl_compound_stmt): Likewise.
738 (genrtl_asm_stmt): Likewise.
740 * init.c (begin_init_stmts): Remove call to
741 genrtl_begin_compound_stmt.
742 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
744 * semantics.c (lang_expand_stmt): Changed call to
745 genrtl_compound_stmt to ignore return value.
747 2000-07-02 Mark Mitchell <mark@codesourcery.com>
749 * mangle.c (canonicalize_for_substitution): Return the canonical
752 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
754 * typeck.c (commonparms): Remove obstack manipulations.
756 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
758 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
760 * Makefile.in (OBJS): Added ../c-semantics.o.
763 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
765 (struct stmt_tree): Added comment.
766 (current_function_name_declared): Removed.
767 (stmts_are_full_exprs_p): Likewise.
768 (genrtl_do_pushlevel): Likewise.
769 (genrtl_clear_out_block): Likewise.
770 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
771 (DECL_ANON_UNION_ELEMS): Likewise.
772 (emit_local_var): Likewise.
773 (make_rtl_for_local_static): Likewise.
775 (expand_stmt): Likewise.
776 (genrtl_decl_cleanup): Likewise.
777 (c_expand_asm_operands): Likewise.
778 (c_expand_return): Likewise.
779 (c_expand_start_case): Likewise.
781 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
782 (emit_local_var): Likewise.
783 (initialize_local_var): Change reference to
784 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
785 Change reference to stmts_are_full_exprs_p to
786 current_stmt_tree->stmts_are_full_exprs_p.
787 (push_cp_function_context): Likewise.
789 * expect.c (expand_throw): Change reference to
790 stmts_are_full_exprs_p.
792 * init.c (build_aggr_init): Change reference to
793 stmts_are_full_exprs_p.
794 (build_vec_init): Likewise.
796 * optimize.c (maybe_clone_body): Change reference to
797 current_function_name_declared to
798 cp_function_chain->name_declared.
800 * pt.c (instantiate_decl): Change reference to
801 current_function_name_declared to
802 cp_function_chain->name_declared.
804 * semantics.c (expand_cond): Moved declaration to c-common.h.
805 (genrtl_do_pushlevel): Moved to c-semantics.c.
806 (genrtl_clear_out_block): Likewise.
807 (genrtl_goto_stmt): Likewise.
808 (genrtl_expr_stmt): Likewise.
809 (genrtl_decl_stmt): Likewise.
810 (gerntl_if_stmt): Likewise.
811 (genrtl_while_stmt): Likewise.
812 (genrtl_do_stmt): Likewise.
813 (genrtl_return_stmt): Likewise.
814 (genrtl_for_stmt): Likewise.
815 (genrtl_break_stmt): Likewise.
816 (genrtl_continue_stmt): Likewise.
817 (genrtl_scope_stmt): Likewise.
818 (genrtl_switch_stmt): Likewise.
819 (genrtl_case_label): Likewise.
820 (genrtl_begin_compound_stmt): Likewise.
821 (genrtl_finish_compound_stmt): Likewise.
822 (genrtl_compound_stmt): Likewise.
823 (genrtl_asm_stmt): Likewise.
824 (genrtl_decl_cleanup): Likewise.
825 (expand_cond): Likewise.
826 (expand_stmt): Renamed to ...
827 (lang_expand_stmt): ... this.
828 (lang_expand_expr_stmt): Initialize.
829 (set_current_function_name_declared): Likewise.
830 (stmts_are_full_exprs_p): Likewise.
831 (current_function_name_declared): Likewise.
832 (anon_aggr_type_p): Likewise.
833 (do_poplevel): Change reference to
834 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
835 Change reference to stmts_are_full_exprs_p to
836 current_stmt_tree->stmts_are_full_exprs_p.
837 (add_tree): Likewise.
838 (finish_expr_stmt): Likewise.
839 (prep_stmt): Likewise.
840 (lang_expand_stmt): Likewise.
841 (begin_compound_stmt): Change reference to
842 current_function_name_declared to
843 cp_function_chain->name_declared and call to
844 current_function_name_declared().
845 (setup_vtbl_ptr): Likewise.
846 (genrtl_do_poplevel): Removed.
848 2000-06-30 Jason Merrill <jason@redhat.com>
850 * init.c (init_init_processing): Go back to aligning like
851 double_type_node for old ABI.
852 (get_cookie_size): Make cookie larger if we get a type that needs
854 (build_vec_delete): Call it.
856 * typeck.c (qualify_type_recursive): New fn.
857 (composite_pointer_type): Use it.
858 (build_binary_op): Use composite_pointer_type.
860 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
861 Jason Merrill <jason@redhat.com>
863 * typeck.c (check_return_expr): Don't complain about returning
864 NULL from operator new if -fcheck-new.
865 * cp-tree.h: Declare flag_check_new here.
868 2000-06-28 Alex Samuel <samuel@codesourcery.com>
870 * mangle.c (find_substitution): Use same_type_p.
871 (write_encoding): Don't check for substitutions.
873 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
875 * parse.y (expr_no_comma_rangle): New non-terminal.
876 (template_parm): Use it for default parameter case.
877 (template_arg): Use it.
878 (expr_no_commas): Remove commented out undefined extensions.
879 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
880 * parse.h, parse.c: Rebuilt.
882 2000-06-30 Mark Mitchell <mark@codesourcery.com>
884 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
885 (finish_asm_stmt): Do it here, instead.
887 * cp-tree.h (ridpointers): Don't declare.
888 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
889 (record_builtin_java_type): Likewise.
890 (init_decl_processing): Likewise.
891 * lex.c: Move inclusion of lex.h.
892 (ridpointers): Don't define.
893 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
895 * lex.h (enum rid): Rename to ...
896 (enum cp_rid): ... this.
897 (ridpointers): Don't declare.
898 * parse.y: Move inclusion of lex.h.
899 * parse.c: Regenerated.
900 * spew.c: Move inclusion of lex.h.
902 * cp-tree.h (struct language_function): Remove temp_name_counter.
903 (temp_name_counter): Remove.
904 (get_temp_name): Change prototype.
905 (get_guard): New function.
906 (get_guard_cond): Likewise.
907 (set_guard): Likewise.
908 * cvt.c (build_up_reference): Adjust call to get_temp_name.
909 * decl.c (expand_static_init): Use get_guard and friends to
910 implement guard variables.
911 * decl2.c (get_temp_name): Assume that the variables created are
913 (get_sentry): Rename to ...
914 (get_guard): ... this. Implement new ABI guard variables.
915 (get_guard_bits): New function.
916 (get_guard_cond): Likewise.
917 (set_guard): Likewise.
918 (start_static_initialization_or_destruction): Use them.
919 (do_static_initialization): Replace sentry with guard throughout.
920 (do_static_destruction): Likewise.
921 * init.c (create_temporary_var): Add comment.
923 2000-06-28 Alex Samuel <samuel@codesourcery.com>
925 * mangle.c (find_substitution): Use same_type_p.
926 (write_encoding): Don't check for substitutions.
928 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
930 * parse.y (expr_no_comma_rangle): New non-terminal.
931 (template_parm): Use it for default parameter case.
932 (template_arg): Use it.
933 (expr_no_commas): Remove commented out undefined extensions.
934 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
935 * parse.h, parse.c: Rebuilt.
937 2000-06-29 Mark Mitchell <mark@codesourcery.com>
939 * cp-tree.h (flag_const_strings): Remove.
940 (warn_parentheses): Likewise.
941 (warn_format): Likewise.
942 (common_type): Likewise.
943 (default_conversion): Likewise.
944 (build_binary_op): Likewise.
945 (cp_build_binary_op): New macro.
946 * call.c (build_new_op): Use cp_build_binary_op instead of
948 * class.c (build_vtable_entry_ref): Likewise.
949 * decl.c (expand_static_init): Likewise.
950 (compute_array_index_type): Likewise.
951 (build_enumerator): Likewise.
952 * decl2.c (delete_sanity): Likewise.
953 (start_static_initialization_or_destruction): Likewise.
954 * error.c (dump_type_suffix): Likewise.
955 * init.c (resolve_offset_ref): Likewise.
956 (build_new): Likewise.
957 (build_new_1): Likewise.
958 (build_vec_delete_1): Likewise.
959 (build_vec_init): Likewise.
960 (build_delete): Likewise.
961 * rtti.c (synthesize_tinfo_fn): Likewise.
962 (synthesize_tinfo_var): Likewise.
963 * search.c (expand_upcast_fixups): Likewise.
964 (fixup_all_virtual_upcast_offsets): Likewise.
965 * typeck.c (build_array_ref): Likewise.
966 (get_member_function_from_ptrfunc): Likewise.
967 (build_binary_op): Add parameter.
968 (pointer_int_sum): Use cp_build_binary_op.
969 (pointer_diff): Likewise.
970 (build_modify_expr): Likewise.
971 (get_delta_difference): Likewise.
972 (build_ptrmemfunc): Likewise.
974 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
976 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
977 * decl.c (create_implicit_typedef): Adjust.
978 * decl2.c (build_artificial_parm): Adjust.
979 * method.c (implicitly_declare_fn): Adjust.
980 * pt.c (push_inline_template_parms_recursive): Adjust.
981 (process_template_parm): Adjust.
982 (overloaded_template_name): Adjust.
983 * semantics.c (finish_template_template_parm): Adjust.
985 2000-06-28 Mark Mitchell <mark@codesourcery.com>
987 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
988 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
989 where to emit thunks.
990 (build_vtt): Adjust call to build_vtt_inits.
991 (build_vtt_inits): Add parameter to indicate whether or not
992 sub-VTTs for virtual bases should be included. Adjust handling of
993 construction vtables.
994 (get_matching_base): New function.
995 (dfs_build_vtt_inits): Rename to ...
996 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
997 construction vtables.
998 (dfs_fixup_binfo_vtbls): Likewise.
999 (build_ctor_vtbl_groups): Build construction vtables for virtual
1001 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
1002 to build construction vtbls.
1003 (dfs_accumulate_vtbl_inits): Adjust handling of
1004 construction vtables.
1006 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
1009 2000-06-27 Mark Mitchell <mark@codesourcery.com>
1011 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
1013 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
1015 * search.c (hides): Remove.
1016 (is_subobject_of_p): Add most_derived parameter. Use
1018 (lookup_field_queue_p): Adjust.
1019 (lookup_field_r): Adjust.
1021 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
1023 * decl2.c (handle_class_head): Bash typedefs to the type's main
1026 2000-06-25 Mark Mitchell <mark@codesourcery.com>
1028 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
1029 (begin_global_stmt_expr): ... this.
1030 (genrtl_finish_stmt_expr): Rename to ...
1031 (finish_global_stmt_expr): ... this.
1032 * init.c (begin_init_stmts): Adjust calls.
1033 (finish_init_stmts): Likewise.
1034 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
1035 (begin_global_stmt_expr): ... this.
1036 (genrtl_finish_stmt_expr): Rename to ...
1037 (finish_global_stmt_expr): ... this.
1039 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1041 * search.c (lookup_member): Fix typo in comment.
1043 2000-06-24 Jason Merrill <jason@redhat.com>
1045 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
1046 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
1048 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1050 * parse.y (complex_direct_notype_declarator): Support global_scope.
1051 * Makefile.in: Adjust conflict count.
1053 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1055 * parse.y (template_arg): Convert TEMPLATE_DECL
1056 that is a template template paramter to
1057 TEMPLATE_TEMPLATE_PARM here.
1059 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
1060 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
1061 (copy_template_template_parm): Adjust prototype.
1062 * decl.c (grokdeclarator): Remove dead code.
1063 * pt.c (process_template_parm): Tidy.
1064 (lookup_template_class): Construct nodes in
1065 copy_template_template_parm.
1066 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
1067 lookup_template_class. Use TYPE_TI_TEMPLATE.
1068 * tree.c (copy_template_template_parm): Add NEWARGS
1070 (mapcar): Adjust call to copy_template_template_parm.
1071 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
1072 * method.c (build_template_template_parm_names): Change error
1073 code to avoid compilation warning.
1075 * gxxint.texi: Document template template parameter
1078 2000-06-21 Alex Samuel <samuel@codesourcery.com>
1080 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
1081 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
1082 (cp-demangle.o): New rule.
1083 (dyn-string.o): Likewise.
1084 * inc/cxxabi.h (__cxa_demangle): New declaration.
1086 2000-06-22 Mark Mitchell <mark@codesourcery.com>
1088 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
1089 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
1090 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
1092 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
1093 (make_thunk): Change prototype.
1094 (emit_thunk): Rename to use_thunk.
1095 (mangle_thunk): Change prototype.
1096 * class.c (get_derived_offset): Simplify.
1097 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
1098 BV_GENERATE_THUNK_WITH_VTABLE_P.
1099 (build_primary_vtable): Simplify.
1100 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
1101 (dfs_find_base): Remove.
1102 (update_vtable_entry_for_fn): Correct bug in finding the base
1103 where a virtual function was first declared. Figure out whether
1104 or not to emit a vcall-thunk with the vtables in which it appears.
1105 Correct logic for deciding whether to use an ordinary thunk, or a
1107 (finish_struct_1): Remove unnecssary code.
1108 (build_vtbl_initializer): Use ssize_int for the running counter of
1110 (build_vtbl_initializer): Only use vcall thunks where necessary.
1111 Mark thunks as needing to be emitted with their vtables, or not.
1112 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
1113 indices. Use size_binop.
1114 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
1115 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
1117 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
1118 (build_vtable_entry): Mark thunks as needing to be emitted with
1119 their vtables, or not.
1120 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
1121 * decl2.c (mark_vtable_entries): Use use_thunk instead of
1123 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
1125 * error.c (dump_expr): Use BV_FN.
1126 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
1128 * method.c (make_thunk): Likewise.
1129 (emit_thunk): Rename to use_thunk. Allow callers to decide
1130 whether or not to actually emit the thunk. Adjust for changes in
1131 representation of vcall offsets.
1132 * search.c (dfs_get_pure_virtuals): Use BV_FN.
1133 * semantics.c (emit_associated_thunks): New function.
1134 (expand_body): Use it.
1135 * ir.texi: Adjust decriptions of thunks.
1137 2000-06-22 Jason Merrill <jason@redhat.com>
1139 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
1140 (tsubst_friend_function): Copy it here.
1142 * decl.c (grok_op_properties): Fix typo.
1144 * decl2.c (delete_sanity): Clarify warning, avoid failure on
1147 * pt.c (check_explicit_specialization): Clarify error.
1149 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
1150 an old OVERLOAD when we're declaring a non-function.
1151 (pushdecl, destroy_local_var): Check for error_mark_node.
1152 (warn_extern_redeclared_static): Also bail early if
1154 (push_overloaded_decl): Ignore an old error_mark_node.
1156 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
1158 * call.c (build_x_va_arg): Check if in a template decl.
1159 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
1161 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
1163 * class.c (push_lang_context): TYPE_NAME gets you to the Java
1165 * decl.c (check_goto): Computed gotos assumed OK.
1167 2000-06-20 Jason Merrill <jason@redhat.com>
1169 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
1170 for which we don't need to look for instantiations.
1172 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
1174 * parse.y (program): Always call finish_translation_unit.
1175 * parse.c, parse.h: Rebuilt.
1177 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
1179 * method.c: Don't include hard-reg-set.h.
1181 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
1183 * rtti.c (get_base_offset): Cope when vbase field is in a base.
1185 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
1187 * call.c (build_conditional_expr): Use VOID_TYPE_P.
1188 * cvt.c (cp_convert_to_pointer): Likewise.
1189 (convert_to_void): Likewise.
1190 * error.c (dump_expr): Likewise.
1191 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
1192 * init.c (build_delete): Likewise.
1193 * method.c (emit_thunk): Likewise.
1194 * optmize.c (declare_return_variable): Likewise.
1195 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1196 (get_typeid): Likewise.
1197 (build_dynamic_cast_1): Likewise.
1198 * typeck.c (composite_pointer_type): Likewise.
1199 (common_type): Likewise.
1200 (build_indirect_ref): Likewise.
1201 (build_binary_op): Likewise.
1202 (build_x_compound_expr): Likewise.
1203 (check_return_expr): Likewise.
1204 * typeck2.c (add_exception_specifier): Likewise.
1206 * mangle.c (write_method_parms): Use direct comparison for end
1209 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
1211 * cp-tree.h (genrtl_try_block): Declare function.
1212 (genrtl_handler): Likewise.
1213 (genrtl_catch_block): Likewise.
1214 (genrtl_ctor_stmt): Likewise.
1215 (genrtl_subobject): Likewise.
1216 (genrtl_decl_cleanup): Likewise.
1217 (genrtl_do_poplevel): Likewise.
1218 (genrtl_do_pushlevel): Likewise.
1219 (genrtl_clear_out_block): Likewise.
1220 (genrtl_goto_stmt): Likewise.
1221 (genrtl_expr_stmt): Likewise.
1222 (genrtl_decl_stmt): Likewise.
1223 (genrtl_if_stmt): Likewise.
1224 (genrtl_while_stmt): Likewise.
1225 (genrtl_do_stmt): Likewise.
1226 (genrtl_return_stmt): Likewise.
1227 (genrtl_for_stmt): Likewise.
1228 (genrtl_break_stmt): Likewise.
1229 (genrtl_continue_stmt): Likewise.
1230 (genrtl_scope_stmt): Likewise.
1231 (genrtl_switch_stmt): Likewise.
1232 (genrtl_case_label): Likewise.
1233 (genrtl_begin_compound_stmt): Likewise.
1234 (genrtl_finish_compound_stmt): Likewise.
1235 (genrtl_compound_stmt): Likewise.
1236 (genrtl_asm_stmt): Likewise.
1237 (genrtl_named_return_value): Likewise.
1238 (genrtl_begin_stmt_expr): Likewise.
1239 (genrtl_finish_stmt_expr): Likewise.
1240 (finish_for_stmt): Removed first argument.
1241 (finish_switch_stmt): Likewise.
1243 * semantics.c (genrtl_try_block): Define function.
1244 (genrtl_handler): Likewise.
1245 (genrtl_catch_block): Likewise.
1246 (genrtl_ctor_stmt): Likewise.
1247 (genrtl_subobject): Likewise.
1248 (genrtl_decl_cleanup): Likewise.
1249 (genrtl_do_poplevel): Likewise.
1250 (genrtl_do_pushlevel): Likewise.
1251 (genrtl_clear_out_block): Likewise.
1252 (genrtl_goto_stmt): Likewise.
1253 (genrtl_expr_stmt): Likewise.
1254 (genrtl_decl_stmt): Likewise.
1255 (genrtl_if_stmt): Likewise.
1256 (genrtl_while_stmt): Likewise.
1257 (genrtl_do_stmt): Likewise.
1258 (genrtl_return_stmt): Likewise.
1259 (genrtl_for_stmt): Likewise.
1260 (genrtl_break_stmt): Likewise.
1261 (genrtl_continue_stmt): Likewise.
1262 (genrtl_scope_stmt): Likewise.
1263 (genrtl_switch_stmt): Likewise.
1264 (genrtl_case_label): Likewise.
1265 (genrtl_begin_compound_stmt): Likewise.
1266 (genrtl_finish_compound_stmt): Likewise.
1267 (genrtl_compound_stmt): Likewise.
1268 (genrtl_asm_stmt): Likewise.
1269 (genrtl_named_return_value): Likewise.
1270 (genrtl_begin_stmt_expr): Likewise.
1271 (genrtl_finish_stmt_expr): Likewise.
1272 (finish_for_stmt): Removed first argument and generate rtl
1274 (finish_switch_stmt): Likewise.
1275 (do_poplevel): Removed generate rtl specific code.
1276 (do_pushlevel): Likewise.
1277 (add_tree): Likewise.
1278 (finish_goto_stmt): Likewise.
1279 (finish_expr_stmt): Likewise.
1280 (begin_if_stmt): Likewise.
1281 (finish_if_stmt_cond): Likewise.
1282 (finish_then_clause): Likewise.
1283 (begin_else_clause): Likewise.
1284 (finish_else_clause): Likewise.
1285 (finish_if_stmt): Likewise.
1286 (clear_out_block): Likewise.
1287 (begin_while_stmt): Likewise.
1288 (finish_while_stmt_cond): Likewise.
1289 (finish_while_stmt): Likewise.
1290 (begin_do_stmt): Likewise.
1291 (finish_do_body): Likewise.
1292 (finish_do_stmt): Likewise.
1293 (finish_return_stmt): Likewise.
1294 (begin_for_stmt): Likewise.
1295 (finish_for_init_stmt): Likewise.
1296 (finish_for_cond): Likewise.
1297 (finish_for_expr): Likewise.
1298 (finish_break_stmt): Likewise.
1299 (finish_continue_stmt): Likewise.
1300 (begin_switch_stmt): Likewise.
1301 (finish_switch_cond): Likewise.
1302 (finish_case_label): Likewise.
1303 (begin_try_block): Likewise.
1304 (begin_function_try_block): Likewise.
1305 (finish_try_block): Likewise.
1306 (finish_cleanup_try_block): Likewise.
1307 (finish_cleanup): Likewise.
1308 (finish_function_try_block): Likewise.
1309 (finish_handler_sequence): Likewise.
1310 (finish_function_handler_sequence): Likewise.
1311 (begin_handler): Likewise.
1312 (finish_handler_parms): Likewise.
1313 (begin_catch_block): Likewise.
1314 (finish_handler): Likewise.
1315 (begin_compound_stmt): Likewise.
1316 (finish_compound_stmt): Likewise.
1317 (finish_asm_stmt): Likewise.
1318 (finish_label_stmt): Likewise.
1319 (finish_label_decl): Likewise.
1320 (finish_subobject): Likewise.
1321 (finish_decl_cleanup): Likewise.
1322 (finish_named_return_value): Likewise.
1323 (begin_stmt_expr): Likewise.
1324 (finish_stmt_expr): Likewise.
1326 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
1327 to call genrtl_expr_stmt when appropriate.
1329 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
1330 begin_compound_expr to call genrtl_begin_stmt_expr and
1331 genrtl_begin_compound_expr when appropriate.
1332 (finish_init_stmts): Changed calls to finish_compound_expr and
1333 finish_stmt_expr to call genrtl_finish_compound_expr and
1334 genrtl_finish_stmt_expr when appropriate.
1335 (expand_default_init): Changed call to finish_expr_stmt to call
1336 genrtl_expr_stmt when appropriate.
1337 (build_vec_init): Likewise.
1339 * parse.y (simple_stmt): Removed first argument from call to
1340 finish_for_stmt. Removed first argument from call to
1343 * parse.c: Regenerated.
1345 * pt.c (tsubst_expr): Removed first argument from call to
1346 finish_for_stmt. Removed first argument from call to
1349 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
1351 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
1352 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
1354 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
1355 (cplus_tree_code_length[]): Likewise.
1356 (cplus_tree_code_name[]): Likewise.
1357 (init_parse): Added call to add_c_tree_codes. Changed
1358 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
1360 2000-06-16 Mark Mitchell <mark@codesourcery.com>
1362 * cp-tree.h (finish_mem_initializers): Declare.
1363 (count_trees): Likewise.
1364 * parse.y (base_init): Use finish_mem_initializers.
1365 * semantics.c (finish_mem_initializers): New function.
1367 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
1368 the number of trees.
1370 (count_trees): Don't use it.
1372 2000-06-15 Jason Merrill <jason@redhat.com>
1374 * tree.c (count_trees): New debugging function.
1376 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
1377 * init.c (build_member_call): Pull out the name of a DECL.
1379 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
1380 * semantics.c (expand_body): Push to TV_INTEGRATION here.
1381 * optimize.c (optimize_function): Not here.
1382 * pt.c (instantiate_decl): Push to TV_PARSE.
1384 2000-06-15 Mark Mitchell <mark@codesourcery.com>
1386 * cp-tree.h (struct language_function): Remove x_base_init_list
1387 and x_member_init_list.
1388 (current_base_init_list): Remove.
1389 (current_member_init_list): Likewise.
1390 (setup_vtbl_ptr): Change prototype.
1391 (emit_base_init): Likewise.
1392 (expand_member_init): Likewise.
1393 (reinit_parse_for_function): Remove.
1394 * decl.c (save_function_data): Don't clear x_base_init_list and
1396 (mark_language_function): Don't mark them.
1397 * init.c (perform_member_init): Tweak comment.
1398 (sort_member_init): Take the list of initializers as an argument.
1399 (sort_base_init): Likewise.
1400 (emit_base_init): Likewise.
1401 (expand_member_init): Return the initializer. Don't use global
1403 * lex.c (reinit_parse_for_function): Remove.
1404 * method.c (build_template_parm_names): Correct substitution.
1405 (do_build_copy_constructor): Don't use current_member_init_list
1406 and current_base_init_list.
1407 (synthesize_method): Likewise.
1408 * parse.y (base_init): Split mem-initializers into
1409 base-initializers and field-initializers.
1410 (member_init_list): Build up the list here.
1411 (member_init): Return the initializer.
1412 (fn.depfn): Don't use reinit_parse_for_function.
1413 * parse.c: Regenerated.
1414 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
1416 (tsubst_expr): Don't use current_member_init_list
1417 and current_base_init_list.
1418 (tsubst_expr_values): Rename to ...
1419 (tsubst_initializer_list): ... this. Use convert_from_reference.
1420 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
1421 and current_base_init_list.
1422 (begin_function_definition): Don't call reinit_parse_for_function.
1424 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
1426 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
1429 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
1431 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
1433 * cp-tree.h (IF_COND): Move to c-common.h.
1434 (THEN_CLAUSE): Likewise.
1435 (ELSE_CLAUSE): Likewise.
1436 (WHILE_COND): Likewise.
1437 (WHILE_BODY): Likewise.
1438 (DO_COND): Likewise.
1439 (DO_BODY): Likewise.
1440 (RETURN_EXPR): Likewise.
1441 (EXPR_STMT_EXPR): Likewise.
1442 (FOR_INIT_STMT): Likewise.
1443 (FOR_COND): Likewise.
1444 (FOR_EXPR): Likewise.
1445 (FOR_BODY): Likewise.
1446 (SWITCH_COND): Likewise.
1447 (SWITCH_BODY): Likewise.
1448 (CASE_LOW): Likewise.
1449 (CASE_HIGH): Likewise.
1450 (GOTO_DESTINATION): Likewise.
1451 (COMPOUND_BODY): Likewise.
1452 (ASM_CV_QUAL): Likewise.
1453 (ASM_STRING): Likewise.
1454 (ASM_OUTPUTS): Likewise.
1455 (ASM_INPUTS): Likewise.
1456 (ASM_CLOBBERS): Likewise.
1457 (DECL_STMT_DECL): Likewise.
1458 (STMT_EXPR_STMT): Likewise.
1459 (LABEL_STMT_LABEL): Likewise.
1460 (SCOPE_BEGIN_P): Likewise.
1461 (SCOPE_END_P): Likewise.
1462 (SCOPE_STMT_BLOCK): Likewise.
1463 (SCOPE_NULLIFIED_P): Likewise.
1464 (SCOPE_NO_CLEANUPS_P): Likewise.
1465 (SCOPE_PARTIAL_P): Likewise.
1466 (ASM_VOLATILE_P): Likewise.
1467 (STMT_LINENO): Likewise.
1468 (STMT_LINENO_FOR_FN_P): Likewise.
1470 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
1471 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
1472 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
1473 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
1474 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
1476 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
1478 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
1479 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
1481 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
1482 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
1483 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
1485 2000-06-14 Mark Mitchell <mark@codesourcery.com>
1487 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
1488 * class.c (dfs_find_final_overrider): Set it appropriately.
1489 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
1490 avoid unneeded secondary vptrs.
1492 2000-06-13 Jakub Jelinek <jakub@redhat.com>
1494 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
1495 (check_bitfield_decl, check_field_decl): Likewise.
1496 (build_vtbl_or_vbase_field, build_base_field): Likewise.
1497 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
1498 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
1499 (xfer_tag, finish_enum): Likewise.
1500 * decl2.c (finish_builtin_type): Likewise.
1501 * init.c (init_init_processing): Likewise.
1502 * pt.c (instantiate_class_template): Likewise.
1503 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
1504 * cp-tree.h (struct lang_type): Add user_align member.
1505 (CLASSTYPE_USER_ALIGN): Define.
1507 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1509 * Make-lang.in (c++.install-common): Install g++-cross in
1510 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
1511 $(target_alias)-g++ and $(target_alias)-c++.
1513 2000-06-12 Mark Mitchell <mark@codesourcery.com>
1515 * class.c (vcall_offset_data_s): Add last_init and fns.
1516 (overrides): Rename to same_signature_p.
1517 (dfs_find_final_overrider): Adjust accordingly.
1518 (mark_overriders): Likewise.
1519 (warn_hidden): Likewise.
1520 (build_vtbl_initializer): Reorganize machinery for building things
1521 at negative offsets.
1522 (build_vcall_and_vbase_vtbl_entries): Likewise.
1523 (build_vbase_offset_vtbl_entries): Likewise.
1524 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
1525 offset entries. Do not create two entries for functions with the
1527 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
1528 (build_rtti_vtbl_entries): Reorganize machinery for building things
1529 at negative offsets.
1531 * optimize.c (expand_call_inline): Don't recurse into the code
1532 used to initialize the parameters more than once.
1534 2000-06-11 Mark Mitchell <mark@codesourcery.com>
1536 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
1537 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
1538 (find_substitution): Only use the `Sa' substitution for
1539 std::allocator, not instantiations of it.
1540 (write_template_prefix): Move comment. Only use a TREE_LIST to
1541 represent substitutions for a member template.
1542 (write_array_type): Mangle array dimensions correctly.
1543 * optimize.c (maybe_clone_body): Copy more information from the
1545 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
1546 on the regenerated declaration.
1548 2000-06-11 Chip Salzenberg <chip@valinux.com>
1549 Mark Mitchell <mark@codesourcery.com>
1551 * class.c (build_vtable): Clarify comment.
1552 (build_ctor_vtbl_group): Pass the most derived type to
1555 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1557 * decl2.c (compare_options): Don't needlessly cast away const-ness.
1559 2000-06-10 Mark Mitchell <mark@codesourcery.com>
1561 * decl.c (add_binding): Handle duplicate declarations of external
1564 2000-06-09 Chip Salzenberg <chip@valinux.com>
1565 Mark Mitchell <mark@codesourcery.com>
1567 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
1569 (write_signed_number): New macro.
1570 (write_unsigned_number): Likewise.
1571 (write_source_name): Use them.
1572 (write_number): Handle signed and unsigned values.
1573 (write_integer_cst): Use tree_int_cst_sgn, and use
1574 write_unsigned_number or write_signed_number as appropriate.
1575 (write_discriminator): Use write_unsigned_number or
1576 write_signed_number as appropriate.
1577 (write_template_arg_literal): Likewise.
1578 (write_array_type): Use tree_low_cst.
1579 (write_template_parm): Use write_unsigned_number or
1580 write_signed_number as appropriate.
1581 (write_substitution): Adjust call to write_number.
1582 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
1583 (write_expression): Handle non-type template arguments of
1584 reference type correctly.
1585 (mangle_thunk): Use write_signed_number.
1587 2000-06-09 Chip Salzenberg <chip@valinux.com>
1589 * mangle.c (find_substition): Don't mangle objects with typename
1590 substitutions (e.g. "cin" as "Si").
1592 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
1594 * call.c (add_candidate): Use ggc_alloc_cleared.
1595 * decl.c (lookup_label): Likewise.
1596 * lex.c (retrofit_lang_decl): Likewise.
1598 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
1600 * semantics.c (expand_body): Push to TV_EXPAND.
1601 * optimize.c (optimize_function): Push to TV_INTEGRATION.
1602 * decl.c (start_function): Always call announce_function.
1604 * tinfo2.cc: Just declare abort.
1606 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
1608 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
1609 whenever @ is a symbolic name.
1611 2000-06-08 Jakub Jelinek <jakub@redhat.com>
1613 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
1615 2000-06-07 Mark Mitchell <mark@codesourcery.com>
1617 * decl.c (pushdecl): Look up functions by DECL_NAME, not
1618 DECL_ASSEMBLER_NAME.
1620 2000-06-06 Mark Mitchell <mark@codesourcery.com>
1622 * decl2.c (c_language): Define.
1624 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
1626 * lex.c (lang_init_options): Tweak.
1628 * decl2.c: Remove #inclusion of diagnostic.h
1629 (lang_decode_option): Move diagnostic formatting options to
1632 * lang-options.h: Remove documentation for diagnostic options.
1634 * Makefile.in (lex.o): Depends upon diagnostic.h
1636 2000-06-06 Mark Mitchell <mark@codesourcery.com>
1638 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
1639 the same DECL_RESULT, it's not a redefinition.
1640 * pt.c (tsubst_decl): Remove code to handle illegal
1643 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
1645 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
1647 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
1649 * search.c (maybe_suppress_debug_info): Don't check
1650 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
1652 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
1655 Remember instantiation context in deferred instantiations.
1656 * cp-tree.h (struct tinst_level): Remove.
1657 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
1658 * pt.c (current_tinst_level): Now a tree.
1659 (print_template_context, push_tinst_level, pop_tinst_level,
1660 tinst_for_decl): Adjust.
1661 (reopen_tinst_level): New fn.
1662 (init_pt): Register current_tinst_level as a root.
1663 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
1664 of the pending templates list.
1665 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
1666 * lex.c (extract_interface_info): Adjust.
1667 * decl2.c (warn_if_unknown_interface): Adjust.
1669 2000-06-05 Mark Mitchell <mark@codesourcery.com>
1671 * class.c (indirect_primary_base_p): New function.
1672 (determine_primary_base): Use it.
1674 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
1676 Update new-abi dynamic cast algorithm.
1677 * tinfo.cc (__class_type_info::__dyncast_result): Add
1678 whole_details. Adjust constructor.
1679 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
1680 Avoid unnecessary searching.
1681 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
1683 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1685 * decl.c (init_decl_processing): Don't call record_component_aliases.
1686 * tree.c (build_cplus_array_type_1): Likewise.
1688 2000-06-04 Mark Mitchell <mark@codesourcery.com>
1690 * ir.texi: Correct typo.
1691 * mangle.c (write_expression): Handle non-type template arguments
1692 with reference type.
1693 * method.c (build_overload_value): Likewise.
1694 * pt.c (convert_nontype_argument): Explicitly represent conversion
1695 to a reference with an ADDR_EXPR.
1696 (unify): Always unify arguments in left-to-right order.
1698 2000-06-03 Alex Samuel <samuel@codesourcery.com>
1699 Mark Mitchell <mark@codesourcery.com>
1701 * Make-lang.in (CXX_SRCS): Add mangle.c.
1702 * Makefile.in (CXX_OBJS): Add mangle.o.
1703 (mangle.o): New rule.
1705 * class.c (local_classes): New variable.
1706 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
1707 (get_vtt_name): Use mangle_vtt_name for new ABI.
1708 (init_class_processing): Initialize local_classes.
1709 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
1710 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
1711 (std_identifier): New macro.
1712 (DECL_VOLATILE_MEMFUNC_P): New macro.
1713 (DECL_NAMESPACE_STD_P): Likewise.
1714 (local_classes): Declare.
1715 (get_mostly_instantiated_function_type): Declare.
1716 (init_mangle): Declare.
1717 (mangle_decl): Likewise.
1718 (mangle_type_string): Likewise.
1719 (mangle_type): Likewise.
1720 (mangle_typeinfo_for_type): Likewise.
1721 (mangle_typeinfo_string_for_type): Likewise.
1722 (mangle_vtbl_for_type): Likewise.
1723 (mangle_vtt_for_type): Likewise.
1724 (mangle_ctor_vtbl_for_type): Likewise.
1725 (mangle_thunk): Likewise.
1726 (mangle_conv_op_name_for_type): Likewise.
1727 (mangle_guard_variable): Likewise.
1728 * decl.c (pushtag): Keep track of local classes.
1729 (initialize_predefined_identifiers): Initialize std_identifier.
1730 (init_decl_processing): Use std_identifier.
1731 (start_decl): Don't treat instantiations as specializations.
1732 (grokdeclarator): Likewise.
1733 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
1734 name for fully-instantiated templates.
1735 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
1736 destructors with the new ABI.
1737 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
1738 (grokfield): Use mangle_type for new ABI.
1739 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
1740 (get_sentry): Use mangle_guard_variable for new ABI.
1741 (start_static_initialization_or_destruction): Likewise.
1742 * expr.c (extract_aggr_init): Remove.
1743 (extract_scalar_init): Likewise.
1744 (extract_init): Remove #if 0'd code.
1745 * mangle.c: New function.
1746 * method.c (build_mangled_name): Assert not flag_new_abi.
1747 (build_static_name): Likewise.
1748 (build_decl_overload_real): Likewise.
1749 (build_typename_overload): Likewise.
1750 (build_overload_with_type): Likewise.
1751 (build_overload_name): Likewise.
1752 (get_ctor_vtbl_name): Likewise.
1753 (start_squangling): Likewise.
1754 (get_id_2): Likewise.
1755 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
1756 (init_method): Call init_mangle for new ABI.
1757 (make_thunk): Call mangle_thunk for new ABI.
1758 * operators.def: Correct new ABI manglings for the `%' operator.
1760 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
1761 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
1762 (lookup_template_class): Call mangle_decl for new ABI.
1763 (get_mostly_instantiated_function_type): New function.
1764 (set_mangled_name_for_template_decl): Use it.
1765 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
1766 the new ABI. Use mangle_conv_op_name_for_type for instantiated
1767 conversion op names.
1768 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
1769 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
1770 (tinfo_base_init): Likewise. Mangle typeinfo string name with
1771 mangle_typeinfo_string_for_type.
1773 2000-06-03 Mark Mitchell <mark@codesourcery.com>
1775 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
1776 (INNERMOST_TEMPLATE_ARGS): New macro.
1777 (innermost_args): Remove.
1778 (get_innermost_template_args): New function.
1779 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
1780 * error.c (dump_function_decl): Be caution when using
1781 most_general_template.
1782 * method.c (build_template_parm_names): Use
1783 INNERMOST_TEMPLATE_ARGS.
1784 * pt.c (add_to_template_args): Tidy comment
1785 (get_innermost_template_args): New function.
1786 (check_explicit_specialization): Clear DECL_INITIAL for a new
1788 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
1790 (push_template_decl): Always register specializations of the most
1792 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
1793 (coerce_template_parms): Likewise.
1794 (lookup_template_class): Likewise.
1795 (innermost_args): Remove.
1796 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
1797 (tsubst_decl): Handle tricky specializations. Use
1798 get_innermost_template_args.
1799 (instantiate_template): Simplify handling of partial
1801 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
1802 (most_general_template): Reimplement, in a more straightforward
1804 (regenerate_decl_from_template): Tweak formatting. Use
1805 TMPL_ARGS_DEPTH for clarity.
1806 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
1808 * dump.c (dequeue_and_dump): Dump information about thunks.
1810 2000-06-01 Richard Henderson <rth@cygnus.com>
1812 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
1814 2000-06-01 Richard Henderson <rth@cygnus.com>
1816 * decl2.c (unsupported_options): Fix typo, make const.
1817 (lang_decode_option): Fix bsearch argument order.
1819 2000-06-01 Mark Mitchell <mark@codesourcery.com>
1821 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
1824 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1826 * cp-tree.h (c_get_alias_set): Deleted.
1827 * Makefile.in (decl.o): Include ../expr.h.
1828 * decl.c (expr.h): Include.
1829 (init_decl_processing): Call record_component_aliases for arrays.
1830 (grokdeclarator): Likewise.
1831 Set TREE_ADDRESSABLE for fields that aren't bitfields.
1832 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
1834 2000-05-31 Mark Mitchell <mark@codesourcery.com>
1836 Remove guiding declaration support.
1837 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
1838 (flag_guiding_decls): Remove.
1839 * call.c (build_user_type_conversion_1): Remove support for
1841 (build_new_function_call): Likewise.
1842 (build_new_op): Likewise.
1843 (build_new_method_call): Likewise.
1844 * decl.c (start_function): Likewise.
1845 * friend.c (is_friend): Likewise.
1846 (do_friend): Likewise.
1847 * decl2.c ((flag_dump_translation_unit): Make it const.
1848 (flag_guiding_decls): Remove.
1849 (unsupported_options): New variable
1850 (compare_options): New function.
1851 (lang_decode_option): Use them.
1853 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
1855 * method.c (mangle_expression): Adjust test for legal expression
1858 * pt.c (instantiate_decl): Save and restore the local
1859 specializations list.
1861 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
1863 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
1865 2000-05-30 Mark Mitchell <mark@codesourcery.com>
1867 * call.c (add_template_candidate_real): Handle member template
1868 constructors for classes with virtual bases.
1869 (build_user_type_conversion_1): Use in_charge_arg_for_name.
1870 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
1872 * ir.texi: Update thunk documentation.
1874 * call.c (joust): Fix handling of overloaded builtin operators.
1876 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
1878 * cp-tree.h (DECL_ANTICIPATED): New macro.
1879 Document new use of DECL_LANG_FLAG_7.
1880 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
1881 in the user namespace.
1882 * lex.c (do_identifier): If the identifier's declaration has
1883 DECL_ANTICIPATED on, it has not yet been declared. But do not
1884 replace it with an ordinary implicit declaration.
1886 * tinfo2.cc: Include stdlib.h.
1888 2000-05-29 Mark Mitchell <mark@codesourcery.com>
1890 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
1891 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
1894 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
1896 * decl2.c (lang_decode_option): Use skip_leading_substring instead
1899 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
1901 * operators.def (<?): Duplicated, should have been...
1904 2000-05-27 Alex Samuel <samuel@codesourcery.com>
1905 Mark Mitchell <mark@codesourcery.com>
1907 * cp-tree.h (ansi_opname): Make it a macro.
1908 (ansi_assopname): Likewise.
1909 (struct lang_decl_flags): Add assignment_operator_p.
1910 (struct lang_decl): Add operator_code.
1911 (DECL_VTT_PARM): Adjust.
1912 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
1913 overloaded operator.
1914 (SET_OVERLOADED_OPERATOR_CODE): New macro.
1915 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
1916 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
1917 (opname_tab): Remove.
1918 (assignop_tab): Likewise.
1919 (operator_name_info_t): New type.
1920 (operator_name_info): New variable.
1921 (assignment_operator_name_info): Likewise.
1922 (build_cp_library_fn): Remove declaration.
1923 (push_cp_library_fn): Likewise.
1924 (operator_name_string): Likewise.
1925 (build_decl_overload): Likewise.
1926 * call.c (print_z_candidates): Simplify.
1927 (build_object_call): Adjust usage of ansi_opname. Use
1928 DECL_OVERLOADED_OPERATOR_P.
1929 (op_error): Adjust operator name lookup.
1930 (build_conditional_expr): Adjust usage of ansi_opname.
1931 (build_new_op): Likewise.
1932 (build_op_delete_call): Likewise.
1933 (build_over_call): Likewise.
1934 (joust): Use DECL_OVERLOADED_OPERATOR_P.
1935 * decl.c (duplicate_decls): Copy operator_code.
1936 (init_decl_processing): Adjust parameters to push_cp_library_fn.
1937 (builtin_function): Adjust parameters to build_library_fn_1.
1938 (build_library_fn_1): Accept an overloaded operator code.
1939 (build_library_fn): Pass ERROR_MARK.
1940 (build_cp_library_fn): Accept an overloaded operator code.
1941 (push_cp_library_fn): Likewise.
1942 (grokfndecl): Tweak.
1943 (grokdeclarator): Simplify code to compute names of overloaded
1944 operators. Adjust use of ansi_opname.
1945 (ambi_op_p): Work on tree_codes, not identifiers.
1946 (unary_op_p): Likewise.
1947 (grok_op_properties): Likewise.
1948 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
1949 (lang_mark_tree): Don't try to mark the operator_code.
1950 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
1951 * error.c (dump_decl): Remove special handling for operator
1953 (dump_function_name): Likewise.
1954 (dump_expr): Adjust name lookup of operators.
1955 (op_to_string): Simplify.
1956 (assop_to_string): Likewise.
1957 * init.c (build_new_1): Adjust use of ansi_opname.
1958 * lex.c (opname_tab): Remove.
1959 (assignop_tab): Likewise.
1960 (ansi_opname): Likewise.
1961 (ansi_assopname): Likewise.
1962 (operator_name_string): Likewise.
1963 (reinit_lang_specific): Likewise.
1964 (operator_name_info): New variable.
1965 (assignment_operator_name_info): Likewise.
1966 (init_operators): New function.
1967 (init_parse): Use it.
1968 (do_identifier): Adjust use of ansi_opname.
1969 * method.c (mangle_expression): Don't use ansi_opname for
1971 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
1972 (build_decl_overload): Remove.
1973 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
1974 (do_build_assign_ref): Adjust use of ansi_opname.
1975 (synthesize_method): Likewise.
1976 (implicitly_declare_fn): Likewise.
1977 * operators.def: New file.
1978 * parse.y (operator): Adjust use of ansi_opname.
1979 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
1980 (set_mangled_name_for_template_decl): Don't play games with
1982 (special_function_p): Adjust use of ansi_opname.
1983 * typeck.c (check_return_expr): Likewise.
1984 * Make-lang.in (cc1plus): Depend on operators.def.
1985 * Makefile.in (lex.o): Likewise.
1988 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
1990 * Make-lang.in (cplib2.ready): Eradicate.
1992 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1994 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
1995 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
1996 (built_min, cp_tree_equal): Likewise.
1998 2000-05-26 Mark Mitchell <mark@codesourcery.com>
2000 * class.c (layout_nonempty_base_or_field): Replace
2001 `record_layout_info' with `record_layout_info_s'.
2003 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
2006 * cp-tree.h (struct language_function): x_named_labels is now
2007 a struct named_label_list*.
2008 * decl.c (struct named_label_use_list): Renamed from...
2009 (struct named_label_list): ...this. New struct.
2010 (push_binding_level): Don't set eh_region.
2011 (note_level_for_eh): New fn.
2012 (pop_label): Take label and old value directly.
2013 (pop_labels): Adjust for new named_labels format.
2014 (lookup_label): Likewise.
2015 (poplevel): Note characteristics of a binding level containing a
2016 named label. Mess with named label lists earlier.
2017 (mark_named_label_lists): New fn.
2018 (mark_lang_function): Call it.
2019 (use_label): New fn, split out from...
2020 (make_label_decl): ...here. Don't call it.
2021 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
2022 check_previous_gotos): New fns, split out from...
2023 (define_label): ...here.
2024 (check_switch_goto): New fn.
2025 (define_case_label): Call it.
2026 (check_goto): New fn.
2027 * semantics.c (finish_goto_stmt): Call it and use_label.
2028 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
2029 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
2031 2000-05-26 Mark Mitchell <mark@codesourcery.com>
2033 * class.c (build_vtable_entry_ref): Correct usage of
2034 get_vtbl_decl_for_binfo.
2036 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
2037 * method.c (implicitly_declare_fn): Not here.
2039 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
2041 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
2042 (CPTI_PTMD_DESC_TYPE): ... here.
2043 (ptmd_desc_type_node): Rename to ...
2044 (ptm_desc_type_node): ... here.
2046 * rtti.c (ptmd_initializer): Rename to ...
2047 (ptm_initializer): ... here.
2048 (sythesize_tinfo_var): Adjust. Deal with pointer to member
2050 (create_tinfo_types): Adjust.
2052 2000-05-25 Mark Mitchell <mark@codesourcery.com>
2054 Finish implementation of VTTs.
2055 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
2056 CPTI_VTT_PARM_IDENTIFIER.
2057 (vtt_parm_identifier): New macro.
2058 (vtt_parm_type): Likewise.
2059 (BINFO_SUBVTT_INDEX): Likewise.
2060 (BINFO_VPTR_INDEX): Likewise.
2061 (struct lang_decl): Add vtt_parm.
2062 (DECL_VTT_PARM): New macro.
2063 (DECL_USE_VTT_PARM): Likewise.
2064 (DECL_NEEDS_VTT_PARM_P): Likewise.
2065 (get_vtt_name): Declare.
2066 (build_artifical_parm): Likewise.
2067 (fixup_all_virtual_upcast_offsets): Likewise.
2068 (expand_indirect_vtbls_init): Remove.
2069 * call.c (build_new_method_call): Pass the vtt to subobject
2070 constructors and destructors.
2071 * class.c (get_vtt_name): Give it external linkage.
2072 (build_clone): Handle the magic VTT parameters for clones.
2073 (clone_function_decl): Fix typo in comment.
2074 (build_vtt): Keep track of the indices in the VTTs where various
2075 entities are stored.
2076 (build_vtt_inits): Likewise.
2077 (dfs_build_vtt_inits): Likewise.
2078 (build_ctor_vtbl_group): Tweak type of construction vtables.
2079 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
2080 primary bases, when building construction vtables.
2081 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
2082 (initialize_predefined_identifiers): Add vtt_parm_identifier.
2083 (init_decl_processing): Initialize vtt_parm_type.
2084 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
2085 (lang_mark_tree): Make vtt_parm.
2086 * decl2.c (build_artificial_parm): New function.
2087 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
2088 (grokclassfn): Use build_artificial_parm.
2089 * init.c (initialize_vtbl_ptrs): Call
2090 fixup_all_virtual_upcast_offsets directly.
2091 (perform_member_init): Use the complete subobject destructor for
2093 (build_vtbl_address): New function.
2094 (expand_virtual_init): Handle VTTs.
2095 * optimize (maybe_clone_body): Likewise.
2096 * search.c (fixup_all_virtual_upcast_offsets): Give it external
2098 (expand_indirect_vtbls_init): Remove.
2099 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
2100 * tree.c (make_binfo): Make them bigger.
2102 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
2104 * inc/cxxabi.h (__pbase_type_info): Define, based on
2105 __pointer_type_info.
2106 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
2107 (__pointer_to_member_type_info): Likewise.
2108 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
2109 (__pointer_to_member_type_info::__is_pointer_p): Remove.
2110 (__pointer_type_info::__do_catch): Rename to ...
2111 (__pbase_type_info::__do_catch): ... here. Adjust.
2112 (__pbase_type_info::__pointer_catch): Implement.
2113 (__pointer_type_info::__pointer_catch): Adjust.
2114 (__pointer_to_member_type_info::__pointer_catch): Adjust.
2116 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
2118 * tinfo.h (__user_type_info::contained_virtual_p): New
2120 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
2122 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
2123 diamond shaped heirarchy. Add early out for mixed diamond and
2124 duplicate shaped heirarchy.
2126 2000-05-24 Mark Mitchell <mark@codesourcery.com>
2128 * cp-tree.h (build_delete): Change prototype.
2129 (build_vec_delete): Likewise.
2130 * call.c (build_scoped_method_call): Use special_function_kind
2131 values to indicate the kind of destruction to be done.
2132 (build_method_call): Likewise.
2133 * decl.c (finish_destructor_body): Likewise.
2134 (maybe_build_cleanup_1): Likewise. Rename to ...
2135 (maybe_build_cleanup): ... this.
2136 * decl2.c (delete_sanity): Use special_function_kind
2137 values to indicate the kind of destruction to be done.
2138 (build_cleanup): Likewise.
2139 * init.c (perform_member_init): Likewise.
2140 (build_vec_delete_1): Likewise.
2141 (build_dtor_call): Simplify.
2142 (build_delete): Use special_function_kind
2143 values to indicate the kind of destruction to be done.
2144 (build_vbase_delete): Likewise.
2145 (build_vec_delete): Likewise.
2147 * init.c (sort_member_init): Fix typo in error message generation
2150 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
2152 * semantics.c (begin_class_definition): make the packed
2153 attribute be sensitive to the "-fpack-struct" command line flag
2155 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
2157 Update new-abi upcast algorithm.
2158 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
2159 prototype and meaning of return value.
2160 (__si_class_type_info::__do_upcast): Likewise.
2161 (__vmi_class_type_info::__do_upcast): Likewise.
2162 * tinfo.cc (__class_type_info::__upcast_result): Replace
2163 whole2dst with part2dst. Adjust ctor.
2164 (__class_type_info::__do_upcast): Adjust call of worker function.
2165 (__class_type_info::__do_upcast): Adjust.
2166 (__si_class_type_info::__do_upcast): Adjust. Use parent's
2168 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
2169 virtual base in diamond heirarchy bug.
2171 2000-05-23 Mark Mitchell <mark@codesourcery.com>
2173 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
2174 and bitfield to tinfo_fn_p.
2175 (DECL_TINFO_FN_P): Adjust.
2176 (SET_DECL_TINFO_FN_P): Likewise.
2177 (DECL_MUTABLE_P): Likewise.
2178 (DECL_C_BIT_FIELD): Likewise.
2179 (SET_DECL_C_BIT_FIELD): Likewise.
2180 (CLEAR_DECL_C_BIT_FIELD): Likewise.
2181 (DECL_UNINLINABLE): Likewise.
2182 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
2183 (handle_using_decl): Remove assertion.
2184 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
2185 to build FIELD_DECLs.
2186 (build_base_field): Likewise.
2187 (layout_class_type): Likewise.
2188 * decl.c (init_decl_processing): Likewise.
2189 (build_ptrmemfunc_type): Likewise.
2190 (grokdeclarator): Likewise.
2191 * decl2.c (grok_x_components): Likewise.
2192 * except.c (call_eh_info): Likewise.
2193 * init.c (init_init_processing): Likewise.
2194 * rtti.c (expand_class_desc): Likewise.
2195 (create_pseudo_type_info): Likewise.
2196 (get_vmi_pseudo_type_info): Likewise.
2197 (create_tinfo_types): Likewise.
2198 * ptree.c (print_lang_decl): Adjust.
2199 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
2200 before checking DECL_MUTABLE_P.
2202 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
2203 parameters for template functions.
2204 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
2205 destructors as well as constructors.
2207 2000-05-22 Mark Mitchell <mark@codesourcery.com>
2209 * class.c (build_ctor_vtbl_group): Set inits.
2210 * optimize.c (maybe_clone_body): Set DECL_INLINE and
2211 DECL_THIS_INLINE appropriately for clones.
2213 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
2214 (DECL_CONV_FN_P): Simplify.
2215 (DECL_OPERATOR): Remove.
2216 (language_to_string): Declare.
2217 * decl.c (duplicate_decls): Fix typo in comment.
2218 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
2219 (grok_op_properties): Use DECL_CONV_FN_P instead of
2220 IDENTIFIER_TYPENAME_P.
2221 * dump.c (dequeue_and_dump): Dump the language linkage of
2223 * error.c (language_to_string): Give it external linkage.
2224 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
2225 (implicitly_declare_fn): Set DECL_LANGUAGE.
2226 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
2227 IDENTIFIER_TYPENAME_P.
2228 (tsubst_decl): Likewise.
2229 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
2230 * semantics.c (finish_member_declaration): Don't mark members of
2231 classes declared in an extern "C" region as extern "C".
2233 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2235 * decl2.c (qualified_lookup_using_namespace): Look through
2238 * decl.c (push_using_decl): Return the old decl on namespace level.
2240 2000-05-21 Mark Mitchell <mark@codesourcery.com>
2242 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
2243 (VTT_NAME_PREFIX): New macro.
2244 (CTOR_VTBL_NAME_PREFIX): Likewise.
2245 (get_ctor_vtbl_name): New function.
2246 * class.c (get_vtable_name): Simplify.
2247 (get_vtt_name): New function.
2248 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
2249 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
2250 when a virtual base becomes primary.
2251 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
2253 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
2254 additional parameters.
2255 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
2256 (initialize_array): New function.
2257 (build_vtt): Likewise.
2258 (build_vtt_inits): Likewise.
2259 (dfs_build_vtt_inits): Likewise.
2260 (dfs_fixup_binfo_vtbls): Likewise.
2261 (build_ctor_vtbl_group): Likewise.
2262 (initialize_vtable): Use initialize_array.
2263 (accumulate_vtbl_inits): Reimplement to handle construction
2265 (dfs_accumulate_vtbl_inits): Likewise.
2266 (bulid_vtbl_initializer): Adjust parameter name.
2267 * method.c (build_typename_overload): Remove #if 0'd code.
2268 (get_ctor_vtbl_name): New function.
2269 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
2270 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
2272 * cp-tree.h (struct lang_type): Remove search_slot.
2273 (CLASSTYPE_SEARCH_SLOT): Remove.
2274 (emit_base_init): Change prototype.
2275 (initialize_vtbl_ptrs): Likewise.
2276 (expand_indirect_vtbls_init): Likewise.
2277 (clear_search_slots): Remove.
2278 * decl.c (lang_mark_tree): Don't mark search_slot.
2279 * init.c (initialize_vtbl_ptrs): Simplify.
2280 (emit_base_init): Likewise.
2281 * search.c (struct vbase_info): Document decl_ptr.
2282 (convert_pointer_to_single_level): Remove.
2283 (dfs_find_vbases): Remove.
2284 (dfs_init_base_pointers): Simplify.
2285 (dfs_clear_vbase_slots): Remove.
2286 (dfs_vtable_path_unmark): New function.
2287 (init_vbase_pointers): Simplify.
2288 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
2289 (expand_indirect_vtbls_init): Simplify. Don't call
2290 mark_all_temps_used.
2291 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
2292 initialize_vtbl_ptrs.
2294 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
2296 * except.c: Add static prototypes.
2298 2000-05-20 H.J. Lu <hjl@gnu.org>
2300 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
2302 2000-05-19 Mark Mitchell <mark@codesourcery.com>
2304 Don't create a separate copy of virtual bases for the
2305 CLASSTYPE_VBASECLASSES list.
2306 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
2307 (BINFO_FOR_VBASE): Remove.
2308 (CANONICAL_BINFO): Adjust.
2309 (binfo_for_vbase): New function.
2310 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
2311 instead of BINFO_FOR_VBASE.
2312 (build_vbase_pointer): Likewise.
2313 (build_secondary_vtable): Likewise.
2314 (dfs_mark_primary_bases): Likewise.
2315 (mark_primary_bases): Likewise.
2316 (layout_nonempty_base_or_field): Likewise.
2317 (dfs_set_offset_for_shared_vbases): Likewise.
2318 (dfs_set_offset_for_unshared_vbases): Likewise.
2319 (layout_virtual_bases): Likewise. Adjust for changes to the
2320 CLASSTYPE_VBASECLASSES list.
2321 (dump_class_hierarchy_r): Use binfo_for_vbase
2322 instead of BINFO_FOR_VBASE.
2323 (dump_class_hierarchy): Likewise.
2324 (finish_vtbls): Likewise.
2325 (build_vtbl_initializer): Adjust for changes to the
2326 CLASSTYPE_VBASECLASSES list.
2327 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
2328 * decl.c (finish_destructor_body): Adjust for changes to the
2329 CLASSTYPE_VBASECLASSES list.
2330 * init.c (sort_base_init): Use binfo_for_vbase.
2331 (construct_virtual_bases): Adjust for changes to the
2332 CLASSTYPE_VBASECLASSES list.
2333 (expand_member_init): Use binfo_for_vbase.
2334 (build_vbase_delete): Adjust for changes to the
2335 CLASSTYPE_VBASECLASSES list.
2336 * method.c (do_build_copy_constructor): Likewise.
2337 * rtti.c (get_base_offset): Use binfo_for_vbase.
2338 (expand_class_desc): Remove #if 0'd code.
2339 * search.c (struct vbase_info): Remove vbase_types.
2340 (get_base_distance): Use binfo_for_vbase.
2341 (lookup_field_queue_p): Use CANONICAL_BINFO.
2342 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
2343 (get_pure_virtuals): Adjust for changes to the
2344 CLASSTYPE_VBASECLASSES list.
2345 (dfs_find_vbases): Use binfo_for_vbase.
2346 (dfs_init_vbase_pointers): Likewise.
2347 (init_vbase_pointers): Don't initialize vi.vbase_types.
2348 (virtual_context): Use binfo_for_vbase.
2349 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
2350 CLASSTYPE_VBASECLASSES list.
2351 (expand_indirect_vtbls_init): Simplify.
2352 (dfs_get_vbase_types): Don't replicate virtual bases.
2353 (find_vbase_instance): Use binfo_for_vbase.
2354 (binfo_for_vbase): New function.
2355 * typeck.c (get_delta_difference): Use binfo_for_vbase.
2357 2000-05-17 Mark Mitchell <mark@codesourcery.com>
2359 * decl2.c (finish_anon_union): Generalize error messages to handle
2360 anonymous structures.
2361 * init.c (perform_member_init): Remove `name' parameter.
2362 (build_field_list): New function.
2363 (sort_member_init): Handle anonymous union initialization order
2364 correctly. Check for multiple initializations of the same union.
2365 (emit_base_init): Don't look up fields by name here.
2366 (expand_member_init): Record the result of name lookup for future
2368 * typeck.c (build_component_ref): Fix formatting.
2370 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
2372 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
2373 * typeck.c (build_x_compound_expr): Replace warn_unused with
2376 * decl2.c (lang_decode_option): Update -Wall unused flags by
2377 calling set_Wunused.
2379 2000-05-16 Mark Mitchell <mark@codesourcery.com>
2381 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
2382 * init.c (dfs_vtable_path_unmark): Remove.
2383 * search.c (marked_new_vtable_p): Likewise.
2384 (unmarked_new_vtable_p): Likewise.
2385 (dfs_search_slot_nonempty_p): Likewise.
2386 (dfs_mark): Likewise.
2387 (dfs_vtable_path_unmark): Likewise.
2388 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
2389 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
2390 (dfs_init_vbase_pointers): Remove special-case new ABI code.
2391 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
2392 (init_vbase_pointers): Simplify.
2393 (expand_indirect_vtbls_init): Likewise.
2395 * class.c (copy_virtuals): New function.
2396 (build_primary_table): Use it.
2397 (build_secondary_vtable): Likewise.
2398 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
2399 indicate that no vcall offset is required.
2400 (add_virtual_function): Likewise.
2401 (modify_all_vtables): Likewise.
2402 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
2403 (dfs_accumulate_vtbl_inits): Likewise.
2404 (build_vtbl_initializer): Make changes to handle construction
2406 (dfs_build_vcall_offset_vtbl_entries): Likewise.
2407 (build_rtti_vtbl_entries): Likewise.
2408 (build_vtable_entries): Handle a NULL vcall_index.
2410 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
2412 * decl2.c (lang_decode_option): Fix thinko.
2414 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
2416 * except.c (check_handlers): New fn.
2417 * cp-tree.h: Declare it.
2418 * semantics.c (finish_handler_sequence): Call it.
2419 (finish_function_handler_sequence): Likewise.
2420 (finish_handler_parms): Set TREE_TYPE on the handler.
2421 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
2422 * search.c (get_base_distance_recursive): If protect>1, ignore
2424 (get_base_distance): Don't reduce watch_access.
2426 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
2428 * lex.c: #include diagnostic.h.
2429 (lang_init_options): Set default prefixing rules.
2431 * lang-options.h: Add -fdiagnostics-show-location=.
2433 * decl2.c: #include diagnostic.h.
2434 (lang_decode_option): Handle -fdiagnostics-show-location=.
2436 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
2438 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
2439 * vec.cc: Revert my 2000-05-07 change.
2441 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
2443 * class.c (check_field_decls): Complain about non-static data
2444 members with same name as class in class with constructor.
2446 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
2448 * decl.c (grokdeclarator): Allow non-static data members with
2451 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
2453 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
2454 and pending_inline.filename. Update prototypes.
2455 * decl.c (define_label): Constify filename parameter.
2456 * decl2.c (warn_if_unknown_interface): Constify local char *.
2457 * input.c Constify input_source.filename. Don't declare
2458 input_filename or lineno. Constify filename parameter to feed_input.
2459 * lex.c (init_parse): Constify parameter and return value.
2460 (cp_pragma_interface, cp_pragma_implementation): Constify
2462 (reinit_parse_for_method, reinit_parse_for_block,
2463 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
2464 Constify local char *.
2465 * pt.c: Don't declare lineno or input_filename.
2466 (print_template_context, tsubst_friend_function, tsubst_decl,
2467 tsubst, instantiate_decl): Constify local char *.
2468 * semantics.c (expand_body): Constify local char *.
2469 * tree.c (build_srcloc): Constify filename parameter.
2470 * typeck.c (c_expand_asm_operands): Constify filename
2473 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
2475 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
2478 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
2480 * inc/cxxabi.h: Fix typos in comment.
2481 (__base_class_info::__offset): Use a static_cast.
2483 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
2485 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
2486 of std::size_t and std::ptrdiff_t respectively.
2487 * tinfo.cc: Likewise.
2490 2000-05-06 Richard Henderson <rth@cygnus.com>
2492 * typeck.c (build_c_cast): Don't warn integer->pointer size
2493 mismatch for constants.
2495 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
2497 * rtti.c (ptmd_initializer): Set non-public, if class is
2500 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
2501 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2502 __cxa_vec_delete): Likewise.
2503 * tinfo.cc (__dynamic_cast): Likewise.
2504 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2505 __cxa_vec_delete): Likewise.
2507 2000-05-04 Mark Mitchell <mark@codesourcery.com>
2509 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
2510 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
2511 (lang_decl_flags): Add vcall_offset.
2512 (THUNK_VCALL_OFFSET): Use it.
2513 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
2514 * method.c (make_thunk): Create the lang_decl here, not in
2516 (emit_thunk): Make generic thunks into ordinary functions once
2517 they have been fed to expand_body.
2518 * semantics.c (expand_body): Set current_function_is_thunk here.
2520 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2522 * class.c (update_vtable_entry_for_fn): Prototype.
2524 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
2527 * search.c (dfs_build_inheritance_graph_order): Prototype.
2529 2000-05-04 Mark Mitchell <mark@codesourcery.com>
2531 * cp-tree.h (special_function_kind): Add various kinds of
2533 (special_function_p): New function.
2534 * class.c (overrides): Don't let one kind of destructor override
2536 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
2537 whether or not to instantiate a template.
2538 * tree.c (special_function_p): Define.
2540 2000-05-03 Mark Mitchell <mark@codesourcery.com>
2542 * cp-tree.def (THUNK_DECL): Remove.
2543 * cp-tree.h (DECL_THUNK_P): New macro.
2544 (DECL_NON_THUNK_FUNCTION_P): Likewise.
2545 (DECL_EXTERN_C_FUNCTION_P): Likewise.
2546 (SET_DECL_THUNK_P): Likewise.
2547 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
2548 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
2549 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
2550 * decl.c (decls_match): Use DECL_EXTERN_C_P.
2551 (duplicate_decls): Likewise.
2552 (pushdecl): Likewise. Adjust thunk handling.
2553 (grokfndecl): Use DECL_EXTERN_C_P.
2554 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
2555 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
2556 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
2557 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
2558 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
2559 DECL_NO_STATIC_CHAIN.
2560 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
2561 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
2562 * search.c (covariant_return_p): Remove THUNK_DECL handling.
2565 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
2567 * tree.c (walk_tree): Set lineno.
2569 2000-05-01 Mark Mitchell <mark@codesourcery.com>
2571 * exception.cc: Update license notice.
2573 * new1.cc: Likewise.
2574 * new2.cc: Likewise.
2575 * tinfo.cc: Likewise.
2576 * tinfo2.cc: Likewise.
2578 * inc/cxxabi.h: Likewise.
2579 * inc/exception: Likewise.
2580 * inc/new: Likewise.
2581 * inc/new.h: Likewise.
2582 * inc/typeinfo: Likewise.
2584 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
2586 * tree.c (build_target_expr_with_type): If we already have a
2587 TARGET_EXPR, just return it.
2589 * optimize.c (initialize_inlined_parameters): Don't generate an
2590 EXPR_STMT if we can just use DECL_INITIAL.
2591 * decl.c (emit_local_var): Only make the initialization a
2592 full-expression if stmts_are_full_exprs_p.
2594 2000-05-01 Mark Mitchell <mark@codesourcery.com>
2596 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
2598 * call.c (standard_conversion): Use it.
2599 (direct_reference_binding): Likewise.
2600 (build_over_call): Likewise.
2601 (is_properly_derived_from): Likewise.
2602 (compare_ics): Likewise.
2603 * class.c (resolves_to_fixed_type_p): Likewise.
2604 * optimize.c (declare_return_variable): Likewise.
2605 * pt.c (is_specialization_of): Likewise.
2607 * typeck.c (comp_target_parms): Likeiwse.
2608 (build_static_cast): Likewise.
2609 (build_reinterpret_cast): Likewise.
2610 (build_const_cast): Likewise.
2611 (comp_ptr_ttypes_real): Likewise.
2612 (comp_ptr_ttypes_const): Likewise.
2613 * typeck2.c (process_init_constructor): Likewise.
2615 2000-04-30 Scott Snyder <snyder@fnal.gov>
2617 * decl.c (finish_destructor_body): Use the base destructor when
2618 destroying virtual bases.
2620 2000-04-30 Mark Mitchell <mark@codesourcery.com>
2622 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
2624 * optimize.c (struct inline_data): Add target_exprs field.
2625 (declare_return_variable): When a function returns an aggregate,
2626 use the variable declared in the TARGET_EXPR as the remapped
2628 (expand_call_inline): Update the pending target_exprs stack.
2629 (optimize_function): Initialize the stack.
2631 * decl2.c (finish_file): Fix typo in comment.
2633 * method.c (emit_thunk): Don't try to return a `void' value.
2635 * optimize.c (initialize_inlined_parameters): If the parameter is
2636 addressable, we need to make a new VAR_DECL, even if the
2637 initializer is constant.
2639 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
2641 * decl.c (grok_op_properties): Add an extra check of argtypes.
2643 2000-04-27 Mark Mitchell <mark@codesourcery.com>
2645 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
2647 (initialize_inlined_parameters): Try to avoid creating new
2650 2000-04-27 Alex Samuel <samuel@codesourcery.com>
2652 * lex.c (my_get_run_time): Remove.
2653 (init_filename_times): Use get_run_time instead of my_get_run_time.
2654 (check_newline): Likewise.
2655 (dump_time_statistics): Likewise.
2656 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
2657 of computing elapsed time explicitly.
2659 2000-04-26 Mark Mitchell <mark@codesourcery.com>
2661 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
2662 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
2663 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
2664 before calling decl_constant_value.
2665 * class.c (check_bitfield_decl): Likewise.
2666 * cvt.c (ocp_convert): Likewise.
2667 (convert): Likewise.
2668 * decl.c (compute_array_index_type): Likewise.
2669 (build_enumerator): Likewise.
2670 * decl2.c (check_cp_case_value): Likewise.
2671 * pt.c (convert_nontype_argument): Likewise.
2673 * typeck.c (decay_conversion): Likewise.
2674 (build_compound_expr): Likewise.
2675 (build_reinterpret_cast): Likewise.
2676 (build_c_cast): Likewise.
2677 (convert_for_assignment): Likewise.
2679 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
2681 * decl.c (finish_function): Don't play games with DECL_INLINE.
2683 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
2685 * ir.texi: Correct typo.
2687 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2689 * decl.c (grokdeclarator): Reject VLAs as members.
2691 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
2693 * call.c (standard_conversion): Accept conversion between
2696 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
2698 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
2700 * decl2.c (finish_file): Remove double setup for accounting
2703 2000-04-24 Robert Lipe <robertlipe@usa.net>
2705 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
2707 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
2709 * new.cc (set_new_handler): Needs to be in std::.
2711 2000-04-23 Mark Mitchell <mark@codesourcery.com>
2713 * cp-tree.h (lang_decl): Remove pretty_function_p.
2714 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
2715 language-specific node.
2716 * decl.c (cp_make_fname_decl): Use build_decl, not
2717 build_lang_decl, to build the variables.
2718 (grokvardecl): Don't call build_lang_decl for local variables in
2720 (grokdeclarator): Don't call build_lang_decl for local type
2721 declarations in templates.
2722 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
2723 zero'd memory, rather than calling memset.
2724 * pt.c: Include hashtab.h.
2725 (local_specializations): New variable.
2726 (retrieve_local_specialization): Use it.
2727 (register_local_specialization): Likewise.
2728 (tsubst_decl): Don't assume local variables have
2730 (instantiate_decl): Set up local_specializations.
2731 * Makefile.in (HTAB_H): New variable.
2733 2000-04-23 Richard Henderson <rth@cygnus.com>
2735 * typeck.c (c_expand_asm_operands): Restore the original
2736 contents of the output list.
2738 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
2740 * ir.texi: Document complex number representation.
2742 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
2744 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
2745 (target_incomplete_p): New function.
2746 (tinfo_base_init): Create comdat NTBS name variable.
2747 (ptr_initializer): Add non_public parameter. Calculate it.
2748 (ptmd_initializer): Likewise.
2749 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
2750 (create_real_tinfo_var): Add non_public parameter. Use it.
2751 Push proxy into global namespace.
2752 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
2754 * inc/typeinfo (type_info::before, type_info::operator==):
2755 Compare __name addresses.
2757 * tinfo2.cc: Remove new-abi builtins comment.
2759 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
2761 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
2763 * call.c (joust): Exit early if we get the same function, too.
2765 * decl2.c (key_method): Return NULL_TREE for template classes.
2766 (import_export_class): Don't need to check for template classes.
2768 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
2770 * lex.c: Remove references to cccp.c.
2772 2000-04-18 Mark Mitchell <mark@codesourcery.com>
2774 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
2775 volatile_memfunc. Add destructor_attr. Adjust dummy.
2776 (DECL_DESTRUCTOR_P): Use destructor_attr.
2777 (DECL_CONST_MEMFUNC_P): Reimplement.
2778 (DECL_VOLATILE_MEMFUNC_P): Remove.
2779 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
2780 (overrides): Use DECL_DESTRUCTOR_P.
2781 (check_for_override): Likewise.
2782 * decl.c (start_function): Likewise.
2783 * decl2.c (grokfclassfn): Likewise.
2784 (check_classfn): Likewise.
2785 (grok_function_init): Likewise.
2787 2000-04-17 Mark Mitchell <mark@codesourcery.com>
2789 * decl2.c (grokfield): Issue error on illegal data member
2792 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
2794 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
2796 2000-04-16 Mark Mitchell <mark@codesourcery.com>
2798 * class.c (build_vtable_entry): Don't build thunks for type-info
2801 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
2803 * decl.c (decls_match): Allow a redeclaration of a builtin to
2804 specify args while the builtin did not.
2806 2000-04-15 Mark Mitchell <mark@codesourcery.com>
2808 * cp-tree.def (THUNK_DECL): Add to documentation.
2809 * cp-tree.h (flag_huge_objects): Declare.
2810 * class.c (modify_vtable_entry): Tidy.
2811 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
2812 Calculate delta appropriately for the new ABI.
2813 (dfs_modify_vtables): Use it.
2814 (modify_all_vtables): Fix thinko in code to add overriding copies
2815 of functions to primary vtables.
2816 (build_clone): Fix typo in comment.
2817 (clone_function_decl): Correct order of destructors in vtable.
2818 (build_vbase_offset_vtbl_entries): Adjust comment.
2819 (dfs_vcall_offset_queue_p): Remove.
2820 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
2821 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
2822 (build_vtable_entry): Correct check for pure virtual functions.
2823 Don't declare flag_huge_objects.
2824 * decl.c (flag_huge_objects): Remove declaration.
2825 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
2826 Use int_size_in_bytes.
2827 (emit_thunk): Handle vcall offset thunks.
2829 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2831 * decl2.c (parse_time, varconst_time): Delete declarations.
2832 (finish_file): Delete LINENO declaration.
2833 START_TIME and THIS_TIME now long.
2835 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
2837 * class.c (build_base_field): Reformat comment.
2839 * inc/cxxabi.h (stddef.h): Comment inclusion.
2840 (__base_class_info::__offset): Comment shift.
2842 2000-04-12 Mark Mitchell <mark@codesourcery.com>
2844 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
2845 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
2846 (cp_push_exception_identifier): New macro.
2847 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
2848 (DECL_BASE_DESTRUCTOR_P): Likewise.
2849 (DECL_DELETING_DESTRUCTOR_P): Likewise.
2850 (get_vtbl_decl_for_binfo): Fix formatting.
2851 (in_charge_arg_for_name): New macro.
2852 (maybe_build_cleanup_and_delete): Remove declaration.
2853 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
2854 (in_charge_arg_for_name): New function.
2855 (build_new_method_call): Use it. Handle cloned destructors.
2856 (build_clone): Don't make the base constructor virtual.
2857 Automatically defer generated functions.
2858 (clone_function_decl): Handle destructors, too.
2859 (clone_constructors_and_destructors): Likewise.
2860 (create_vtable_ptr): Don't create a vtable entry for a cloned
2862 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
2863 (initialize_predefined_identifiers): Update appropriately.
2864 (finish_destructor_body): Simplify.
2865 (maybe_build_cleanup_and_delete): Remove.
2866 * except.c (expand_throw): Handle new-ABI destructors.
2867 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
2868 (build_dtor_call): New function.
2869 (build_delete): Use it. Simplify.
2870 * optimize.c (maybe_clone_body): Handle destructors.
2871 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
2873 * exception.cc (cleanup_fn): New typedef.
2874 (CALL_CLEANUP): New macro.
2875 (cp_eh_info): Use them.
2876 (__cp_push_exception): Likewise.
2877 (__cp_pop_exception): Likewise.
2879 2000-04-11 Mark Mitchell <mark@codesourcery.com>
2881 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
2882 (complete_dtor_identifier): New macro.
2883 (CLASSTYPE_FIRST_CONVERSION): Remove.
2884 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
2885 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
2886 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
2887 (CLASSTYPE_CONSTRUCTORS): Likewise.
2888 (CLASSTYPE_DESTRUCTORS): Likewise.
2889 (lang_decl): Add cloned_function.
2890 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
2891 (DECL_BASE_CONSTRUCTOR_P): Likewise.
2892 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
2893 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
2894 (DECL_CLONED_FUNCTION_P): Likewise.
2895 (DECL_CLONED_FUNCTION): Likewise.
2896 (clone_function_decl): Declare.
2897 (maybe_clone_body): Likewise.
2898 * call.c (build_user_type_conversion_1): Call complete object
2899 constructors in the new ABI.
2900 (build_new_method_call): Don't add in-charge parameters under the
2902 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
2903 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
2904 CLASSTYPE_DESTRUCTOR_SLOT.
2905 (build_clone): New function.
2906 (clone_function_decl): Likewise.
2907 (clone_constructors_and_destructors): Likewise.
2908 (check_bases_and_members): Use it.
2909 * decl.c (iniitialize_predefined_identifiers): Initialize
2910 complete_dtor_identifier.
2911 (finish_function): Don't add extra code to a clone.
2912 (lang_mark_tree): Mark cloned_function.
2913 * decl2.c (mark_used): Don't bother trying to instantiate things
2915 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
2916 * method.c (set_mangled_name_for_decl): Don't treat clones as
2918 (synthesize_method): Sythesize cloned functions, not the clones.
2919 * optimize.c (inline_data): Update comment on ret_label.
2920 (remap_block): Don't assume DECL_INITIAL exists.
2921 (copy_body_r): Allow ret_label to be NULL.
2922 (maybe_clone_body): Define.
2923 * pt.c (tsubst_decl): Handle clones.
2924 (instantiate_clone): New function.
2925 (instantiate_template): Use it.
2926 (set_mangled_name_for_template_decl): Don't treat clones as
2928 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
2929 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
2930 * semantics.c (expand_body): Clone function bodies as necessary.
2932 * optimize.c (remap_decl): Avoid sharing structure for arrays
2933 whose size is only known at run-time.
2934 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
2936 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
2937 to has_in_charge_parm_p.
2938 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
2939 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
2940 (DECL_COPY_CONSTRUCTOR_P): New macro.
2941 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
2942 (build_user_type_conversion_1): Likewise.
2943 (convert_like_real): Likewise.
2944 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
2945 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
2946 (copy_args_p): Likewise.
2947 (grok_ctor_properties): Likewise.
2948 (start_function): Likewise.
2949 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
2950 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
2951 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
2952 * method.c (do_build_copy_constructor): Use
2953 DECL_HAS_IN_CHARGE_PARM_P.
2954 (synthesize_method): Likewise.
2955 * pt.c (instantiate_template): Remove goto.
2956 * tree.c (build_cplus_method_type): Remove mention of obstacks in
2959 * cp-tre.h (finish_function): Change prototype.
2960 * decl.c (end_cleanup_fn): Adjust caller.
2961 (finish_function): Take only one parameter.
2962 * decl2.c (finish_objects): Adjust caller.
2963 (finish_static_storage_duration_function): Likewise.
2964 * method.c (emit_thunk): Likewise.
2965 * parse.y: Likewise.
2966 * parse.c: Regenerated.
2967 * pt.c (instantiate_decl): Likewise.
2968 * rtti.c (synthesize_tinfo_fn): Likewise.
2969 * semantics.c (expand_body): Likewise.
2971 * cp-tree.h (copy_decl): New function.
2972 * class.c (finish_struct_1): Use it.
2973 * lex.c (copy_decl): Define it.
2974 * pt.c (tsubst_decl): Likewise.
2975 * tree.c (copy_template_template_parm): Likewise.
2977 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
2978 has_nonpublic_assign_ref.
2979 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
2980 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
2981 * class.c (finish_struct_methods): Don't set
2982 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
2983 (interface_only): Don't declare.
2984 (interface_unknown): Likewise.
2986 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2988 * tree.h (HAVE_TEMPLATES): Remove definition.
2989 * lang-options.h (-fthis-is-variable): Remove documentation.
2991 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
2993 * class.c (instantiate_type): Handle object-relative template-id.
2995 * semantics.c (finish_expr_stmt): Call convert_to_void here.
2996 * decl.c (cplus_expand_expr_stmt): Not here.
2998 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
2999 Initialize exprtype earlier.
3001 * parse.y (fn.def1): Check for defining types in return types.
3003 * decl.c (check_tag_decl): Notice extra fundamental types.
3004 Diagnose empty decls in classes, too.
3006 * decl.c (grokdeclarator): Don't override an anonymous name if no
3007 declarator was given.
3009 * cvt.c (convert_to_void): Call resolve_offset_ref.
3011 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
3013 * decl2.c (decl_namespace): Handle getting a type.
3015 * typeck.c (build_c_cast): Re-enable warning for cast between
3016 pointer and integer of different size.
3018 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
3020 * inc/cxxabi.h (__pointer_type_info): Add restrict and
3022 (__pointer_type_info::__pointer_catch): New virtual function.
3023 (__pointer_to_member_type_info): Derive from
3024 __pointer_type_info. Adjust.
3025 (__pointer_to_member_type_info::__do_catch): Remove.
3026 (__pointer_to_member_type_info::__is_pointer_p): Declare.
3027 (__pointer_to_member_type_info::__pointer_catch): Declare.
3028 * rtti.c (qualifier_flags): Add restrict flag.
3029 (ptmd_initializer): Reorder members.
3030 (create_tinfo_types): Expand comments. Reorder
3031 ptmd_desc_type_node members.
3032 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
3034 (__pointer_type_info::__do_catch): Move specific code into
3035 __pointer_catch. Call it.
3036 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
3037 specific catch checking. Fix void conversion check.
3038 (__pointer_to_member_type_info::__do_catch): Remove.
3039 (__pointer_to_member_type_info::__pointer_catch): Implement.
3041 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3043 * lex.c (init_parse): Remove traces of classof and headof.
3044 * decl2.c (flag_operator_names): Default to 1.
3045 (lang_decode_option): Do not set it for -ansi.
3047 2000-04-09 Mark Mitchell <mark@codesourcery.com>
3049 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
3050 (DECL_MAIN_VARIANT): Remove.
3051 * decl.c (duplicate_decls): Don't set it.
3052 (start_function): Likewise.
3053 (lang_mark_tree): Don't mark it.
3054 * decl2.c (defer_fn): Don't use it.
3055 * lex.c (retrofit_lang_decl): Don't set it.
3056 * pt.c (tsubst_decl): Likewise.
3057 * ptree.c (print_lang_decl): Don't print it.
3058 * typeck.c (mark_addressable): Don't use it.
3060 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
3062 * vec.cc: Include <new> and <exception>.
3063 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
3064 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
3066 (__cxa_vec_delete): Catch dtor exceptions.
3068 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
3070 Prepend __ to implementation defined names.
3071 * inc/typeinfo (type_info): Rename _name to __name.
3072 (type_info::type_info): Rename parameter.
3073 (type_info::operator==, type_info::operator!=,
3074 type_info::before): Likewise.
3075 (type_info::is_pointer_p, type_info::is_function_p,
3076 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
3079 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
3080 (__pointer_type_info::__pointer_type_info): Likewise.
3081 (__pointer_type_info::is_pointer_p,
3082 __pointer_type_info::do_catch): Prepend __. Rename parameters.
3083 (__array_type_info::__array_type_info): Rename parameters.
3084 (__function_type_info::__function_type_info): Likewise.
3085 (__function_type_info::is_function_p): Prepend __.
3086 (__enum_type_info::__enum_type_info): Rename parameters.
3087 (__pointer_to_member_type_info::__pointer_to_member_type_info):
3089 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
3091 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
3092 (__class_type_info::__class_type_info): Rename parameters.
3093 (__class_type_info::sub_kind): Prepend __. Adjust member names.
3094 (__class_type_info::upcast_result,
3095 __class_type_info::dyncast_result): Prepend __. Move definition
3097 (__class_type_info::do_upcast, __class_type_info::do_catch,
3098 __class_type_info::find_public_src,
3099 __class_type_info::do_dyncast,
3100 __class_type_info::do_find_public_src): Prepend __. Rename
3102 (__si_class_type_info::__si_class_type_info): Rename parameters.
3103 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
3104 __si_class_type_info::do_find_public_src): Prepent __. Rename
3106 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
3107 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
3108 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
3110 (__dynamic_cast): Rename parameters.
3111 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
3112 type_info::do_catch, type_info::do_upcast): Prepend __.
3113 (contained_p, public_p, virtual_p, contained_public_p,
3114 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
3115 (__class_type_info::do_catch,
3116 __class_type_info::do_upcast): Prepend __. Adjust.
3117 (__class_type_info::__upcast_result,
3118 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
3120 (__class_type_info::find_public_src): Prepend __. Adjust.
3121 (__class_type_info::do_find_public_src,
3122 __si_class_type_info::do_find_public_src,
3123 __vmi_class_type_info::do_find_public_src): Likewise.
3124 (__class_type_info::do_dyncast,
3125 __si_class_type_info::do_dyncast,
3126 __vmi_class_type_info::do_dyncast): Likewise.
3127 (__class_type_info::do_upcast,
3128 __si_class_type_info::do_upcast,
3129 __vmi_class_type_info::do_upcast): Likewise.
3130 (__dynamic_cast): Adjust.
3131 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
3132 (__function_type_info::is_function_p): Likewise.
3133 (__pointer_type_info::do_catch): Likewise. Adjust.
3134 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
3135 (__throw_type_match_rtti_2): Adjust.
3136 (__is_pointer): Adjust.
3138 2000-04-08 Mark Mitchell <mark@codesourcery.com>
3140 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
3141 (complete_ctor_identifier): New macro.
3142 (special_function_kind): Add sfk_copy_constructor and
3143 sfk_assignment_operator.
3144 (LOOKUP_HAS_IN_CHARGE): Remove.
3145 (cons_up_default_function): Rename to ...
3146 (implicitly_declare_fn): ... this.
3147 * call.c (build_new_method_call): Add in-charge parameters for
3149 * class.c (add_implicitly_declared_members): Change parameter name
3150 from cant_have_assignment to cant_have_const_assignment.
3151 Replace calls to cons_up_default_function to implicitly_declare_fn.
3152 * cvt.c (ocp_convert): Use complete_ctor_identifier.
3153 * decl.c (initialize_predefined_identifiers): Initialize it.
3154 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
3156 * init.c (expand_default_init): Don't calculate the in-charge
3158 (build_new_1): Likewise.
3159 * lex.c (cons_up_default_function): Move to method.c.
3160 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
3161 (implicitly_declare_fn): New function.
3162 * typeck.c (build_static_cast): Use complete_ctor_identifier.
3163 (build_modify_expr): Likewise.
3164 * typeck2.c (build_functional_cast): Likewise.
3166 Under the new ABI, constructors don't return `this'.
3167 * cp-tree.h (warn_reorder): Declare.
3168 (special_function_kind): New enum.
3169 (global_base_init_list): Remove declaration.
3170 (emit_base_init): Don't return a value.
3171 (check_base_init): Don't declare.
3172 (is_aggr_typedef): Likewise.
3173 * decl.c (check_special_function_return_type): New function.
3174 (return_types): Remove.
3175 (grokdeclarator): Use check_special_function_return_type.
3176 (start_function): Don't initialize ctor_label under the new ABI.
3177 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
3178 * init.c (begin_init_stmts): Move to top of file.
3179 (finish_init_stmts): Likewise.
3180 (warn_reorder): Don't declare.
3181 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
3183 (check_base_init): Remove.
3184 (is_aggr_typedef): Likewise.
3185 (build_new_1): Don't use the return value of a constructor.
3186 * semantics.c (setup_vtbl_ptr): Don't use the return value
3188 * typeck.c (check_return_expr): Don't magically convert return
3189 statements into `return this' in constructors under the new ABI.
3191 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
3192 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
3193 (base_ctor_identifier): New macro.
3194 (base_dtor_identifier): Likewise.
3195 (deleting_dtor_identifier): Likewise.
3196 * decl.c: Don't include obstack.h.
3197 (obstack_chunk_alloc): Don't define.
3198 (obstack_chunk_free): Likewise.
3199 (struct predefined_identifier): New type.
3200 (initialize_predefined_identifiers): New function.
3201 (init_decl_processing): Use it.
3202 (debug_temp_inits): Remove.
3203 (start_method): Don't call preserve_data.
3204 (hack_incomplete_structures): Update comment.
3205 * init.c (init_init_processing): Don't initialize
3207 (build_offset_rf): Remove dead code.
3208 (build_delete): Use CLASSTYPE_N_BASECLASSES.
3209 * search.c (init_search_processing): Don't initialize
3212 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3214 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
3215 some sign_compare warnings.
3217 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
3219 Rename abi::__vmi_class_type_info members.
3220 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
3221 base_list, detail_masks members to vmi_flags, vmi_base_count,
3222 vmi_bases and vmi_flags_masks respectively.
3223 (__vmi_class_type_info::vmi_flags_masks): Rename
3224 details_unknown_mask to flags_unknown_mask.
3225 * tinfo.cc (__class_type_info::do_upcast): Adjust.
3226 (__vmi_class_type_info::do_find_public_src): Adjust.
3227 (__vmi_class_type_info::do_dyncast): Adjust.
3228 (__vmi_class_type_info::do_upcast): Adjust.
3230 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
3232 * tinfo.cc (convert_to_base): New function.
3233 (get_vbase_offset): Remove. Move into convert_to_base.
3234 (__vmi_class_type_info::do_find_public_src): Adjust.
3235 (__vmi_class_type_info::do_dyncast): Adjust.
3236 (__vmi_class_type_info::do_upcast): Adjust.
3238 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
3240 * tinfo.cc (operator=): Use __builtin_strcmp.
3241 * tinfo2.cc (before): Likewise.
3243 2000-04-06 Mark Mitchell <mark@codesourcery.com>
3245 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
3246 (DECL_SAVED_INLINE): Rename to ...
3247 (DECL_DEFERRED_FN): ... this.
3248 (in_function_p): Remove declaration.
3249 (mark_inline_for_output): Rename to ...
3250 (defer_fn): ... this.
3251 * decl.c (finish_function): Adjust call to mark_inline_for_output.
3252 (in_function_p): Remove definition.
3253 * decl2.c (saved_inlines): Rename to ...
3254 (deferred_fns): ... this.
3255 (saved_inlines_used): Rename to ...
3256 (deferred_fns_used): ... this.
3257 (mark_inline_for_output): Rename to ...
3258 (defer_fn): ... this.
3259 (finish_file): Adjust accordingly.
3260 (init_decl2): Likewise.
3261 * lex.c (cons_up_default_function): Likewise.
3262 * pt.c (mark_decl_instantiated): Likewise.
3263 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
3265 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
3266 * semantics.c (expand_body): Defer more functions.
3268 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
3271 * Make-lang.in (CXX_LIB2FUNCS): Add it.
3273 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
3274 __cxa_vec_delete): Declare.
3276 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
3278 * rtti.c (dfs_class_hint_mark): New static function.
3279 (dfs_class_hint_unmark): New static function.
3280 (class_hint_flags): Use them.
3282 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
3284 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
3286 2000-04-05 Mark Mitchell <mark@codesourcery.com>
3288 * cp-tree.h (instantiate_decl): Change prototype.
3289 * decl2.c (mark_used): Adjust call.
3290 * optimize.c (inlinable_function_p): Adjust handling of templates.
3291 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
3292 (do_type_instantiation): Likewise.
3293 (instantiate_decl): Defer more templates.
3294 (instantiate_pending_templates): Adjust logic to handle inline
3297 * Makefile.in (GGC_H): New variable. Use it throughout in place
3300 * call.c: Don't include obstack.h. Include ggc.h.
3301 (obstack_chunk_alloc): Don't define.
3302 (obstack_chunk_free): Likewise.
3303 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
3304 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
3305 (pop_switch): Free it.
3307 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
3309 * dump.c (dequeue_and_dump): Don't try to print the bit_position
3310 if we don't have a DECL_FIELD_OFFSET.
3312 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
3314 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
3317 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3319 * cfns.gperf (hash, libc_name_p): Prototype.
3321 * rtti.c (build_dynamic_cast_1): Constification.
3323 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
3325 * semantics.c (deferred_type_access_control): Prototype.
3327 2000-04-04 Mark Mitchell <mark@codesourcery.com>
3329 Correct many new ABI issues regarding vbase and vcall offset
3331 * cp-tree.h (BINFO_VTABLE): Document.
3332 (struct lang_type): Tweak formatting.
3333 (BINFO_PRIMARY_BINFO): Add to documentation.
3334 (CLASSTYPE_VSIZE): Fix typo in comment.
3335 (CLASSTYPE_VBASECLASSES): Update documentation.
3336 (BINFO_VBASE_MARKED): Remove.
3337 (SET_BINFO_VBASE_MARKED): Likewise.
3338 (CLEAR_BINFO_VBASE_MARKED): Likewise.
3339 (BINFO_FIELDS_MARKED): Remove.
3340 (SET_BINFO_FIELDS_MARKED): Likewise.
3341 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
3342 (enum access_kind): New enumeration.
3343 (num_extra_vtbl_entries): Remove declaration.
3344 (size_extra_vtbl_entries): Likewise.
3345 (get_vtbl_decl_for_binfo): New function.
3346 (dfs_vbase_unmark): Remove declaration.
3347 (mark_primary_bases): Likewise.
3348 * class.c (SAME_FN): Remove.
3349 (struct vcall_offset_data_s): Move definition.
3350 (build_vbase_pointer): Use `build', not `build_binary_op', to
3351 access the vbase pointer under the new ABI.
3352 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
3353 (build_primary_vtable): Likewise.
3354 (dfs_mark_primary_bases): Move here from search.c.
3355 (mark_primary_bases): Likewise.
3356 (determine_primary_bases): Under the new ABI, don't make a base
3357 class a primary base just because we don't yet have any virtual
3359 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
3360 (num_vfun_entries): Remove.
3361 (dfs_count_virtuals): Likewise.
3362 (num_extra_vtbl_entries): Likewise.
3363 (size_extra_vtbl_entries): Likewise.
3364 (layout_virtual_bases): Iterate in inheritance graph order under
3366 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
3367 indicate that a vfield is present.
3368 (init_class_processing): Initialize access_public_node, etc., from
3370 (get_vtbl_decl_for_binfo): New function.
3371 (dump_class_hierarchy_r): Likewise.
3372 (dump_class_hierarchy): Use it.
3373 (finish_vtbls): Build the vtbls in inheritance graph order.
3374 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
3375 (initialize_vtable): Use get_vtbl_decl_for_binfo.
3376 (accumulate_vtbl_inits): Add comments explaining why a pre-order
3378 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
3379 where the vptr points, even for primary vtables.
3380 (build_vtbl_initializer): Adjust handling of vbase and vcall
3382 (build_vcall_and_vbase_vtable_entries): New function.
3383 (dfs_build_vbase_offset_vtbl_entries): Remove.
3384 (build_vbase_offset_vtbl_entries): Reimplement.
3385 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
3386 were already handled in a primary base class vtable.
3387 (build_vcall_offset_vtbl_entries): Adjust.
3388 (build_rtti_vtbl_entries): Adjust.
3389 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
3390 * init.c (expand_virtual_init): Simplify.
3391 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
3392 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
3393 * search.c (BINFO_ACCESS): New macro.
3394 (SET_BINFO_ACCESS): Likewise.
3395 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
3396 (access_in_type): Likewise.
3397 (dfs_accessible_p): Likewise.
3398 (protected_accessible_p): Likewise.
3399 (lookup_fnfields_1): Adjust documentation.
3400 (dfs_mark_primary_bases): Move to class.c
3401 (mark_primary_bases): Likewise.
3402 (dfs_vbase_unmark): Remove.
3403 (virtual_context): Use BINFO_FOR_VBASE.
3404 (dfs_get_vbase_types): Simplify.
3405 (dfs_build_inheritance_graph_order): New function.
3406 (get_vbase_types): Use it.
3407 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
3409 * tinfo.cc (get_vbase_offset): New function.
3410 (__vmi_class_type_info::do_find_public_src): Use it.
3411 (__vmi_class_type_info::do_dyncast): Likewise.
3412 (__vmi_class_type_info::do_upcast): Likewise.
3414 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
3416 * lang-specs.h: Pass -fno-show-column to the preprocessor.
3418 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
3420 * rtti.c (class_hint_flags): Rename flags.
3421 (class_initializer): Remove flags.
3422 (synthesize_tinfo_var): Combine offset and flags. Add flags
3423 for __vmi_class_type_info.
3424 (create_tinfo_types): Remove flags from __class_type_info and
3425 __si_class_type_info. Merge flags and offset from
3426 base_class_type_info.
3427 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
3428 (__base_class_info::is_virtual_p): Adjust.
3429 (__base_class_info::is_public_p): Adjust.
3430 (__base_class_info::offset): New accessor.
3431 (__class_type_info::details): Remove member.
3432 (__class_type_info::__class_type_info): Lose details.
3433 (__class_type_info::detail_masks): Remove.
3434 (__si_class_type_info::__si_class_type_info): Lose details.
3435 (__vmi_class_type_info::details): New member.
3436 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
3437 (__vmi_class_type_info::detail_masks): New member.
3438 * tinfo.cc (__class_type_info::do_upcast): Initialize result
3439 with unknown_details_mask.
3440 (__vmi_class_type_info::do_find_public_src): Adjust
3441 (__vmi_class_type_info::do_dyncast): Adjust.
3442 (__vmi_class_type_info::do_upcast): Set result details, if
3444 (__dynamic_cast): Temporarily #if out optimization.
3446 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
3448 * rtti.c (get_tinfo_decl): Mark used.
3449 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
3450 mark as dealt with, if we output it.
3452 2000-03-28 Mark Mitchell <mark@codesourcery.com>
3454 * class.c: Reorganize to put virtual function table initialization
3455 machinery at the end of the file.
3457 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
3459 * class.c (finish_struct): Use bitsize_zero_node.
3460 * pt.c (instantiate_class_template): Likewise.
3462 2000-03-28 Mark Mitchell <mark@codesourcery.com>
3464 Put RTTI entries at negative offsets in new ABI.
3465 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
3466 vbase offset at index -3, not -1.
3467 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
3468 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
3469 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
3470 (build_rtti_vtbl_entries): New function.
3471 (set_rtti_entry): Remove.
3472 (build_primary_vtable): Don't use it.
3473 (build_secondary_vtable): Likewise.
3474 (start_vtable): Remove.
3475 (first_vfun_index): New function.
3476 (set_vindex): Likewise.
3477 (add_virtual_function): Don't call start_vtable. Do call
3479 (set_primary_base): Rename parameter.
3480 (determine_primary_base): Likewise.
3481 (num_vfun_entries): Don't use skip_rtti_stuff.
3482 (num_extra_vtbl_entries): Include RTTI information.
3483 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
3484 (skip_rtti_stuff): Remove.
3485 (dfs_modify_vtables): Don't use it.
3486 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
3487 (layout_nonempty_base_or_field): Update size handling.
3488 (create_vtable_ptr): Tweak.
3489 (layout_class_type): Adjust parameter names.
3490 (finish_struct_1): Simplify.
3491 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
3492 (skip_rtti_stuff): Remove.
3493 (first_vfun_index): New function.
3494 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
3495 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
3496 (marked_vtable_pathp): Declare.
3497 (unmarked_vtable_pathp): Likewise.
3498 * error.c (dump_expr): Use first_vfun_index to calculate vtable
3500 * rtti.c (build_headof): Look for RTTI at negative offsets.
3501 (get_tinfo_decl_dynamic): Likewise.
3502 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
3504 (create_pseudo_type_info): Do it here instead. Adjust so that
3505 vptr points at first virtual function.
3506 * search.c (marked_vtable_pathp): Make it global.
3507 (unmarked_vtable_pathp): Likewise.
3508 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
3509 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
3510 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
3511 (get_pure_virtuals): Likewise.
3512 (expand_upcast_fixups): Likewise.
3513 * tree.c (debug_binfo): Likewise.
3514 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
3517 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3519 * class.c (check_field_decl): Fix typo.
3520 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
3521 (check_methods): Likewise.
3522 (check_field_decls): Likewise.
3523 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
3524 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
3525 Use DECL_RESULT_FLD, not DECL_RESULT.
3526 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
3527 * lex.c (identifier_type): Likewise.
3528 * pt.c (determine_specialization, lookup_template_class): Likewise.
3529 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
3530 (resolve_overloaded_unification, more_specialized): Likewise.
3531 * semantics.c (finish_member_declaration): Likewise.
3532 * typeck.c (build_x_function_call): Likewise.
3534 2000-03-26 Mark Mitchell <mark@codesourcery.com>
3536 * class.c (layout_empty_base): Handle empty bases with non-byte
3538 (build_base_field): Likewise.
3539 (layout_virtual_bases): Likewise.
3541 * class.c (finish_struct_1): Fix typo in this change:
3543 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3545 2000-03-25 Mark Mitchell <mark@codesourcery.com>
3547 * decl.c (grokdeclarator): Count partial specializations when
3548 keeping track of how many template classes have been seen.
3550 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
3552 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3554 * class.c (build_vbase_pointer_fields): layout_field now place_field.
3555 (get_vfield_offset): Use byte_position.
3556 (set_rtti_entry): Set OFFSET to ssizetype zero.
3557 (get_binfo_offset_as_int): Deleted.
3558 (dfs_record_base_offsets): Use tree_low_cst.
3559 (dfs_search_base_offsets): Likewise.
3560 (layout_nonempty_base_or_field): Reflect changes in RLI format
3561 and call byte_position.
3562 (layout_empty_base): Convert offset to ssizetype.
3563 (build_base_field): use rli_size_unit_so_far.
3564 (dfs_propagate_binfo_offsets): Do computation in proper type.
3565 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
3566 (layout_class_type): Reflect changes in RLI names and fields.
3567 (finish_struct_1): Set DECL_FIELD_OFFSET.
3568 * dump.c (dequeue_and_dump): Call bit_position.
3569 * expr.c (cplus_expand_constant): Use byte_position.
3570 * rtti.c (expand_class_desc): Use bitsize_one_node.
3571 * typeck.c (build_component_addr): Use byte_position and don't
3572 special case for zero offset.
3574 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
3576 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
3578 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
3580 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
3583 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3585 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
3587 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
3588 make_typename_type, check_initializer, cp_finish_decl,
3589 xref_tag): Likewise.
3590 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
3591 decl_namespace, arg_assoc_template_arg, arg_assoc,
3592 validate_nonmember_using_decl, do_class_using_decl): Likewise.
3593 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
3594 args_to_string): Likewise.
3595 * friend.c (is_friend): Likewise.
3596 * lex.c (note_got_semicolon, note_list_got_semicolon,
3597 is_global): Likewise.
3598 * method.c (build_overload_nested_name, build_overload_value,
3599 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
3600 * parse.y (typename_sub, typename_sub1): Likewise.
3601 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
3602 process_partial_specialization, convert_template_argument,
3603 template_args_equal, add_pending_template, lookup_template_class,
3604 for_each_template_parm_r, maybe_fold_nontype_arg,
3605 tsubst, instantiate_template, type_unification_real, unify,
3606 instantiate_pending_templates, set_mangled_name_for_template_decl):
3608 * repo.c (repo_get_id, repo_template_used): Likewise.
3609 * search.c (lookup_field_1): Likewise.
3610 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
3611 * xref.c (classname): Likewise.
3613 2000-03-22 Mark Mitchell <mark@codesourcery.com>
3615 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
3616 (CANONICAL_BINFO): New macro.
3617 (BINFO_NEW_VTABLE_MARKED): Use it.
3618 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
3619 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
3620 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
3622 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3623 (build_secondary_vtable): Likewise.
3624 (dfs_finish_vtbls): Likewise.
3625 (dfs_accumulate_vtbl_inits): Likewise.
3626 (accumulate_vtbl_inits): New function.
3627 (finish_vtbls): Make sure that virtual bases come after
3628 non-virtual bases in the vtable group.
3629 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
3630 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3631 * search.c (struct vbase_info): Move definition.
3632 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3633 (unmarked_new_vtable_p): Likewise.
3634 (dfs_mark_vtable_path): Remove.
3635 (dfs_mark_new_vtable): Remove.
3636 (dfs_unmark_new_vtable): Likewise.
3637 (dfs_clear_search_slot): Likewise.
3638 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3639 (dfs_clear_vbase_slots): Likewise.
3640 (init_vbase_pointers): LIkewise.
3642 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
3644 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
3645 SIZETYPE to a non-SIZETYPE.
3647 2000-03-21 Mark Mitchell <mark@codesourcery.com>
3649 * class.c (layout_virtual_bases): Adjust names in conditionally
3652 * class.c (record_base_offsets): New function.
3653 (layout_conflict_p): Likewise.
3654 (layout_nonempty_base_or_field): Use it.
3655 (layout_empty_base): New function.
3656 (build_base_field): Use it.
3657 (build_base_fields): Update comment.
3658 (layout_virtual_bases): Fold in a little code form
3659 layout_basetypes. Use layout_empty_base.
3660 (layout_basetypes): Remove.
3661 (end_of_class): New function.
3662 (layout_class_type): Use it. Adjust.
3664 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
3666 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
3668 (dfs_skip_nonprimary_vbases_markedp): Likewise.
3669 * typeck.c (fntype_p): Remove.
3671 * cp-tree.h (TI_SPEC_INFO): Remove.
3672 (CLASSTYPE_TI_SPEC_INFO): Likewise.
3673 * pt.c (process_partial_specialization): Likewise.
3675 * class.c (build_base_field): Fix thinko in computation of binfo
3678 * tree.c (mark_local_for_remap_p): Mark variables declared in
3679 TARGET_EXPRs as well.
3681 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
3683 * typeck.c (require_complete_type, complete_type,
3684 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
3685 build_array_ref, convert_arguments, pointer_diff,
3686 build_x_unary_op, build_unary_op, build_c_cast,
3687 build_modify_expr): Use COMPLETE_TYPE_P etc.
3688 * call.c (is_complete, convert_like_real,
3689 build_new_method_call): Likewise.
3690 * class.c (build_vbase_pointer_fields, check_bases,
3691 build_base_field, finish_struct_1, pushclass): Likewise.
3692 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
3693 * decl.c (maybe_process_template_type_declaration, pushtag,
3694 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
3695 layout_var_decl, check_initializer, cp_finish_decl,
3696 grokdeclarator, require_complete_types_for_parms,
3697 grok_op_properties, xref_tag, xref_basetypes,
3698 check_function_type): Likewise.
3699 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
3700 * friend.c (do_friend): Likewise.
3701 * init.c (build_offset_ref): Likewise.
3702 * parse.y (structsp): Likewise.
3703 * pt.c (maybe_process_partial_specialization,
3704 tsubst_friend_function, instantiate_class_template, tsubst,
3705 do_type_instantiation, instantiate_pending_templates): Likewise.
3706 * repo.c (repo_get_id): Likewise.
3707 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
3708 synthesize_tinfo_var, emit_support_tinfos): Likewise.
3709 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
3710 * semantics.c (begin_class_definition): Likewise.
3711 * tree.c (build_cplus_method_type): Likewise.
3712 * typeck2.c (digest_init, build_functional_cast,
3713 add_exception_specifier): Likewise.
3714 * parse.h, parse.c: Regenerated.
3716 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
3718 * inc/cxxabi.h: New header file. Define new-abi entry points.
3719 (__pointer_type_info::target): Rename member to ...
3720 (__pointer_type_info::type): ... here.
3721 (__base_class_info::type): Rename member to ...
3722 (__base_class_info::base): ... here.
3723 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
3724 * cp-tree.h (CPTI_ABI): New global tree enumeration.
3725 (abi_node): New global tree node.
3726 * decl.c (abi_node): Document.
3727 (init_decl_processing): Initialize abi_node.
3728 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
3729 (get_vmi_pseudo_type_info): Likewise.
3730 (create_tinfo_types): Likewise.
3731 (emit_support_tinfos): Likewise.
3732 * tinfo.h (cxxabi.h): Include for new-abi.
3733 Move rtti class definitions to new header file.
3734 * tinfo.cc (abi): Use the namespace.
3735 (std): Move new abi rtti classes from here ...
3736 (__cxxabiv1): ... to here.
3737 * tinfo2.cc (cxxabi.h): Include for new-abi.
3738 Move rtti class definitions to new header file.
3739 (std): Move new abi rtti classes from here ...
3740 (__cxxabiv1): ... to here.
3741 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
3744 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
3745 Jason Merrill <jason@casey.cygnus.com>
3747 * method.c (build_overload_int): Use host_integerp.
3749 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3751 * init.c (build_offset_ref): Handle the case of a templated member
3754 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3756 * except.c (expand_exception_blocks): Clear catch_clauses_last.
3758 2000-03-18 Mark Mitchell <mark@codesourcery.com>
3760 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
3761 * class.c (check_bitfield_decl): Turn illegal bitfields into
3763 (dfs_propagate_binfo_offsets): Adjust for new size_binop
3765 (dfs_offset_for_unshared_vbases): Likewise.
3766 * cvt.c (cp_convert_to_pointer): Convert NULL to a
3767 pointer-to-member correctly under the new ABI.
3768 * expr.c (cplus_expand_constant): Don't use cp_convert when
3769 turning an offset into a pointer-to-member.
3770 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
3771 when dereferencing them under the new ABI.
3772 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
3773 of pointers-to-members under the new ABI.
3775 * class.c (check_bitfield_decl): Remove restriction on really long
3777 (layout_class_type): Implement new ABI handling of bitfields
3778 longer than their types.
3780 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3782 * parse.y (extdefs): Call ggc_collect.
3783 * parse.c: Regenerated.
3785 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
3787 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
3788 (note_name_declared_in_class): Use OVL_CURRENT to get at a
3791 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3793 * class.c (build_vbase_path): Use integer_zerop.
3794 (build_vtable_entry): Use tree_low_cst.
3795 (get_vfield_offset): Use bit_position.
3796 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
3798 (check_bitfield_decl): Set DECL_SIZE using convert.
3799 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
3800 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
3802 (finish_struct_1): Use bit_position.
3803 (dump_class_hierarchy): Use tree_low_cst.
3804 * cp-tree.h (min_precision): Add declaration.
3805 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
3806 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
3807 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
3808 * expr.c (cplus_expand_constant): Use bit_position.
3809 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
3810 * rtti.c (get_base_offset): Use bit_position.
3811 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
3812 host_integerp, and tree_low_cst.
3813 (pointer_int_sum): Use integer_zerop.
3814 (build_component_addr): Use bit_position.
3816 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
3818 * typeck.c (require_complete_type): Don't assume size_zero_node.
3819 (complete_type_or_else): Likewise.
3821 2000-03-16 Steven Grady <grady@digitaldeck.com>
3822 Jason Merrill <jason@casey.cygnus.com>
3824 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
3826 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
3828 * decl2.c (grokfield): Bail out if type is error_mark_node.
3830 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
3832 * tinfo2.cc (__ptr_to_member_data): Rename to ...
3833 (__pointer_to_member_data): ... here. Adjust.
3834 * rtti.c (create_tinfo_types): Adjust.
3836 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
3838 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
3839 * decl.c (ref_desc_type_node): Undocument.
3840 * rtti.c (ptr_ref_initializer): Rename to ...
3841 (ptr_initializer): ... here. Adjust comments.
3842 (ptmd_initializer): Fix comment thinko.
3843 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
3844 (create_tinfo_types): Remove ref_desc_type_node init.
3845 * tinfo2.cc (__reference_type_info): Remove.
3847 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
3849 * decl.c (cp_finish_decl): Remove obsolete comment.
3851 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
3853 2000-03-14 Mark Mitchell <mark@codesourcery.com>
3855 * cp-tree.h: Tweak documentation.
3856 * class.c (build_vbase_pointer_fields): Layout the fields, too.
3857 (avoid_overlap): Remove.
3858 (get_binfo_offset_as_int): New function.
3859 (dfs_serach_base_offsets): Likewise.
3860 (layout_nonempty_base_or_field): Likewise.
3861 (build_base_field): Layout fields here. Avoid placing two objects
3862 of the same type at the same address, under the new ABI.
3863 (build_base_fields): Adjust accordingly.
3864 (create_vtable_ptr): Return the new field, but don't attach it to
3866 (remove_base_field): Remove.
3867 (remove_base_fields): Remove.
3868 (layout_basetypes): Adjust accordingly.
3869 (layout_class_type): Call layout_field for each field, rather than
3870 just making a wholesale call to layout_type.
3872 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
3874 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
3876 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
3878 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
3880 * except.c (dtor_nothrow): New fn.
3881 (do_pop_exception): Use it. Take type parm.
3882 (push_eh_cleanup): Take type parm.
3883 (expand_start_catch_block): Pass it.
3884 (build_eh_type_type_ref): Accept null type.
3886 2000-03-12 Mark Mitchell <mark@codesourcery.com>
3888 * cp-tree.h (revert_static_member_fn): Change prototype.
3889 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
3890 (grok_op_properties): Likewise.
3891 (start_function): Likewise.
3892 (revert_static_member_fn): Simplify.
3893 * pt.c (check_explicit_specialization): Adjust call to
3894 revert_static_member_fn.
3896 2000-03-11 Mark Mitchell <mark@codesourcery.com>
3898 * cp-tree.h (scope_kind): New type.
3899 (tmpl_spec_kind): Likewise.
3900 (declare_pseudo_global_level): Remove.
3901 (pseudo_global_level_p): Rename to template_parm_scope_p.
3902 (pushlevel): Remove declaration.
3903 (begin_scope): New function.
3904 (finish_scope): Likewise.
3905 (current_tmpl_spec_kind): Likewise.
3906 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
3907 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
3908 Add template_spec_p.
3909 (toplevel_bindings_p): Adjust.
3910 (declare_pseudo_global_level): Remove.
3911 (pseudo_global_level_p): Rename to template_parm_scope_p.
3912 (current_tmpl_spec_kind): New function.
3913 (begin_scope): Likewise.
3914 (finish_scope): Likewise.
3915 (maybe_push_to_top_level): Adjust.
3916 (maybe_process_template_type_declaration): Likewise.
3917 (pushtag): Likewise.
3918 (pushdecl_nonclass_level): Likewise.
3919 (lookup_tag): Likewise.
3920 (grokfndecl): Handle member template specializations. Share
3921 constructor and non-constructor code.
3922 * decl2.c (check_classfn): Handle member template specializations.
3923 * pt.c (begin_template_parm_list): Use begin_scope.
3924 (begin_specialization): Likewise.
3925 (end_specialization): Likewise.
3926 (check_explicit_specialization): Use current_tmpl_spec_kind.
3927 Handle member template specializations.
3928 (end_template_decl): Use finish_scope. Remove call to
3930 (push_template_decl_real): Remove bogus error message.
3931 (tsubst_decl): Fix typo in code contained in comment.
3932 (instantiate_template): Handle member template specializations.
3933 (most_general_template): Likewise.
3935 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
3937 * lex.c (whitespace_cr): Compress consecutive calls to warning().
3938 (do_identifier): Ditto for error().
3940 * pt.c (convert_nontype_argument): Ditto for cp_error().
3941 (convert_template_argument): Ditto for cp_pedwarn().
3943 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
3945 * exception.cc (__check_null_eh_spec): New fn.
3946 * except.c (expand_end_eh_spec): Call it if the spec is throw().
3948 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
3950 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
3951 * except.c (expand_end_eh_spec): Add the return type.
3952 * rtti.c (throw_bad_cast): Add the parmtypes.
3953 (throw_bad_typeid): Likewise.
3955 * semantics.c (expand_stmt): Only leave out rtl for unused
3956 artificials, and set DECL_IGNORED_P on them as well.
3957 * decl.c (wrapup_globals_for_namespace): Likewise.
3959 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
3961 * decl.c (maybe_commonize_var): Skip all artificial decls.
3962 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
3964 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
3966 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
3967 * cp-tree.h: Declare flag_enforce_eh_specs.
3968 * decl.c (store_parm_decls, finish_function): Check it.
3970 C library functions don't throw.
3971 * Makefile.in (cfns.h): New target.
3972 (except.o): Depend on it.
3973 * Make-lang.in (cc1plus): Depend on cfns.gperf.
3974 * cfns.gperf: New file.
3975 * cfns.h: Generated.
3976 * except.c: Include it.
3977 (nothrow_libfn_p): New fn.
3978 * decl.c (grokfndecl): Use it.
3979 * cp-tree.h: Declare it.
3981 * decl.c (push_overloaded_decl_1, auto_function,
3982 define_function): Lose.
3983 (build_library_fn_1): New static fn.
3984 (builtin_function): Use it.
3985 (get_atexit_node): Use build_library_fn_ptr.
3986 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
3987 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
3988 push_void_library_fn, push_throw_library_fn): New fns.
3989 * cp-tree.h: Declare them.
3990 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
3991 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
3992 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
3993 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
3994 * rtti.c (build_runtime_decl): Lose.
3995 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
3996 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
3997 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
3999 * call.c (build_call): Remove result_type parm.
4000 Call mark_used on unused artificial fns.
4001 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
4003 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
4005 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
4007 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
4008 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
4009 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
4010 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
4011 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
4012 expand_generic_desc): Likewise.
4014 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4016 * exception.cc (__cp_pop_exception): Cleanup the original object.
4018 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4020 * decl.c (grok_op_properties): Merge conversion to void warning
4021 with other silly op warnings.
4023 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
4025 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
4026 array CONSTRUCTOR elements. Don't use expr_tree_cons.
4028 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4030 * decl.c (cp_make_fname_decl): New function.
4031 (wrapup_globals_for_namespace): Don't emit unused static vars.
4032 (init_decl_processing): Remove comment about use of
4033 array_domain_type. Set make_fname_decl.
4034 (cp_finish_decl): Remove __FUNCTION__ nadgering.
4035 * semantics.c (begin_compound_stmt): Remove
4036 current_function_name_declared flagging.
4037 (expand_stmt): Don't emit unused local statics.
4038 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
4041 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4043 * typeck.c (convert_for_assignment): Don't look at array
4045 * call.c (convert_like_real): Likewise.
4047 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
4049 Add initial support for '\uNNNN' specifier.
4050 * lex.c (read_ucs): New fn.
4051 (readescape, skip_white_space): Call it.
4052 (is_extended_char, is_extended_char_1): New fns.
4053 (utf8_extend_token): New fn, #if 0'd out.
4054 (real_yylex): Treat extended chars like letters.
4056 * search.c (note_debug_info_needed): Walk the bases even if we
4057 weren't deferring the type itself.
4059 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4061 * decl2.c (finish_objects): Constify a char*.
4063 * method.c (emit_thunk): Likewise.
4065 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
4067 * typeck.c (dubious_conversion_warnings): Look through
4070 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4072 * class.c (dfs_modify_vtables): I is now unsigned.
4073 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
4074 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
4075 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
4076 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
4077 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
4078 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
4079 Call integer_all_onesp.
4080 * typeck2.c (process_init_constructor): Use compare_tree_int.
4082 * lang-specs.h (as): Don't call if -syntax-only.
4084 2000-03-06 Mark Mitchell <mark@codesourcery.com>
4086 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
4087 RTL_EXPR_HAS_NO_SCOPE after all.
4089 2000-03-05 Mark Mitchell <mark@codesourcery.com>
4091 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
4092 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
4093 RTL_EXPR_HAS_NO_SCOPE.
4095 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
4098 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
4100 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
4102 * call.c (convert_like): Macrofy.
4103 (convert_like_with_context): New macro.
4104 (convert_like_real): Renamed from convert_like. Add calling
4105 context parameters, for diagnostics. Add recursive flag. Call
4106 dubious_conversion_warnings for outer conversion.
4107 (build_user_type_conversion): Use convert_like_with_context.
4108 (build_over_call): Likewise. Don't warn about dubious
4109 conversions here. Adjust convert_default_arg calls.
4110 (convert_default_arg): Add context parameters for diagnostics.
4111 Pass throught to convert_like_with_context.
4112 * cp-tree.h (convert_default_arg): Add context parameters.
4113 (dubious_conversion_warnings): Prototype new function.
4114 * typeck.c (convert_arguments): Adjust convert_default_arg call.
4115 (dubious_conversion_warnings): New function, broken
4116 out of convert_for_assignment.
4117 (convert_for_assignment): Adjust.
4119 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
4121 * decl2.c (key_method): Break out from...
4122 (import_export_vtable, import_export_class): ...here.
4124 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
4125 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
4127 * search.c (note_debug_info_needed, dfs_debug_mark,
4128 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
4129 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
4131 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
4133 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
4136 2000-03-02 Mark Mitchell <mark@codesourcery.com>
4138 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
4139 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
4140 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
4141 (lang_type): Split gets_new into has_new and has_array_new.
4142 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4143 (TYPE_GETS_NEW): Split into ...
4144 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
4145 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
4146 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
4147 (build_op_new_call): Don't declare.
4148 (build_new_1): Likewise.
4149 * call.c (build_op_new_call): Remove.
4150 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4151 instead of TYPE_NEEDS_DESTRUCTOR.
4152 (finish_struct_bits): Likewise.
4153 (add_implicitly_declared_members): Likewise.
4154 (check_field_decl): Likewise.
4155 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
4156 correctly under the new ABI.
4157 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4158 instead of TYPE_NEEDS_DESTRUCTOR.
4159 (initialize_local_var): Likewise.
4160 (destroy_local_var): Likewise.
4161 (cp_finish_decl): Likewise.
4162 (register_dtor_fn): Likewise.
4163 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
4164 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
4165 TYPE_VEC_DELETE_TAKES_SIZE here.
4166 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
4167 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
4168 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4169 (finish_destructor_body): Likewise.
4170 (maybe_build_cleanup_1): Likewise.
4171 * decl2.c (do_static_destruction): Likewise.
4172 * init.c (build_new_1): Make it static.
4173 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4174 (expand_cleanup_for_base): Likewise.
4175 (get_cookie_size): New function.
4176 (build_new_1): Handle array-new cookies correctly under the new
4178 (build_vec_delete_1): Likewise.
4179 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4180 (build_delete): Likewise.
4181 (build_vec_delete): Handle array-new cookies correctly under the new
4183 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4184 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
4185 TYPE_HAS_ARRAY_NEW_OPERATOR.
4186 * ptree.c (print_lang_type): Check them.
4187 * search.c (context_for_name_lookup): Fix typo in comment.
4188 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4189 * tree.c (break_out_cleanups): Likewise.
4190 (build_cplus_array_test_1): Likewise.
4191 (cp_build_qualified_type_real): Likewise.
4192 * typeck.c (complete_type): Likewise.
4194 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
4195 the command-line, not the end.
4197 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
4199 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
4201 2000-03-02 Tom Tromey <tromey@cygnus.com>
4203 * cp-tree.h (build_java_class_ref): Declare.
4204 * init.c (build_java_class_ref): No longer static.
4205 * except.c (expand_throw): Generate a Java-style `throw' if the
4206 thrown object is a "Java" object.
4207 (initialize_handler_parm): Generate a Java-style lookup of
4208 exception info if the caught object is a "Java" object.
4209 (catch_language, catch_language_init): New globals.
4210 (decl_is_java_type): New function.
4211 (expand_start_catch_block): Don't call push_eh_info() or
4212 push_eh_cleanup() when handling a Java-style "catch". Pass Java
4213 class reference to build_catch_block.
4215 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4217 * typeck.c (comptypes): Treat sizetype like its language equivalent.
4219 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
4221 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
4222 to merge reference/pointer code and fix incorrect warnings.
4224 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
4226 * search.c (protected_accessible_p): Use context_for_name_lookup.
4228 * init.c (construct_virtual_bases): Fix thinko.
4229 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
4231 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
4233 * decl.c (current_function_decl): Move to toplev.c.
4235 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
4237 * pt.c (fn_type_unification): Unify return type, whenever
4239 (get_bindings_real): Only pass return type when necessary.
4240 Remove explicit return type check.
4241 * class.c (resolve_address_of_overloaded_function): Pass desired
4242 return type to fn_type_unification.
4244 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4246 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
4248 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
4250 * rtti.c (expand_class_desc): Likewise.
4251 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
4252 (THUNK_VCALL_OFFSET): Likewise.
4253 (THUNK_DELTA): Reflect changes in ../tree.h.
4255 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
4257 * search.c (protected_accessible_p): Also allow the access if
4258 the member is public in DERIVED. Lose TYPE parm.
4259 (friend_accessible_p): Lose TYPE parm.
4260 (accessible_p): Adjust.
4262 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4264 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
4265 on things that are not sizes; ssize_binop deleted.
4266 Call size_diffop when appropriate.
4267 (dfs_build_vcall_offset_vtbl_entries): Likewise.
4268 (build_primary_vtable, build_secondary_vtable): Likewise.
4269 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
4270 Variable I is HOST_WIDE_INT.
4271 (get_vfield_offset): Pass proper types to size_binop.
4272 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
4273 (finish_struct_1): Likewise.
4274 (skip_rtti_stuff): Arg N is now pointer to signed.
4275 (layout_class_type): Use size_zero_node.
4276 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
4277 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
4278 * decl.c (complete_arry_type): Pass proper types to size_binop.
4279 (xref_basetypes): BINFO_OFFSET is sizetype.
4280 * error.c (dump_expr): Don't use size_binop non-sizes.
4281 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
4282 * init.c (construct_virtual_bases): Fix type error.
4283 (build_vec_delete_1): Pass proper type to size_binop and don't
4285 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
4286 * rtti.c (get_base_offset): Pass proper type to size_binop.
4287 * search.c (dfs_find_vbases): Fix type error.
4288 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
4289 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
4290 * tree.c (debug_binfo): Variable N is signed.
4291 Use HOST_WIDE_INT_PRINT_DEC.
4292 * typeck.c (comptypes): sizetype is same as equivalent integer type.
4293 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
4294 size_one_node and size_zero_node.
4295 (c_alignof): Use size_one_node.
4296 (build_component_addr): Pass proper types to size_binop.
4297 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
4299 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
4301 Implement class scope using-declarations for functions.
4302 * class.c (handle_using_decl): Call add_method for used functions.
4303 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
4304 (add_method): Used functions are hidden by local functions.
4305 (check_bases_and_members): Handle using-decls before finalizing
4306 CLASSTYPE_METHOD_VEC.
4307 * call.c (add_function_candidate): Add ctype parm; if non-zero,
4308 override the type of 'this' accordingly.
4309 (add_template_candidate, add_template_candidate_real): Add ctype parm.
4310 (convert_class_to_reference, build_user_type_conversion_1,
4311 build_new_function_call, build_object_call, build_new_op,
4312 build_new_method_call): Pass ctype parm.
4314 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
4316 * call.c (convert_class_to_reference, build_user_type_conversion_1,
4317 build_new_function_call, build_object_call, build_new_op,
4318 build_new_method_call, build_op_delete_call): Don't get basetype_path
4320 * typeck.c (build_component_ref): Likewise.
4321 * init.c (build_offset_ref): Likewise.
4322 (resolve_offset_ref): Don't call enforce_access.
4323 Call build_scoped_ref.
4324 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
4325 would cause an error or if -pedantic.
4326 * class.c (alter_access): Lose binfo parm.
4328 2000-02-26 Mark Mitchell <mark@codesourcery.com>
4330 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
4333 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
4335 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
4336 pseudo_type_info creation into the std namespace
4338 2000-02-26 Mark Mitchell <mark@codesourcery.com>
4340 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
4341 (import_export_class): Remove declaration.
4342 * decl2.c (import_export_class): Make it static.
4343 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
4344 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
4345 EXPR_WITH_FILE_LOCATION.
4346 * lex.c (check_newline): Tweak filename/lineno setting.
4347 * semantics.c (begin_while_stmt): Fix typo in comment.
4349 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4351 * lang-options.h (-fmessage-length=): Add missing option.
4353 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
4355 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
4357 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
4359 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
4361 * optimize.c (expand_call_inline): Emit the return label before
4362 evaluating the return value.
4364 2000-02-24 Mark Mitchell <mark@codesourcery.com>
4366 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
4367 than duplicating functionality here.
4368 * optimize.c: Include input.h.
4369 (expand_call_inline): Use push_srcloc and pop_srcloc.
4370 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
4371 * parse.c: Regenerated.
4372 * Makefile.in (lex.o): Depend on input.h.
4373 (optimize.o): Likewise.
4375 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
4377 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
4378 function type, rather than ICE.
4380 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
4382 * decl.c (grokdeclarator): Call decl_type_access_control.
4383 * parse.y (parse_end_decl): Don't call decl_type_access_control if
4386 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
4388 * decl.c (decls_match): Remove obsolete static member nadgering.
4390 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4392 * decl.c (grokdeclarator): Change ANSI to ISO.
4393 * lex.c (consume_string, readescape, do_identifier): Likewise.
4394 (parse_float, real_yylex): Likewise.
4395 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
4396 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
4397 new_type_id, maybe_label_decls, simple_stmt,
4398 for.init.statement): Likewise.
4399 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
4400 * semantics.c (finish_named_return_value): Likewise.
4401 * parse.c: Regenerate.
4403 2000-02-21 Mark Mitchell <mark@codesourcery.com>
4405 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
4406 (CPTI_CLASS_STAR_TYPE): Remove.
4407 (vtable_index_type): Likewise.
4408 (class_star_type_node): Remove.
4409 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
4410 (build_binary_op_nodefault): Remove.
4411 * call.c (build_new_op): Use build_binary_op instead of
4412 build_binary_op_nodefault.
4413 * decl.c (init_decl_processing): Remove class_star_type_node
4414 initialization. Make delta_type_node ptrdiff_type_node under the
4415 new ABI. Initialize vtable_index_type.
4416 (build_ptrmemfunc_type): Build different structures for the new
4418 (build_enumerator): Use build_binary_op instead of
4419 build_binary_op_nodefault.
4420 * method.c (build_overload_value): Mangle pointers-to-members
4421 appropriately under the new ABI.
4422 * typeck.c (build_array_ref): Use build_binary_op instead of
4423 build_binary_op_nodefault.
4424 (get_member_function_from_ptrfunc): Adjust for the new ABI.
4425 (build_binary_op_nodefault): Rename to ...
4426 (build_binary_op): ... this. Remove old version. Adjust for
4427 pointer-to-member comparisons under the new ABI.
4428 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
4429 (build_ptrmemfunc): Adjust for the new ABI.
4430 (expand_ptrmemfunc_cst): Likewise.
4431 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
4432 (pfn_from_ptrmemfunc): Adjust for the new ABI.
4434 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
4436 * call.c (build_object_call): Compress consecutive calls to
4438 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
4439 (build_op_delete_call): Adjust message formatting.
4441 * class.c (check_bases): Compress consecutive calls to
4443 (finish_struct_anon): Say 'ISO C++'.
4445 * decl.c (start_decl): Same here.
4446 (grok_reference_init): Likewise.
4447 (grokfndecl): Correct message formatting.
4448 (grokfndecl): Improve diagnostic.
4449 (check_static_variable_definition): Likewise. Say 'ISO C++'
4450 (compute_array_index_type): Say 'ISO C++'
4451 (create_array_type_for_decl): Compress consecutive calls to
4453 (grokdeclarator): Say 'ISO C++'
4454 (grok_op_properties): Likewise.
4456 * decl2.c (delete_sanity): Clairify diagnostic.
4457 (check_member_template): Same here.
4458 (grok_function_init): Use consistent terminology.
4460 * expr.c (do_case): Say 'ISO C++'
4462 * friend.c (do_friend): Compress consecutive calls to warning.
4464 2000-02-20 Mark Mitchell <mark@codesourcery.com>
4466 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
4467 * class.c (build_secondary_vtable): Reorganize. Don't create a
4468 new vtable under the new ABI.
4469 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
4471 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
4472 the initializing elements.
4473 (initialize_vtable): New function.
4474 (dfs_finish_vtbls): Use it.
4475 (dfs_accumulate_vtbl_inits): New function.
4476 (finish_vtbls): Merge primary and secondary vtables under the new
4478 (finish_struct_1): Remove redundant call to layout_vtable_decl.
4479 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
4482 * class.c (build_vtable): New function, split out from ...
4483 (get_vtable_decl): ... here, and ...
4484 (build_secondary_vtable): ... here.
4486 * pt.c (tsubst_decl): Fix formatting.
4488 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4490 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
4491 (avoid_overlap, build_base_field): Likewise.
4492 (build_base_field, build_base_fields, is_empty_class):
4493 Test DECL_SIZE with integer_zero.
4494 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
4495 * cp-tree.h (struct lang_type): New field size_unit.
4496 (CLASSTYPE_SIZE_UNIT): New macro.
4497 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
4498 (cp_finish_decl): Delete -Wlarger-than processing.
4499 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
4500 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
4501 * tree.c (make_binfo): binfo vector is one entry longer.
4502 (walk_tree): Walk DECL_SIZE_UNIT.
4504 2000-02-19 Mark Mitchell <mark@codesourcery.com>
4506 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
4508 (build_vtable_entry): Don't assume all vtable entries are
4510 (build_vtbl_initializer): Adjust accordingly.
4511 (get_vtable_decl): Fix formatting.
4513 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
4515 * semantics.c (deferred_type_access_control): Walk the entire
4517 (save_type_access_control): Rename from
4518 initial_deferred_type_access_control. Just remember the value.
4519 (decl_type_access_control): New fn.
4520 (begin_function_definition): Use deferred_type_access_control, after
4521 we've started the function. Set type_lookups to error_mark_node.
4522 * parse.y (frob_specs, fn.def1): Adjust.
4523 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
4524 (parse_end_decl, parse_bitfield0, parse_method): New fns.
4525 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
4526 (after_type_component_declarator0): Likewise.
4527 (after_type_component_declarator): Likewise.
4528 (notype_component_declarator): Likewise.
4529 * cp-tree.h: Adjust.
4531 * decl.c (redeclaration_error_message): Allow redeclaration of
4532 namespace-scope decls.
4534 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
4536 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
4538 2000-02-17 Mark Mitchell <mark@codesourcery.com>
4540 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
4541 * decl2.c (grokclassfn): Likewise.
4543 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
4545 * decl2.c (lang_decode_option): Don't set default message length
4547 * lex.c (lang_init_options): Set it here.
4549 2000-02-16 Mark Mitchell <mark@codesourcery.com>
4551 Make DECL_CONTEXT mean the class in which a member function was
4552 declared, even for a virtual function.
4553 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
4554 (DECL_FRIEND_CONTEXT): New macro.
4555 (DECL_REAL_CONTEXT): Remove.
4556 (SET_DECL_FRIEND_CONTEXT): Likewise.
4557 (DECL_VIRTUAL_CONTEXT): Adjust.
4558 (DECL_CLASS_SCOPE_P): Use TYPE_P.
4559 (add_friends): Remove.
4560 (hack_decl_function_context): Likewise.
4561 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
4563 (build_over_call): Fix indentation. Use DECL_CONTEXT
4564 instead of DECL_CLASS_CONTEXT.
4565 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
4566 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
4567 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4568 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
4569 (build_base_field): Likewise.
4570 (finish_struct_1): Likewise.
4571 (build_self_reference): Likewise.
4572 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
4574 (pushtag): Use decl_function_context, not
4575 hack_decl_function_context.
4576 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4577 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
4578 (pushdecl): Remove bogus code.
4579 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
4580 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4581 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4582 Use decl_function_context, nothack_decl_function_context.
4583 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
4584 (grokdeclarator): Likewise. Use decl_function_context, not
4585 hack_decl_function_context.
4586 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
4587 (start_function): Use DECL_FRIEND_CONTEXT, not
4588 DECL_CLASS_CONTEXT. Use decl_function_context, not
4589 hack_decl_function_context.
4590 (finish_function): Use decl_function_context, not
4591 hack_decl_function_context.
4592 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
4594 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
4595 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
4596 (grokfield): Likewise.
4597 (finish_builtin_type): Likewise.
4598 (finish_vtable_vardec): Use decl_function_context, not
4599 hack_decl_function_context.
4600 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4601 (start_static_initialization_or_destruction): Likewise.
4602 (finish_static_initialization_or_destruction): Likewise.
4603 (mark_used): Adjust logic for deciding when to synthesize methods.
4604 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
4606 * error.c (dump_function_decl): Use DECL_CONTEXT, not
4608 * friend.c (is_friend): Likewise.
4609 (add_friends): Remove.
4610 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
4611 * lex.c (begin_definition_of_inclass_inline): Use
4612 decl_function_context, not hack_decl_function_context.
4613 (process_next_inline): Likewise.
4614 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4615 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
4616 DECL_CLASSS_CONTEXT.
4617 (hack_identifier): Likewise.
4618 (synthesize_method): Use decl_function_context, not
4619 hack_decl_function_context.
4620 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
4622 (is_member_template): Use decl_function_context, not
4623 hack_decl_function_context. Use DECL_CONTEXT, not
4625 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
4627 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
4629 (push_template_decl_real): Likewise.
4630 (instantiate_class_template): Don't call add_friends.
4631 (tsubst_default_argument): Use DECL_CONTEXT, not
4633 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
4634 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4635 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
4637 * repo.c (repo_inline_used): Likewise.
4638 * search.c (current_scope): Adjust for new _CONTEXT macros.
4639 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
4641 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4642 (lookup_fnfields_here):Likewise.
4643 (check_final_overrider): Likewise.
4644 (init_vbase_pointers): Likewise.
4645 (virtual_context): Likewise.
4646 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
4647 (expand_body): Use decl_function_context, not
4648 hack_decl_function_context.
4649 * tree.c (hack_decl_function_context): Remove.
4650 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
4652 * typeck2.c (error_not_base_type): Likewise.
4654 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
4656 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
4658 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4660 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
4662 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
4664 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
4666 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
4668 * decl2.c (lang_decode_option): Enable automatic line wrapping.
4670 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
4672 * parse.y (frob_specs): Split out...
4673 (parse_decl): From here.
4674 (fn.def2): Call initial_deferred_type_access_control.
4675 (after_type_component_declarator0): Call frob_specs.
4676 (notype_component_declarator0): Likewise.
4677 * search.c (friend_accessible_p): Nested classes are friends of their
4680 2000-02-10 Mark Mitchell <mark@codesourcery.com>
4682 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
4683 used to create an implicit temporary.
4685 * class.c (dfs_modify_vtables): Tweak calculation of functions to
4688 2000-02-08 Nathan Sidwell <nathan@acm.org>
4690 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
4691 strip array element qualifiers too.
4693 2000-02-07 Mark Mitchell <mark@codesourcery.com>
4695 * decl.c (store_parm_decls): Don't build cleanups for parameters
4696 while processing_template_decl.
4698 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
4700 * cp-tree.h (struct saved_scope): Add incomplete field.
4701 (namespace_scope_incomplete): New macro.
4702 * decl.c (pushdecl): Use it.
4703 (hack_incomplete_structures): Use it. See through artificial
4705 (mark_saved_scope): Mark it.
4707 Implement access control for nested types.
4708 * search.c (type_access_control): New fn.
4709 (accessible_p): Now we do perform access control for types.
4710 * semantics.c (deferred_type_access_control): New fn.
4711 (initial_deferred_type_access_control): New fn.
4712 (begin_function_definition): Call it. Add lookups parm.
4713 * decl.c (struct binding_level): Add this_class field.
4714 (pushlevel_class): Set it.
4715 (mark_binding_level): Mark it.
4716 (lookup_name_real): Use it. Call type_access_control.
4717 (mark_saved_scope): Mark lookups field.
4718 * cp-tree.h (flagged_type_tree): Add lookups field.
4719 (struct saved_scope): Add lookups field.
4720 (type_lookups): New macro.
4721 * parse.y (declmods): Now <ftype>.
4722 (parse_decl): Add lookups parm. Call
4723 initial_deferred_type_access_control.
4724 (lang_extdef): Clear type_lookups.
4725 (typed_declspecs, declmods, typespec): Set lookups field.
4726 (initdcl): Call deferred_type_access_control.
4727 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
4728 component_decl_1, named_parm): Adjust.
4729 * friend.c (is_friend): Nested classes are friends of their
4732 * class.c (currently_open_derived_class): New fn.
4733 * method.c (hack_identifier): Use it.
4735 * lex.c (do_identifier): Remove obsolete code.
4737 * parse.y (typed_typespecs): Propagate new_type_flag properly.
4739 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
4741 * tinfo.h: Remove apostrophes from C++ comment (xgettext
4742 thinks this file is plain C).
4744 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4746 * Makefile.in (call.o): Depend on $(EXPR_H).
4748 * call.c: Include "expr.h".
4750 * class.c (dump_class_hierarchy): Add prototype.
4752 * search.c (dfs_get_pure_virtuals): Likewise.
4754 2000-02-1 Ulrich Drepper <drepper@redhat.com>
4756 * parse.y (simple_stmt): Allow :: token in asm parameter list.
4759 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
4761 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
4762 Store it in DECL_FCONTEXT.
4763 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
4765 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
4767 * tinfo.h (old abi): #include "tconfig.h".
4768 * tinfo.cc (convert_to_base): Move into old abi section.
4770 2000-01-31 Mark Mitchell <mark@codesourcery.com>
4772 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
4773 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
4774 (BINFO_PRIMARY_BINFO): New macro.
4775 (BF_DELTA): Rename to ...
4776 (BV_DELTA): ... this.
4777 (BF_VCALL_INDEX): Rename to ...
4778 (BV_VCALL_INDEX): ... this.
4779 (BF_FN): Rename to ...
4781 * class.c (build_vbase_path): Adjust for changes to reverse_path.
4782 (set_rtti_entry): Rename BF_ macros to BV_ variants.
4783 (modify_vtable_entry): Simplify.
4784 (add_virtual_function): Rename BF_ macros to BV_ variants.
4785 (build_vtable_initializer): Likewise.
4786 (get_class_offset_1): Remove.
4787 (dfs_get_class_offset): Likewise.
4788 (get_class_offset): Likewise.
4789 (dfs_find_final_overrider): New function.
4790 (find_final_overrider): Likewise.
4791 (modify_one_vtable): Remove.
4792 (dfs_find_base): New function.
4793 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
4794 find_final_overrider.
4795 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
4797 (dfs_fixup_vtable_deltas): Remove.
4798 (override_one_vtable): Remove.
4799 (merge_overrides): Likewise.
4800 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
4801 unreal chilren of virtual bases.
4802 (finish_struct_1): Don't use merge_overrides. Don't use
4803 dfs_fixup_vtable_deltas.
4804 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
4807 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
4808 Jason Merrill <jason@yorick.cygnus.com>
4810 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
4812 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
4814 * exception.cc (__throw_bad_typeid): Add missing std::.
4816 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4818 * cp-tree.h (make_thunk): PROTO -> PARAMS.
4820 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
4822 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
4824 Runtime support for new-abi rtti.
4825 * inc/typeinfo (type_info::operator!=): Define in class.
4826 (type_info::before, type_info::name, type_info::operator==,
4827 type_info::operator!=): Define new ABI implementations.
4828 (type_info::is_pointer_p, type_info::is_function_p): Declare
4829 new virtual functions.
4830 (type_info::do_catch, type_info::do_upcast): Likewise.
4832 * tinfo.h (__base_class_info): Define new class.
4833 (__class_type_info): Likewise.
4834 (__si_class_type_info): Likewise.
4835 (__vmi_class_type_info): Likewise.
4836 (__dynamic_cast): Prototype.
4838 * tinfo.cc: Conditionalize old and new rtti mechanisms.
4839 (type_info::is_pointer_p): Define new function.
4840 (type_info::is_function_p): Likewise.
4841 (type_info::do_catch): Likewise.
4842 (type_info::do_upcast): Likewise.
4843 (vtable_prefix): New structure for vtable access.
4844 (adjust_pointer): Define new template function.
4845 (contained_p, public_p, virtual_p, contained_public_p,
4846 contained_nonpublic_p, contained_nonvirtual_p): Define new
4848 (nonvirtual_base_type): New local variable.
4849 (__class_type_info::~__class_type_info): Define.
4850 (__si_class_type_info::~__si_class_type_info): Likewise.
4851 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
4852 (__class_type_info::do_catch): Define new function.
4853 (__class_type_info::do_upcast): Likewise.
4854 (__class_type_info::find_public_src): Likewise.
4855 (__class_type_info::do_find_public_src): Likewise.
4856 (__si_class_type_info::do_find_public_src): Likewise.
4857 (__vmi_class_type_info::do_find_public_src): Likewise.
4858 (__class_type_info::do_dyncast): Likewise.
4859 (__si_class_type_info::do_dyncast): Likewise.
4860 (__vmi_class_type_info::do_dyncast): Likewise.
4861 (__class_type_info::do_upcast): Likewise.
4862 (__si_class_type_info::do_upcast): Likewise.
4863 (__vmi_class_type_info::do_upcast): Likewise.
4864 (__dynamic_cast): Likewise.
4866 * tinfo2.cc (__fundamental_type_info): Define new class.
4867 (__pointer_type_info): Likewise.
4868 (__reference_type_info): Likewise.
4869 (__array_type_info): Likewise.
4870 (__function_type_info): Likewise.
4871 (__enum_type_info): Likewise.
4872 (__ptr_to_member_type_info): Likewise.
4873 (__fundamental_type_info::~__fundamental_type_info): Define.
4874 (__pointer_type_info::~__pointer_type_info): Likewise.
4875 (__reference_type_info::~__reference_type_info): Likewise.
4876 (__array_type_info::~__array_type_info): Likewise.
4877 (__function_type_info::~__function_type_info): Likewise.
4878 (__enum_type_info::~__enum_type_info): Likewise.
4879 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
4880 (__pointer_type_info::do_catch): Define new function.
4881 (__ptr_to_member_type_info::do_catch): Define new function.
4883 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
4884 (__is_pointer): Likewise.
4886 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
4888 2000-01-30 Mark Mitchell <mark@codesourcery.com>
4890 * cp/class.c (build_vtable): Rename to build_primary_vtable.
4891 (prepare_fresh_vtable): Rename to build_secondary_vtable.
4892 (make_new_vtable): New function.
4893 (modify_vtable_entry): Handle generation of new vtables correctly.
4894 (modify_one_vtable): Remove unused parameter.
4895 (dfs_fixup_vtable_deltas): Likewise.
4896 (override_one_vtable): Use build_secondary_vtable.
4897 (finish_struct_1): Use build_primary_vtable and
4898 build_secondary_vtable.
4900 2000-01-28 Ulrich Drepper <drepper@redhat.com>
4902 * cp/decl.c: Adjust variable names, comments, help strings.
4904 2000-01-29 Nathan Sidwell <nathan@acm.org>
4906 * new2.cc (operator delete[]): Use operator delete, don't assume
4909 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
4911 * class.c (build_vtbl_initializer): Add argument to
4912 build_vtable_entry call.
4914 2000-01-27 Mark Mitchell <mark@codesourcery.com>
4916 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
4917 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
4918 (BF_DELTA): New macro.
4919 (BF_VCALL_INDEX): Likewise.
4921 (THUNK_VCALL_OFFSET): Likewise.
4922 (make_thunk): Change prototype.
4923 * class.c (build_vtable_entry): Integrate
4924 build_vtable_entry_for_fn. Handle vcall indices.
4925 (build_vtable_entry_for_fn): Remove.
4926 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
4927 BF_VCALL_INDEX, BF_FN.
4928 (modify_vtable_entry): Integrate common code from
4929 modify_one_vtable and dfs_fixup_vtable_deltas.
4930 (add_virtual_function): Set BF_VCALL_INDEX.
4931 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
4933 (modify_one_vtable): Simplify.
4934 (dfs_fixup_vtable_deltas): Likewise.
4935 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
4936 * method.c (make_thunk): Handle vcall indices.
4938 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
4940 Compiler side new abi rtti (not enabled).
4941 * cp-tree.h (new_abi_rtti_p): New macro.
4942 (emit_support_tinfos): Prototype new function.
4943 (tinfo_decl_p): Likewise.
4944 (emit_tinfo_decl): Likwise.
4945 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
4947 (doing_runtime): New local static.
4948 (init_rtti_processing): Add new-abi initializer.
4949 (get_tinfo_decl): Add new-abi logic.
4950 (tinfo_from_decl): Likewise.
4951 (build_dynamic_cast_1): Likewise.
4952 (qualifier_flags): New static function.
4953 (tinfo_base_init): Likewise.
4954 (generic_initializer): Likewise.
4955 (ptr_ref_initializer): Likewise.
4956 (ptmd_initializer): Likewise.
4957 (class_hint_flags): Likewise.
4958 (class_initializer): Likewise.
4959 (synthesize_tinfo_var): Likewise.
4960 (create_real_tinfo_var): Likewise.
4961 (create_pseudo_type_info): Likewise.
4962 (get_vmi_pseudo_type_info): Likewise.
4963 (create_tinfo_types): Likewise.
4964 (emit_support_tinfos): New global function.
4965 (tinfo_decl_p): New global predicate.
4966 (emit_tinfo_decl): New global function.
4967 * class.c (set_rtti_entry): Generalize for old and new rtti.
4968 (build_vtbl_initializer): Likewise.
4969 * decl2.c (finish_file): Likewise.
4971 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
4973 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
4974 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
4976 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
4978 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
4981 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
4983 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
4985 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
4987 * optimize.c (calls_setjmp_r): Supply new argument
4988 to special_function_p.
4990 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4992 * call.c: PROTO -> PARAMS.
4993 * class.c: Likewise.
4994 * cp-tree.h: Likewise.
4998 * decl2.c: Likewise.
5000 * errfn.c: Likewise.
5001 * error.c: Likewise.
5002 * except.c: Likewise.
5005 * input.c: Likewise.
5008 * method.c: Likewise.
5009 * optimize.c: Likewise.
5010 * parse.y: Likewise.
5014 * search.c: Likewise.
5015 * semantics.c: Likewise.
5018 * typeck.c: Likewise.
5019 * typeck2.c: Likewise.
5022 2000-01-25 Richard Henderson <rth@cygnus.com>
5024 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
5026 2000-01-25 Mark Mitchell <mark@codesourcery.com>
5028 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
5029 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
5030 (struct vcall_offset_data_s): New type.
5031 (dfs_vcall_offset_queue_p): New function.
5032 (dfs_build_vcall_offset_vtbl_entries): Likewise.
5033 (build_vcall_offset_vtbl_entries): Likewise.
5034 (layout_vtable_decl): Likewise.
5035 (num_vfun_entries): Likewise.
5036 (num_extra_vtbl_entries): Add the entries for vcall offsets.
5037 (build_vtbl_initializer): Likewise.
5038 (dfs_finish_vtabls): Use layout_vtable_decl.
5039 (modify_one_vtables): Always duplicate vtables under the new ABI.
5040 (finish_struct_1): Use layout_vtable_decl.
5042 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5044 * decl.c (member_function_or_else): Change third arg from a format
5045 specifier to an `enum overload_flags'. Callers changed.
5047 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
5049 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
5050 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
5051 build_const_cast, get_delta_difference, check_return_expr): Avoid
5052 ANSI string concatenation usage.
5054 2000-01-24 Mark Mitchell <mark@codesourcery.com>
5056 * class.c (layout_class_type): Put the fields required to make a
5057 class non-empty at the end, not the beginning, of the TYPE_FIELDs
5060 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
5062 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
5065 * decl2.c (mark_used): Do instantiate inlines that have been
5066 explicitly instantiated.
5068 2000-01-24 Richard Henderson <rth@cygnus.com>
5070 * call.c (build_over_call): Use expand_tree_builtin.
5071 * typeck.c (build_function_call_real): Likewise.
5072 (build_binary_op_nodefault): Handle unordered compares.
5074 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
5076 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
5077 cp_tree_index values.
5078 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
5079 New global node #defines for them.
5080 * rtti.c (call_void_fn): Replace with ...
5081 (build_runtime_decl): ... new static function.
5082 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
5083 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
5084 (build_dynamic_cast_1): Always produce correctly typed result.
5085 Explicitly produce type_info addresses. Use dynamic_cast_node.
5086 * exception.cc (__throw_bad_cast): Return `void *'.
5087 (__throw_bad_typeid): Return `const type_info &'.
5089 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
5091 * cp-tree.h (get_vtable_decl): Prototype new function.
5092 * class.c (get_vtable_decl): New function. Broken out from ...
5093 (build_vtable): ... here. Use it.
5094 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
5097 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
5099 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
5100 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
5101 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
5102 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
5103 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
5104 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
5105 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
5106 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
5107 (CPTI_TINFO_VAR_ID): New enumeration.
5108 (__tp_desc_type_node, __access_mode_type_node,
5109 __bltn_desc_type_node, __user_desc_type_node,
5110 __class_desc_type_node, __ptr_desc_type_node,
5111 __attr_desc_type_node, __func_desc_type_node,
5112 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
5113 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
5114 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
5115 enum_desc_type_node, class_desc_type_node,
5116 si_class_desc_type_node, vmi_class_desc_type_node,
5117 ptmd_desc_type_node, base_desc_type_node): New #defines.
5118 (tinfo_fn_id, tinfo_fn_type): Rename to ...
5119 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
5120 (tinfo_var_id): New enumeration.
5121 (DECL_TINFO_FN_P): Augment comment.
5122 * decl.c (cp_global_trees): Adjust documentation.
5123 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
5124 tinfo_decl_type and tinfo_var_id.
5125 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
5126 (build_typeid): Remove unused variable.
5127 (get_tinfo_var): Use tinfo_var_id.
5128 (tinfo_name): New static function.
5129 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
5130 (tinfo_from_decl): Likewise.
5131 (get_base_offset): New static function, broken out of
5133 (expand_si_desc): Use tinfo_name.
5134 (expand_class_desc): Likewise. Lose local static variable.
5135 Use base_desc_type_node. Use get_base_offset.
5136 (expand_ptr_desc): Use tinfo_name.
5137 (expand_attr_desc): Likewise.
5138 (expand_generic_desc): Likewise.
5140 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
5141 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
5143 2000-01-23 Mark Mitchell <mark@codesourcery.com>
5145 * cp-tree.h (__eprintf): Remove declaration.
5146 * tree.c (__eprintf): Remove definition.
5148 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
5149 Mark Mitchell <mark@codesourcery.com>
5151 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
5152 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
5154 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
5156 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
5158 2000-01-23 Mark Mitchell <mark@codesourcery.com>
5160 * cp-tree.h (register_dtor_fn): New function.
5161 * decl.c (destroy_local_static): Rename to ...
5162 (register_dtor_fn): ... this. Give it external linkage.
5163 (expand_static_init): Use it.
5164 * decl2.c (do_static_initialization): Likewise, if using
5166 (do_static_destruction): Check that __cxa_atexit is not in use.
5167 (finish_file): Don't call do_static_destruction if using
5170 * typeck.c (convert_arguments): Restore two-message error
5173 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
5175 Remap dynamic cast hint values to be consistent across ABIs.
5176 * search.c (dynamic_cast_base_recurse): Remap generated value.
5177 (get_dynamic_cast_base_type): Adjust documentation.
5178 * tinfo.h (__user_type_info::dyncast): Likewise.
5179 (__user_type_info::find_public_subobj): Remap BOFF meaning.
5180 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
5181 (__class_type_info::do_dyncast): Likewise.
5182 (__class_type_info::do_find_public_subobj): Likewise.
5183 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
5185 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
5187 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
5189 * typeck2.c (incomplete_type_error): Restore previous
5190 cp_error and cp_error_at call sequence.
5192 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
5194 * class.c (dump_class_hierarchy): Make format agree with argument;
5195 cast pointer to unsigned long and print with %lx.
5197 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
5199 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
5201 * typeck.c (composite_pointer_type, common_type,
5202 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
5203 build_function_call_real, convert_arguments,
5204 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
5205 build_unary_op, mark_addressable, build_compound_expr,
5206 build_static_cast, build_reinterpret_cast, build_const_cast,
5207 build_c_cast, build_modify_expr, get_delta_difference,
5208 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
5209 'ISO C++'. Fusion consecutive calls to diagnotic message routines
5211 * typeck2.c (readonly_error, abstract_virtuals_error,
5212 process_init_constructor, check_for_new_type): Likewise.
5214 2000-01-19 Mark Mitchell <mark@codesourcery.com>
5216 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
5219 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
5221 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
5222 (build_x_typeid): Likewise.
5223 (get_tinfo_fn): Likewise.
5224 (get_tinfo_fn_unused): Rename to ...
5225 (get_tinfo_decl): ... here.
5226 * rtti.c (build_headof): Replace logic error with assertion.
5227 (get_tinfo_fn_dynamic): Rename to ...
5228 (get_tinfo_decl_dynamic): ... here. Make static. Use
5229 complete_type_or_else.
5230 (build_x_typeid): Move into ...
5231 (build_typeid): ... here. Adjust call to
5232 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
5233 throw_bad_typeid expression.
5234 (get_tinfo_fn_unused): Rename to ...
5235 (get_tinfo_decl): ... here. Adjust comment.
5236 (get_tinfo_fn): Delete.
5237 (tinfo_from_decl): New static function.
5238 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
5239 (get_typeid): Use complete_type_or_else.
5240 (build_dynamic_cast_1): Adjust calls to
5241 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
5242 * parse.y (primary): Adjust call to build_typeid.
5243 * except.c (build_eh_type_type_ref): Adjust call to
5244 get_tinfo_decl. Mark as used.
5245 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
5246 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
5247 * parse.c: Regenerated.
5249 2000-01-17 Mark Mitchell <mark@codesourcery.com>
5251 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
5253 (resolves_to_fixed_type_p): Document calling convention.
5254 * rtti.c (build_x_typeid): Initialize NONNULL.
5256 * cp-tree.h (build_shared_int_cst): New function.
5257 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
5258 * class.c (modify_vtable_entry): Likewise.
5259 (add_virtual_function): Split out code to generated shared
5260 INTEGER_CSTs to build_share_int_cst.
5261 (modify_all_vtables): Handle all the overridden functions here.
5262 Add overridden functions from non-primary virtual bases to the
5264 (finish_struct_1): Adjust call to modify_all_vtables. Add
5265 overridden functions from non-primary bases to the vtable.
5266 * tree.c (build_shared_int_cst): New function.
5268 * cp-tree.h (scratchalloc): Remove.
5269 (build_scratch_list): Likewise.
5270 * call.c (convert_class_to_reference): Replace build_scratch_list
5271 and build_expr_list with build_tree_list.
5272 (add_candidate): Replace scratchalloc with expralloc. Note memory
5274 (build_user_type_conversion_1): Replace build_scratch_list
5275 and build_expr_list with build_tree_list.
5276 (build_new_op): Likewise.
5277 (build_op_delete_call): Likewise.
5278 (convert_like): Likewise.
5279 * cvt.c (ocp_convert): Likewise.
5280 * decl.c (start_decl): Likewise.
5281 (start_function): Likewise.
5282 (finish_destructor_body): Likewise.
5283 (maybe_build_cleanup_1): Likewise.
5284 * decl2.c (reparse_decl_as_expr): Likewise.
5285 * init.c (perform_member_init): Likewise.
5286 (expand_cleanup_for_base): Likewise.
5287 (build_builtin_delete_call): Likewise.
5288 (build_new_1): Likewise.
5289 (build_delete): Likewise.
5290 * method.c (do_build_assign_ref): Likewise.
5291 * parse.y (already_scoped_stmt): Likewise.
5292 (nontrivial_exprlist): Likewise.
5293 (net_initializer): Likewise.
5294 (initlist): Likewise.
5295 * parse.c: Regenerated.
5296 * rtti.c (build_x_typeid): Likewise.
5297 (build_dynamic_cast_1): Likewise.
5298 * typeck.c (build_x_compound_expr): Likewise.
5299 (build_static_cast): Likewise.
5300 (build_modify_expr): Likewise.
5302 * cp-tree.h (DECL_VINDEX): Add documentation.
5303 * class.c (build_vtable_entry): Likewise.
5304 (start_vtable): Add comment.
5305 (add_virtual_function): Replace pending_hard_virtuals with
5306 overridden_virtuals and pending_virtuals with new_virtuals.
5307 Replace redundant assignments with assertions.
5308 (check_for_override): Add comment.
5309 (check_bases_and_members): Replace pending_hard_virtuals with
5310 overridden_virtuals and pending_virtuals with new_virtuals.
5311 (create_vtbl_ptr): Likewise.
5312 (layout_class_type): Likewise.
5313 (finish_struct_1): Likewise. Add comments.
5315 2000-01-16 Mark Mitchell <mark@codesourcery.com>
5317 * class.c (finish_struct_1): Replace redundant code with
5320 * cp-tree.h (flag_new_abi): Move.
5321 (flag_use_cxa_atexit): Likewise.
5322 (flag_honor_std): Likewise.
5323 (flag_rtti): Likewise.
5324 (vbase_offsets_in_vtable_p): Define.
5325 (vptrs_present_everywhere_p): Likewise.
5326 (TYPE_CONTAINS_VPTR_P): Likewise.
5327 (dfs_walk_real): Declare.
5328 * class.c (build_vbase_pointer_fields): Check
5329 vbase_offsets_in_vtable_p.
5330 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
5332 (build_vbase_offset_vtbl_entries): Simplify.
5333 (build_vbase_offset_vtbl_entries): Adjust.
5334 (build_vbase_pointer): Add ability to look up vbase offsets in
5336 (start_vtable): New function.
5337 (add_virtual_function): Use it.
5338 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
5339 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
5340 (build_vtbl_initializer): Take the type of the complete object as
5341 input. Use it to correctly calculate vbase offsets.
5342 (dfs_finish_vtbls): Pass the complete type to
5343 build_vtbl_initializer.
5344 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
5345 (create_vtable_ptr): Create a vtable even if there are no
5346 new virtual functions, under the new ABI.
5347 (finish_struct_1): Likewise.
5348 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
5349 * decl.c (exapnd_static_init): Remove call to
5350 preserve_initializer.
5351 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
5353 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
5354 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
5355 (construct_virtual_bases): Don't initialize virtual base pointers
5357 (build_aggr_init): Clean up comment.
5358 (expand_aggr_init_1): Likewise.
5359 * rtti.c (expand_class_desc): Store the virtual function table
5360 index where the vbase offset lives in the offset field.
5361 * search.c (dfs_walk_real): Make it global.
5362 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
5363 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
5365 * tinfo.h (USItype): Make it signed under the new ABI.
5366 * tinfo.cc (convert_to_base): New function. Encapsulate base
5367 conversion logic here.
5368 (__class_type_info::do_upcast): Use it.
5369 (__class_type_info::do_dyncast): Likewise.
5370 (__class_type_info::do_find_public_subobj): Likewise.
5372 * init.c (construct_virtual_bases): Don't look up the addresses of
5373 virtual bases at run-time.
5375 * class.c (build_vbase_pointer): Relocate.
5376 (build_vbase_pointer_fields): Likewise.
5377 (dfs_build_vbase_offset_vtbl_entries): Likewise.
5378 (build_vbase_offset_vtbl_entries): Likewise.
5380 * decl.c (init_decl_processing): Complain if -fnew-abi
5381 -fno-vtable-thunks is used.
5383 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
5386 2000-01-15 Mark Mitchell <mark@codesourcery.com>
5388 * cp-tree.h (num_extra_vtbl_entries): New function.
5389 (size_extra_vtbl_entries): Likewise.
5390 (dfs_vtable_path_unmark): Likewise.
5391 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
5392 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
5393 * class.c (num_extra_vtbl_entries): New function.
5394 (size_extra_vtbl_entries): Likewise.
5395 (dfs_build_vbase_offset_vtbl_entries): New function.
5396 (build_vbase_offset_vtbl_entries): Likewise.
5397 (build_vtbl_initializer): Use it.
5398 (finish_struct_1): Adjust vtable sizes (using
5399 num_extra_vtbl_entries).
5400 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
5401 THUNK_DECL is non-NULL before expanding it.
5402 * init.c (expand_virtual_init): Adjust the vtable pointer by
5403 size_extra_vtbl_entries before storing it.
5404 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
5405 Handle TREE_LIST parameters here, not in the dfs_* functions.
5406 (dfs_unmarked_real_bases_queue_p): Adjust.
5407 (dfs_marked_real_bases_queue_p): Likewise.
5408 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
5409 (dfs_vtable_path_marked_real_bases_queue_p): New function.
5410 (dfs_vtable_path_unmark): Likewise.
5412 2000-01-14 Mark Mitchell <mark@codesourcery.com>
5414 * optimize.c (copy_body_r): Clear the operand three of a
5415 TARGET_EXPR when copying it.
5417 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5419 * method.c (build_decl_overload_real): Check whether we are in ::
5420 before returning __builtin_new/delete.
5422 2000-01-13 Mark Mitchell <mark@codesourcery.com>
5424 * pt.c (tsubst_friend_function): Improve comment.
5425 (instantiate_decl): Avoid crashing when a "nested" function is
5426 instantiated from the top level.
5428 * dump.c (dqeueue_and_dump): Dump
5429 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
5431 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5433 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
5435 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
5437 * g++spec.c (lang_specific_driver): Add -fnew-abi if
5438 ENABLE_NEW_GXX_ABI defined.
5439 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
5440 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
5441 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
5443 2000-01-12 Mark Mitchell <mark@codesourcery.com>
5445 * decl.c (start_cleanup_fn): Call pushdecl.
5447 * call.c (convert_class_to_reference): Fix typos.
5448 (build_conditional_expr): Handle errors gracefully.
5449 * class.c (push_nested_class): Likewise.
5450 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
5451 (DECL_THIS_EXTERN): Use it.
5452 (DECL_THIS_STATIC): Likewise.
5453 * cvt.c (convert_to_void): Handle errors gracefully.
5454 (build_expr_type_conversion): Likewise.
5455 * decl.c (maybe_push_decl): Likewise.
5456 (start_decl_1): Likewise.
5457 (require_complete_types_for_parms): Likewise.
5458 * parse.y (structsp): Likewise.
5459 (base_class): Likewise.
5460 * parse.c: Regenerated.
5461 * pt.c (finish_member_template_decl): Likewise.
5462 * typeck.c (decay_conversion): Likewise.
5464 * cp-tree.h (dfs_skip_vbases): New function.
5465 (find_vbase_instance): Likewise.
5466 * class.c (determine_primary_base): Allow a nearly empty base to
5467 serve as a primary base class under the new ABI.
5468 (get_class_offset_1): Rename to ...
5469 (dfs_get_class_offset): ... this. Simplify. Don't issue error
5471 (get_class_offset): Use it. Issue error messages here.
5472 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
5473 find the right copies of virtual bases.
5474 (fixup_vtable_deltas1): Rename to ...
5475 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
5476 bases as primary bases.
5477 (fixup_vtable_deltas): Remove.
5478 (override_one_vtable): Handle virtual bases as primary bases.
5479 (merge_overrides): Likewise.
5480 (finish_struct_1): Likewise.
5481 (dump_class_hierarchy): Dump primary-ness of bases as well.
5482 * search.c (mark_primary_bases): Use a pre-order traversal to
5483 handle primary virtual bases.
5484 (dfs_skip_vbases): New fiunction.
5485 (expand_upcast_fixups): Adjust to handle primary virtual bases.
5486 (fixup_virtual_upcast_offsets): Likewise.
5487 (fixup_all_virtual_upcast_offsets): Likewise.
5488 (dfs_find_vbase_instances): New function.
5489 (find_vbase_instance): Likewise.
5491 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
5493 * lex.c (DIR_SEPARATOR): Delete macro.
5495 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
5497 * decl2.c (lang_decode_option): Handle automatic line wrapping
5500 2000-01-11 Mark Mitchell <mark@codesourcery.com>
5502 * friend.c (do_friend): Don't resolve scopes when processing
5503 template declarations, even if the qualifying scope doesn't
5504 involve template parameters.
5506 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
5508 * class.c (dfs_modify_vtables_queue_p): Remove.
5509 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
5510 and dfs_marked_real_bases_queue_p instead of
5511 dfs_modify_vtables_queue_p.
5513 * class.c (build_vbase_path): Simplify.
5514 (dfs_propagate_binfo_offsets): New function.
5515 (propagate_binfo_offsets): Use it.
5516 (remove_base_field): Simplify.
5517 (dfs_set_offset_for_vbases): Remove.
5518 (dfs_set_offset_for_shared_vbases): New function.
5519 (dfs_set_offset_for_unshared_vbases): Likewise.
5520 (layout_virtual_bases): Use them.
5521 (layout_basetypes): Don't call propagate_binfo_offsets.
5522 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
5525 * class.c (build_base_field): New function, split out from ...
5526 (build_base_fields): ... here. Use it. Allocate primary bases
5527 first, under the new ABI.
5528 (get_vtable_entry): Remove.
5529 (remove_base_field): New function, split out from ...
5530 (remove_base_fields): ... here. Adjust since primary bases come
5531 first under the new ABI.
5533 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
5534 (initialize_vtbl_ptrs): New function.
5535 (expand_indirect_vtbls_init): Change prototype.
5536 (convert_pointer_to_vbase): Declare.
5537 * init.c (expand_direct_vtbls_init): Remove.
5538 (dfs_initialize_vtbl_ptrs): New function.
5539 (initialize_vtbl_ptrs): Likewise.
5540 (emit_base_init): Use initialize_vtbl_ptrs.
5541 * search.c (convert_pointer_to_vbase): Make it global.
5542 (expand_indirect_vtbls_init): Remove vtable initialization code.
5543 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
5545 * class.c (dfs_finish_vtbls): New function.
5546 (finish_vtbls): Use it.
5547 (dump_class_hierarchy): New function.
5549 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
5550 (BINFO_VBASE_PRIMARY_P): New macro.
5551 (BINFO_VIRTUALS): Add to documentation.
5552 (SET_BINFO_PRIMARY_MARKED_P): Remove.
5553 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5554 (dfs_mark_primary_bases_queue_p): Likewise.
5555 (dfs_unmarked_real_bases_queue_p): New function.
5556 (dfs_marked_real_bases_queue_p): Likewise.
5557 * search.c (dfs_mark_primary_bases): Adjust.
5558 (mark_primary_bases): Likewise.
5559 (get_shared_vbase_if_not_primary): New function.
5560 (dfs_unmarked_real_bases_queue_p): Likewise.
5561 (dfs_marked_real_bases_queue_p): Likewise.
5562 (dfs_get_pure_virtuals): Simplify.
5563 (get_pure_virtuals): Likewise.
5565 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5567 * lex.c: Include tm_p.h.
5569 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
5571 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
5573 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
5575 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
5576 * pt.c (instantiate_decl): Defer comdat templates that might not be
5579 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
5580 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
5581 (finish_file): Likewise.
5583 * decl2.c (import_export_class): Undo 12/14 change.
5585 * error.c (dump_decl): operator new, not operatornew.
5587 * class.c (field_decl_cmp): A nontype is "greater" than a type.
5588 * search.c (lookup_field_1): Look for the last field with the
5591 2000-01-05 Nathan Sidwell <nathan@acm.org>
5593 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
5596 2000-01-05 Nathan Sidwell <nathan@acm.org>
5598 * typeck.c (build_static_cast): Don't strip target qualifiers
5599 when casting from a class.
5601 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5603 * class.c (warn_hidden): Initialize variable `fndecl'.
5605 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
5607 * decl.c (flag_isoc9x): New variable to be able to use code in
5608 c-common.c. For now always zero.
5610 2000-01-03 Mark Mitchell <mark@codesourcery.com>
5612 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
5613 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
5614 or unshare_base_binfos for virtual bases here.
5615 * search.c (dfs_get_vbase_types): Do it here.
5616 (get_vbase_types): Adjust.
5618 2000-01-02 Mark Mitchell <mark@codesourcery.com>
5620 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
5621 (BINFO_PRIMARY_MARKED_P): Use flag 5.
5622 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
5623 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5624 (unmark_primary_bases): Remove declaration.
5625 (unmarkedp): Declare.
5626 (dfs_vbase_unmark): Likewise.
5627 * class.c (determine_primary_base): Return immediately if there
5628 are no base classes. Call mark_primary_bases here.
5629 (modify_all_direct_vtables): Remove.
5630 (modify_all_indirect_vtables): Remove.
5631 (dfs_modify_vtables_queue_p): New function.
5632 (dfs_modify_vtables): New function.
5633 (modify_all_vtables): Use them.
5634 (build_base_fields): Build FIELD_DECLs for primary virtual base
5636 (create_vtable_ptr): Don't call determine_primary_base here.
5637 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
5638 (dfs_set_offset_for_vbases): ... this.
5639 (layout_virtual_bases): Use it.
5640 (layout_class_type): Call determine_primary_base here.
5641 * search.c (unmarkedp): Make it global.
5642 (shared_marked_p): Simplify.
5643 (shared_unmarked_p): Likewise.
5644 (dfs_primary_bases_queue_p): Remove.
5645 (dfs_unmark_primary_bases): Likewise.
5646 (unmark_primary_bases): Likewise.
5647 (mark_primary_bases): Simplify.
5648 (get_pure_virtuals): Don't call mark_primary_bases here.
5649 (dfs_vbase_unmark): New function.
5650 (get_vbase_types): Simplify.
5652 * class.c (struct base_info): Remove.
5653 (determine_primary_base): Take has_virtual_p rather than a
5654 base_info as input. Don't calculate max_has_virtual.
5655 (finish_struct_bits): Remove max_has_virtual argument.
5656 (create_vtable_ptr): Remove max_has_virtual_p argument.
5657 (layout_virtual_bases): Remove max argument.
5658 (layout_basetypes): Likewise.
5659 (layout_class_type): Remove max_has_virtual_p argument.
5660 (finish_struct_1): Remove max_has_virtual.
5662 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
5663 (layout_basetypes): Remove.
5664 * class.c (propagate_binfo_offsets): Moved here from tree.c.
5665 Update to handle primary virtual bases.
5666 (remove_base_fields): New function, split out from
5668 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
5669 (layout_virtual_bases): New function, split out from
5670 layout_basetypes. Update to handle primary virtual bases.
5671 (layout_basetypes): Moved here from tree.c. Use
5672 remove_base_fields and layout_virtual_bases.
5673 * search.c (dfs_mark_primary_bases_queue_p): New function.
5674 (mark_primary_bases): Use it.
5675 * tree.c (CEIL): Remove.
5676 (propagate_binfo_offsets): Remove.
5677 (layout_basetypes): Remove.
5679 2000-01-01 Mark Mitchell <mark@codesourcery.com>
5681 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
5682 (BINFO_PRIMARY_MARKED_P): New macro.
5683 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
5684 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5685 (mark_primary_bases): New function.
5686 (unmark_primary_bases): Likewise.
5687 * search.c (get_abstract_virtuals_1): Remove.
5688 (dfs_mark_primary_bases): New function.
5689 (mark_primary_bases): Likewise.
5690 (dfs_unmark_primary_bases): Likewise.
5691 (unmark_primary_bases): Likewise.
5692 (dfs_get_pure_virtuals): Likewise.
5694 2000-01-01 Mark Mitchell <mark@codesourcery.com>
5696 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
5697 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
5698 (modify_one_vtable): Adjust.
5699 (fixup_vtable_deltas1): Likewise.
5700 (override_one_vtable): Likewise.
5701 * search.c (get_abstract_virtuals_1): Likewise.
5702 (get_pure_virtuals): Likewise.
5703 (expand_upcast_fixups): Likewise.
5704 * tree.c (debug_binfo): Likewise.
5706 * class.c (build_vtable): Don't return a value. Don't rebuild
5707 vtables for bases that have already been handled.
5708 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
5709 already been handled.
5710 (modify_one_vtable): Adjust accordingly.
5711 (fixup_vtable_deltas1): Likewise.
5712 (finish_struct_1): Likewise.
5714 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5716 * call.c (build_new_method_call): Also check destructors.