1 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
3 * error.c (cp_tree_printer): Rework.
5 2000-08-25 Mark Mitchell <mark@codesourcery.com>
7 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
9 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
10 (cp-demangle.o): Remove target.
11 (dyn-string.o): Likewise.
13 * decl.c (grokfndecl): Require that `main' return an `int'.
14 * mangle.c (write_encoding): Don't mangle return types for
17 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
19 * error.c (tree_formatting_info): New data type.
20 (tree_being_formatted): New macro.
21 (tree_formatting_flags): Likewise.
22 (put_whitespace): Likewise.
23 (print_tree_identifier): Likewise.
24 (print_identifier): Likewise.
25 (cp_tree_printer, print_function_argument_list, print_declaration,
26 print_expression, print_function_declaration,
27 print_function_parameter, print_type, print_cv_qualifier): New
29 (init_error): Initialize lang_printer.
31 2000-08-24 Jason Merrill <jason@redhat.com>
33 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
36 2000-08-24 Greg McGary <greg@mcgary.org>
38 * cp-tree.h (MAIN_NAME_P): Remove macro.
40 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
42 * error.c (print_instantiation_context): Don't forget to flush the
45 2000-08-23 Jason Merrill <jason@redhat.com>
47 * typeck.c (build_ptrmemfunc): Save the input pmf.
49 * method.c (process_modifiers): Use same_type_p.
51 2000-08-23 Mark Mitchell <mark@codesourcery.com>
53 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
54 * mangle.c (write_function_type): Change prototype.
55 (write_encoding): Don't mangle return types for
56 constructors or destructors.
57 (write_type): Adjust call to write_function_type.
58 * pt.c (instantiate_template): Instantiate alternate entry points
59 when instantiating the main function.
61 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
63 * error.c (cp_print_error_function): Don't use embedded '\n' in
66 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
68 * decl.c (init_decl_processing): Remove bogus initialization.
69 * error.c (lang_print_error_function): Restore here.
70 (init_error): Initialize print_error_function.
72 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
74 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
76 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
78 * Makefile.in (error.o): Depends on diagnostic.h
80 * cp-tree.h (problematic_instantiation_changed,
81 record_last_problematic_instantiation, current_instantiation,
82 print_instantiation_context): Declare.
83 (maybe_print_template_context): Remove.
85 * decl.c (init_decl_processing): Set print_error_function to NULL.
86 (lang_print_error_function): Remove, since we're using a new
89 * error.c: #include diagnostic.h
90 (function_category): New function.
91 (cp_diagnostic_starter): Likewise.
92 (cp_diagnostic_finalizer): Likewise.
93 (cp_print_error_function): Likewise.
94 (maybe_print_instantiation_context): Likewise.
95 (print_instantiation_full_context): Likewise.
96 (print_instantiation_partial_context): Likewise.
97 (print_instantiation_context): Define.
98 (init_error): Initialize diagnostic pager and finalizer.
100 * pt.c (problematic_instantiation_changed): Define.
101 (record_last_problematic_instantiation): Likewise.
102 (current_instantiation): Likewise.
103 (maybe_print_template_context): Remove.
104 (print_template_context): Likewise.
105 (current_tinst_level): Make static to reflect Brendan Kehoe's
106 change of 1995-04-13.
107 (push_tinst_level): Call print_instantiation_context.
109 2000-08-21 Nix <nix@esperi.demon.co.uk>
111 * lang-specs.h: Do not process -o or run the assembler if
114 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
116 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
118 * decl2.c (lang_decode_option): Disable gettext attributes for
121 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
123 * lex.c (lang_init_options): Default diagnostic message maximum
124 length to 80, when line-wrapping.
126 2000-08-20 Mark Mitchell <mark@codesourcery.com>
128 * class.c (build_vtbl_initializer): Clear the entire
129 vtbl_init_data. Start keeping track of the functions for which we
130 have created vcall offsets here.
131 (dfs_build_vcall_offset_vtbl_entries): Remove.
132 (build_vcall_offset_vtbl_entries): Reimplement.
133 (add_vcall_offset_vtbl_entries_r): New function.
134 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
135 computing when vcall offsets are necessary.
137 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
139 * decl.c (member_function_or_else): Use cp_error ... %T.
140 (grokdeclarator): Likewise.
141 (start_method): Likewise.
142 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
144 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
146 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
149 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
151 * cp-tree.h (PTRMEM_OK_P): New macro.
152 (itf_ptrmem_ok): New enumeration value.
153 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
154 argument. Diagnose implicit pointer to member.
155 (instantiate_type): Don't diagnose implicit pointer to member
156 here. Pass itf_ptrmem_ok if ok. Adjust calls to
157 resolve_address_of_overloaded_function.
158 * init.c (build_offset_ref): Set PTRMEM_OK_P.
159 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
160 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
161 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
162 (build_unary_op): Deal with single non-static member in
165 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
167 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
169 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
171 * cp-tree.h (enum_name_string): Remove prototype.
172 (report_case_error): Remove prototype.
173 * cp/typeck2.c (enum_name_string): Remove.
174 (report_case_error): Remove.
175 * error.c (dump_expr): Deal with enum values directly.
176 Correctly negate integer constant.
178 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
180 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
181 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
182 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
183 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
184 (__cxa_vec_new): Use __cxa_vec_new2.
185 (__cxa_vec_delete): Use __cxa_vec_delete2.
187 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
189 * vec.cc (__cxa_vec_new): Set "C" linkage.
190 (__cxa_vec_ctor): Likewise.
191 (__cxa_vec_cctor): Likewise.
192 (__cxa_vec_dtor): Likewise.
193 (__cxa_vec_delete): Likewise.
194 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
195 (__cxa_vec_ctor): Likewise.
196 (__cxa_vec_cctor): Likewise.
197 (__cxa_vec_dtor): Likewise.
198 (__cxa_vec_delete): Likewise.
200 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
202 * class.c (instantiate_type): Reinstate local variable
203 deleted in previous change.
205 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
208 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
210 * cp-tree.h (instantiate_type_flags): New enumeration.
211 (instantiate_type): Change parameter.
212 * class.c (instantiate_type): Adjust prototype. Adjust.
213 * call.c (standard_conversion): Adjust instantiate_type call.
214 (reference_binding): Likewise.
215 (build_op_delete_call): Likewise.
216 (convert_like_real): Likewise.
217 * cvt.c (cp_convert_to_pointer): Likewise.
218 (convert_to_reference): Likewise.
219 * pt.c (convert_nontype_argument): Likewise.
220 * typeck.c (build_binary_op): Likewise.
221 (build_ptrmemfunc): Likewise.
222 (convert_for_assignment): Likewise.
224 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
226 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
227 (current_aggr): Define.
228 * decl.c (grokdeclarator): Make sure a friend class is an
229 elaborated type specifier.
230 * parse.y (current_aggr): Remove static definition.
231 (cp_parse_init): Adjust.
232 (structsp): Clear and restore current_aggr.
233 (component_decl_list): Clear current_aggr.
235 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
236 aggregate tag on the typename's context.
238 * pt.c (tsubst_friend_class): Return error_mark_node, if
240 (instantiate_class_template): Ignore error_mark_node friend types.
242 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
244 * cvt.c (warn_ref_binding): New static function, broken out of ...
245 (convert_to_reference): ... here. Use it.
247 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
249 * parse.y (template_arg): Add rule for template qualified with
252 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
254 * decl2.c (add_function): Reorganize.
255 (arg_assoc): Do not consider function template decls.
257 2000-08-11 Jason Merrill <jason@redhat.com>
259 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
262 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
264 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
265 (lookup_nested_tag): Likewise.
267 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
270 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
272 * parse.y (named_complex_class_head_sans_basetype): Remove
275 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
277 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
278 explicit TEMPLATE_ID_EXPR args.
279 (build_expr_from_tree, case CALL_EXPR): Likewise.
281 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
283 * decl.c (check_tag_decl): Diagnose typename's which don't
286 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
288 * init.c (build_aggr_init): Reject bogus array initializers
291 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
293 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
295 * cp/tinfo.cc (__dynamic_cast): Likewise.
296 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
298 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
300 * cvt.c (convert_to_pointer_force): Fix error message when
301 attempting to cast from ambiguous base.
303 2000-08-08 Jason Merrill <jason@redhat.com>
305 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
306 (tsubst_template_arg_vector): Likewise.
308 * decl2.c (build_anon_union_vars): Choose the largest field; don't
309 assume that one will be as large as the union.
311 2000-08-07 Kazu Hirata <kazu@hxi.com>
313 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
314 * decl.c (pop_labels): Likewise.
316 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
318 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
320 (__pointer_to_member_type_info): Likewise.
321 (__base_class_info): Likewise.
322 (__class_type_info): Likewise.
323 (__si_class_type_info): Likewise.
324 (__vmi_class_type_info): Likewise.
325 * tinfo.cc (__si_class_type_info::__do_find_public_src):
326 Changed member names to match specifications.
327 (__vmi_class_type_info::__do_find_public_src): Likewise.
328 (__si_class_type_info::__do_dyncast): Likewise.
329 (__vmi_class_type_info::__do_dyncast): Likewise.
330 (__si_class_type_info::__do_upcast): Likewise.
331 (__vmi_class_type_info::__do_upcast): Likewise.
332 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
333 (__pbase_type_info::__pointer_catch): Likewise.
334 (__pointer_type_info::__pointer_catch): Likewise.
335 (__pointer_to_member_type_info::__pointer_catch): Likewise.
338 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
340 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
341 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
342 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
344 2000-08-04 Mark Mitchell <mark@codesourcery.com>
346 * cp-tree.h (add_method): Change prototype.
347 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
348 Don't double the size of the method vector in the error case.
349 (handle_using_decl): Adjust call to add_method.
350 (add_implicitly_declared_members): Likewise.
351 (clone_function_decl): Likewise.
352 * decl2.c (check_classfn): Likewise.
353 * semantics.c (finish_member_declaration): Likewise.
355 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
357 * decl.c (flag_isoc94): New variable.
359 2000-08-02 Jason Merrill <jason@redhat.com>
361 * pt.c (do_type_instantiation): Add complain parm; don't complain
362 if called recursively.
363 * cp-tree.h, parse.y: Adjust.
365 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
367 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
368 -Wno-strict-prototypes.
370 * g++spec.c: Adjust type of second argument to
371 lang_specific_driver, and update code as necessary.
373 * cp-tree.h: Don't prototype min_precision here.
374 (my_friendly_assert): Cast expression to void.
375 * semantics.c (do_poplevel): Initialize scope_stmts.
377 2000-08-02 Mark Mitchell <mark@codesourcery.com>
379 * cp-tree.h (DECL_NEEDED_P): Tweak.
381 2000-07-28 Jason Merrill <jason@redhat.com>
383 * lang-specs.h: Use %i in rule for .ii files.
385 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
387 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
389 2000-07-30 Mark Mitchell <mark@codesourcery.com>
391 Allow indirect primary bases.
392 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
394 (CLASSTYPE_VFIELD_PARENT): Remove.
395 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
396 (BINFO_PRIMARY_BINFO): Remove.
397 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
398 (BINFO_VBASE_PRIMARY_P): Likewise.
399 (BINFO_PRIMARY_BASE_OF): New macro.
400 (BINFO_INDIRECT_PRIMARY_P): Likewise.
401 (get_primary_binfo): New function.
402 * decl.c (lang_mark_tree): Make lang_type::primary_base.
403 * class.c (vcall_offset_data_s): Rename to ...
404 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
406 (get_derived_offset): Use get_primary_binfo.
407 (dfs_mark_primary_bases): Adjust handling of virtual primary
409 (mark_primary_bases): Likewise.
410 (set_primary_base): Take a binfo, not an integer, as a
411 representation of the primary base.
412 (indirect_primary_base_p): Remove.
413 (determine_primary_base): Adjust for indirect primary bases.
414 (dfs_find_final_overrider): Fix typo in coment.
415 (update_vtable_entry_for_fn): Use get_primary_binfo.
416 (layout_nonempty_base_or_field): Tweak.
417 (build_base_fields): Adjust for new primary base semantics.
418 (dfs_propagate_binfo_offsets): Remove.
419 (propagate_binfo_offsets): Rewrite.
420 (dfs_set_offset_for_shared_vbases): Remove.
421 (layout_virtual_bases): Don't use it.
422 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
424 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
425 CLASSTYPE_VFIELD_PARENT.
426 (dfs_get_primary_binfo): New function.
427 (get_primary_binfo): Likewise.
428 (dump_class_hierarchy_r): Tweak printing of primary bases.
429 (build_vtbl_initializer): Fix typo in comments. Use
431 (build_vcall_and_vbase_vtbl_entries): Likewise.
432 (build_vbaes_offset_vtbl_entries): Likewise.
433 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
434 BV_VCALL_INDEX to handle indirect primary bases.
435 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
436 (build_rtti_vtbl_entries): Likewise.
437 * search.c (get_shared_vbase_if_not_primary): Tweak.
438 (find_vbase_instance): Likewise.
439 (binfo_for_vtable): Simplify.
440 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
441 (make_binfo): Make it have 11 entries.
443 2000-07-30 Alex Samuel <samuel@codesourcery.com>
445 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
446 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
447 ascertaining primaryness.
448 (G): Remove template_args.
449 (decl_is_template_id): New function.
450 (write_encoding): Use decl_is_template_id.
451 (write_name): Likewise. Handle type_decls. Get main variant of
453 (write_nested_name): Likewise.
454 (write_prefix): Likewise.
455 (write_template_prefix): Likewise.
456 (write_special_name_constructor): Remove defunct production from
458 (write_bare_function_type): Remove comment about absent parameter.
459 (write_template_template_arg): Add missing grammar production to
462 2000-07-27 Jason Merrill <jason@redhat.com>
464 * decl.c (duplicate_decls): If common_type produces a non-typedef
465 type for a typedef, just use the old type.
467 2000-07-27 Mark Mitchell <mark@codesourcery.com>
469 * cp-tree.h (function_depth): Declare.
470 (verify_stmt_tree): Likewise.
471 (find_tree): Likewise.
472 * decl.c (function_depth): Give it external linkage.
473 * optimize.c (optimize_function): Increment and decrement it.
474 * tree.c (verify_stmt_tree_r): New function.
475 (verify_stmt_tree): Likewise.
476 (find_tree_r): Likewise.
477 (find_tree): Likewise.
479 2000-07-27 Jason Merrill <jason@redhat.com>
481 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
483 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
485 2000-07-26 Mark Mitchell <mark@codesourcery.com>
487 * decl.c (start_cleanup_fn): Mark the function as `inline'.
488 * decl2.c (get_guard): Call cp_finish_decl, not
489 rest_of_decl_compilation, for local guards.
490 * lex.c (do_identifier): Remove unused variable.
492 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
494 * parse.y: Add missing ';'.
496 2000-07-26 Mark Mitchell <mark@codesourcery.com>
498 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
501 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
503 Kill strict_prototype. Backwards compatibility only for
504 non NO_IMPLICIT_EXTERN_C systems.
505 * cp-tree.h (flag_strict_prototype): Remove.
506 (strict_prototype): Remove.
507 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
508 * decl.c (maybe_push_to_top_level): Adjust.
509 (pop_from_top_level): Adjust.
510 (decls_match): Only allow sloppy parm matching for ancient
512 (init_decl_processing): Adjust.
513 (grokdeclarator): Adjust.
514 * decl2.c (flag_strict_prototype): Remove.
515 (strict_prototype): Remove.
516 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
517 (lang_f_options): Remove "strict-prototype".
518 (unsupported-options): Add "strict-prototype".
519 * lex.c (do_identifier): Adjust.
520 (do_scoped_id): Adjust.
521 * parse.y (empty_parms): Adjust.
522 * class.c (push_lang_context): Adjust.
523 (pop_lang_context): Adjust.
524 * typeck.c (comp_target_parms): Adjust.
526 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
528 * decl.c (poplevel): Deal with anonymous variables at for scope.
529 (maybe_inject_for_scope_var): Likewise.
531 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
533 * decl.c: Remove all signal handling code, now done in toplev.c.
535 2000-07-23 Mark Mitchell <mark@codesourcery.com>
537 * decl.c (make_rtl_for_nonlocal_decl): Rework.
539 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
542 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
544 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
545 Define my_friendly_assert and my_friendly_abort as macros
546 which may call friendly_abort. Prototype friendly abort, not
547 my_friendly_abort or my_friendly_assert.
548 * decl.c (signal_catch): Report the signal caught in the error
549 message. Call fatal directly.
550 * typeck2.c (ack, my_friendly_assert): Delete.
551 (my_friendly_abort): Rename to friendly_abort. Expect file,
552 line, and function parameters. Report the abort code, then
553 call fancy_abort. Do not mask an abort if errors have
556 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
558 * typeck.c (comp_target_parms): Remove obsolete parameter.
559 (comp_target_types): Adjust.
561 2000-07-17 Jason Merrill <jason@redhat.com>
563 * typeck.c (mark_addressable): Never set TREE_USED.
564 * call.c (build_call): Don't abort on calls to library functions
565 that have been declared normally.
567 * typeck.c (build_binary_op): Fix grammar in warning.
569 * exception.cc (__eh_free): Fix prototype.
571 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
573 * decl.c (pushdecl): Handle seeing an OVERLOAD in
574 IDENTIFIER_NAMESPACE_VALUE.
576 2000-07-16 Mark Mitchell <mark@codesourcery.com>
578 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
579 * method.c (use_thunk): Correct handling of vcall offsets.
581 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
583 * .cvsignore: parse.h and parse.c have no cp- prefix.
585 2000-07-13 Mark Mitchell <mark@codesourcery.com>
587 * .cvsignore: New file.
589 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
591 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
593 2000-07-12 Mark Mitchell <mark@codesourcery.com>
595 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
599 2000-07-11 Mark Mitchell <mark@codesourcery.com>
601 * class.c (layout_class_type): Add pointers to virtual bases after
602 base classes under the old ABI.
604 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
606 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
607 (finish_continue_stmt): Likewise.
608 (begin_for_stmt): Remove call to note_level_for_for.
609 (finish_goto_stmt): Change call from build_min_nt
611 (finish_expr_stmt): Likewise.
612 (begin_if_stmt): Likewise.
613 (begin_while_stmt): Likewise.
614 (finish_while_stmt): Likewise.
615 (finish_return_stmt): Likewise.
616 (begin_for_stmt): Likewise.
617 (finish_for_stmt): Likewise.
618 (finish_break_stmt): Likewise.
619 (begin_switch_stmt): Likewise.
620 (finish_case_label): Likewise.
621 (genrtl_try_block): Likewise.
622 (begin_try_block): Likewise.
623 (begin_handler): Likewise.
624 (begin_compound_stmt): Likewise.
625 (finish_asm_stmt): Likewise.
626 (finish_label_stmt): Likewise.
627 (add_decl_stmt): Likewise.
628 (finish_subobject): Likewise.
629 (finish_decl_cleanup): Likewise.
630 (finish_named_return_value): Likewise.
631 (setup_vtbl_ptr): Likewise.
632 (add_scope_stmt): Likewise.
633 * decl.c (finish_constructor_body): Likewise.
634 (finish_destructor_body): Likewise.
635 * optimize.c (copy_body_r): Likewise.
636 (initialize_inlined_parameters): Likewise.
637 (declare_return_variable): Likewise.
638 (expand_call_inline): Likewise.
640 2000-07-10 Jakub Jelinek <jakub@redhat.com>
642 * semantics.c (expand_body): Sync interface information
643 at the end of function body expansion.
645 2000-07-09 Jason Merrill <jason@redhat.com>
647 * init.c (build_new_1): Bail early if the call to new fails.
649 * decl.c (compute_array_index_type): Check specifically for
650 an INTEGER_CST, not just TREE_CONSTANT.
652 * decl.c (duplicate_decls): Don't call duplicate_decls on
653 the DECL_TEMPLATE_RESULT.
654 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
657 * error.c (dump_template_bindings): Don't crash if we had an
658 invalid argument list.
660 * typeck.c (c_expand_start_case): Do narrowing here.
661 * semantics.c (finish_switch_cond): Not here.
663 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
665 * parse.y (asm_clobbers): Do string concatenation.
667 2000-07-09 Mark Mitchell <mark@codesourcery.com>
669 * decl.c (pushtag): Don't put local classes in template functions
670 on the local_classes list.
672 2000-07-04 Scott Snyder <snyder@fnal.gov>
674 * decl2.c (get_guard): Add missing return for old ABI local
677 2000-07-09 Mark Mitchell <mark@codesourcery.com>
679 * cp-tree.h (char_type_p): New function.
680 * decl.c (init_decl_processing): Don't initialize
681 signed_wchar_type_node or unsigned_wchar_type_node.
682 (complete_array_type): Handle brace-enclosed string-constants.
683 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
684 * tree.c (char_type_p): New function.
685 * typeck2.c (digest_init): Use char_type_p.
687 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
689 * pt.c (tsubst): Don't layout type, if it's error_mark.
691 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
693 * pt.c (instantiate_pending_templates): Reset template level.
695 2000-07-05 Jason Merrill <jason@redhat.com>
697 * call.c (joust): Don't complain about `operator char *()' beating
698 `operator const char *() const'.
700 2000-07-04 scott snyder <snyder@fnal.gov>
701 Jason Merrill <jason@redhat.com>
703 * repo.c (repo_get_id): Handle the case where a class with virtual
704 bases has a null TYPE_BINFO_VTABLE.
706 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
707 Jason Merrill <jason@redhat.com>
709 * parse.y (member_init): Just pass in the type.
710 * init.c (expand_member_init): Handle getting a type.
712 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
713 Jason Merrill <jason@redhat.com>
715 * decl.c (finish_function): Warn if a function has no return
717 Suggested by Andrew Koenig.
718 * typeck.c (check_return_expr): Do set current_function_returns_value
719 if we got an error_mark_node.
721 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
723 * decl2.c (push_decl_namespace): Push the original namespace.
725 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
727 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
728 * semantics.c (begin_class_definition): Clear it.
730 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
732 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
733 (genrtl_expr_stmt): Likewise.
734 (genrtl_decl_stmt): Likewise.
735 (genrtl_if_stmt): Likewise.
736 (genrtl_while_stmt): Likewise.
737 (genrtl_do_stmt): Likewise.
738 (genrtl_return_stmt): Likewise.
739 (genrtl_for_stmt): Likewise.
740 (genrtl_break_stmt): Likewise.
741 (genrtl_continue_stmt): Likewise.
742 (genrtl_scope_stmt): Likewise.
743 (genrtl_switch_stmt): Likewise.
744 (genrtl_case_label): Likewise.
745 (genrtl_begin_compound_stmt): Likewise.
746 (genrtl_finish_compound_stmt): Likewise.
747 (genrtl_compound_stmt): Likewise.
748 (genrtl_asm_stmt): Likewise.
750 * init.c (begin_init_stmts): Remove call to
751 genrtl_begin_compound_stmt.
752 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
754 * semantics.c (lang_expand_stmt): Changed call to
755 genrtl_compound_stmt to ignore return value.
757 2000-07-02 Mark Mitchell <mark@codesourcery.com>
759 * mangle.c (canonicalize_for_substitution): Return the canonical
762 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
764 * typeck.c (commonparms): Remove obstack manipulations.
766 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
768 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
770 * Makefile.in (OBJS): Added ../c-semantics.o.
773 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
775 (struct stmt_tree): Added comment.
776 (current_function_name_declared): Removed.
777 (stmts_are_full_exprs_p): Likewise.
778 (genrtl_do_pushlevel): Likewise.
779 (genrtl_clear_out_block): Likewise.
780 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
781 (DECL_ANON_UNION_ELEMS): Likewise.
782 (emit_local_var): Likewise.
783 (make_rtl_for_local_static): Likewise.
785 (expand_stmt): Likewise.
786 (genrtl_decl_cleanup): Likewise.
787 (c_expand_asm_operands): Likewise.
788 (c_expand_return): Likewise.
789 (c_expand_start_case): Likewise.
791 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
792 (emit_local_var): Likewise.
793 (initialize_local_var): Change reference to
794 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
795 Change reference to stmts_are_full_exprs_p to
796 current_stmt_tree->stmts_are_full_exprs_p.
797 (push_cp_function_context): Likewise.
799 * expect.c (expand_throw): Change reference to
800 stmts_are_full_exprs_p.
802 * init.c (build_aggr_init): Change reference to
803 stmts_are_full_exprs_p.
804 (build_vec_init): Likewise.
806 * optimize.c (maybe_clone_body): Change reference to
807 current_function_name_declared to
808 cp_function_chain->name_declared.
810 * pt.c (instantiate_decl): Change reference to
811 current_function_name_declared to
812 cp_function_chain->name_declared.
814 * semantics.c (expand_cond): Moved declaration to c-common.h.
815 (genrtl_do_pushlevel): Moved to c-semantics.c.
816 (genrtl_clear_out_block): Likewise.
817 (genrtl_goto_stmt): Likewise.
818 (genrtl_expr_stmt): Likewise.
819 (genrtl_decl_stmt): Likewise.
820 (gerntl_if_stmt): Likewise.
821 (genrtl_while_stmt): Likewise.
822 (genrtl_do_stmt): Likewise.
823 (genrtl_return_stmt): Likewise.
824 (genrtl_for_stmt): Likewise.
825 (genrtl_break_stmt): Likewise.
826 (genrtl_continue_stmt): Likewise.
827 (genrtl_scope_stmt): Likewise.
828 (genrtl_switch_stmt): Likewise.
829 (genrtl_case_label): Likewise.
830 (genrtl_begin_compound_stmt): Likewise.
831 (genrtl_finish_compound_stmt): Likewise.
832 (genrtl_compound_stmt): Likewise.
833 (genrtl_asm_stmt): Likewise.
834 (genrtl_decl_cleanup): Likewise.
835 (expand_cond): Likewise.
836 (expand_stmt): Renamed to ...
837 (lang_expand_stmt): ... this.
838 (lang_expand_expr_stmt): Initialize.
839 (set_current_function_name_declared): Likewise.
840 (stmts_are_full_exprs_p): Likewise.
841 (current_function_name_declared): Likewise.
842 (anon_aggr_type_p): Likewise.
843 (do_poplevel): Change reference to
844 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
845 Change reference to stmts_are_full_exprs_p to
846 current_stmt_tree->stmts_are_full_exprs_p.
847 (add_tree): Likewise.
848 (finish_expr_stmt): Likewise.
849 (prep_stmt): Likewise.
850 (lang_expand_stmt): Likewise.
851 (begin_compound_stmt): Change reference to
852 current_function_name_declared to
853 cp_function_chain->name_declared and call to
854 current_function_name_declared().
855 (setup_vtbl_ptr): Likewise.
856 (genrtl_do_poplevel): Removed.
858 2000-06-30 Jason Merrill <jason@redhat.com>
860 * init.c (init_init_processing): Go back to aligning like
861 double_type_node for old ABI.
862 (get_cookie_size): Make cookie larger if we get a type that needs
864 (build_vec_delete): Call it.
866 * typeck.c (qualify_type_recursive): New fn.
867 (composite_pointer_type): Use it.
868 (build_binary_op): Use composite_pointer_type.
870 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
871 Jason Merrill <jason@redhat.com>
873 * typeck.c (check_return_expr): Don't complain about returning
874 NULL from operator new if -fcheck-new.
875 * cp-tree.h: Declare flag_check_new here.
878 2000-06-28 Alex Samuel <samuel@codesourcery.com>
880 * mangle.c (find_substitution): Use same_type_p.
881 (write_encoding): Don't check for substitutions.
883 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
885 * parse.y (expr_no_comma_rangle): New non-terminal.
886 (template_parm): Use it for default parameter case.
887 (template_arg): Use it.
888 (expr_no_commas): Remove commented out undefined extensions.
889 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
890 * parse.h, parse.c: Rebuilt.
892 2000-06-30 Mark Mitchell <mark@codesourcery.com>
894 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
895 (finish_asm_stmt): Do it here, instead.
897 * cp-tree.h (ridpointers): Don't declare.
898 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
899 (record_builtin_java_type): Likewise.
900 (init_decl_processing): Likewise.
901 * lex.c: Move inclusion of lex.h.
902 (ridpointers): Don't define.
903 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
905 * lex.h (enum rid): Rename to ...
906 (enum cp_rid): ... this.
907 (ridpointers): Don't declare.
908 * parse.y: Move inclusion of lex.h.
909 * parse.c: Regenerated.
910 * spew.c: Move inclusion of lex.h.
912 * cp-tree.h (struct language_function): Remove temp_name_counter.
913 (temp_name_counter): Remove.
914 (get_temp_name): Change prototype.
915 (get_guard): New function.
916 (get_guard_cond): Likewise.
917 (set_guard): Likewise.
918 * cvt.c (build_up_reference): Adjust call to get_temp_name.
919 * decl.c (expand_static_init): Use get_guard and friends to
920 implement guard variables.
921 * decl2.c (get_temp_name): Assume that the variables created are
923 (get_sentry): Rename to ...
924 (get_guard): ... this. Implement new ABI guard variables.
925 (get_guard_bits): New function.
926 (get_guard_cond): Likewise.
927 (set_guard): Likewise.
928 (start_static_initialization_or_destruction): Use them.
929 (do_static_initialization): Replace sentry with guard throughout.
930 (do_static_destruction): Likewise.
931 * init.c (create_temporary_var): Add comment.
933 2000-06-28 Alex Samuel <samuel@codesourcery.com>
935 * mangle.c (find_substitution): Use same_type_p.
936 (write_encoding): Don't check for substitutions.
938 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
940 * parse.y (expr_no_comma_rangle): New non-terminal.
941 (template_parm): Use it for default parameter case.
942 (template_arg): Use it.
943 (expr_no_commas): Remove commented out undefined extensions.
944 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
945 * parse.h, parse.c: Rebuilt.
947 2000-06-29 Mark Mitchell <mark@codesourcery.com>
949 * cp-tree.h (flag_const_strings): Remove.
950 (warn_parentheses): Likewise.
951 (warn_format): Likewise.
952 (common_type): Likewise.
953 (default_conversion): Likewise.
954 (build_binary_op): Likewise.
955 (cp_build_binary_op): New macro.
956 * call.c (build_new_op): Use cp_build_binary_op instead of
958 * class.c (build_vtable_entry_ref): Likewise.
959 * decl.c (expand_static_init): Likewise.
960 (compute_array_index_type): Likewise.
961 (build_enumerator): Likewise.
962 * decl2.c (delete_sanity): Likewise.
963 (start_static_initialization_or_destruction): Likewise.
964 * error.c (dump_type_suffix): Likewise.
965 * init.c (resolve_offset_ref): Likewise.
966 (build_new): Likewise.
967 (build_new_1): Likewise.
968 (build_vec_delete_1): Likewise.
969 (build_vec_init): Likewise.
970 (build_delete): Likewise.
971 * rtti.c (synthesize_tinfo_fn): Likewise.
972 (synthesize_tinfo_var): Likewise.
973 * search.c (expand_upcast_fixups): Likewise.
974 (fixup_all_virtual_upcast_offsets): Likewise.
975 * typeck.c (build_array_ref): Likewise.
976 (get_member_function_from_ptrfunc): Likewise.
977 (build_binary_op): Add parameter.
978 (pointer_int_sum): Use cp_build_binary_op.
979 (pointer_diff): Likewise.
980 (build_modify_expr): Likewise.
981 (get_delta_difference): Likewise.
982 (build_ptrmemfunc): Likewise.
984 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
986 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
987 * decl.c (create_implicit_typedef): Adjust.
988 * decl2.c (build_artificial_parm): Adjust.
989 * method.c (implicitly_declare_fn): Adjust.
990 * pt.c (push_inline_template_parms_recursive): Adjust.
991 (process_template_parm): Adjust.
992 (overloaded_template_name): Adjust.
993 * semantics.c (finish_template_template_parm): Adjust.
995 2000-06-28 Mark Mitchell <mark@codesourcery.com>
997 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
998 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
999 where to emit thunks.
1000 (build_vtt): Adjust call to build_vtt_inits.
1001 (build_vtt_inits): Add parameter to indicate whether or not
1002 sub-VTTs for virtual bases should be included. Adjust handling of
1003 construction vtables.
1004 (get_matching_base): New function.
1005 (dfs_build_vtt_inits): Rename to ...
1006 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
1007 construction vtables.
1008 (dfs_fixup_binfo_vtbls): Likewise.
1009 (build_ctor_vtbl_groups): Build construction vtables for virtual
1011 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
1012 to build construction vtbls.
1013 (dfs_accumulate_vtbl_inits): Adjust handling of
1014 construction vtables.
1016 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
1019 2000-06-27 Mark Mitchell <mark@codesourcery.com>
1021 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
1023 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
1025 * search.c (hides): Remove.
1026 (is_subobject_of_p): Add most_derived parameter. Use
1028 (lookup_field_queue_p): Adjust.
1029 (lookup_field_r): Adjust.
1031 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
1033 * decl2.c (handle_class_head): Bash typedefs to the type's main
1036 2000-06-25 Mark Mitchell <mark@codesourcery.com>
1038 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
1039 (begin_global_stmt_expr): ... this.
1040 (genrtl_finish_stmt_expr): Rename to ...
1041 (finish_global_stmt_expr): ... this.
1042 * init.c (begin_init_stmts): Adjust calls.
1043 (finish_init_stmts): Likewise.
1044 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
1045 (begin_global_stmt_expr): ... this.
1046 (genrtl_finish_stmt_expr): Rename to ...
1047 (finish_global_stmt_expr): ... this.
1049 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1051 * search.c (lookup_member): Fix typo in comment.
1053 2000-06-24 Jason Merrill <jason@redhat.com>
1055 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
1056 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
1058 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1060 * parse.y (complex_direct_notype_declarator): Support global_scope.
1061 * Makefile.in: Adjust conflict count.
1063 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1065 * parse.y (template_arg): Convert TEMPLATE_DECL
1066 that is a template template paramter to
1067 TEMPLATE_TEMPLATE_PARM here.
1069 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
1070 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
1071 (copy_template_template_parm): Adjust prototype.
1072 * decl.c (grokdeclarator): Remove dead code.
1073 * pt.c (process_template_parm): Tidy.
1074 (lookup_template_class): Construct nodes in
1075 copy_template_template_parm.
1076 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
1077 lookup_template_class. Use TYPE_TI_TEMPLATE.
1078 * tree.c (copy_template_template_parm): Add NEWARGS
1080 (mapcar): Adjust call to copy_template_template_parm.
1081 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
1082 * method.c (build_template_template_parm_names): Change error
1083 code to avoid compilation warning.
1085 * gxxint.texi: Document template template parameter
1088 2000-06-21 Alex Samuel <samuel@codesourcery.com>
1090 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
1091 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
1092 (cp-demangle.o): New rule.
1093 (dyn-string.o): Likewise.
1094 * inc/cxxabi.h (__cxa_demangle): New declaration.
1096 2000-06-22 Mark Mitchell <mark@codesourcery.com>
1098 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
1099 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
1100 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
1102 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
1103 (make_thunk): Change prototype.
1104 (emit_thunk): Rename to use_thunk.
1105 (mangle_thunk): Change prototype.
1106 * class.c (get_derived_offset): Simplify.
1107 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
1108 BV_GENERATE_THUNK_WITH_VTABLE_P.
1109 (build_primary_vtable): Simplify.
1110 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
1111 (dfs_find_base): Remove.
1112 (update_vtable_entry_for_fn): Correct bug in finding the base
1113 where a virtual function was first declared. Figure out whether
1114 or not to emit a vcall-thunk with the vtables in which it appears.
1115 Correct logic for deciding whether to use an ordinary thunk, or a
1117 (finish_struct_1): Remove unnecssary code.
1118 (build_vtbl_initializer): Use ssize_int for the running counter of
1120 (build_vtbl_initializer): Only use vcall thunks where necessary.
1121 Mark thunks as needing to be emitted with their vtables, or not.
1122 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
1123 indices. Use size_binop.
1124 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
1125 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
1127 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
1128 (build_vtable_entry): Mark thunks as needing to be emitted with
1129 their vtables, or not.
1130 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
1131 * decl2.c (mark_vtable_entries): Use use_thunk instead of
1133 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
1135 * error.c (dump_expr): Use BV_FN.
1136 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
1138 * method.c (make_thunk): Likewise.
1139 (emit_thunk): Rename to use_thunk. Allow callers to decide
1140 whether or not to actually emit the thunk. Adjust for changes in
1141 representation of vcall offsets.
1142 * search.c (dfs_get_pure_virtuals): Use BV_FN.
1143 * semantics.c (emit_associated_thunks): New function.
1144 (expand_body): Use it.
1145 * ir.texi: Adjust decriptions of thunks.
1147 2000-06-22 Jason Merrill <jason@redhat.com>
1149 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
1150 (tsubst_friend_function): Copy it here.
1152 * decl.c (grok_op_properties): Fix typo.
1154 * decl2.c (delete_sanity): Clarify warning, avoid failure on
1157 * pt.c (check_explicit_specialization): Clarify error.
1159 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
1160 an old OVERLOAD when we're declaring a non-function.
1161 (pushdecl, destroy_local_var): Check for error_mark_node.
1162 (warn_extern_redeclared_static): Also bail early if
1164 (push_overloaded_decl): Ignore an old error_mark_node.
1166 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
1168 * call.c (build_x_va_arg): Check if in a template decl.
1169 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
1171 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
1173 * class.c (push_lang_context): TYPE_NAME gets you to the Java
1175 * decl.c (check_goto): Computed gotos assumed OK.
1177 2000-06-20 Jason Merrill <jason@redhat.com>
1179 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
1180 for which we don't need to look for instantiations.
1182 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
1184 * parse.y (program): Always call finish_translation_unit.
1185 * parse.c, parse.h: Rebuilt.
1187 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
1189 * method.c: Don't include hard-reg-set.h.
1191 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
1193 * rtti.c (get_base_offset): Cope when vbase field is in a base.
1195 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
1197 * call.c (build_conditional_expr): Use VOID_TYPE_P.
1198 * cvt.c (cp_convert_to_pointer): Likewise.
1199 (convert_to_void): Likewise.
1200 * error.c (dump_expr): Likewise.
1201 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
1202 * init.c (build_delete): Likewise.
1203 * method.c (emit_thunk): Likewise.
1204 * optmize.c (declare_return_variable): Likewise.
1205 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1206 (get_typeid): Likewise.
1207 (build_dynamic_cast_1): Likewise.
1208 * typeck.c (composite_pointer_type): Likewise.
1209 (common_type): Likewise.
1210 (build_indirect_ref): Likewise.
1211 (build_binary_op): Likewise.
1212 (build_x_compound_expr): Likewise.
1213 (check_return_expr): Likewise.
1214 * typeck2.c (add_exception_specifier): Likewise.
1216 * mangle.c (write_method_parms): Use direct comparison for end
1219 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
1221 * cp-tree.h (genrtl_try_block): Declare function.
1222 (genrtl_handler): Likewise.
1223 (genrtl_catch_block): Likewise.
1224 (genrtl_ctor_stmt): Likewise.
1225 (genrtl_subobject): Likewise.
1226 (genrtl_decl_cleanup): Likewise.
1227 (genrtl_do_poplevel): Likewise.
1228 (genrtl_do_pushlevel): Likewise.
1229 (genrtl_clear_out_block): Likewise.
1230 (genrtl_goto_stmt): Likewise.
1231 (genrtl_expr_stmt): Likewise.
1232 (genrtl_decl_stmt): Likewise.
1233 (genrtl_if_stmt): Likewise.
1234 (genrtl_while_stmt): Likewise.
1235 (genrtl_do_stmt): Likewise.
1236 (genrtl_return_stmt): Likewise.
1237 (genrtl_for_stmt): Likewise.
1238 (genrtl_break_stmt): Likewise.
1239 (genrtl_continue_stmt): Likewise.
1240 (genrtl_scope_stmt): Likewise.
1241 (genrtl_switch_stmt): Likewise.
1242 (genrtl_case_label): Likewise.
1243 (genrtl_begin_compound_stmt): Likewise.
1244 (genrtl_finish_compound_stmt): Likewise.
1245 (genrtl_compound_stmt): Likewise.
1246 (genrtl_asm_stmt): Likewise.
1247 (genrtl_named_return_value): Likewise.
1248 (genrtl_begin_stmt_expr): Likewise.
1249 (genrtl_finish_stmt_expr): Likewise.
1250 (finish_for_stmt): Removed first argument.
1251 (finish_switch_stmt): Likewise.
1253 * semantics.c (genrtl_try_block): Define function.
1254 (genrtl_handler): Likewise.
1255 (genrtl_catch_block): Likewise.
1256 (genrtl_ctor_stmt): Likewise.
1257 (genrtl_subobject): Likewise.
1258 (genrtl_decl_cleanup): Likewise.
1259 (genrtl_do_poplevel): Likewise.
1260 (genrtl_do_pushlevel): Likewise.
1261 (genrtl_clear_out_block): Likewise.
1262 (genrtl_goto_stmt): Likewise.
1263 (genrtl_expr_stmt): Likewise.
1264 (genrtl_decl_stmt): Likewise.
1265 (genrtl_if_stmt): Likewise.
1266 (genrtl_while_stmt): Likewise.
1267 (genrtl_do_stmt): Likewise.
1268 (genrtl_return_stmt): Likewise.
1269 (genrtl_for_stmt): Likewise.
1270 (genrtl_break_stmt): Likewise.
1271 (genrtl_continue_stmt): Likewise.
1272 (genrtl_scope_stmt): Likewise.
1273 (genrtl_switch_stmt): Likewise.
1274 (genrtl_case_label): Likewise.
1275 (genrtl_begin_compound_stmt): Likewise.
1276 (genrtl_finish_compound_stmt): Likewise.
1277 (genrtl_compound_stmt): Likewise.
1278 (genrtl_asm_stmt): Likewise.
1279 (genrtl_named_return_value): Likewise.
1280 (genrtl_begin_stmt_expr): Likewise.
1281 (genrtl_finish_stmt_expr): Likewise.
1282 (finish_for_stmt): Removed first argument and generate rtl
1284 (finish_switch_stmt): Likewise.
1285 (do_poplevel): Removed generate rtl specific code.
1286 (do_pushlevel): Likewise.
1287 (add_tree): Likewise.
1288 (finish_goto_stmt): Likewise.
1289 (finish_expr_stmt): Likewise.
1290 (begin_if_stmt): Likewise.
1291 (finish_if_stmt_cond): Likewise.
1292 (finish_then_clause): Likewise.
1293 (begin_else_clause): Likewise.
1294 (finish_else_clause): Likewise.
1295 (finish_if_stmt): Likewise.
1296 (clear_out_block): Likewise.
1297 (begin_while_stmt): Likewise.
1298 (finish_while_stmt_cond): Likewise.
1299 (finish_while_stmt): Likewise.
1300 (begin_do_stmt): Likewise.
1301 (finish_do_body): Likewise.
1302 (finish_do_stmt): Likewise.
1303 (finish_return_stmt): Likewise.
1304 (begin_for_stmt): Likewise.
1305 (finish_for_init_stmt): Likewise.
1306 (finish_for_cond): Likewise.
1307 (finish_for_expr): Likewise.
1308 (finish_break_stmt): Likewise.
1309 (finish_continue_stmt): Likewise.
1310 (begin_switch_stmt): Likewise.
1311 (finish_switch_cond): Likewise.
1312 (finish_case_label): Likewise.
1313 (begin_try_block): Likewise.
1314 (begin_function_try_block): Likewise.
1315 (finish_try_block): Likewise.
1316 (finish_cleanup_try_block): Likewise.
1317 (finish_cleanup): Likewise.
1318 (finish_function_try_block): Likewise.
1319 (finish_handler_sequence): Likewise.
1320 (finish_function_handler_sequence): Likewise.
1321 (begin_handler): Likewise.
1322 (finish_handler_parms): Likewise.
1323 (begin_catch_block): Likewise.
1324 (finish_handler): Likewise.
1325 (begin_compound_stmt): Likewise.
1326 (finish_compound_stmt): Likewise.
1327 (finish_asm_stmt): Likewise.
1328 (finish_label_stmt): Likewise.
1329 (finish_label_decl): Likewise.
1330 (finish_subobject): Likewise.
1331 (finish_decl_cleanup): Likewise.
1332 (finish_named_return_value): Likewise.
1333 (begin_stmt_expr): Likewise.
1334 (finish_stmt_expr): Likewise.
1336 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
1337 to call genrtl_expr_stmt when appropriate.
1339 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
1340 begin_compound_expr to call genrtl_begin_stmt_expr and
1341 genrtl_begin_compound_expr when appropriate.
1342 (finish_init_stmts): Changed calls to finish_compound_expr and
1343 finish_stmt_expr to call genrtl_finish_compound_expr and
1344 genrtl_finish_stmt_expr when appropriate.
1345 (expand_default_init): Changed call to finish_expr_stmt to call
1346 genrtl_expr_stmt when appropriate.
1347 (build_vec_init): Likewise.
1349 * parse.y (simple_stmt): Removed first argument from call to
1350 finish_for_stmt. Removed first argument from call to
1353 * parse.c: Regenerated.
1355 * pt.c (tsubst_expr): Removed first argument from call to
1356 finish_for_stmt. Removed first argument from call to
1359 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
1361 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
1362 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
1364 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
1365 (cplus_tree_code_length[]): Likewise.
1366 (cplus_tree_code_name[]): Likewise.
1367 (init_parse): Added call to add_c_tree_codes. Changed
1368 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
1370 2000-06-16 Mark Mitchell <mark@codesourcery.com>
1372 * cp-tree.h (finish_mem_initializers): Declare.
1373 (count_trees): Likewise.
1374 * parse.y (base_init): Use finish_mem_initializers.
1375 * semantics.c (finish_mem_initializers): New function.
1377 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
1378 the number of trees.
1380 (count_trees): Don't use it.
1382 2000-06-15 Jason Merrill <jason@redhat.com>
1384 * tree.c (count_trees): New debugging function.
1386 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
1387 * init.c (build_member_call): Pull out the name of a DECL.
1389 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
1390 * semantics.c (expand_body): Push to TV_INTEGRATION here.
1391 * optimize.c (optimize_function): Not here.
1392 * pt.c (instantiate_decl): Push to TV_PARSE.
1394 2000-06-15 Mark Mitchell <mark@codesourcery.com>
1396 * cp-tree.h (struct language_function): Remove x_base_init_list
1397 and x_member_init_list.
1398 (current_base_init_list): Remove.
1399 (current_member_init_list): Likewise.
1400 (setup_vtbl_ptr): Change prototype.
1401 (emit_base_init): Likewise.
1402 (expand_member_init): Likewise.
1403 (reinit_parse_for_function): Remove.
1404 * decl.c (save_function_data): Don't clear x_base_init_list and
1406 (mark_language_function): Don't mark them.
1407 * init.c (perform_member_init): Tweak comment.
1408 (sort_member_init): Take the list of initializers as an argument.
1409 (sort_base_init): Likewise.
1410 (emit_base_init): Likewise.
1411 (expand_member_init): Return the initializer. Don't use global
1413 * lex.c (reinit_parse_for_function): Remove.
1414 * method.c (build_template_parm_names): Correct substitution.
1415 (do_build_copy_constructor): Don't use current_member_init_list
1416 and current_base_init_list.
1417 (synthesize_method): Likewise.
1418 * parse.y (base_init): Split mem-initializers into
1419 base-initializers and field-initializers.
1420 (member_init_list): Build up the list here.
1421 (member_init): Return the initializer.
1422 (fn.depfn): Don't use reinit_parse_for_function.
1423 * parse.c: Regenerated.
1424 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
1426 (tsubst_expr): Don't use current_member_init_list
1427 and current_base_init_list.
1428 (tsubst_expr_values): Rename to ...
1429 (tsubst_initializer_list): ... this. Use convert_from_reference.
1430 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
1431 and current_base_init_list.
1432 (begin_function_definition): Don't call reinit_parse_for_function.
1434 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
1436 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
1439 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
1441 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
1443 * cp-tree.h (IF_COND): Move to c-common.h.
1444 (THEN_CLAUSE): Likewise.
1445 (ELSE_CLAUSE): Likewise.
1446 (WHILE_COND): Likewise.
1447 (WHILE_BODY): Likewise.
1448 (DO_COND): Likewise.
1449 (DO_BODY): Likewise.
1450 (RETURN_EXPR): Likewise.
1451 (EXPR_STMT_EXPR): Likewise.
1452 (FOR_INIT_STMT): Likewise.
1453 (FOR_COND): Likewise.
1454 (FOR_EXPR): Likewise.
1455 (FOR_BODY): Likewise.
1456 (SWITCH_COND): Likewise.
1457 (SWITCH_BODY): Likewise.
1458 (CASE_LOW): Likewise.
1459 (CASE_HIGH): Likewise.
1460 (GOTO_DESTINATION): Likewise.
1461 (COMPOUND_BODY): Likewise.
1462 (ASM_CV_QUAL): Likewise.
1463 (ASM_STRING): Likewise.
1464 (ASM_OUTPUTS): Likewise.
1465 (ASM_INPUTS): Likewise.
1466 (ASM_CLOBBERS): Likewise.
1467 (DECL_STMT_DECL): Likewise.
1468 (STMT_EXPR_STMT): Likewise.
1469 (LABEL_STMT_LABEL): Likewise.
1470 (SCOPE_BEGIN_P): Likewise.
1471 (SCOPE_END_P): Likewise.
1472 (SCOPE_STMT_BLOCK): Likewise.
1473 (SCOPE_NULLIFIED_P): Likewise.
1474 (SCOPE_NO_CLEANUPS_P): Likewise.
1475 (SCOPE_PARTIAL_P): Likewise.
1476 (ASM_VOLATILE_P): Likewise.
1477 (STMT_LINENO): Likewise.
1478 (STMT_LINENO_FOR_FN_P): Likewise.
1480 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
1481 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
1482 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
1483 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
1484 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
1486 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
1488 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
1489 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
1491 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
1492 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
1493 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
1495 2000-06-14 Mark Mitchell <mark@codesourcery.com>
1497 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
1498 * class.c (dfs_find_final_overrider): Set it appropriately.
1499 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
1500 avoid unneeded secondary vptrs.
1502 2000-06-13 Jakub Jelinek <jakub@redhat.com>
1504 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
1505 (check_bitfield_decl, check_field_decl): Likewise.
1506 (build_vtbl_or_vbase_field, build_base_field): Likewise.
1507 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
1508 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
1509 (xfer_tag, finish_enum): Likewise.
1510 * decl2.c (finish_builtin_type): Likewise.
1511 * init.c (init_init_processing): Likewise.
1512 * pt.c (instantiate_class_template): Likewise.
1513 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
1514 * cp-tree.h (struct lang_type): Add user_align member.
1515 (CLASSTYPE_USER_ALIGN): Define.
1517 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1519 * Make-lang.in (c++.install-common): Install g++-cross in
1520 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
1521 $(target_alias)-g++ and $(target_alias)-c++.
1523 2000-06-12 Mark Mitchell <mark@codesourcery.com>
1525 * class.c (vcall_offset_data_s): Add last_init and fns.
1526 (overrides): Rename to same_signature_p.
1527 (dfs_find_final_overrider): Adjust accordingly.
1528 (mark_overriders): Likewise.
1529 (warn_hidden): Likewise.
1530 (build_vtbl_initializer): Reorganize machinery for building things
1531 at negative offsets.
1532 (build_vcall_and_vbase_vtbl_entries): Likewise.
1533 (build_vbase_offset_vtbl_entries): Likewise.
1534 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
1535 offset entries. Do not create two entries for functions with the
1537 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
1538 (build_rtti_vtbl_entries): Reorganize machinery for building things
1539 at negative offsets.
1541 * optimize.c (expand_call_inline): Don't recurse into the code
1542 used to initialize the parameters more than once.
1544 2000-06-11 Mark Mitchell <mark@codesourcery.com>
1546 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
1547 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
1548 (find_substitution): Only use the `Sa' substitution for
1549 std::allocator, not instantiations of it.
1550 (write_template_prefix): Move comment. Only use a TREE_LIST to
1551 represent substitutions for a member template.
1552 (write_array_type): Mangle array dimensions correctly.
1553 * optimize.c (maybe_clone_body): Copy more information from the
1555 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
1556 on the regenerated declaration.
1558 2000-06-11 Chip Salzenberg <chip@valinux.com>
1559 Mark Mitchell <mark@codesourcery.com>
1561 * class.c (build_vtable): Clarify comment.
1562 (build_ctor_vtbl_group): Pass the most derived type to
1565 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1567 * decl2.c (compare_options): Don't needlessly cast away const-ness.
1569 2000-06-10 Mark Mitchell <mark@codesourcery.com>
1571 * decl.c (add_binding): Handle duplicate declarations of external
1574 2000-06-09 Chip Salzenberg <chip@valinux.com>
1575 Mark Mitchell <mark@codesourcery.com>
1577 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
1579 (write_signed_number): New macro.
1580 (write_unsigned_number): Likewise.
1581 (write_source_name): Use them.
1582 (write_number): Handle signed and unsigned values.
1583 (write_integer_cst): Use tree_int_cst_sgn, and use
1584 write_unsigned_number or write_signed_number as appropriate.
1585 (write_discriminator): Use write_unsigned_number or
1586 write_signed_number as appropriate.
1587 (write_template_arg_literal): Likewise.
1588 (write_array_type): Use tree_low_cst.
1589 (write_template_parm): Use write_unsigned_number or
1590 write_signed_number as appropriate.
1591 (write_substitution): Adjust call to write_number.
1592 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
1593 (write_expression): Handle non-type template arguments of
1594 reference type correctly.
1595 (mangle_thunk): Use write_signed_number.
1597 2000-06-09 Chip Salzenberg <chip@valinux.com>
1599 * mangle.c (find_substition): Don't mangle objects with typename
1600 substitutions (e.g. "cin" as "Si").
1602 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
1604 * call.c (add_candidate): Use ggc_alloc_cleared.
1605 * decl.c (lookup_label): Likewise.
1606 * lex.c (retrofit_lang_decl): Likewise.
1608 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
1610 * semantics.c (expand_body): Push to TV_EXPAND.
1611 * optimize.c (optimize_function): Push to TV_INTEGRATION.
1612 * decl.c (start_function): Always call announce_function.
1614 * tinfo2.cc: Just declare abort.
1616 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
1618 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
1619 whenever @ is a symbolic name.
1621 2000-06-08 Jakub Jelinek <jakub@redhat.com>
1623 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
1625 2000-06-07 Mark Mitchell <mark@codesourcery.com>
1627 * decl.c (pushdecl): Look up functions by DECL_NAME, not
1628 DECL_ASSEMBLER_NAME.
1630 2000-06-06 Mark Mitchell <mark@codesourcery.com>
1632 * decl2.c (c_language): Define.
1634 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
1636 * lex.c (lang_init_options): Tweak.
1638 * decl2.c: Remove #inclusion of diagnostic.h
1639 (lang_decode_option): Move diagnostic formatting options to
1642 * lang-options.h: Remove documentation for diagnostic options.
1644 * Makefile.in (lex.o): Depends upon diagnostic.h
1646 2000-06-06 Mark Mitchell <mark@codesourcery.com>
1648 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
1649 the same DECL_RESULT, it's not a redefinition.
1650 * pt.c (tsubst_decl): Remove code to handle illegal
1653 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
1655 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
1657 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
1659 * search.c (maybe_suppress_debug_info): Don't check
1660 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
1662 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
1665 Remember instantiation context in deferred instantiations.
1666 * cp-tree.h (struct tinst_level): Remove.
1667 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
1668 * pt.c (current_tinst_level): Now a tree.
1669 (print_template_context, push_tinst_level, pop_tinst_level,
1670 tinst_for_decl): Adjust.
1671 (reopen_tinst_level): New fn.
1672 (init_pt): Register current_tinst_level as a root.
1673 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
1674 of the pending templates list.
1675 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
1676 * lex.c (extract_interface_info): Adjust.
1677 * decl2.c (warn_if_unknown_interface): Adjust.
1679 2000-06-05 Mark Mitchell <mark@codesourcery.com>
1681 * class.c (indirect_primary_base_p): New function.
1682 (determine_primary_base): Use it.
1684 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
1686 Update new-abi dynamic cast algorithm.
1687 * tinfo.cc (__class_type_info::__dyncast_result): Add
1688 whole_details. Adjust constructor.
1689 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
1690 Avoid unnecessary searching.
1691 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
1693 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1695 * decl.c (init_decl_processing): Don't call record_component_aliases.
1696 * tree.c (build_cplus_array_type_1): Likewise.
1698 2000-06-04 Mark Mitchell <mark@codesourcery.com>
1700 * ir.texi: Correct typo.
1701 * mangle.c (write_expression): Handle non-type template arguments
1702 with reference type.
1703 * method.c (build_overload_value): Likewise.
1704 * pt.c (convert_nontype_argument): Explicitly represent conversion
1705 to a reference with an ADDR_EXPR.
1706 (unify): Always unify arguments in left-to-right order.
1708 2000-06-03 Alex Samuel <samuel@codesourcery.com>
1709 Mark Mitchell <mark@codesourcery.com>
1711 * Make-lang.in (CXX_SRCS): Add mangle.c.
1712 * Makefile.in (CXX_OBJS): Add mangle.o.
1713 (mangle.o): New rule.
1715 * class.c (local_classes): New variable.
1716 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
1717 (get_vtt_name): Use mangle_vtt_name for new ABI.
1718 (init_class_processing): Initialize local_classes.
1719 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
1720 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
1721 (std_identifier): New macro.
1722 (DECL_VOLATILE_MEMFUNC_P): New macro.
1723 (DECL_NAMESPACE_STD_P): Likewise.
1724 (local_classes): Declare.
1725 (get_mostly_instantiated_function_type): Declare.
1726 (init_mangle): Declare.
1727 (mangle_decl): Likewise.
1728 (mangle_type_string): Likewise.
1729 (mangle_type): Likewise.
1730 (mangle_typeinfo_for_type): Likewise.
1731 (mangle_typeinfo_string_for_type): Likewise.
1732 (mangle_vtbl_for_type): Likewise.
1733 (mangle_vtt_for_type): Likewise.
1734 (mangle_ctor_vtbl_for_type): Likewise.
1735 (mangle_thunk): Likewise.
1736 (mangle_conv_op_name_for_type): Likewise.
1737 (mangle_guard_variable): Likewise.
1738 * decl.c (pushtag): Keep track of local classes.
1739 (initialize_predefined_identifiers): Initialize std_identifier.
1740 (init_decl_processing): Use std_identifier.
1741 (start_decl): Don't treat instantiations as specializations.
1742 (grokdeclarator): Likewise.
1743 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
1744 name for fully-instantiated templates.
1745 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
1746 destructors with the new ABI.
1747 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
1748 (grokfield): Use mangle_type for new ABI.
1749 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
1750 (get_sentry): Use mangle_guard_variable for new ABI.
1751 (start_static_initialization_or_destruction): Likewise.
1752 * expr.c (extract_aggr_init): Remove.
1753 (extract_scalar_init): Likewise.
1754 (extract_init): Remove #if 0'd code.
1755 * mangle.c: New function.
1756 * method.c (build_mangled_name): Assert not flag_new_abi.
1757 (build_static_name): Likewise.
1758 (build_decl_overload_real): Likewise.
1759 (build_typename_overload): Likewise.
1760 (build_overload_with_type): Likewise.
1761 (build_overload_name): Likewise.
1762 (get_ctor_vtbl_name): Likewise.
1763 (start_squangling): Likewise.
1764 (get_id_2): Likewise.
1765 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
1766 (init_method): Call init_mangle for new ABI.
1767 (make_thunk): Call mangle_thunk for new ABI.
1768 * operators.def: Correct new ABI manglings for the `%' operator.
1770 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
1771 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
1772 (lookup_template_class): Call mangle_decl for new ABI.
1773 (get_mostly_instantiated_function_type): New function.
1774 (set_mangled_name_for_template_decl): Use it.
1775 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
1776 the new ABI. Use mangle_conv_op_name_for_type for instantiated
1777 conversion op names.
1778 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
1779 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
1780 (tinfo_base_init): Likewise. Mangle typeinfo string name with
1781 mangle_typeinfo_string_for_type.
1783 2000-06-03 Mark Mitchell <mark@codesourcery.com>
1785 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
1786 (INNERMOST_TEMPLATE_ARGS): New macro.
1787 (innermost_args): Remove.
1788 (get_innermost_template_args): New function.
1789 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
1790 * error.c (dump_function_decl): Be caution when using
1791 most_general_template.
1792 * method.c (build_template_parm_names): Use
1793 INNERMOST_TEMPLATE_ARGS.
1794 * pt.c (add_to_template_args): Tidy comment
1795 (get_innermost_template_args): New function.
1796 (check_explicit_specialization): Clear DECL_INITIAL for a new
1798 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
1800 (push_template_decl): Always register specializations of the most
1802 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
1803 (coerce_template_parms): Likewise.
1804 (lookup_template_class): Likewise.
1805 (innermost_args): Remove.
1806 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
1807 (tsubst_decl): Handle tricky specializations. Use
1808 get_innermost_template_args.
1809 (instantiate_template): Simplify handling of partial
1811 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
1812 (most_general_template): Reimplement, in a more straightforward
1814 (regenerate_decl_from_template): Tweak formatting. Use
1815 TMPL_ARGS_DEPTH for clarity.
1816 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
1818 * dump.c (dequeue_and_dump): Dump information about thunks.
1820 2000-06-01 Richard Henderson <rth@cygnus.com>
1822 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
1824 2000-06-01 Richard Henderson <rth@cygnus.com>
1826 * decl2.c (unsupported_options): Fix typo, make const.
1827 (lang_decode_option): Fix bsearch argument order.
1829 2000-06-01 Mark Mitchell <mark@codesourcery.com>
1831 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
1834 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1836 * cp-tree.h (c_get_alias_set): Deleted.
1837 * Makefile.in (decl.o): Include ../expr.h.
1838 * decl.c (expr.h): Include.
1839 (init_decl_processing): Call record_component_aliases for arrays.
1840 (grokdeclarator): Likewise.
1841 Set TREE_ADDRESSABLE for fields that aren't bitfields.
1842 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
1844 2000-05-31 Mark Mitchell <mark@codesourcery.com>
1846 Remove guiding declaration support.
1847 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
1848 (flag_guiding_decls): Remove.
1849 * call.c (build_user_type_conversion_1): Remove support for
1851 (build_new_function_call): Likewise.
1852 (build_new_op): Likewise.
1853 (build_new_method_call): Likewise.
1854 * decl.c (start_function): Likewise.
1855 * friend.c (is_friend): Likewise.
1856 (do_friend): Likewise.
1857 * decl2.c ((flag_dump_translation_unit): Make it const.
1858 (flag_guiding_decls): Remove.
1859 (unsupported_options): New variable
1860 (compare_options): New function.
1861 (lang_decode_option): Use them.
1863 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
1865 * method.c (mangle_expression): Adjust test for legal expression
1868 * pt.c (instantiate_decl): Save and restore the local
1869 specializations list.
1871 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
1873 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
1875 2000-05-30 Mark Mitchell <mark@codesourcery.com>
1877 * call.c (add_template_candidate_real): Handle member template
1878 constructors for classes with virtual bases.
1879 (build_user_type_conversion_1): Use in_charge_arg_for_name.
1880 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
1882 * ir.texi: Update thunk documentation.
1884 * call.c (joust): Fix handling of overloaded builtin operators.
1886 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
1888 * cp-tree.h (DECL_ANTICIPATED): New macro.
1889 Document new use of DECL_LANG_FLAG_7.
1890 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
1891 in the user namespace.
1892 * lex.c (do_identifier): If the identifier's declaration has
1893 DECL_ANTICIPATED on, it has not yet been declared. But do not
1894 replace it with an ordinary implicit declaration.
1896 * tinfo2.cc: Include stdlib.h.
1898 2000-05-29 Mark Mitchell <mark@codesourcery.com>
1900 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
1901 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
1904 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
1906 * decl2.c (lang_decode_option): Use skip_leading_substring instead
1909 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
1911 * operators.def (<?): Duplicated, should have been...
1914 2000-05-27 Alex Samuel <samuel@codesourcery.com>
1915 Mark Mitchell <mark@codesourcery.com>
1917 * cp-tree.h (ansi_opname): Make it a macro.
1918 (ansi_assopname): Likewise.
1919 (struct lang_decl_flags): Add assignment_operator_p.
1920 (struct lang_decl): Add operator_code.
1921 (DECL_VTT_PARM): Adjust.
1922 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
1923 overloaded operator.
1924 (SET_OVERLOADED_OPERATOR_CODE): New macro.
1925 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
1926 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
1927 (opname_tab): Remove.
1928 (assignop_tab): Likewise.
1929 (operator_name_info_t): New type.
1930 (operator_name_info): New variable.
1931 (assignment_operator_name_info): Likewise.
1932 (build_cp_library_fn): Remove declaration.
1933 (push_cp_library_fn): Likewise.
1934 (operator_name_string): Likewise.
1935 (build_decl_overload): Likewise.
1936 * call.c (print_z_candidates): Simplify.
1937 (build_object_call): Adjust usage of ansi_opname. Use
1938 DECL_OVERLOADED_OPERATOR_P.
1939 (op_error): Adjust operator name lookup.
1940 (build_conditional_expr): Adjust usage of ansi_opname.
1941 (build_new_op): Likewise.
1942 (build_op_delete_call): Likewise.
1943 (build_over_call): Likewise.
1944 (joust): Use DECL_OVERLOADED_OPERATOR_P.
1945 * decl.c (duplicate_decls): Copy operator_code.
1946 (init_decl_processing): Adjust parameters to push_cp_library_fn.
1947 (builtin_function): Adjust parameters to build_library_fn_1.
1948 (build_library_fn_1): Accept an overloaded operator code.
1949 (build_library_fn): Pass ERROR_MARK.
1950 (build_cp_library_fn): Accept an overloaded operator code.
1951 (push_cp_library_fn): Likewise.
1952 (grokfndecl): Tweak.
1953 (grokdeclarator): Simplify code to compute names of overloaded
1954 operators. Adjust use of ansi_opname.
1955 (ambi_op_p): Work on tree_codes, not identifiers.
1956 (unary_op_p): Likewise.
1957 (grok_op_properties): Likewise.
1958 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
1959 (lang_mark_tree): Don't try to mark the operator_code.
1960 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
1961 * error.c (dump_decl): Remove special handling for operator
1963 (dump_function_name): Likewise.
1964 (dump_expr): Adjust name lookup of operators.
1965 (op_to_string): Simplify.
1966 (assop_to_string): Likewise.
1967 * init.c (build_new_1): Adjust use of ansi_opname.
1968 * lex.c (opname_tab): Remove.
1969 (assignop_tab): Likewise.
1970 (ansi_opname): Likewise.
1971 (ansi_assopname): Likewise.
1972 (operator_name_string): Likewise.
1973 (reinit_lang_specific): Likewise.
1974 (operator_name_info): New variable.
1975 (assignment_operator_name_info): Likewise.
1976 (init_operators): New function.
1977 (init_parse): Use it.
1978 (do_identifier): Adjust use of ansi_opname.
1979 * method.c (mangle_expression): Don't use ansi_opname for
1981 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
1982 (build_decl_overload): Remove.
1983 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
1984 (do_build_assign_ref): Adjust use of ansi_opname.
1985 (synthesize_method): Likewise.
1986 (implicitly_declare_fn): Likewise.
1987 * operators.def: New file.
1988 * parse.y (operator): Adjust use of ansi_opname.
1989 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
1990 (set_mangled_name_for_template_decl): Don't play games with
1992 (special_function_p): Adjust use of ansi_opname.
1993 * typeck.c (check_return_expr): Likewise.
1994 * Make-lang.in (cc1plus): Depend on operators.def.
1995 * Makefile.in (lex.o): Likewise.
1998 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
2000 * Make-lang.in (cplib2.ready): Eradicate.
2002 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2004 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
2005 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
2006 (built_min, cp_tree_equal): Likewise.
2008 2000-05-26 Mark Mitchell <mark@codesourcery.com>
2010 * class.c (layout_nonempty_base_or_field): Replace
2011 `record_layout_info' with `record_layout_info_s'.
2013 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
2016 * cp-tree.h (struct language_function): x_named_labels is now
2017 a struct named_label_list*.
2018 * decl.c (struct named_label_use_list): Renamed from...
2019 (struct named_label_list): ...this. New struct.
2020 (push_binding_level): Don't set eh_region.
2021 (note_level_for_eh): New fn.
2022 (pop_label): Take label and old value directly.
2023 (pop_labels): Adjust for new named_labels format.
2024 (lookup_label): Likewise.
2025 (poplevel): Note characteristics of a binding level containing a
2026 named label. Mess with named label lists earlier.
2027 (mark_named_label_lists): New fn.
2028 (mark_lang_function): Call it.
2029 (use_label): New fn, split out from...
2030 (make_label_decl): ...here. Don't call it.
2031 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
2032 check_previous_gotos): New fns, split out from...
2033 (define_label): ...here.
2034 (check_switch_goto): New fn.
2035 (define_case_label): Call it.
2036 (check_goto): New fn.
2037 * semantics.c (finish_goto_stmt): Call it and use_label.
2038 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
2039 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
2041 2000-05-26 Mark Mitchell <mark@codesourcery.com>
2043 * class.c (build_vtable_entry_ref): Correct usage of
2044 get_vtbl_decl_for_binfo.
2046 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
2047 * method.c (implicitly_declare_fn): Not here.
2049 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
2051 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
2052 (CPTI_PTMD_DESC_TYPE): ... here.
2053 (ptmd_desc_type_node): Rename to ...
2054 (ptm_desc_type_node): ... here.
2056 * rtti.c (ptmd_initializer): Rename to ...
2057 (ptm_initializer): ... here.
2058 (sythesize_tinfo_var): Adjust. Deal with pointer to member
2060 (create_tinfo_types): Adjust.
2062 2000-05-25 Mark Mitchell <mark@codesourcery.com>
2064 Finish implementation of VTTs.
2065 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
2066 CPTI_VTT_PARM_IDENTIFIER.
2067 (vtt_parm_identifier): New macro.
2068 (vtt_parm_type): Likewise.
2069 (BINFO_SUBVTT_INDEX): Likewise.
2070 (BINFO_VPTR_INDEX): Likewise.
2071 (struct lang_decl): Add vtt_parm.
2072 (DECL_VTT_PARM): New macro.
2073 (DECL_USE_VTT_PARM): Likewise.
2074 (DECL_NEEDS_VTT_PARM_P): Likewise.
2075 (get_vtt_name): Declare.
2076 (build_artifical_parm): Likewise.
2077 (fixup_all_virtual_upcast_offsets): Likewise.
2078 (expand_indirect_vtbls_init): Remove.
2079 * call.c (build_new_method_call): Pass the vtt to subobject
2080 constructors and destructors.
2081 * class.c (get_vtt_name): Give it external linkage.
2082 (build_clone): Handle the magic VTT parameters for clones.
2083 (clone_function_decl): Fix typo in comment.
2084 (build_vtt): Keep track of the indices in the VTTs where various
2085 entities are stored.
2086 (build_vtt_inits): Likewise.
2087 (dfs_build_vtt_inits): Likewise.
2088 (build_ctor_vtbl_group): Tweak type of construction vtables.
2089 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
2090 primary bases, when building construction vtables.
2091 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
2092 (initialize_predefined_identifiers): Add vtt_parm_identifier.
2093 (init_decl_processing): Initialize vtt_parm_type.
2094 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
2095 (lang_mark_tree): Make vtt_parm.
2096 * decl2.c (build_artificial_parm): New function.
2097 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
2098 (grokclassfn): Use build_artificial_parm.
2099 * init.c (initialize_vtbl_ptrs): Call
2100 fixup_all_virtual_upcast_offsets directly.
2101 (perform_member_init): Use the complete subobject destructor for
2103 (build_vtbl_address): New function.
2104 (expand_virtual_init): Handle VTTs.
2105 * optimize (maybe_clone_body): Likewise.
2106 * search.c (fixup_all_virtual_upcast_offsets): Give it external
2108 (expand_indirect_vtbls_init): Remove.
2109 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
2110 * tree.c (make_binfo): Make them bigger.
2112 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
2114 * inc/cxxabi.h (__pbase_type_info): Define, based on
2115 __pointer_type_info.
2116 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
2117 (__pointer_to_member_type_info): Likewise.
2118 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
2119 (__pointer_to_member_type_info::__is_pointer_p): Remove.
2120 (__pointer_type_info::__do_catch): Rename to ...
2121 (__pbase_type_info::__do_catch): ... here. Adjust.
2122 (__pbase_type_info::__pointer_catch): Implement.
2123 (__pointer_type_info::__pointer_catch): Adjust.
2124 (__pointer_to_member_type_info::__pointer_catch): Adjust.
2126 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
2128 * tinfo.h (__user_type_info::contained_virtual_p): New
2130 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
2132 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
2133 diamond shaped heirarchy. Add early out for mixed diamond and
2134 duplicate shaped heirarchy.
2136 2000-05-24 Mark Mitchell <mark@codesourcery.com>
2138 * cp-tree.h (build_delete): Change prototype.
2139 (build_vec_delete): Likewise.
2140 * call.c (build_scoped_method_call): Use special_function_kind
2141 values to indicate the kind of destruction to be done.
2142 (build_method_call): Likewise.
2143 * decl.c (finish_destructor_body): Likewise.
2144 (maybe_build_cleanup_1): Likewise. Rename to ...
2145 (maybe_build_cleanup): ... this.
2146 * decl2.c (delete_sanity): Use special_function_kind
2147 values to indicate the kind of destruction to be done.
2148 (build_cleanup): Likewise.
2149 * init.c (perform_member_init): Likewise.
2150 (build_vec_delete_1): Likewise.
2151 (build_dtor_call): Simplify.
2152 (build_delete): Use special_function_kind
2153 values to indicate the kind of destruction to be done.
2154 (build_vbase_delete): Likewise.
2155 (build_vec_delete): Likewise.
2157 * init.c (sort_member_init): Fix typo in error message generation
2160 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
2162 * semantics.c (begin_class_definition): make the packed
2163 attribute be sensitive to the "-fpack-struct" command line flag
2165 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
2167 Update new-abi upcast algorithm.
2168 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
2169 prototype and meaning of return value.
2170 (__si_class_type_info::__do_upcast): Likewise.
2171 (__vmi_class_type_info::__do_upcast): Likewise.
2172 * tinfo.cc (__class_type_info::__upcast_result): Replace
2173 whole2dst with part2dst. Adjust ctor.
2174 (__class_type_info::__do_upcast): Adjust call of worker function.
2175 (__class_type_info::__do_upcast): Adjust.
2176 (__si_class_type_info::__do_upcast): Adjust. Use parent's
2178 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
2179 virtual base in diamond heirarchy bug.
2181 2000-05-23 Mark Mitchell <mark@codesourcery.com>
2183 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
2184 and bitfield to tinfo_fn_p.
2185 (DECL_TINFO_FN_P): Adjust.
2186 (SET_DECL_TINFO_FN_P): Likewise.
2187 (DECL_MUTABLE_P): Likewise.
2188 (DECL_C_BIT_FIELD): Likewise.
2189 (SET_DECL_C_BIT_FIELD): Likewise.
2190 (CLEAR_DECL_C_BIT_FIELD): Likewise.
2191 (DECL_UNINLINABLE): Likewise.
2192 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
2193 (handle_using_decl): Remove assertion.
2194 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
2195 to build FIELD_DECLs.
2196 (build_base_field): Likewise.
2197 (layout_class_type): Likewise.
2198 * decl.c (init_decl_processing): Likewise.
2199 (build_ptrmemfunc_type): Likewise.
2200 (grokdeclarator): Likewise.
2201 * decl2.c (grok_x_components): Likewise.
2202 * except.c (call_eh_info): Likewise.
2203 * init.c (init_init_processing): Likewise.
2204 * rtti.c (expand_class_desc): Likewise.
2205 (create_pseudo_type_info): Likewise.
2206 (get_vmi_pseudo_type_info): Likewise.
2207 (create_tinfo_types): Likewise.
2208 * ptree.c (print_lang_decl): Adjust.
2209 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
2210 before checking DECL_MUTABLE_P.
2212 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
2213 parameters for template functions.
2214 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
2215 destructors as well as constructors.
2217 2000-05-22 Mark Mitchell <mark@codesourcery.com>
2219 * class.c (build_ctor_vtbl_group): Set inits.
2220 * optimize.c (maybe_clone_body): Set DECL_INLINE and
2221 DECL_THIS_INLINE appropriately for clones.
2223 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
2224 (DECL_CONV_FN_P): Simplify.
2225 (DECL_OPERATOR): Remove.
2226 (language_to_string): Declare.
2227 * decl.c (duplicate_decls): Fix typo in comment.
2228 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
2229 (grok_op_properties): Use DECL_CONV_FN_P instead of
2230 IDENTIFIER_TYPENAME_P.
2231 * dump.c (dequeue_and_dump): Dump the language linkage of
2233 * error.c (language_to_string): Give it external linkage.
2234 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
2235 (implicitly_declare_fn): Set DECL_LANGUAGE.
2236 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
2237 IDENTIFIER_TYPENAME_P.
2238 (tsubst_decl): Likewise.
2239 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
2240 * semantics.c (finish_member_declaration): Don't mark members of
2241 classes declared in an extern "C" region as extern "C".
2243 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2245 * decl2.c (qualified_lookup_using_namespace): Look through
2248 * decl.c (push_using_decl): Return the old decl on namespace level.
2250 2000-05-21 Mark Mitchell <mark@codesourcery.com>
2252 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
2253 (VTT_NAME_PREFIX): New macro.
2254 (CTOR_VTBL_NAME_PREFIX): Likewise.
2255 (get_ctor_vtbl_name): New function.
2256 * class.c (get_vtable_name): Simplify.
2257 (get_vtt_name): New function.
2258 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
2259 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
2260 when a virtual base becomes primary.
2261 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
2263 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
2264 additional parameters.
2265 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
2266 (initialize_array): New function.
2267 (build_vtt): Likewise.
2268 (build_vtt_inits): Likewise.
2269 (dfs_build_vtt_inits): Likewise.
2270 (dfs_fixup_binfo_vtbls): Likewise.
2271 (build_ctor_vtbl_group): Likewise.
2272 (initialize_vtable): Use initialize_array.
2273 (accumulate_vtbl_inits): Reimplement to handle construction
2275 (dfs_accumulate_vtbl_inits): Likewise.
2276 (bulid_vtbl_initializer): Adjust parameter name.
2277 * method.c (build_typename_overload): Remove #if 0'd code.
2278 (get_ctor_vtbl_name): New function.
2279 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
2280 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
2282 * cp-tree.h (struct lang_type): Remove search_slot.
2283 (CLASSTYPE_SEARCH_SLOT): Remove.
2284 (emit_base_init): Change prototype.
2285 (initialize_vtbl_ptrs): Likewise.
2286 (expand_indirect_vtbls_init): Likewise.
2287 (clear_search_slots): Remove.
2288 * decl.c (lang_mark_tree): Don't mark search_slot.
2289 * init.c (initialize_vtbl_ptrs): Simplify.
2290 (emit_base_init): Likewise.
2291 * search.c (struct vbase_info): Document decl_ptr.
2292 (convert_pointer_to_single_level): Remove.
2293 (dfs_find_vbases): Remove.
2294 (dfs_init_base_pointers): Simplify.
2295 (dfs_clear_vbase_slots): Remove.
2296 (dfs_vtable_path_unmark): New function.
2297 (init_vbase_pointers): Simplify.
2298 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
2299 (expand_indirect_vtbls_init): Simplify. Don't call
2300 mark_all_temps_used.
2301 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
2302 initialize_vtbl_ptrs.
2304 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
2306 * except.c: Add static prototypes.
2308 2000-05-20 H.J. Lu <hjl@gnu.org>
2310 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
2312 2000-05-19 Mark Mitchell <mark@codesourcery.com>
2314 Don't create a separate copy of virtual bases for the
2315 CLASSTYPE_VBASECLASSES list.
2316 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
2317 (BINFO_FOR_VBASE): Remove.
2318 (CANONICAL_BINFO): Adjust.
2319 (binfo_for_vbase): New function.
2320 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
2321 instead of BINFO_FOR_VBASE.
2322 (build_vbase_pointer): Likewise.
2323 (build_secondary_vtable): Likewise.
2324 (dfs_mark_primary_bases): Likewise.
2325 (mark_primary_bases): Likewise.
2326 (layout_nonempty_base_or_field): Likewise.
2327 (dfs_set_offset_for_shared_vbases): Likewise.
2328 (dfs_set_offset_for_unshared_vbases): Likewise.
2329 (layout_virtual_bases): Likewise. Adjust for changes to the
2330 CLASSTYPE_VBASECLASSES list.
2331 (dump_class_hierarchy_r): Use binfo_for_vbase
2332 instead of BINFO_FOR_VBASE.
2333 (dump_class_hierarchy): Likewise.
2334 (finish_vtbls): Likewise.
2335 (build_vtbl_initializer): Adjust for changes to the
2336 CLASSTYPE_VBASECLASSES list.
2337 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
2338 * decl.c (finish_destructor_body): Adjust for changes to the
2339 CLASSTYPE_VBASECLASSES list.
2340 * init.c (sort_base_init): Use binfo_for_vbase.
2341 (construct_virtual_bases): Adjust for changes to the
2342 CLASSTYPE_VBASECLASSES list.
2343 (expand_member_init): Use binfo_for_vbase.
2344 (build_vbase_delete): Adjust for changes to the
2345 CLASSTYPE_VBASECLASSES list.
2346 * method.c (do_build_copy_constructor): Likewise.
2347 * rtti.c (get_base_offset): Use binfo_for_vbase.
2348 (expand_class_desc): Remove #if 0'd code.
2349 * search.c (struct vbase_info): Remove vbase_types.
2350 (get_base_distance): Use binfo_for_vbase.
2351 (lookup_field_queue_p): Use CANONICAL_BINFO.
2352 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
2353 (get_pure_virtuals): Adjust for changes to the
2354 CLASSTYPE_VBASECLASSES list.
2355 (dfs_find_vbases): Use binfo_for_vbase.
2356 (dfs_init_vbase_pointers): Likewise.
2357 (init_vbase_pointers): Don't initialize vi.vbase_types.
2358 (virtual_context): Use binfo_for_vbase.
2359 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
2360 CLASSTYPE_VBASECLASSES list.
2361 (expand_indirect_vtbls_init): Simplify.
2362 (dfs_get_vbase_types): Don't replicate virtual bases.
2363 (find_vbase_instance): Use binfo_for_vbase.
2364 (binfo_for_vbase): New function.
2365 * typeck.c (get_delta_difference): Use binfo_for_vbase.
2367 2000-05-17 Mark Mitchell <mark@codesourcery.com>
2369 * decl2.c (finish_anon_union): Generalize error messages to handle
2370 anonymous structures.
2371 * init.c (perform_member_init): Remove `name' parameter.
2372 (build_field_list): New function.
2373 (sort_member_init): Handle anonymous union initialization order
2374 correctly. Check for multiple initializations of the same union.
2375 (emit_base_init): Don't look up fields by name here.
2376 (expand_member_init): Record the result of name lookup for future
2378 * typeck.c (build_component_ref): Fix formatting.
2380 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
2382 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
2383 * typeck.c (build_x_compound_expr): Replace warn_unused with
2386 * decl2.c (lang_decode_option): Update -Wall unused flags by
2387 calling set_Wunused.
2389 2000-05-16 Mark Mitchell <mark@codesourcery.com>
2391 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
2392 * init.c (dfs_vtable_path_unmark): Remove.
2393 * search.c (marked_new_vtable_p): Likewise.
2394 (unmarked_new_vtable_p): Likewise.
2395 (dfs_search_slot_nonempty_p): Likewise.
2396 (dfs_mark): Likewise.
2397 (dfs_vtable_path_unmark): Likewise.
2398 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
2399 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
2400 (dfs_init_vbase_pointers): Remove special-case new ABI code.
2401 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
2402 (init_vbase_pointers): Simplify.
2403 (expand_indirect_vtbls_init): Likewise.
2405 * class.c (copy_virtuals): New function.
2406 (build_primary_table): Use it.
2407 (build_secondary_vtable): Likewise.
2408 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
2409 indicate that no vcall offset is required.
2410 (add_virtual_function): Likewise.
2411 (modify_all_vtables): Likewise.
2412 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
2413 (dfs_accumulate_vtbl_inits): Likewise.
2414 (build_vtbl_initializer): Make changes to handle construction
2416 (dfs_build_vcall_offset_vtbl_entries): Likewise.
2417 (build_rtti_vtbl_entries): Likewise.
2418 (build_vtable_entries): Handle a NULL vcall_index.
2420 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
2422 * decl2.c (lang_decode_option): Fix thinko.
2424 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
2426 * except.c (check_handlers): New fn.
2427 * cp-tree.h: Declare it.
2428 * semantics.c (finish_handler_sequence): Call it.
2429 (finish_function_handler_sequence): Likewise.
2430 (finish_handler_parms): Set TREE_TYPE on the handler.
2431 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
2432 * search.c (get_base_distance_recursive): If protect>1, ignore
2434 (get_base_distance): Don't reduce watch_access.
2436 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
2438 * lex.c: #include diagnostic.h.
2439 (lang_init_options): Set default prefixing rules.
2441 * lang-options.h: Add -fdiagnostics-show-location=.
2443 * decl2.c: #include diagnostic.h.
2444 (lang_decode_option): Handle -fdiagnostics-show-location=.
2446 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
2448 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
2449 * vec.cc: Revert my 2000-05-07 change.
2451 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
2453 * class.c (check_field_decls): Complain about non-static data
2454 members with same name as class in class with constructor.
2456 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
2458 * decl.c (grokdeclarator): Allow non-static data members with
2461 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
2463 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
2464 and pending_inline.filename. Update prototypes.
2465 * decl.c (define_label): Constify filename parameter.
2466 * decl2.c (warn_if_unknown_interface): Constify local char *.
2467 * input.c Constify input_source.filename. Don't declare
2468 input_filename or lineno. Constify filename parameter to feed_input.
2469 * lex.c (init_parse): Constify parameter and return value.
2470 (cp_pragma_interface, cp_pragma_implementation): Constify
2472 (reinit_parse_for_method, reinit_parse_for_block,
2473 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
2474 Constify local char *.
2475 * pt.c: Don't declare lineno or input_filename.
2476 (print_template_context, tsubst_friend_function, tsubst_decl,
2477 tsubst, instantiate_decl): Constify local char *.
2478 * semantics.c (expand_body): Constify local char *.
2479 * tree.c (build_srcloc): Constify filename parameter.
2480 * typeck.c (c_expand_asm_operands): Constify filename
2483 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
2485 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
2488 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
2490 * inc/cxxabi.h: Fix typos in comment.
2491 (__base_class_info::__offset): Use a static_cast.
2493 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
2495 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
2496 of std::size_t and std::ptrdiff_t respectively.
2497 * tinfo.cc: Likewise.
2500 2000-05-06 Richard Henderson <rth@cygnus.com>
2502 * typeck.c (build_c_cast): Don't warn integer->pointer size
2503 mismatch for constants.
2505 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
2507 * rtti.c (ptmd_initializer): Set non-public, if class is
2510 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
2511 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2512 __cxa_vec_delete): Likewise.
2513 * tinfo.cc (__dynamic_cast): Likewise.
2514 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2515 __cxa_vec_delete): Likewise.
2517 2000-05-04 Mark Mitchell <mark@codesourcery.com>
2519 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
2520 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
2521 (lang_decl_flags): Add vcall_offset.
2522 (THUNK_VCALL_OFFSET): Use it.
2523 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
2524 * method.c (make_thunk): Create the lang_decl here, not in
2526 (emit_thunk): Make generic thunks into ordinary functions once
2527 they have been fed to expand_body.
2528 * semantics.c (expand_body): Set current_function_is_thunk here.
2530 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2532 * class.c (update_vtable_entry_for_fn): Prototype.
2534 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
2537 * search.c (dfs_build_inheritance_graph_order): Prototype.
2539 2000-05-04 Mark Mitchell <mark@codesourcery.com>
2541 * cp-tree.h (special_function_kind): Add various kinds of
2543 (special_function_p): New function.
2544 * class.c (overrides): Don't let one kind of destructor override
2546 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
2547 whether or not to instantiate a template.
2548 * tree.c (special_function_p): Define.
2550 2000-05-03 Mark Mitchell <mark@codesourcery.com>
2552 * cp-tree.def (THUNK_DECL): Remove.
2553 * cp-tree.h (DECL_THUNK_P): New macro.
2554 (DECL_NON_THUNK_FUNCTION_P): Likewise.
2555 (DECL_EXTERN_C_FUNCTION_P): Likewise.
2556 (SET_DECL_THUNK_P): Likewise.
2557 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
2558 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
2559 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
2560 * decl.c (decls_match): Use DECL_EXTERN_C_P.
2561 (duplicate_decls): Likewise.
2562 (pushdecl): Likewise. Adjust thunk handling.
2563 (grokfndecl): Use DECL_EXTERN_C_P.
2564 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
2565 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
2566 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
2567 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
2568 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
2569 DECL_NO_STATIC_CHAIN.
2570 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
2571 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
2572 * search.c (covariant_return_p): Remove THUNK_DECL handling.
2575 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
2577 * tree.c (walk_tree): Set lineno.
2579 2000-05-01 Mark Mitchell <mark@codesourcery.com>
2581 * exception.cc: Update license notice.
2583 * new1.cc: Likewise.
2584 * new2.cc: Likewise.
2585 * tinfo.cc: Likewise.
2586 * tinfo2.cc: Likewise.
2588 * inc/cxxabi.h: Likewise.
2589 * inc/exception: Likewise.
2590 * inc/new: Likewise.
2591 * inc/new.h: Likewise.
2592 * inc/typeinfo: Likewise.
2594 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
2596 * tree.c (build_target_expr_with_type): If we already have a
2597 TARGET_EXPR, just return it.
2599 * optimize.c (initialize_inlined_parameters): Don't generate an
2600 EXPR_STMT if we can just use DECL_INITIAL.
2601 * decl.c (emit_local_var): Only make the initialization a
2602 full-expression if stmts_are_full_exprs_p.
2604 2000-05-01 Mark Mitchell <mark@codesourcery.com>
2606 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
2608 * call.c (standard_conversion): Use it.
2609 (direct_reference_binding): Likewise.
2610 (build_over_call): Likewise.
2611 (is_properly_derived_from): Likewise.
2612 (compare_ics): Likewise.
2613 * class.c (resolves_to_fixed_type_p): Likewise.
2614 * optimize.c (declare_return_variable): Likewise.
2615 * pt.c (is_specialization_of): Likewise.
2617 * typeck.c (comp_target_parms): Likeiwse.
2618 (build_static_cast): Likewise.
2619 (build_reinterpret_cast): Likewise.
2620 (build_const_cast): Likewise.
2621 (comp_ptr_ttypes_real): Likewise.
2622 (comp_ptr_ttypes_const): Likewise.
2623 * typeck2.c (process_init_constructor): Likewise.
2625 2000-04-30 Scott Snyder <snyder@fnal.gov>
2627 * decl.c (finish_destructor_body): Use the base destructor when
2628 destroying virtual bases.
2630 2000-04-30 Mark Mitchell <mark@codesourcery.com>
2632 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
2634 * optimize.c (struct inline_data): Add target_exprs field.
2635 (declare_return_variable): When a function returns an aggregate,
2636 use the variable declared in the TARGET_EXPR as the remapped
2638 (expand_call_inline): Update the pending target_exprs stack.
2639 (optimize_function): Initialize the stack.
2641 * decl2.c (finish_file): Fix typo in comment.
2643 * method.c (emit_thunk): Don't try to return a `void' value.
2645 * optimize.c (initialize_inlined_parameters): If the parameter is
2646 addressable, we need to make a new VAR_DECL, even if the
2647 initializer is constant.
2649 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
2651 * decl.c (grok_op_properties): Add an extra check of argtypes.
2653 2000-04-27 Mark Mitchell <mark@codesourcery.com>
2655 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
2657 (initialize_inlined_parameters): Try to avoid creating new
2660 2000-04-27 Alex Samuel <samuel@codesourcery.com>
2662 * lex.c (my_get_run_time): Remove.
2663 (init_filename_times): Use get_run_time instead of my_get_run_time.
2664 (check_newline): Likewise.
2665 (dump_time_statistics): Likewise.
2666 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
2667 of computing elapsed time explicitly.
2669 2000-04-26 Mark Mitchell <mark@codesourcery.com>
2671 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
2672 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
2673 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
2674 before calling decl_constant_value.
2675 * class.c (check_bitfield_decl): Likewise.
2676 * cvt.c (ocp_convert): Likewise.
2677 (convert): Likewise.
2678 * decl.c (compute_array_index_type): Likewise.
2679 (build_enumerator): Likewise.
2680 * decl2.c (check_cp_case_value): Likewise.
2681 * pt.c (convert_nontype_argument): Likewise.
2683 * typeck.c (decay_conversion): Likewise.
2684 (build_compound_expr): Likewise.
2685 (build_reinterpret_cast): Likewise.
2686 (build_c_cast): Likewise.
2687 (convert_for_assignment): Likewise.
2689 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
2691 * decl.c (finish_function): Don't play games with DECL_INLINE.
2693 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
2695 * ir.texi: Correct typo.
2697 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2699 * decl.c (grokdeclarator): Reject VLAs as members.
2701 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
2703 * call.c (standard_conversion): Accept conversion between
2706 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
2708 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
2710 * decl2.c (finish_file): Remove double setup for accounting
2713 2000-04-24 Robert Lipe <robertlipe@usa.net>
2715 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
2717 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
2719 * new.cc (set_new_handler): Needs to be in std::.
2721 2000-04-23 Mark Mitchell <mark@codesourcery.com>
2723 * cp-tree.h (lang_decl): Remove pretty_function_p.
2724 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
2725 language-specific node.
2726 * decl.c (cp_make_fname_decl): Use build_decl, not
2727 build_lang_decl, to build the variables.
2728 (grokvardecl): Don't call build_lang_decl for local variables in
2730 (grokdeclarator): Don't call build_lang_decl for local type
2731 declarations in templates.
2732 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
2733 zero'd memory, rather than calling memset.
2734 * pt.c: Include hashtab.h.
2735 (local_specializations): New variable.
2736 (retrieve_local_specialization): Use it.
2737 (register_local_specialization): Likewise.
2738 (tsubst_decl): Don't assume local variables have
2740 (instantiate_decl): Set up local_specializations.
2741 * Makefile.in (HTAB_H): New variable.
2743 2000-04-23 Richard Henderson <rth@cygnus.com>
2745 * typeck.c (c_expand_asm_operands): Restore the original
2746 contents of the output list.
2748 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
2750 * ir.texi: Document complex number representation.
2752 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
2754 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
2755 (target_incomplete_p): New function.
2756 (tinfo_base_init): Create comdat NTBS name variable.
2757 (ptr_initializer): Add non_public parameter. Calculate it.
2758 (ptmd_initializer): Likewise.
2759 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
2760 (create_real_tinfo_var): Add non_public parameter. Use it.
2761 Push proxy into global namespace.
2762 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
2764 * inc/typeinfo (type_info::before, type_info::operator==):
2765 Compare __name addresses.
2767 * tinfo2.cc: Remove new-abi builtins comment.
2769 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
2771 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
2773 * call.c (joust): Exit early if we get the same function, too.
2775 * decl2.c (key_method): Return NULL_TREE for template classes.
2776 (import_export_class): Don't need to check for template classes.
2778 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
2780 * lex.c: Remove references to cccp.c.
2782 2000-04-18 Mark Mitchell <mark@codesourcery.com>
2784 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
2785 volatile_memfunc. Add destructor_attr. Adjust dummy.
2786 (DECL_DESTRUCTOR_P): Use destructor_attr.
2787 (DECL_CONST_MEMFUNC_P): Reimplement.
2788 (DECL_VOLATILE_MEMFUNC_P): Remove.
2789 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
2790 (overrides): Use DECL_DESTRUCTOR_P.
2791 (check_for_override): Likewise.
2792 * decl.c (start_function): Likewise.
2793 * decl2.c (grokfclassfn): Likewise.
2794 (check_classfn): Likewise.
2795 (grok_function_init): Likewise.
2797 2000-04-17 Mark Mitchell <mark@codesourcery.com>
2799 * decl2.c (grokfield): Issue error on illegal data member
2802 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
2804 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
2806 2000-04-16 Mark Mitchell <mark@codesourcery.com>
2808 * class.c (build_vtable_entry): Don't build thunks for type-info
2811 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
2813 * decl.c (decls_match): Allow a redeclaration of a builtin to
2814 specify args while the builtin did not.
2816 2000-04-15 Mark Mitchell <mark@codesourcery.com>
2818 * cp-tree.def (THUNK_DECL): Add to documentation.
2819 * cp-tree.h (flag_huge_objects): Declare.
2820 * class.c (modify_vtable_entry): Tidy.
2821 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
2822 Calculate delta appropriately for the new ABI.
2823 (dfs_modify_vtables): Use it.
2824 (modify_all_vtables): Fix thinko in code to add overriding copies
2825 of functions to primary vtables.
2826 (build_clone): Fix typo in comment.
2827 (clone_function_decl): Correct order of destructors in vtable.
2828 (build_vbase_offset_vtbl_entries): Adjust comment.
2829 (dfs_vcall_offset_queue_p): Remove.
2830 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
2831 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
2832 (build_vtable_entry): Correct check for pure virtual functions.
2833 Don't declare flag_huge_objects.
2834 * decl.c (flag_huge_objects): Remove declaration.
2835 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
2836 Use int_size_in_bytes.
2837 (emit_thunk): Handle vcall offset thunks.
2839 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2841 * decl2.c (parse_time, varconst_time): Delete declarations.
2842 (finish_file): Delete LINENO declaration.
2843 START_TIME and THIS_TIME now long.
2845 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
2847 * class.c (build_base_field): Reformat comment.
2849 * inc/cxxabi.h (stddef.h): Comment inclusion.
2850 (__base_class_info::__offset): Comment shift.
2852 2000-04-12 Mark Mitchell <mark@codesourcery.com>
2854 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
2855 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
2856 (cp_push_exception_identifier): New macro.
2857 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
2858 (DECL_BASE_DESTRUCTOR_P): Likewise.
2859 (DECL_DELETING_DESTRUCTOR_P): Likewise.
2860 (get_vtbl_decl_for_binfo): Fix formatting.
2861 (in_charge_arg_for_name): New macro.
2862 (maybe_build_cleanup_and_delete): Remove declaration.
2863 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
2864 (in_charge_arg_for_name): New function.
2865 (build_new_method_call): Use it. Handle cloned destructors.
2866 (build_clone): Don't make the base constructor virtual.
2867 Automatically defer generated functions.
2868 (clone_function_decl): Handle destructors, too.
2869 (clone_constructors_and_destructors): Likewise.
2870 (create_vtable_ptr): Don't create a vtable entry for a cloned
2872 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
2873 (initialize_predefined_identifiers): Update appropriately.
2874 (finish_destructor_body): Simplify.
2875 (maybe_build_cleanup_and_delete): Remove.
2876 * except.c (expand_throw): Handle new-ABI destructors.
2877 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
2878 (build_dtor_call): New function.
2879 (build_delete): Use it. Simplify.
2880 * optimize.c (maybe_clone_body): Handle destructors.
2881 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
2883 * exception.cc (cleanup_fn): New typedef.
2884 (CALL_CLEANUP): New macro.
2885 (cp_eh_info): Use them.
2886 (__cp_push_exception): Likewise.
2887 (__cp_pop_exception): Likewise.
2889 2000-04-11 Mark Mitchell <mark@codesourcery.com>
2891 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
2892 (complete_dtor_identifier): New macro.
2893 (CLASSTYPE_FIRST_CONVERSION): Remove.
2894 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
2895 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
2896 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
2897 (CLASSTYPE_CONSTRUCTORS): Likewise.
2898 (CLASSTYPE_DESTRUCTORS): Likewise.
2899 (lang_decl): Add cloned_function.
2900 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
2901 (DECL_BASE_CONSTRUCTOR_P): Likewise.
2902 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
2903 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
2904 (DECL_CLONED_FUNCTION_P): Likewise.
2905 (DECL_CLONED_FUNCTION): Likewise.
2906 (clone_function_decl): Declare.
2907 (maybe_clone_body): Likewise.
2908 * call.c (build_user_type_conversion_1): Call complete object
2909 constructors in the new ABI.
2910 (build_new_method_call): Don't add in-charge parameters under the
2912 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
2913 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
2914 CLASSTYPE_DESTRUCTOR_SLOT.
2915 (build_clone): New function.
2916 (clone_function_decl): Likewise.
2917 (clone_constructors_and_destructors): Likewise.
2918 (check_bases_and_members): Use it.
2919 * decl.c (iniitialize_predefined_identifiers): Initialize
2920 complete_dtor_identifier.
2921 (finish_function): Don't add extra code to a clone.
2922 (lang_mark_tree): Mark cloned_function.
2923 * decl2.c (mark_used): Don't bother trying to instantiate things
2925 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
2926 * method.c (set_mangled_name_for_decl): Don't treat clones as
2928 (synthesize_method): Sythesize cloned functions, not the clones.
2929 * optimize.c (inline_data): Update comment on ret_label.
2930 (remap_block): Don't assume DECL_INITIAL exists.
2931 (copy_body_r): Allow ret_label to be NULL.
2932 (maybe_clone_body): Define.
2933 * pt.c (tsubst_decl): Handle clones.
2934 (instantiate_clone): New function.
2935 (instantiate_template): Use it.
2936 (set_mangled_name_for_template_decl): Don't treat clones as
2938 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
2939 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
2940 * semantics.c (expand_body): Clone function bodies as necessary.
2942 * optimize.c (remap_decl): Avoid sharing structure for arrays
2943 whose size is only known at run-time.
2944 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
2946 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
2947 to has_in_charge_parm_p.
2948 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
2949 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
2950 (DECL_COPY_CONSTRUCTOR_P): New macro.
2951 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
2952 (build_user_type_conversion_1): Likewise.
2953 (convert_like_real): Likewise.
2954 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
2955 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
2956 (copy_args_p): Likewise.
2957 (grok_ctor_properties): Likewise.
2958 (start_function): Likewise.
2959 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
2960 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
2961 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
2962 * method.c (do_build_copy_constructor): Use
2963 DECL_HAS_IN_CHARGE_PARM_P.
2964 (synthesize_method): Likewise.
2965 * pt.c (instantiate_template): Remove goto.
2966 * tree.c (build_cplus_method_type): Remove mention of obstacks in
2969 * cp-tre.h (finish_function): Change prototype.
2970 * decl.c (end_cleanup_fn): Adjust caller.
2971 (finish_function): Take only one parameter.
2972 * decl2.c (finish_objects): Adjust caller.
2973 (finish_static_storage_duration_function): Likewise.
2974 * method.c (emit_thunk): Likewise.
2975 * parse.y: Likewise.
2976 * parse.c: Regenerated.
2977 * pt.c (instantiate_decl): Likewise.
2978 * rtti.c (synthesize_tinfo_fn): Likewise.
2979 * semantics.c (expand_body): Likewise.
2981 * cp-tree.h (copy_decl): New function.
2982 * class.c (finish_struct_1): Use it.
2983 * lex.c (copy_decl): Define it.
2984 * pt.c (tsubst_decl): Likewise.
2985 * tree.c (copy_template_template_parm): Likewise.
2987 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
2988 has_nonpublic_assign_ref.
2989 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
2990 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
2991 * class.c (finish_struct_methods): Don't set
2992 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
2993 (interface_only): Don't declare.
2994 (interface_unknown): Likewise.
2996 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2998 * tree.h (HAVE_TEMPLATES): Remove definition.
2999 * lang-options.h (-fthis-is-variable): Remove documentation.
3001 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
3003 * class.c (instantiate_type): Handle object-relative template-id.
3005 * semantics.c (finish_expr_stmt): Call convert_to_void here.
3006 * decl.c (cplus_expand_expr_stmt): Not here.
3008 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
3009 Initialize exprtype earlier.
3011 * parse.y (fn.def1): Check for defining types in return types.
3013 * decl.c (check_tag_decl): Notice extra fundamental types.
3014 Diagnose empty decls in classes, too.
3016 * decl.c (grokdeclarator): Don't override an anonymous name if no
3017 declarator was given.
3019 * cvt.c (convert_to_void): Call resolve_offset_ref.
3021 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
3023 * decl2.c (decl_namespace): Handle getting a type.
3025 * typeck.c (build_c_cast): Re-enable warning for cast between
3026 pointer and integer of different size.
3028 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
3030 * inc/cxxabi.h (__pointer_type_info): Add restrict and
3032 (__pointer_type_info::__pointer_catch): New virtual function.
3033 (__pointer_to_member_type_info): Derive from
3034 __pointer_type_info. Adjust.
3035 (__pointer_to_member_type_info::__do_catch): Remove.
3036 (__pointer_to_member_type_info::__is_pointer_p): Declare.
3037 (__pointer_to_member_type_info::__pointer_catch): Declare.
3038 * rtti.c (qualifier_flags): Add restrict flag.
3039 (ptmd_initializer): Reorder members.
3040 (create_tinfo_types): Expand comments. Reorder
3041 ptmd_desc_type_node members.
3042 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
3044 (__pointer_type_info::__do_catch): Move specific code into
3045 __pointer_catch. Call it.
3046 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
3047 specific catch checking. Fix void conversion check.
3048 (__pointer_to_member_type_info::__do_catch): Remove.
3049 (__pointer_to_member_type_info::__pointer_catch): Implement.
3051 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3053 * lex.c (init_parse): Remove traces of classof and headof.
3054 * decl2.c (flag_operator_names): Default to 1.
3055 (lang_decode_option): Do not set it for -ansi.
3057 2000-04-09 Mark Mitchell <mark@codesourcery.com>
3059 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
3060 (DECL_MAIN_VARIANT): Remove.
3061 * decl.c (duplicate_decls): Don't set it.
3062 (start_function): Likewise.
3063 (lang_mark_tree): Don't mark it.
3064 * decl2.c (defer_fn): Don't use it.
3065 * lex.c (retrofit_lang_decl): Don't set it.
3066 * pt.c (tsubst_decl): Likewise.
3067 * ptree.c (print_lang_decl): Don't print it.
3068 * typeck.c (mark_addressable): Don't use it.
3070 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
3072 * vec.cc: Include <new> and <exception>.
3073 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
3074 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
3076 (__cxa_vec_delete): Catch dtor exceptions.
3078 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
3080 Prepend __ to implementation defined names.
3081 * inc/typeinfo (type_info): Rename _name to __name.
3082 (type_info::type_info): Rename parameter.
3083 (type_info::operator==, type_info::operator!=,
3084 type_info::before): Likewise.
3085 (type_info::is_pointer_p, type_info::is_function_p,
3086 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
3089 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
3090 (__pointer_type_info::__pointer_type_info): Likewise.
3091 (__pointer_type_info::is_pointer_p,
3092 __pointer_type_info::do_catch): Prepend __. Rename parameters.
3093 (__array_type_info::__array_type_info): Rename parameters.
3094 (__function_type_info::__function_type_info): Likewise.
3095 (__function_type_info::is_function_p): Prepend __.
3096 (__enum_type_info::__enum_type_info): Rename parameters.
3097 (__pointer_to_member_type_info::__pointer_to_member_type_info):
3099 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
3101 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
3102 (__class_type_info::__class_type_info): Rename parameters.
3103 (__class_type_info::sub_kind): Prepend __. Adjust member names.
3104 (__class_type_info::upcast_result,
3105 __class_type_info::dyncast_result): Prepend __. Move definition
3107 (__class_type_info::do_upcast, __class_type_info::do_catch,
3108 __class_type_info::find_public_src,
3109 __class_type_info::do_dyncast,
3110 __class_type_info::do_find_public_src): Prepend __. Rename
3112 (__si_class_type_info::__si_class_type_info): Rename parameters.
3113 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
3114 __si_class_type_info::do_find_public_src): Prepent __. Rename
3116 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
3117 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
3118 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
3120 (__dynamic_cast): Rename parameters.
3121 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
3122 type_info::do_catch, type_info::do_upcast): Prepend __.
3123 (contained_p, public_p, virtual_p, contained_public_p,
3124 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
3125 (__class_type_info::do_catch,
3126 __class_type_info::do_upcast): Prepend __. Adjust.
3127 (__class_type_info::__upcast_result,
3128 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
3130 (__class_type_info::find_public_src): Prepend __. Adjust.
3131 (__class_type_info::do_find_public_src,
3132 __si_class_type_info::do_find_public_src,
3133 __vmi_class_type_info::do_find_public_src): Likewise.
3134 (__class_type_info::do_dyncast,
3135 __si_class_type_info::do_dyncast,
3136 __vmi_class_type_info::do_dyncast): Likewise.
3137 (__class_type_info::do_upcast,
3138 __si_class_type_info::do_upcast,
3139 __vmi_class_type_info::do_upcast): Likewise.
3140 (__dynamic_cast): Adjust.
3141 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
3142 (__function_type_info::is_function_p): Likewise.
3143 (__pointer_type_info::do_catch): Likewise. Adjust.
3144 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
3145 (__throw_type_match_rtti_2): Adjust.
3146 (__is_pointer): Adjust.
3148 2000-04-08 Mark Mitchell <mark@codesourcery.com>
3150 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
3151 (complete_ctor_identifier): New macro.
3152 (special_function_kind): Add sfk_copy_constructor and
3153 sfk_assignment_operator.
3154 (LOOKUP_HAS_IN_CHARGE): Remove.
3155 (cons_up_default_function): Rename to ...
3156 (implicitly_declare_fn): ... this.
3157 * call.c (build_new_method_call): Add in-charge parameters for
3159 * class.c (add_implicitly_declared_members): Change parameter name
3160 from cant_have_assignment to cant_have_const_assignment.
3161 Replace calls to cons_up_default_function to implicitly_declare_fn.
3162 * cvt.c (ocp_convert): Use complete_ctor_identifier.
3163 * decl.c (initialize_predefined_identifiers): Initialize it.
3164 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
3166 * init.c (expand_default_init): Don't calculate the in-charge
3168 (build_new_1): Likewise.
3169 * lex.c (cons_up_default_function): Move to method.c.
3170 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
3171 (implicitly_declare_fn): New function.
3172 * typeck.c (build_static_cast): Use complete_ctor_identifier.
3173 (build_modify_expr): Likewise.
3174 * typeck2.c (build_functional_cast): Likewise.
3176 Under the new ABI, constructors don't return `this'.
3177 * cp-tree.h (warn_reorder): Declare.
3178 (special_function_kind): New enum.
3179 (global_base_init_list): Remove declaration.
3180 (emit_base_init): Don't return a value.
3181 (check_base_init): Don't declare.
3182 (is_aggr_typedef): Likewise.
3183 * decl.c (check_special_function_return_type): New function.
3184 (return_types): Remove.
3185 (grokdeclarator): Use check_special_function_return_type.
3186 (start_function): Don't initialize ctor_label under the new ABI.
3187 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
3188 * init.c (begin_init_stmts): Move to top of file.
3189 (finish_init_stmts): Likewise.
3190 (warn_reorder): Don't declare.
3191 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
3193 (check_base_init): Remove.
3194 (is_aggr_typedef): Likewise.
3195 (build_new_1): Don't use the return value of a constructor.
3196 * semantics.c (setup_vtbl_ptr): Don't use the return value
3198 * typeck.c (check_return_expr): Don't magically convert return
3199 statements into `return this' in constructors under the new ABI.
3201 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
3202 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
3203 (base_ctor_identifier): New macro.
3204 (base_dtor_identifier): Likewise.
3205 (deleting_dtor_identifier): Likewise.
3206 * decl.c: Don't include obstack.h.
3207 (obstack_chunk_alloc): Don't define.
3208 (obstack_chunk_free): Likewise.
3209 (struct predefined_identifier): New type.
3210 (initialize_predefined_identifiers): New function.
3211 (init_decl_processing): Use it.
3212 (debug_temp_inits): Remove.
3213 (start_method): Don't call preserve_data.
3214 (hack_incomplete_structures): Update comment.
3215 * init.c (init_init_processing): Don't initialize
3217 (build_offset_rf): Remove dead code.
3218 (build_delete): Use CLASSTYPE_N_BASECLASSES.
3219 * search.c (init_search_processing): Don't initialize
3222 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3224 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
3225 some sign_compare warnings.
3227 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
3229 Rename abi::__vmi_class_type_info members.
3230 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
3231 base_list, detail_masks members to vmi_flags, vmi_base_count,
3232 vmi_bases and vmi_flags_masks respectively.
3233 (__vmi_class_type_info::vmi_flags_masks): Rename
3234 details_unknown_mask to flags_unknown_mask.
3235 * tinfo.cc (__class_type_info::do_upcast): Adjust.
3236 (__vmi_class_type_info::do_find_public_src): Adjust.
3237 (__vmi_class_type_info::do_dyncast): Adjust.
3238 (__vmi_class_type_info::do_upcast): Adjust.
3240 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
3242 * tinfo.cc (convert_to_base): New function.
3243 (get_vbase_offset): Remove. Move into convert_to_base.
3244 (__vmi_class_type_info::do_find_public_src): Adjust.
3245 (__vmi_class_type_info::do_dyncast): Adjust.
3246 (__vmi_class_type_info::do_upcast): Adjust.
3248 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
3250 * tinfo.cc (operator=): Use __builtin_strcmp.
3251 * tinfo2.cc (before): Likewise.
3253 2000-04-06 Mark Mitchell <mark@codesourcery.com>
3255 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
3256 (DECL_SAVED_INLINE): Rename to ...
3257 (DECL_DEFERRED_FN): ... this.
3258 (in_function_p): Remove declaration.
3259 (mark_inline_for_output): Rename to ...
3260 (defer_fn): ... this.
3261 * decl.c (finish_function): Adjust call to mark_inline_for_output.
3262 (in_function_p): Remove definition.
3263 * decl2.c (saved_inlines): Rename to ...
3264 (deferred_fns): ... this.
3265 (saved_inlines_used): Rename to ...
3266 (deferred_fns_used): ... this.
3267 (mark_inline_for_output): Rename to ...
3268 (defer_fn): ... this.
3269 (finish_file): Adjust accordingly.
3270 (init_decl2): Likewise.
3271 * lex.c (cons_up_default_function): Likewise.
3272 * pt.c (mark_decl_instantiated): Likewise.
3273 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
3275 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
3276 * semantics.c (expand_body): Defer more functions.
3278 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
3281 * Make-lang.in (CXX_LIB2FUNCS): Add it.
3283 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
3284 __cxa_vec_delete): Declare.
3286 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
3288 * rtti.c (dfs_class_hint_mark): New static function.
3289 (dfs_class_hint_unmark): New static function.
3290 (class_hint_flags): Use them.
3292 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
3294 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
3296 2000-04-05 Mark Mitchell <mark@codesourcery.com>
3298 * cp-tree.h (instantiate_decl): Change prototype.
3299 * decl2.c (mark_used): Adjust call.
3300 * optimize.c (inlinable_function_p): Adjust handling of templates.
3301 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
3302 (do_type_instantiation): Likewise.
3303 (instantiate_decl): Defer more templates.
3304 (instantiate_pending_templates): Adjust logic to handle inline
3307 * Makefile.in (GGC_H): New variable. Use it throughout in place
3310 * call.c: Don't include obstack.h. Include ggc.h.
3311 (obstack_chunk_alloc): Don't define.
3312 (obstack_chunk_free): Likewise.
3313 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
3314 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
3315 (pop_switch): Free it.
3317 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
3319 * dump.c (dequeue_and_dump): Don't try to print the bit_position
3320 if we don't have a DECL_FIELD_OFFSET.
3322 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
3324 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
3327 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3329 * cfns.gperf (hash, libc_name_p): Prototype.
3331 * rtti.c (build_dynamic_cast_1): Constification.
3333 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
3335 * semantics.c (deferred_type_access_control): Prototype.
3337 2000-04-04 Mark Mitchell <mark@codesourcery.com>
3339 Correct many new ABI issues regarding vbase and vcall offset
3341 * cp-tree.h (BINFO_VTABLE): Document.
3342 (struct lang_type): Tweak formatting.
3343 (BINFO_PRIMARY_BINFO): Add to documentation.
3344 (CLASSTYPE_VSIZE): Fix typo in comment.
3345 (CLASSTYPE_VBASECLASSES): Update documentation.
3346 (BINFO_VBASE_MARKED): Remove.
3347 (SET_BINFO_VBASE_MARKED): Likewise.
3348 (CLEAR_BINFO_VBASE_MARKED): Likewise.
3349 (BINFO_FIELDS_MARKED): Remove.
3350 (SET_BINFO_FIELDS_MARKED): Likewise.
3351 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
3352 (enum access_kind): New enumeration.
3353 (num_extra_vtbl_entries): Remove declaration.
3354 (size_extra_vtbl_entries): Likewise.
3355 (get_vtbl_decl_for_binfo): New function.
3356 (dfs_vbase_unmark): Remove declaration.
3357 (mark_primary_bases): Likewise.
3358 * class.c (SAME_FN): Remove.
3359 (struct vcall_offset_data_s): Move definition.
3360 (build_vbase_pointer): Use `build', not `build_binary_op', to
3361 access the vbase pointer under the new ABI.
3362 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
3363 (build_primary_vtable): Likewise.
3364 (dfs_mark_primary_bases): Move here from search.c.
3365 (mark_primary_bases): Likewise.
3366 (determine_primary_bases): Under the new ABI, don't make a base
3367 class a primary base just because we don't yet have any virtual
3369 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
3370 (num_vfun_entries): Remove.
3371 (dfs_count_virtuals): Likewise.
3372 (num_extra_vtbl_entries): Likewise.
3373 (size_extra_vtbl_entries): Likewise.
3374 (layout_virtual_bases): Iterate in inheritance graph order under
3376 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
3377 indicate that a vfield is present.
3378 (init_class_processing): Initialize access_public_node, etc., from
3380 (get_vtbl_decl_for_binfo): New function.
3381 (dump_class_hierarchy_r): Likewise.
3382 (dump_class_hierarchy): Use it.
3383 (finish_vtbls): Build the vtbls in inheritance graph order.
3384 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
3385 (initialize_vtable): Use get_vtbl_decl_for_binfo.
3386 (accumulate_vtbl_inits): Add comments explaining why a pre-order
3388 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
3389 where the vptr points, even for primary vtables.
3390 (build_vtbl_initializer): Adjust handling of vbase and vcall
3392 (build_vcall_and_vbase_vtable_entries): New function.
3393 (dfs_build_vbase_offset_vtbl_entries): Remove.
3394 (build_vbase_offset_vtbl_entries): Reimplement.
3395 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
3396 were already handled in a primary base class vtable.
3397 (build_vcall_offset_vtbl_entries): Adjust.
3398 (build_rtti_vtbl_entries): Adjust.
3399 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
3400 * init.c (expand_virtual_init): Simplify.
3401 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
3402 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
3403 * search.c (BINFO_ACCESS): New macro.
3404 (SET_BINFO_ACCESS): Likewise.
3405 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
3406 (access_in_type): Likewise.
3407 (dfs_accessible_p): Likewise.
3408 (protected_accessible_p): Likewise.
3409 (lookup_fnfields_1): Adjust documentation.
3410 (dfs_mark_primary_bases): Move to class.c
3411 (mark_primary_bases): Likewise.
3412 (dfs_vbase_unmark): Remove.
3413 (virtual_context): Use BINFO_FOR_VBASE.
3414 (dfs_get_vbase_types): Simplify.
3415 (dfs_build_inheritance_graph_order): New function.
3416 (get_vbase_types): Use it.
3417 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
3419 * tinfo.cc (get_vbase_offset): New function.
3420 (__vmi_class_type_info::do_find_public_src): Use it.
3421 (__vmi_class_type_info::do_dyncast): Likewise.
3422 (__vmi_class_type_info::do_upcast): Likewise.
3424 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
3426 * lang-specs.h: Pass -fno-show-column to the preprocessor.
3428 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
3430 * rtti.c (class_hint_flags): Rename flags.
3431 (class_initializer): Remove flags.
3432 (synthesize_tinfo_var): Combine offset and flags. Add flags
3433 for __vmi_class_type_info.
3434 (create_tinfo_types): Remove flags from __class_type_info and
3435 __si_class_type_info. Merge flags and offset from
3436 base_class_type_info.
3437 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
3438 (__base_class_info::is_virtual_p): Adjust.
3439 (__base_class_info::is_public_p): Adjust.
3440 (__base_class_info::offset): New accessor.
3441 (__class_type_info::details): Remove member.
3442 (__class_type_info::__class_type_info): Lose details.
3443 (__class_type_info::detail_masks): Remove.
3444 (__si_class_type_info::__si_class_type_info): Lose details.
3445 (__vmi_class_type_info::details): New member.
3446 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
3447 (__vmi_class_type_info::detail_masks): New member.
3448 * tinfo.cc (__class_type_info::do_upcast): Initialize result
3449 with unknown_details_mask.
3450 (__vmi_class_type_info::do_find_public_src): Adjust
3451 (__vmi_class_type_info::do_dyncast): Adjust.
3452 (__vmi_class_type_info::do_upcast): Set result details, if
3454 (__dynamic_cast): Temporarily #if out optimization.
3456 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
3458 * rtti.c (get_tinfo_decl): Mark used.
3459 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
3460 mark as dealt with, if we output it.
3462 2000-03-28 Mark Mitchell <mark@codesourcery.com>
3464 * class.c: Reorganize to put virtual function table initialization
3465 machinery at the end of the file.
3467 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
3469 * class.c (finish_struct): Use bitsize_zero_node.
3470 * pt.c (instantiate_class_template): Likewise.
3472 2000-03-28 Mark Mitchell <mark@codesourcery.com>
3474 Put RTTI entries at negative offsets in new ABI.
3475 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
3476 vbase offset at index -3, not -1.
3477 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
3478 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
3479 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
3480 (build_rtti_vtbl_entries): New function.
3481 (set_rtti_entry): Remove.
3482 (build_primary_vtable): Don't use it.
3483 (build_secondary_vtable): Likewise.
3484 (start_vtable): Remove.
3485 (first_vfun_index): New function.
3486 (set_vindex): Likewise.
3487 (add_virtual_function): Don't call start_vtable. Do call
3489 (set_primary_base): Rename parameter.
3490 (determine_primary_base): Likewise.
3491 (num_vfun_entries): Don't use skip_rtti_stuff.
3492 (num_extra_vtbl_entries): Include RTTI information.
3493 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
3494 (skip_rtti_stuff): Remove.
3495 (dfs_modify_vtables): Don't use it.
3496 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
3497 (layout_nonempty_base_or_field): Update size handling.
3498 (create_vtable_ptr): Tweak.
3499 (layout_class_type): Adjust parameter names.
3500 (finish_struct_1): Simplify.
3501 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
3502 (skip_rtti_stuff): Remove.
3503 (first_vfun_index): New function.
3504 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
3505 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
3506 (marked_vtable_pathp): Declare.
3507 (unmarked_vtable_pathp): Likewise.
3508 * error.c (dump_expr): Use first_vfun_index to calculate vtable
3510 * rtti.c (build_headof): Look for RTTI at negative offsets.
3511 (get_tinfo_decl_dynamic): Likewise.
3512 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
3514 (create_pseudo_type_info): Do it here instead. Adjust so that
3515 vptr points at first virtual function.
3516 * search.c (marked_vtable_pathp): Make it global.
3517 (unmarked_vtable_pathp): Likewise.
3518 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
3519 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
3520 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
3521 (get_pure_virtuals): Likewise.
3522 (expand_upcast_fixups): Likewise.
3523 * tree.c (debug_binfo): Likewise.
3524 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
3527 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3529 * class.c (check_field_decl): Fix typo.
3530 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
3531 (check_methods): Likewise.
3532 (check_field_decls): Likewise.
3533 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
3534 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
3535 Use DECL_RESULT_FLD, not DECL_RESULT.
3536 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
3537 * lex.c (identifier_type): Likewise.
3538 * pt.c (determine_specialization, lookup_template_class): Likewise.
3539 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
3540 (resolve_overloaded_unification, more_specialized): Likewise.
3541 * semantics.c (finish_member_declaration): Likewise.
3542 * typeck.c (build_x_function_call): Likewise.
3544 2000-03-26 Mark Mitchell <mark@codesourcery.com>
3546 * class.c (layout_empty_base): Handle empty bases with non-byte
3548 (build_base_field): Likewise.
3549 (layout_virtual_bases): Likewise.
3551 * class.c (finish_struct_1): Fix typo in this change:
3553 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3555 2000-03-25 Mark Mitchell <mark@codesourcery.com>
3557 * decl.c (grokdeclarator): Count partial specializations when
3558 keeping track of how many template classes have been seen.
3560 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
3562 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3564 * class.c (build_vbase_pointer_fields): layout_field now place_field.
3565 (get_vfield_offset): Use byte_position.
3566 (set_rtti_entry): Set OFFSET to ssizetype zero.
3567 (get_binfo_offset_as_int): Deleted.
3568 (dfs_record_base_offsets): Use tree_low_cst.
3569 (dfs_search_base_offsets): Likewise.
3570 (layout_nonempty_base_or_field): Reflect changes in RLI format
3571 and call byte_position.
3572 (layout_empty_base): Convert offset to ssizetype.
3573 (build_base_field): use rli_size_unit_so_far.
3574 (dfs_propagate_binfo_offsets): Do computation in proper type.
3575 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
3576 (layout_class_type): Reflect changes in RLI names and fields.
3577 (finish_struct_1): Set DECL_FIELD_OFFSET.
3578 * dump.c (dequeue_and_dump): Call bit_position.
3579 * expr.c (cplus_expand_constant): Use byte_position.
3580 * rtti.c (expand_class_desc): Use bitsize_one_node.
3581 * typeck.c (build_component_addr): Use byte_position and don't
3582 special case for zero offset.
3584 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
3586 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
3588 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
3590 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
3593 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3595 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
3597 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
3598 make_typename_type, check_initializer, cp_finish_decl,
3599 xref_tag): Likewise.
3600 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
3601 decl_namespace, arg_assoc_template_arg, arg_assoc,
3602 validate_nonmember_using_decl, do_class_using_decl): Likewise.
3603 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
3604 args_to_string): Likewise.
3605 * friend.c (is_friend): Likewise.
3606 * lex.c (note_got_semicolon, note_list_got_semicolon,
3607 is_global): Likewise.
3608 * method.c (build_overload_nested_name, build_overload_value,
3609 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
3610 * parse.y (typename_sub, typename_sub1): Likewise.
3611 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
3612 process_partial_specialization, convert_template_argument,
3613 template_args_equal, add_pending_template, lookup_template_class,
3614 for_each_template_parm_r, maybe_fold_nontype_arg,
3615 tsubst, instantiate_template, type_unification_real, unify,
3616 instantiate_pending_templates, set_mangled_name_for_template_decl):
3618 * repo.c (repo_get_id, repo_template_used): Likewise.
3619 * search.c (lookup_field_1): Likewise.
3620 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
3621 * xref.c (classname): Likewise.
3623 2000-03-22 Mark Mitchell <mark@codesourcery.com>
3625 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
3626 (CANONICAL_BINFO): New macro.
3627 (BINFO_NEW_VTABLE_MARKED): Use it.
3628 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
3629 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
3630 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
3632 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3633 (build_secondary_vtable): Likewise.
3634 (dfs_finish_vtbls): Likewise.
3635 (dfs_accumulate_vtbl_inits): Likewise.
3636 (accumulate_vtbl_inits): New function.
3637 (finish_vtbls): Make sure that virtual bases come after
3638 non-virtual bases in the vtable group.
3639 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
3640 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3641 * search.c (struct vbase_info): Move definition.
3642 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3643 (unmarked_new_vtable_p): Likewise.
3644 (dfs_mark_vtable_path): Remove.
3645 (dfs_mark_new_vtable): Remove.
3646 (dfs_unmark_new_vtable): Likewise.
3647 (dfs_clear_search_slot): Likewise.
3648 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3649 (dfs_clear_vbase_slots): Likewise.
3650 (init_vbase_pointers): LIkewise.
3652 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
3654 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
3655 SIZETYPE to a non-SIZETYPE.
3657 2000-03-21 Mark Mitchell <mark@codesourcery.com>
3659 * class.c (layout_virtual_bases): Adjust names in conditionally
3662 * class.c (record_base_offsets): New function.
3663 (layout_conflict_p): Likewise.
3664 (layout_nonempty_base_or_field): Use it.
3665 (layout_empty_base): New function.
3666 (build_base_field): Use it.
3667 (build_base_fields): Update comment.
3668 (layout_virtual_bases): Fold in a little code form
3669 layout_basetypes. Use layout_empty_base.
3670 (layout_basetypes): Remove.
3671 (end_of_class): New function.
3672 (layout_class_type): Use it. Adjust.
3674 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
3676 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
3678 (dfs_skip_nonprimary_vbases_markedp): Likewise.
3679 * typeck.c (fntype_p): Remove.
3681 * cp-tree.h (TI_SPEC_INFO): Remove.
3682 (CLASSTYPE_TI_SPEC_INFO): Likewise.
3683 * pt.c (process_partial_specialization): Likewise.
3685 * class.c (build_base_field): Fix thinko in computation of binfo
3688 * tree.c (mark_local_for_remap_p): Mark variables declared in
3689 TARGET_EXPRs as well.
3691 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
3693 * typeck.c (require_complete_type, complete_type,
3694 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
3695 build_array_ref, convert_arguments, pointer_diff,
3696 build_x_unary_op, build_unary_op, build_c_cast,
3697 build_modify_expr): Use COMPLETE_TYPE_P etc.
3698 * call.c (is_complete, convert_like_real,
3699 build_new_method_call): Likewise.
3700 * class.c (build_vbase_pointer_fields, check_bases,
3701 build_base_field, finish_struct_1, pushclass): Likewise.
3702 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
3703 * decl.c (maybe_process_template_type_declaration, pushtag,
3704 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
3705 layout_var_decl, check_initializer, cp_finish_decl,
3706 grokdeclarator, require_complete_types_for_parms,
3707 grok_op_properties, xref_tag, xref_basetypes,
3708 check_function_type): Likewise.
3709 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
3710 * friend.c (do_friend): Likewise.
3711 * init.c (build_offset_ref): Likewise.
3712 * parse.y (structsp): Likewise.
3713 * pt.c (maybe_process_partial_specialization,
3714 tsubst_friend_function, instantiate_class_template, tsubst,
3715 do_type_instantiation, instantiate_pending_templates): Likewise.
3716 * repo.c (repo_get_id): Likewise.
3717 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
3718 synthesize_tinfo_var, emit_support_tinfos): Likewise.
3719 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
3720 * semantics.c (begin_class_definition): Likewise.
3721 * tree.c (build_cplus_method_type): Likewise.
3722 * typeck2.c (digest_init, build_functional_cast,
3723 add_exception_specifier): Likewise.
3724 * parse.h, parse.c: Regenerated.
3726 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
3728 * inc/cxxabi.h: New header file. Define new-abi entry points.
3729 (__pointer_type_info::target): Rename member to ...
3730 (__pointer_type_info::type): ... here.
3731 (__base_class_info::type): Rename member to ...
3732 (__base_class_info::base): ... here.
3733 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
3734 * cp-tree.h (CPTI_ABI): New global tree enumeration.
3735 (abi_node): New global tree node.
3736 * decl.c (abi_node): Document.
3737 (init_decl_processing): Initialize abi_node.
3738 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
3739 (get_vmi_pseudo_type_info): Likewise.
3740 (create_tinfo_types): Likewise.
3741 (emit_support_tinfos): Likewise.
3742 * tinfo.h (cxxabi.h): Include for new-abi.
3743 Move rtti class definitions to new header file.
3744 * tinfo.cc (abi): Use the namespace.
3745 (std): Move new abi rtti classes from here ...
3746 (__cxxabiv1): ... to here.
3747 * tinfo2.cc (cxxabi.h): Include for new-abi.
3748 Move rtti class definitions to new header file.
3749 (std): Move new abi rtti classes from here ...
3750 (__cxxabiv1): ... to here.
3751 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
3754 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
3755 Jason Merrill <jason@casey.cygnus.com>
3757 * method.c (build_overload_int): Use host_integerp.
3759 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3761 * init.c (build_offset_ref): Handle the case of a templated member
3764 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3766 * except.c (expand_exception_blocks): Clear catch_clauses_last.
3768 2000-03-18 Mark Mitchell <mark@codesourcery.com>
3770 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
3771 * class.c (check_bitfield_decl): Turn illegal bitfields into
3773 (dfs_propagate_binfo_offsets): Adjust for new size_binop
3775 (dfs_offset_for_unshared_vbases): Likewise.
3776 * cvt.c (cp_convert_to_pointer): Convert NULL to a
3777 pointer-to-member correctly under the new ABI.
3778 * expr.c (cplus_expand_constant): Don't use cp_convert when
3779 turning an offset into a pointer-to-member.
3780 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
3781 when dereferencing them under the new ABI.
3782 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
3783 of pointers-to-members under the new ABI.
3785 * class.c (check_bitfield_decl): Remove restriction on really long
3787 (layout_class_type): Implement new ABI handling of bitfields
3788 longer than their types.
3790 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3792 * parse.y (extdefs): Call ggc_collect.
3793 * parse.c: Regenerated.
3795 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
3797 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
3798 (note_name_declared_in_class): Use OVL_CURRENT to get at a
3801 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3803 * class.c (build_vbase_path): Use integer_zerop.
3804 (build_vtable_entry): Use tree_low_cst.
3805 (get_vfield_offset): Use bit_position.
3806 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
3808 (check_bitfield_decl): Set DECL_SIZE using convert.
3809 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
3810 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
3812 (finish_struct_1): Use bit_position.
3813 (dump_class_hierarchy): Use tree_low_cst.
3814 * cp-tree.h (min_precision): Add declaration.
3815 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
3816 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
3817 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
3818 * expr.c (cplus_expand_constant): Use bit_position.
3819 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
3820 * rtti.c (get_base_offset): Use bit_position.
3821 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
3822 host_integerp, and tree_low_cst.
3823 (pointer_int_sum): Use integer_zerop.
3824 (build_component_addr): Use bit_position.
3826 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
3828 * typeck.c (require_complete_type): Don't assume size_zero_node.
3829 (complete_type_or_else): Likewise.
3831 2000-03-16 Steven Grady <grady@digitaldeck.com>
3832 Jason Merrill <jason@casey.cygnus.com>
3834 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
3836 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
3838 * decl2.c (grokfield): Bail out if type is error_mark_node.
3840 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
3842 * tinfo2.cc (__ptr_to_member_data): Rename to ...
3843 (__pointer_to_member_data): ... here. Adjust.
3844 * rtti.c (create_tinfo_types): Adjust.
3846 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
3848 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
3849 * decl.c (ref_desc_type_node): Undocument.
3850 * rtti.c (ptr_ref_initializer): Rename to ...
3851 (ptr_initializer): ... here. Adjust comments.
3852 (ptmd_initializer): Fix comment thinko.
3853 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
3854 (create_tinfo_types): Remove ref_desc_type_node init.
3855 * tinfo2.cc (__reference_type_info): Remove.
3857 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
3859 * decl.c (cp_finish_decl): Remove obsolete comment.
3861 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
3863 2000-03-14 Mark Mitchell <mark@codesourcery.com>
3865 * cp-tree.h: Tweak documentation.
3866 * class.c (build_vbase_pointer_fields): Layout the fields, too.
3867 (avoid_overlap): Remove.
3868 (get_binfo_offset_as_int): New function.
3869 (dfs_serach_base_offsets): Likewise.
3870 (layout_nonempty_base_or_field): Likewise.
3871 (build_base_field): Layout fields here. Avoid placing two objects
3872 of the same type at the same address, under the new ABI.
3873 (build_base_fields): Adjust accordingly.
3874 (create_vtable_ptr): Return the new field, but don't attach it to
3876 (remove_base_field): Remove.
3877 (remove_base_fields): Remove.
3878 (layout_basetypes): Adjust accordingly.
3879 (layout_class_type): Call layout_field for each field, rather than
3880 just making a wholesale call to layout_type.
3882 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
3884 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
3886 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
3888 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
3890 * except.c (dtor_nothrow): New fn.
3891 (do_pop_exception): Use it. Take type parm.
3892 (push_eh_cleanup): Take type parm.
3893 (expand_start_catch_block): Pass it.
3894 (build_eh_type_type_ref): Accept null type.
3896 2000-03-12 Mark Mitchell <mark@codesourcery.com>
3898 * cp-tree.h (revert_static_member_fn): Change prototype.
3899 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
3900 (grok_op_properties): Likewise.
3901 (start_function): Likewise.
3902 (revert_static_member_fn): Simplify.
3903 * pt.c (check_explicit_specialization): Adjust call to
3904 revert_static_member_fn.
3906 2000-03-11 Mark Mitchell <mark@codesourcery.com>
3908 * cp-tree.h (scope_kind): New type.
3909 (tmpl_spec_kind): Likewise.
3910 (declare_pseudo_global_level): Remove.
3911 (pseudo_global_level_p): Rename to template_parm_scope_p.
3912 (pushlevel): Remove declaration.
3913 (begin_scope): New function.
3914 (finish_scope): Likewise.
3915 (current_tmpl_spec_kind): Likewise.
3916 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
3917 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
3918 Add template_spec_p.
3919 (toplevel_bindings_p): Adjust.
3920 (declare_pseudo_global_level): Remove.
3921 (pseudo_global_level_p): Rename to template_parm_scope_p.
3922 (current_tmpl_spec_kind): New function.
3923 (begin_scope): Likewise.
3924 (finish_scope): Likewise.
3925 (maybe_push_to_top_level): Adjust.
3926 (maybe_process_template_type_declaration): Likewise.
3927 (pushtag): Likewise.
3928 (pushdecl_nonclass_level): Likewise.
3929 (lookup_tag): Likewise.
3930 (grokfndecl): Handle member template specializations. Share
3931 constructor and non-constructor code.
3932 * decl2.c (check_classfn): Handle member template specializations.
3933 * pt.c (begin_template_parm_list): Use begin_scope.
3934 (begin_specialization): Likewise.
3935 (end_specialization): Likewise.
3936 (check_explicit_specialization): Use current_tmpl_spec_kind.
3937 Handle member template specializations.
3938 (end_template_decl): Use finish_scope. Remove call to
3940 (push_template_decl_real): Remove bogus error message.
3941 (tsubst_decl): Fix typo in code contained in comment.
3942 (instantiate_template): Handle member template specializations.
3943 (most_general_template): Likewise.
3945 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
3947 * lex.c (whitespace_cr): Compress consecutive calls to warning().
3948 (do_identifier): Ditto for error().
3950 * pt.c (convert_nontype_argument): Ditto for cp_error().
3951 (convert_template_argument): Ditto for cp_pedwarn().
3953 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
3955 * exception.cc (__check_null_eh_spec): New fn.
3956 * except.c (expand_end_eh_spec): Call it if the spec is throw().
3958 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
3960 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
3961 * except.c (expand_end_eh_spec): Add the return type.
3962 * rtti.c (throw_bad_cast): Add the parmtypes.
3963 (throw_bad_typeid): Likewise.
3965 * semantics.c (expand_stmt): Only leave out rtl for unused
3966 artificials, and set DECL_IGNORED_P on them as well.
3967 * decl.c (wrapup_globals_for_namespace): Likewise.
3969 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
3971 * decl.c (maybe_commonize_var): Skip all artificial decls.
3972 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
3974 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
3976 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
3977 * cp-tree.h: Declare flag_enforce_eh_specs.
3978 * decl.c (store_parm_decls, finish_function): Check it.
3980 C library functions don't throw.
3981 * Makefile.in (cfns.h): New target.
3982 (except.o): Depend on it.
3983 * Make-lang.in (cc1plus): Depend on cfns.gperf.
3984 * cfns.gperf: New file.
3985 * cfns.h: Generated.
3986 * except.c: Include it.
3987 (nothrow_libfn_p): New fn.
3988 * decl.c (grokfndecl): Use it.
3989 * cp-tree.h: Declare it.
3991 * decl.c (push_overloaded_decl_1, auto_function,
3992 define_function): Lose.
3993 (build_library_fn_1): New static fn.
3994 (builtin_function): Use it.
3995 (get_atexit_node): Use build_library_fn_ptr.
3996 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
3997 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
3998 push_void_library_fn, push_throw_library_fn): New fns.
3999 * cp-tree.h: Declare them.
4000 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
4001 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
4002 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
4003 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
4004 * rtti.c (build_runtime_decl): Lose.
4005 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
4006 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
4007 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
4009 * call.c (build_call): Remove result_type parm.
4010 Call mark_used on unused artificial fns.
4011 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
4013 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
4015 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
4017 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
4018 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
4019 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
4020 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
4021 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
4022 expand_generic_desc): Likewise.
4024 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4026 * exception.cc (__cp_pop_exception): Cleanup the original object.
4028 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4030 * decl.c (grok_op_properties): Merge conversion to void warning
4031 with other silly op warnings.
4033 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
4035 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
4036 array CONSTRUCTOR elements. Don't use expr_tree_cons.
4038 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4040 * decl.c (cp_make_fname_decl): New function.
4041 (wrapup_globals_for_namespace): Don't emit unused static vars.
4042 (init_decl_processing): Remove comment about use of
4043 array_domain_type. Set make_fname_decl.
4044 (cp_finish_decl): Remove __FUNCTION__ nadgering.
4045 * semantics.c (begin_compound_stmt): Remove
4046 current_function_name_declared flagging.
4047 (expand_stmt): Don't emit unused local statics.
4048 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
4051 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4053 * typeck.c (convert_for_assignment): Don't look at array
4055 * call.c (convert_like_real): Likewise.
4057 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
4059 Add initial support for '\uNNNN' specifier.
4060 * lex.c (read_ucs): New fn.
4061 (readescape, skip_white_space): Call it.
4062 (is_extended_char, is_extended_char_1): New fns.
4063 (utf8_extend_token): New fn, #if 0'd out.
4064 (real_yylex): Treat extended chars like letters.
4066 * search.c (note_debug_info_needed): Walk the bases even if we
4067 weren't deferring the type itself.
4069 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4071 * decl2.c (finish_objects): Constify a char*.
4073 * method.c (emit_thunk): Likewise.
4075 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
4077 * typeck.c (dubious_conversion_warnings): Look through
4080 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4082 * class.c (dfs_modify_vtables): I is now unsigned.
4083 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
4084 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
4085 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
4086 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
4087 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
4088 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
4089 Call integer_all_onesp.
4090 * typeck2.c (process_init_constructor): Use compare_tree_int.
4092 * lang-specs.h (as): Don't call if -syntax-only.
4094 2000-03-06 Mark Mitchell <mark@codesourcery.com>
4096 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
4097 RTL_EXPR_HAS_NO_SCOPE after all.
4099 2000-03-05 Mark Mitchell <mark@codesourcery.com>
4101 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
4102 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
4103 RTL_EXPR_HAS_NO_SCOPE.
4105 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
4108 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
4110 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
4112 * call.c (convert_like): Macrofy.
4113 (convert_like_with_context): New macro.
4114 (convert_like_real): Renamed from convert_like. Add calling
4115 context parameters, for diagnostics. Add recursive flag. Call
4116 dubious_conversion_warnings for outer conversion.
4117 (build_user_type_conversion): Use convert_like_with_context.
4118 (build_over_call): Likewise. Don't warn about dubious
4119 conversions here. Adjust convert_default_arg calls.
4120 (convert_default_arg): Add context parameters for diagnostics.
4121 Pass throught to convert_like_with_context.
4122 * cp-tree.h (convert_default_arg): Add context parameters.
4123 (dubious_conversion_warnings): Prototype new function.
4124 * typeck.c (convert_arguments): Adjust convert_default_arg call.
4125 (dubious_conversion_warnings): New function, broken
4126 out of convert_for_assignment.
4127 (convert_for_assignment): Adjust.
4129 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
4131 * decl2.c (key_method): Break out from...
4132 (import_export_vtable, import_export_class): ...here.
4134 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
4135 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
4137 * search.c (note_debug_info_needed, dfs_debug_mark,
4138 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
4139 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
4141 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
4143 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
4146 2000-03-02 Mark Mitchell <mark@codesourcery.com>
4148 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
4149 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
4150 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
4151 (lang_type): Split gets_new into has_new and has_array_new.
4152 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4153 (TYPE_GETS_NEW): Split into ...
4154 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
4155 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
4156 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
4157 (build_op_new_call): Don't declare.
4158 (build_new_1): Likewise.
4159 * call.c (build_op_new_call): Remove.
4160 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4161 instead of TYPE_NEEDS_DESTRUCTOR.
4162 (finish_struct_bits): Likewise.
4163 (add_implicitly_declared_members): Likewise.
4164 (check_field_decl): Likewise.
4165 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
4166 correctly under the new ABI.
4167 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4168 instead of TYPE_NEEDS_DESTRUCTOR.
4169 (initialize_local_var): Likewise.
4170 (destroy_local_var): Likewise.
4171 (cp_finish_decl): Likewise.
4172 (register_dtor_fn): Likewise.
4173 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
4174 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
4175 TYPE_VEC_DELETE_TAKES_SIZE here.
4176 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
4177 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
4178 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4179 (finish_destructor_body): Likewise.
4180 (maybe_build_cleanup_1): Likewise.
4181 * decl2.c (do_static_destruction): Likewise.
4182 * init.c (build_new_1): Make it static.
4183 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4184 (expand_cleanup_for_base): Likewise.
4185 (get_cookie_size): New function.
4186 (build_new_1): Handle array-new cookies correctly under the new
4188 (build_vec_delete_1): Likewise.
4189 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4190 (build_delete): Likewise.
4191 (build_vec_delete): Handle array-new cookies correctly under the new
4193 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4194 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
4195 TYPE_HAS_ARRAY_NEW_OPERATOR.
4196 * ptree.c (print_lang_type): Check them.
4197 * search.c (context_for_name_lookup): Fix typo in comment.
4198 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4199 * tree.c (break_out_cleanups): Likewise.
4200 (build_cplus_array_test_1): Likewise.
4201 (cp_build_qualified_type_real): Likewise.
4202 * typeck.c (complete_type): Likewise.
4204 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
4205 the command-line, not the end.
4207 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
4209 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
4211 2000-03-02 Tom Tromey <tromey@cygnus.com>
4213 * cp-tree.h (build_java_class_ref): Declare.
4214 * init.c (build_java_class_ref): No longer static.
4215 * except.c (expand_throw): Generate a Java-style `throw' if the
4216 thrown object is a "Java" object.
4217 (initialize_handler_parm): Generate a Java-style lookup of
4218 exception info if the caught object is a "Java" object.
4219 (catch_language, catch_language_init): New globals.
4220 (decl_is_java_type): New function.
4221 (expand_start_catch_block): Don't call push_eh_info() or
4222 push_eh_cleanup() when handling a Java-style "catch". Pass Java
4223 class reference to build_catch_block.
4225 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4227 * typeck.c (comptypes): Treat sizetype like its language equivalent.
4229 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
4231 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
4232 to merge reference/pointer code and fix incorrect warnings.
4234 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
4236 * search.c (protected_accessible_p): Use context_for_name_lookup.
4238 * init.c (construct_virtual_bases): Fix thinko.
4239 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
4241 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
4243 * decl.c (current_function_decl): Move to toplev.c.
4245 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
4247 * pt.c (fn_type_unification): Unify return type, whenever
4249 (get_bindings_real): Only pass return type when necessary.
4250 Remove explicit return type check.
4251 * class.c (resolve_address_of_overloaded_function): Pass desired
4252 return type to fn_type_unification.
4254 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4256 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
4258 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
4260 * rtti.c (expand_class_desc): Likewise.
4261 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
4262 (THUNK_VCALL_OFFSET): Likewise.
4263 (THUNK_DELTA): Reflect changes in ../tree.h.
4265 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
4267 * search.c (protected_accessible_p): Also allow the access if
4268 the member is public in DERIVED. Lose TYPE parm.
4269 (friend_accessible_p): Lose TYPE parm.
4270 (accessible_p): Adjust.
4272 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4274 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
4275 on things that are not sizes; ssize_binop deleted.
4276 Call size_diffop when appropriate.
4277 (dfs_build_vcall_offset_vtbl_entries): Likewise.
4278 (build_primary_vtable, build_secondary_vtable): Likewise.
4279 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
4280 Variable I is HOST_WIDE_INT.
4281 (get_vfield_offset): Pass proper types to size_binop.
4282 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
4283 (finish_struct_1): Likewise.
4284 (skip_rtti_stuff): Arg N is now pointer to signed.
4285 (layout_class_type): Use size_zero_node.
4286 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
4287 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
4288 * decl.c (complete_arry_type): Pass proper types to size_binop.
4289 (xref_basetypes): BINFO_OFFSET is sizetype.
4290 * error.c (dump_expr): Don't use size_binop non-sizes.
4291 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
4292 * init.c (construct_virtual_bases): Fix type error.
4293 (build_vec_delete_1): Pass proper type to size_binop and don't
4295 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
4296 * rtti.c (get_base_offset): Pass proper type to size_binop.
4297 * search.c (dfs_find_vbases): Fix type error.
4298 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
4299 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
4300 * tree.c (debug_binfo): Variable N is signed.
4301 Use HOST_WIDE_INT_PRINT_DEC.
4302 * typeck.c (comptypes): sizetype is same as equivalent integer type.
4303 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
4304 size_one_node and size_zero_node.
4305 (c_alignof): Use size_one_node.
4306 (build_component_addr): Pass proper types to size_binop.
4307 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
4309 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
4311 Implement class scope using-declarations for functions.
4312 * class.c (handle_using_decl): Call add_method for used functions.
4313 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
4314 (add_method): Used functions are hidden by local functions.
4315 (check_bases_and_members): Handle using-decls before finalizing
4316 CLASSTYPE_METHOD_VEC.
4317 * call.c (add_function_candidate): Add ctype parm; if non-zero,
4318 override the type of 'this' accordingly.
4319 (add_template_candidate, add_template_candidate_real): Add ctype parm.
4320 (convert_class_to_reference, build_user_type_conversion_1,
4321 build_new_function_call, build_object_call, build_new_op,
4322 build_new_method_call): Pass ctype parm.
4324 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
4326 * call.c (convert_class_to_reference, build_user_type_conversion_1,
4327 build_new_function_call, build_object_call, build_new_op,
4328 build_new_method_call, build_op_delete_call): Don't get basetype_path
4330 * typeck.c (build_component_ref): Likewise.
4331 * init.c (build_offset_ref): Likewise.
4332 (resolve_offset_ref): Don't call enforce_access.
4333 Call build_scoped_ref.
4334 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
4335 would cause an error or if -pedantic.
4336 * class.c (alter_access): Lose binfo parm.
4338 2000-02-26 Mark Mitchell <mark@codesourcery.com>
4340 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
4343 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
4345 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
4346 pseudo_type_info creation into the std namespace
4348 2000-02-26 Mark Mitchell <mark@codesourcery.com>
4350 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
4351 (import_export_class): Remove declaration.
4352 * decl2.c (import_export_class): Make it static.
4353 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
4354 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
4355 EXPR_WITH_FILE_LOCATION.
4356 * lex.c (check_newline): Tweak filename/lineno setting.
4357 * semantics.c (begin_while_stmt): Fix typo in comment.
4359 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4361 * lang-options.h (-fmessage-length=): Add missing option.
4363 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
4365 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
4367 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
4369 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
4371 * optimize.c (expand_call_inline): Emit the return label before
4372 evaluating the return value.
4374 2000-02-24 Mark Mitchell <mark@codesourcery.com>
4376 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
4377 than duplicating functionality here.
4378 * optimize.c: Include input.h.
4379 (expand_call_inline): Use push_srcloc and pop_srcloc.
4380 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
4381 * parse.c: Regenerated.
4382 * Makefile.in (lex.o): Depend on input.h.
4383 (optimize.o): Likewise.
4385 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
4387 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
4388 function type, rather than ICE.
4390 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
4392 * decl.c (grokdeclarator): Call decl_type_access_control.
4393 * parse.y (parse_end_decl): Don't call decl_type_access_control if
4396 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
4398 * decl.c (decls_match): Remove obsolete static member nadgering.
4400 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4402 * decl.c (grokdeclarator): Change ANSI to ISO.
4403 * lex.c (consume_string, readescape, do_identifier): Likewise.
4404 (parse_float, real_yylex): Likewise.
4405 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
4406 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
4407 new_type_id, maybe_label_decls, simple_stmt,
4408 for.init.statement): Likewise.
4409 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
4410 * semantics.c (finish_named_return_value): Likewise.
4411 * parse.c: Regenerate.
4413 2000-02-21 Mark Mitchell <mark@codesourcery.com>
4415 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
4416 (CPTI_CLASS_STAR_TYPE): Remove.
4417 (vtable_index_type): Likewise.
4418 (class_star_type_node): Remove.
4419 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
4420 (build_binary_op_nodefault): Remove.
4421 * call.c (build_new_op): Use build_binary_op instead of
4422 build_binary_op_nodefault.
4423 * decl.c (init_decl_processing): Remove class_star_type_node
4424 initialization. Make delta_type_node ptrdiff_type_node under the
4425 new ABI. Initialize vtable_index_type.
4426 (build_ptrmemfunc_type): Build different structures for the new
4428 (build_enumerator): Use build_binary_op instead of
4429 build_binary_op_nodefault.
4430 * method.c (build_overload_value): Mangle pointers-to-members
4431 appropriately under the new ABI.
4432 * typeck.c (build_array_ref): Use build_binary_op instead of
4433 build_binary_op_nodefault.
4434 (get_member_function_from_ptrfunc): Adjust for the new ABI.
4435 (build_binary_op_nodefault): Rename to ...
4436 (build_binary_op): ... this. Remove old version. Adjust for
4437 pointer-to-member comparisons under the new ABI.
4438 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
4439 (build_ptrmemfunc): Adjust for the new ABI.
4440 (expand_ptrmemfunc_cst): Likewise.
4441 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
4442 (pfn_from_ptrmemfunc): Adjust for the new ABI.
4444 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
4446 * call.c (build_object_call): Compress consecutive calls to
4448 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
4449 (build_op_delete_call): Adjust message formatting.
4451 * class.c (check_bases): Compress consecutive calls to
4453 (finish_struct_anon): Say 'ISO C++'.
4455 * decl.c (start_decl): Same here.
4456 (grok_reference_init): Likewise.
4457 (grokfndecl): Correct message formatting.
4458 (grokfndecl): Improve diagnostic.
4459 (check_static_variable_definition): Likewise. Say 'ISO C++'
4460 (compute_array_index_type): Say 'ISO C++'
4461 (create_array_type_for_decl): Compress consecutive calls to
4463 (grokdeclarator): Say 'ISO C++'
4464 (grok_op_properties): Likewise.
4466 * decl2.c (delete_sanity): Clairify diagnostic.
4467 (check_member_template): Same here.
4468 (grok_function_init): Use consistent terminology.
4470 * expr.c (do_case): Say 'ISO C++'
4472 * friend.c (do_friend): Compress consecutive calls to warning.
4474 2000-02-20 Mark Mitchell <mark@codesourcery.com>
4476 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
4477 * class.c (build_secondary_vtable): Reorganize. Don't create a
4478 new vtable under the new ABI.
4479 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
4481 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
4482 the initializing elements.
4483 (initialize_vtable): New function.
4484 (dfs_finish_vtbls): Use it.
4485 (dfs_accumulate_vtbl_inits): New function.
4486 (finish_vtbls): Merge primary and secondary vtables under the new
4488 (finish_struct_1): Remove redundant call to layout_vtable_decl.
4489 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
4492 * class.c (build_vtable): New function, split out from ...
4493 (get_vtable_decl): ... here, and ...
4494 (build_secondary_vtable): ... here.
4496 * pt.c (tsubst_decl): Fix formatting.
4498 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4500 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
4501 (avoid_overlap, build_base_field): Likewise.
4502 (build_base_field, build_base_fields, is_empty_class):
4503 Test DECL_SIZE with integer_zero.
4504 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
4505 * cp-tree.h (struct lang_type): New field size_unit.
4506 (CLASSTYPE_SIZE_UNIT): New macro.
4507 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
4508 (cp_finish_decl): Delete -Wlarger-than processing.
4509 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
4510 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
4511 * tree.c (make_binfo): binfo vector is one entry longer.
4512 (walk_tree): Walk DECL_SIZE_UNIT.
4514 2000-02-19 Mark Mitchell <mark@codesourcery.com>
4516 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
4518 (build_vtable_entry): Don't assume all vtable entries are
4520 (build_vtbl_initializer): Adjust accordingly.
4521 (get_vtable_decl): Fix formatting.
4523 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
4525 * semantics.c (deferred_type_access_control): Walk the entire
4527 (save_type_access_control): Rename from
4528 initial_deferred_type_access_control. Just remember the value.
4529 (decl_type_access_control): New fn.
4530 (begin_function_definition): Use deferred_type_access_control, after
4531 we've started the function. Set type_lookups to error_mark_node.
4532 * parse.y (frob_specs, fn.def1): Adjust.
4533 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
4534 (parse_end_decl, parse_bitfield0, parse_method): New fns.
4535 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
4536 (after_type_component_declarator0): Likewise.
4537 (after_type_component_declarator): Likewise.
4538 (notype_component_declarator): Likewise.
4539 * cp-tree.h: Adjust.
4541 * decl.c (redeclaration_error_message): Allow redeclaration of
4542 namespace-scope decls.
4544 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
4546 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
4548 2000-02-17 Mark Mitchell <mark@codesourcery.com>
4550 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
4551 * decl2.c (grokclassfn): Likewise.
4553 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
4555 * decl2.c (lang_decode_option): Don't set default message length
4557 * lex.c (lang_init_options): Set it here.
4559 2000-02-16 Mark Mitchell <mark@codesourcery.com>
4561 Make DECL_CONTEXT mean the class in which a member function was
4562 declared, even for a virtual function.
4563 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
4564 (DECL_FRIEND_CONTEXT): New macro.
4565 (DECL_REAL_CONTEXT): Remove.
4566 (SET_DECL_FRIEND_CONTEXT): Likewise.
4567 (DECL_VIRTUAL_CONTEXT): Adjust.
4568 (DECL_CLASS_SCOPE_P): Use TYPE_P.
4569 (add_friends): Remove.
4570 (hack_decl_function_context): Likewise.
4571 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
4573 (build_over_call): Fix indentation. Use DECL_CONTEXT
4574 instead of DECL_CLASS_CONTEXT.
4575 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
4576 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
4577 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4578 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
4579 (build_base_field): Likewise.
4580 (finish_struct_1): Likewise.
4581 (build_self_reference): Likewise.
4582 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
4584 (pushtag): Use decl_function_context, not
4585 hack_decl_function_context.
4586 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4587 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
4588 (pushdecl): Remove bogus code.
4589 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
4590 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4591 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4592 Use decl_function_context, nothack_decl_function_context.
4593 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
4594 (grokdeclarator): Likewise. Use decl_function_context, not
4595 hack_decl_function_context.
4596 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
4597 (start_function): Use DECL_FRIEND_CONTEXT, not
4598 DECL_CLASS_CONTEXT. Use decl_function_context, not
4599 hack_decl_function_context.
4600 (finish_function): Use decl_function_context, not
4601 hack_decl_function_context.
4602 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
4604 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
4605 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
4606 (grokfield): Likewise.
4607 (finish_builtin_type): Likewise.
4608 (finish_vtable_vardec): Use decl_function_context, not
4609 hack_decl_function_context.
4610 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4611 (start_static_initialization_or_destruction): Likewise.
4612 (finish_static_initialization_or_destruction): Likewise.
4613 (mark_used): Adjust logic for deciding when to synthesize methods.
4614 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
4616 * error.c (dump_function_decl): Use DECL_CONTEXT, not
4618 * friend.c (is_friend): Likewise.
4619 (add_friends): Remove.
4620 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
4621 * lex.c (begin_definition_of_inclass_inline): Use
4622 decl_function_context, not hack_decl_function_context.
4623 (process_next_inline): Likewise.
4624 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4625 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
4626 DECL_CLASSS_CONTEXT.
4627 (hack_identifier): Likewise.
4628 (synthesize_method): Use decl_function_context, not
4629 hack_decl_function_context.
4630 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
4632 (is_member_template): Use decl_function_context, not
4633 hack_decl_function_context. Use DECL_CONTEXT, not
4635 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
4637 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
4639 (push_template_decl_real): Likewise.
4640 (instantiate_class_template): Don't call add_friends.
4641 (tsubst_default_argument): Use DECL_CONTEXT, not
4643 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
4644 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4645 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
4647 * repo.c (repo_inline_used): Likewise.
4648 * search.c (current_scope): Adjust for new _CONTEXT macros.
4649 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
4651 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4652 (lookup_fnfields_here):Likewise.
4653 (check_final_overrider): Likewise.
4654 (init_vbase_pointers): Likewise.
4655 (virtual_context): Likewise.
4656 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
4657 (expand_body): Use decl_function_context, not
4658 hack_decl_function_context.
4659 * tree.c (hack_decl_function_context): Remove.
4660 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
4662 * typeck2.c (error_not_base_type): Likewise.
4664 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
4666 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
4668 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4670 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
4672 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
4674 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
4676 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
4678 * decl2.c (lang_decode_option): Enable automatic line wrapping.
4680 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
4682 * parse.y (frob_specs): Split out...
4683 (parse_decl): From here.
4684 (fn.def2): Call initial_deferred_type_access_control.
4685 (after_type_component_declarator0): Call frob_specs.
4686 (notype_component_declarator0): Likewise.
4687 * search.c (friend_accessible_p): Nested classes are friends of their
4690 2000-02-10 Mark Mitchell <mark@codesourcery.com>
4692 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
4693 used to create an implicit temporary.
4695 * class.c (dfs_modify_vtables): Tweak calculation of functions to
4698 2000-02-08 Nathan Sidwell <nathan@acm.org>
4700 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
4701 strip array element qualifiers too.
4703 2000-02-07 Mark Mitchell <mark@codesourcery.com>
4705 * decl.c (store_parm_decls): Don't build cleanups for parameters
4706 while processing_template_decl.
4708 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
4710 * cp-tree.h (struct saved_scope): Add incomplete field.
4711 (namespace_scope_incomplete): New macro.
4712 * decl.c (pushdecl): Use it.
4713 (hack_incomplete_structures): Use it. See through artificial
4715 (mark_saved_scope): Mark it.
4717 Implement access control for nested types.
4718 * search.c (type_access_control): New fn.
4719 (accessible_p): Now we do perform access control for types.
4720 * semantics.c (deferred_type_access_control): New fn.
4721 (initial_deferred_type_access_control): New fn.
4722 (begin_function_definition): Call it. Add lookups parm.
4723 * decl.c (struct binding_level): Add this_class field.
4724 (pushlevel_class): Set it.
4725 (mark_binding_level): Mark it.
4726 (lookup_name_real): Use it. Call type_access_control.
4727 (mark_saved_scope): Mark lookups field.
4728 * cp-tree.h (flagged_type_tree): Add lookups field.
4729 (struct saved_scope): Add lookups field.
4730 (type_lookups): New macro.
4731 * parse.y (declmods): Now <ftype>.
4732 (parse_decl): Add lookups parm. Call
4733 initial_deferred_type_access_control.
4734 (lang_extdef): Clear type_lookups.
4735 (typed_declspecs, declmods, typespec): Set lookups field.
4736 (initdcl): Call deferred_type_access_control.
4737 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
4738 component_decl_1, named_parm): Adjust.
4739 * friend.c (is_friend): Nested classes are friends of their
4742 * class.c (currently_open_derived_class): New fn.
4743 * method.c (hack_identifier): Use it.
4745 * lex.c (do_identifier): Remove obsolete code.
4747 * parse.y (typed_typespecs): Propagate new_type_flag properly.
4749 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
4751 * tinfo.h: Remove apostrophes from C++ comment (xgettext
4752 thinks this file is plain C).
4754 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4756 * Makefile.in (call.o): Depend on $(EXPR_H).
4758 * call.c: Include "expr.h".
4760 * class.c (dump_class_hierarchy): Add prototype.
4762 * search.c (dfs_get_pure_virtuals): Likewise.
4764 2000-02-1 Ulrich Drepper <drepper@redhat.com>
4766 * parse.y (simple_stmt): Allow :: token in asm parameter list.
4769 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
4771 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
4772 Store it in DECL_FCONTEXT.
4773 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
4775 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
4777 * tinfo.h (old abi): #include "tconfig.h".
4778 * tinfo.cc (convert_to_base): Move into old abi section.
4780 2000-01-31 Mark Mitchell <mark@codesourcery.com>
4782 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
4783 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
4784 (BINFO_PRIMARY_BINFO): New macro.
4785 (BF_DELTA): Rename to ...
4786 (BV_DELTA): ... this.
4787 (BF_VCALL_INDEX): Rename to ...
4788 (BV_VCALL_INDEX): ... this.
4789 (BF_FN): Rename to ...
4791 * class.c (build_vbase_path): Adjust for changes to reverse_path.
4792 (set_rtti_entry): Rename BF_ macros to BV_ variants.
4793 (modify_vtable_entry): Simplify.
4794 (add_virtual_function): Rename BF_ macros to BV_ variants.
4795 (build_vtable_initializer): Likewise.
4796 (get_class_offset_1): Remove.
4797 (dfs_get_class_offset): Likewise.
4798 (get_class_offset): Likewise.
4799 (dfs_find_final_overrider): New function.
4800 (find_final_overrider): Likewise.
4801 (modify_one_vtable): Remove.
4802 (dfs_find_base): New function.
4803 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
4804 find_final_overrider.
4805 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
4807 (dfs_fixup_vtable_deltas): Remove.
4808 (override_one_vtable): Remove.
4809 (merge_overrides): Likewise.
4810 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
4811 unreal chilren of virtual bases.
4812 (finish_struct_1): Don't use merge_overrides. Don't use
4813 dfs_fixup_vtable_deltas.
4814 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
4817 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
4818 Jason Merrill <jason@yorick.cygnus.com>
4820 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
4822 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
4824 * exception.cc (__throw_bad_typeid): Add missing std::.
4826 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4828 * cp-tree.h (make_thunk): PROTO -> PARAMS.
4830 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
4832 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
4834 Runtime support for new-abi rtti.
4835 * inc/typeinfo (type_info::operator!=): Define in class.
4836 (type_info::before, type_info::name, type_info::operator==,
4837 type_info::operator!=): Define new ABI implementations.
4838 (type_info::is_pointer_p, type_info::is_function_p): Declare
4839 new virtual functions.
4840 (type_info::do_catch, type_info::do_upcast): Likewise.
4842 * tinfo.h (__base_class_info): Define new class.
4843 (__class_type_info): Likewise.
4844 (__si_class_type_info): Likewise.
4845 (__vmi_class_type_info): Likewise.
4846 (__dynamic_cast): Prototype.
4848 * tinfo.cc: Conditionalize old and new rtti mechanisms.
4849 (type_info::is_pointer_p): Define new function.
4850 (type_info::is_function_p): Likewise.
4851 (type_info::do_catch): Likewise.
4852 (type_info::do_upcast): Likewise.
4853 (vtable_prefix): New structure for vtable access.
4854 (adjust_pointer): Define new template function.
4855 (contained_p, public_p, virtual_p, contained_public_p,
4856 contained_nonpublic_p, contained_nonvirtual_p): Define new
4858 (nonvirtual_base_type): New local variable.
4859 (__class_type_info::~__class_type_info): Define.
4860 (__si_class_type_info::~__si_class_type_info): Likewise.
4861 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
4862 (__class_type_info::do_catch): Define new function.
4863 (__class_type_info::do_upcast): Likewise.
4864 (__class_type_info::find_public_src): Likewise.
4865 (__class_type_info::do_find_public_src): Likewise.
4866 (__si_class_type_info::do_find_public_src): Likewise.
4867 (__vmi_class_type_info::do_find_public_src): Likewise.
4868 (__class_type_info::do_dyncast): Likewise.
4869 (__si_class_type_info::do_dyncast): Likewise.
4870 (__vmi_class_type_info::do_dyncast): Likewise.
4871 (__class_type_info::do_upcast): Likewise.
4872 (__si_class_type_info::do_upcast): Likewise.
4873 (__vmi_class_type_info::do_upcast): Likewise.
4874 (__dynamic_cast): Likewise.
4876 * tinfo2.cc (__fundamental_type_info): Define new class.
4877 (__pointer_type_info): Likewise.
4878 (__reference_type_info): Likewise.
4879 (__array_type_info): Likewise.
4880 (__function_type_info): Likewise.
4881 (__enum_type_info): Likewise.
4882 (__ptr_to_member_type_info): Likewise.
4883 (__fundamental_type_info::~__fundamental_type_info): Define.
4884 (__pointer_type_info::~__pointer_type_info): Likewise.
4885 (__reference_type_info::~__reference_type_info): Likewise.
4886 (__array_type_info::~__array_type_info): Likewise.
4887 (__function_type_info::~__function_type_info): Likewise.
4888 (__enum_type_info::~__enum_type_info): Likewise.
4889 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
4890 (__pointer_type_info::do_catch): Define new function.
4891 (__ptr_to_member_type_info::do_catch): Define new function.
4893 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
4894 (__is_pointer): Likewise.
4896 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
4898 2000-01-30 Mark Mitchell <mark@codesourcery.com>
4900 * cp/class.c (build_vtable): Rename to build_primary_vtable.
4901 (prepare_fresh_vtable): Rename to build_secondary_vtable.
4902 (make_new_vtable): New function.
4903 (modify_vtable_entry): Handle generation of new vtables correctly.
4904 (modify_one_vtable): Remove unused parameter.
4905 (dfs_fixup_vtable_deltas): Likewise.
4906 (override_one_vtable): Use build_secondary_vtable.
4907 (finish_struct_1): Use build_primary_vtable and
4908 build_secondary_vtable.
4910 2000-01-28 Ulrich Drepper <drepper@redhat.com>
4912 * cp/decl.c: Adjust variable names, comments, help strings.
4914 2000-01-29 Nathan Sidwell <nathan@acm.org>
4916 * new2.cc (operator delete[]): Use operator delete, don't assume
4919 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
4921 * class.c (build_vtbl_initializer): Add argument to
4922 build_vtable_entry call.
4924 2000-01-27 Mark Mitchell <mark@codesourcery.com>
4926 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
4927 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
4928 (BF_DELTA): New macro.
4929 (BF_VCALL_INDEX): Likewise.
4931 (THUNK_VCALL_OFFSET): Likewise.
4932 (make_thunk): Change prototype.
4933 * class.c (build_vtable_entry): Integrate
4934 build_vtable_entry_for_fn. Handle vcall indices.
4935 (build_vtable_entry_for_fn): Remove.
4936 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
4937 BF_VCALL_INDEX, BF_FN.
4938 (modify_vtable_entry): Integrate common code from
4939 modify_one_vtable and dfs_fixup_vtable_deltas.
4940 (add_virtual_function): Set BF_VCALL_INDEX.
4941 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
4943 (modify_one_vtable): Simplify.
4944 (dfs_fixup_vtable_deltas): Likewise.
4945 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
4946 * method.c (make_thunk): Handle vcall indices.
4948 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
4950 Compiler side new abi rtti (not enabled).
4951 * cp-tree.h (new_abi_rtti_p): New macro.
4952 (emit_support_tinfos): Prototype new function.
4953 (tinfo_decl_p): Likewise.
4954 (emit_tinfo_decl): Likwise.
4955 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
4957 (doing_runtime): New local static.
4958 (init_rtti_processing): Add new-abi initializer.
4959 (get_tinfo_decl): Add new-abi logic.
4960 (tinfo_from_decl): Likewise.
4961 (build_dynamic_cast_1): Likewise.
4962 (qualifier_flags): New static function.
4963 (tinfo_base_init): Likewise.
4964 (generic_initializer): Likewise.
4965 (ptr_ref_initializer): Likewise.
4966 (ptmd_initializer): Likewise.
4967 (class_hint_flags): Likewise.
4968 (class_initializer): Likewise.
4969 (synthesize_tinfo_var): Likewise.
4970 (create_real_tinfo_var): Likewise.
4971 (create_pseudo_type_info): Likewise.
4972 (get_vmi_pseudo_type_info): Likewise.
4973 (create_tinfo_types): Likewise.
4974 (emit_support_tinfos): New global function.
4975 (tinfo_decl_p): New global predicate.
4976 (emit_tinfo_decl): New global function.
4977 * class.c (set_rtti_entry): Generalize for old and new rtti.
4978 (build_vtbl_initializer): Likewise.
4979 * decl2.c (finish_file): Likewise.
4981 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
4983 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
4984 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
4986 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
4988 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
4991 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
4993 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
4995 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
4997 * optimize.c (calls_setjmp_r): Supply new argument
4998 to special_function_p.
5000 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5002 * call.c: PROTO -> PARAMS.
5003 * class.c: Likewise.
5004 * cp-tree.h: Likewise.
5008 * decl2.c: Likewise.
5010 * errfn.c: Likewise.
5011 * error.c: Likewise.
5012 * except.c: Likewise.
5015 * input.c: Likewise.
5018 * method.c: Likewise.
5019 * optimize.c: Likewise.
5020 * parse.y: Likewise.
5024 * search.c: Likewise.
5025 * semantics.c: Likewise.
5028 * typeck.c: Likewise.
5029 * typeck2.c: Likewise.
5032 2000-01-25 Richard Henderson <rth@cygnus.com>
5034 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
5036 2000-01-25 Mark Mitchell <mark@codesourcery.com>
5038 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
5039 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
5040 (struct vcall_offset_data_s): New type.
5041 (dfs_vcall_offset_queue_p): New function.
5042 (dfs_build_vcall_offset_vtbl_entries): Likewise.
5043 (build_vcall_offset_vtbl_entries): Likewise.
5044 (layout_vtable_decl): Likewise.
5045 (num_vfun_entries): Likewise.
5046 (num_extra_vtbl_entries): Add the entries for vcall offsets.
5047 (build_vtbl_initializer): Likewise.
5048 (dfs_finish_vtabls): Use layout_vtable_decl.
5049 (modify_one_vtables): Always duplicate vtables under the new ABI.
5050 (finish_struct_1): Use layout_vtable_decl.
5052 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5054 * decl.c (member_function_or_else): Change third arg from a format
5055 specifier to an `enum overload_flags'. Callers changed.
5057 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
5059 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
5060 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
5061 build_const_cast, get_delta_difference, check_return_expr): Avoid
5062 ANSI string concatenation usage.
5064 2000-01-24 Mark Mitchell <mark@codesourcery.com>
5066 * class.c (layout_class_type): Put the fields required to make a
5067 class non-empty at the end, not the beginning, of the TYPE_FIELDs
5070 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
5072 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
5075 * decl2.c (mark_used): Do instantiate inlines that have been
5076 explicitly instantiated.
5078 2000-01-24 Richard Henderson <rth@cygnus.com>
5080 * call.c (build_over_call): Use expand_tree_builtin.
5081 * typeck.c (build_function_call_real): Likewise.
5082 (build_binary_op_nodefault): Handle unordered compares.
5084 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
5086 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
5087 cp_tree_index values.
5088 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
5089 New global node #defines for them.
5090 * rtti.c (call_void_fn): Replace with ...
5091 (build_runtime_decl): ... new static function.
5092 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
5093 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
5094 (build_dynamic_cast_1): Always produce correctly typed result.
5095 Explicitly produce type_info addresses. Use dynamic_cast_node.
5096 * exception.cc (__throw_bad_cast): Return `void *'.
5097 (__throw_bad_typeid): Return `const type_info &'.
5099 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
5101 * cp-tree.h (get_vtable_decl): Prototype new function.
5102 * class.c (get_vtable_decl): New function. Broken out from ...
5103 (build_vtable): ... here. Use it.
5104 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
5107 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
5109 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
5110 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
5111 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
5112 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
5113 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
5114 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
5115 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
5116 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
5117 (CPTI_TINFO_VAR_ID): New enumeration.
5118 (__tp_desc_type_node, __access_mode_type_node,
5119 __bltn_desc_type_node, __user_desc_type_node,
5120 __class_desc_type_node, __ptr_desc_type_node,
5121 __attr_desc_type_node, __func_desc_type_node,
5122 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
5123 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
5124 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
5125 enum_desc_type_node, class_desc_type_node,
5126 si_class_desc_type_node, vmi_class_desc_type_node,
5127 ptmd_desc_type_node, base_desc_type_node): New #defines.
5128 (tinfo_fn_id, tinfo_fn_type): Rename to ...
5129 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
5130 (tinfo_var_id): New enumeration.
5131 (DECL_TINFO_FN_P): Augment comment.
5132 * decl.c (cp_global_trees): Adjust documentation.
5133 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
5134 tinfo_decl_type and tinfo_var_id.
5135 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
5136 (build_typeid): Remove unused variable.
5137 (get_tinfo_var): Use tinfo_var_id.
5138 (tinfo_name): New static function.
5139 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
5140 (tinfo_from_decl): Likewise.
5141 (get_base_offset): New static function, broken out of
5143 (expand_si_desc): Use tinfo_name.
5144 (expand_class_desc): Likewise. Lose local static variable.
5145 Use base_desc_type_node. Use get_base_offset.
5146 (expand_ptr_desc): Use tinfo_name.
5147 (expand_attr_desc): Likewise.
5148 (expand_generic_desc): Likewise.
5150 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
5151 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
5153 2000-01-23 Mark Mitchell <mark@codesourcery.com>
5155 * cp-tree.h (__eprintf): Remove declaration.
5156 * tree.c (__eprintf): Remove definition.
5158 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
5159 Mark Mitchell <mark@codesourcery.com>
5161 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
5162 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
5164 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
5166 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
5168 2000-01-23 Mark Mitchell <mark@codesourcery.com>
5170 * cp-tree.h (register_dtor_fn): New function.
5171 * decl.c (destroy_local_static): Rename to ...
5172 (register_dtor_fn): ... this. Give it external linkage.
5173 (expand_static_init): Use it.
5174 * decl2.c (do_static_initialization): Likewise, if using
5176 (do_static_destruction): Check that __cxa_atexit is not in use.
5177 (finish_file): Don't call do_static_destruction if using
5180 * typeck.c (convert_arguments): Restore two-message error
5183 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
5185 Remap dynamic cast hint values to be consistent across ABIs.
5186 * search.c (dynamic_cast_base_recurse): Remap generated value.
5187 (get_dynamic_cast_base_type): Adjust documentation.
5188 * tinfo.h (__user_type_info::dyncast): Likewise.
5189 (__user_type_info::find_public_subobj): Remap BOFF meaning.
5190 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
5191 (__class_type_info::do_dyncast): Likewise.
5192 (__class_type_info::do_find_public_subobj): Likewise.
5193 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
5195 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
5197 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
5199 * typeck2.c (incomplete_type_error): Restore previous
5200 cp_error and cp_error_at call sequence.
5202 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
5204 * class.c (dump_class_hierarchy): Make format agree with argument;
5205 cast pointer to unsigned long and print with %lx.
5207 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
5209 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
5211 * typeck.c (composite_pointer_type, common_type,
5212 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
5213 build_function_call_real, convert_arguments,
5214 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
5215 build_unary_op, mark_addressable, build_compound_expr,
5216 build_static_cast, build_reinterpret_cast, build_const_cast,
5217 build_c_cast, build_modify_expr, get_delta_difference,
5218 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
5219 'ISO C++'. Fusion consecutive calls to diagnotic message routines
5221 * typeck2.c (readonly_error, abstract_virtuals_error,
5222 process_init_constructor, check_for_new_type): Likewise.
5224 2000-01-19 Mark Mitchell <mark@codesourcery.com>
5226 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
5229 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
5231 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
5232 (build_x_typeid): Likewise.
5233 (get_tinfo_fn): Likewise.
5234 (get_tinfo_fn_unused): Rename to ...
5235 (get_tinfo_decl): ... here.
5236 * rtti.c (build_headof): Replace logic error with assertion.
5237 (get_tinfo_fn_dynamic): Rename to ...
5238 (get_tinfo_decl_dynamic): ... here. Make static. Use
5239 complete_type_or_else.
5240 (build_x_typeid): Move into ...
5241 (build_typeid): ... here. Adjust call to
5242 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
5243 throw_bad_typeid expression.
5244 (get_tinfo_fn_unused): Rename to ...
5245 (get_tinfo_decl): ... here. Adjust comment.
5246 (get_tinfo_fn): Delete.
5247 (tinfo_from_decl): New static function.
5248 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
5249 (get_typeid): Use complete_type_or_else.
5250 (build_dynamic_cast_1): Adjust calls to
5251 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
5252 * parse.y (primary): Adjust call to build_typeid.
5253 * except.c (build_eh_type_type_ref): Adjust call to
5254 get_tinfo_decl. Mark as used.
5255 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
5256 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
5257 * parse.c: Regenerated.
5259 2000-01-17 Mark Mitchell <mark@codesourcery.com>
5261 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
5263 (resolves_to_fixed_type_p): Document calling convention.
5264 * rtti.c (build_x_typeid): Initialize NONNULL.
5266 * cp-tree.h (build_shared_int_cst): New function.
5267 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
5268 * class.c (modify_vtable_entry): Likewise.
5269 (add_virtual_function): Split out code to generated shared
5270 INTEGER_CSTs to build_share_int_cst.
5271 (modify_all_vtables): Handle all the overridden functions here.
5272 Add overridden functions from non-primary virtual bases to the
5274 (finish_struct_1): Adjust call to modify_all_vtables. Add
5275 overridden functions from non-primary bases to the vtable.
5276 * tree.c (build_shared_int_cst): New function.
5278 * cp-tree.h (scratchalloc): Remove.
5279 (build_scratch_list): Likewise.
5280 * call.c (convert_class_to_reference): Replace build_scratch_list
5281 and build_expr_list with build_tree_list.
5282 (add_candidate): Replace scratchalloc with expralloc. Note memory
5284 (build_user_type_conversion_1): Replace build_scratch_list
5285 and build_expr_list with build_tree_list.
5286 (build_new_op): Likewise.
5287 (build_op_delete_call): Likewise.
5288 (convert_like): Likewise.
5289 * cvt.c (ocp_convert): Likewise.
5290 * decl.c (start_decl): Likewise.
5291 (start_function): Likewise.
5292 (finish_destructor_body): Likewise.
5293 (maybe_build_cleanup_1): Likewise.
5294 * decl2.c (reparse_decl_as_expr): Likewise.
5295 * init.c (perform_member_init): Likewise.
5296 (expand_cleanup_for_base): Likewise.
5297 (build_builtin_delete_call): Likewise.
5298 (build_new_1): Likewise.
5299 (build_delete): Likewise.
5300 * method.c (do_build_assign_ref): Likewise.
5301 * parse.y (already_scoped_stmt): Likewise.
5302 (nontrivial_exprlist): Likewise.
5303 (net_initializer): Likewise.
5304 (initlist): Likewise.
5305 * parse.c: Regenerated.
5306 * rtti.c (build_x_typeid): Likewise.
5307 (build_dynamic_cast_1): Likewise.
5308 * typeck.c (build_x_compound_expr): Likewise.
5309 (build_static_cast): Likewise.
5310 (build_modify_expr): Likewise.
5312 * cp-tree.h (DECL_VINDEX): Add documentation.
5313 * class.c (build_vtable_entry): Likewise.
5314 (start_vtable): Add comment.
5315 (add_virtual_function): Replace pending_hard_virtuals with
5316 overridden_virtuals and pending_virtuals with new_virtuals.
5317 Replace redundant assignments with assertions.
5318 (check_for_override): Add comment.
5319 (check_bases_and_members): Replace pending_hard_virtuals with
5320 overridden_virtuals and pending_virtuals with new_virtuals.
5321 (create_vtbl_ptr): Likewise.
5322 (layout_class_type): Likewise.
5323 (finish_struct_1): Likewise. Add comments.
5325 2000-01-16 Mark Mitchell <mark@codesourcery.com>
5327 * class.c (finish_struct_1): Replace redundant code with
5330 * cp-tree.h (flag_new_abi): Move.
5331 (flag_use_cxa_atexit): Likewise.
5332 (flag_honor_std): Likewise.
5333 (flag_rtti): Likewise.
5334 (vbase_offsets_in_vtable_p): Define.
5335 (vptrs_present_everywhere_p): Likewise.
5336 (TYPE_CONTAINS_VPTR_P): Likewise.
5337 (dfs_walk_real): Declare.
5338 * class.c (build_vbase_pointer_fields): Check
5339 vbase_offsets_in_vtable_p.
5340 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
5342 (build_vbase_offset_vtbl_entries): Simplify.
5343 (build_vbase_offset_vtbl_entries): Adjust.
5344 (build_vbase_pointer): Add ability to look up vbase offsets in
5346 (start_vtable): New function.
5347 (add_virtual_function): Use it.
5348 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
5349 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
5350 (build_vtbl_initializer): Take the type of the complete object as
5351 input. Use it to correctly calculate vbase offsets.
5352 (dfs_finish_vtbls): Pass the complete type to
5353 build_vtbl_initializer.
5354 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
5355 (create_vtable_ptr): Create a vtable even if there are no
5356 new virtual functions, under the new ABI.
5357 (finish_struct_1): Likewise.
5358 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
5359 * decl.c (exapnd_static_init): Remove call to
5360 preserve_initializer.
5361 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
5363 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
5364 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
5365 (construct_virtual_bases): Don't initialize virtual base pointers
5367 (build_aggr_init): Clean up comment.
5368 (expand_aggr_init_1): Likewise.
5369 * rtti.c (expand_class_desc): Store the virtual function table
5370 index where the vbase offset lives in the offset field.
5371 * search.c (dfs_walk_real): Make it global.
5372 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
5373 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
5375 * tinfo.h (USItype): Make it signed under the new ABI.
5376 * tinfo.cc (convert_to_base): New function. Encapsulate base
5377 conversion logic here.
5378 (__class_type_info::do_upcast): Use it.
5379 (__class_type_info::do_dyncast): Likewise.
5380 (__class_type_info::do_find_public_subobj): Likewise.
5382 * init.c (construct_virtual_bases): Don't look up the addresses of
5383 virtual bases at run-time.
5385 * class.c (build_vbase_pointer): Relocate.
5386 (build_vbase_pointer_fields): Likewise.
5387 (dfs_build_vbase_offset_vtbl_entries): Likewise.
5388 (build_vbase_offset_vtbl_entries): Likewise.
5390 * decl.c (init_decl_processing): Complain if -fnew-abi
5391 -fno-vtable-thunks is used.
5393 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
5396 2000-01-15 Mark Mitchell <mark@codesourcery.com>
5398 * cp-tree.h (num_extra_vtbl_entries): New function.
5399 (size_extra_vtbl_entries): Likewise.
5400 (dfs_vtable_path_unmark): Likewise.
5401 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
5402 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
5403 * class.c (num_extra_vtbl_entries): New function.
5404 (size_extra_vtbl_entries): Likewise.
5405 (dfs_build_vbase_offset_vtbl_entries): New function.
5406 (build_vbase_offset_vtbl_entries): Likewise.
5407 (build_vtbl_initializer): Use it.
5408 (finish_struct_1): Adjust vtable sizes (using
5409 num_extra_vtbl_entries).
5410 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
5411 THUNK_DECL is non-NULL before expanding it.
5412 * init.c (expand_virtual_init): Adjust the vtable pointer by
5413 size_extra_vtbl_entries before storing it.
5414 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
5415 Handle TREE_LIST parameters here, not in the dfs_* functions.
5416 (dfs_unmarked_real_bases_queue_p): Adjust.
5417 (dfs_marked_real_bases_queue_p): Likewise.
5418 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
5419 (dfs_vtable_path_marked_real_bases_queue_p): New function.
5420 (dfs_vtable_path_unmark): Likewise.
5422 2000-01-14 Mark Mitchell <mark@codesourcery.com>
5424 * optimize.c (copy_body_r): Clear the operand three of a
5425 TARGET_EXPR when copying it.
5427 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5429 * method.c (build_decl_overload_real): Check whether we are in ::
5430 before returning __builtin_new/delete.
5432 2000-01-13 Mark Mitchell <mark@codesourcery.com>
5434 * pt.c (tsubst_friend_function): Improve comment.
5435 (instantiate_decl): Avoid crashing when a "nested" function is
5436 instantiated from the top level.
5438 * dump.c (dqeueue_and_dump): Dump
5439 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
5441 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5443 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
5445 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
5447 * g++spec.c (lang_specific_driver): Add -fnew-abi if
5448 ENABLE_NEW_GXX_ABI defined.
5449 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
5450 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
5451 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
5453 2000-01-12 Mark Mitchell <mark@codesourcery.com>
5455 * decl.c (start_cleanup_fn): Call pushdecl.
5457 * call.c (convert_class_to_reference): Fix typos.
5458 (build_conditional_expr): Handle errors gracefully.
5459 * class.c (push_nested_class): Likewise.
5460 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
5461 (DECL_THIS_EXTERN): Use it.
5462 (DECL_THIS_STATIC): Likewise.
5463 * cvt.c (convert_to_void): Handle errors gracefully.
5464 (build_expr_type_conversion): Likewise.
5465 * decl.c (maybe_push_decl): Likewise.
5466 (start_decl_1): Likewise.
5467 (require_complete_types_for_parms): Likewise.
5468 * parse.y (structsp): Likewise.
5469 (base_class): Likewise.
5470 * parse.c: Regenerated.
5471 * pt.c (finish_member_template_decl): Likewise.
5472 * typeck.c (decay_conversion): Likewise.
5474 * cp-tree.h (dfs_skip_vbases): New function.
5475 (find_vbase_instance): Likewise.
5476 * class.c (determine_primary_base): Allow a nearly empty base to
5477 serve as a primary base class under the new ABI.
5478 (get_class_offset_1): Rename to ...
5479 (dfs_get_class_offset): ... this. Simplify. Don't issue error
5481 (get_class_offset): Use it. Issue error messages here.
5482 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
5483 find the right copies of virtual bases.
5484 (fixup_vtable_deltas1): Rename to ...
5485 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
5486 bases as primary bases.
5487 (fixup_vtable_deltas): Remove.
5488 (override_one_vtable): Handle virtual bases as primary bases.
5489 (merge_overrides): Likewise.
5490 (finish_struct_1): Likewise.
5491 (dump_class_hierarchy): Dump primary-ness of bases as well.
5492 * search.c (mark_primary_bases): Use a pre-order traversal to
5493 handle primary virtual bases.
5494 (dfs_skip_vbases): New fiunction.
5495 (expand_upcast_fixups): Adjust to handle primary virtual bases.
5496 (fixup_virtual_upcast_offsets): Likewise.
5497 (fixup_all_virtual_upcast_offsets): Likewise.
5498 (dfs_find_vbase_instances): New function.
5499 (find_vbase_instance): Likewise.
5501 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
5503 * lex.c (DIR_SEPARATOR): Delete macro.
5505 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
5507 * decl2.c (lang_decode_option): Handle automatic line wrapping
5510 2000-01-11 Mark Mitchell <mark@codesourcery.com>
5512 * friend.c (do_friend): Don't resolve scopes when processing
5513 template declarations, even if the qualifying scope doesn't
5514 involve template parameters.
5516 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
5518 * class.c (dfs_modify_vtables_queue_p): Remove.
5519 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
5520 and dfs_marked_real_bases_queue_p instead of
5521 dfs_modify_vtables_queue_p.
5523 * class.c (build_vbase_path): Simplify.
5524 (dfs_propagate_binfo_offsets): New function.
5525 (propagate_binfo_offsets): Use it.
5526 (remove_base_field): Simplify.
5527 (dfs_set_offset_for_vbases): Remove.
5528 (dfs_set_offset_for_shared_vbases): New function.
5529 (dfs_set_offset_for_unshared_vbases): Likewise.
5530 (layout_virtual_bases): Use them.
5531 (layout_basetypes): Don't call propagate_binfo_offsets.
5532 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
5535 * class.c (build_base_field): New function, split out from ...
5536 (build_base_fields): ... here. Use it. Allocate primary bases
5537 first, under the new ABI.
5538 (get_vtable_entry): Remove.
5539 (remove_base_field): New function, split out from ...
5540 (remove_base_fields): ... here. Adjust since primary bases come
5541 first under the new ABI.
5543 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
5544 (initialize_vtbl_ptrs): New function.
5545 (expand_indirect_vtbls_init): Change prototype.
5546 (convert_pointer_to_vbase): Declare.
5547 * init.c (expand_direct_vtbls_init): Remove.
5548 (dfs_initialize_vtbl_ptrs): New function.
5549 (initialize_vtbl_ptrs): Likewise.
5550 (emit_base_init): Use initialize_vtbl_ptrs.
5551 * search.c (convert_pointer_to_vbase): Make it global.
5552 (expand_indirect_vtbls_init): Remove vtable initialization code.
5553 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
5555 * class.c (dfs_finish_vtbls): New function.
5556 (finish_vtbls): Use it.
5557 (dump_class_hierarchy): New function.
5559 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
5560 (BINFO_VBASE_PRIMARY_P): New macro.
5561 (BINFO_VIRTUALS): Add to documentation.
5562 (SET_BINFO_PRIMARY_MARKED_P): Remove.
5563 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5564 (dfs_mark_primary_bases_queue_p): Likewise.
5565 (dfs_unmarked_real_bases_queue_p): New function.
5566 (dfs_marked_real_bases_queue_p): Likewise.
5567 * search.c (dfs_mark_primary_bases): Adjust.
5568 (mark_primary_bases): Likewise.
5569 (get_shared_vbase_if_not_primary): New function.
5570 (dfs_unmarked_real_bases_queue_p): Likewise.
5571 (dfs_marked_real_bases_queue_p): Likewise.
5572 (dfs_get_pure_virtuals): Simplify.
5573 (get_pure_virtuals): Likewise.
5575 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5577 * lex.c: Include tm_p.h.
5579 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
5581 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
5583 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
5585 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
5586 * pt.c (instantiate_decl): Defer comdat templates that might not be
5589 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
5590 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
5591 (finish_file): Likewise.
5593 * decl2.c (import_export_class): Undo 12/14 change.
5595 * error.c (dump_decl): operator new, not operatornew.
5597 * class.c (field_decl_cmp): A nontype is "greater" than a type.
5598 * search.c (lookup_field_1): Look for the last field with the
5601 2000-01-05 Nathan Sidwell <nathan@acm.org>
5603 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
5606 2000-01-05 Nathan Sidwell <nathan@acm.org>
5608 * typeck.c (build_static_cast): Don't strip target qualifiers
5609 when casting from a class.
5611 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5613 * class.c (warn_hidden): Initialize variable `fndecl'.
5615 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
5617 * decl.c (flag_isoc9x): New variable to be able to use code in
5618 c-common.c. For now always zero.
5620 2000-01-03 Mark Mitchell <mark@codesourcery.com>
5622 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
5623 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
5624 or unshare_base_binfos for virtual bases here.
5625 * search.c (dfs_get_vbase_types): Do it here.
5626 (get_vbase_types): Adjust.
5628 2000-01-02 Mark Mitchell <mark@codesourcery.com>
5630 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
5631 (BINFO_PRIMARY_MARKED_P): Use flag 5.
5632 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
5633 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5634 (unmark_primary_bases): Remove declaration.
5635 (unmarkedp): Declare.
5636 (dfs_vbase_unmark): Likewise.
5637 * class.c (determine_primary_base): Return immediately if there
5638 are no base classes. Call mark_primary_bases here.
5639 (modify_all_direct_vtables): Remove.
5640 (modify_all_indirect_vtables): Remove.
5641 (dfs_modify_vtables_queue_p): New function.
5642 (dfs_modify_vtables): New function.
5643 (modify_all_vtables): Use them.
5644 (build_base_fields): Build FIELD_DECLs for primary virtual base
5646 (create_vtable_ptr): Don't call determine_primary_base here.
5647 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
5648 (dfs_set_offset_for_vbases): ... this.
5649 (layout_virtual_bases): Use it.
5650 (layout_class_type): Call determine_primary_base here.
5651 * search.c (unmarkedp): Make it global.
5652 (shared_marked_p): Simplify.
5653 (shared_unmarked_p): Likewise.
5654 (dfs_primary_bases_queue_p): Remove.
5655 (dfs_unmark_primary_bases): Likewise.
5656 (unmark_primary_bases): Likewise.
5657 (mark_primary_bases): Simplify.
5658 (get_pure_virtuals): Don't call mark_primary_bases here.
5659 (dfs_vbase_unmark): New function.
5660 (get_vbase_types): Simplify.
5662 * class.c (struct base_info): Remove.
5663 (determine_primary_base): Take has_virtual_p rather than a
5664 base_info as input. Don't calculate max_has_virtual.
5665 (finish_struct_bits): Remove max_has_virtual argument.
5666 (create_vtable_ptr): Remove max_has_virtual_p argument.
5667 (layout_virtual_bases): Remove max argument.
5668 (layout_basetypes): Likewise.
5669 (layout_class_type): Remove max_has_virtual_p argument.
5670 (finish_struct_1): Remove max_has_virtual.
5672 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
5673 (layout_basetypes): Remove.
5674 * class.c (propagate_binfo_offsets): Moved here from tree.c.
5675 Update to handle primary virtual bases.
5676 (remove_base_fields): New function, split out from
5678 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
5679 (layout_virtual_bases): New function, split out from
5680 layout_basetypes. Update to handle primary virtual bases.
5681 (layout_basetypes): Moved here from tree.c. Use
5682 remove_base_fields and layout_virtual_bases.
5683 * search.c (dfs_mark_primary_bases_queue_p): New function.
5684 (mark_primary_bases): Use it.
5685 * tree.c (CEIL): Remove.
5686 (propagate_binfo_offsets): Remove.
5687 (layout_basetypes): Remove.
5689 2000-01-01 Mark Mitchell <mark@codesourcery.com>
5691 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
5692 (BINFO_PRIMARY_MARKED_P): New macro.
5693 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
5694 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5695 (mark_primary_bases): New function.
5696 (unmark_primary_bases): Likewise.
5697 * search.c (get_abstract_virtuals_1): Remove.
5698 (dfs_mark_primary_bases): New function.
5699 (mark_primary_bases): Likewise.
5700 (dfs_unmark_primary_bases): Likewise.
5701 (unmark_primary_bases): Likewise.
5702 (dfs_get_pure_virtuals): Likewise.
5704 2000-01-01 Mark Mitchell <mark@codesourcery.com>
5706 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
5707 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
5708 (modify_one_vtable): Adjust.
5709 (fixup_vtable_deltas1): Likewise.
5710 (override_one_vtable): Likewise.
5711 * search.c (get_abstract_virtuals_1): Likewise.
5712 (get_pure_virtuals): Likewise.
5713 (expand_upcast_fixups): Likewise.
5714 * tree.c (debug_binfo): Likewise.
5716 * class.c (build_vtable): Don't return a value. Don't rebuild
5717 vtables for bases that have already been handled.
5718 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
5719 already been handled.
5720 (modify_one_vtable): Adjust accordingly.
5721 (fixup_vtable_deltas1): Likewise.
5722 (finish_struct_1): Likewise.
5724 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5726 * call.c (build_new_method_call): Also check destructors.