1 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
3 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
5 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
7 * pt.c (lookup_template_class): Remove abort.
8 * tree.c (get_type_decl): Allow error_mark_node.
10 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
12 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
15 2000-09-03 Mark Mitchell <mark@codesourcery.com>
17 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
20 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
22 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
23 union tag mismatch error reporting.
25 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
27 * call.c (build_scoped_method_call): Check it is not a namespace.
29 2000-08-30 Jason Merrill <jason@redhat.com>
31 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
33 * tree.c (bot_manip): Check TREE_CONSTANT rather than
34 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
35 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
37 * decl.c (start_function): Always call make_function_rtl.
39 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
41 * semantics.c (prune_unused_decls): New function.
42 (finish_stmt_tree): Call it via walk_tree.
44 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
46 * class.c (build_secondary_vtable): Constify a char *.
47 * decl.c (init_decl_processing): Initialize function_id_node,
48 pretty_function_id_node, and func_id_node.
49 * input.c (struct input_source): Constify 'str'.
50 (feed_input): Constify first argument.
51 * mangle.c (write_identifier): Constify argument.
52 * pt.c (mangle_class_name_for_template): Constify argument.
54 2000-08-29 Mark Mitchell <mark@codesourcery.com>
56 * typeck.c (mark_addressable): Remove code that pokes around in
59 2000-08-28 Jason Merrill <jason@redhat.com>
61 * lex.c (file_name_nondirectory): Move to toplev.c.
63 * cp-tree.h (LOCAL_CLASS_P): New macro.
64 * class.c (finish_struct_1): Use it.
66 2000-08-27 Alex Samuel <samuel@codesourcery.com>
68 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
69 (write_encoding): Pass another argument to write_name.
70 (write_name): Add ignore_local_scope parameter. Fix handling of
72 (write_nested_name): Use write_unqualified_name.
73 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
74 (write_template_prefix): Use write_unqualified_name.
75 (write_component): Remove.
76 (write_local_name): Add parameter. Use direct local entity to
77 discriminator calculation.
78 (write_class_enum_type): Pass another argument to write_name.
79 (write_template_template_arg): Likewise.
80 (make_guard_variable): Likewise.
82 2000-08-27 Jason Merrill <jason@redhat.com>
84 * decl.c (pushdecl): Matching decls for local externs are found in
85 the current level. Propagate linkage information from previous
88 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
90 * ir.texi (Expressions): Fix typo.
92 2000-08-25 Greg McGary <greg@mcgary.org>
94 * tree.c (init_tree): Use ARRAY_SIZE.
96 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
98 * error.c (cp_tree_printer): Rework.
100 2000-08-25 Mark Mitchell <mark@codesourcery.com>
102 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
104 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
105 (cp-demangle.o): Remove target.
106 (dyn-string.o): Likewise.
108 * decl.c (grokfndecl): Require that `main' return an `int'.
109 * mangle.c (write_encoding): Don't mangle return types for
110 conversion functions.
112 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
114 * error.c (tree_formatting_info): New data type.
115 (tree_being_formatted): New macro.
116 (tree_formatting_flags): Likewise.
117 (put_whitespace): Likewise.
118 (print_tree_identifier): Likewise.
119 (print_identifier): Likewise.
120 (cp_tree_printer, print_function_argument_list, print_declaration,
121 print_expression, print_function_declaration,
122 print_function_parameter, print_type, print_cv_qualifier): New
124 (init_error): Initialize lang_printer.
126 2000-08-24 Jason Merrill <jason@redhat.com>
128 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
129 adjustment necessary.
131 2000-08-24 Greg McGary <greg@mcgary.org>
133 * cp-tree.h (MAIN_NAME_P): Remove macro.
135 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
137 * error.c (print_instantiation_context): Don't forget to flush the
140 2000-08-23 Jason Merrill <jason@redhat.com>
142 * typeck.c (build_ptrmemfunc): Save the input pmf.
144 * method.c (process_modifiers): Use same_type_p.
146 2000-08-23 Mark Mitchell <mark@codesourcery.com>
148 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
149 * mangle.c (write_function_type): Change prototype.
150 (write_encoding): Don't mangle return types for
151 constructors or destructors.
152 (write_type): Adjust call to write_function_type.
153 * pt.c (instantiate_template): Instantiate alternate entry points
154 when instantiating the main function.
156 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
158 * error.c (cp_print_error_function): Don't use embedded '\n' in
161 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
163 * decl.c (init_decl_processing): Remove bogus initialization.
164 * error.c (lang_print_error_function): Restore here.
165 (init_error): Initialize print_error_function.
167 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
169 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
171 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
173 * Makefile.in (error.o): Depends on diagnostic.h
175 * cp-tree.h (problematic_instantiation_changed,
176 record_last_problematic_instantiation, current_instantiation,
177 print_instantiation_context): Declare.
178 (maybe_print_template_context): Remove.
180 * decl.c (init_decl_processing): Set print_error_function to NULL.
181 (lang_print_error_function): Remove, since we're using a new
184 * error.c: #include diagnostic.h
185 (function_category): New function.
186 (cp_diagnostic_starter): Likewise.
187 (cp_diagnostic_finalizer): Likewise.
188 (cp_print_error_function): Likewise.
189 (maybe_print_instantiation_context): Likewise.
190 (print_instantiation_full_context): Likewise.
191 (print_instantiation_partial_context): Likewise.
192 (print_instantiation_context): Define.
193 (init_error): Initialize diagnostic pager and finalizer.
195 * pt.c (problematic_instantiation_changed): Define.
196 (record_last_problematic_instantiation): Likewise.
197 (current_instantiation): Likewise.
198 (maybe_print_template_context): Remove.
199 (print_template_context): Likewise.
200 (current_tinst_level): Make static to reflect Brendan Kehoe's
201 change of 1995-04-13.
202 (push_tinst_level): Call print_instantiation_context.
204 2000-08-21 Nix <nix@esperi.demon.co.uk>
206 * lang-specs.h: Do not process -o or run the assembler if
209 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
211 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
213 * decl2.c (lang_decode_option): Disable gettext attributes for
216 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
218 * lex.c (lang_init_options): Default diagnostic message maximum
219 length to 80, when line-wrapping.
221 2000-08-20 Mark Mitchell <mark@codesourcery.com>
223 * class.c (build_vtbl_initializer): Clear the entire
224 vtbl_init_data. Start keeping track of the functions for which we
225 have created vcall offsets here.
226 (dfs_build_vcall_offset_vtbl_entries): Remove.
227 (build_vcall_offset_vtbl_entries): Reimplement.
228 (add_vcall_offset_vtbl_entries_r): New function.
229 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
230 computing when vcall offsets are necessary.
232 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
234 * decl.c (member_function_or_else): Use cp_error ... %T.
235 (grokdeclarator): Likewise.
236 (start_method): Likewise.
237 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
239 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
241 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
244 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
246 * cp-tree.h (PTRMEM_OK_P): New macro.
247 (itf_ptrmem_ok): New enumeration value.
248 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
249 argument. Diagnose implicit pointer to member.
250 (instantiate_type): Don't diagnose implicit pointer to member
251 here. Pass itf_ptrmem_ok if ok. Adjust calls to
252 resolve_address_of_overloaded_function.
253 * init.c (build_offset_ref): Set PTRMEM_OK_P.
254 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
255 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
256 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
257 (build_unary_op): Deal with single non-static member in
260 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
262 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
264 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
266 * cp-tree.h (enum_name_string): Remove prototype.
267 (report_case_error): Remove prototype.
268 * cp/typeck2.c (enum_name_string): Remove.
269 (report_case_error): Remove.
270 * error.c (dump_expr): Deal with enum values directly.
271 Correctly negate integer constant.
273 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
275 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
276 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
277 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
278 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
279 (__cxa_vec_new): Use __cxa_vec_new2.
280 (__cxa_vec_delete): Use __cxa_vec_delete2.
282 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
284 * vec.cc (__cxa_vec_new): Set "C" linkage.
285 (__cxa_vec_ctor): Likewise.
286 (__cxa_vec_cctor): Likewise.
287 (__cxa_vec_dtor): Likewise.
288 (__cxa_vec_delete): Likewise.
289 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
290 (__cxa_vec_ctor): Likewise.
291 (__cxa_vec_cctor): Likewise.
292 (__cxa_vec_dtor): Likewise.
293 (__cxa_vec_delete): Likewise.
295 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
297 * class.c (instantiate_type): Reinstate local variable
298 deleted in previous change.
300 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
303 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
305 * cp-tree.h (instantiate_type_flags): New enumeration.
306 (instantiate_type): Change parameter.
307 * class.c (instantiate_type): Adjust prototype. Adjust.
308 * call.c (standard_conversion): Adjust instantiate_type call.
309 (reference_binding): Likewise.
310 (build_op_delete_call): Likewise.
311 (convert_like_real): Likewise.
312 * cvt.c (cp_convert_to_pointer): Likewise.
313 (convert_to_reference): Likewise.
314 * pt.c (convert_nontype_argument): Likewise.
315 * typeck.c (build_binary_op): Likewise.
316 (build_ptrmemfunc): Likewise.
317 (convert_for_assignment): Likewise.
319 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
321 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
322 (current_aggr): Define.
323 * decl.c (grokdeclarator): Make sure a friend class is an
324 elaborated type specifier.
325 * parse.y (current_aggr): Remove static definition.
326 (cp_parse_init): Adjust.
327 (structsp): Clear and restore current_aggr.
328 (component_decl_list): Clear current_aggr.
330 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
331 aggregate tag on the typename's context.
333 * pt.c (tsubst_friend_class): Return error_mark_node, if
335 (instantiate_class_template): Ignore error_mark_node friend types.
337 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
339 * cvt.c (warn_ref_binding): New static function, broken out of ...
340 (convert_to_reference): ... here. Use it.
342 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
344 * parse.y (template_arg): Add rule for template qualified with
347 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
349 * decl2.c (add_function): Reorganize.
350 (arg_assoc): Do not consider function template decls.
352 2000-08-11 Jason Merrill <jason@redhat.com>
354 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
357 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
359 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
360 (lookup_nested_tag): Likewise.
362 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
365 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
367 * parse.y (named_complex_class_head_sans_basetype): Remove
370 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
372 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
373 explicit TEMPLATE_ID_EXPR args.
374 (build_expr_from_tree, case CALL_EXPR): Likewise.
376 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
378 * decl.c (check_tag_decl): Diagnose typename's which don't
381 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
383 * init.c (build_aggr_init): Reject bogus array initializers
386 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
388 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
390 * cp/tinfo.cc (__dynamic_cast): Likewise.
391 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
393 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
395 * cvt.c (convert_to_pointer_force): Fix error message when
396 attempting to cast from ambiguous base.
398 2000-08-08 Jason Merrill <jason@redhat.com>
400 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
401 (tsubst_template_arg_vector): Likewise.
403 * decl2.c (build_anon_union_vars): Choose the largest field; don't
404 assume that one will be as large as the union.
406 2000-08-07 Kazu Hirata <kazu@hxi.com>
408 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
409 * decl.c (pop_labels): Likewise.
411 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
413 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
415 (__pointer_to_member_type_info): Likewise.
416 (__base_class_info): Likewise.
417 (__class_type_info): Likewise.
418 (__si_class_type_info): Likewise.
419 (__vmi_class_type_info): Likewise.
420 * tinfo.cc (__si_class_type_info::__do_find_public_src):
421 Changed member names to match specifications.
422 (__vmi_class_type_info::__do_find_public_src): Likewise.
423 (__si_class_type_info::__do_dyncast): Likewise.
424 (__vmi_class_type_info::__do_dyncast): Likewise.
425 (__si_class_type_info::__do_upcast): Likewise.
426 (__vmi_class_type_info::__do_upcast): Likewise.
427 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
428 (__pbase_type_info::__pointer_catch): Likewise.
429 (__pointer_type_info::__pointer_catch): Likewise.
430 (__pointer_to_member_type_info::__pointer_catch): Likewise.
433 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
435 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
436 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
437 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
439 2000-08-04 Mark Mitchell <mark@codesourcery.com>
441 * cp-tree.h (add_method): Change prototype.
442 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
443 Don't double the size of the method vector in the error case.
444 (handle_using_decl): Adjust call to add_method.
445 (add_implicitly_declared_members): Likewise.
446 (clone_function_decl): Likewise.
447 * decl2.c (check_classfn): Likewise.
448 * semantics.c (finish_member_declaration): Likewise.
450 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
452 * decl.c (flag_isoc94): New variable.
454 2000-08-02 Jason Merrill <jason@redhat.com>
456 * pt.c (do_type_instantiation): Add complain parm; don't complain
457 if called recursively.
458 * cp-tree.h, parse.y: Adjust.
460 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
462 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
463 -Wno-strict-prototypes.
465 * g++spec.c: Adjust type of second argument to
466 lang_specific_driver, and update code as necessary.
468 * cp-tree.h: Don't prototype min_precision here.
469 (my_friendly_assert): Cast expression to void.
470 * semantics.c (do_poplevel): Initialize scope_stmts.
472 2000-08-02 Mark Mitchell <mark@codesourcery.com>
474 * cp-tree.h (DECL_NEEDED_P): Tweak.
476 2000-07-28 Jason Merrill <jason@redhat.com>
478 * lang-specs.h: Use %i in rule for .ii files.
480 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
482 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
484 2000-07-30 Mark Mitchell <mark@codesourcery.com>
486 Allow indirect primary bases.
487 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
489 (CLASSTYPE_VFIELD_PARENT): Remove.
490 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
491 (BINFO_PRIMARY_BINFO): Remove.
492 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
493 (BINFO_VBASE_PRIMARY_P): Likewise.
494 (BINFO_PRIMARY_BASE_OF): New macro.
495 (BINFO_INDIRECT_PRIMARY_P): Likewise.
496 (get_primary_binfo): New function.
497 * decl.c (lang_mark_tree): Make lang_type::primary_base.
498 * class.c (vcall_offset_data_s): Rename to ...
499 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
501 (get_derived_offset): Use get_primary_binfo.
502 (dfs_mark_primary_bases): Adjust handling of virtual primary
504 (mark_primary_bases): Likewise.
505 (set_primary_base): Take a binfo, not an integer, as a
506 representation of the primary base.
507 (indirect_primary_base_p): Remove.
508 (determine_primary_base): Adjust for indirect primary bases.
509 (dfs_find_final_overrider): Fix typo in coment.
510 (update_vtable_entry_for_fn): Use get_primary_binfo.
511 (layout_nonempty_base_or_field): Tweak.
512 (build_base_fields): Adjust for new primary base semantics.
513 (dfs_propagate_binfo_offsets): Remove.
514 (propagate_binfo_offsets): Rewrite.
515 (dfs_set_offset_for_shared_vbases): Remove.
516 (layout_virtual_bases): Don't use it.
517 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
519 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
520 CLASSTYPE_VFIELD_PARENT.
521 (dfs_get_primary_binfo): New function.
522 (get_primary_binfo): Likewise.
523 (dump_class_hierarchy_r): Tweak printing of primary bases.
524 (build_vtbl_initializer): Fix typo in comments. Use
526 (build_vcall_and_vbase_vtbl_entries): Likewise.
527 (build_vbaes_offset_vtbl_entries): Likewise.
528 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
529 BV_VCALL_INDEX to handle indirect primary bases.
530 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
531 (build_rtti_vtbl_entries): Likewise.
532 * search.c (get_shared_vbase_if_not_primary): Tweak.
533 (find_vbase_instance): Likewise.
534 (binfo_for_vtable): Simplify.
535 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
536 (make_binfo): Make it have 11 entries.
538 2000-07-30 Alex Samuel <samuel@codesourcery.com>
540 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
541 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
542 ascertaining primaryness.
543 (G): Remove template_args.
544 (decl_is_template_id): New function.
545 (write_encoding): Use decl_is_template_id.
546 (write_name): Likewise. Handle type_decls. Get main variant of
548 (write_nested_name): Likewise.
549 (write_prefix): Likewise.
550 (write_template_prefix): Likewise.
551 (write_special_name_constructor): Remove defunct production from
553 (write_bare_function_type): Remove comment about absent parameter.
554 (write_template_template_arg): Add missing grammar production to
557 2000-07-27 Jason Merrill <jason@redhat.com>
559 * decl.c (duplicate_decls): If common_type produces a non-typedef
560 type for a typedef, just use the old type.
562 2000-07-27 Mark Mitchell <mark@codesourcery.com>
564 * cp-tree.h (function_depth): Declare.
565 (verify_stmt_tree): Likewise.
566 (find_tree): Likewise.
567 * decl.c (function_depth): Give it external linkage.
568 * optimize.c (optimize_function): Increment and decrement it.
569 * tree.c (verify_stmt_tree_r): New function.
570 (verify_stmt_tree): Likewise.
571 (find_tree_r): Likewise.
572 (find_tree): Likewise.
574 2000-07-27 Jason Merrill <jason@redhat.com>
576 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
578 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
580 2000-07-26 Mark Mitchell <mark@codesourcery.com>
582 * decl.c (start_cleanup_fn): Mark the function as `inline'.
583 * decl2.c (get_guard): Call cp_finish_decl, not
584 rest_of_decl_compilation, for local guards.
585 * lex.c (do_identifier): Remove unused variable.
587 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
589 * parse.y: Add missing ';'.
591 2000-07-26 Mark Mitchell <mark@codesourcery.com>
593 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
596 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
598 Kill strict_prototype. Backwards compatibility only for
599 non NO_IMPLICIT_EXTERN_C systems.
600 * cp-tree.h (flag_strict_prototype): Remove.
601 (strict_prototype): Remove.
602 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
603 * decl.c (maybe_push_to_top_level): Adjust.
604 (pop_from_top_level): Adjust.
605 (decls_match): Only allow sloppy parm matching for ancient
607 (init_decl_processing): Adjust.
608 (grokdeclarator): Adjust.
609 * decl2.c (flag_strict_prototype): Remove.
610 (strict_prototype): Remove.
611 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
612 (lang_f_options): Remove "strict-prototype".
613 (unsupported-options): Add "strict-prototype".
614 * lex.c (do_identifier): Adjust.
615 (do_scoped_id): Adjust.
616 * parse.y (empty_parms): Adjust.
617 * class.c (push_lang_context): Adjust.
618 (pop_lang_context): Adjust.
619 * typeck.c (comp_target_parms): Adjust.
621 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
623 * decl.c (poplevel): Deal with anonymous variables at for scope.
624 (maybe_inject_for_scope_var): Likewise.
626 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
628 * decl.c: Remove all signal handling code, now done in toplev.c.
630 2000-07-23 Mark Mitchell <mark@codesourcery.com>
632 * decl.c (make_rtl_for_nonlocal_decl): Rework.
634 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
637 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
639 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
640 Define my_friendly_assert and my_friendly_abort as macros
641 which may call friendly_abort. Prototype friendly abort, not
642 my_friendly_abort or my_friendly_assert.
643 * decl.c (signal_catch): Report the signal caught in the error
644 message. Call fatal directly.
645 * typeck2.c (ack, my_friendly_assert): Delete.
646 (my_friendly_abort): Rename to friendly_abort. Expect file,
647 line, and function parameters. Report the abort code, then
648 call fancy_abort. Do not mask an abort if errors have
651 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
653 * typeck.c (comp_target_parms): Remove obsolete parameter.
654 (comp_target_types): Adjust.
656 2000-07-17 Jason Merrill <jason@redhat.com>
658 * typeck.c (mark_addressable): Never set TREE_USED.
659 * call.c (build_call): Don't abort on calls to library functions
660 that have been declared normally.
662 * typeck.c (build_binary_op): Fix grammar in warning.
664 * exception.cc (__eh_free): Fix prototype.
666 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
668 * decl.c (pushdecl): Handle seeing an OVERLOAD in
669 IDENTIFIER_NAMESPACE_VALUE.
671 2000-07-16 Mark Mitchell <mark@codesourcery.com>
673 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
674 * method.c (use_thunk): Correct handling of vcall offsets.
676 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
678 * .cvsignore: parse.h and parse.c have no cp- prefix.
680 2000-07-13 Mark Mitchell <mark@codesourcery.com>
682 * .cvsignore: New file.
684 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
686 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
688 2000-07-12 Mark Mitchell <mark@codesourcery.com>
690 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
694 2000-07-11 Mark Mitchell <mark@codesourcery.com>
696 * class.c (layout_class_type): Add pointers to virtual bases after
697 base classes under the old ABI.
699 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
701 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
702 (finish_continue_stmt): Likewise.
703 (begin_for_stmt): Remove call to note_level_for_for.
704 (finish_goto_stmt): Change call from build_min_nt
706 (finish_expr_stmt): Likewise.
707 (begin_if_stmt): Likewise.
708 (begin_while_stmt): Likewise.
709 (finish_while_stmt): Likewise.
710 (finish_return_stmt): Likewise.
711 (begin_for_stmt): Likewise.
712 (finish_for_stmt): Likewise.
713 (finish_break_stmt): Likewise.
714 (begin_switch_stmt): Likewise.
715 (finish_case_label): Likewise.
716 (genrtl_try_block): Likewise.
717 (begin_try_block): Likewise.
718 (begin_handler): Likewise.
719 (begin_compound_stmt): Likewise.
720 (finish_asm_stmt): Likewise.
721 (finish_label_stmt): Likewise.
722 (add_decl_stmt): Likewise.
723 (finish_subobject): Likewise.
724 (finish_decl_cleanup): Likewise.
725 (finish_named_return_value): Likewise.
726 (setup_vtbl_ptr): Likewise.
727 (add_scope_stmt): Likewise.
728 * decl.c (finish_constructor_body): Likewise.
729 (finish_destructor_body): Likewise.
730 * optimize.c (copy_body_r): Likewise.
731 (initialize_inlined_parameters): Likewise.
732 (declare_return_variable): Likewise.
733 (expand_call_inline): Likewise.
735 2000-07-10 Jakub Jelinek <jakub@redhat.com>
737 * semantics.c (expand_body): Sync interface information
738 at the end of function body expansion.
740 2000-07-09 Jason Merrill <jason@redhat.com>
742 * init.c (build_new_1): Bail early if the call to new fails.
744 * decl.c (compute_array_index_type): Check specifically for
745 an INTEGER_CST, not just TREE_CONSTANT.
747 * decl.c (duplicate_decls): Don't call duplicate_decls on
748 the DECL_TEMPLATE_RESULT.
749 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
752 * error.c (dump_template_bindings): Don't crash if we had an
753 invalid argument list.
755 * typeck.c (c_expand_start_case): Do narrowing here.
756 * semantics.c (finish_switch_cond): Not here.
758 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
760 * parse.y (asm_clobbers): Do string concatenation.
762 2000-07-09 Mark Mitchell <mark@codesourcery.com>
764 * decl.c (pushtag): Don't put local classes in template functions
765 on the local_classes list.
767 2000-07-04 Scott Snyder <snyder@fnal.gov>
769 * decl2.c (get_guard): Add missing return for old ABI local
772 2000-07-09 Mark Mitchell <mark@codesourcery.com>
774 * cp-tree.h (char_type_p): New function.
775 * decl.c (init_decl_processing): Don't initialize
776 signed_wchar_type_node or unsigned_wchar_type_node.
777 (complete_array_type): Handle brace-enclosed string-constants.
778 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
779 * tree.c (char_type_p): New function.
780 * typeck2.c (digest_init): Use char_type_p.
782 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
784 * pt.c (tsubst): Don't layout type, if it's error_mark.
786 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
788 * pt.c (instantiate_pending_templates): Reset template level.
790 2000-07-05 Jason Merrill <jason@redhat.com>
792 * call.c (joust): Don't complain about `operator char *()' beating
793 `operator const char *() const'.
795 2000-07-04 scott snyder <snyder@fnal.gov>
796 Jason Merrill <jason@redhat.com>
798 * repo.c (repo_get_id): Handle the case where a class with virtual
799 bases has a null TYPE_BINFO_VTABLE.
801 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
802 Jason Merrill <jason@redhat.com>
804 * parse.y (member_init): Just pass in the type.
805 * init.c (expand_member_init): Handle getting a type.
807 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
808 Jason Merrill <jason@redhat.com>
810 * decl.c (finish_function): Warn if a function has no return
812 Suggested by Andrew Koenig.
813 * typeck.c (check_return_expr): Do set current_function_returns_value
814 if we got an error_mark_node.
816 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
818 * decl2.c (push_decl_namespace): Push the original namespace.
820 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
822 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
823 * semantics.c (begin_class_definition): Clear it.
825 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
827 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
828 (genrtl_expr_stmt): Likewise.
829 (genrtl_decl_stmt): Likewise.
830 (genrtl_if_stmt): Likewise.
831 (genrtl_while_stmt): Likewise.
832 (genrtl_do_stmt): Likewise.
833 (genrtl_return_stmt): Likewise.
834 (genrtl_for_stmt): Likewise.
835 (genrtl_break_stmt): Likewise.
836 (genrtl_continue_stmt): Likewise.
837 (genrtl_scope_stmt): Likewise.
838 (genrtl_switch_stmt): Likewise.
839 (genrtl_case_label): Likewise.
840 (genrtl_begin_compound_stmt): Likewise.
841 (genrtl_finish_compound_stmt): Likewise.
842 (genrtl_compound_stmt): Likewise.
843 (genrtl_asm_stmt): Likewise.
845 * init.c (begin_init_stmts): Remove call to
846 genrtl_begin_compound_stmt.
847 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
849 * semantics.c (lang_expand_stmt): Changed call to
850 genrtl_compound_stmt to ignore return value.
852 2000-07-02 Mark Mitchell <mark@codesourcery.com>
854 * mangle.c (canonicalize_for_substitution): Return the canonical
857 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
859 * typeck.c (commonparms): Remove obstack manipulations.
861 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
863 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
865 * Makefile.in (OBJS): Added ../c-semantics.o.
868 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
870 (struct stmt_tree): Added comment.
871 (current_function_name_declared): Removed.
872 (stmts_are_full_exprs_p): Likewise.
873 (genrtl_do_pushlevel): Likewise.
874 (genrtl_clear_out_block): Likewise.
875 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
876 (DECL_ANON_UNION_ELEMS): Likewise.
877 (emit_local_var): Likewise.
878 (make_rtl_for_local_static): Likewise.
880 (expand_stmt): Likewise.
881 (genrtl_decl_cleanup): Likewise.
882 (c_expand_asm_operands): Likewise.
883 (c_expand_return): Likewise.
884 (c_expand_start_case): Likewise.
886 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
887 (emit_local_var): Likewise.
888 (initialize_local_var): Change reference to
889 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
890 Change reference to stmts_are_full_exprs_p to
891 current_stmt_tree->stmts_are_full_exprs_p.
892 (push_cp_function_context): Likewise.
894 * expect.c (expand_throw): Change reference to
895 stmts_are_full_exprs_p.
897 * init.c (build_aggr_init): Change reference to
898 stmts_are_full_exprs_p.
899 (build_vec_init): Likewise.
901 * optimize.c (maybe_clone_body): Change reference to
902 current_function_name_declared to
903 cp_function_chain->name_declared.
905 * pt.c (instantiate_decl): Change reference to
906 current_function_name_declared to
907 cp_function_chain->name_declared.
909 * semantics.c (expand_cond): Moved declaration to c-common.h.
910 (genrtl_do_pushlevel): Moved to c-semantics.c.
911 (genrtl_clear_out_block): Likewise.
912 (genrtl_goto_stmt): Likewise.
913 (genrtl_expr_stmt): Likewise.
914 (genrtl_decl_stmt): Likewise.
915 (gerntl_if_stmt): Likewise.
916 (genrtl_while_stmt): Likewise.
917 (genrtl_do_stmt): Likewise.
918 (genrtl_return_stmt): Likewise.
919 (genrtl_for_stmt): Likewise.
920 (genrtl_break_stmt): Likewise.
921 (genrtl_continue_stmt): Likewise.
922 (genrtl_scope_stmt): Likewise.
923 (genrtl_switch_stmt): Likewise.
924 (genrtl_case_label): Likewise.
925 (genrtl_begin_compound_stmt): Likewise.
926 (genrtl_finish_compound_stmt): Likewise.
927 (genrtl_compound_stmt): Likewise.
928 (genrtl_asm_stmt): Likewise.
929 (genrtl_decl_cleanup): Likewise.
930 (expand_cond): Likewise.
931 (expand_stmt): Renamed to ...
932 (lang_expand_stmt): ... this.
933 (lang_expand_expr_stmt): Initialize.
934 (set_current_function_name_declared): Likewise.
935 (stmts_are_full_exprs_p): Likewise.
936 (current_function_name_declared): Likewise.
937 (anon_aggr_type_p): Likewise.
938 (do_poplevel): Change reference to
939 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
940 Change reference to stmts_are_full_exprs_p to
941 current_stmt_tree->stmts_are_full_exprs_p.
942 (add_tree): Likewise.
943 (finish_expr_stmt): Likewise.
944 (prep_stmt): Likewise.
945 (lang_expand_stmt): Likewise.
946 (begin_compound_stmt): Change reference to
947 current_function_name_declared to
948 cp_function_chain->name_declared and call to
949 current_function_name_declared().
950 (setup_vtbl_ptr): Likewise.
951 (genrtl_do_poplevel): Removed.
953 2000-06-30 Jason Merrill <jason@redhat.com>
955 * init.c (init_init_processing): Go back to aligning like
956 double_type_node for old ABI.
957 (get_cookie_size): Make cookie larger if we get a type that needs
959 (build_vec_delete): Call it.
961 * typeck.c (qualify_type_recursive): New fn.
962 (composite_pointer_type): Use it.
963 (build_binary_op): Use composite_pointer_type.
965 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
966 Jason Merrill <jason@redhat.com>
968 * typeck.c (check_return_expr): Don't complain about returning
969 NULL from operator new if -fcheck-new.
970 * cp-tree.h: Declare flag_check_new here.
973 2000-06-28 Alex Samuel <samuel@codesourcery.com>
975 * mangle.c (find_substitution): Use same_type_p.
976 (write_encoding): Don't check for substitutions.
978 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
980 * parse.y (expr_no_comma_rangle): New non-terminal.
981 (template_parm): Use it for default parameter case.
982 (template_arg): Use it.
983 (expr_no_commas): Remove commented out undefined extensions.
984 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
985 * parse.h, parse.c: Rebuilt.
987 2000-06-30 Mark Mitchell <mark@codesourcery.com>
989 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
990 (finish_asm_stmt): Do it here, instead.
992 * cp-tree.h (ridpointers): Don't declare.
993 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
994 (record_builtin_java_type): Likewise.
995 (init_decl_processing): Likewise.
996 * lex.c: Move inclusion of lex.h.
997 (ridpointers): Don't define.
998 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
1000 * lex.h (enum rid): Rename to ...
1001 (enum cp_rid): ... this.
1002 (ridpointers): Don't declare.
1003 * parse.y: Move inclusion of lex.h.
1004 * parse.c: Regenerated.
1005 * spew.c: Move inclusion of lex.h.
1007 * cp-tree.h (struct language_function): Remove temp_name_counter.
1008 (temp_name_counter): Remove.
1009 (get_temp_name): Change prototype.
1010 (get_guard): New function.
1011 (get_guard_cond): Likewise.
1012 (set_guard): Likewise.
1013 * cvt.c (build_up_reference): Adjust call to get_temp_name.
1014 * decl.c (expand_static_init): Use get_guard and friends to
1015 implement guard variables.
1016 * decl2.c (get_temp_name): Assume that the variables created are
1018 (get_sentry): Rename to ...
1019 (get_guard): ... this. Implement new ABI guard variables.
1020 (get_guard_bits): New function.
1021 (get_guard_cond): Likewise.
1022 (set_guard): Likewise.
1023 (start_static_initialization_or_destruction): Use them.
1024 (do_static_initialization): Replace sentry with guard throughout.
1025 (do_static_destruction): Likewise.
1026 * init.c (create_temporary_var): Add comment.
1028 2000-06-28 Alex Samuel <samuel@codesourcery.com>
1030 * mangle.c (find_substitution): Use same_type_p.
1031 (write_encoding): Don't check for substitutions.
1033 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
1035 * parse.y (expr_no_comma_rangle): New non-terminal.
1036 (template_parm): Use it for default parameter case.
1037 (template_arg): Use it.
1038 (expr_no_commas): Remove commented out undefined extensions.
1039 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
1040 * parse.h, parse.c: Rebuilt.
1042 2000-06-29 Mark Mitchell <mark@codesourcery.com>
1044 * cp-tree.h (flag_const_strings): Remove.
1045 (warn_parentheses): Likewise.
1046 (warn_format): Likewise.
1047 (common_type): Likewise.
1048 (default_conversion): Likewise.
1049 (build_binary_op): Likewise.
1050 (cp_build_binary_op): New macro.
1051 * call.c (build_new_op): Use cp_build_binary_op instead of
1053 * class.c (build_vtable_entry_ref): Likewise.
1054 * decl.c (expand_static_init): Likewise.
1055 (compute_array_index_type): Likewise.
1056 (build_enumerator): Likewise.
1057 * decl2.c (delete_sanity): Likewise.
1058 (start_static_initialization_or_destruction): Likewise.
1059 * error.c (dump_type_suffix): Likewise.
1060 * init.c (resolve_offset_ref): Likewise.
1061 (build_new): Likewise.
1062 (build_new_1): Likewise.
1063 (build_vec_delete_1): Likewise.
1064 (build_vec_init): Likewise.
1065 (build_delete): Likewise.
1066 * rtti.c (synthesize_tinfo_fn): Likewise.
1067 (synthesize_tinfo_var): Likewise.
1068 * search.c (expand_upcast_fixups): Likewise.
1069 (fixup_all_virtual_upcast_offsets): Likewise.
1070 * typeck.c (build_array_ref): Likewise.
1071 (get_member_function_from_ptrfunc): Likewise.
1072 (build_binary_op): Add parameter.
1073 (pointer_int_sum): Use cp_build_binary_op.
1074 (pointer_diff): Likewise.
1075 (build_modify_expr): Likewise.
1076 (get_delta_difference): Likewise.
1077 (build_ptrmemfunc): Likewise.
1079 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
1081 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
1082 * decl.c (create_implicit_typedef): Adjust.
1083 * decl2.c (build_artificial_parm): Adjust.
1084 * method.c (implicitly_declare_fn): Adjust.
1085 * pt.c (push_inline_template_parms_recursive): Adjust.
1086 (process_template_parm): Adjust.
1087 (overloaded_template_name): Adjust.
1088 * semantics.c (finish_template_template_parm): Adjust.
1090 2000-06-28 Mark Mitchell <mark@codesourcery.com>
1092 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
1093 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
1094 where to emit thunks.
1095 (build_vtt): Adjust call to build_vtt_inits.
1096 (build_vtt_inits): Add parameter to indicate whether or not
1097 sub-VTTs for virtual bases should be included. Adjust handling of
1098 construction vtables.
1099 (get_matching_base): New function.
1100 (dfs_build_vtt_inits): Rename to ...
1101 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
1102 construction vtables.
1103 (dfs_fixup_binfo_vtbls): Likewise.
1104 (build_ctor_vtbl_groups): Build construction vtables for virtual
1106 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
1107 to build construction vtbls.
1108 (dfs_accumulate_vtbl_inits): Adjust handling of
1109 construction vtables.
1111 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
1114 2000-06-27 Mark Mitchell <mark@codesourcery.com>
1116 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
1118 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
1120 * search.c (hides): Remove.
1121 (is_subobject_of_p): Add most_derived parameter. Use
1123 (lookup_field_queue_p): Adjust.
1124 (lookup_field_r): Adjust.
1126 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
1128 * decl2.c (handle_class_head): Bash typedefs to the type's main
1131 2000-06-25 Mark Mitchell <mark@codesourcery.com>
1133 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
1134 (begin_global_stmt_expr): ... this.
1135 (genrtl_finish_stmt_expr): Rename to ...
1136 (finish_global_stmt_expr): ... this.
1137 * init.c (begin_init_stmts): Adjust calls.
1138 (finish_init_stmts): Likewise.
1139 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
1140 (begin_global_stmt_expr): ... this.
1141 (genrtl_finish_stmt_expr): Rename to ...
1142 (finish_global_stmt_expr): ... this.
1144 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1146 * search.c (lookup_member): Fix typo in comment.
1148 2000-06-24 Jason Merrill <jason@redhat.com>
1150 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
1151 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
1153 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1155 * parse.y (complex_direct_notype_declarator): Support global_scope.
1156 * Makefile.in: Adjust conflict count.
1158 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1160 * parse.y (template_arg): Convert TEMPLATE_DECL
1161 that is a template template paramter to
1162 TEMPLATE_TEMPLATE_PARM here.
1164 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
1165 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
1166 (copy_template_template_parm): Adjust prototype.
1167 * decl.c (grokdeclarator): Remove dead code.
1168 * pt.c (process_template_parm): Tidy.
1169 (lookup_template_class): Construct nodes in
1170 copy_template_template_parm.
1171 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
1172 lookup_template_class. Use TYPE_TI_TEMPLATE.
1173 * tree.c (copy_template_template_parm): Add NEWARGS
1175 (mapcar): Adjust call to copy_template_template_parm.
1176 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
1177 * method.c (build_template_template_parm_names): Change error
1178 code to avoid compilation warning.
1180 * gxxint.texi: Document template template parameter
1183 2000-06-21 Alex Samuel <samuel@codesourcery.com>
1185 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
1186 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
1187 (cp-demangle.o): New rule.
1188 (dyn-string.o): Likewise.
1189 * inc/cxxabi.h (__cxa_demangle): New declaration.
1191 2000-06-22 Mark Mitchell <mark@codesourcery.com>
1193 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
1194 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
1195 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
1197 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
1198 (make_thunk): Change prototype.
1199 (emit_thunk): Rename to use_thunk.
1200 (mangle_thunk): Change prototype.
1201 * class.c (get_derived_offset): Simplify.
1202 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
1203 BV_GENERATE_THUNK_WITH_VTABLE_P.
1204 (build_primary_vtable): Simplify.
1205 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
1206 (dfs_find_base): Remove.
1207 (update_vtable_entry_for_fn): Correct bug in finding the base
1208 where a virtual function was first declared. Figure out whether
1209 or not to emit a vcall-thunk with the vtables in which it appears.
1210 Correct logic for deciding whether to use an ordinary thunk, or a
1212 (finish_struct_1): Remove unnecssary code.
1213 (build_vtbl_initializer): Use ssize_int for the running counter of
1215 (build_vtbl_initializer): Only use vcall thunks where necessary.
1216 Mark thunks as needing to be emitted with their vtables, or not.
1217 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
1218 indices. Use size_binop.
1219 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
1220 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
1222 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
1223 (build_vtable_entry): Mark thunks as needing to be emitted with
1224 their vtables, or not.
1225 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
1226 * decl2.c (mark_vtable_entries): Use use_thunk instead of
1228 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
1230 * error.c (dump_expr): Use BV_FN.
1231 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
1233 * method.c (make_thunk): Likewise.
1234 (emit_thunk): Rename to use_thunk. Allow callers to decide
1235 whether or not to actually emit the thunk. Adjust for changes in
1236 representation of vcall offsets.
1237 * search.c (dfs_get_pure_virtuals): Use BV_FN.
1238 * semantics.c (emit_associated_thunks): New function.
1239 (expand_body): Use it.
1240 * ir.texi: Adjust decriptions of thunks.
1242 2000-06-22 Jason Merrill <jason@redhat.com>
1244 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
1245 (tsubst_friend_function): Copy it here.
1247 * decl.c (grok_op_properties): Fix typo.
1249 * decl2.c (delete_sanity): Clarify warning, avoid failure on
1252 * pt.c (check_explicit_specialization): Clarify error.
1254 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
1255 an old OVERLOAD when we're declaring a non-function.
1256 (pushdecl, destroy_local_var): Check for error_mark_node.
1257 (warn_extern_redeclared_static): Also bail early if
1259 (push_overloaded_decl): Ignore an old error_mark_node.
1261 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
1263 * call.c (build_x_va_arg): Check if in a template decl.
1264 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
1266 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
1268 * class.c (push_lang_context): TYPE_NAME gets you to the Java
1270 * decl.c (check_goto): Computed gotos assumed OK.
1272 2000-06-20 Jason Merrill <jason@redhat.com>
1274 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
1275 for which we don't need to look for instantiations.
1277 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
1279 * parse.y (program): Always call finish_translation_unit.
1280 * parse.c, parse.h: Rebuilt.
1282 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
1284 * method.c: Don't include hard-reg-set.h.
1286 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
1288 * rtti.c (get_base_offset): Cope when vbase field is in a base.
1290 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
1292 * call.c (build_conditional_expr): Use VOID_TYPE_P.
1293 * cvt.c (cp_convert_to_pointer): Likewise.
1294 (convert_to_void): Likewise.
1295 * error.c (dump_expr): Likewise.
1296 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
1297 * init.c (build_delete): Likewise.
1298 * method.c (emit_thunk): Likewise.
1299 * optmize.c (declare_return_variable): Likewise.
1300 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1301 (get_typeid): Likewise.
1302 (build_dynamic_cast_1): Likewise.
1303 * typeck.c (composite_pointer_type): Likewise.
1304 (common_type): Likewise.
1305 (build_indirect_ref): Likewise.
1306 (build_binary_op): Likewise.
1307 (build_x_compound_expr): Likewise.
1308 (check_return_expr): Likewise.
1309 * typeck2.c (add_exception_specifier): Likewise.
1311 * mangle.c (write_method_parms): Use direct comparison for end
1314 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
1316 * cp-tree.h (genrtl_try_block): Declare function.
1317 (genrtl_handler): Likewise.
1318 (genrtl_catch_block): Likewise.
1319 (genrtl_ctor_stmt): Likewise.
1320 (genrtl_subobject): Likewise.
1321 (genrtl_decl_cleanup): Likewise.
1322 (genrtl_do_poplevel): Likewise.
1323 (genrtl_do_pushlevel): Likewise.
1324 (genrtl_clear_out_block): Likewise.
1325 (genrtl_goto_stmt): Likewise.
1326 (genrtl_expr_stmt): Likewise.
1327 (genrtl_decl_stmt): Likewise.
1328 (genrtl_if_stmt): Likewise.
1329 (genrtl_while_stmt): Likewise.
1330 (genrtl_do_stmt): Likewise.
1331 (genrtl_return_stmt): Likewise.
1332 (genrtl_for_stmt): Likewise.
1333 (genrtl_break_stmt): Likewise.
1334 (genrtl_continue_stmt): Likewise.
1335 (genrtl_scope_stmt): Likewise.
1336 (genrtl_switch_stmt): Likewise.
1337 (genrtl_case_label): Likewise.
1338 (genrtl_begin_compound_stmt): Likewise.
1339 (genrtl_finish_compound_stmt): Likewise.
1340 (genrtl_compound_stmt): Likewise.
1341 (genrtl_asm_stmt): Likewise.
1342 (genrtl_named_return_value): Likewise.
1343 (genrtl_begin_stmt_expr): Likewise.
1344 (genrtl_finish_stmt_expr): Likewise.
1345 (finish_for_stmt): Removed first argument.
1346 (finish_switch_stmt): Likewise.
1348 * semantics.c (genrtl_try_block): Define function.
1349 (genrtl_handler): Likewise.
1350 (genrtl_catch_block): Likewise.
1351 (genrtl_ctor_stmt): Likewise.
1352 (genrtl_subobject): Likewise.
1353 (genrtl_decl_cleanup): Likewise.
1354 (genrtl_do_poplevel): Likewise.
1355 (genrtl_do_pushlevel): Likewise.
1356 (genrtl_clear_out_block): Likewise.
1357 (genrtl_goto_stmt): Likewise.
1358 (genrtl_expr_stmt): Likewise.
1359 (genrtl_decl_stmt): Likewise.
1360 (genrtl_if_stmt): Likewise.
1361 (genrtl_while_stmt): Likewise.
1362 (genrtl_do_stmt): Likewise.
1363 (genrtl_return_stmt): Likewise.
1364 (genrtl_for_stmt): Likewise.
1365 (genrtl_break_stmt): Likewise.
1366 (genrtl_continue_stmt): Likewise.
1367 (genrtl_scope_stmt): Likewise.
1368 (genrtl_switch_stmt): Likewise.
1369 (genrtl_case_label): Likewise.
1370 (genrtl_begin_compound_stmt): Likewise.
1371 (genrtl_finish_compound_stmt): Likewise.
1372 (genrtl_compound_stmt): Likewise.
1373 (genrtl_asm_stmt): Likewise.
1374 (genrtl_named_return_value): Likewise.
1375 (genrtl_begin_stmt_expr): Likewise.
1376 (genrtl_finish_stmt_expr): Likewise.
1377 (finish_for_stmt): Removed first argument and generate rtl
1379 (finish_switch_stmt): Likewise.
1380 (do_poplevel): Removed generate rtl specific code.
1381 (do_pushlevel): Likewise.
1382 (add_tree): Likewise.
1383 (finish_goto_stmt): Likewise.
1384 (finish_expr_stmt): Likewise.
1385 (begin_if_stmt): Likewise.
1386 (finish_if_stmt_cond): Likewise.
1387 (finish_then_clause): Likewise.
1388 (begin_else_clause): Likewise.
1389 (finish_else_clause): Likewise.
1390 (finish_if_stmt): Likewise.
1391 (clear_out_block): Likewise.
1392 (begin_while_stmt): Likewise.
1393 (finish_while_stmt_cond): Likewise.
1394 (finish_while_stmt): Likewise.
1395 (begin_do_stmt): Likewise.
1396 (finish_do_body): Likewise.
1397 (finish_do_stmt): Likewise.
1398 (finish_return_stmt): Likewise.
1399 (begin_for_stmt): Likewise.
1400 (finish_for_init_stmt): Likewise.
1401 (finish_for_cond): Likewise.
1402 (finish_for_expr): Likewise.
1403 (finish_break_stmt): Likewise.
1404 (finish_continue_stmt): Likewise.
1405 (begin_switch_stmt): Likewise.
1406 (finish_switch_cond): Likewise.
1407 (finish_case_label): Likewise.
1408 (begin_try_block): Likewise.
1409 (begin_function_try_block): Likewise.
1410 (finish_try_block): Likewise.
1411 (finish_cleanup_try_block): Likewise.
1412 (finish_cleanup): Likewise.
1413 (finish_function_try_block): Likewise.
1414 (finish_handler_sequence): Likewise.
1415 (finish_function_handler_sequence): Likewise.
1416 (begin_handler): Likewise.
1417 (finish_handler_parms): Likewise.
1418 (begin_catch_block): Likewise.
1419 (finish_handler): Likewise.
1420 (begin_compound_stmt): Likewise.
1421 (finish_compound_stmt): Likewise.
1422 (finish_asm_stmt): Likewise.
1423 (finish_label_stmt): Likewise.
1424 (finish_label_decl): Likewise.
1425 (finish_subobject): Likewise.
1426 (finish_decl_cleanup): Likewise.
1427 (finish_named_return_value): Likewise.
1428 (begin_stmt_expr): Likewise.
1429 (finish_stmt_expr): Likewise.
1431 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
1432 to call genrtl_expr_stmt when appropriate.
1434 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
1435 begin_compound_expr to call genrtl_begin_stmt_expr and
1436 genrtl_begin_compound_expr when appropriate.
1437 (finish_init_stmts): Changed calls to finish_compound_expr and
1438 finish_stmt_expr to call genrtl_finish_compound_expr and
1439 genrtl_finish_stmt_expr when appropriate.
1440 (expand_default_init): Changed call to finish_expr_stmt to call
1441 genrtl_expr_stmt when appropriate.
1442 (build_vec_init): Likewise.
1444 * parse.y (simple_stmt): Removed first argument from call to
1445 finish_for_stmt. Removed first argument from call to
1448 * parse.c: Regenerated.
1450 * pt.c (tsubst_expr): Removed first argument from call to
1451 finish_for_stmt. Removed first argument from call to
1454 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
1456 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
1457 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
1459 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
1460 (cplus_tree_code_length[]): Likewise.
1461 (cplus_tree_code_name[]): Likewise.
1462 (init_parse): Added call to add_c_tree_codes. Changed
1463 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
1465 2000-06-16 Mark Mitchell <mark@codesourcery.com>
1467 * cp-tree.h (finish_mem_initializers): Declare.
1468 (count_trees): Likewise.
1469 * parse.y (base_init): Use finish_mem_initializers.
1470 * semantics.c (finish_mem_initializers): New function.
1472 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
1473 the number of trees.
1475 (count_trees): Don't use it.
1477 2000-06-15 Jason Merrill <jason@redhat.com>
1479 * tree.c (count_trees): New debugging function.
1481 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
1482 * init.c (build_member_call): Pull out the name of a DECL.
1484 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
1485 * semantics.c (expand_body): Push to TV_INTEGRATION here.
1486 * optimize.c (optimize_function): Not here.
1487 * pt.c (instantiate_decl): Push to TV_PARSE.
1489 2000-06-15 Mark Mitchell <mark@codesourcery.com>
1491 * cp-tree.h (struct language_function): Remove x_base_init_list
1492 and x_member_init_list.
1493 (current_base_init_list): Remove.
1494 (current_member_init_list): Likewise.
1495 (setup_vtbl_ptr): Change prototype.
1496 (emit_base_init): Likewise.
1497 (expand_member_init): Likewise.
1498 (reinit_parse_for_function): Remove.
1499 * decl.c (save_function_data): Don't clear x_base_init_list and
1501 (mark_language_function): Don't mark them.
1502 * init.c (perform_member_init): Tweak comment.
1503 (sort_member_init): Take the list of initializers as an argument.
1504 (sort_base_init): Likewise.
1505 (emit_base_init): Likewise.
1506 (expand_member_init): Return the initializer. Don't use global
1508 * lex.c (reinit_parse_for_function): Remove.
1509 * method.c (build_template_parm_names): Correct substitution.
1510 (do_build_copy_constructor): Don't use current_member_init_list
1511 and current_base_init_list.
1512 (synthesize_method): Likewise.
1513 * parse.y (base_init): Split mem-initializers into
1514 base-initializers and field-initializers.
1515 (member_init_list): Build up the list here.
1516 (member_init): Return the initializer.
1517 (fn.depfn): Don't use reinit_parse_for_function.
1518 * parse.c: Regenerated.
1519 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
1521 (tsubst_expr): Don't use current_member_init_list
1522 and current_base_init_list.
1523 (tsubst_expr_values): Rename to ...
1524 (tsubst_initializer_list): ... this. Use convert_from_reference.
1525 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
1526 and current_base_init_list.
1527 (begin_function_definition): Don't call reinit_parse_for_function.
1529 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
1531 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
1534 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
1536 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
1538 * cp-tree.h (IF_COND): Move to c-common.h.
1539 (THEN_CLAUSE): Likewise.
1540 (ELSE_CLAUSE): Likewise.
1541 (WHILE_COND): Likewise.
1542 (WHILE_BODY): Likewise.
1543 (DO_COND): Likewise.
1544 (DO_BODY): Likewise.
1545 (RETURN_EXPR): Likewise.
1546 (EXPR_STMT_EXPR): Likewise.
1547 (FOR_INIT_STMT): Likewise.
1548 (FOR_COND): Likewise.
1549 (FOR_EXPR): Likewise.
1550 (FOR_BODY): Likewise.
1551 (SWITCH_COND): Likewise.
1552 (SWITCH_BODY): Likewise.
1553 (CASE_LOW): Likewise.
1554 (CASE_HIGH): Likewise.
1555 (GOTO_DESTINATION): Likewise.
1556 (COMPOUND_BODY): Likewise.
1557 (ASM_CV_QUAL): Likewise.
1558 (ASM_STRING): Likewise.
1559 (ASM_OUTPUTS): Likewise.
1560 (ASM_INPUTS): Likewise.
1561 (ASM_CLOBBERS): Likewise.
1562 (DECL_STMT_DECL): Likewise.
1563 (STMT_EXPR_STMT): Likewise.
1564 (LABEL_STMT_LABEL): Likewise.
1565 (SCOPE_BEGIN_P): Likewise.
1566 (SCOPE_END_P): Likewise.
1567 (SCOPE_STMT_BLOCK): Likewise.
1568 (SCOPE_NULLIFIED_P): Likewise.
1569 (SCOPE_NO_CLEANUPS_P): Likewise.
1570 (SCOPE_PARTIAL_P): Likewise.
1571 (ASM_VOLATILE_P): Likewise.
1572 (STMT_LINENO): Likewise.
1573 (STMT_LINENO_FOR_FN_P): Likewise.
1575 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
1576 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
1577 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
1578 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
1579 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
1581 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
1583 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
1584 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
1586 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
1587 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
1588 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
1590 2000-06-14 Mark Mitchell <mark@codesourcery.com>
1592 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
1593 * class.c (dfs_find_final_overrider): Set it appropriately.
1594 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
1595 avoid unneeded secondary vptrs.
1597 2000-06-13 Jakub Jelinek <jakub@redhat.com>
1599 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
1600 (check_bitfield_decl, check_field_decl): Likewise.
1601 (build_vtbl_or_vbase_field, build_base_field): Likewise.
1602 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
1603 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
1604 (xfer_tag, finish_enum): Likewise.
1605 * decl2.c (finish_builtin_type): Likewise.
1606 * init.c (init_init_processing): Likewise.
1607 * pt.c (instantiate_class_template): Likewise.
1608 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
1609 * cp-tree.h (struct lang_type): Add user_align member.
1610 (CLASSTYPE_USER_ALIGN): Define.
1612 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1614 * Make-lang.in (c++.install-common): Install g++-cross in
1615 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
1616 $(target_alias)-g++ and $(target_alias)-c++.
1618 2000-06-12 Mark Mitchell <mark@codesourcery.com>
1620 * class.c (vcall_offset_data_s): Add last_init and fns.
1621 (overrides): Rename to same_signature_p.
1622 (dfs_find_final_overrider): Adjust accordingly.
1623 (mark_overriders): Likewise.
1624 (warn_hidden): Likewise.
1625 (build_vtbl_initializer): Reorganize machinery for building things
1626 at negative offsets.
1627 (build_vcall_and_vbase_vtbl_entries): Likewise.
1628 (build_vbase_offset_vtbl_entries): Likewise.
1629 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
1630 offset entries. Do not create two entries for functions with the
1632 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
1633 (build_rtti_vtbl_entries): Reorganize machinery for building things
1634 at negative offsets.
1636 * optimize.c (expand_call_inline): Don't recurse into the code
1637 used to initialize the parameters more than once.
1639 2000-06-11 Mark Mitchell <mark@codesourcery.com>
1641 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
1642 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
1643 (find_substitution): Only use the `Sa' substitution for
1644 std::allocator, not instantiations of it.
1645 (write_template_prefix): Move comment. Only use a TREE_LIST to
1646 represent substitutions for a member template.
1647 (write_array_type): Mangle array dimensions correctly.
1648 * optimize.c (maybe_clone_body): Copy more information from the
1650 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
1651 on the regenerated declaration.
1653 2000-06-11 Chip Salzenberg <chip@valinux.com>
1654 Mark Mitchell <mark@codesourcery.com>
1656 * class.c (build_vtable): Clarify comment.
1657 (build_ctor_vtbl_group): Pass the most derived type to
1660 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1662 * decl2.c (compare_options): Don't needlessly cast away const-ness.
1664 2000-06-10 Mark Mitchell <mark@codesourcery.com>
1666 * decl.c (add_binding): Handle duplicate declarations of external
1669 2000-06-09 Chip Salzenberg <chip@valinux.com>
1670 Mark Mitchell <mark@codesourcery.com>
1672 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
1674 (write_signed_number): New macro.
1675 (write_unsigned_number): Likewise.
1676 (write_source_name): Use them.
1677 (write_number): Handle signed and unsigned values.
1678 (write_integer_cst): Use tree_int_cst_sgn, and use
1679 write_unsigned_number or write_signed_number as appropriate.
1680 (write_discriminator): Use write_unsigned_number or
1681 write_signed_number as appropriate.
1682 (write_template_arg_literal): Likewise.
1683 (write_array_type): Use tree_low_cst.
1684 (write_template_parm): Use write_unsigned_number or
1685 write_signed_number as appropriate.
1686 (write_substitution): Adjust call to write_number.
1687 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
1688 (write_expression): Handle non-type template arguments of
1689 reference type correctly.
1690 (mangle_thunk): Use write_signed_number.
1692 2000-06-09 Chip Salzenberg <chip@valinux.com>
1694 * mangle.c (find_substition): Don't mangle objects with typename
1695 substitutions (e.g. "cin" as "Si").
1697 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
1699 * call.c (add_candidate): Use ggc_alloc_cleared.
1700 * decl.c (lookup_label): Likewise.
1701 * lex.c (retrofit_lang_decl): Likewise.
1703 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
1705 * semantics.c (expand_body): Push to TV_EXPAND.
1706 * optimize.c (optimize_function): Push to TV_INTEGRATION.
1707 * decl.c (start_function): Always call announce_function.
1709 * tinfo2.cc: Just declare abort.
1711 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
1713 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
1714 whenever @ is a symbolic name.
1716 2000-06-08 Jakub Jelinek <jakub@redhat.com>
1718 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
1720 2000-06-07 Mark Mitchell <mark@codesourcery.com>
1722 * decl.c (pushdecl): Look up functions by DECL_NAME, not
1723 DECL_ASSEMBLER_NAME.
1725 2000-06-06 Mark Mitchell <mark@codesourcery.com>
1727 * decl2.c (c_language): Define.
1729 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
1731 * lex.c (lang_init_options): Tweak.
1733 * decl2.c: Remove #inclusion of diagnostic.h
1734 (lang_decode_option): Move diagnostic formatting options to
1737 * lang-options.h: Remove documentation for diagnostic options.
1739 * Makefile.in (lex.o): Depends upon diagnostic.h
1741 2000-06-06 Mark Mitchell <mark@codesourcery.com>
1743 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
1744 the same DECL_RESULT, it's not a redefinition.
1745 * pt.c (tsubst_decl): Remove code to handle illegal
1748 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
1750 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
1752 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
1754 * search.c (maybe_suppress_debug_info): Don't check
1755 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
1757 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
1760 Remember instantiation context in deferred instantiations.
1761 * cp-tree.h (struct tinst_level): Remove.
1762 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
1763 * pt.c (current_tinst_level): Now a tree.
1764 (print_template_context, push_tinst_level, pop_tinst_level,
1765 tinst_for_decl): Adjust.
1766 (reopen_tinst_level): New fn.
1767 (init_pt): Register current_tinst_level as a root.
1768 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
1769 of the pending templates list.
1770 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
1771 * lex.c (extract_interface_info): Adjust.
1772 * decl2.c (warn_if_unknown_interface): Adjust.
1774 2000-06-05 Mark Mitchell <mark@codesourcery.com>
1776 * class.c (indirect_primary_base_p): New function.
1777 (determine_primary_base): Use it.
1779 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
1781 Update new-abi dynamic cast algorithm.
1782 * tinfo.cc (__class_type_info::__dyncast_result): Add
1783 whole_details. Adjust constructor.
1784 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
1785 Avoid unnecessary searching.
1786 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
1788 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1790 * decl.c (init_decl_processing): Don't call record_component_aliases.
1791 * tree.c (build_cplus_array_type_1): Likewise.
1793 2000-06-04 Mark Mitchell <mark@codesourcery.com>
1795 * ir.texi: Correct typo.
1796 * mangle.c (write_expression): Handle non-type template arguments
1797 with reference type.
1798 * method.c (build_overload_value): Likewise.
1799 * pt.c (convert_nontype_argument): Explicitly represent conversion
1800 to a reference with an ADDR_EXPR.
1801 (unify): Always unify arguments in left-to-right order.
1803 2000-06-03 Alex Samuel <samuel@codesourcery.com>
1804 Mark Mitchell <mark@codesourcery.com>
1806 * Make-lang.in (CXX_SRCS): Add mangle.c.
1807 * Makefile.in (CXX_OBJS): Add mangle.o.
1808 (mangle.o): New rule.
1810 * class.c (local_classes): New variable.
1811 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
1812 (get_vtt_name): Use mangle_vtt_name for new ABI.
1813 (init_class_processing): Initialize local_classes.
1814 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
1815 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
1816 (std_identifier): New macro.
1817 (DECL_VOLATILE_MEMFUNC_P): New macro.
1818 (DECL_NAMESPACE_STD_P): Likewise.
1819 (local_classes): Declare.
1820 (get_mostly_instantiated_function_type): Declare.
1821 (init_mangle): Declare.
1822 (mangle_decl): Likewise.
1823 (mangle_type_string): Likewise.
1824 (mangle_type): Likewise.
1825 (mangle_typeinfo_for_type): Likewise.
1826 (mangle_typeinfo_string_for_type): Likewise.
1827 (mangle_vtbl_for_type): Likewise.
1828 (mangle_vtt_for_type): Likewise.
1829 (mangle_ctor_vtbl_for_type): Likewise.
1830 (mangle_thunk): Likewise.
1831 (mangle_conv_op_name_for_type): Likewise.
1832 (mangle_guard_variable): Likewise.
1833 * decl.c (pushtag): Keep track of local classes.
1834 (initialize_predefined_identifiers): Initialize std_identifier.
1835 (init_decl_processing): Use std_identifier.
1836 (start_decl): Don't treat instantiations as specializations.
1837 (grokdeclarator): Likewise.
1838 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
1839 name for fully-instantiated templates.
1840 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
1841 destructors with the new ABI.
1842 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
1843 (grokfield): Use mangle_type for new ABI.
1844 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
1845 (get_sentry): Use mangle_guard_variable for new ABI.
1846 (start_static_initialization_or_destruction): Likewise.
1847 * expr.c (extract_aggr_init): Remove.
1848 (extract_scalar_init): Likewise.
1849 (extract_init): Remove #if 0'd code.
1850 * mangle.c: New function.
1851 * method.c (build_mangled_name): Assert not flag_new_abi.
1852 (build_static_name): Likewise.
1853 (build_decl_overload_real): Likewise.
1854 (build_typename_overload): Likewise.
1855 (build_overload_with_type): Likewise.
1856 (build_overload_name): Likewise.
1857 (get_ctor_vtbl_name): Likewise.
1858 (start_squangling): Likewise.
1859 (get_id_2): Likewise.
1860 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
1861 (init_method): Call init_mangle for new ABI.
1862 (make_thunk): Call mangle_thunk for new ABI.
1863 * operators.def: Correct new ABI manglings for the `%' operator.
1865 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
1866 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
1867 (lookup_template_class): Call mangle_decl for new ABI.
1868 (get_mostly_instantiated_function_type): New function.
1869 (set_mangled_name_for_template_decl): Use it.
1870 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
1871 the new ABI. Use mangle_conv_op_name_for_type for instantiated
1872 conversion op names.
1873 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
1874 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
1875 (tinfo_base_init): Likewise. Mangle typeinfo string name with
1876 mangle_typeinfo_string_for_type.
1878 2000-06-03 Mark Mitchell <mark@codesourcery.com>
1880 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
1881 (INNERMOST_TEMPLATE_ARGS): New macro.
1882 (innermost_args): Remove.
1883 (get_innermost_template_args): New function.
1884 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
1885 * error.c (dump_function_decl): Be caution when using
1886 most_general_template.
1887 * method.c (build_template_parm_names): Use
1888 INNERMOST_TEMPLATE_ARGS.
1889 * pt.c (add_to_template_args): Tidy comment
1890 (get_innermost_template_args): New function.
1891 (check_explicit_specialization): Clear DECL_INITIAL for a new
1893 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
1895 (push_template_decl): Always register specializations of the most
1897 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
1898 (coerce_template_parms): Likewise.
1899 (lookup_template_class): Likewise.
1900 (innermost_args): Remove.
1901 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
1902 (tsubst_decl): Handle tricky specializations. Use
1903 get_innermost_template_args.
1904 (instantiate_template): Simplify handling of partial
1906 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
1907 (most_general_template): Reimplement, in a more straightforward
1909 (regenerate_decl_from_template): Tweak formatting. Use
1910 TMPL_ARGS_DEPTH for clarity.
1911 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
1913 * dump.c (dequeue_and_dump): Dump information about thunks.
1915 2000-06-01 Richard Henderson <rth@cygnus.com>
1917 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
1919 2000-06-01 Richard Henderson <rth@cygnus.com>
1921 * decl2.c (unsupported_options): Fix typo, make const.
1922 (lang_decode_option): Fix bsearch argument order.
1924 2000-06-01 Mark Mitchell <mark@codesourcery.com>
1926 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
1929 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1931 * cp-tree.h (c_get_alias_set): Deleted.
1932 * Makefile.in (decl.o): Include ../expr.h.
1933 * decl.c (expr.h): Include.
1934 (init_decl_processing): Call record_component_aliases for arrays.
1935 (grokdeclarator): Likewise.
1936 Set TREE_ADDRESSABLE for fields that aren't bitfields.
1937 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
1939 2000-05-31 Mark Mitchell <mark@codesourcery.com>
1941 Remove guiding declaration support.
1942 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
1943 (flag_guiding_decls): Remove.
1944 * call.c (build_user_type_conversion_1): Remove support for
1946 (build_new_function_call): Likewise.
1947 (build_new_op): Likewise.
1948 (build_new_method_call): Likewise.
1949 * decl.c (start_function): Likewise.
1950 * friend.c (is_friend): Likewise.
1951 (do_friend): Likewise.
1952 * decl2.c ((flag_dump_translation_unit): Make it const.
1953 (flag_guiding_decls): Remove.
1954 (unsupported_options): New variable
1955 (compare_options): New function.
1956 (lang_decode_option): Use them.
1958 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
1960 * method.c (mangle_expression): Adjust test for legal expression
1963 * pt.c (instantiate_decl): Save and restore the local
1964 specializations list.
1966 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
1968 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
1970 2000-05-30 Mark Mitchell <mark@codesourcery.com>
1972 * call.c (add_template_candidate_real): Handle member template
1973 constructors for classes with virtual bases.
1974 (build_user_type_conversion_1): Use in_charge_arg_for_name.
1975 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
1977 * ir.texi: Update thunk documentation.
1979 * call.c (joust): Fix handling of overloaded builtin operators.
1981 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
1983 * cp-tree.h (DECL_ANTICIPATED): New macro.
1984 Document new use of DECL_LANG_FLAG_7.
1985 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
1986 in the user namespace.
1987 * lex.c (do_identifier): If the identifier's declaration has
1988 DECL_ANTICIPATED on, it has not yet been declared. But do not
1989 replace it with an ordinary implicit declaration.
1991 * tinfo2.cc: Include stdlib.h.
1993 2000-05-29 Mark Mitchell <mark@codesourcery.com>
1995 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
1996 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
1999 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
2001 * decl2.c (lang_decode_option): Use skip_leading_substring instead
2004 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
2006 * operators.def (<?): Duplicated, should have been...
2009 2000-05-27 Alex Samuel <samuel@codesourcery.com>
2010 Mark Mitchell <mark@codesourcery.com>
2012 * cp-tree.h (ansi_opname): Make it a macro.
2013 (ansi_assopname): Likewise.
2014 (struct lang_decl_flags): Add assignment_operator_p.
2015 (struct lang_decl): Add operator_code.
2016 (DECL_VTT_PARM): Adjust.
2017 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
2018 overloaded operator.
2019 (SET_OVERLOADED_OPERATOR_CODE): New macro.
2020 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
2021 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
2022 (opname_tab): Remove.
2023 (assignop_tab): Likewise.
2024 (operator_name_info_t): New type.
2025 (operator_name_info): New variable.
2026 (assignment_operator_name_info): Likewise.
2027 (build_cp_library_fn): Remove declaration.
2028 (push_cp_library_fn): Likewise.
2029 (operator_name_string): Likewise.
2030 (build_decl_overload): Likewise.
2031 * call.c (print_z_candidates): Simplify.
2032 (build_object_call): Adjust usage of ansi_opname. Use
2033 DECL_OVERLOADED_OPERATOR_P.
2034 (op_error): Adjust operator name lookup.
2035 (build_conditional_expr): Adjust usage of ansi_opname.
2036 (build_new_op): Likewise.
2037 (build_op_delete_call): Likewise.
2038 (build_over_call): Likewise.
2039 (joust): Use DECL_OVERLOADED_OPERATOR_P.
2040 * decl.c (duplicate_decls): Copy operator_code.
2041 (init_decl_processing): Adjust parameters to push_cp_library_fn.
2042 (builtin_function): Adjust parameters to build_library_fn_1.
2043 (build_library_fn_1): Accept an overloaded operator code.
2044 (build_library_fn): Pass ERROR_MARK.
2045 (build_cp_library_fn): Accept an overloaded operator code.
2046 (push_cp_library_fn): Likewise.
2047 (grokfndecl): Tweak.
2048 (grokdeclarator): Simplify code to compute names of overloaded
2049 operators. Adjust use of ansi_opname.
2050 (ambi_op_p): Work on tree_codes, not identifiers.
2051 (unary_op_p): Likewise.
2052 (grok_op_properties): Likewise.
2053 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
2054 (lang_mark_tree): Don't try to mark the operator_code.
2055 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
2056 * error.c (dump_decl): Remove special handling for operator
2058 (dump_function_name): Likewise.
2059 (dump_expr): Adjust name lookup of operators.
2060 (op_to_string): Simplify.
2061 (assop_to_string): Likewise.
2062 * init.c (build_new_1): Adjust use of ansi_opname.
2063 * lex.c (opname_tab): Remove.
2064 (assignop_tab): Likewise.
2065 (ansi_opname): Likewise.
2066 (ansi_assopname): Likewise.
2067 (operator_name_string): Likewise.
2068 (reinit_lang_specific): Likewise.
2069 (operator_name_info): New variable.
2070 (assignment_operator_name_info): Likewise.
2071 (init_operators): New function.
2072 (init_parse): Use it.
2073 (do_identifier): Adjust use of ansi_opname.
2074 * method.c (mangle_expression): Don't use ansi_opname for
2076 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
2077 (build_decl_overload): Remove.
2078 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
2079 (do_build_assign_ref): Adjust use of ansi_opname.
2080 (synthesize_method): Likewise.
2081 (implicitly_declare_fn): Likewise.
2082 * operators.def: New file.
2083 * parse.y (operator): Adjust use of ansi_opname.
2084 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
2085 (set_mangled_name_for_template_decl): Don't play games with
2087 (special_function_p): Adjust use of ansi_opname.
2088 * typeck.c (check_return_expr): Likewise.
2089 * Make-lang.in (cc1plus): Depend on operators.def.
2090 * Makefile.in (lex.o): Likewise.
2093 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
2095 * Make-lang.in (cplib2.ready): Eradicate.
2097 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2099 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
2100 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
2101 (built_min, cp_tree_equal): Likewise.
2103 2000-05-26 Mark Mitchell <mark@codesourcery.com>
2105 * class.c (layout_nonempty_base_or_field): Replace
2106 `record_layout_info' with `record_layout_info_s'.
2108 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
2111 * cp-tree.h (struct language_function): x_named_labels is now
2112 a struct named_label_list*.
2113 * decl.c (struct named_label_use_list): Renamed from...
2114 (struct named_label_list): ...this. New struct.
2115 (push_binding_level): Don't set eh_region.
2116 (note_level_for_eh): New fn.
2117 (pop_label): Take label and old value directly.
2118 (pop_labels): Adjust for new named_labels format.
2119 (lookup_label): Likewise.
2120 (poplevel): Note characteristics of a binding level containing a
2121 named label. Mess with named label lists earlier.
2122 (mark_named_label_lists): New fn.
2123 (mark_lang_function): Call it.
2124 (use_label): New fn, split out from...
2125 (make_label_decl): ...here. Don't call it.
2126 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
2127 check_previous_gotos): New fns, split out from...
2128 (define_label): ...here.
2129 (check_switch_goto): New fn.
2130 (define_case_label): Call it.
2131 (check_goto): New fn.
2132 * semantics.c (finish_goto_stmt): Call it and use_label.
2133 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
2134 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
2136 2000-05-26 Mark Mitchell <mark@codesourcery.com>
2138 * class.c (build_vtable_entry_ref): Correct usage of
2139 get_vtbl_decl_for_binfo.
2141 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
2142 * method.c (implicitly_declare_fn): Not here.
2144 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
2146 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
2147 (CPTI_PTMD_DESC_TYPE): ... here.
2148 (ptmd_desc_type_node): Rename to ...
2149 (ptm_desc_type_node): ... here.
2151 * rtti.c (ptmd_initializer): Rename to ...
2152 (ptm_initializer): ... here.
2153 (sythesize_tinfo_var): Adjust. Deal with pointer to member
2155 (create_tinfo_types): Adjust.
2157 2000-05-25 Mark Mitchell <mark@codesourcery.com>
2159 Finish implementation of VTTs.
2160 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
2161 CPTI_VTT_PARM_IDENTIFIER.
2162 (vtt_parm_identifier): New macro.
2163 (vtt_parm_type): Likewise.
2164 (BINFO_SUBVTT_INDEX): Likewise.
2165 (BINFO_VPTR_INDEX): Likewise.
2166 (struct lang_decl): Add vtt_parm.
2167 (DECL_VTT_PARM): New macro.
2168 (DECL_USE_VTT_PARM): Likewise.
2169 (DECL_NEEDS_VTT_PARM_P): Likewise.
2170 (get_vtt_name): Declare.
2171 (build_artifical_parm): Likewise.
2172 (fixup_all_virtual_upcast_offsets): Likewise.
2173 (expand_indirect_vtbls_init): Remove.
2174 * call.c (build_new_method_call): Pass the vtt to subobject
2175 constructors and destructors.
2176 * class.c (get_vtt_name): Give it external linkage.
2177 (build_clone): Handle the magic VTT parameters for clones.
2178 (clone_function_decl): Fix typo in comment.
2179 (build_vtt): Keep track of the indices in the VTTs where various
2180 entities are stored.
2181 (build_vtt_inits): Likewise.
2182 (dfs_build_vtt_inits): Likewise.
2183 (build_ctor_vtbl_group): Tweak type of construction vtables.
2184 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
2185 primary bases, when building construction vtables.
2186 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
2187 (initialize_predefined_identifiers): Add vtt_parm_identifier.
2188 (init_decl_processing): Initialize vtt_parm_type.
2189 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
2190 (lang_mark_tree): Make vtt_parm.
2191 * decl2.c (build_artificial_parm): New function.
2192 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
2193 (grokclassfn): Use build_artificial_parm.
2194 * init.c (initialize_vtbl_ptrs): Call
2195 fixup_all_virtual_upcast_offsets directly.
2196 (perform_member_init): Use the complete subobject destructor for
2198 (build_vtbl_address): New function.
2199 (expand_virtual_init): Handle VTTs.
2200 * optimize (maybe_clone_body): Likewise.
2201 * search.c (fixup_all_virtual_upcast_offsets): Give it external
2203 (expand_indirect_vtbls_init): Remove.
2204 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
2205 * tree.c (make_binfo): Make them bigger.
2207 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
2209 * inc/cxxabi.h (__pbase_type_info): Define, based on
2210 __pointer_type_info.
2211 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
2212 (__pointer_to_member_type_info): Likewise.
2213 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
2214 (__pointer_to_member_type_info::__is_pointer_p): Remove.
2215 (__pointer_type_info::__do_catch): Rename to ...
2216 (__pbase_type_info::__do_catch): ... here. Adjust.
2217 (__pbase_type_info::__pointer_catch): Implement.
2218 (__pointer_type_info::__pointer_catch): Adjust.
2219 (__pointer_to_member_type_info::__pointer_catch): Adjust.
2221 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
2223 * tinfo.h (__user_type_info::contained_virtual_p): New
2225 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
2227 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
2228 diamond shaped heirarchy. Add early out for mixed diamond and
2229 duplicate shaped heirarchy.
2231 2000-05-24 Mark Mitchell <mark@codesourcery.com>
2233 * cp-tree.h (build_delete): Change prototype.
2234 (build_vec_delete): Likewise.
2235 * call.c (build_scoped_method_call): Use special_function_kind
2236 values to indicate the kind of destruction to be done.
2237 (build_method_call): Likewise.
2238 * decl.c (finish_destructor_body): Likewise.
2239 (maybe_build_cleanup_1): Likewise. Rename to ...
2240 (maybe_build_cleanup): ... this.
2241 * decl2.c (delete_sanity): Use special_function_kind
2242 values to indicate the kind of destruction to be done.
2243 (build_cleanup): Likewise.
2244 * init.c (perform_member_init): Likewise.
2245 (build_vec_delete_1): Likewise.
2246 (build_dtor_call): Simplify.
2247 (build_delete): Use special_function_kind
2248 values to indicate the kind of destruction to be done.
2249 (build_vbase_delete): Likewise.
2250 (build_vec_delete): Likewise.
2252 * init.c (sort_member_init): Fix typo in error message generation
2255 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
2257 * semantics.c (begin_class_definition): make the packed
2258 attribute be sensitive to the "-fpack-struct" command line flag
2260 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
2262 Update new-abi upcast algorithm.
2263 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
2264 prototype and meaning of return value.
2265 (__si_class_type_info::__do_upcast): Likewise.
2266 (__vmi_class_type_info::__do_upcast): Likewise.
2267 * tinfo.cc (__class_type_info::__upcast_result): Replace
2268 whole2dst with part2dst. Adjust ctor.
2269 (__class_type_info::__do_upcast): Adjust call of worker function.
2270 (__class_type_info::__do_upcast): Adjust.
2271 (__si_class_type_info::__do_upcast): Adjust. Use parent's
2273 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
2274 virtual base in diamond heirarchy bug.
2276 2000-05-23 Mark Mitchell <mark@codesourcery.com>
2278 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
2279 and bitfield to tinfo_fn_p.
2280 (DECL_TINFO_FN_P): Adjust.
2281 (SET_DECL_TINFO_FN_P): Likewise.
2282 (DECL_MUTABLE_P): Likewise.
2283 (DECL_C_BIT_FIELD): Likewise.
2284 (SET_DECL_C_BIT_FIELD): Likewise.
2285 (CLEAR_DECL_C_BIT_FIELD): Likewise.
2286 (DECL_UNINLINABLE): Likewise.
2287 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
2288 (handle_using_decl): Remove assertion.
2289 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
2290 to build FIELD_DECLs.
2291 (build_base_field): Likewise.
2292 (layout_class_type): Likewise.
2293 * decl.c (init_decl_processing): Likewise.
2294 (build_ptrmemfunc_type): Likewise.
2295 (grokdeclarator): Likewise.
2296 * decl2.c (grok_x_components): Likewise.
2297 * except.c (call_eh_info): Likewise.
2298 * init.c (init_init_processing): Likewise.
2299 * rtti.c (expand_class_desc): Likewise.
2300 (create_pseudo_type_info): Likewise.
2301 (get_vmi_pseudo_type_info): Likewise.
2302 (create_tinfo_types): Likewise.
2303 * ptree.c (print_lang_decl): Adjust.
2304 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
2305 before checking DECL_MUTABLE_P.
2307 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
2308 parameters for template functions.
2309 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
2310 destructors as well as constructors.
2312 2000-05-22 Mark Mitchell <mark@codesourcery.com>
2314 * class.c (build_ctor_vtbl_group): Set inits.
2315 * optimize.c (maybe_clone_body): Set DECL_INLINE and
2316 DECL_THIS_INLINE appropriately for clones.
2318 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
2319 (DECL_CONV_FN_P): Simplify.
2320 (DECL_OPERATOR): Remove.
2321 (language_to_string): Declare.
2322 * decl.c (duplicate_decls): Fix typo in comment.
2323 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
2324 (grok_op_properties): Use DECL_CONV_FN_P instead of
2325 IDENTIFIER_TYPENAME_P.
2326 * dump.c (dequeue_and_dump): Dump the language linkage of
2328 * error.c (language_to_string): Give it external linkage.
2329 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
2330 (implicitly_declare_fn): Set DECL_LANGUAGE.
2331 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
2332 IDENTIFIER_TYPENAME_P.
2333 (tsubst_decl): Likewise.
2334 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
2335 * semantics.c (finish_member_declaration): Don't mark members of
2336 classes declared in an extern "C" region as extern "C".
2338 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2340 * decl2.c (qualified_lookup_using_namespace): Look through
2343 * decl.c (push_using_decl): Return the old decl on namespace level.
2345 2000-05-21 Mark Mitchell <mark@codesourcery.com>
2347 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
2348 (VTT_NAME_PREFIX): New macro.
2349 (CTOR_VTBL_NAME_PREFIX): Likewise.
2350 (get_ctor_vtbl_name): New function.
2351 * class.c (get_vtable_name): Simplify.
2352 (get_vtt_name): New function.
2353 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
2354 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
2355 when a virtual base becomes primary.
2356 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
2358 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
2359 additional parameters.
2360 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
2361 (initialize_array): New function.
2362 (build_vtt): Likewise.
2363 (build_vtt_inits): Likewise.
2364 (dfs_build_vtt_inits): Likewise.
2365 (dfs_fixup_binfo_vtbls): Likewise.
2366 (build_ctor_vtbl_group): Likewise.
2367 (initialize_vtable): Use initialize_array.
2368 (accumulate_vtbl_inits): Reimplement to handle construction
2370 (dfs_accumulate_vtbl_inits): Likewise.
2371 (bulid_vtbl_initializer): Adjust parameter name.
2372 * method.c (build_typename_overload): Remove #if 0'd code.
2373 (get_ctor_vtbl_name): New function.
2374 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
2375 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
2377 * cp-tree.h (struct lang_type): Remove search_slot.
2378 (CLASSTYPE_SEARCH_SLOT): Remove.
2379 (emit_base_init): Change prototype.
2380 (initialize_vtbl_ptrs): Likewise.
2381 (expand_indirect_vtbls_init): Likewise.
2382 (clear_search_slots): Remove.
2383 * decl.c (lang_mark_tree): Don't mark search_slot.
2384 * init.c (initialize_vtbl_ptrs): Simplify.
2385 (emit_base_init): Likewise.
2386 * search.c (struct vbase_info): Document decl_ptr.
2387 (convert_pointer_to_single_level): Remove.
2388 (dfs_find_vbases): Remove.
2389 (dfs_init_base_pointers): Simplify.
2390 (dfs_clear_vbase_slots): Remove.
2391 (dfs_vtable_path_unmark): New function.
2392 (init_vbase_pointers): Simplify.
2393 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
2394 (expand_indirect_vtbls_init): Simplify. Don't call
2395 mark_all_temps_used.
2396 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
2397 initialize_vtbl_ptrs.
2399 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
2401 * except.c: Add static prototypes.
2403 2000-05-20 H.J. Lu <hjl@gnu.org>
2405 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
2407 2000-05-19 Mark Mitchell <mark@codesourcery.com>
2409 Don't create a separate copy of virtual bases for the
2410 CLASSTYPE_VBASECLASSES list.
2411 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
2412 (BINFO_FOR_VBASE): Remove.
2413 (CANONICAL_BINFO): Adjust.
2414 (binfo_for_vbase): New function.
2415 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
2416 instead of BINFO_FOR_VBASE.
2417 (build_vbase_pointer): Likewise.
2418 (build_secondary_vtable): Likewise.
2419 (dfs_mark_primary_bases): Likewise.
2420 (mark_primary_bases): Likewise.
2421 (layout_nonempty_base_or_field): Likewise.
2422 (dfs_set_offset_for_shared_vbases): Likewise.
2423 (dfs_set_offset_for_unshared_vbases): Likewise.
2424 (layout_virtual_bases): Likewise. Adjust for changes to the
2425 CLASSTYPE_VBASECLASSES list.
2426 (dump_class_hierarchy_r): Use binfo_for_vbase
2427 instead of BINFO_FOR_VBASE.
2428 (dump_class_hierarchy): Likewise.
2429 (finish_vtbls): Likewise.
2430 (build_vtbl_initializer): Adjust for changes to the
2431 CLASSTYPE_VBASECLASSES list.
2432 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
2433 * decl.c (finish_destructor_body): Adjust for changes to the
2434 CLASSTYPE_VBASECLASSES list.
2435 * init.c (sort_base_init): Use binfo_for_vbase.
2436 (construct_virtual_bases): Adjust for changes to the
2437 CLASSTYPE_VBASECLASSES list.
2438 (expand_member_init): Use binfo_for_vbase.
2439 (build_vbase_delete): Adjust for changes to the
2440 CLASSTYPE_VBASECLASSES list.
2441 * method.c (do_build_copy_constructor): Likewise.
2442 * rtti.c (get_base_offset): Use binfo_for_vbase.
2443 (expand_class_desc): Remove #if 0'd code.
2444 * search.c (struct vbase_info): Remove vbase_types.
2445 (get_base_distance): Use binfo_for_vbase.
2446 (lookup_field_queue_p): Use CANONICAL_BINFO.
2447 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
2448 (get_pure_virtuals): Adjust for changes to the
2449 CLASSTYPE_VBASECLASSES list.
2450 (dfs_find_vbases): Use binfo_for_vbase.
2451 (dfs_init_vbase_pointers): Likewise.
2452 (init_vbase_pointers): Don't initialize vi.vbase_types.
2453 (virtual_context): Use binfo_for_vbase.
2454 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
2455 CLASSTYPE_VBASECLASSES list.
2456 (expand_indirect_vtbls_init): Simplify.
2457 (dfs_get_vbase_types): Don't replicate virtual bases.
2458 (find_vbase_instance): Use binfo_for_vbase.
2459 (binfo_for_vbase): New function.
2460 * typeck.c (get_delta_difference): Use binfo_for_vbase.
2462 2000-05-17 Mark Mitchell <mark@codesourcery.com>
2464 * decl2.c (finish_anon_union): Generalize error messages to handle
2465 anonymous structures.
2466 * init.c (perform_member_init): Remove `name' parameter.
2467 (build_field_list): New function.
2468 (sort_member_init): Handle anonymous union initialization order
2469 correctly. Check for multiple initializations of the same union.
2470 (emit_base_init): Don't look up fields by name here.
2471 (expand_member_init): Record the result of name lookup for future
2473 * typeck.c (build_component_ref): Fix formatting.
2475 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
2477 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
2478 * typeck.c (build_x_compound_expr): Replace warn_unused with
2481 * decl2.c (lang_decode_option): Update -Wall unused flags by
2482 calling set_Wunused.
2484 2000-05-16 Mark Mitchell <mark@codesourcery.com>
2486 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
2487 * init.c (dfs_vtable_path_unmark): Remove.
2488 * search.c (marked_new_vtable_p): Likewise.
2489 (unmarked_new_vtable_p): Likewise.
2490 (dfs_search_slot_nonempty_p): Likewise.
2491 (dfs_mark): Likewise.
2492 (dfs_vtable_path_unmark): Likewise.
2493 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
2494 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
2495 (dfs_init_vbase_pointers): Remove special-case new ABI code.
2496 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
2497 (init_vbase_pointers): Simplify.
2498 (expand_indirect_vtbls_init): Likewise.
2500 * class.c (copy_virtuals): New function.
2501 (build_primary_table): Use it.
2502 (build_secondary_vtable): Likewise.
2503 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
2504 indicate that no vcall offset is required.
2505 (add_virtual_function): Likewise.
2506 (modify_all_vtables): Likewise.
2507 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
2508 (dfs_accumulate_vtbl_inits): Likewise.
2509 (build_vtbl_initializer): Make changes to handle construction
2511 (dfs_build_vcall_offset_vtbl_entries): Likewise.
2512 (build_rtti_vtbl_entries): Likewise.
2513 (build_vtable_entries): Handle a NULL vcall_index.
2515 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
2517 * decl2.c (lang_decode_option): Fix thinko.
2519 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
2521 * except.c (check_handlers): New fn.
2522 * cp-tree.h: Declare it.
2523 * semantics.c (finish_handler_sequence): Call it.
2524 (finish_function_handler_sequence): Likewise.
2525 (finish_handler_parms): Set TREE_TYPE on the handler.
2526 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
2527 * search.c (get_base_distance_recursive): If protect>1, ignore
2529 (get_base_distance): Don't reduce watch_access.
2531 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
2533 * lex.c: #include diagnostic.h.
2534 (lang_init_options): Set default prefixing rules.
2536 * lang-options.h: Add -fdiagnostics-show-location=.
2538 * decl2.c: #include diagnostic.h.
2539 (lang_decode_option): Handle -fdiagnostics-show-location=.
2541 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
2543 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
2544 * vec.cc: Revert my 2000-05-07 change.
2546 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
2548 * class.c (check_field_decls): Complain about non-static data
2549 members with same name as class in class with constructor.
2551 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
2553 * decl.c (grokdeclarator): Allow non-static data members with
2556 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
2558 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
2559 and pending_inline.filename. Update prototypes.
2560 * decl.c (define_label): Constify filename parameter.
2561 * decl2.c (warn_if_unknown_interface): Constify local char *.
2562 * input.c Constify input_source.filename. Don't declare
2563 input_filename or lineno. Constify filename parameter to feed_input.
2564 * lex.c (init_parse): Constify parameter and return value.
2565 (cp_pragma_interface, cp_pragma_implementation): Constify
2567 (reinit_parse_for_method, reinit_parse_for_block,
2568 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
2569 Constify local char *.
2570 * pt.c: Don't declare lineno or input_filename.
2571 (print_template_context, tsubst_friend_function, tsubst_decl,
2572 tsubst, instantiate_decl): Constify local char *.
2573 * semantics.c (expand_body): Constify local char *.
2574 * tree.c (build_srcloc): Constify filename parameter.
2575 * typeck.c (c_expand_asm_operands): Constify filename
2578 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
2580 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
2583 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
2585 * inc/cxxabi.h: Fix typos in comment.
2586 (__base_class_info::__offset): Use a static_cast.
2588 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
2590 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
2591 of std::size_t and std::ptrdiff_t respectively.
2592 * tinfo.cc: Likewise.
2595 2000-05-06 Richard Henderson <rth@cygnus.com>
2597 * typeck.c (build_c_cast): Don't warn integer->pointer size
2598 mismatch for constants.
2600 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
2602 * rtti.c (ptmd_initializer): Set non-public, if class is
2605 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
2606 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2607 __cxa_vec_delete): Likewise.
2608 * tinfo.cc (__dynamic_cast): Likewise.
2609 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2610 __cxa_vec_delete): Likewise.
2612 2000-05-04 Mark Mitchell <mark@codesourcery.com>
2614 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
2615 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
2616 (lang_decl_flags): Add vcall_offset.
2617 (THUNK_VCALL_OFFSET): Use it.
2618 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
2619 * method.c (make_thunk): Create the lang_decl here, not in
2621 (emit_thunk): Make generic thunks into ordinary functions once
2622 they have been fed to expand_body.
2623 * semantics.c (expand_body): Set current_function_is_thunk here.
2625 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2627 * class.c (update_vtable_entry_for_fn): Prototype.
2629 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
2632 * search.c (dfs_build_inheritance_graph_order): Prototype.
2634 2000-05-04 Mark Mitchell <mark@codesourcery.com>
2636 * cp-tree.h (special_function_kind): Add various kinds of
2638 (special_function_p): New function.
2639 * class.c (overrides): Don't let one kind of destructor override
2641 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
2642 whether or not to instantiate a template.
2643 * tree.c (special_function_p): Define.
2645 2000-05-03 Mark Mitchell <mark@codesourcery.com>
2647 * cp-tree.def (THUNK_DECL): Remove.
2648 * cp-tree.h (DECL_THUNK_P): New macro.
2649 (DECL_NON_THUNK_FUNCTION_P): Likewise.
2650 (DECL_EXTERN_C_FUNCTION_P): Likewise.
2651 (SET_DECL_THUNK_P): Likewise.
2652 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
2653 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
2654 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
2655 * decl.c (decls_match): Use DECL_EXTERN_C_P.
2656 (duplicate_decls): Likewise.
2657 (pushdecl): Likewise. Adjust thunk handling.
2658 (grokfndecl): Use DECL_EXTERN_C_P.
2659 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
2660 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
2661 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
2662 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
2663 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
2664 DECL_NO_STATIC_CHAIN.
2665 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
2666 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
2667 * search.c (covariant_return_p): Remove THUNK_DECL handling.
2670 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
2672 * tree.c (walk_tree): Set lineno.
2674 2000-05-01 Mark Mitchell <mark@codesourcery.com>
2676 * exception.cc: Update license notice.
2678 * new1.cc: Likewise.
2679 * new2.cc: Likewise.
2680 * tinfo.cc: Likewise.
2681 * tinfo2.cc: Likewise.
2683 * inc/cxxabi.h: Likewise.
2684 * inc/exception: Likewise.
2685 * inc/new: Likewise.
2686 * inc/new.h: Likewise.
2687 * inc/typeinfo: Likewise.
2689 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
2691 * tree.c (build_target_expr_with_type): If we already have a
2692 TARGET_EXPR, just return it.
2694 * optimize.c (initialize_inlined_parameters): Don't generate an
2695 EXPR_STMT if we can just use DECL_INITIAL.
2696 * decl.c (emit_local_var): Only make the initialization a
2697 full-expression if stmts_are_full_exprs_p.
2699 2000-05-01 Mark Mitchell <mark@codesourcery.com>
2701 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
2703 * call.c (standard_conversion): Use it.
2704 (direct_reference_binding): Likewise.
2705 (build_over_call): Likewise.
2706 (is_properly_derived_from): Likewise.
2707 (compare_ics): Likewise.
2708 * class.c (resolves_to_fixed_type_p): Likewise.
2709 * optimize.c (declare_return_variable): Likewise.
2710 * pt.c (is_specialization_of): Likewise.
2712 * typeck.c (comp_target_parms): Likeiwse.
2713 (build_static_cast): Likewise.
2714 (build_reinterpret_cast): Likewise.
2715 (build_const_cast): Likewise.
2716 (comp_ptr_ttypes_real): Likewise.
2717 (comp_ptr_ttypes_const): Likewise.
2718 * typeck2.c (process_init_constructor): Likewise.
2720 2000-04-30 Scott Snyder <snyder@fnal.gov>
2722 * decl.c (finish_destructor_body): Use the base destructor when
2723 destroying virtual bases.
2725 2000-04-30 Mark Mitchell <mark@codesourcery.com>
2727 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
2729 * optimize.c (struct inline_data): Add target_exprs field.
2730 (declare_return_variable): When a function returns an aggregate,
2731 use the variable declared in the TARGET_EXPR as the remapped
2733 (expand_call_inline): Update the pending target_exprs stack.
2734 (optimize_function): Initialize the stack.
2736 * decl2.c (finish_file): Fix typo in comment.
2738 * method.c (emit_thunk): Don't try to return a `void' value.
2740 * optimize.c (initialize_inlined_parameters): If the parameter is
2741 addressable, we need to make a new VAR_DECL, even if the
2742 initializer is constant.
2744 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
2746 * decl.c (grok_op_properties): Add an extra check of argtypes.
2748 2000-04-27 Mark Mitchell <mark@codesourcery.com>
2750 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
2752 (initialize_inlined_parameters): Try to avoid creating new
2755 2000-04-27 Alex Samuel <samuel@codesourcery.com>
2757 * lex.c (my_get_run_time): Remove.
2758 (init_filename_times): Use get_run_time instead of my_get_run_time.
2759 (check_newline): Likewise.
2760 (dump_time_statistics): Likewise.
2761 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
2762 of computing elapsed time explicitly.
2764 2000-04-26 Mark Mitchell <mark@codesourcery.com>
2766 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
2767 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
2768 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
2769 before calling decl_constant_value.
2770 * class.c (check_bitfield_decl): Likewise.
2771 * cvt.c (ocp_convert): Likewise.
2772 (convert): Likewise.
2773 * decl.c (compute_array_index_type): Likewise.
2774 (build_enumerator): Likewise.
2775 * decl2.c (check_cp_case_value): Likewise.
2776 * pt.c (convert_nontype_argument): Likewise.
2778 * typeck.c (decay_conversion): Likewise.
2779 (build_compound_expr): Likewise.
2780 (build_reinterpret_cast): Likewise.
2781 (build_c_cast): Likewise.
2782 (convert_for_assignment): Likewise.
2784 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
2786 * decl.c (finish_function): Don't play games with DECL_INLINE.
2788 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
2790 * ir.texi: Correct typo.
2792 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2794 * decl.c (grokdeclarator): Reject VLAs as members.
2796 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
2798 * call.c (standard_conversion): Accept conversion between
2801 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
2803 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
2805 * decl2.c (finish_file): Remove double setup for accounting
2808 2000-04-24 Robert Lipe <robertlipe@usa.net>
2810 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
2812 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
2814 * new.cc (set_new_handler): Needs to be in std::.
2816 2000-04-23 Mark Mitchell <mark@codesourcery.com>
2818 * cp-tree.h (lang_decl): Remove pretty_function_p.
2819 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
2820 language-specific node.
2821 * decl.c (cp_make_fname_decl): Use build_decl, not
2822 build_lang_decl, to build the variables.
2823 (grokvardecl): Don't call build_lang_decl for local variables in
2825 (grokdeclarator): Don't call build_lang_decl for local type
2826 declarations in templates.
2827 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
2828 zero'd memory, rather than calling memset.
2829 * pt.c: Include hashtab.h.
2830 (local_specializations): New variable.
2831 (retrieve_local_specialization): Use it.
2832 (register_local_specialization): Likewise.
2833 (tsubst_decl): Don't assume local variables have
2835 (instantiate_decl): Set up local_specializations.
2836 * Makefile.in (HTAB_H): New variable.
2838 2000-04-23 Richard Henderson <rth@cygnus.com>
2840 * typeck.c (c_expand_asm_operands): Restore the original
2841 contents of the output list.
2843 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
2845 * ir.texi: Document complex number representation.
2847 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
2849 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
2850 (target_incomplete_p): New function.
2851 (tinfo_base_init): Create comdat NTBS name variable.
2852 (ptr_initializer): Add non_public parameter. Calculate it.
2853 (ptmd_initializer): Likewise.
2854 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
2855 (create_real_tinfo_var): Add non_public parameter. Use it.
2856 Push proxy into global namespace.
2857 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
2859 * inc/typeinfo (type_info::before, type_info::operator==):
2860 Compare __name addresses.
2862 * tinfo2.cc: Remove new-abi builtins comment.
2864 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
2866 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
2868 * call.c (joust): Exit early if we get the same function, too.
2870 * decl2.c (key_method): Return NULL_TREE for template classes.
2871 (import_export_class): Don't need to check for template classes.
2873 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
2875 * lex.c: Remove references to cccp.c.
2877 2000-04-18 Mark Mitchell <mark@codesourcery.com>
2879 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
2880 volatile_memfunc. Add destructor_attr. Adjust dummy.
2881 (DECL_DESTRUCTOR_P): Use destructor_attr.
2882 (DECL_CONST_MEMFUNC_P): Reimplement.
2883 (DECL_VOLATILE_MEMFUNC_P): Remove.
2884 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
2885 (overrides): Use DECL_DESTRUCTOR_P.
2886 (check_for_override): Likewise.
2887 * decl.c (start_function): Likewise.
2888 * decl2.c (grokfclassfn): Likewise.
2889 (check_classfn): Likewise.
2890 (grok_function_init): Likewise.
2892 2000-04-17 Mark Mitchell <mark@codesourcery.com>
2894 * decl2.c (grokfield): Issue error on illegal data member
2897 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
2899 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
2901 2000-04-16 Mark Mitchell <mark@codesourcery.com>
2903 * class.c (build_vtable_entry): Don't build thunks for type-info
2906 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
2908 * decl.c (decls_match): Allow a redeclaration of a builtin to
2909 specify args while the builtin did not.
2911 2000-04-15 Mark Mitchell <mark@codesourcery.com>
2913 * cp-tree.def (THUNK_DECL): Add to documentation.
2914 * cp-tree.h (flag_huge_objects): Declare.
2915 * class.c (modify_vtable_entry): Tidy.
2916 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
2917 Calculate delta appropriately for the new ABI.
2918 (dfs_modify_vtables): Use it.
2919 (modify_all_vtables): Fix thinko in code to add overriding copies
2920 of functions to primary vtables.
2921 (build_clone): Fix typo in comment.
2922 (clone_function_decl): Correct order of destructors in vtable.
2923 (build_vbase_offset_vtbl_entries): Adjust comment.
2924 (dfs_vcall_offset_queue_p): Remove.
2925 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
2926 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
2927 (build_vtable_entry): Correct check for pure virtual functions.
2928 Don't declare flag_huge_objects.
2929 * decl.c (flag_huge_objects): Remove declaration.
2930 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
2931 Use int_size_in_bytes.
2932 (emit_thunk): Handle vcall offset thunks.
2934 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2936 * decl2.c (parse_time, varconst_time): Delete declarations.
2937 (finish_file): Delete LINENO declaration.
2938 START_TIME and THIS_TIME now long.
2940 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
2942 * class.c (build_base_field): Reformat comment.
2944 * inc/cxxabi.h (stddef.h): Comment inclusion.
2945 (__base_class_info::__offset): Comment shift.
2947 2000-04-12 Mark Mitchell <mark@codesourcery.com>
2949 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
2950 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
2951 (cp_push_exception_identifier): New macro.
2952 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
2953 (DECL_BASE_DESTRUCTOR_P): Likewise.
2954 (DECL_DELETING_DESTRUCTOR_P): Likewise.
2955 (get_vtbl_decl_for_binfo): Fix formatting.
2956 (in_charge_arg_for_name): New macro.
2957 (maybe_build_cleanup_and_delete): Remove declaration.
2958 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
2959 (in_charge_arg_for_name): New function.
2960 (build_new_method_call): Use it. Handle cloned destructors.
2961 (build_clone): Don't make the base constructor virtual.
2962 Automatically defer generated functions.
2963 (clone_function_decl): Handle destructors, too.
2964 (clone_constructors_and_destructors): Likewise.
2965 (create_vtable_ptr): Don't create a vtable entry for a cloned
2967 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
2968 (initialize_predefined_identifiers): Update appropriately.
2969 (finish_destructor_body): Simplify.
2970 (maybe_build_cleanup_and_delete): Remove.
2971 * except.c (expand_throw): Handle new-ABI destructors.
2972 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
2973 (build_dtor_call): New function.
2974 (build_delete): Use it. Simplify.
2975 * optimize.c (maybe_clone_body): Handle destructors.
2976 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
2978 * exception.cc (cleanup_fn): New typedef.
2979 (CALL_CLEANUP): New macro.
2980 (cp_eh_info): Use them.
2981 (__cp_push_exception): Likewise.
2982 (__cp_pop_exception): Likewise.
2984 2000-04-11 Mark Mitchell <mark@codesourcery.com>
2986 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
2987 (complete_dtor_identifier): New macro.
2988 (CLASSTYPE_FIRST_CONVERSION): Remove.
2989 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
2990 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
2991 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
2992 (CLASSTYPE_CONSTRUCTORS): Likewise.
2993 (CLASSTYPE_DESTRUCTORS): Likewise.
2994 (lang_decl): Add cloned_function.
2995 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
2996 (DECL_BASE_CONSTRUCTOR_P): Likewise.
2997 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
2998 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
2999 (DECL_CLONED_FUNCTION_P): Likewise.
3000 (DECL_CLONED_FUNCTION): Likewise.
3001 (clone_function_decl): Declare.
3002 (maybe_clone_body): Likewise.
3003 * call.c (build_user_type_conversion_1): Call complete object
3004 constructors in the new ABI.
3005 (build_new_method_call): Don't add in-charge parameters under the
3007 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
3008 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
3009 CLASSTYPE_DESTRUCTOR_SLOT.
3010 (build_clone): New function.
3011 (clone_function_decl): Likewise.
3012 (clone_constructors_and_destructors): Likewise.
3013 (check_bases_and_members): Use it.
3014 * decl.c (iniitialize_predefined_identifiers): Initialize
3015 complete_dtor_identifier.
3016 (finish_function): Don't add extra code to a clone.
3017 (lang_mark_tree): Mark cloned_function.
3018 * decl2.c (mark_used): Don't bother trying to instantiate things
3020 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
3021 * method.c (set_mangled_name_for_decl): Don't treat clones as
3023 (synthesize_method): Sythesize cloned functions, not the clones.
3024 * optimize.c (inline_data): Update comment on ret_label.
3025 (remap_block): Don't assume DECL_INITIAL exists.
3026 (copy_body_r): Allow ret_label to be NULL.
3027 (maybe_clone_body): Define.
3028 * pt.c (tsubst_decl): Handle clones.
3029 (instantiate_clone): New function.
3030 (instantiate_template): Use it.
3031 (set_mangled_name_for_template_decl): Don't treat clones as
3033 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
3034 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
3035 * semantics.c (expand_body): Clone function bodies as necessary.
3037 * optimize.c (remap_decl): Avoid sharing structure for arrays
3038 whose size is only known at run-time.
3039 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
3041 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
3042 to has_in_charge_parm_p.
3043 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
3044 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
3045 (DECL_COPY_CONSTRUCTOR_P): New macro.
3046 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
3047 (build_user_type_conversion_1): Likewise.
3048 (convert_like_real): Likewise.
3049 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
3050 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
3051 (copy_args_p): Likewise.
3052 (grok_ctor_properties): Likewise.
3053 (start_function): Likewise.
3054 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
3055 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
3056 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
3057 * method.c (do_build_copy_constructor): Use
3058 DECL_HAS_IN_CHARGE_PARM_P.
3059 (synthesize_method): Likewise.
3060 * pt.c (instantiate_template): Remove goto.
3061 * tree.c (build_cplus_method_type): Remove mention of obstacks in
3064 * cp-tre.h (finish_function): Change prototype.
3065 * decl.c (end_cleanup_fn): Adjust caller.
3066 (finish_function): Take only one parameter.
3067 * decl2.c (finish_objects): Adjust caller.
3068 (finish_static_storage_duration_function): Likewise.
3069 * method.c (emit_thunk): Likewise.
3070 * parse.y: Likewise.
3071 * parse.c: Regenerated.
3072 * pt.c (instantiate_decl): Likewise.
3073 * rtti.c (synthesize_tinfo_fn): Likewise.
3074 * semantics.c (expand_body): Likewise.
3076 * cp-tree.h (copy_decl): New function.
3077 * class.c (finish_struct_1): Use it.
3078 * lex.c (copy_decl): Define it.
3079 * pt.c (tsubst_decl): Likewise.
3080 * tree.c (copy_template_template_parm): Likewise.
3082 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
3083 has_nonpublic_assign_ref.
3084 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
3085 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
3086 * class.c (finish_struct_methods): Don't set
3087 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
3088 (interface_only): Don't declare.
3089 (interface_unknown): Likewise.
3091 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3093 * tree.h (HAVE_TEMPLATES): Remove definition.
3094 * lang-options.h (-fthis-is-variable): Remove documentation.
3096 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
3098 * class.c (instantiate_type): Handle object-relative template-id.
3100 * semantics.c (finish_expr_stmt): Call convert_to_void here.
3101 * decl.c (cplus_expand_expr_stmt): Not here.
3103 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
3104 Initialize exprtype earlier.
3106 * parse.y (fn.def1): Check for defining types in return types.
3108 * decl.c (check_tag_decl): Notice extra fundamental types.
3109 Diagnose empty decls in classes, too.
3111 * decl.c (grokdeclarator): Don't override an anonymous name if no
3112 declarator was given.
3114 * cvt.c (convert_to_void): Call resolve_offset_ref.
3116 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
3118 * decl2.c (decl_namespace): Handle getting a type.
3120 * typeck.c (build_c_cast): Re-enable warning for cast between
3121 pointer and integer of different size.
3123 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
3125 * inc/cxxabi.h (__pointer_type_info): Add restrict and
3127 (__pointer_type_info::__pointer_catch): New virtual function.
3128 (__pointer_to_member_type_info): Derive from
3129 __pointer_type_info. Adjust.
3130 (__pointer_to_member_type_info::__do_catch): Remove.
3131 (__pointer_to_member_type_info::__is_pointer_p): Declare.
3132 (__pointer_to_member_type_info::__pointer_catch): Declare.
3133 * rtti.c (qualifier_flags): Add restrict flag.
3134 (ptmd_initializer): Reorder members.
3135 (create_tinfo_types): Expand comments. Reorder
3136 ptmd_desc_type_node members.
3137 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
3139 (__pointer_type_info::__do_catch): Move specific code into
3140 __pointer_catch. Call it.
3141 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
3142 specific catch checking. Fix void conversion check.
3143 (__pointer_to_member_type_info::__do_catch): Remove.
3144 (__pointer_to_member_type_info::__pointer_catch): Implement.
3146 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3148 * lex.c (init_parse): Remove traces of classof and headof.
3149 * decl2.c (flag_operator_names): Default to 1.
3150 (lang_decode_option): Do not set it for -ansi.
3152 2000-04-09 Mark Mitchell <mark@codesourcery.com>
3154 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
3155 (DECL_MAIN_VARIANT): Remove.
3156 * decl.c (duplicate_decls): Don't set it.
3157 (start_function): Likewise.
3158 (lang_mark_tree): Don't mark it.
3159 * decl2.c (defer_fn): Don't use it.
3160 * lex.c (retrofit_lang_decl): Don't set it.
3161 * pt.c (tsubst_decl): Likewise.
3162 * ptree.c (print_lang_decl): Don't print it.
3163 * typeck.c (mark_addressable): Don't use it.
3165 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
3167 * vec.cc: Include <new> and <exception>.
3168 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
3169 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
3171 (__cxa_vec_delete): Catch dtor exceptions.
3173 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
3175 Prepend __ to implementation defined names.
3176 * inc/typeinfo (type_info): Rename _name to __name.
3177 (type_info::type_info): Rename parameter.
3178 (type_info::operator==, type_info::operator!=,
3179 type_info::before): Likewise.
3180 (type_info::is_pointer_p, type_info::is_function_p,
3181 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
3184 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
3185 (__pointer_type_info::__pointer_type_info): Likewise.
3186 (__pointer_type_info::is_pointer_p,
3187 __pointer_type_info::do_catch): Prepend __. Rename parameters.
3188 (__array_type_info::__array_type_info): Rename parameters.
3189 (__function_type_info::__function_type_info): Likewise.
3190 (__function_type_info::is_function_p): Prepend __.
3191 (__enum_type_info::__enum_type_info): Rename parameters.
3192 (__pointer_to_member_type_info::__pointer_to_member_type_info):
3194 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
3196 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
3197 (__class_type_info::__class_type_info): Rename parameters.
3198 (__class_type_info::sub_kind): Prepend __. Adjust member names.
3199 (__class_type_info::upcast_result,
3200 __class_type_info::dyncast_result): Prepend __. Move definition
3202 (__class_type_info::do_upcast, __class_type_info::do_catch,
3203 __class_type_info::find_public_src,
3204 __class_type_info::do_dyncast,
3205 __class_type_info::do_find_public_src): Prepend __. Rename
3207 (__si_class_type_info::__si_class_type_info): Rename parameters.
3208 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
3209 __si_class_type_info::do_find_public_src): Prepent __. Rename
3211 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
3212 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
3213 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
3215 (__dynamic_cast): Rename parameters.
3216 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
3217 type_info::do_catch, type_info::do_upcast): Prepend __.
3218 (contained_p, public_p, virtual_p, contained_public_p,
3219 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
3220 (__class_type_info::do_catch,
3221 __class_type_info::do_upcast): Prepend __. Adjust.
3222 (__class_type_info::__upcast_result,
3223 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
3225 (__class_type_info::find_public_src): Prepend __. Adjust.
3226 (__class_type_info::do_find_public_src,
3227 __si_class_type_info::do_find_public_src,
3228 __vmi_class_type_info::do_find_public_src): Likewise.
3229 (__class_type_info::do_dyncast,
3230 __si_class_type_info::do_dyncast,
3231 __vmi_class_type_info::do_dyncast): Likewise.
3232 (__class_type_info::do_upcast,
3233 __si_class_type_info::do_upcast,
3234 __vmi_class_type_info::do_upcast): Likewise.
3235 (__dynamic_cast): Adjust.
3236 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
3237 (__function_type_info::is_function_p): Likewise.
3238 (__pointer_type_info::do_catch): Likewise. Adjust.
3239 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
3240 (__throw_type_match_rtti_2): Adjust.
3241 (__is_pointer): Adjust.
3243 2000-04-08 Mark Mitchell <mark@codesourcery.com>
3245 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
3246 (complete_ctor_identifier): New macro.
3247 (special_function_kind): Add sfk_copy_constructor and
3248 sfk_assignment_operator.
3249 (LOOKUP_HAS_IN_CHARGE): Remove.
3250 (cons_up_default_function): Rename to ...
3251 (implicitly_declare_fn): ... this.
3252 * call.c (build_new_method_call): Add in-charge parameters for
3254 * class.c (add_implicitly_declared_members): Change parameter name
3255 from cant_have_assignment to cant_have_const_assignment.
3256 Replace calls to cons_up_default_function to implicitly_declare_fn.
3257 * cvt.c (ocp_convert): Use complete_ctor_identifier.
3258 * decl.c (initialize_predefined_identifiers): Initialize it.
3259 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
3261 * init.c (expand_default_init): Don't calculate the in-charge
3263 (build_new_1): Likewise.
3264 * lex.c (cons_up_default_function): Move to method.c.
3265 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
3266 (implicitly_declare_fn): New function.
3267 * typeck.c (build_static_cast): Use complete_ctor_identifier.
3268 (build_modify_expr): Likewise.
3269 * typeck2.c (build_functional_cast): Likewise.
3271 Under the new ABI, constructors don't return `this'.
3272 * cp-tree.h (warn_reorder): Declare.
3273 (special_function_kind): New enum.
3274 (global_base_init_list): Remove declaration.
3275 (emit_base_init): Don't return a value.
3276 (check_base_init): Don't declare.
3277 (is_aggr_typedef): Likewise.
3278 * decl.c (check_special_function_return_type): New function.
3279 (return_types): Remove.
3280 (grokdeclarator): Use check_special_function_return_type.
3281 (start_function): Don't initialize ctor_label under the new ABI.
3282 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
3283 * init.c (begin_init_stmts): Move to top of file.
3284 (finish_init_stmts): Likewise.
3285 (warn_reorder): Don't declare.
3286 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
3288 (check_base_init): Remove.
3289 (is_aggr_typedef): Likewise.
3290 (build_new_1): Don't use the return value of a constructor.
3291 * semantics.c (setup_vtbl_ptr): Don't use the return value
3293 * typeck.c (check_return_expr): Don't magically convert return
3294 statements into `return this' in constructors under the new ABI.
3296 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
3297 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
3298 (base_ctor_identifier): New macro.
3299 (base_dtor_identifier): Likewise.
3300 (deleting_dtor_identifier): Likewise.
3301 * decl.c: Don't include obstack.h.
3302 (obstack_chunk_alloc): Don't define.
3303 (obstack_chunk_free): Likewise.
3304 (struct predefined_identifier): New type.
3305 (initialize_predefined_identifiers): New function.
3306 (init_decl_processing): Use it.
3307 (debug_temp_inits): Remove.
3308 (start_method): Don't call preserve_data.
3309 (hack_incomplete_structures): Update comment.
3310 * init.c (init_init_processing): Don't initialize
3312 (build_offset_rf): Remove dead code.
3313 (build_delete): Use CLASSTYPE_N_BASECLASSES.
3314 * search.c (init_search_processing): Don't initialize
3317 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3319 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
3320 some sign_compare warnings.
3322 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
3324 Rename abi::__vmi_class_type_info members.
3325 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
3326 base_list, detail_masks members to vmi_flags, vmi_base_count,
3327 vmi_bases and vmi_flags_masks respectively.
3328 (__vmi_class_type_info::vmi_flags_masks): Rename
3329 details_unknown_mask to flags_unknown_mask.
3330 * tinfo.cc (__class_type_info::do_upcast): Adjust.
3331 (__vmi_class_type_info::do_find_public_src): Adjust.
3332 (__vmi_class_type_info::do_dyncast): Adjust.
3333 (__vmi_class_type_info::do_upcast): Adjust.
3335 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
3337 * tinfo.cc (convert_to_base): New function.
3338 (get_vbase_offset): Remove. Move into convert_to_base.
3339 (__vmi_class_type_info::do_find_public_src): Adjust.
3340 (__vmi_class_type_info::do_dyncast): Adjust.
3341 (__vmi_class_type_info::do_upcast): Adjust.
3343 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
3345 * tinfo.cc (operator=): Use __builtin_strcmp.
3346 * tinfo2.cc (before): Likewise.
3348 2000-04-06 Mark Mitchell <mark@codesourcery.com>
3350 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
3351 (DECL_SAVED_INLINE): Rename to ...
3352 (DECL_DEFERRED_FN): ... this.
3353 (in_function_p): Remove declaration.
3354 (mark_inline_for_output): Rename to ...
3355 (defer_fn): ... this.
3356 * decl.c (finish_function): Adjust call to mark_inline_for_output.
3357 (in_function_p): Remove definition.
3358 * decl2.c (saved_inlines): Rename to ...
3359 (deferred_fns): ... this.
3360 (saved_inlines_used): Rename to ...
3361 (deferred_fns_used): ... this.
3362 (mark_inline_for_output): Rename to ...
3363 (defer_fn): ... this.
3364 (finish_file): Adjust accordingly.
3365 (init_decl2): Likewise.
3366 * lex.c (cons_up_default_function): Likewise.
3367 * pt.c (mark_decl_instantiated): Likewise.
3368 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
3370 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
3371 * semantics.c (expand_body): Defer more functions.
3373 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
3376 * Make-lang.in (CXX_LIB2FUNCS): Add it.
3378 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
3379 __cxa_vec_delete): Declare.
3381 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
3383 * rtti.c (dfs_class_hint_mark): New static function.
3384 (dfs_class_hint_unmark): New static function.
3385 (class_hint_flags): Use them.
3387 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
3389 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
3391 2000-04-05 Mark Mitchell <mark@codesourcery.com>
3393 * cp-tree.h (instantiate_decl): Change prototype.
3394 * decl2.c (mark_used): Adjust call.
3395 * optimize.c (inlinable_function_p): Adjust handling of templates.
3396 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
3397 (do_type_instantiation): Likewise.
3398 (instantiate_decl): Defer more templates.
3399 (instantiate_pending_templates): Adjust logic to handle inline
3402 * Makefile.in (GGC_H): New variable. Use it throughout in place
3405 * call.c: Don't include obstack.h. Include ggc.h.
3406 (obstack_chunk_alloc): Don't define.
3407 (obstack_chunk_free): Likewise.
3408 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
3409 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
3410 (pop_switch): Free it.
3412 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
3414 * dump.c (dequeue_and_dump): Don't try to print the bit_position
3415 if we don't have a DECL_FIELD_OFFSET.
3417 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
3419 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
3422 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3424 * cfns.gperf (hash, libc_name_p): Prototype.
3426 * rtti.c (build_dynamic_cast_1): Constification.
3428 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
3430 * semantics.c (deferred_type_access_control): Prototype.
3432 2000-04-04 Mark Mitchell <mark@codesourcery.com>
3434 Correct many new ABI issues regarding vbase and vcall offset
3436 * cp-tree.h (BINFO_VTABLE): Document.
3437 (struct lang_type): Tweak formatting.
3438 (BINFO_PRIMARY_BINFO): Add to documentation.
3439 (CLASSTYPE_VSIZE): Fix typo in comment.
3440 (CLASSTYPE_VBASECLASSES): Update documentation.
3441 (BINFO_VBASE_MARKED): Remove.
3442 (SET_BINFO_VBASE_MARKED): Likewise.
3443 (CLEAR_BINFO_VBASE_MARKED): Likewise.
3444 (BINFO_FIELDS_MARKED): Remove.
3445 (SET_BINFO_FIELDS_MARKED): Likewise.
3446 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
3447 (enum access_kind): New enumeration.
3448 (num_extra_vtbl_entries): Remove declaration.
3449 (size_extra_vtbl_entries): Likewise.
3450 (get_vtbl_decl_for_binfo): New function.
3451 (dfs_vbase_unmark): Remove declaration.
3452 (mark_primary_bases): Likewise.
3453 * class.c (SAME_FN): Remove.
3454 (struct vcall_offset_data_s): Move definition.
3455 (build_vbase_pointer): Use `build', not `build_binary_op', to
3456 access the vbase pointer under the new ABI.
3457 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
3458 (build_primary_vtable): Likewise.
3459 (dfs_mark_primary_bases): Move here from search.c.
3460 (mark_primary_bases): Likewise.
3461 (determine_primary_bases): Under the new ABI, don't make a base
3462 class a primary base just because we don't yet have any virtual
3464 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
3465 (num_vfun_entries): Remove.
3466 (dfs_count_virtuals): Likewise.
3467 (num_extra_vtbl_entries): Likewise.
3468 (size_extra_vtbl_entries): Likewise.
3469 (layout_virtual_bases): Iterate in inheritance graph order under
3471 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
3472 indicate that a vfield is present.
3473 (init_class_processing): Initialize access_public_node, etc., from
3475 (get_vtbl_decl_for_binfo): New function.
3476 (dump_class_hierarchy_r): Likewise.
3477 (dump_class_hierarchy): Use it.
3478 (finish_vtbls): Build the vtbls in inheritance graph order.
3479 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
3480 (initialize_vtable): Use get_vtbl_decl_for_binfo.
3481 (accumulate_vtbl_inits): Add comments explaining why a pre-order
3483 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
3484 where the vptr points, even for primary vtables.
3485 (build_vtbl_initializer): Adjust handling of vbase and vcall
3487 (build_vcall_and_vbase_vtable_entries): New function.
3488 (dfs_build_vbase_offset_vtbl_entries): Remove.
3489 (build_vbase_offset_vtbl_entries): Reimplement.
3490 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
3491 were already handled in a primary base class vtable.
3492 (build_vcall_offset_vtbl_entries): Adjust.
3493 (build_rtti_vtbl_entries): Adjust.
3494 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
3495 * init.c (expand_virtual_init): Simplify.
3496 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
3497 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
3498 * search.c (BINFO_ACCESS): New macro.
3499 (SET_BINFO_ACCESS): Likewise.
3500 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
3501 (access_in_type): Likewise.
3502 (dfs_accessible_p): Likewise.
3503 (protected_accessible_p): Likewise.
3504 (lookup_fnfields_1): Adjust documentation.
3505 (dfs_mark_primary_bases): Move to class.c
3506 (mark_primary_bases): Likewise.
3507 (dfs_vbase_unmark): Remove.
3508 (virtual_context): Use BINFO_FOR_VBASE.
3509 (dfs_get_vbase_types): Simplify.
3510 (dfs_build_inheritance_graph_order): New function.
3511 (get_vbase_types): Use it.
3512 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
3514 * tinfo.cc (get_vbase_offset): New function.
3515 (__vmi_class_type_info::do_find_public_src): Use it.
3516 (__vmi_class_type_info::do_dyncast): Likewise.
3517 (__vmi_class_type_info::do_upcast): Likewise.
3519 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
3521 * lang-specs.h: Pass -fno-show-column to the preprocessor.
3523 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
3525 * rtti.c (class_hint_flags): Rename flags.
3526 (class_initializer): Remove flags.
3527 (synthesize_tinfo_var): Combine offset and flags. Add flags
3528 for __vmi_class_type_info.
3529 (create_tinfo_types): Remove flags from __class_type_info and
3530 __si_class_type_info. Merge flags and offset from
3531 base_class_type_info.
3532 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
3533 (__base_class_info::is_virtual_p): Adjust.
3534 (__base_class_info::is_public_p): Adjust.
3535 (__base_class_info::offset): New accessor.
3536 (__class_type_info::details): Remove member.
3537 (__class_type_info::__class_type_info): Lose details.
3538 (__class_type_info::detail_masks): Remove.
3539 (__si_class_type_info::__si_class_type_info): Lose details.
3540 (__vmi_class_type_info::details): New member.
3541 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
3542 (__vmi_class_type_info::detail_masks): New member.
3543 * tinfo.cc (__class_type_info::do_upcast): Initialize result
3544 with unknown_details_mask.
3545 (__vmi_class_type_info::do_find_public_src): Adjust
3546 (__vmi_class_type_info::do_dyncast): Adjust.
3547 (__vmi_class_type_info::do_upcast): Set result details, if
3549 (__dynamic_cast): Temporarily #if out optimization.
3551 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
3553 * rtti.c (get_tinfo_decl): Mark used.
3554 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
3555 mark as dealt with, if we output it.
3557 2000-03-28 Mark Mitchell <mark@codesourcery.com>
3559 * class.c: Reorganize to put virtual function table initialization
3560 machinery at the end of the file.
3562 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
3564 * class.c (finish_struct): Use bitsize_zero_node.
3565 * pt.c (instantiate_class_template): Likewise.
3567 2000-03-28 Mark Mitchell <mark@codesourcery.com>
3569 Put RTTI entries at negative offsets in new ABI.
3570 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
3571 vbase offset at index -3, not -1.
3572 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
3573 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
3574 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
3575 (build_rtti_vtbl_entries): New function.
3576 (set_rtti_entry): Remove.
3577 (build_primary_vtable): Don't use it.
3578 (build_secondary_vtable): Likewise.
3579 (start_vtable): Remove.
3580 (first_vfun_index): New function.
3581 (set_vindex): Likewise.
3582 (add_virtual_function): Don't call start_vtable. Do call
3584 (set_primary_base): Rename parameter.
3585 (determine_primary_base): Likewise.
3586 (num_vfun_entries): Don't use skip_rtti_stuff.
3587 (num_extra_vtbl_entries): Include RTTI information.
3588 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
3589 (skip_rtti_stuff): Remove.
3590 (dfs_modify_vtables): Don't use it.
3591 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
3592 (layout_nonempty_base_or_field): Update size handling.
3593 (create_vtable_ptr): Tweak.
3594 (layout_class_type): Adjust parameter names.
3595 (finish_struct_1): Simplify.
3596 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
3597 (skip_rtti_stuff): Remove.
3598 (first_vfun_index): New function.
3599 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
3600 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
3601 (marked_vtable_pathp): Declare.
3602 (unmarked_vtable_pathp): Likewise.
3603 * error.c (dump_expr): Use first_vfun_index to calculate vtable
3605 * rtti.c (build_headof): Look for RTTI at negative offsets.
3606 (get_tinfo_decl_dynamic): Likewise.
3607 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
3609 (create_pseudo_type_info): Do it here instead. Adjust so that
3610 vptr points at first virtual function.
3611 * search.c (marked_vtable_pathp): Make it global.
3612 (unmarked_vtable_pathp): Likewise.
3613 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
3614 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
3615 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
3616 (get_pure_virtuals): Likewise.
3617 (expand_upcast_fixups): Likewise.
3618 * tree.c (debug_binfo): Likewise.
3619 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
3622 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3624 * class.c (check_field_decl): Fix typo.
3625 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
3626 (check_methods): Likewise.
3627 (check_field_decls): Likewise.
3628 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
3629 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
3630 Use DECL_RESULT_FLD, not DECL_RESULT.
3631 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
3632 * lex.c (identifier_type): Likewise.
3633 * pt.c (determine_specialization, lookup_template_class): Likewise.
3634 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
3635 (resolve_overloaded_unification, more_specialized): Likewise.
3636 * semantics.c (finish_member_declaration): Likewise.
3637 * typeck.c (build_x_function_call): Likewise.
3639 2000-03-26 Mark Mitchell <mark@codesourcery.com>
3641 * class.c (layout_empty_base): Handle empty bases with non-byte
3643 (build_base_field): Likewise.
3644 (layout_virtual_bases): Likewise.
3646 * class.c (finish_struct_1): Fix typo in this change:
3648 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3650 2000-03-25 Mark Mitchell <mark@codesourcery.com>
3652 * decl.c (grokdeclarator): Count partial specializations when
3653 keeping track of how many template classes have been seen.
3655 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
3657 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3659 * class.c (build_vbase_pointer_fields): layout_field now place_field.
3660 (get_vfield_offset): Use byte_position.
3661 (set_rtti_entry): Set OFFSET to ssizetype zero.
3662 (get_binfo_offset_as_int): Deleted.
3663 (dfs_record_base_offsets): Use tree_low_cst.
3664 (dfs_search_base_offsets): Likewise.
3665 (layout_nonempty_base_or_field): Reflect changes in RLI format
3666 and call byte_position.
3667 (layout_empty_base): Convert offset to ssizetype.
3668 (build_base_field): use rli_size_unit_so_far.
3669 (dfs_propagate_binfo_offsets): Do computation in proper type.
3670 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
3671 (layout_class_type): Reflect changes in RLI names and fields.
3672 (finish_struct_1): Set DECL_FIELD_OFFSET.
3673 * dump.c (dequeue_and_dump): Call bit_position.
3674 * expr.c (cplus_expand_constant): Use byte_position.
3675 * rtti.c (expand_class_desc): Use bitsize_one_node.
3676 * typeck.c (build_component_addr): Use byte_position and don't
3677 special case for zero offset.
3679 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
3681 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
3683 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
3685 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
3688 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3690 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
3692 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
3693 make_typename_type, check_initializer, cp_finish_decl,
3694 xref_tag): Likewise.
3695 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
3696 decl_namespace, arg_assoc_template_arg, arg_assoc,
3697 validate_nonmember_using_decl, do_class_using_decl): Likewise.
3698 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
3699 args_to_string): Likewise.
3700 * friend.c (is_friend): Likewise.
3701 * lex.c (note_got_semicolon, note_list_got_semicolon,
3702 is_global): Likewise.
3703 * method.c (build_overload_nested_name, build_overload_value,
3704 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
3705 * parse.y (typename_sub, typename_sub1): Likewise.
3706 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
3707 process_partial_specialization, convert_template_argument,
3708 template_args_equal, add_pending_template, lookup_template_class,
3709 for_each_template_parm_r, maybe_fold_nontype_arg,
3710 tsubst, instantiate_template, type_unification_real, unify,
3711 instantiate_pending_templates, set_mangled_name_for_template_decl):
3713 * repo.c (repo_get_id, repo_template_used): Likewise.
3714 * search.c (lookup_field_1): Likewise.
3715 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
3716 * xref.c (classname): Likewise.
3718 2000-03-22 Mark Mitchell <mark@codesourcery.com>
3720 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
3721 (CANONICAL_BINFO): New macro.
3722 (BINFO_NEW_VTABLE_MARKED): Use it.
3723 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
3724 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
3725 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
3727 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3728 (build_secondary_vtable): Likewise.
3729 (dfs_finish_vtbls): Likewise.
3730 (dfs_accumulate_vtbl_inits): Likewise.
3731 (accumulate_vtbl_inits): New function.
3732 (finish_vtbls): Make sure that virtual bases come after
3733 non-virtual bases in the vtable group.
3734 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
3735 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3736 * search.c (struct vbase_info): Move definition.
3737 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3738 (unmarked_new_vtable_p): Likewise.
3739 (dfs_mark_vtable_path): Remove.
3740 (dfs_mark_new_vtable): Remove.
3741 (dfs_unmark_new_vtable): Likewise.
3742 (dfs_clear_search_slot): Likewise.
3743 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3744 (dfs_clear_vbase_slots): Likewise.
3745 (init_vbase_pointers): LIkewise.
3747 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
3749 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
3750 SIZETYPE to a non-SIZETYPE.
3752 2000-03-21 Mark Mitchell <mark@codesourcery.com>
3754 * class.c (layout_virtual_bases): Adjust names in conditionally
3757 * class.c (record_base_offsets): New function.
3758 (layout_conflict_p): Likewise.
3759 (layout_nonempty_base_or_field): Use it.
3760 (layout_empty_base): New function.
3761 (build_base_field): Use it.
3762 (build_base_fields): Update comment.
3763 (layout_virtual_bases): Fold in a little code form
3764 layout_basetypes. Use layout_empty_base.
3765 (layout_basetypes): Remove.
3766 (end_of_class): New function.
3767 (layout_class_type): Use it. Adjust.
3769 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
3771 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
3773 (dfs_skip_nonprimary_vbases_markedp): Likewise.
3774 * typeck.c (fntype_p): Remove.
3776 * cp-tree.h (TI_SPEC_INFO): Remove.
3777 (CLASSTYPE_TI_SPEC_INFO): Likewise.
3778 * pt.c (process_partial_specialization): Likewise.
3780 * class.c (build_base_field): Fix thinko in computation of binfo
3783 * tree.c (mark_local_for_remap_p): Mark variables declared in
3784 TARGET_EXPRs as well.
3786 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
3788 * typeck.c (require_complete_type, complete_type,
3789 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
3790 build_array_ref, convert_arguments, pointer_diff,
3791 build_x_unary_op, build_unary_op, build_c_cast,
3792 build_modify_expr): Use COMPLETE_TYPE_P etc.
3793 * call.c (is_complete, convert_like_real,
3794 build_new_method_call): Likewise.
3795 * class.c (build_vbase_pointer_fields, check_bases,
3796 build_base_field, finish_struct_1, pushclass): Likewise.
3797 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
3798 * decl.c (maybe_process_template_type_declaration, pushtag,
3799 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
3800 layout_var_decl, check_initializer, cp_finish_decl,
3801 grokdeclarator, require_complete_types_for_parms,
3802 grok_op_properties, xref_tag, xref_basetypes,
3803 check_function_type): Likewise.
3804 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
3805 * friend.c (do_friend): Likewise.
3806 * init.c (build_offset_ref): Likewise.
3807 * parse.y (structsp): Likewise.
3808 * pt.c (maybe_process_partial_specialization,
3809 tsubst_friend_function, instantiate_class_template, tsubst,
3810 do_type_instantiation, instantiate_pending_templates): Likewise.
3811 * repo.c (repo_get_id): Likewise.
3812 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
3813 synthesize_tinfo_var, emit_support_tinfos): Likewise.
3814 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
3815 * semantics.c (begin_class_definition): Likewise.
3816 * tree.c (build_cplus_method_type): Likewise.
3817 * typeck2.c (digest_init, build_functional_cast,
3818 add_exception_specifier): Likewise.
3819 * parse.h, parse.c: Regenerated.
3821 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
3823 * inc/cxxabi.h: New header file. Define new-abi entry points.
3824 (__pointer_type_info::target): Rename member to ...
3825 (__pointer_type_info::type): ... here.
3826 (__base_class_info::type): Rename member to ...
3827 (__base_class_info::base): ... here.
3828 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
3829 * cp-tree.h (CPTI_ABI): New global tree enumeration.
3830 (abi_node): New global tree node.
3831 * decl.c (abi_node): Document.
3832 (init_decl_processing): Initialize abi_node.
3833 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
3834 (get_vmi_pseudo_type_info): Likewise.
3835 (create_tinfo_types): Likewise.
3836 (emit_support_tinfos): Likewise.
3837 * tinfo.h (cxxabi.h): Include for new-abi.
3838 Move rtti class definitions to new header file.
3839 * tinfo.cc (abi): Use the namespace.
3840 (std): Move new abi rtti classes from here ...
3841 (__cxxabiv1): ... to here.
3842 * tinfo2.cc (cxxabi.h): Include for new-abi.
3843 Move rtti class definitions to new header file.
3844 (std): Move new abi rtti classes from here ...
3845 (__cxxabiv1): ... to here.
3846 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
3849 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
3850 Jason Merrill <jason@casey.cygnus.com>
3852 * method.c (build_overload_int): Use host_integerp.
3854 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3856 * init.c (build_offset_ref): Handle the case of a templated member
3859 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3861 * except.c (expand_exception_blocks): Clear catch_clauses_last.
3863 2000-03-18 Mark Mitchell <mark@codesourcery.com>
3865 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
3866 * class.c (check_bitfield_decl): Turn illegal bitfields into
3868 (dfs_propagate_binfo_offsets): Adjust for new size_binop
3870 (dfs_offset_for_unshared_vbases): Likewise.
3871 * cvt.c (cp_convert_to_pointer): Convert NULL to a
3872 pointer-to-member correctly under the new ABI.
3873 * expr.c (cplus_expand_constant): Don't use cp_convert when
3874 turning an offset into a pointer-to-member.
3875 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
3876 when dereferencing them under the new ABI.
3877 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
3878 of pointers-to-members under the new ABI.
3880 * class.c (check_bitfield_decl): Remove restriction on really long
3882 (layout_class_type): Implement new ABI handling of bitfields
3883 longer than their types.
3885 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3887 * parse.y (extdefs): Call ggc_collect.
3888 * parse.c: Regenerated.
3890 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
3892 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
3893 (note_name_declared_in_class): Use OVL_CURRENT to get at a
3896 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3898 * class.c (build_vbase_path): Use integer_zerop.
3899 (build_vtable_entry): Use tree_low_cst.
3900 (get_vfield_offset): Use bit_position.
3901 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
3903 (check_bitfield_decl): Set DECL_SIZE using convert.
3904 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
3905 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
3907 (finish_struct_1): Use bit_position.
3908 (dump_class_hierarchy): Use tree_low_cst.
3909 * cp-tree.h (min_precision): Add declaration.
3910 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
3911 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
3912 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
3913 * expr.c (cplus_expand_constant): Use bit_position.
3914 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
3915 * rtti.c (get_base_offset): Use bit_position.
3916 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
3917 host_integerp, and tree_low_cst.
3918 (pointer_int_sum): Use integer_zerop.
3919 (build_component_addr): Use bit_position.
3921 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
3923 * typeck.c (require_complete_type): Don't assume size_zero_node.
3924 (complete_type_or_else): Likewise.
3926 2000-03-16 Steven Grady <grady@digitaldeck.com>
3927 Jason Merrill <jason@casey.cygnus.com>
3929 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
3931 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
3933 * decl2.c (grokfield): Bail out if type is error_mark_node.
3935 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
3937 * tinfo2.cc (__ptr_to_member_data): Rename to ...
3938 (__pointer_to_member_data): ... here. Adjust.
3939 * rtti.c (create_tinfo_types): Adjust.
3941 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
3943 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
3944 * decl.c (ref_desc_type_node): Undocument.
3945 * rtti.c (ptr_ref_initializer): Rename to ...
3946 (ptr_initializer): ... here. Adjust comments.
3947 (ptmd_initializer): Fix comment thinko.
3948 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
3949 (create_tinfo_types): Remove ref_desc_type_node init.
3950 * tinfo2.cc (__reference_type_info): Remove.
3952 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
3954 * decl.c (cp_finish_decl): Remove obsolete comment.
3956 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
3958 2000-03-14 Mark Mitchell <mark@codesourcery.com>
3960 * cp-tree.h: Tweak documentation.
3961 * class.c (build_vbase_pointer_fields): Layout the fields, too.
3962 (avoid_overlap): Remove.
3963 (get_binfo_offset_as_int): New function.
3964 (dfs_serach_base_offsets): Likewise.
3965 (layout_nonempty_base_or_field): Likewise.
3966 (build_base_field): Layout fields here. Avoid placing two objects
3967 of the same type at the same address, under the new ABI.
3968 (build_base_fields): Adjust accordingly.
3969 (create_vtable_ptr): Return the new field, but don't attach it to
3971 (remove_base_field): Remove.
3972 (remove_base_fields): Remove.
3973 (layout_basetypes): Adjust accordingly.
3974 (layout_class_type): Call layout_field for each field, rather than
3975 just making a wholesale call to layout_type.
3977 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
3979 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
3981 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
3983 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
3985 * except.c (dtor_nothrow): New fn.
3986 (do_pop_exception): Use it. Take type parm.
3987 (push_eh_cleanup): Take type parm.
3988 (expand_start_catch_block): Pass it.
3989 (build_eh_type_type_ref): Accept null type.
3991 2000-03-12 Mark Mitchell <mark@codesourcery.com>
3993 * cp-tree.h (revert_static_member_fn): Change prototype.
3994 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
3995 (grok_op_properties): Likewise.
3996 (start_function): Likewise.
3997 (revert_static_member_fn): Simplify.
3998 * pt.c (check_explicit_specialization): Adjust call to
3999 revert_static_member_fn.
4001 2000-03-11 Mark Mitchell <mark@codesourcery.com>
4003 * cp-tree.h (scope_kind): New type.
4004 (tmpl_spec_kind): Likewise.
4005 (declare_pseudo_global_level): Remove.
4006 (pseudo_global_level_p): Rename to template_parm_scope_p.
4007 (pushlevel): Remove declaration.
4008 (begin_scope): New function.
4009 (finish_scope): Likewise.
4010 (current_tmpl_spec_kind): Likewise.
4011 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
4012 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
4013 Add template_spec_p.
4014 (toplevel_bindings_p): Adjust.
4015 (declare_pseudo_global_level): Remove.
4016 (pseudo_global_level_p): Rename to template_parm_scope_p.
4017 (current_tmpl_spec_kind): New function.
4018 (begin_scope): Likewise.
4019 (finish_scope): Likewise.
4020 (maybe_push_to_top_level): Adjust.
4021 (maybe_process_template_type_declaration): Likewise.
4022 (pushtag): Likewise.
4023 (pushdecl_nonclass_level): Likewise.
4024 (lookup_tag): Likewise.
4025 (grokfndecl): Handle member template specializations. Share
4026 constructor and non-constructor code.
4027 * decl2.c (check_classfn): Handle member template specializations.
4028 * pt.c (begin_template_parm_list): Use begin_scope.
4029 (begin_specialization): Likewise.
4030 (end_specialization): Likewise.
4031 (check_explicit_specialization): Use current_tmpl_spec_kind.
4032 Handle member template specializations.
4033 (end_template_decl): Use finish_scope. Remove call to
4035 (push_template_decl_real): Remove bogus error message.
4036 (tsubst_decl): Fix typo in code contained in comment.
4037 (instantiate_template): Handle member template specializations.
4038 (most_general_template): Likewise.
4040 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
4042 * lex.c (whitespace_cr): Compress consecutive calls to warning().
4043 (do_identifier): Ditto for error().
4045 * pt.c (convert_nontype_argument): Ditto for cp_error().
4046 (convert_template_argument): Ditto for cp_pedwarn().
4048 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
4050 * exception.cc (__check_null_eh_spec): New fn.
4051 * except.c (expand_end_eh_spec): Call it if the spec is throw().
4053 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
4055 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
4056 * except.c (expand_end_eh_spec): Add the return type.
4057 * rtti.c (throw_bad_cast): Add the parmtypes.
4058 (throw_bad_typeid): Likewise.
4060 * semantics.c (expand_stmt): Only leave out rtl for unused
4061 artificials, and set DECL_IGNORED_P on them as well.
4062 * decl.c (wrapup_globals_for_namespace): Likewise.
4064 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
4066 * decl.c (maybe_commonize_var): Skip all artificial decls.
4067 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
4069 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
4071 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
4072 * cp-tree.h: Declare flag_enforce_eh_specs.
4073 * decl.c (store_parm_decls, finish_function): Check it.
4075 C library functions don't throw.
4076 * Makefile.in (cfns.h): New target.
4077 (except.o): Depend on it.
4078 * Make-lang.in (cc1plus): Depend on cfns.gperf.
4079 * cfns.gperf: New file.
4080 * cfns.h: Generated.
4081 * except.c: Include it.
4082 (nothrow_libfn_p): New fn.
4083 * decl.c (grokfndecl): Use it.
4084 * cp-tree.h: Declare it.
4086 * decl.c (push_overloaded_decl_1, auto_function,
4087 define_function): Lose.
4088 (build_library_fn_1): New static fn.
4089 (builtin_function): Use it.
4090 (get_atexit_node): Use build_library_fn_ptr.
4091 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
4092 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
4093 push_void_library_fn, push_throw_library_fn): New fns.
4094 * cp-tree.h: Declare them.
4095 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
4096 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
4097 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
4098 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
4099 * rtti.c (build_runtime_decl): Lose.
4100 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
4101 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
4102 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
4104 * call.c (build_call): Remove result_type parm.
4105 Call mark_used on unused artificial fns.
4106 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
4108 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
4110 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
4112 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
4113 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
4114 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
4115 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
4116 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
4117 expand_generic_desc): Likewise.
4119 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4121 * exception.cc (__cp_pop_exception): Cleanup the original object.
4123 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4125 * decl.c (grok_op_properties): Merge conversion to void warning
4126 with other silly op warnings.
4128 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
4130 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
4131 array CONSTRUCTOR elements. Don't use expr_tree_cons.
4133 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4135 * decl.c (cp_make_fname_decl): New function.
4136 (wrapup_globals_for_namespace): Don't emit unused static vars.
4137 (init_decl_processing): Remove comment about use of
4138 array_domain_type. Set make_fname_decl.
4139 (cp_finish_decl): Remove __FUNCTION__ nadgering.
4140 * semantics.c (begin_compound_stmt): Remove
4141 current_function_name_declared flagging.
4142 (expand_stmt): Don't emit unused local statics.
4143 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
4146 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4148 * typeck.c (convert_for_assignment): Don't look at array
4150 * call.c (convert_like_real): Likewise.
4152 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
4154 Add initial support for '\uNNNN' specifier.
4155 * lex.c (read_ucs): New fn.
4156 (readescape, skip_white_space): Call it.
4157 (is_extended_char, is_extended_char_1): New fns.
4158 (utf8_extend_token): New fn, #if 0'd out.
4159 (real_yylex): Treat extended chars like letters.
4161 * search.c (note_debug_info_needed): Walk the bases even if we
4162 weren't deferring the type itself.
4164 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4166 * decl2.c (finish_objects): Constify a char*.
4168 * method.c (emit_thunk): Likewise.
4170 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
4172 * typeck.c (dubious_conversion_warnings): Look through
4175 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4177 * class.c (dfs_modify_vtables): I is now unsigned.
4178 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
4179 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
4180 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
4181 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
4182 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
4183 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
4184 Call integer_all_onesp.
4185 * typeck2.c (process_init_constructor): Use compare_tree_int.
4187 * lang-specs.h (as): Don't call if -syntax-only.
4189 2000-03-06 Mark Mitchell <mark@codesourcery.com>
4191 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
4192 RTL_EXPR_HAS_NO_SCOPE after all.
4194 2000-03-05 Mark Mitchell <mark@codesourcery.com>
4196 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
4197 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
4198 RTL_EXPR_HAS_NO_SCOPE.
4200 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
4203 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
4205 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
4207 * call.c (convert_like): Macrofy.
4208 (convert_like_with_context): New macro.
4209 (convert_like_real): Renamed from convert_like. Add calling
4210 context parameters, for diagnostics. Add recursive flag. Call
4211 dubious_conversion_warnings for outer conversion.
4212 (build_user_type_conversion): Use convert_like_with_context.
4213 (build_over_call): Likewise. Don't warn about dubious
4214 conversions here. Adjust convert_default_arg calls.
4215 (convert_default_arg): Add context parameters for diagnostics.
4216 Pass throught to convert_like_with_context.
4217 * cp-tree.h (convert_default_arg): Add context parameters.
4218 (dubious_conversion_warnings): Prototype new function.
4219 * typeck.c (convert_arguments): Adjust convert_default_arg call.
4220 (dubious_conversion_warnings): New function, broken
4221 out of convert_for_assignment.
4222 (convert_for_assignment): Adjust.
4224 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
4226 * decl2.c (key_method): Break out from...
4227 (import_export_vtable, import_export_class): ...here.
4229 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
4230 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
4232 * search.c (note_debug_info_needed, dfs_debug_mark,
4233 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
4234 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
4236 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
4238 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
4241 2000-03-02 Mark Mitchell <mark@codesourcery.com>
4243 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
4244 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
4245 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
4246 (lang_type): Split gets_new into has_new and has_array_new.
4247 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4248 (TYPE_GETS_NEW): Split into ...
4249 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
4250 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
4251 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
4252 (build_op_new_call): Don't declare.
4253 (build_new_1): Likewise.
4254 * call.c (build_op_new_call): Remove.
4255 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4256 instead of TYPE_NEEDS_DESTRUCTOR.
4257 (finish_struct_bits): Likewise.
4258 (add_implicitly_declared_members): Likewise.
4259 (check_field_decl): Likewise.
4260 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
4261 correctly under the new ABI.
4262 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4263 instead of TYPE_NEEDS_DESTRUCTOR.
4264 (initialize_local_var): Likewise.
4265 (destroy_local_var): Likewise.
4266 (cp_finish_decl): Likewise.
4267 (register_dtor_fn): Likewise.
4268 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
4269 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
4270 TYPE_VEC_DELETE_TAKES_SIZE here.
4271 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
4272 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
4273 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4274 (finish_destructor_body): Likewise.
4275 (maybe_build_cleanup_1): Likewise.
4276 * decl2.c (do_static_destruction): Likewise.
4277 * init.c (build_new_1): Make it static.
4278 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4279 (expand_cleanup_for_base): Likewise.
4280 (get_cookie_size): New function.
4281 (build_new_1): Handle array-new cookies correctly under the new
4283 (build_vec_delete_1): Likewise.
4284 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4285 (build_delete): Likewise.
4286 (build_vec_delete): Handle array-new cookies correctly under the new
4288 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4289 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
4290 TYPE_HAS_ARRAY_NEW_OPERATOR.
4291 * ptree.c (print_lang_type): Check them.
4292 * search.c (context_for_name_lookup): Fix typo in comment.
4293 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4294 * tree.c (break_out_cleanups): Likewise.
4295 (build_cplus_array_test_1): Likewise.
4296 (cp_build_qualified_type_real): Likewise.
4297 * typeck.c (complete_type): Likewise.
4299 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
4300 the command-line, not the end.
4302 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
4304 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
4306 2000-03-02 Tom Tromey <tromey@cygnus.com>
4308 * cp-tree.h (build_java_class_ref): Declare.
4309 * init.c (build_java_class_ref): No longer static.
4310 * except.c (expand_throw): Generate a Java-style `throw' if the
4311 thrown object is a "Java" object.
4312 (initialize_handler_parm): Generate a Java-style lookup of
4313 exception info if the caught object is a "Java" object.
4314 (catch_language, catch_language_init): New globals.
4315 (decl_is_java_type): New function.
4316 (expand_start_catch_block): Don't call push_eh_info() or
4317 push_eh_cleanup() when handling a Java-style "catch". Pass Java
4318 class reference to build_catch_block.
4320 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4322 * typeck.c (comptypes): Treat sizetype like its language equivalent.
4324 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
4326 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
4327 to merge reference/pointer code and fix incorrect warnings.
4329 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
4331 * search.c (protected_accessible_p): Use context_for_name_lookup.
4333 * init.c (construct_virtual_bases): Fix thinko.
4334 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
4336 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
4338 * decl.c (current_function_decl): Move to toplev.c.
4340 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
4342 * pt.c (fn_type_unification): Unify return type, whenever
4344 (get_bindings_real): Only pass return type when necessary.
4345 Remove explicit return type check.
4346 * class.c (resolve_address_of_overloaded_function): Pass desired
4347 return type to fn_type_unification.
4349 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4351 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
4353 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
4355 * rtti.c (expand_class_desc): Likewise.
4356 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
4357 (THUNK_VCALL_OFFSET): Likewise.
4358 (THUNK_DELTA): Reflect changes in ../tree.h.
4360 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
4362 * search.c (protected_accessible_p): Also allow the access if
4363 the member is public in DERIVED. Lose TYPE parm.
4364 (friend_accessible_p): Lose TYPE parm.
4365 (accessible_p): Adjust.
4367 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4369 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
4370 on things that are not sizes; ssize_binop deleted.
4371 Call size_diffop when appropriate.
4372 (dfs_build_vcall_offset_vtbl_entries): Likewise.
4373 (build_primary_vtable, build_secondary_vtable): Likewise.
4374 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
4375 Variable I is HOST_WIDE_INT.
4376 (get_vfield_offset): Pass proper types to size_binop.
4377 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
4378 (finish_struct_1): Likewise.
4379 (skip_rtti_stuff): Arg N is now pointer to signed.
4380 (layout_class_type): Use size_zero_node.
4381 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
4382 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
4383 * decl.c (complete_arry_type): Pass proper types to size_binop.
4384 (xref_basetypes): BINFO_OFFSET is sizetype.
4385 * error.c (dump_expr): Don't use size_binop non-sizes.
4386 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
4387 * init.c (construct_virtual_bases): Fix type error.
4388 (build_vec_delete_1): Pass proper type to size_binop and don't
4390 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
4391 * rtti.c (get_base_offset): Pass proper type to size_binop.
4392 * search.c (dfs_find_vbases): Fix type error.
4393 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
4394 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
4395 * tree.c (debug_binfo): Variable N is signed.
4396 Use HOST_WIDE_INT_PRINT_DEC.
4397 * typeck.c (comptypes): sizetype is same as equivalent integer type.
4398 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
4399 size_one_node and size_zero_node.
4400 (c_alignof): Use size_one_node.
4401 (build_component_addr): Pass proper types to size_binop.
4402 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
4404 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
4406 Implement class scope using-declarations for functions.
4407 * class.c (handle_using_decl): Call add_method for used functions.
4408 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
4409 (add_method): Used functions are hidden by local functions.
4410 (check_bases_and_members): Handle using-decls before finalizing
4411 CLASSTYPE_METHOD_VEC.
4412 * call.c (add_function_candidate): Add ctype parm; if non-zero,
4413 override the type of 'this' accordingly.
4414 (add_template_candidate, add_template_candidate_real): Add ctype parm.
4415 (convert_class_to_reference, build_user_type_conversion_1,
4416 build_new_function_call, build_object_call, build_new_op,
4417 build_new_method_call): Pass ctype parm.
4419 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
4421 * call.c (convert_class_to_reference, build_user_type_conversion_1,
4422 build_new_function_call, build_object_call, build_new_op,
4423 build_new_method_call, build_op_delete_call): Don't get basetype_path
4425 * typeck.c (build_component_ref): Likewise.
4426 * init.c (build_offset_ref): Likewise.
4427 (resolve_offset_ref): Don't call enforce_access.
4428 Call build_scoped_ref.
4429 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
4430 would cause an error or if -pedantic.
4431 * class.c (alter_access): Lose binfo parm.
4433 2000-02-26 Mark Mitchell <mark@codesourcery.com>
4435 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
4438 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
4440 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
4441 pseudo_type_info creation into the std namespace
4443 2000-02-26 Mark Mitchell <mark@codesourcery.com>
4445 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
4446 (import_export_class): Remove declaration.
4447 * decl2.c (import_export_class): Make it static.
4448 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
4449 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
4450 EXPR_WITH_FILE_LOCATION.
4451 * lex.c (check_newline): Tweak filename/lineno setting.
4452 * semantics.c (begin_while_stmt): Fix typo in comment.
4454 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4456 * lang-options.h (-fmessage-length=): Add missing option.
4458 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
4460 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
4462 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
4464 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
4466 * optimize.c (expand_call_inline): Emit the return label before
4467 evaluating the return value.
4469 2000-02-24 Mark Mitchell <mark@codesourcery.com>
4471 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
4472 than duplicating functionality here.
4473 * optimize.c: Include input.h.
4474 (expand_call_inline): Use push_srcloc and pop_srcloc.
4475 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
4476 * parse.c: Regenerated.
4477 * Makefile.in (lex.o): Depend on input.h.
4478 (optimize.o): Likewise.
4480 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
4482 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
4483 function type, rather than ICE.
4485 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
4487 * decl.c (grokdeclarator): Call decl_type_access_control.
4488 * parse.y (parse_end_decl): Don't call decl_type_access_control if
4491 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
4493 * decl.c (decls_match): Remove obsolete static member nadgering.
4495 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4497 * decl.c (grokdeclarator): Change ANSI to ISO.
4498 * lex.c (consume_string, readescape, do_identifier): Likewise.
4499 (parse_float, real_yylex): Likewise.
4500 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
4501 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
4502 new_type_id, maybe_label_decls, simple_stmt,
4503 for.init.statement): Likewise.
4504 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
4505 * semantics.c (finish_named_return_value): Likewise.
4506 * parse.c: Regenerate.
4508 2000-02-21 Mark Mitchell <mark@codesourcery.com>
4510 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
4511 (CPTI_CLASS_STAR_TYPE): Remove.
4512 (vtable_index_type): Likewise.
4513 (class_star_type_node): Remove.
4514 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
4515 (build_binary_op_nodefault): Remove.
4516 * call.c (build_new_op): Use build_binary_op instead of
4517 build_binary_op_nodefault.
4518 * decl.c (init_decl_processing): Remove class_star_type_node
4519 initialization. Make delta_type_node ptrdiff_type_node under the
4520 new ABI. Initialize vtable_index_type.
4521 (build_ptrmemfunc_type): Build different structures for the new
4523 (build_enumerator): Use build_binary_op instead of
4524 build_binary_op_nodefault.
4525 * method.c (build_overload_value): Mangle pointers-to-members
4526 appropriately under the new ABI.
4527 * typeck.c (build_array_ref): Use build_binary_op instead of
4528 build_binary_op_nodefault.
4529 (get_member_function_from_ptrfunc): Adjust for the new ABI.
4530 (build_binary_op_nodefault): Rename to ...
4531 (build_binary_op): ... this. Remove old version. Adjust for
4532 pointer-to-member comparisons under the new ABI.
4533 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
4534 (build_ptrmemfunc): Adjust for the new ABI.
4535 (expand_ptrmemfunc_cst): Likewise.
4536 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
4537 (pfn_from_ptrmemfunc): Adjust for the new ABI.
4539 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
4541 * call.c (build_object_call): Compress consecutive calls to
4543 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
4544 (build_op_delete_call): Adjust message formatting.
4546 * class.c (check_bases): Compress consecutive calls to
4548 (finish_struct_anon): Say 'ISO C++'.
4550 * decl.c (start_decl): Same here.
4551 (grok_reference_init): Likewise.
4552 (grokfndecl): Correct message formatting.
4553 (grokfndecl): Improve diagnostic.
4554 (check_static_variable_definition): Likewise. Say 'ISO C++'
4555 (compute_array_index_type): Say 'ISO C++'
4556 (create_array_type_for_decl): Compress consecutive calls to
4558 (grokdeclarator): Say 'ISO C++'
4559 (grok_op_properties): Likewise.
4561 * decl2.c (delete_sanity): Clairify diagnostic.
4562 (check_member_template): Same here.
4563 (grok_function_init): Use consistent terminology.
4565 * expr.c (do_case): Say 'ISO C++'
4567 * friend.c (do_friend): Compress consecutive calls to warning.
4569 2000-02-20 Mark Mitchell <mark@codesourcery.com>
4571 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
4572 * class.c (build_secondary_vtable): Reorganize. Don't create a
4573 new vtable under the new ABI.
4574 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
4576 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
4577 the initializing elements.
4578 (initialize_vtable): New function.
4579 (dfs_finish_vtbls): Use it.
4580 (dfs_accumulate_vtbl_inits): New function.
4581 (finish_vtbls): Merge primary and secondary vtables under the new
4583 (finish_struct_1): Remove redundant call to layout_vtable_decl.
4584 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
4587 * class.c (build_vtable): New function, split out from ...
4588 (get_vtable_decl): ... here, and ...
4589 (build_secondary_vtable): ... here.
4591 * pt.c (tsubst_decl): Fix formatting.
4593 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4595 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
4596 (avoid_overlap, build_base_field): Likewise.
4597 (build_base_field, build_base_fields, is_empty_class):
4598 Test DECL_SIZE with integer_zero.
4599 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
4600 * cp-tree.h (struct lang_type): New field size_unit.
4601 (CLASSTYPE_SIZE_UNIT): New macro.
4602 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
4603 (cp_finish_decl): Delete -Wlarger-than processing.
4604 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
4605 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
4606 * tree.c (make_binfo): binfo vector is one entry longer.
4607 (walk_tree): Walk DECL_SIZE_UNIT.
4609 2000-02-19 Mark Mitchell <mark@codesourcery.com>
4611 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
4613 (build_vtable_entry): Don't assume all vtable entries are
4615 (build_vtbl_initializer): Adjust accordingly.
4616 (get_vtable_decl): Fix formatting.
4618 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
4620 * semantics.c (deferred_type_access_control): Walk the entire
4622 (save_type_access_control): Rename from
4623 initial_deferred_type_access_control. Just remember the value.
4624 (decl_type_access_control): New fn.
4625 (begin_function_definition): Use deferred_type_access_control, after
4626 we've started the function. Set type_lookups to error_mark_node.
4627 * parse.y (frob_specs, fn.def1): Adjust.
4628 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
4629 (parse_end_decl, parse_bitfield0, parse_method): New fns.
4630 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
4631 (after_type_component_declarator0): Likewise.
4632 (after_type_component_declarator): Likewise.
4633 (notype_component_declarator): Likewise.
4634 * cp-tree.h: Adjust.
4636 * decl.c (redeclaration_error_message): Allow redeclaration of
4637 namespace-scope decls.
4639 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
4641 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
4643 2000-02-17 Mark Mitchell <mark@codesourcery.com>
4645 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
4646 * decl2.c (grokclassfn): Likewise.
4648 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
4650 * decl2.c (lang_decode_option): Don't set default message length
4652 * lex.c (lang_init_options): Set it here.
4654 2000-02-16 Mark Mitchell <mark@codesourcery.com>
4656 Make DECL_CONTEXT mean the class in which a member function was
4657 declared, even for a virtual function.
4658 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
4659 (DECL_FRIEND_CONTEXT): New macro.
4660 (DECL_REAL_CONTEXT): Remove.
4661 (SET_DECL_FRIEND_CONTEXT): Likewise.
4662 (DECL_VIRTUAL_CONTEXT): Adjust.
4663 (DECL_CLASS_SCOPE_P): Use TYPE_P.
4664 (add_friends): Remove.
4665 (hack_decl_function_context): Likewise.
4666 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
4668 (build_over_call): Fix indentation. Use DECL_CONTEXT
4669 instead of DECL_CLASS_CONTEXT.
4670 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
4671 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
4672 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4673 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
4674 (build_base_field): Likewise.
4675 (finish_struct_1): Likewise.
4676 (build_self_reference): Likewise.
4677 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
4679 (pushtag): Use decl_function_context, not
4680 hack_decl_function_context.
4681 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4682 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
4683 (pushdecl): Remove bogus code.
4684 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
4685 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4686 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4687 Use decl_function_context, nothack_decl_function_context.
4688 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
4689 (grokdeclarator): Likewise. Use decl_function_context, not
4690 hack_decl_function_context.
4691 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
4692 (start_function): Use DECL_FRIEND_CONTEXT, not
4693 DECL_CLASS_CONTEXT. Use decl_function_context, not
4694 hack_decl_function_context.
4695 (finish_function): Use decl_function_context, not
4696 hack_decl_function_context.
4697 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
4699 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
4700 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
4701 (grokfield): Likewise.
4702 (finish_builtin_type): Likewise.
4703 (finish_vtable_vardec): Use decl_function_context, not
4704 hack_decl_function_context.
4705 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4706 (start_static_initialization_or_destruction): Likewise.
4707 (finish_static_initialization_or_destruction): Likewise.
4708 (mark_used): Adjust logic for deciding when to synthesize methods.
4709 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
4711 * error.c (dump_function_decl): Use DECL_CONTEXT, not
4713 * friend.c (is_friend): Likewise.
4714 (add_friends): Remove.
4715 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
4716 * lex.c (begin_definition_of_inclass_inline): Use
4717 decl_function_context, not hack_decl_function_context.
4718 (process_next_inline): Likewise.
4719 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4720 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
4721 DECL_CLASSS_CONTEXT.
4722 (hack_identifier): Likewise.
4723 (synthesize_method): Use decl_function_context, not
4724 hack_decl_function_context.
4725 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
4727 (is_member_template): Use decl_function_context, not
4728 hack_decl_function_context. Use DECL_CONTEXT, not
4730 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
4732 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
4734 (push_template_decl_real): Likewise.
4735 (instantiate_class_template): Don't call add_friends.
4736 (tsubst_default_argument): Use DECL_CONTEXT, not
4738 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
4739 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4740 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
4742 * repo.c (repo_inline_used): Likewise.
4743 * search.c (current_scope): Adjust for new _CONTEXT macros.
4744 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
4746 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4747 (lookup_fnfields_here):Likewise.
4748 (check_final_overrider): Likewise.
4749 (init_vbase_pointers): Likewise.
4750 (virtual_context): Likewise.
4751 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
4752 (expand_body): Use decl_function_context, not
4753 hack_decl_function_context.
4754 * tree.c (hack_decl_function_context): Remove.
4755 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
4757 * typeck2.c (error_not_base_type): Likewise.
4759 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
4761 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
4763 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4765 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
4767 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
4769 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
4771 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
4773 * decl2.c (lang_decode_option): Enable automatic line wrapping.
4775 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
4777 * parse.y (frob_specs): Split out...
4778 (parse_decl): From here.
4779 (fn.def2): Call initial_deferred_type_access_control.
4780 (after_type_component_declarator0): Call frob_specs.
4781 (notype_component_declarator0): Likewise.
4782 * search.c (friend_accessible_p): Nested classes are friends of their
4785 2000-02-10 Mark Mitchell <mark@codesourcery.com>
4787 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
4788 used to create an implicit temporary.
4790 * class.c (dfs_modify_vtables): Tweak calculation of functions to
4793 2000-02-08 Nathan Sidwell <nathan@acm.org>
4795 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
4796 strip array element qualifiers too.
4798 2000-02-07 Mark Mitchell <mark@codesourcery.com>
4800 * decl.c (store_parm_decls): Don't build cleanups for parameters
4801 while processing_template_decl.
4803 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
4805 * cp-tree.h (struct saved_scope): Add incomplete field.
4806 (namespace_scope_incomplete): New macro.
4807 * decl.c (pushdecl): Use it.
4808 (hack_incomplete_structures): Use it. See through artificial
4810 (mark_saved_scope): Mark it.
4812 Implement access control for nested types.
4813 * search.c (type_access_control): New fn.
4814 (accessible_p): Now we do perform access control for types.
4815 * semantics.c (deferred_type_access_control): New fn.
4816 (initial_deferred_type_access_control): New fn.
4817 (begin_function_definition): Call it. Add lookups parm.
4818 * decl.c (struct binding_level): Add this_class field.
4819 (pushlevel_class): Set it.
4820 (mark_binding_level): Mark it.
4821 (lookup_name_real): Use it. Call type_access_control.
4822 (mark_saved_scope): Mark lookups field.
4823 * cp-tree.h (flagged_type_tree): Add lookups field.
4824 (struct saved_scope): Add lookups field.
4825 (type_lookups): New macro.
4826 * parse.y (declmods): Now <ftype>.
4827 (parse_decl): Add lookups parm. Call
4828 initial_deferred_type_access_control.
4829 (lang_extdef): Clear type_lookups.
4830 (typed_declspecs, declmods, typespec): Set lookups field.
4831 (initdcl): Call deferred_type_access_control.
4832 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
4833 component_decl_1, named_parm): Adjust.
4834 * friend.c (is_friend): Nested classes are friends of their
4837 * class.c (currently_open_derived_class): New fn.
4838 * method.c (hack_identifier): Use it.
4840 * lex.c (do_identifier): Remove obsolete code.
4842 * parse.y (typed_typespecs): Propagate new_type_flag properly.
4844 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
4846 * tinfo.h: Remove apostrophes from C++ comment (xgettext
4847 thinks this file is plain C).
4849 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4851 * Makefile.in (call.o): Depend on $(EXPR_H).
4853 * call.c: Include "expr.h".
4855 * class.c (dump_class_hierarchy): Add prototype.
4857 * search.c (dfs_get_pure_virtuals): Likewise.
4859 2000-02-1 Ulrich Drepper <drepper@redhat.com>
4861 * parse.y (simple_stmt): Allow :: token in asm parameter list.
4864 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
4866 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
4867 Store it in DECL_FCONTEXT.
4868 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
4870 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
4872 * tinfo.h (old abi): #include "tconfig.h".
4873 * tinfo.cc (convert_to_base): Move into old abi section.
4875 2000-01-31 Mark Mitchell <mark@codesourcery.com>
4877 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
4878 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
4879 (BINFO_PRIMARY_BINFO): New macro.
4880 (BF_DELTA): Rename to ...
4881 (BV_DELTA): ... this.
4882 (BF_VCALL_INDEX): Rename to ...
4883 (BV_VCALL_INDEX): ... this.
4884 (BF_FN): Rename to ...
4886 * class.c (build_vbase_path): Adjust for changes to reverse_path.
4887 (set_rtti_entry): Rename BF_ macros to BV_ variants.
4888 (modify_vtable_entry): Simplify.
4889 (add_virtual_function): Rename BF_ macros to BV_ variants.
4890 (build_vtable_initializer): Likewise.
4891 (get_class_offset_1): Remove.
4892 (dfs_get_class_offset): Likewise.
4893 (get_class_offset): Likewise.
4894 (dfs_find_final_overrider): New function.
4895 (find_final_overrider): Likewise.
4896 (modify_one_vtable): Remove.
4897 (dfs_find_base): New function.
4898 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
4899 find_final_overrider.
4900 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
4902 (dfs_fixup_vtable_deltas): Remove.
4903 (override_one_vtable): Remove.
4904 (merge_overrides): Likewise.
4905 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
4906 unreal chilren of virtual bases.
4907 (finish_struct_1): Don't use merge_overrides. Don't use
4908 dfs_fixup_vtable_deltas.
4909 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
4912 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
4913 Jason Merrill <jason@yorick.cygnus.com>
4915 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
4917 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
4919 * exception.cc (__throw_bad_typeid): Add missing std::.
4921 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4923 * cp-tree.h (make_thunk): PROTO -> PARAMS.
4925 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
4927 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
4929 Runtime support for new-abi rtti.
4930 * inc/typeinfo (type_info::operator!=): Define in class.
4931 (type_info::before, type_info::name, type_info::operator==,
4932 type_info::operator!=): Define new ABI implementations.
4933 (type_info::is_pointer_p, type_info::is_function_p): Declare
4934 new virtual functions.
4935 (type_info::do_catch, type_info::do_upcast): Likewise.
4937 * tinfo.h (__base_class_info): Define new class.
4938 (__class_type_info): Likewise.
4939 (__si_class_type_info): Likewise.
4940 (__vmi_class_type_info): Likewise.
4941 (__dynamic_cast): Prototype.
4943 * tinfo.cc: Conditionalize old and new rtti mechanisms.
4944 (type_info::is_pointer_p): Define new function.
4945 (type_info::is_function_p): Likewise.
4946 (type_info::do_catch): Likewise.
4947 (type_info::do_upcast): Likewise.
4948 (vtable_prefix): New structure for vtable access.
4949 (adjust_pointer): Define new template function.
4950 (contained_p, public_p, virtual_p, contained_public_p,
4951 contained_nonpublic_p, contained_nonvirtual_p): Define new
4953 (nonvirtual_base_type): New local variable.
4954 (__class_type_info::~__class_type_info): Define.
4955 (__si_class_type_info::~__si_class_type_info): Likewise.
4956 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
4957 (__class_type_info::do_catch): Define new function.
4958 (__class_type_info::do_upcast): Likewise.
4959 (__class_type_info::find_public_src): Likewise.
4960 (__class_type_info::do_find_public_src): Likewise.
4961 (__si_class_type_info::do_find_public_src): Likewise.
4962 (__vmi_class_type_info::do_find_public_src): Likewise.
4963 (__class_type_info::do_dyncast): Likewise.
4964 (__si_class_type_info::do_dyncast): Likewise.
4965 (__vmi_class_type_info::do_dyncast): Likewise.
4966 (__class_type_info::do_upcast): Likewise.
4967 (__si_class_type_info::do_upcast): Likewise.
4968 (__vmi_class_type_info::do_upcast): Likewise.
4969 (__dynamic_cast): Likewise.
4971 * tinfo2.cc (__fundamental_type_info): Define new class.
4972 (__pointer_type_info): Likewise.
4973 (__reference_type_info): Likewise.
4974 (__array_type_info): Likewise.
4975 (__function_type_info): Likewise.
4976 (__enum_type_info): Likewise.
4977 (__ptr_to_member_type_info): Likewise.
4978 (__fundamental_type_info::~__fundamental_type_info): Define.
4979 (__pointer_type_info::~__pointer_type_info): Likewise.
4980 (__reference_type_info::~__reference_type_info): Likewise.
4981 (__array_type_info::~__array_type_info): Likewise.
4982 (__function_type_info::~__function_type_info): Likewise.
4983 (__enum_type_info::~__enum_type_info): Likewise.
4984 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
4985 (__pointer_type_info::do_catch): Define new function.
4986 (__ptr_to_member_type_info::do_catch): Define new function.
4988 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
4989 (__is_pointer): Likewise.
4991 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
4993 2000-01-30 Mark Mitchell <mark@codesourcery.com>
4995 * cp/class.c (build_vtable): Rename to build_primary_vtable.
4996 (prepare_fresh_vtable): Rename to build_secondary_vtable.
4997 (make_new_vtable): New function.
4998 (modify_vtable_entry): Handle generation of new vtables correctly.
4999 (modify_one_vtable): Remove unused parameter.
5000 (dfs_fixup_vtable_deltas): Likewise.
5001 (override_one_vtable): Use build_secondary_vtable.
5002 (finish_struct_1): Use build_primary_vtable and
5003 build_secondary_vtable.
5005 2000-01-28 Ulrich Drepper <drepper@redhat.com>
5007 * cp/decl.c: Adjust variable names, comments, help strings.
5009 2000-01-29 Nathan Sidwell <nathan@acm.org>
5011 * new2.cc (operator delete[]): Use operator delete, don't assume
5014 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
5016 * class.c (build_vtbl_initializer): Add argument to
5017 build_vtable_entry call.
5019 2000-01-27 Mark Mitchell <mark@codesourcery.com>
5021 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
5022 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
5023 (BF_DELTA): New macro.
5024 (BF_VCALL_INDEX): Likewise.
5026 (THUNK_VCALL_OFFSET): Likewise.
5027 (make_thunk): Change prototype.
5028 * class.c (build_vtable_entry): Integrate
5029 build_vtable_entry_for_fn. Handle vcall indices.
5030 (build_vtable_entry_for_fn): Remove.
5031 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
5032 BF_VCALL_INDEX, BF_FN.
5033 (modify_vtable_entry): Integrate common code from
5034 modify_one_vtable and dfs_fixup_vtable_deltas.
5035 (add_virtual_function): Set BF_VCALL_INDEX.
5036 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
5038 (modify_one_vtable): Simplify.
5039 (dfs_fixup_vtable_deltas): Likewise.
5040 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
5041 * method.c (make_thunk): Handle vcall indices.
5043 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
5045 Compiler side new abi rtti (not enabled).
5046 * cp-tree.h (new_abi_rtti_p): New macro.
5047 (emit_support_tinfos): Prototype new function.
5048 (tinfo_decl_p): Likewise.
5049 (emit_tinfo_decl): Likwise.
5050 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
5052 (doing_runtime): New local static.
5053 (init_rtti_processing): Add new-abi initializer.
5054 (get_tinfo_decl): Add new-abi logic.
5055 (tinfo_from_decl): Likewise.
5056 (build_dynamic_cast_1): Likewise.
5057 (qualifier_flags): New static function.
5058 (tinfo_base_init): Likewise.
5059 (generic_initializer): Likewise.
5060 (ptr_ref_initializer): Likewise.
5061 (ptmd_initializer): Likewise.
5062 (class_hint_flags): Likewise.
5063 (class_initializer): Likewise.
5064 (synthesize_tinfo_var): Likewise.
5065 (create_real_tinfo_var): Likewise.
5066 (create_pseudo_type_info): Likewise.
5067 (get_vmi_pseudo_type_info): Likewise.
5068 (create_tinfo_types): Likewise.
5069 (emit_support_tinfos): New global function.
5070 (tinfo_decl_p): New global predicate.
5071 (emit_tinfo_decl): New global function.
5072 * class.c (set_rtti_entry): Generalize for old and new rtti.
5073 (build_vtbl_initializer): Likewise.
5074 * decl2.c (finish_file): Likewise.
5076 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
5078 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
5079 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
5081 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
5083 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
5086 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
5088 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
5090 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
5092 * optimize.c (calls_setjmp_r): Supply new argument
5093 to special_function_p.
5095 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5097 * call.c: PROTO -> PARAMS.
5098 * class.c: Likewise.
5099 * cp-tree.h: Likewise.
5103 * decl2.c: Likewise.
5105 * errfn.c: Likewise.
5106 * error.c: Likewise.
5107 * except.c: Likewise.
5110 * input.c: Likewise.
5113 * method.c: Likewise.
5114 * optimize.c: Likewise.
5115 * parse.y: Likewise.
5119 * search.c: Likewise.
5120 * semantics.c: Likewise.
5123 * typeck.c: Likewise.
5124 * typeck2.c: Likewise.
5127 2000-01-25 Richard Henderson <rth@cygnus.com>
5129 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
5131 2000-01-25 Mark Mitchell <mark@codesourcery.com>
5133 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
5134 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
5135 (struct vcall_offset_data_s): New type.
5136 (dfs_vcall_offset_queue_p): New function.
5137 (dfs_build_vcall_offset_vtbl_entries): Likewise.
5138 (build_vcall_offset_vtbl_entries): Likewise.
5139 (layout_vtable_decl): Likewise.
5140 (num_vfun_entries): Likewise.
5141 (num_extra_vtbl_entries): Add the entries for vcall offsets.
5142 (build_vtbl_initializer): Likewise.
5143 (dfs_finish_vtabls): Use layout_vtable_decl.
5144 (modify_one_vtables): Always duplicate vtables under the new ABI.
5145 (finish_struct_1): Use layout_vtable_decl.
5147 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5149 * decl.c (member_function_or_else): Change third arg from a format
5150 specifier to an `enum overload_flags'. Callers changed.
5152 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
5154 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
5155 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
5156 build_const_cast, get_delta_difference, check_return_expr): Avoid
5157 ANSI string concatenation usage.
5159 2000-01-24 Mark Mitchell <mark@codesourcery.com>
5161 * class.c (layout_class_type): Put the fields required to make a
5162 class non-empty at the end, not the beginning, of the TYPE_FIELDs
5165 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
5167 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
5170 * decl2.c (mark_used): Do instantiate inlines that have been
5171 explicitly instantiated.
5173 2000-01-24 Richard Henderson <rth@cygnus.com>
5175 * call.c (build_over_call): Use expand_tree_builtin.
5176 * typeck.c (build_function_call_real): Likewise.
5177 (build_binary_op_nodefault): Handle unordered compares.
5179 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
5181 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
5182 cp_tree_index values.
5183 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
5184 New global node #defines for them.
5185 * rtti.c (call_void_fn): Replace with ...
5186 (build_runtime_decl): ... new static function.
5187 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
5188 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
5189 (build_dynamic_cast_1): Always produce correctly typed result.
5190 Explicitly produce type_info addresses. Use dynamic_cast_node.
5191 * exception.cc (__throw_bad_cast): Return `void *'.
5192 (__throw_bad_typeid): Return `const type_info &'.
5194 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
5196 * cp-tree.h (get_vtable_decl): Prototype new function.
5197 * class.c (get_vtable_decl): New function. Broken out from ...
5198 (build_vtable): ... here. Use it.
5199 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
5202 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
5204 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
5205 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
5206 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
5207 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
5208 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
5209 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
5210 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
5211 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
5212 (CPTI_TINFO_VAR_ID): New enumeration.
5213 (__tp_desc_type_node, __access_mode_type_node,
5214 __bltn_desc_type_node, __user_desc_type_node,
5215 __class_desc_type_node, __ptr_desc_type_node,
5216 __attr_desc_type_node, __func_desc_type_node,
5217 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
5218 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
5219 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
5220 enum_desc_type_node, class_desc_type_node,
5221 si_class_desc_type_node, vmi_class_desc_type_node,
5222 ptmd_desc_type_node, base_desc_type_node): New #defines.
5223 (tinfo_fn_id, tinfo_fn_type): Rename to ...
5224 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
5225 (tinfo_var_id): New enumeration.
5226 (DECL_TINFO_FN_P): Augment comment.
5227 * decl.c (cp_global_trees): Adjust documentation.
5228 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
5229 tinfo_decl_type and tinfo_var_id.
5230 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
5231 (build_typeid): Remove unused variable.
5232 (get_tinfo_var): Use tinfo_var_id.
5233 (tinfo_name): New static function.
5234 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
5235 (tinfo_from_decl): Likewise.
5236 (get_base_offset): New static function, broken out of
5238 (expand_si_desc): Use tinfo_name.
5239 (expand_class_desc): Likewise. Lose local static variable.
5240 Use base_desc_type_node. Use get_base_offset.
5241 (expand_ptr_desc): Use tinfo_name.
5242 (expand_attr_desc): Likewise.
5243 (expand_generic_desc): Likewise.
5245 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
5246 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
5248 2000-01-23 Mark Mitchell <mark@codesourcery.com>
5250 * cp-tree.h (__eprintf): Remove declaration.
5251 * tree.c (__eprintf): Remove definition.
5253 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
5254 Mark Mitchell <mark@codesourcery.com>
5256 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
5257 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
5259 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
5261 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
5263 2000-01-23 Mark Mitchell <mark@codesourcery.com>
5265 * cp-tree.h (register_dtor_fn): New function.
5266 * decl.c (destroy_local_static): Rename to ...
5267 (register_dtor_fn): ... this. Give it external linkage.
5268 (expand_static_init): Use it.
5269 * decl2.c (do_static_initialization): Likewise, if using
5271 (do_static_destruction): Check that __cxa_atexit is not in use.
5272 (finish_file): Don't call do_static_destruction if using
5275 * typeck.c (convert_arguments): Restore two-message error
5278 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
5280 Remap dynamic cast hint values to be consistent across ABIs.
5281 * search.c (dynamic_cast_base_recurse): Remap generated value.
5282 (get_dynamic_cast_base_type): Adjust documentation.
5283 * tinfo.h (__user_type_info::dyncast): Likewise.
5284 (__user_type_info::find_public_subobj): Remap BOFF meaning.
5285 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
5286 (__class_type_info::do_dyncast): Likewise.
5287 (__class_type_info::do_find_public_subobj): Likewise.
5288 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
5290 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
5292 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
5294 * typeck2.c (incomplete_type_error): Restore previous
5295 cp_error and cp_error_at call sequence.
5297 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
5299 * class.c (dump_class_hierarchy): Make format agree with argument;
5300 cast pointer to unsigned long and print with %lx.
5302 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
5304 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
5306 * typeck.c (composite_pointer_type, common_type,
5307 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
5308 build_function_call_real, convert_arguments,
5309 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
5310 build_unary_op, mark_addressable, build_compound_expr,
5311 build_static_cast, build_reinterpret_cast, build_const_cast,
5312 build_c_cast, build_modify_expr, get_delta_difference,
5313 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
5314 'ISO C++'. Fusion consecutive calls to diagnotic message routines
5316 * typeck2.c (readonly_error, abstract_virtuals_error,
5317 process_init_constructor, check_for_new_type): Likewise.
5319 2000-01-19 Mark Mitchell <mark@codesourcery.com>
5321 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
5324 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
5326 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
5327 (build_x_typeid): Likewise.
5328 (get_tinfo_fn): Likewise.
5329 (get_tinfo_fn_unused): Rename to ...
5330 (get_tinfo_decl): ... here.
5331 * rtti.c (build_headof): Replace logic error with assertion.
5332 (get_tinfo_fn_dynamic): Rename to ...
5333 (get_tinfo_decl_dynamic): ... here. Make static. Use
5334 complete_type_or_else.
5335 (build_x_typeid): Move into ...
5336 (build_typeid): ... here. Adjust call to
5337 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
5338 throw_bad_typeid expression.
5339 (get_tinfo_fn_unused): Rename to ...
5340 (get_tinfo_decl): ... here. Adjust comment.
5341 (get_tinfo_fn): Delete.
5342 (tinfo_from_decl): New static function.
5343 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
5344 (get_typeid): Use complete_type_or_else.
5345 (build_dynamic_cast_1): Adjust calls to
5346 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
5347 * parse.y (primary): Adjust call to build_typeid.
5348 * except.c (build_eh_type_type_ref): Adjust call to
5349 get_tinfo_decl. Mark as used.
5350 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
5351 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
5352 * parse.c: Regenerated.
5354 2000-01-17 Mark Mitchell <mark@codesourcery.com>
5356 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
5358 (resolves_to_fixed_type_p): Document calling convention.
5359 * rtti.c (build_x_typeid): Initialize NONNULL.
5361 * cp-tree.h (build_shared_int_cst): New function.
5362 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
5363 * class.c (modify_vtable_entry): Likewise.
5364 (add_virtual_function): Split out code to generated shared
5365 INTEGER_CSTs to build_share_int_cst.
5366 (modify_all_vtables): Handle all the overridden functions here.
5367 Add overridden functions from non-primary virtual bases to the
5369 (finish_struct_1): Adjust call to modify_all_vtables. Add
5370 overridden functions from non-primary bases to the vtable.
5371 * tree.c (build_shared_int_cst): New function.
5373 * cp-tree.h (scratchalloc): Remove.
5374 (build_scratch_list): Likewise.
5375 * call.c (convert_class_to_reference): Replace build_scratch_list
5376 and build_expr_list with build_tree_list.
5377 (add_candidate): Replace scratchalloc with expralloc. Note memory
5379 (build_user_type_conversion_1): Replace build_scratch_list
5380 and build_expr_list with build_tree_list.
5381 (build_new_op): Likewise.
5382 (build_op_delete_call): Likewise.
5383 (convert_like): Likewise.
5384 * cvt.c (ocp_convert): Likewise.
5385 * decl.c (start_decl): Likewise.
5386 (start_function): Likewise.
5387 (finish_destructor_body): Likewise.
5388 (maybe_build_cleanup_1): Likewise.
5389 * decl2.c (reparse_decl_as_expr): Likewise.
5390 * init.c (perform_member_init): Likewise.
5391 (expand_cleanup_for_base): Likewise.
5392 (build_builtin_delete_call): Likewise.
5393 (build_new_1): Likewise.
5394 (build_delete): Likewise.
5395 * method.c (do_build_assign_ref): Likewise.
5396 * parse.y (already_scoped_stmt): Likewise.
5397 (nontrivial_exprlist): Likewise.
5398 (net_initializer): Likewise.
5399 (initlist): Likewise.
5400 * parse.c: Regenerated.
5401 * rtti.c (build_x_typeid): Likewise.
5402 (build_dynamic_cast_1): Likewise.
5403 * typeck.c (build_x_compound_expr): Likewise.
5404 (build_static_cast): Likewise.
5405 (build_modify_expr): Likewise.
5407 * cp-tree.h (DECL_VINDEX): Add documentation.
5408 * class.c (build_vtable_entry): Likewise.
5409 (start_vtable): Add comment.
5410 (add_virtual_function): Replace pending_hard_virtuals with
5411 overridden_virtuals and pending_virtuals with new_virtuals.
5412 Replace redundant assignments with assertions.
5413 (check_for_override): Add comment.
5414 (check_bases_and_members): Replace pending_hard_virtuals with
5415 overridden_virtuals and pending_virtuals with new_virtuals.
5416 (create_vtbl_ptr): Likewise.
5417 (layout_class_type): Likewise.
5418 (finish_struct_1): Likewise. Add comments.
5420 2000-01-16 Mark Mitchell <mark@codesourcery.com>
5422 * class.c (finish_struct_1): Replace redundant code with
5425 * cp-tree.h (flag_new_abi): Move.
5426 (flag_use_cxa_atexit): Likewise.
5427 (flag_honor_std): Likewise.
5428 (flag_rtti): Likewise.
5429 (vbase_offsets_in_vtable_p): Define.
5430 (vptrs_present_everywhere_p): Likewise.
5431 (TYPE_CONTAINS_VPTR_P): Likewise.
5432 (dfs_walk_real): Declare.
5433 * class.c (build_vbase_pointer_fields): Check
5434 vbase_offsets_in_vtable_p.
5435 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
5437 (build_vbase_offset_vtbl_entries): Simplify.
5438 (build_vbase_offset_vtbl_entries): Adjust.
5439 (build_vbase_pointer): Add ability to look up vbase offsets in
5441 (start_vtable): New function.
5442 (add_virtual_function): Use it.
5443 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
5444 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
5445 (build_vtbl_initializer): Take the type of the complete object as
5446 input. Use it to correctly calculate vbase offsets.
5447 (dfs_finish_vtbls): Pass the complete type to
5448 build_vtbl_initializer.
5449 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
5450 (create_vtable_ptr): Create a vtable even if there are no
5451 new virtual functions, under the new ABI.
5452 (finish_struct_1): Likewise.
5453 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
5454 * decl.c (exapnd_static_init): Remove call to
5455 preserve_initializer.
5456 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
5458 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
5459 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
5460 (construct_virtual_bases): Don't initialize virtual base pointers
5462 (build_aggr_init): Clean up comment.
5463 (expand_aggr_init_1): Likewise.
5464 * rtti.c (expand_class_desc): Store the virtual function table
5465 index where the vbase offset lives in the offset field.
5466 * search.c (dfs_walk_real): Make it global.
5467 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
5468 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
5470 * tinfo.h (USItype): Make it signed under the new ABI.
5471 * tinfo.cc (convert_to_base): New function. Encapsulate base
5472 conversion logic here.
5473 (__class_type_info::do_upcast): Use it.
5474 (__class_type_info::do_dyncast): Likewise.
5475 (__class_type_info::do_find_public_subobj): Likewise.
5477 * init.c (construct_virtual_bases): Don't look up the addresses of
5478 virtual bases at run-time.
5480 * class.c (build_vbase_pointer): Relocate.
5481 (build_vbase_pointer_fields): Likewise.
5482 (dfs_build_vbase_offset_vtbl_entries): Likewise.
5483 (build_vbase_offset_vtbl_entries): Likewise.
5485 * decl.c (init_decl_processing): Complain if -fnew-abi
5486 -fno-vtable-thunks is used.
5488 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
5491 2000-01-15 Mark Mitchell <mark@codesourcery.com>
5493 * cp-tree.h (num_extra_vtbl_entries): New function.
5494 (size_extra_vtbl_entries): Likewise.
5495 (dfs_vtable_path_unmark): Likewise.
5496 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
5497 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
5498 * class.c (num_extra_vtbl_entries): New function.
5499 (size_extra_vtbl_entries): Likewise.
5500 (dfs_build_vbase_offset_vtbl_entries): New function.
5501 (build_vbase_offset_vtbl_entries): Likewise.
5502 (build_vtbl_initializer): Use it.
5503 (finish_struct_1): Adjust vtable sizes (using
5504 num_extra_vtbl_entries).
5505 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
5506 THUNK_DECL is non-NULL before expanding it.
5507 * init.c (expand_virtual_init): Adjust the vtable pointer by
5508 size_extra_vtbl_entries before storing it.
5509 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
5510 Handle TREE_LIST parameters here, not in the dfs_* functions.
5511 (dfs_unmarked_real_bases_queue_p): Adjust.
5512 (dfs_marked_real_bases_queue_p): Likewise.
5513 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
5514 (dfs_vtable_path_marked_real_bases_queue_p): New function.
5515 (dfs_vtable_path_unmark): Likewise.
5517 2000-01-14 Mark Mitchell <mark@codesourcery.com>
5519 * optimize.c (copy_body_r): Clear the operand three of a
5520 TARGET_EXPR when copying it.
5522 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5524 * method.c (build_decl_overload_real): Check whether we are in ::
5525 before returning __builtin_new/delete.
5527 2000-01-13 Mark Mitchell <mark@codesourcery.com>
5529 * pt.c (tsubst_friend_function): Improve comment.
5530 (instantiate_decl): Avoid crashing when a "nested" function is
5531 instantiated from the top level.
5533 * dump.c (dqeueue_and_dump): Dump
5534 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
5536 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5538 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
5540 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
5542 * g++spec.c (lang_specific_driver): Add -fnew-abi if
5543 ENABLE_NEW_GXX_ABI defined.
5544 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
5545 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
5546 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
5548 2000-01-12 Mark Mitchell <mark@codesourcery.com>
5550 * decl.c (start_cleanup_fn): Call pushdecl.
5552 * call.c (convert_class_to_reference): Fix typos.
5553 (build_conditional_expr): Handle errors gracefully.
5554 * class.c (push_nested_class): Likewise.
5555 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
5556 (DECL_THIS_EXTERN): Use it.
5557 (DECL_THIS_STATIC): Likewise.
5558 * cvt.c (convert_to_void): Handle errors gracefully.
5559 (build_expr_type_conversion): Likewise.
5560 * decl.c (maybe_push_decl): Likewise.
5561 (start_decl_1): Likewise.
5562 (require_complete_types_for_parms): Likewise.
5563 * parse.y (structsp): Likewise.
5564 (base_class): Likewise.
5565 * parse.c: Regenerated.
5566 * pt.c (finish_member_template_decl): Likewise.
5567 * typeck.c (decay_conversion): Likewise.
5569 * cp-tree.h (dfs_skip_vbases): New function.
5570 (find_vbase_instance): Likewise.
5571 * class.c (determine_primary_base): Allow a nearly empty base to
5572 serve as a primary base class under the new ABI.
5573 (get_class_offset_1): Rename to ...
5574 (dfs_get_class_offset): ... this. Simplify. Don't issue error
5576 (get_class_offset): Use it. Issue error messages here.
5577 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
5578 find the right copies of virtual bases.
5579 (fixup_vtable_deltas1): Rename to ...
5580 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
5581 bases as primary bases.
5582 (fixup_vtable_deltas): Remove.
5583 (override_one_vtable): Handle virtual bases as primary bases.
5584 (merge_overrides): Likewise.
5585 (finish_struct_1): Likewise.
5586 (dump_class_hierarchy): Dump primary-ness of bases as well.
5587 * search.c (mark_primary_bases): Use a pre-order traversal to
5588 handle primary virtual bases.
5589 (dfs_skip_vbases): New fiunction.
5590 (expand_upcast_fixups): Adjust to handle primary virtual bases.
5591 (fixup_virtual_upcast_offsets): Likewise.
5592 (fixup_all_virtual_upcast_offsets): Likewise.
5593 (dfs_find_vbase_instances): New function.
5594 (find_vbase_instance): Likewise.
5596 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
5598 * lex.c (DIR_SEPARATOR): Delete macro.
5600 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
5602 * decl2.c (lang_decode_option): Handle automatic line wrapping
5605 2000-01-11 Mark Mitchell <mark@codesourcery.com>
5607 * friend.c (do_friend): Don't resolve scopes when processing
5608 template declarations, even if the qualifying scope doesn't
5609 involve template parameters.
5611 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
5613 * class.c (dfs_modify_vtables_queue_p): Remove.
5614 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
5615 and dfs_marked_real_bases_queue_p instead of
5616 dfs_modify_vtables_queue_p.
5618 * class.c (build_vbase_path): Simplify.
5619 (dfs_propagate_binfo_offsets): New function.
5620 (propagate_binfo_offsets): Use it.
5621 (remove_base_field): Simplify.
5622 (dfs_set_offset_for_vbases): Remove.
5623 (dfs_set_offset_for_shared_vbases): New function.
5624 (dfs_set_offset_for_unshared_vbases): Likewise.
5625 (layout_virtual_bases): Use them.
5626 (layout_basetypes): Don't call propagate_binfo_offsets.
5627 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
5630 * class.c (build_base_field): New function, split out from ...
5631 (build_base_fields): ... here. Use it. Allocate primary bases
5632 first, under the new ABI.
5633 (get_vtable_entry): Remove.
5634 (remove_base_field): New function, split out from ...
5635 (remove_base_fields): ... here. Adjust since primary bases come
5636 first under the new ABI.
5638 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
5639 (initialize_vtbl_ptrs): New function.
5640 (expand_indirect_vtbls_init): Change prototype.
5641 (convert_pointer_to_vbase): Declare.
5642 * init.c (expand_direct_vtbls_init): Remove.
5643 (dfs_initialize_vtbl_ptrs): New function.
5644 (initialize_vtbl_ptrs): Likewise.
5645 (emit_base_init): Use initialize_vtbl_ptrs.
5646 * search.c (convert_pointer_to_vbase): Make it global.
5647 (expand_indirect_vtbls_init): Remove vtable initialization code.
5648 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
5650 * class.c (dfs_finish_vtbls): New function.
5651 (finish_vtbls): Use it.
5652 (dump_class_hierarchy): New function.
5654 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
5655 (BINFO_VBASE_PRIMARY_P): New macro.
5656 (BINFO_VIRTUALS): Add to documentation.
5657 (SET_BINFO_PRIMARY_MARKED_P): Remove.
5658 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5659 (dfs_mark_primary_bases_queue_p): Likewise.
5660 (dfs_unmarked_real_bases_queue_p): New function.
5661 (dfs_marked_real_bases_queue_p): Likewise.
5662 * search.c (dfs_mark_primary_bases): Adjust.
5663 (mark_primary_bases): Likewise.
5664 (get_shared_vbase_if_not_primary): New function.
5665 (dfs_unmarked_real_bases_queue_p): Likewise.
5666 (dfs_marked_real_bases_queue_p): Likewise.
5667 (dfs_get_pure_virtuals): Simplify.
5668 (get_pure_virtuals): Likewise.
5670 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5672 * lex.c: Include tm_p.h.
5674 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
5676 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
5678 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
5680 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
5681 * pt.c (instantiate_decl): Defer comdat templates that might not be
5684 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
5685 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
5686 (finish_file): Likewise.
5688 * decl2.c (import_export_class): Undo 12/14 change.
5690 * error.c (dump_decl): operator new, not operatornew.
5692 * class.c (field_decl_cmp): A nontype is "greater" than a type.
5693 * search.c (lookup_field_1): Look for the last field with the
5696 2000-01-05 Nathan Sidwell <nathan@acm.org>
5698 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
5701 2000-01-05 Nathan Sidwell <nathan@acm.org>
5703 * typeck.c (build_static_cast): Don't strip target qualifiers
5704 when casting from a class.
5706 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5708 * class.c (warn_hidden): Initialize variable `fndecl'.
5710 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
5712 * decl.c (flag_isoc9x): New variable to be able to use code in
5713 c-common.c. For now always zero.
5715 2000-01-03 Mark Mitchell <mark@codesourcery.com>
5717 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
5718 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
5719 or unshare_base_binfos for virtual bases here.
5720 * search.c (dfs_get_vbase_types): Do it here.
5721 (get_vbase_types): Adjust.
5723 2000-01-02 Mark Mitchell <mark@codesourcery.com>
5725 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
5726 (BINFO_PRIMARY_MARKED_P): Use flag 5.
5727 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
5728 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5729 (unmark_primary_bases): Remove declaration.
5730 (unmarkedp): Declare.
5731 (dfs_vbase_unmark): Likewise.
5732 * class.c (determine_primary_base): Return immediately if there
5733 are no base classes. Call mark_primary_bases here.
5734 (modify_all_direct_vtables): Remove.
5735 (modify_all_indirect_vtables): Remove.
5736 (dfs_modify_vtables_queue_p): New function.
5737 (dfs_modify_vtables): New function.
5738 (modify_all_vtables): Use them.
5739 (build_base_fields): Build FIELD_DECLs for primary virtual base
5741 (create_vtable_ptr): Don't call determine_primary_base here.
5742 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
5743 (dfs_set_offset_for_vbases): ... this.
5744 (layout_virtual_bases): Use it.
5745 (layout_class_type): Call determine_primary_base here.
5746 * search.c (unmarkedp): Make it global.
5747 (shared_marked_p): Simplify.
5748 (shared_unmarked_p): Likewise.
5749 (dfs_primary_bases_queue_p): Remove.
5750 (dfs_unmark_primary_bases): Likewise.
5751 (unmark_primary_bases): Likewise.
5752 (mark_primary_bases): Simplify.
5753 (get_pure_virtuals): Don't call mark_primary_bases here.
5754 (dfs_vbase_unmark): New function.
5755 (get_vbase_types): Simplify.
5757 * class.c (struct base_info): Remove.
5758 (determine_primary_base): Take has_virtual_p rather than a
5759 base_info as input. Don't calculate max_has_virtual.
5760 (finish_struct_bits): Remove max_has_virtual argument.
5761 (create_vtable_ptr): Remove max_has_virtual_p argument.
5762 (layout_virtual_bases): Remove max argument.
5763 (layout_basetypes): Likewise.
5764 (layout_class_type): Remove max_has_virtual_p argument.
5765 (finish_struct_1): Remove max_has_virtual.
5767 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
5768 (layout_basetypes): Remove.
5769 * class.c (propagate_binfo_offsets): Moved here from tree.c.
5770 Update to handle primary virtual bases.
5771 (remove_base_fields): New function, split out from
5773 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
5774 (layout_virtual_bases): New function, split out from
5775 layout_basetypes. Update to handle primary virtual bases.
5776 (layout_basetypes): Moved here from tree.c. Use
5777 remove_base_fields and layout_virtual_bases.
5778 * search.c (dfs_mark_primary_bases_queue_p): New function.
5779 (mark_primary_bases): Use it.
5780 * tree.c (CEIL): Remove.
5781 (propagate_binfo_offsets): Remove.
5782 (layout_basetypes): Remove.
5784 2000-01-01 Mark Mitchell <mark@codesourcery.com>
5786 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
5787 (BINFO_PRIMARY_MARKED_P): New macro.
5788 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
5789 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5790 (mark_primary_bases): New function.
5791 (unmark_primary_bases): Likewise.
5792 * search.c (get_abstract_virtuals_1): Remove.
5793 (dfs_mark_primary_bases): New function.
5794 (mark_primary_bases): Likewise.
5795 (dfs_unmark_primary_bases): Likewise.
5796 (unmark_primary_bases): Likewise.
5797 (dfs_get_pure_virtuals): Likewise.
5799 2000-01-01 Mark Mitchell <mark@codesourcery.com>
5801 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
5802 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
5803 (modify_one_vtable): Adjust.
5804 (fixup_vtable_deltas1): Likewise.
5805 (override_one_vtable): Likewise.
5806 * search.c (get_abstract_virtuals_1): Likewise.
5807 (get_pure_virtuals): Likewise.
5808 (expand_upcast_fixups): Likewise.
5809 * tree.c (debug_binfo): Likewise.
5811 * class.c (build_vtable): Don't return a value. Don't rebuild
5812 vtables for bases that have already been handled.
5813 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
5814 already been handled.
5815 (modify_one_vtable): Adjust accordingly.
5816 (fixup_vtable_deltas1): Likewise.
5817 (finish_struct_1): Likewise.
5819 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5821 * call.c (build_new_method_call): Also check destructors.