* decl2.c: Silently ignore -Wstrict-prototypes; warn about
[official-gcc.git] / gcc / cp / ChangeLog
blob80428d4494cca3677b6ff2e1e20c647f23deca4c
1 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
3         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
4         -Wno-strict-prototypes.
6         * g++spec.c: Adjust type of second argument to
7         lang_specific_driver, and update code as necessary.
9         * cp-tree.h: Don't prototype min_precision here.
10         (my_friendly_assert): Cast expression to void.
11         * semantics.c (do_poplevel): Initialize scope_stmts.
13 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
15         * cp-tree.h (DECL_NEEDED_P): Tweak.
17 2000-07-28  Jason Merrill  <jason@redhat.com>
19         * lang-specs.h: Use %i in rule for .ii files.
21 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
23         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
25 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
27         Allow indirect primary bases.
28         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
29         primary_base.
30         (CLASSTYPE_VFIELD_PARENT): Remove.
31         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
32         (BINFO_PRIMARY_BINFO): Remove.
33         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
34         (BINFO_VBASE_PRIMARY_P): Likewise.
35         (BINFO_PRIMARY_BASE_OF): New macro.
36         (BINFO_INDIRECT_PRIMARY_P): Likewise.
37         (get_primary_binfo): New function.
38         * decl.c (lang_mark_tree): Make lang_type::primary_base.
39         * class.c (vcall_offset_data_s): Rename to ...
40         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
41         and add ctor_vtbl_p.
42         (get_derived_offset): Use get_primary_binfo.
43         (dfs_mark_primary_bases): Adjust handling of virtual primary
44         bases.
45         (mark_primary_bases): Likewise.
46         (set_primary_base): Take a binfo, not an integer, as a
47         representation of the primary base.
48         (indirect_primary_base_p): Remove.
49         (determine_primary_base): Adjust for indirect primary bases.
50         (dfs_find_final_overrider): Fix typo in coment.
51         (update_vtable_entry_for_fn): Use get_primary_binfo.
52         (layout_nonempty_base_or_field): Tweak.
53         (build_base_fields): Adjust for new primary base semantics.
54         (dfs_propagate_binfo_offsets): Remove.
55         (propagate_binfo_offsets): Rewrite.
56         (dfs_set_offset_for_shared_vbases): Remove.
57         (layout_virtual_bases): Don't use it.
58         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
59         ABI.
60         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
61         CLASSTYPE_VFIELD_PARENT.
62         (dfs_get_primary_binfo): New function.
63         (get_primary_binfo): Likewise.
64         (dump_class_hierarchy_r): Tweak printing of primary bases.
65         (build_vtbl_initializer): Fix typo in comments.  Use
66         vtbl_init_data.
67         (build_vcall_and_vbase_vtbl_entries): Likewise.
68         (build_vbaes_offset_vtbl_entries): Likewise.
69         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
70         BV_VCALL_INDEX to handle indirect primary bases.
71         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
72         (build_rtti_vtbl_entries): Likewise.
73         * search.c (get_shared_vbase_if_not_primary): Tweak.
74         (find_vbase_instance): Likewise.
75         (binfo_for_vtable): Simplify.
76         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
77         (make_binfo): Make it have 11 entries.
78         
79 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
81         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
82         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
83         ascertaining primaryness.
84         (G): Remove template_args.
85         (decl_is_template_id): New function.
86         (write_encoding): Use decl_is_template_id.
87         (write_name): Likewise.  Handle type_decls.  Get main variant of
88         type decls.
89         (write_nested_name): Likewise.
90         (write_prefix): Likewise.
91         (write_template_prefix): Likewise.
92         (write_special_name_constructor): Remove defunct production from
93         comment.
94         (write_bare_function_type): Remove comment about absent parameter.
95         (write_template_template_arg): Add missing grammar production to
96         comment.
98 2000-07-27  Jason Merrill  <jason@redhat.com>
100         * decl.c (duplicate_decls): If common_type produces a non-typedef
101         type for a typedef, just use the old type.
103 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
105         * cp-tree.h (function_depth): Declare.
106         (verify_stmt_tree): Likewise.
107         (find_tree): Likewise.
108         * decl.c (function_depth): Give it external linkage.
109         * optimize.c (optimize_function): Increment and decrement it.
110         * tree.c (verify_stmt_tree_r): New function.
111         (verify_stmt_tree): Likewise.
112         (find_tree_r): Likewise.
113         (find_tree): Likewise.
115 2000-07-27  Jason Merrill  <jason@redhat.com>
117         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
118         TYPE_PTRMEMFUNC_P.
119         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
121 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
123         * decl.c (start_cleanup_fn): Mark the function as `inline'.
124         * decl2.c (get_guard): Call cp_finish_decl, not
125         rest_of_decl_compilation, for local guards.
126         * lex.c (do_identifier): Remove unused variable.
128 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
130         * parse.y:  Add missing ';'.
132 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
134         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
135         of `extern "C++"'.
137 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
139         Kill strict_prototype. Backwards compatibility only for
140         non NO_IMPLICIT_EXTERN_C systems.
141         * cp-tree.h (flag_strict_prototype): Remove.
142         (strict_prototype): Remove.
143         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
144         * decl.c (maybe_push_to_top_level): Adjust.
145         (pop_from_top_level): Adjust.
146         (decls_match): Only allow sloppy parm matching for ancient
147         system headers.
148         (init_decl_processing): Adjust.
149         (grokdeclarator): Adjust.
150         * decl2.c (flag_strict_prototype): Remove.
151         (strict_prototype): Remove.
152         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
153         (lang_f_options): Remove "strict-prototype".
154         (unsupported-options): Add "strict-prototype".
155         * lex.c (do_identifier): Adjust.
156         (do_scoped_id): Adjust.
157         * parse.y (empty_parms): Adjust.
158         * class.c (push_lang_context): Adjust.
159         (pop_lang_context): Adjust.
160         * typeck.c (comp_target_parms): Adjust.
162 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
164         * decl.c (poplevel): Deal with anonymous variables at for scope.
165         (maybe_inject_for_scope_var): Likewise.
167 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
169         * decl.c: Remove all signal handling code, now done in toplev.c.
171 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
173         * decl.c (make_rtl_for_nonlocal_decl): Rework.
175         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
176         correctly.
178 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
180         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
181         Define my_friendly_assert and my_friendly_abort as macros
182         which may call friendly_abort.  Prototype friendly abort, not
183         my_friendly_abort or my_friendly_assert.
184         * decl.c (signal_catch): Report the signal caught in the error
185         message.  Call fatal directly.
186         * typeck2.c (ack, my_friendly_assert): Delete.
187         (my_friendly_abort): Rename to friendly_abort.  Expect file,
188         line, and function parameters.  Report the abort code, then
189         call fancy_abort.  Do not mask an abort if errors have
190         already occurred.
192 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
194         * typeck.c (comp_target_parms): Remove obsolete parameter.
195         (comp_target_types): Adjust.
197 2000-07-17  Jason Merrill  <jason@redhat.com>
199         * typeck.c (mark_addressable): Never set TREE_USED.
200         * call.c (build_call): Don't abort on calls to library functions
201         that have been declared normally.
203         * typeck.c (build_binary_op): Fix grammar in warning.
205         * exception.cc (__eh_free): Fix prototype.
207         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
209         * decl.c (pushdecl): Handle seeing an OVERLOAD in 
210         IDENTIFIER_NAMESPACE_VALUE.
212 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
214         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
215         * method.c (use_thunk): Correct handling of vcall offsets.
217 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
219         * .cvsignore: parse.h and parse.c have no cp- prefix.
221 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
223         * .cvsignore: New file.
225 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
227         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
229 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
231         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
232         * parse.c: Remove.
233         * parse.h: Likewise.
235 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
237         * class.c (layout_class_type): Add pointers to virtual bases after
238         base classes under the old ABI.
240 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
242         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
243         (finish_continue_stmt): Likewise.
244         (begin_for_stmt): Remove call to note_level_for_for.
245         (finish_goto_stmt): Change call from build_min_nt
246         to build_stmt.
247         (finish_expr_stmt): Likewise.
248         (begin_if_stmt): Likewise.
249         (begin_while_stmt): Likewise.
250         (finish_while_stmt): Likewise.
251         (finish_return_stmt): Likewise.
252         (begin_for_stmt): Likewise.
253         (finish_for_stmt): Likewise.
254         (finish_break_stmt): Likewise.
255         (begin_switch_stmt): Likewise.
256         (finish_case_label): Likewise.
257         (genrtl_try_block): Likewise.
258         (begin_try_block): Likewise.
259         (begin_handler): Likewise.
260         (begin_compound_stmt): Likewise.
261         (finish_asm_stmt): Likewise.
262         (finish_label_stmt): Likewise.
263         (add_decl_stmt): Likewise.
264         (finish_subobject): Likewise.
265         (finish_decl_cleanup): Likewise.
266         (finish_named_return_value): Likewise.
267         (setup_vtbl_ptr): Likewise.
268         (add_scope_stmt): Likewise.
269         * decl.c (finish_constructor_body): Likewise.
270         (finish_destructor_body): Likewise.
271         * optimize.c (copy_body_r): Likewise.
272         (initialize_inlined_parameters): Likewise.
273         (declare_return_variable): Likewise.
274         (expand_call_inline): Likewise.
275         
276 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
278         * semantics.c (expand_body): Sync interface information
279         at the end of function body expansion.
281 2000-07-09  Jason Merrill  <jason@redhat.com>
283         * init.c (build_new_1): Bail early if the call to new fails.
285         * decl.c (compute_array_index_type): Check specifically for 
286         an INTEGER_CST, not just TREE_CONSTANT.
288         * decl.c (duplicate_decls): Don't call duplicate_decls on 
289         the DECL_TEMPLATE_RESULT.
290         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
291         codes.
293         * error.c (dump_template_bindings): Don't crash if we had an
294         invalid argument list.
296         * typeck.c (c_expand_start_case): Do narrowing here.
297         * semantics.c (finish_switch_cond): Not here.
299 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
301         * parse.y (asm_clobbers): Do string concatenation.
303 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
305         * decl.c (pushtag): Don't put local classes in template functions
306         on the local_classes list.
308 2000-07-04  Scott Snyder  <snyder@fnal.gov>
310         * decl2.c (get_guard): Add missing return for old ABI local
311         variable case.
313 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
315         * cp-tree.h (char_type_p): New function.
316         * decl.c (init_decl_processing): Don't initialize
317         signed_wchar_type_node or unsigned_wchar_type_node.
318         (complete_array_type): Handle brace-enclosed string-constants.
319         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
320         * tree.c (char_type_p): New function.
321         * typeck2.c (digest_init): Use char_type_p.
323 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
325         * pt.c (tsubst): Don't layout type, if it's error_mark.
327 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
329         * pt.c (instantiate_pending_templates): Reset template level.
331 2000-07-05  Jason Merrill  <jason@redhat.com>
333         * call.c (joust): Don't complain about `operator char *()' beating
334         `operator const char *() const'.
336 2000-07-04  scott snyder  <snyder@fnal.gov>
337             Jason Merrill  <jason@redhat.com>
339         * repo.c (repo_get_id): Handle the case where a class with virtual 
340         bases has a null TYPE_BINFO_VTABLE.
342 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
343             Jason Merrill  <jason@redhat.com>
345         * parse.y (member_init): Just pass in the type.
346         * init.c (expand_member_init): Handle getting a type.
348 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
349             Jason Merrill  <jason@redhat.com>
351         * decl.c (finish_function): Warn if a function has no return
352         statement.
353         Suggested by Andrew Koenig.
354         * typeck.c (check_return_expr): Do set current_function_returns_value
355         if we got an error_mark_node.
357 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
359         * decl2.c (push_decl_namespace): Push the original namespace.
361 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
363         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
364         * semantics.c (begin_class_definition): Clear it.
366 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
368         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
369         (genrtl_expr_stmt): Likewise.
370         (genrtl_decl_stmt): Likewise.
371         (genrtl_if_stmt): Likewise.
372         (genrtl_while_stmt): Likewise.
373         (genrtl_do_stmt): Likewise.
374         (genrtl_return_stmt): Likewise.
375         (genrtl_for_stmt): Likewise.
376         (genrtl_break_stmt): Likewise.
377         (genrtl_continue_stmt): Likewise.
378         (genrtl_scope_stmt): Likewise.
379         (genrtl_switch_stmt): Likewise.
380         (genrtl_case_label): Likewise.
381         (genrtl_begin_compound_stmt): Likewise.
382         (genrtl_finish_compound_stmt): Likewise.
383         (genrtl_compound_stmt): Likewise.
384         (genrtl_asm_stmt): Likewise.
386         * init.c (begin_init_stmts): Remove call to
387         genrtl_begin_compound_stmt.
388         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
390         * semantics.c (lang_expand_stmt): Changed call to
391         genrtl_compound_stmt to ignore return value.
392         
393 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
395         * mangle.c (canonicalize_for_substitution): Return the canonical
396         variant of a type.
398         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
399         TYPE_DECL.
400         * typeck.c (commonparms): Remove obstack manipulations.
402 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
404         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
405         
406         * Makefile.in (OBJS): Added ../c-semantics.o.
407         (OBJDEPS): Likewise.
408         
409         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
410         ../c-common.h.
411         (struct stmt_tree): Added comment. 
412         (current_function_name_declared): Removed.
413         (stmts_are_full_exprs_p): Likewise.
414         (genrtl_do_pushlevel): Likewise.
415         (genrtl_clear_out_block): Likewise.
416         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
417         (DECL_ANON_UNION_ELEMS): Likewise.
418         (emit_local_var): Likewise.
419         (make_rtl_for_local_static): Likewise.
420         (do_case): Likewise.
421         (expand_stmt): Likewise.
422         (genrtl_decl_cleanup): Likewise.
423         (c_expand_asm_operands): Likewise.
424         (c_expand_return): Likewise.
425         (c_expand_start_case): Likewise.
427         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
428         (emit_local_var): Likewise.
429         (initialize_local_var): Change reference to
430         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
431         Change reference to stmts_are_full_exprs_p to
432         current_stmt_tree->stmts_are_full_exprs_p.
433         (push_cp_function_context): Likewise.
435         * expect.c (expand_throw): Change reference to
436         stmts_are_full_exprs_p. 
438         * init.c (build_aggr_init): Change reference to
439         stmts_are_full_exprs_p. 
440         (build_vec_init): Likewise.
442         * optimize.c (maybe_clone_body): Change reference to
443         current_function_name_declared to
444         cp_function_chain->name_declared.
446         * pt.c (instantiate_decl): Change reference to
447         current_function_name_declared to
448         cp_function_chain->name_declared.
450         * semantics.c (expand_cond): Moved declaration to c-common.h.
451         (genrtl_do_pushlevel): Moved to c-semantics.c.
452         (genrtl_clear_out_block): Likewise.
453         (genrtl_goto_stmt): Likewise.
454         (genrtl_expr_stmt): Likewise.
455         (genrtl_decl_stmt): Likewise.
456         (gerntl_if_stmt): Likewise.
457         (genrtl_while_stmt): Likewise.
458         (genrtl_do_stmt): Likewise.
459         (genrtl_return_stmt): Likewise.
460         (genrtl_for_stmt): Likewise.
461         (genrtl_break_stmt): Likewise.
462         (genrtl_continue_stmt): Likewise.
463         (genrtl_scope_stmt): Likewise.
464         (genrtl_switch_stmt): Likewise.
465         (genrtl_case_label): Likewise.
466         (genrtl_begin_compound_stmt): Likewise.
467         (genrtl_finish_compound_stmt): Likewise.
468         (genrtl_compound_stmt): Likewise.
469         (genrtl_asm_stmt): Likewise.
470         (genrtl_decl_cleanup): Likewise.
471         (expand_cond): Likewise.
472         (expand_stmt): Renamed to ...
473         (lang_expand_stmt): ... this. 
474         (lang_expand_expr_stmt): Initialize.
475         (set_current_function_name_declared): Likewise.
476         (stmts_are_full_exprs_p): Likewise.
477         (current_function_name_declared): Likewise.
478         (anon_aggr_type_p): Likewise.
479         (do_poplevel): Change reference to
480         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
481         Change reference to stmts_are_full_exprs_p to
482         current_stmt_tree->stmts_are_full_exprs_p.
483         (add_tree): Likewise.
484         (finish_expr_stmt): Likewise.
485         (prep_stmt): Likewise.
486         (lang_expand_stmt): Likewise.
487         (begin_compound_stmt): Change reference to
488         current_function_name_declared to
489         cp_function_chain->name_declared and call to
490         current_function_name_declared().
491         (setup_vtbl_ptr): Likewise.
492         (genrtl_do_poplevel): Removed.
493         
494 2000-06-30  Jason Merrill  <jason@redhat.com>
496         * init.c (init_init_processing): Go back to aligning like
497         double_type_node for old ABI.
498         (get_cookie_size): Make cookie larger if we get a type that needs
499         more alignment.
500         (build_vec_delete): Call it.
502         * typeck.c (qualify_type_recursive): New fn.
503         (composite_pointer_type): Use it.
504         (build_binary_op): Use composite_pointer_type.
506 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
507             Jason Merrill  <jason@redhat.com>
509         * typeck.c (check_return_expr): Don't complain about returning
510         NULL from operator new if -fcheck-new.
511         * cp-tree.h: Declare flag_check_new here.
512         * init.c: Not here.
514 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
516         * mangle.c (find_substitution): Use same_type_p.
517         (write_encoding): Don't check for substitutions.
519 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
521         * parse.y (expr_no_comma_rangle): New non-terminal.
522         (template_parm): Use it for default parameter case.
523         (template_arg): Use it.
524         (expr_no_commas): Remove commented out undefined extensions.
525         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
526         * parse.h, parse.c: Rebuilt.
528 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
530         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
531         (finish_asm_stmt): Do it here, instead.
533         * cp-tree.h (ridpointers): Don't declare.
534         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
535         (record_builtin_java_type): Likewise.
536         (init_decl_processing): Likewise.
537         * lex.c: Move inclusion of lex.h.
538         (ridpointers): Don't define.
539         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
540         RID_MAX.
541         * lex.h (enum rid): Rename to ...
542         (enum cp_rid): ... this.
543         (ridpointers): Don't declare.
544         * parse.y: Move inclusion of lex.h.
545         * parse.c: Regenerated.
546         * spew.c: Move inclusion of lex.h.
547         
548         * cp-tree.h (struct language_function): Remove temp_name_counter.
549         (temp_name_counter): Remove.
550         (get_temp_name): Change prototype.
551         (get_guard): New function.
552         (get_guard_cond): Likewise.
553         (set_guard): Likewise.
554         * cvt.c (build_up_reference): Adjust call to get_temp_name.
555         * decl.c (expand_static_init): Use get_guard and friends to
556         implement guard variables.
557         * decl2.c (get_temp_name): Assume that the variables created are
558         always static.
559         (get_sentry): Rename to ...
560         (get_guard): ... this.  Implement new ABI guard variables.
561         (get_guard_bits): New function.
562         (get_guard_cond): Likewise.
563         (set_guard): Likewise.
564         (start_static_initialization_or_destruction): Use them.
565         (do_static_initialization): Replace sentry with guard throughout.
566         (do_static_destruction): Likewise.
567         * init.c (create_temporary_var): Add comment.
568         
569 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
571         * mangle.c (find_substitution): Use same_type_p.
572         (write_encoding): Don't check for substitutions.
574 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
576         * parse.y (expr_no_comma_rangle): New non-terminal.
577         (template_parm): Use it for default parameter case.
578         (template_arg): Use it.
579         (expr_no_commas): Remove commented out undefined extensions.
580         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
581         * parse.h, parse.c: Rebuilt.
583 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
585         * cp-tree.h (flag_const_strings): Remove.
586         (warn_parentheses): Likewise.
587         (warn_format): Likewise.
588         (common_type): Likewise.
589         (default_conversion): Likewise.
590         (build_binary_op): Likewise.
591         (cp_build_binary_op): New macro.
592         * call.c (build_new_op): Use cp_build_binary_op instead of
593         build_binary_op.
594         * class.c (build_vtable_entry_ref): Likewise.
595         * decl.c (expand_static_init): Likewise.
596         (compute_array_index_type): Likewise.
597         (build_enumerator): Likewise.
598         * decl2.c (delete_sanity): Likewise.
599         (start_static_initialization_or_destruction): Likewise.
600         * error.c (dump_type_suffix): Likewise.
601         * init.c (resolve_offset_ref): Likewise.
602         (build_new): Likewise.
603         (build_new_1): Likewise.
604         (build_vec_delete_1): Likewise.
605         (build_vec_init): Likewise.
606         (build_delete): Likewise.
607         * rtti.c (synthesize_tinfo_fn): Likewise.
608         (synthesize_tinfo_var): Likewise.
609         * search.c (expand_upcast_fixups): Likewise.
610         (fixup_all_virtual_upcast_offsets): Likewise.
611         * typeck.c (build_array_ref): Likewise.
612         (get_member_function_from_ptrfunc): Likewise.
613         (build_binary_op): Add parameter.
614         (pointer_int_sum): Use cp_build_binary_op.
615         (pointer_diff): Likewise.
616         (build_modify_expr): Likewise.
617         (get_delta_difference): Likewise.
618         (build_ptrmemfunc): Likewise.
619         
620 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
622         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
623         * decl.c (create_implicit_typedef): Adjust.
624         * decl2.c (build_artificial_parm): Adjust.
625         * method.c (implicitly_declare_fn): Adjust.
626         * pt.c (push_inline_template_parms_recursive): Adjust.
627         (process_template_parm): Adjust.
628         (overloaded_template_name): Adjust.
629         * semantics.c (finish_template_template_parm): Adjust.
631 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
633         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
634         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
635         where to emit thunks.
636         (build_vtt): Adjust call to build_vtt_inits.
637         (build_vtt_inits): Add parameter to indicate whether or not
638         sub-VTTs for virtual bases should be included.  Adjust handling of
639         construction vtables.
640         (get_matching_base): New function.
641         (dfs_build_vtt_inits): Rename to ...
642         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
643         construction vtables.
644         (dfs_fixup_binfo_vtbls): Likewise.
645         (build_ctor_vtbl_groups): Build construction vtables for virtual
646         bases, too.
647         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
648         to build construction vtbls.
649         (dfs_accumulate_vtbl_inits): Adjust handling of
650         construction vtables.
652         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
653         types correctly.
654         
655 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
657         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
659 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
661         * search.c (hides): Remove.
662         (is_subobject_of_p): Add most_derived parameter. Use
663         CANONICAL_BINFO.
664         (lookup_field_queue_p): Adjust.
665         (lookup_field_r): Adjust.
667 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
669         * decl2.c (handle_class_head): Bash typedefs to the type's main
670         decl.
672 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
674         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
675         (begin_global_stmt_expr): ... this.
676         (genrtl_finish_stmt_expr): Rename to ...
677         (finish_global_stmt_expr): ... this.
678         * init.c (begin_init_stmts): Adjust calls.
679         (finish_init_stmts): Likewise.
680         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
681         (begin_global_stmt_expr): ... this.
682         (genrtl_finish_stmt_expr): Rename to ...
683         (finish_global_stmt_expr): ... this.
685 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
687         * search.c (lookup_member): Fix typo in comment.
689 2000-06-24  Jason Merrill  <jason@redhat.com>
691         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
692         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
694 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
696         * parse.y (complex_direct_notype_declarator): Support global_scope.
697         * Makefile.in: Adjust conflict count.
699 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
701         * parse.y (template_arg): Convert TEMPLATE_DECL
702         that is a template template paramter to
703         TEMPLATE_TEMPLATE_PARM here.
705         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
706         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
707         (copy_template_template_parm): Adjust prototype.
708         * decl.c (grokdeclarator): Remove dead code.
709         * pt.c (process_template_parm): Tidy.
710         (lookup_template_class): Construct nodes in
711         copy_template_template_parm.
712         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
713         lookup_template_class.  Use TYPE_TI_TEMPLATE.
714         * tree.c (copy_template_template_parm): Add NEWARGS
715         parameter.
716         (mapcar): Adjust call to copy_template_template_parm.
717         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
718         * method.c (build_template_template_parm_names): Change error
719         code to avoid compilation warning.
721         * gxxint.texi: Document template template parameter
722         name mangling.
724 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
726         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
727         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
728         (cp-demangle.o): New rule.
729         (dyn-string.o): Likewise.
730         * inc/cxxabi.h (__cxa_demangle): New declaration.
732 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
734         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
735         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
736         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
737         a tree, not an int.
738         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
739         (make_thunk): Change prototype.
740         (emit_thunk): Rename to use_thunk.
741         (mangle_thunk): Change prototype.
742         * class.c (get_derived_offset): Simplify.
743         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
744         BV_GENERATE_THUNK_WITH_VTABLE_P.
745         (build_primary_vtable): Simplify.
746         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
747         (dfs_find_base): Remove.
748         (update_vtable_entry_for_fn): Correct bug in finding the base
749         where a virtual function was first declared.  Figure out whether
750         or not to emit a vcall-thunk with the vtables in which it appears.
751         Correct logic for deciding whether to use an ordinary thunk, or a
752         vcall thunk.
753         (finish_struct_1): Remove unnecssary code.
754         (build_vtbl_initializer): Use ssize_int for the running counter of
755         negative indices.
756         (build_vtbl_initializer): Only use vcall thunks where necessary.
757         Mark thunks as needing to be emitted with their vtables, or not.
758         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
759         indices.  Use size_binop.
760         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
761         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
762         size_binop.
763         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
764         (build_vtable_entry): Mark thunks as needing to be emitted with
765         their vtables, or not.
766         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
767         * decl2.c (mark_vtable_entries): Use use_thunk instead of
768         emit_thunk.
769         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
770         information.
771         * error.c (dump_expr): Use BV_FN.
772         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
773         not an int.
774         * method.c (make_thunk): Likewise.
775         (emit_thunk): Rename to use_thunk.  Allow callers to decide
776         whether or not to actually emit the thunk.  Adjust for changes in
777         representation of vcall offsets.
778         * search.c (dfs_get_pure_virtuals): Use BV_FN.
779         * semantics.c (emit_associated_thunks): New function.
780         (expand_body): Use it.
781         * ir.texi: Adjust decriptions of thunks.
782         
783 2000-06-22  Jason Merrill  <jason@redhat.com>
785         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
786         (tsubst_friend_function): Copy it here.
788         * decl.c (grok_op_properties): Fix typo.
790         * decl2.c (delete_sanity): Clarify warning, avoid failure on
791         deleting void*.
793         * pt.c (check_explicit_specialization): Clarify error.
795         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
796         an old OVERLOAD when we're declaring a non-function.
797         (pushdecl, destroy_local_var): Check for error_mark_node.
798         (warn_extern_redeclared_static): Also bail early if 
799         we're a CONST_DECL.
800         (push_overloaded_decl): Ignore an old error_mark_node.
802 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
804         * call.c (build_x_va_arg): Check if in a template decl.
805         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
807 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
809         * class.c (push_lang_context): TYPE_NAME gets you to the Java
810         types DECLs.
811         * decl.c (check_goto): Computed gotos assumed OK.
813 2000-06-20  Jason Merrill  <jason@redhat.com>
815         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs 
816         for which we don't need to look for instantiations.
818 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
820         * parse.y (program): Always call finish_translation_unit.
821         * parse.c, parse.h: Rebuilt.
823 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
825         * method.c: Don't include hard-reg-set.h.
827 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
829         * rtti.c (get_base_offset): Cope when vbase field is in a base.
831 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
833         * call.c (build_conditional_expr): Use VOID_TYPE_P.
834         * cvt.c (cp_convert_to_pointer): Likewise.
835         (convert_to_void): Likewise.
836         * error.c (dump_expr): Likewise.
837         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
838         * init.c (build_delete): Likewise.
839         * method.c (emit_thunk): Likewise.
840         * optmize.c (declare_return_variable): Likewise.
841         * rtti.c (get_tinfo_decl_dynamic): Likewise.
842         (get_typeid): Likewise.
843         (build_dynamic_cast_1): Likewise.
844         * typeck.c (composite_pointer_type): Likewise.
845         (common_type): Likewise.
846         (build_indirect_ref): Likewise.
847         (build_binary_op): Likewise.
848         (build_x_compound_expr): Likewise.
849         (check_return_expr): Likewise.
850         * typeck2.c (add_exception_specifier): Likewise.
851         
852         * mangle.c (write_method_parms): Use direct comparison for end
853         of parmlist.
855 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
857         * cp-tree.h (genrtl_try_block): Declare function.
858         (genrtl_handler): Likewise.
859         (genrtl_catch_block): Likewise.
860         (genrtl_ctor_stmt): Likewise.
861         (genrtl_subobject): Likewise.
862         (genrtl_decl_cleanup): Likewise.
863         (genrtl_do_poplevel): Likewise.
864         (genrtl_do_pushlevel): Likewise.
865         (genrtl_clear_out_block): Likewise.
866         (genrtl_goto_stmt): Likewise.
867         (genrtl_expr_stmt): Likewise.
868         (genrtl_decl_stmt): Likewise.
869         (genrtl_if_stmt): Likewise.
870         (genrtl_while_stmt): Likewise.
871         (genrtl_do_stmt): Likewise.
872         (genrtl_return_stmt): Likewise.
873         (genrtl_for_stmt): Likewise.
874         (genrtl_break_stmt): Likewise.
875         (genrtl_continue_stmt): Likewise.
876         (genrtl_scope_stmt): Likewise.
877         (genrtl_switch_stmt): Likewise.
878         (genrtl_case_label): Likewise.
879         (genrtl_begin_compound_stmt): Likewise.
880         (genrtl_finish_compound_stmt): Likewise.
881         (genrtl_compound_stmt): Likewise.
882         (genrtl_asm_stmt): Likewise.
883         (genrtl_named_return_value): Likewise.
884         (genrtl_begin_stmt_expr): Likewise.
885         (genrtl_finish_stmt_expr): Likewise.
886         (finish_for_stmt): Removed first argument.
887         (finish_switch_stmt): Likewise.
889         * semantics.c (genrtl_try_block): Define function.
890         (genrtl_handler): Likewise.
891         (genrtl_catch_block): Likewise.
892         (genrtl_ctor_stmt): Likewise.
893         (genrtl_subobject): Likewise.
894         (genrtl_decl_cleanup): Likewise.
895         (genrtl_do_poplevel): Likewise.
896         (genrtl_do_pushlevel): Likewise.
897         (genrtl_clear_out_block): Likewise.
898         (genrtl_goto_stmt): Likewise.
899         (genrtl_expr_stmt): Likewise.
900         (genrtl_decl_stmt): Likewise.
901         (genrtl_if_stmt): Likewise.
902         (genrtl_while_stmt): Likewise.
903         (genrtl_do_stmt): Likewise.
904         (genrtl_return_stmt): Likewise.
905         (genrtl_for_stmt): Likewise.
906         (genrtl_break_stmt): Likewise.
907         (genrtl_continue_stmt): Likewise.
908         (genrtl_scope_stmt): Likewise.
909         (genrtl_switch_stmt): Likewise.
910         (genrtl_case_label): Likewise.
911         (genrtl_begin_compound_stmt): Likewise.
912         (genrtl_finish_compound_stmt): Likewise.
913         (genrtl_compound_stmt): Likewise.
914         (genrtl_asm_stmt): Likewise.
915         (genrtl_named_return_value): Likewise.
916         (genrtl_begin_stmt_expr): Likewise.
917         (genrtl_finish_stmt_expr): Likewise.
918         (finish_for_stmt): Removed first argument and generate rtl 
919         specific code.
920         (finish_switch_stmt): Likewise.
921         (do_poplevel): Removed generate rtl specific code.
922         (do_pushlevel): Likewise.
923         (add_tree): Likewise.
924         (finish_goto_stmt): Likewise.
925         (finish_expr_stmt): Likewise.
926         (begin_if_stmt): Likewise.
927         (finish_if_stmt_cond): Likewise.
928         (finish_then_clause): Likewise.
929         (begin_else_clause): Likewise.
930         (finish_else_clause): Likewise.
931         (finish_if_stmt): Likewise.
932         (clear_out_block): Likewise.
933         (begin_while_stmt): Likewise.
934         (finish_while_stmt_cond): Likewise.
935         (finish_while_stmt): Likewise.
936         (begin_do_stmt): Likewise.
937         (finish_do_body): Likewise.
938         (finish_do_stmt): Likewise.
939         (finish_return_stmt): Likewise.
940         (begin_for_stmt): Likewise.
941         (finish_for_init_stmt): Likewise.
942         (finish_for_cond): Likewise.
943         (finish_for_expr): Likewise.
944         (finish_break_stmt): Likewise.
945         (finish_continue_stmt): Likewise.
946         (begin_switch_stmt): Likewise.
947         (finish_switch_cond): Likewise.
948         (finish_case_label): Likewise.
949         (begin_try_block): Likewise.
950         (begin_function_try_block): Likewise.
951         (finish_try_block): Likewise.
952         (finish_cleanup_try_block): Likewise.
953         (finish_cleanup): Likewise.
954         (finish_function_try_block): Likewise.
955         (finish_handler_sequence): Likewise.
956         (finish_function_handler_sequence): Likewise.
957         (begin_handler): Likewise.
958         (finish_handler_parms): Likewise.
959         (begin_catch_block): Likewise.
960         (finish_handler): Likewise.
961         (begin_compound_stmt): Likewise.
962         (finish_compound_stmt): Likewise.
963         (finish_asm_stmt): Likewise.
964         (finish_label_stmt): Likewise.
965         (finish_label_decl): Likewise.
966         (finish_subobject): Likewise.
967         (finish_decl_cleanup): Likewise.
968         (finish_named_return_value): Likewise.
969         (begin_stmt_expr): Likewise.
970         (finish_stmt_expr): Likewise.
971         
972         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
973         to call genrtl_expr_stmt when appropriate.
975         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
976         begin_compound_expr to call genrtl_begin_stmt_expr and
977         genrtl_begin_compound_expr when appropriate.
978         (finish_init_stmts): Changed calls to finish_compound_expr and
979         finish_stmt_expr to call genrtl_finish_compound_expr and
980         genrtl_finish_stmt_expr when appropriate.
981         (expand_default_init): Changed call to finish_expr_stmt to call
982         genrtl_expr_stmt when appropriate.
983         (build_vec_init): Likewise.
985         * parse.y (simple_stmt): Removed first argument from call to 
986         finish_for_stmt. Removed first argument from call to 
987         finish_switch_stmt.
989         * parse.c: Regenerated.
991         * pt.c (tsubst_expr): Removed first argument from call to 
992         finish_for_stmt. Removed first argument from call to 
993         finish_switch_stmt.
994         
995 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
997         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
998         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
1000         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
1001         (cplus_tree_code_length[]): Likewise.
1002         (cplus_tree_code_name[]): Likewise.
1003         (init_parse): Added call to add_c_tree_codes. Changed 
1004         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
1005         
1006 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
1008         * cp-tree.h (finish_mem_initializers): Declare.
1009         (count_trees): Likewise.
1010         * parse.y (base_init): Use finish_mem_initializers.
1011         * semantics.c (finish_mem_initializers): New function.
1013         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
1014         the number of trees.
1015         (n_trees): Remove.
1016         (count_trees): Don't use it.
1017         
1018 2000-06-15  Jason Merrill  <jason@redhat.com>
1020         * tree.c (count_trees): New debugging function.
1022         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
1023         * init.c (build_member_call): Pull out the name of a DECL.
1025         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
1026         * semantics.c (expand_body): Push to TV_INTEGRATION here.
1027         * optimize.c (optimize_function): Not here.
1028         * pt.c (instantiate_decl): Push to TV_PARSE.
1030 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
1032         * cp-tree.h (struct language_function): Remove x_base_init_list
1033         and x_member_init_list.
1034         (current_base_init_list): Remove.
1035         (current_member_init_list): Likewise.
1036         (setup_vtbl_ptr): Change prototype.
1037         (emit_base_init): Likewise.
1038         (expand_member_init): Likewise.
1039         (reinit_parse_for_function): Remove.
1040         * decl.c (save_function_data): Don't clear x_base_init_list and
1041         x_member_init_list.
1042         (mark_language_function): Don't mark them.
1043         * init.c (perform_member_init): Tweak comment.
1044         (sort_member_init): Take the list of initializers as an argument.
1045         (sort_base_init): Likewise.
1046         (emit_base_init): Likewise.
1047         (expand_member_init): Return the initializer.  Don't use global
1048         variables.
1049         * lex.c (reinit_parse_for_function): Remove.
1050         * method.c (build_template_parm_names): Correct substitution.
1051         (do_build_copy_constructor): Don't use current_member_init_list
1052         and current_base_init_list.
1053         (synthesize_method): Likewise.
1054         * parse.y (base_init): Split mem-initializers into
1055         base-initializers and field-initializers.
1056         (member_init_list): Build up the list here.
1057         (member_init): Return the initializer.
1058         (fn.depfn): Don't use reinit_parse_for_function.
1059         * parse.c: Regenerated.
1060         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
1061         ERROR_MARK.
1062         (tsubst_expr): Don't use current_member_init_list
1063         and current_base_init_list.
1064         (tsubst_expr_values): Rename to ...
1065         (tsubst_initializer_list): ... this.  Use convert_from_reference.
1066         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
1067         and current_base_init_list.
1068         (begin_function_definition): Don't call reinit_parse_for_function.
1069         
1070         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
1072         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
1073         correctly.
1074         
1075         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
1077 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
1079         * cp-tree.h (IF_COND): Move to c-common.h.
1080         (THEN_CLAUSE): Likewise.
1081         (ELSE_CLAUSE): Likewise.
1082         (WHILE_COND): Likewise.
1083         (WHILE_BODY): Likewise.
1084         (DO_COND): Likewise.
1085         (DO_BODY): Likewise.
1086         (RETURN_EXPR): Likewise.
1087         (EXPR_STMT_EXPR): Likewise.
1088         (FOR_INIT_STMT): Likewise.
1089         (FOR_COND): Likewise.
1090         (FOR_EXPR): Likewise.
1091         (FOR_BODY): Likewise.
1092         (SWITCH_COND): Likewise.
1093         (SWITCH_BODY): Likewise.
1094         (CASE_LOW): Likewise.
1095         (CASE_HIGH): Likewise.
1096         (GOTO_DESTINATION): Likewise.
1097         (COMPOUND_BODY): Likewise.
1098         (ASM_CV_QUAL): Likewise.
1099         (ASM_STRING): Likewise.
1100         (ASM_OUTPUTS): Likewise.
1101         (ASM_INPUTS): Likewise.
1102         (ASM_CLOBBERS): Likewise.
1103         (DECL_STMT_DECL): Likewise.
1104         (STMT_EXPR_STMT): Likewise.
1105         (LABEL_STMT_LABEL): Likewise.
1106         (SCOPE_BEGIN_P): Likewise.
1107         (SCOPE_END_P): Likewise.
1108         (SCOPE_STMT_BLOCK): Likewise.
1109         (SCOPE_NULLIFIED_P): Likewise.
1110         (SCOPE_NO_CLEANUPS_P): Likewise.
1111         (SCOPE_PARTIAL_P): Likewise.
1112         (ASM_VOLATILE_P): Likewise.
1113         (STMT_LINENO): Likewise.
1114         (STMT_LINENO_FOR_FN_P): Likewise.
1116         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
1117         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
1118         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
1119         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
1120         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
1122         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
1124         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
1125         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
1126         
1127         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
1128         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
1129         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
1130         
1131 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
1133         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
1134         * class.c (dfs_find_final_overrider): Set it appropriately.
1135         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
1136         avoid unneeded secondary vptrs.
1138 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
1140         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
1141         (check_bitfield_decl, check_field_decl): Likewise.
1142         (build_vtbl_or_vbase_field, build_base_field): Likewise.
1143         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
1144         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
1145         (xfer_tag, finish_enum): Likewise.
1146         * decl2.c (finish_builtin_type): Likewise.
1147         * init.c (init_init_processing): Likewise.
1148         * pt.c (instantiate_class_template): Likewise.
1149         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
1150         * cp-tree.h (struct lang_type): Add user_align member.
1151         (CLASSTYPE_USER_ALIGN): Define.
1153 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
1155         * Make-lang.in (c++.install-common): Install g++-cross in
1156         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
1157         $(target_alias)-g++ and $(target_alias)-c++.
1159 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
1161         * class.c (vcall_offset_data_s): Add last_init and fns.
1162         (overrides): Rename to same_signature_p.
1163         (dfs_find_final_overrider): Adjust accordingly.
1164         (mark_overriders): Likewise.
1165         (warn_hidden): Likewise.
1166         (build_vtbl_initializer): Reorganize machinery for building things
1167         at negative offsets.
1168         (build_vcall_and_vbase_vtbl_entries): Likewise.
1169         (build_vbase_offset_vtbl_entries): Likewise.
1170         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
1171         offset entries.  Do not create two entries for functions with the
1172         same signature.
1173         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
1174         (build_rtti_vtbl_entries): Reorganize machinery for building things
1175         at negative offsets.
1177         * optimize.c (expand_call_inline): Don't recurse into the code
1178         used to initialize the parameters more than once.
1180 2000-06-11  Mark Mitchell <mark@codesourcery.com>
1181         
1182         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
1183         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
1184         (find_substitution): Only use the `Sa' substitution for
1185         std::allocator, not instantiations of it.
1186         (write_template_prefix): Move comment.  Only use a TREE_LIST to
1187         represent substitutions for a member template.
1188         (write_array_type): Mangle array dimensions correctly.
1189         * optimize.c (maybe_clone_body): Copy more information from the
1190         cloned function.
1191         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
1192         on the regenerated declaration.
1194 2000-06-11  Chip Salzenberg  <chip@valinux.com>
1195             Mark Mitchell <mark@codesourcery.com>
1197         * class.c (build_vtable): Clarify comment.
1198         (build_ctor_vtbl_group): Pass the most derived type to
1199         build_vtable.
1200         
1201 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1203         * decl2.c (compare_options): Don't needlessly cast away const-ness.
1205 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
1207         * decl.c (add_binding): Handle duplicate declarations of external
1208         variables.
1210 2000-06-09  Chip Salzenberg  <chip@valinux.com>
1211             Mark Mitchell <mark@codesourcery.com>
1213         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
1214         argument.
1215         (write_signed_number): New macro.
1216         (write_unsigned_number): Likewise.
1217         (write_source_name): Use them.
1218         (write_number): Handle signed and unsigned values.
1219         (write_integer_cst): Use tree_int_cst_sgn, and use
1220         write_unsigned_number or write_signed_number as appropriate.
1221         (write_discriminator): Use write_unsigned_number or
1222         write_signed_number as appropriate.
1223         (write_template_arg_literal): Likewise.
1224         (write_array_type): Use tree_low_cst.
1225         (write_template_parm):  Use write_unsigned_number or
1226         write_signed_number as appropriate.
1227         (write_substitution): Adjust call to write_number.
1228         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
1229         (write_expression): Handle non-type template arguments of
1230         reference type correctly.
1231         (mangle_thunk): Use write_signed_number.
1233 2000-06-09  Chip Salzenberg  <chip@valinux.com>
1235         * mangle.c (find_substition): Don't mangle objects with typename
1236         substitutions (e.g. "cin" as "Si").
1238 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
1240         * call.c (add_candidate): Use ggc_alloc_cleared.
1241         * decl.c (lookup_label): Likewise.
1242         * lex.c (retrofit_lang_decl): Likewise.
1244 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
1246         * semantics.c (expand_body): Push to TV_EXPAND.
1247         * optimize.c (optimize_function): Push to TV_INTEGRATION.
1248         * decl.c (start_function): Always call announce_function.
1250         * tinfo2.cc: Just declare abort.
1252 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
1254         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
1255         whenever @ is a symbolic name.
1257 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
1259         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
1261 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
1263         * decl.c (pushdecl): Look up functions by DECL_NAME, not
1264         DECL_ASSEMBLER_NAME.
1266 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
1268         * decl2.c (c_language): Define.
1270 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
1272         * lex.c (lang_init_options): Tweak.
1274         * decl2.c: Remove #inclusion of diagnostic.h
1275         (lang_decode_option): Move diagnostic formatting options to
1276         toplevel. 
1278         * lang-options.h: Remove documentation for diagnostic options.
1280         * Makefile.in (lex.o): Depends upon diagnostic.h
1282 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
1284         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
1285         the same DECL_RESULT, it's not a redefinition.
1286         * pt.c (tsubst_decl): Remove code to handle illegal
1287         specializations.
1289 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
1291         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
1293 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
1295         * search.c (maybe_suppress_debug_info): Don't check
1296         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
1298         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
1299         here if extern_p.
1301         Remember instantiation context in deferred instantiations.
1302         * cp-tree.h (struct tinst_level): Remove.
1303         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
1304         * pt.c (current_tinst_level): Now a tree.
1305         (print_template_context, push_tinst_level, pop_tinst_level,
1306         tinst_for_decl): Adjust.
1307         (reopen_tinst_level): New fn.
1308         (init_pt): Register current_tinst_level as a root.
1309         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
1310         of the pending templates list.
1311         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
1312         * lex.c (extract_interface_info): Adjust.
1313         * decl2.c (warn_if_unknown_interface): Adjust.
1315 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
1317         * class.c (indirect_primary_base_p): New function.
1318         (determine_primary_base): Use it.
1320 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
1322         Update new-abi dynamic cast algorithm.
1323         * tinfo.cc (__class_type_info::__dyncast_result): Add
1324         whole_details. Adjust constructor.
1325         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
1326         Avoid unnecessary searching.
1327         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
1329 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1331         * decl.c (init_decl_processing): Don't call record_component_aliases.
1332         * tree.c (build_cplus_array_type_1): Likewise.
1334 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
1336         * ir.texi: Correct typo.
1337         * mangle.c (write_expression): Handle non-type template arguments
1338         with reference type.
1339         * method.c (build_overload_value): Likewise.
1340         * pt.c (convert_nontype_argument): Explicitly represent conversion
1341         to a reference with an ADDR_EXPR.
1342         (unify): Always unify arguments in left-to-right order.
1344 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
1345             Mark Mitchell  <mark@codesourcery.com>
1347         * Make-lang.in (CXX_SRCS): Add mangle.c.
1348         * Makefile.in (CXX_OBJS): Add mangle.o.
1349         (mangle.o): New rule.
1351         * class.c (local_classes): New variable.
1352         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
1353         (get_vtt_name): Use mangle_vtt_name for new ABI.
1354         (init_class_processing): Initialize local_classes.
1355         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
1356         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
1357         (std_identifier): New macro.
1358         (DECL_VOLATILE_MEMFUNC_P): New macro.
1359         (DECL_NAMESPACE_STD_P): Likewise.
1360         (local_classes): Declare.
1361         (get_mostly_instantiated_function_type): Declare.
1362         (init_mangle): Declare.
1363         (mangle_decl): Likewise.
1364         (mangle_type_string): Likewise.
1365         (mangle_type): Likewise.
1366         (mangle_typeinfo_for_type): Likewise.
1367         (mangle_typeinfo_string_for_type): Likewise.
1368         (mangle_vtbl_for_type): Likewise.
1369         (mangle_vtt_for_type): Likewise.
1370         (mangle_ctor_vtbl_for_type): Likewise.
1371         (mangle_thunk): Likewise.
1372         (mangle_conv_op_name_for_type): Likewise.
1373         (mangle_guard_variable): Likewise.
1374         * decl.c (pushtag): Keep track of local classes.
1375         (initialize_predefined_identifiers): Initialize std_identifier.
1376         (init_decl_processing): Use std_identifier.
1377         (start_decl): Don't treat instantiations as specializations.
1378         (grokdeclarator): Likewise.
1379         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
1380         name for fully-instantiated templates.
1381         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
1382         destructors with the new ABI.   
1383         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
1384         (grokfield): Use mangle_type for new ABI.
1385         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
1386         (get_sentry): Use mangle_guard_variable for new ABI.
1387         (start_static_initialization_or_destruction): Likewise.
1388         * expr.c (extract_aggr_init): Remove.
1389         (extract_scalar_init): Likewise.
1390         (extract_init): Remove #if 0'd code.
1391         * mangle.c: New function.
1392         * method.c (build_mangled_name): Assert not flag_new_abi.
1393         (build_static_name): Likewise.
1394         (build_decl_overload_real): Likewise.
1395         (build_typename_overload): Likewise.
1396         (build_overload_with_type): Likewise.
1397         (build_overload_name): Likewise.
1398         (get_ctor_vtbl_name): Likewise.
1399         (start_squangling): Likewise.
1400         (get_id_2): Likewise.
1401         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
1402         (init_method): Call init_mangle for new ABI.
1403         (make_thunk): Call mangle_thunk for new ABI.
1404         * operators.def: Correct new ABI manglings for the `%' operator.
1405         Add `::' operator.
1406         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
1407         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
1408         (lookup_template_class): Call mangle_decl for new ABI.
1409         (get_mostly_instantiated_function_type): New function.
1410         (set_mangled_name_for_template_decl): Use it.
1411         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
1412         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
1413         conversion op names.
1414         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
1415         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
1416         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
1417         mangle_typeinfo_string_for_type.
1418         
1419 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
1421         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
1422         (INNERMOST_TEMPLATE_ARGS): New macro.
1423         (innermost_args): Remove.
1424         (get_innermost_template_args): New function.
1425         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
1426         * error.c (dump_function_decl): Be caution when using
1427         most_general_template.
1428         * method.c (build_template_parm_names):  Use
1429         INNERMOST_TEMPLATE_ARGS.
1430         * pt.c (add_to_template_args): Tidy comment
1431         (get_innermost_template_args): New function.
1432         (check_explicit_specialization): Clear DECL_INITIAL for a new
1433         specialization.
1434         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
1435         Tidy.
1436         (push_template_decl): Always register specializations of the most
1437         general template.
1438         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
1439         (coerce_template_parms): Likewise.
1440         (lookup_template_class): Likewise.
1441         (innermost_args): Remove.
1442         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
1443         (tsubst_decl): Handle tricky specializations.  Use
1444         get_innermost_template_args.
1445         (instantiate_template): Simplify handling of partial
1446         instantiations.
1447         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
1448         (most_general_template): Reimplement, in a more straightforward
1449         manner.
1450         (regenerate_decl_from_template): Tweak formatting.  Use
1451         TMPL_ARGS_DEPTH for clarity.
1452         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
1453         
1454         * dump.c (dequeue_and_dump): Dump information about thunks.
1456 2000-06-01  Richard Henderson  <rth@cygnus.com>
1458         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
1460 2000-06-01  Richard Henderson  <rth@cygnus.com>
1462         * decl2.c (unsupported_options): Fix typo, make const.
1463         (lang_decode_option): Fix bsearch argument order.
1465 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
1467         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
1468         on FIELD_DECLs.
1470 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1472         * cp-tree.h (c_get_alias_set): Deleted.
1473         * Makefile.in (decl.o): Include ../expr.h.
1474         * decl.c (expr.h): Include.
1475         (init_decl_processing): Call record_component_aliases for arrays.
1476         (grokdeclarator): Likewise.
1477         Set TREE_ADDRESSABLE for fields that aren't bitfields.
1478         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
1480 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
1482         Remove guiding declaration support.
1483         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
1484         (flag_guiding_decls): Remove.
1485         * call.c (build_user_type_conversion_1): Remove support for
1486         guiding decls.
1487         (build_new_function_call): Likewise.
1488         (build_new_op): Likewise.
1489         (build_new_method_call): Likewise.
1490         * decl.c (start_function): Likewise.
1491         * friend.c (is_friend): Likewise.
1492         (do_friend): Likewise.
1493         * decl2.c ((flag_dump_translation_unit): Make it const.
1494         (flag_guiding_decls): Remove.
1495         (unsupported_options): New variable
1496         (compare_options): New function.
1497         (lang_decode_option): Use them.
1498         
1499         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
1501         * method.c (mangle_expression): Adjust test for legal expression
1502         operators.
1504         * pt.c (instantiate_decl): Save and restore the local
1505         specializations list.
1507 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
1509         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
1511 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
1513         * call.c (add_template_candidate_real): Handle member template
1514         constructors for classes with virtual bases.
1515         (build_user_type_conversion_1): Use in_charge_arg_for_name.
1516         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
1518         * ir.texi: Update thunk documentation.
1519         
1520         * call.c (joust): Fix handling of overloaded builtin operators.
1522 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
1524         * cp-tree.h (DECL_ANTICIPATED): New macro.
1525         Document new use of DECL_LANG_FLAG_7.
1526         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
1527         in the user namespace.
1528         * lex.c (do_identifier): If the identifier's declaration has
1529         DECL_ANTICIPATED on, it has not yet been declared.  But do not
1530         replace it with an ordinary implicit declaration.             
1532         * tinfo2.cc: Include stdlib.h.
1534 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
1536         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
1537         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
1538         CLASSTYPE_ALIGN.
1540 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
1542         * decl2.c (lang_decode_option): Use skip_leading_substring instead
1543         of plain strncmp.
1545 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
1547         * operators.def (<?): Duplicated, should have been...
1548         (>?): this.  Fixed.
1550 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
1551             Mark Mitchell  <mark@codesourcery.com>
1553         * cp-tree.h (ansi_opname): Make it a macro.
1554         (ansi_assopname): Likewise.
1555         (struct lang_decl_flags): Add assignment_operator_p.
1556         (struct lang_decl): Add operator_code.
1557         (DECL_VTT_PARM): Adjust.
1558         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
1559         overloaded operator.
1560         (SET_OVERLOADED_OPERATOR_CODE): New macro.
1561         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
1562         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
1563         (opname_tab): Remove.
1564         (assignop_tab): Likewise.
1565         (operator_name_info_t): New type.
1566         (operator_name_info): New variable.
1567         (assignment_operator_name_info): Likewise.
1568         (build_cp_library_fn): Remove declaration.
1569         (push_cp_library_fn): Likewise.
1570         (operator_name_string): Likewise.
1571         (build_decl_overload): Likewise.
1572         * call.c (print_z_candidates): Simplify.
1573         (build_object_call): Adjust usage of ansi_opname.  Use
1574         DECL_OVERLOADED_OPERATOR_P.
1575         (op_error): Adjust operator name lookup.
1576         (build_conditional_expr): Adjust usage of ansi_opname.
1577         (build_new_op): Likewise.
1578         (build_op_delete_call): Likewise.
1579         (build_over_call): Likewise.
1580         (joust): Use DECL_OVERLOADED_OPERATOR_P.
1581         * decl.c (duplicate_decls): Copy operator_code.
1582         (init_decl_processing): Adjust parameters to push_cp_library_fn.
1583         (builtin_function): Adjust parameters to build_library_fn_1.
1584         (build_library_fn_1): Accept an overloaded operator code.
1585         (build_library_fn): Pass ERROR_MARK.
1586         (build_cp_library_fn): Accept an overloaded operator code.
1587         (push_cp_library_fn): Likewise.
1588         (grokfndecl): Tweak.
1589         (grokdeclarator): Simplify code to compute names of overloaded
1590         operators.  Adjust use of ansi_opname.
1591         (ambi_op_p): Work on tree_codes, not identifiers.
1592         (unary_op_p): Likewise.
1593         (grok_op_properties): Likewise.
1594         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
1595         (lang_mark_tree): Don't try to mark the operator_code.
1596         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
1597         * error.c (dump_decl): Remove special handling for operator
1598         names.
1599         (dump_function_name): Likewise.
1600         (dump_expr): Adjust name lookup of operators.
1601         (op_to_string): Simplify.
1602         (assop_to_string): Likewise.
1603         * init.c (build_new_1): Adjust use of ansi_opname.
1604         * lex.c (opname_tab): Remove.
1605         (assignop_tab): Likewise.
1606         (ansi_opname): Likewise.
1607         (ansi_assopname): Likewise.
1608         (operator_name_string): Likewise.
1609         (reinit_lang_specific): Likewise.
1610         (operator_name_info): New variable.
1611         (assignment_operator_name_info): Likewise.
1612         (init_operators): New function.
1613         (init_parse): Use it.
1614         (do_identifier): Adjust use of ansi_opname.
1615         * method.c (mangle_expression): Don't use ansi_opname for
1616         mangling.
1617         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
1618         (build_decl_overload): Remove.
1619         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
1620         (do_build_assign_ref): Adjust use of ansi_opname.
1621         (synthesize_method): Likewise.
1622         (implicitly_declare_fn): Likewise.
1623         * operators.def: New file.
1624         * parse.y (operator): Adjust use of ansi_opname.
1625         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
1626         (set_mangled_name_for_template_decl): Don't play games with
1627         current_namespace.
1628         (special_function_p): Adjust use of ansi_opname.
1629         * typeck.c (check_return_expr): Likewise.
1630         * Make-lang.in (cc1plus): Depend on operators.def.
1631         * Makefile.in (lex.o): Likewise.
1632         (decl.o): Likewise.
1634 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
1636         * Make-lang.in (cplib2.ready): Eradicate.
1638 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1640         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
1641         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
1642         (built_min, cp_tree_equal): Likewise.
1644 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
1646         * class.c (layout_nonempty_base_or_field): Replace
1647         `record_layout_info' with `record_layout_info_s'.
1649 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
1651         Fix goto checking.
1652         * cp-tree.h (struct language_function): x_named_labels is now
1653         a struct named_label_list*.
1654         * decl.c (struct named_label_use_list): Renamed from...
1655         (struct named_label_list): ...this.  New struct.
1656         (push_binding_level): Don't set eh_region.
1657         (note_level_for_eh): New fn.
1658         (pop_label): Take label and old value directly.
1659         (pop_labels): Adjust for new named_labels format.
1660         (lookup_label): Likewise.
1661         (poplevel): Note characteristics of a binding level containing a
1662         named label.  Mess with named label lists earlier.
1663         (mark_named_label_lists): New fn.
1664         (mark_lang_function): Call it.
1665         (use_label): New fn, split out from...
1666         (make_label_decl): ...here.  Don't call it.
1667         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1, 
1668         check_previous_gotos): New fns, split out from...
1669         (define_label): ...here.
1670         (check_switch_goto): New fn.
1671         (define_case_label): Call it.
1672         (check_goto): New fn.
1673         * semantics.c (finish_goto_stmt): Call it and use_label.
1674         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
1675         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
1677 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
1679         * class.c (build_vtable_entry_ref): Correct usage of
1680         get_vtbl_decl_for_binfo.
1682         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
1683         * method.c (implicitly_declare_fn): Not here.
1685 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
1687         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
1688         (CPTI_PTMD_DESC_TYPE): ... here.
1689         (ptmd_desc_type_node): Rename to ...
1690         (ptm_desc_type_node): ... here.
1691         * decl.c: Likewise.
1692         * rtti.c (ptmd_initializer): Rename to ...
1693         (ptm_initializer): ... here.
1694         (sythesize_tinfo_var): Adjust. Deal with pointer to member
1695         function.
1696         (create_tinfo_types): Adjust.   
1698 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
1700         Finish implementation of VTTs.
1701         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
1702         CPTI_VTT_PARM_IDENTIFIER.
1703         (vtt_parm_identifier): New macro.
1704         (vtt_parm_type): Likewise.
1705         (BINFO_SUBVTT_INDEX): Likewise.
1706         (BINFO_VPTR_INDEX): Likewise.
1707         (struct lang_decl): Add vtt_parm.
1708         (DECL_VTT_PARM): New macro.
1709         (DECL_USE_VTT_PARM): Likewise.
1710         (DECL_NEEDS_VTT_PARM_P): Likewise.
1711         (get_vtt_name): Declare.
1712         (build_artifical_parm): Likewise.
1713         (fixup_all_virtual_upcast_offsets): Likewise.
1714         (expand_indirect_vtbls_init): Remove.
1715         * call.c (build_new_method_call): Pass the vtt to subobject
1716         constructors and destructors.
1717         * class.c (get_vtt_name): Give it external linkage.
1718         (build_clone): Handle the magic VTT parameters for clones.
1719         (clone_function_decl): Fix typo in comment.
1720         (build_vtt): Keep track of the indices in the VTTs where various
1721         entities are stored.
1722         (build_vtt_inits): Likewise.
1723         (dfs_build_vtt_inits): Likewise.
1724         (build_ctor_vtbl_group): Tweak type of construction vtables.
1725         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
1726         primary bases, when building construction vtables.
1727         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
1728         (initialize_predefined_identifiers): Add vtt_parm_identifier.
1729         (init_decl_processing): Initialize vtt_parm_type.
1730         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
1731         (lang_mark_tree): Make vtt_parm.
1732         * decl2.c (build_artificial_parm): New function.
1733         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
1734         (grokclassfn): Use build_artificial_parm.
1735         * init.c (initialize_vtbl_ptrs): Call
1736         fixup_all_virtual_upcast_offsets directly.
1737         (perform_member_init): Use the complete subobject destructor for
1738         member cleanups.
1739         (build_vtbl_address): New function.
1740         (expand_virtual_init): Handle VTTs.
1741         * optimize (maybe_clone_body): Likewise.
1742         * search.c (fixup_all_virtual_upcast_offsets): Give it external
1743         linkage.
1744         (expand_indirect_vtbls_init): Remove.
1745         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
1746         * tree.c (make_binfo): Make them bigger.
1747         
1748 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
1750         * inc/cxxabi.h (__pbase_type_info): Define, based on
1751         __pointer_type_info.
1752         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
1753         (__pointer_to_member_type_info): Likewise.
1754         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
1755         (__pointer_to_member_type_info::__is_pointer_p): Remove.
1756         (__pointer_type_info::__do_catch): Rename to ...
1757         (__pbase_type_info::__do_catch): ... here. Adjust.
1758         (__pbase_type_info::__pointer_catch): Implement.
1759         (__pointer_type_info::__pointer_catch): Adjust.
1760         (__pointer_to_member_type_info::__pointer_catch): Adjust.
1762 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
1764         * tinfo.h (__user_type_info::contained_virtual_p): New
1765         predicate.
1766         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
1767         shaped heirarchy.
1768         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
1769         diamond shaped heirarchy. Add early out for mixed diamond and
1770         duplicate shaped heirarchy.
1772 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
1774         * cp-tree.h (build_delete): Change prototype.
1775         (build_vec_delete): Likewise.
1776         * call.c (build_scoped_method_call): Use special_function_kind
1777         values to indicate the kind of destruction to be done.
1778         (build_method_call): Likewise.
1779         * decl.c (finish_destructor_body): Likewise.
1780         (maybe_build_cleanup_1): Likewise.  Rename to ...
1781         (maybe_build_cleanup): ... this.
1782         * decl2.c (delete_sanity): Use special_function_kind
1783         values to indicate the kind of destruction to be done.
1784         (build_cleanup): Likewise.
1785         * init.c (perform_member_init): Likewise.
1786         (build_vec_delete_1): Likewise.
1787         (build_dtor_call): Simplify.
1788         (build_delete): Use special_function_kind
1789         values to indicate the kind of destruction to be done.
1790         (build_vbase_delete): Likewise.
1791         (build_vec_delete): Likewise.
1792         
1793         * init.c (sort_member_init): Fix typo in error message generation
1794         code.
1796 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
1798         * semantics.c (begin_class_definition): make the packed
1799         attribute be sensitive to the "-fpack-struct" command line flag
1801 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
1803         Update new-abi upcast algorithm.
1804         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
1805         prototype and meaning of return value.
1806         (__si_class_type_info::__do_upcast): Likewise.
1807         (__vmi_class_type_info::__do_upcast): Likewise.
1808         * tinfo.cc (__class_type_info::__upcast_result): Replace
1809         whole2dst with part2dst. Adjust ctor.
1810         (__class_type_info::__do_upcast): Adjust call of worker function.
1811         (__class_type_info::__do_upcast): Adjust.
1812         (__si_class_type_info::__do_upcast): Adjust. Use parent's
1813         __do_upcast.
1814         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
1815         virtual base in diamond heirarchy bug.
1817 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
1819         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
1820         and bitfield to tinfo_fn_p.
1821         (DECL_TINFO_FN_P): Adjust.
1822         (SET_DECL_TINFO_FN_P): Likewise.
1823         (DECL_MUTABLE_P): Likewise.
1824         (DECL_C_BIT_FIELD): Likewise.
1825         (SET_DECL_C_BIT_FIELD): Likewise.
1826         (CLEAR_DECL_C_BIT_FIELD): Likewise.
1827         (DECL_UNINLINABLE): Likewise.
1828         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
1829         (handle_using_decl): Remove assertion.
1830         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
1831         to build FIELD_DECLs.
1832         (build_base_field): Likewise.
1833         (layout_class_type): Likewise.
1834         * decl.c (init_decl_processing): Likewise.
1835         (build_ptrmemfunc_type): Likewise.
1836         (grokdeclarator): Likewise.
1837         * decl2.c (grok_x_components): Likewise.
1838         * except.c (call_eh_info): Likewise.
1839         * init.c (init_init_processing): Likewise.
1840         * rtti.c (expand_class_desc): Likewise.
1841         (create_pseudo_type_info): Likewise.
1842         (get_vmi_pseudo_type_info): Likewise.
1843         (create_tinfo_types): Likewise.
1844         * ptree.c (print_lang_decl): Adjust.
1845         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
1846         before checking DECL_MUTABLE_P.
1847         
1848         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
1849         parameters for template functions.
1850         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
1851         destructors as well as constructors.
1853 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
1855         * class.c (build_ctor_vtbl_group): Set inits.
1856         * optimize.c (maybe_clone_body): Set DECL_INLINE and
1857         DECL_THIS_INLINE appropriately for clones.
1859         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
1860         (DECL_CONV_FN_P): Simplify.
1861         (DECL_OPERATOR): Remove.
1862         (language_to_string): Declare.
1863         * decl.c (duplicate_decls): Fix typo in comment.
1864         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
1865         (grok_op_properties): Use DECL_CONV_FN_P instead of
1866         IDENTIFIER_TYPENAME_P.
1867         * dump.c (dequeue_and_dump): Dump the language linkage of
1868         declarations.
1869         * error.c (language_to_string): Give it external linkage.
1870         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
1871         (implicitly_declare_fn): Set DECL_LANGUAGE.
1872         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
1873         IDENTIFIER_TYPENAME_P.
1874         (tsubst_decl): Likewise.
1875         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
1876         * semantics.c (finish_member_declaration): Don't mark members of
1877         classes declared in an extern "C" region as extern "C".
1878         
1879 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1881         * decl2.c (qualified_lookup_using_namespace): Look through
1882         namespace aliases.
1884         * decl.c (push_using_decl): Return the old decl on namespace level.
1886 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
1888         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
1889         (VTT_NAME_PREFIX): New macro.
1890         (CTOR_VTBL_NAME_PREFIX): Likewise.
1891         (get_ctor_vtbl_name): New function.
1892         * class.c (get_vtable_name): Simplify.
1893         (get_vtt_name): New function.
1894         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
1895         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
1896         when a virtual base becomes primary.
1897         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
1898         VTTs.
1899         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
1900         additional parameters.
1901         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
1902         (initialize_array): New function.
1903         (build_vtt): Likewise.
1904         (build_vtt_inits): Likewise.
1905         (dfs_build_vtt_inits): Likewise.
1906         (dfs_fixup_binfo_vtbls): Likewise.
1907         (build_ctor_vtbl_group): Likewise.
1908         (initialize_vtable): Use initialize_array.
1909         (accumulate_vtbl_inits): Reimplement to handle construction
1910         vtables.
1911         (dfs_accumulate_vtbl_inits): Likewise.
1912         (bulid_vtbl_initializer): Adjust parameter name.
1913         * method.c (build_typename_overload): Remove #if 0'd code.
1914         (get_ctor_vtbl_name): New function.
1915         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
1916         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
1917         
1918         * cp-tree.h (struct lang_type): Remove search_slot.
1919         (CLASSTYPE_SEARCH_SLOT): Remove.
1920         (emit_base_init): Change prototype.
1921         (initialize_vtbl_ptrs): Likewise.
1922         (expand_indirect_vtbls_init): Likewise.
1923         (clear_search_slots): Remove.
1924         * decl.c (lang_mark_tree): Don't mark search_slot.
1925         * init.c (initialize_vtbl_ptrs): Simplify.
1926         (emit_base_init): Likewise.
1927         * search.c (struct vbase_info): Document decl_ptr.
1928         (convert_pointer_to_single_level): Remove.
1929         (dfs_find_vbases): Remove.
1930         (dfs_init_base_pointers): Simplify.
1931         (dfs_clear_vbase_slots): Remove.
1932         (dfs_vtable_path_unmark): New function.
1933         (init_vbase_pointers): Simplify.
1934         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
1935         (expand_indirect_vtbls_init): Simplify.  Don't call
1936         mark_all_temps_used.
1937         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
1938         initialize_vtbl_ptrs.
1940 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
1942         * except.c: Add static prototypes.
1944 2000-05-20  H.J. Lu  <hjl@gnu.org>
1946         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
1948 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
1950         Don't create a separate copy of virtual bases for the
1951         CLASSTYPE_VBASECLASSES list.
1952         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
1953         (BINFO_FOR_VBASE): Remove.
1954         (CANONICAL_BINFO): Adjust.
1955         (binfo_for_vbase): New function.
1956         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
1957         instead of BINFO_FOR_VBASE.
1958         (build_vbase_pointer): Likewise.
1959         (build_secondary_vtable): Likewise.
1960         (dfs_mark_primary_bases): Likewise.
1961         (mark_primary_bases): Likewise.
1962         (layout_nonempty_base_or_field): Likewise.
1963         (dfs_set_offset_for_shared_vbases): Likewise.
1964         (dfs_set_offset_for_unshared_vbases): Likewise.
1965         (layout_virtual_bases): Likewise.  Adjust for changes to the
1966         CLASSTYPE_VBASECLASSES list.
1967         (dump_class_hierarchy_r): Use binfo_for_vbase
1968         instead of BINFO_FOR_VBASE.
1969         (dump_class_hierarchy): Likewise.
1970         (finish_vtbls): Likewise.
1971         (build_vtbl_initializer): Adjust for changes to the
1972         CLASSTYPE_VBASECLASSES list.
1973         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
1974         * decl.c (finish_destructor_body): Adjust for changes to the
1975         CLASSTYPE_VBASECLASSES list.
1976         * init.c (sort_base_init): Use binfo_for_vbase.
1977         (construct_virtual_bases): Adjust for changes to the
1978         CLASSTYPE_VBASECLASSES list.
1979         (expand_member_init): Use binfo_for_vbase.
1980         (build_vbase_delete):  Adjust for changes to the
1981         CLASSTYPE_VBASECLASSES list.
1982         * method.c (do_build_copy_constructor): Likewise.
1983         * rtti.c (get_base_offset): Use binfo_for_vbase.
1984         (expand_class_desc): Remove #if 0'd code.
1985         * search.c (struct vbase_info): Remove vbase_types.
1986         (get_base_distance):  Use binfo_for_vbase.
1987         (lookup_field_queue_p): Use CANONICAL_BINFO.
1988         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
1989         (get_pure_virtuals): Adjust for changes to the
1990         CLASSTYPE_VBASECLASSES list.
1991         (dfs_find_vbases): Use binfo_for_vbase.
1992         (dfs_init_vbase_pointers): Likewise.
1993         (init_vbase_pointers): Don't initialize vi.vbase_types.
1994         (virtual_context): Use binfo_for_vbase.
1995         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
1996         CLASSTYPE_VBASECLASSES list.
1997         (expand_indirect_vtbls_init): Simplify.
1998         (dfs_get_vbase_types): Don't replicate virtual bases.
1999         (find_vbase_instance): Use binfo_for_vbase.
2000         (binfo_for_vbase): New function.
2001         * typeck.c (get_delta_difference): Use binfo_for_vbase.
2002         
2003 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
2005         * decl2.c (finish_anon_union): Generalize error messages to handle
2006         anonymous structures.
2007         * init.c (perform_member_init): Remove `name' parameter.
2008         (build_field_list): New function.
2009         (sort_member_init): Handle anonymous union initialization order
2010         correctly.  Check for multiple initializations of the same union.
2011         (emit_base_init): Don't look up fields by name here.
2012         (expand_member_init): Record the result of name lookup for future
2013         reference.
2014         * typeck.c (build_component_ref): Fix formatting.
2015         
2016 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
2018         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
2019         * typeck.c (build_x_compound_expr): Replace warn_unused with
2020         warn_unused_value.
2022         * decl2.c (lang_decode_option): Update -Wall unused flags by
2023         calling set_Wunused.
2025 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
2027         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
2028         * init.c (dfs_vtable_path_unmark): Remove.
2029         * search.c (marked_new_vtable_p): Likewise.
2030         (unmarked_new_vtable_p): Likewise.
2031         (dfs_search_slot_nonempty_p): Likewise.
2032         (dfs_mark): Likewise.
2033         (dfs_vtable_path_unmark): Likewise.
2034         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
2035         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
2036         (dfs_init_vbase_pointers): Remove special-case new ABI code.
2037         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
2038         (init_vbase_pointers): Simplify.
2039         (expand_indirect_vtbls_init): Likewise.
2041         * class.c (copy_virtuals): New function.
2042         (build_primary_table): Use it.
2043         (build_secondary_vtable): Likewise.
2044         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
2045         indicate that no vcall offset is required.
2046         (add_virtual_function): Likewise.
2047         (modify_all_vtables): Likewise.
2048         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
2049         (dfs_accumulate_vtbl_inits): Likewise.
2050         (build_vtbl_initializer): Make changes to handle construction
2051         vtables.
2052         (dfs_build_vcall_offset_vtbl_entries): Likewise.
2053         (build_rtti_vtbl_entries): Likewise.
2054         (build_vtable_entries): Handle a NULL vcall_index.
2056 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
2058         * decl2.c (lang_decode_option): Fix thinko.
2060 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
2062         * except.c (check_handlers): New fn.
2063         * cp-tree.h: Declare it.
2064         * semantics.c (finish_handler_sequence): Call it.
2065         (finish_function_handler_sequence): Likewise.
2066         (finish_handler_parms): Set TREE_TYPE on the handler.
2067         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
2068         * search.c (get_base_distance_recursive): If protect>1, ignore
2069         special access.
2070         (get_base_distance): Don't reduce watch_access.
2072 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
2074         * lex.c: #include diagnostic.h.
2075         (lang_init_options): Set default prefixing rules.
2077         * lang-options.h: Add -fdiagnostics-show-location=.
2078         
2079         * decl2.c: #include diagnostic.h.
2080         (lang_decode_option): Handle -fdiagnostics-show-location=.
2082 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
2084         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
2085         * vec.cc: Revert my 2000-05-07 change.
2087 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
2089         * class.c (check_field_decls): Complain about non-static data
2090         members with same name as class in class with constructor.
2092 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
2094         * decl.c (grokdeclarator): Allow non-static data members with
2095         same name as class.
2097 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
2099         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
2100         and pending_inline.filename.  Update prototypes.
2101         * decl.c (define_label): Constify filename parameter.
2102         * decl2.c (warn_if_unknown_interface): Constify local char *.
2103         * input.c Constify input_source.filename. Don't declare
2104         input_filename or lineno.  Constify filename parameter to feed_input.
2105         * lex.c (init_parse): Constify parameter and return value.
2106         (cp_pragma_interface, cp_pragma_implementation): Constify
2107         filename argument.
2108         (reinit_parse_for_method, reinit_parse_for_block,
2109         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
2110         Constify local char *.
2111         * pt.c: Don't declare lineno or input_filename.
2112         (print_template_context, tsubst_friend_function, tsubst_decl,
2113         tsubst, instantiate_decl): Constify local char *.
2114         * semantics.c (expand_body): Constify local char *.
2115         * tree.c (build_srcloc): Constify filename parameter.
2116         * typeck.c (c_expand_asm_operands): Constify filename
2117         parameter.
2119 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
2121         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
2122         offsetof expansion.
2124 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
2126         * inc/cxxabi.h:  Fix typos in comment.
2127         (__base_class_info::__offset): Use a static_cast.
2129 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
2131         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
2132         of std::size_t and std::ptrdiff_t respectively.
2133         * tinfo.cc: Likewise.
2134         * vec.cc: Likewise.
2136 2000-05-06  Richard Henderson  <rth@cygnus.com>
2138         * typeck.c (build_c_cast): Don't warn integer->pointer size
2139         mismatch for constants.
2141 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
2143         * rtti.c (ptmd_initializer): Set non-public, if class is
2144         incomplete.
2145         
2146         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
2147         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2148         __cxa_vec_delete): Likewise.
2149         * tinfo.cc (__dynamic_cast): Likewise.
2150         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2151         __cxa_vec_delete): Likewise.
2153 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
2155         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
2156         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
2157         (lang_decl_flags): Add vcall_offset.
2158         (THUNK_VCALL_OFFSET): Use it.
2159         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
2160         * method.c (make_thunk): Create the lang_decl here, not in
2161         emit_thunk.
2162         (emit_thunk): Make generic thunks into ordinary functions once
2163         they have been fed to expand_body.
2164         * semantics.c (expand_body): Set current_function_is_thunk here.
2166 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2168         * class.c (update_vtable_entry_for_fn): Prototype.
2170         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
2171         and `tmpl'.
2173         * search.c (dfs_build_inheritance_graph_order): Prototype.
2175 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
2177         * cp-tree.h (special_function_kind): Add various kinds of
2178         destructors.
2179         (special_function_p): New function.
2180         * class.c (overrides): Don't let one kind of destructor override
2181         another.
2182         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
2183         whether or not to instantiate a template.
2184         * tree.c (special_function_p): Define.
2186 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
2188         * cp-tree.def (THUNK_DECL): Remove.
2189         * cp-tree.h (DECL_THUNK_P): New macro.
2190         (DECL_NON_THUNK_FUNCTION_P): Likewise.
2191         (DECL_EXTERN_C_FUNCTION_P): Likewise.
2192         (SET_DECL_THUNK_P): Likewise.
2193         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
2194         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
2195         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
2196         * decl.c (decls_match): Use DECL_EXTERN_C_P.
2197         (duplicate_decls): Likewise.
2198         (pushdecl): Likewise.  Adjust thunk handling.
2199         (grokfndecl): Use DECL_EXTERN_C_P.
2200         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
2201         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
2202         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
2203         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
2204         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
2205         DECL_NO_STATIC_CHAIN.
2206         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
2207         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
2208         * search.c (covariant_return_p): Remove THUNK_DECL handling.
2209         * ir.texi: Update.
2210         
2211 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
2213         * tree.c (walk_tree): Set lineno.
2215 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
2217         * exception.cc: Update license notice.
2218         * new.cc: Likewise.
2219         * new1.cc: Likewise.
2220         * new2.cc: Likewise.
2221         * tinfo.cc: Likewise.
2222         * tinfo2.cc: Likewise.
2223         * vec.cc: Likewise.
2224         * inc/cxxabi.h: Likewise.
2225         * inc/exception: Likewise.
2226         * inc/new: Likewise.
2227         * inc/new.h: Likewise.
2228         * inc/typeinfo: Likewise.
2230 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
2232         * tree.c (build_target_expr_with_type): If we already have a
2233         TARGET_EXPR, just return it.
2235         * optimize.c (initialize_inlined_parameters): Don't generate an
2236         EXPR_STMT if we can just use DECL_INITIAL.
2237         * decl.c (emit_local_var): Only make the initialization a
2238         full-expression if stmts_are_full_exprs_p.
2240 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
2242         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
2243         macro.
2244         * call.c (standard_conversion): Use it.
2245         (direct_reference_binding): Likewise.
2246         (build_over_call): Likewise.
2247         (is_properly_derived_from): Likewise.
2248         (compare_ics): Likewise.
2249         * class.c (resolves_to_fixed_type_p): Likewise.
2250         * optimize.c (declare_return_variable): Likewise.
2251         * pt.c (is_specialization_of): Likewise.
2252         (unify): Likewise.
2253         * typeck.c (comp_target_parms): Likeiwse.
2254         (build_static_cast): Likewise.
2255         (build_reinterpret_cast): Likewise.
2256         (build_const_cast): Likewise.
2257         (comp_ptr_ttypes_real): Likewise.
2258         (comp_ptr_ttypes_const): Likewise.
2259         * typeck2.c (process_init_constructor): Likewise.
2261 2000-04-30  Scott Snyder <snyder@fnal.gov>
2263         * decl.c (finish_destructor_body): Use the base destructor when
2264         destroying virtual bases.
2266 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
2268         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
2269         STMT_EXPRs.
2270         * optimize.c (struct inline_data): Add target_exprs field.
2271         (declare_return_variable): When a function returns an aggregate,
2272         use the variable declared in the TARGET_EXPR as the remapped
2273         DECL_RESULT.
2274         (expand_call_inline): Update the pending target_exprs stack.
2275         (optimize_function): Initialize the stack.
2276         
2277         * decl2.c (finish_file): Fix typo in comment.
2279         * method.c (emit_thunk): Don't try to return a `void' value.
2281         * optimize.c (initialize_inlined_parameters): If the parameter is
2282         addressable, we need to make a new VAR_DECL, even if the
2283         initializer is constant.
2285 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
2287         * decl.c (grok_op_properties): Add an extra check of argtypes.
2289 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
2291         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
2292         variables.
2293         (initialize_inlined_parameters): Try to avoid creating new
2294         VAR_DECLs.
2296 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
2298         * lex.c (my_get_run_time): Remove.
2299         (init_filename_times): Use get_run_time instead of my_get_run_time.
2300         (check_newline): Likewise.
2301         (dump_time_statistics): Likewise.
2302         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
2303         of computing elapsed time explicitly.
2305 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
2307         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
2308         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
2309         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
2310         before calling decl_constant_value.
2311         * class.c (check_bitfield_decl): Likewise.
2312         * cvt.c (ocp_convert): Likewise.
2313         (convert): Likewise.
2314         * decl.c (compute_array_index_type): Likewise.
2315         (build_enumerator): Likewise.
2316         * decl2.c (check_cp_case_value): Likewise.
2317         * pt.c (convert_nontype_argument): Likewise.
2318         (tsubst): Likewise.
2319         * typeck.c (decay_conversion): Likewise.
2320         (build_compound_expr): Likewise.
2321         (build_reinterpret_cast): Likewise.
2322         (build_c_cast): Likewise.
2323         (convert_for_assignment): Likewise.
2324         
2325 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
2327         * decl.c (finish_function): Don't play games with DECL_INLINE.
2329 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
2331         * ir.texi: Correct typo.
2333 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2335         * decl.c (grokdeclarator): Reject VLAs as members.
2337 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
2339         * call.c (standard_conversion): Accept conversion between
2340         COMPLEX_TYPEs.
2342         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
2344 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
2346         * decl2.c (finish_file): Remove double setup for accounting
2347         compile time.
2349 2000-04-24  Robert Lipe <robertlipe@usa.net>
2351         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
2353 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
2355         * new.cc (set_new_handler): Needs to be in std::.
2357 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
2359         * cp-tree.h (lang_decl): Remove pretty_function_p.
2360         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
2361         language-specific node.
2362         * decl.c (cp_make_fname_decl): Use build_decl, not
2363         build_lang_decl, to build the variables.
2364         (grokvardecl): Don't call build_lang_decl for local variables in
2365         templates.
2366         (grokdeclarator): Don't call build_lang_decl for local type
2367         declarations in templates.
2368         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
2369         zero'd memory, rather than calling memset.
2370         * pt.c: Include hashtab.h.
2371         (local_specializations): New variable.
2372         (retrieve_local_specialization): Use it.
2373         (register_local_specialization): Likewise.
2374         (tsubst_decl): Don't assume local variables have
2375         DECL_LANG_SPECIFIC.
2376         (instantiate_decl): Set up local_specializations.
2377         * Makefile.in (HTAB_H): New variable.
2379 2000-04-23  Richard Henderson  <rth@cygnus.com>
2381         * typeck.c (c_expand_asm_operands): Restore the original
2382         contents of the output list.
2384 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
2386         * ir.texi:  Document complex number representation.
2387         
2388 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
2390         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
2391         (target_incomplete_p): New function.
2392         (tinfo_base_init): Create comdat NTBS name variable.
2393         (ptr_initializer): Add non_public parameter. Calculate it.
2394         (ptmd_initializer): Likewise.
2395         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
2396         (create_real_tinfo_var): Add non_public parameter. Use it.
2397         Push proxy into global namespace.
2398         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
2399         New enumeration.
2400         * inc/typeinfo (type_info::before, type_info::operator==):
2401         Compare __name addresses.
2402         
2403         * tinfo2.cc: Remove new-abi builtins comment.
2405 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
2407         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
2409         * call.c (joust): Exit early if we get the same function, too.
2411         * decl2.c (key_method): Return NULL_TREE for template classes.
2412         (import_export_class): Don't need to check for template classes.
2414 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
2416         * lex.c: Remove references to cccp.c.
2418 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
2420         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
2421         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
2422         (DECL_DESTRUCTOR_P): Use destructor_attr.
2423         (DECL_CONST_MEMFUNC_P): Reimplement.
2424         (DECL_VOLATILE_MEMFUNC_P): Remove.
2425         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
2426         (overrides): Use DECL_DESTRUCTOR_P.
2427         (check_for_override): Likewise.
2428         * decl.c (start_function): Likewise.
2429         * decl2.c (grokfclassfn): Likewise.
2430         (check_classfn): Likewise.
2431         (grok_function_init): Likewise.
2433 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
2435         * decl2.c (grokfield): Issue error on illegal data member
2436         declaration.
2438 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
2440         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
2442 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
2444         * class.c (build_vtable_entry): Don't build thunks for type-info
2445         functions.
2447 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
2449         * decl.c (decls_match): Allow a redeclaration of a builtin to
2450         specify args while the builtin did not.
2452 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
2454         * cp-tree.def (THUNK_DECL): Add to documentation.
2455         * cp-tree.h (flag_huge_objects): Declare.
2456         * class.c (modify_vtable_entry): Tidy.
2457         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
2458         Calculate delta appropriately for the new ABI.
2459         (dfs_modify_vtables): Use it.
2460         (modify_all_vtables): Fix thinko in code to add overriding copies
2461         of functions to primary vtables.
2462         (build_clone): Fix typo in comment.
2463         (clone_function_decl): Correct order of destructors in vtable.
2464         (build_vbase_offset_vtbl_entries): Adjust comment.
2465         (dfs_vcall_offset_queue_p): Remove.
2466         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
2467         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
2468         (build_vtable_entry): Correct check for pure virtual functions.
2469         Don't declare flag_huge_objects.
2470         * decl.c (flag_huge_objects): Remove declaration.
2471         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
2472         Use int_size_in_bytes.
2473         (emit_thunk): Handle vcall offset thunks.
2474         
2475 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2477         * decl2.c (parse_time, varconst_time): Delete declarations.
2478         (finish_file): Delete LINENO declaration.
2479         START_TIME and THIS_TIME now long.
2481 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
2483         * class.c (build_base_field): Reformat comment.
2484         
2485         * inc/cxxabi.h (stddef.h): Comment inclusion.
2486         (__base_class_info::__offset): Comment shift.
2488 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
2490         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
2491         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
2492         (cp_push_exception_identifier): New macro.
2493         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
2494         (DECL_BASE_DESTRUCTOR_P): Likewise.
2495         (DECL_DELETING_DESTRUCTOR_P): Likewise.
2496         (get_vtbl_decl_for_binfo): Fix formatting.
2497         (in_charge_arg_for_name): New macro.
2498         (maybe_build_cleanup_and_delete): Remove declaration.
2499         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
2500         (in_charge_arg_for_name): New function.
2501         (build_new_method_call): Use it.  Handle cloned destructors.
2502         (build_clone): Don't make the base constructor virtual.
2503         Automatically defer generated functions.
2504         (clone_function_decl): Handle destructors, too.
2505         (clone_constructors_and_destructors): Likewise.
2506         (create_vtable_ptr): Don't create a vtable entry for a cloned
2507         function.
2508         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
2509         (initialize_predefined_identifiers): Update appropriately.
2510         (finish_destructor_body): Simplify.
2511         (maybe_build_cleanup_and_delete): Remove.
2512         * except.c (expand_throw): Handle new-ABI destructors.
2513         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
2514         (build_dtor_call): New function.
2515         (build_delete): Use it.  Simplify.
2516         * optimize.c (maybe_clone_body): Handle destructors.
2517         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
2518         
2519         * exception.cc (cleanup_fn): New typedef.
2520         (CALL_CLEANUP): New macro.
2521         (cp_eh_info): Use them.
2522         (__cp_push_exception): Likewise.
2523         (__cp_pop_exception): Likewise.
2524         
2525 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
2527         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
2528         (complete_dtor_identifier): New macro.
2529         (CLASSTYPE_FIRST_CONVERSION): Remove.
2530         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
2531         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
2532         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
2533         (CLASSTYPE_CONSTRUCTORS): Likewise.
2534         (CLASSTYPE_DESTRUCTORS): Likewise.
2535         (lang_decl): Add cloned_function.
2536         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
2537         (DECL_BASE_CONSTRUCTOR_P): Likewise.
2538         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
2539         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
2540         (DECL_CLONED_FUNCTION_P): Likewise.
2541         (DECL_CLONED_FUNCTION): Likewise.
2542         (clone_function_decl): Declare.
2543         (maybe_clone_body): Likewise.
2544         * call.c (build_user_type_conversion_1): Call complete object
2545         constructors in the new ABI.
2546         (build_new_method_call): Don't add in-charge parameters under the
2547         new ABI.
2548         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
2549         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
2550         CLASSTYPE_DESTRUCTOR_SLOT.
2551         (build_clone): New function.
2552         (clone_function_decl): Likewise.
2553         (clone_constructors_and_destructors): Likewise.
2554         (check_bases_and_members): Use it.
2555         * decl.c (iniitialize_predefined_identifiers): Initialize
2556         complete_dtor_identifier.
2557         (finish_function): Don't add extra code to a clone.
2558         (lang_mark_tree): Mark cloned_function.
2559         * decl2.c (mark_used): Don't bother trying to instantiate things
2560         we synthesized.
2561         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
2562         * method.c (set_mangled_name_for_decl): Don't treat clones as
2563         constructors.
2564         (synthesize_method): Sythesize cloned functions, not the clones.
2565         * optimize.c (inline_data): Update comment on ret_label.
2566         (remap_block): Don't assume DECL_INITIAL exists.
2567         (copy_body_r): Allow ret_label to be NULL.
2568         (maybe_clone_body): Define.
2569         * pt.c (tsubst_decl): Handle clones.
2570         (instantiate_clone): New function.
2571         (instantiate_template): Use it.
2572         (set_mangled_name_for_template_decl): Don't treat clones as
2573         constructors.
2574         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
2575         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
2576         * semantics.c (expand_body): Clone function bodies as necessary.
2577         
2578         * optimize.c (remap_decl): Avoid sharing structure for arrays
2579         whose size is only known at run-time.
2580         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
2582         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
2583         to has_in_charge_parm_p.
2584         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
2585         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
2586         (DECL_COPY_CONSTRUCTOR_P): New macro.
2587         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
2588         (build_user_type_conversion_1): Likewise.
2589         (convert_like_real): Likewise.
2590         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
2591         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
2592         (copy_args_p): Likewise.
2593         (grok_ctor_properties): Likewise.
2594         (start_function): Likewise.
2595         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
2596         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
2597         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
2598         * method.c (do_build_copy_constructor): Use
2599         DECL_HAS_IN_CHARGE_PARM_P.
2600         (synthesize_method): Likewise.
2601         * pt.c (instantiate_template): Remove goto.
2602         * tree.c (build_cplus_method_type): Remove mention of obstacks in
2603         comment.
2604         
2605         * cp-tre.h (finish_function): Change prototype.
2606         * decl.c (end_cleanup_fn): Adjust caller.
2607         (finish_function): Take only one parameter.
2608         * decl2.c (finish_objects): Adjust caller.
2609         (finish_static_storage_duration_function): Likewise.
2610         * method.c (emit_thunk): Likewise.
2611         * parse.y: Likewise.
2612         * parse.c: Regenerated.
2613         * pt.c (instantiate_decl): Likewise.
2614         * rtti.c (synthesize_tinfo_fn): Likewise.
2615         * semantics.c (expand_body): Likewise.
2617         * cp-tree.h (copy_decl): New function.
2618         * class.c (finish_struct_1): Use it.
2619         * lex.c (copy_decl): Define it.
2620         * pt.c (tsubst_decl): Likewise.
2621         * tree.c (copy_template_template_parm): Likewise.
2622         
2623         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
2624         has_nonpublic_assign_ref.
2625         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
2626         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
2627         * class.c (finish_struct_methods): Don't set
2628         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
2629         (interface_only): Don't declare.
2630         (interface_unknown): Likewise.
2632 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2634         * tree.h (HAVE_TEMPLATES): Remove definition.
2635         * lang-options.h (-fthis-is-variable): Remove documentation.
2637 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
2639         * class.c (instantiate_type): Handle object-relative template-id.
2641         * semantics.c (finish_expr_stmt): Call convert_to_void here.
2642         * decl.c (cplus_expand_expr_stmt): Not here.
2644         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
2645         Initialize exprtype earlier.
2647         * parse.y (fn.def1): Check for defining types in return types.
2649         * decl.c (check_tag_decl): Notice extra fundamental types.
2650         Diagnose empty decls in classes, too.
2652         * decl.c (grokdeclarator): Don't override an anonymous name if no 
2653         declarator was given.
2655         * cvt.c (convert_to_void): Call resolve_offset_ref.
2657         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
2659         * decl2.c (decl_namespace): Handle getting a type.
2661         * typeck.c (build_c_cast): Re-enable warning for cast between
2662         pointer and integer of different size.
2664 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
2666         * inc/cxxabi.h (__pointer_type_info): Add restrict and
2667         incomplete flags.
2668         (__pointer_type_info::__pointer_catch): New virtual function.
2669         (__pointer_to_member_type_info): Derive from
2670         __pointer_type_info. Adjust.
2671         (__pointer_to_member_type_info::__do_catch): Remove.
2672         (__pointer_to_member_type_info::__is_pointer_p): Declare.
2673         (__pointer_to_member_type_info::__pointer_catch): Declare.
2674         * rtti.c (qualifier_flags): Add restrict flag.
2675         (ptmd_initializer): Reorder members.
2676         (create_tinfo_types): Expand comments. Reorder
2677         ptmd_desc_type_node members.
2678         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
2679         Implement.
2680         (__pointer_type_info::__do_catch): Move specific code into
2681         __pointer_catch. Call it.
2682         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
2683         specific catch checking. Fix void conversion check.
2684         (__pointer_to_member_type_info::__do_catch): Remove.
2685         (__pointer_to_member_type_info::__pointer_catch): Implement.
2686         
2687 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2689         * lex.c (init_parse): Remove traces of classof and headof.
2690         * decl2.c (flag_operator_names): Default to 1.
2691         (lang_decode_option): Do not set it for -ansi.
2693 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
2695         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
2696         (DECL_MAIN_VARIANT): Remove.
2697         * decl.c (duplicate_decls): Don't set it.
2698         (start_function): Likewise.
2699         (lang_mark_tree): Don't mark it.
2700         * decl2.c (defer_fn): Don't use it.
2701         * lex.c (retrofit_lang_decl): Don't set it.
2702         * pt.c (tsubst_decl): Likewise.
2703         * ptree.c (print_lang_decl): Don't print it.
2704         * typeck.c (mark_addressable): Don't use it.
2705         
2706 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
2708         * vec.cc: Include <new> and <exception>.
2709         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
2710         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
2711         terminate.
2712         (__cxa_vec_delete): Catch dtor exceptions.
2714 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
2716         Prepend __ to implementation defined names.
2717         * inc/typeinfo (type_info): Rename _name to __name.
2718         (type_info::type_info): Rename parameter.
2719         (type_info::operator==, type_info::operator!=,
2720         type_info::before): Likewise.
2721         (type_info::is_pointer_p, type_info::is_function_p,
2722         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
2723         parameters.
2724         * inc/cxxabi.h
2725         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
2726         (__pointer_type_info::__pointer_type_info): Likewise.
2727         (__pointer_type_info::is_pointer_p,
2728         __pointer_type_info::do_catch): Prepend __. Rename parameters.
2729         (__array_type_info::__array_type_info): Rename parameters.
2730         (__function_type_info::__function_type_info): Likewise.
2731         (__function_type_info::is_function_p): Prepend __.
2732         (__enum_type_info::__enum_type_info): Rename parameters.
2733         (__pointer_to_member_type_info::__pointer_to_member_type_info):
2734         Likewise.
2735         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
2736         parameters.
2737         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
2738         (__class_type_info::__class_type_info): Rename parameters.
2739         (__class_type_info::sub_kind): Prepend __. Adjust member names.
2740         (__class_type_info::upcast_result,
2741         __class_type_info::dyncast_result): Prepend __. Move definition
2742         into tinfo.cc.
2743         (__class_type_info::do_upcast, __class_type_info::do_catch,
2744         __class_type_info::find_public_src,
2745         __class_type_info::do_dyncast,
2746         __class_type_info::do_find_public_src): Prepend __. Rename
2747         parameters.
2748         (__si_class_type_info::__si_class_type_info): Rename parameters.
2749         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
2750         __si_class_type_info::do_find_public_src): Prepent __. Rename
2751         parameters.
2752         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
2753         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
2754         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
2755         parameters.
2756         (__dynamic_cast): Rename parameters.
2757         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
2758         type_info::do_catch, type_info::do_upcast): Prepend __.
2759         (contained_p, public_p, virtual_p, contained_public_p,
2760         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
2761         (__class_type_info::do_catch,
2762         __class_type_info::do_upcast): Prepend __. Adjust.
2763         (__class_type_info::__upcast_result,
2764         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
2765         Adjust.
2766         (__class_type_info::find_public_src): Prepend __. Adjust.
2767         (__class_type_info::do_find_public_src, 
2768         __si_class_type_info::do_find_public_src, 
2769         __vmi_class_type_info::do_find_public_src): Likewise.
2770         (__class_type_info::do_dyncast,
2771         __si_class_type_info::do_dyncast,
2772         __vmi_class_type_info::do_dyncast): Likewise.
2773         (__class_type_info::do_upcast,
2774         __si_class_type_info::do_upcast,
2775         __vmi_class_type_info::do_upcast): Likewise.
2776         (__dynamic_cast): Adjust.
2777         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
2778         (__function_type_info::is_function_p): Likewise.
2779         (__pointer_type_info::do_catch): Likewise. Adjust.
2780         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
2781         (__throw_type_match_rtti_2): Adjust.
2782         (__is_pointer): Adjust.
2784 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
2786         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
2787         (complete_ctor_identifier): New macro.
2788         (special_function_kind): Add sfk_copy_constructor and
2789         sfk_assignment_operator.
2790         (LOOKUP_HAS_IN_CHARGE): Remove.
2791         (cons_up_default_function): Rename to ...
2792         (implicitly_declare_fn): ... this.
2793         * call.c (build_new_method_call): Add in-charge parameters for
2794         constructors here.
2795         * class.c (add_implicitly_declared_members): Change parameter name
2796         from cant_have_assignment to cant_have_const_assignment.
2797         Replace calls to cons_up_default_function to implicitly_declare_fn.
2798         * cvt.c (ocp_convert): Use complete_ctor_identifier.
2799         * decl.c (initialize_predefined_identifiers): Initialize it.
2800         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
2801         complex expression.
2802         * init.c (expand_default_init): Don't calculate the in-charge
2803         parameter here.
2804         (build_new_1): Likewise.
2805         * lex.c (cons_up_default_function): Move to method.c.
2806         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
2807         (implicitly_declare_fn): New function.
2808         * typeck.c (build_static_cast): Use complete_ctor_identifier.
2809         (build_modify_expr): Likewise.
2810         * typeck2.c (build_functional_cast): Likewise.
2811         
2812         Under the new ABI, constructors don't return `this'.
2813         * cp-tree.h (warn_reorder): Declare.
2814         (special_function_kind): New enum.
2815         (global_base_init_list): Remove declaration.
2816         (emit_base_init): Don't return a value.
2817         (check_base_init): Don't declare.
2818         (is_aggr_typedef): Likewise.
2819         * decl.c (check_special_function_return_type): New function.
2820         (return_types): Remove.
2821         (grokdeclarator): Use check_special_function_return_type.
2822         (start_function): Don't initialize ctor_label under the new ABI.
2823         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
2824         * init.c (begin_init_stmts): Move to top of file.
2825         (finish_init_stmts): Likewise.
2826         (warn_reorder): Don't declare.
2827         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
2828         value.
2829         (check_base_init): Remove.
2830         (is_aggr_typedef): Likewise.
2831         (build_new_1): Don't use the return value of a constructor.
2832         * semantics.c (setup_vtbl_ptr): Don't use the return value
2833         of emit_base_init.
2834         * typeck.c (check_return_expr): Don't magically convert return
2835         statements into `return this' in constructors under the new ABI.
2836         
2837         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
2838         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
2839         (base_ctor_identifier): New macro.
2840         (base_dtor_identifier): Likewise.
2841         (deleting_dtor_identifier): Likewise.
2842         * decl.c: Don't include obstack.h.
2843         (obstack_chunk_alloc): Don't define.
2844         (obstack_chunk_free): Likewise.
2845         (struct predefined_identifier): New type.
2846         (initialize_predefined_identifiers): New function.
2847         (init_decl_processing): Use it.
2848         (debug_temp_inits): Remove.
2849         (start_method): Don't call preserve_data.
2850         (hack_incomplete_structures): Update comment.
2851         * init.c (init_init_processing): Don't initialize
2852         nelts_identifier.
2853         (build_offset_rf): Remove dead code.
2854         (build_delete): Use CLASSTYPE_N_BASECLASSES.
2855         * search.c (init_search_processing): Don't initialize
2856         vptr_identifier.
2857         
2858 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2860         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
2861         some sign_compare warnings.
2863 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
2865         Rename abi::__vmi_class_type_info members.
2866         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
2867         base_list, detail_masks members to vmi_flags, vmi_base_count,
2868         vmi_bases and vmi_flags_masks respectively.
2869         (__vmi_class_type_info::vmi_flags_masks): Rename
2870         details_unknown_mask to flags_unknown_mask.
2871         * tinfo.cc (__class_type_info::do_upcast): Adjust.
2872         (__vmi_class_type_info::do_find_public_src): Adjust.
2873         (__vmi_class_type_info::do_dyncast): Adjust.
2874         (__vmi_class_type_info::do_upcast): Adjust.
2875         
2876 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
2878         * tinfo.cc (convert_to_base): New function.
2879         (get_vbase_offset): Remove. Move into convert_to_base.
2880         (__vmi_class_type_info::do_find_public_src): Adjust.
2881         (__vmi_class_type_info::do_dyncast): Adjust.
2882         (__vmi_class_type_info::do_upcast): Adjust.
2884 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
2886         * tinfo.cc (operator=): Use __builtin_strcmp.
2887         * tinfo2.cc (before): Likewise.
2889 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
2891         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
2892         (DECL_SAVED_INLINE): Rename to ...
2893         (DECL_DEFERRED_FN): ... this.
2894         (in_function_p): Remove declaration.
2895         (mark_inline_for_output): Rename to ... 
2896         (defer_fn): ... this.
2897         * decl.c (finish_function): Adjust call to mark_inline_for_output.
2898         (in_function_p): Remove definition.
2899         * decl2.c (saved_inlines): Rename to ...
2900         (deferred_fns): ... this.
2901         (saved_inlines_used): Rename to ...
2902         (deferred_fns_used): ... this.
2903         (mark_inline_for_output): Rename to ...
2904         (defer_fn): ... this.
2905         (finish_file): Adjust accordingly.
2906         (init_decl2): Likewise.
2907         * lex.c (cons_up_default_function): Likewise.
2908         * pt.c (mark_decl_instantiated): Likewise.
2909         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
2910         circumstances.
2911         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
2912         * semantics.c (expand_body): Defer more functions.
2914 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
2916         * vec.cc: New file.
2917         * Make-lang.in (CXX_LIB2FUNCS): Add it.
2918         (vec.o): Build it.
2919         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2920         __cxa_vec_delete): Declare.
2922 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
2924         * rtti.c (dfs_class_hint_mark): New static function.
2925         (dfs_class_hint_unmark): New static function.
2926         (class_hint_flags): Use them.
2928 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
2930         * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
2932 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
2934         * cp-tree.h (instantiate_decl): Change prototype.
2935         * decl2.c (mark_used): Adjust call.
2936         * optimize.c (inlinable_function_p): Adjust handling of templates.
2937         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
2938         (do_type_instantiation): Likewise.
2939         (instantiate_decl): Defer more templates.
2940         (instantiate_pending_templates): Adjust logic to handle inline
2941         friend functions.
2943         * Makefile.in (GGC_H): New variable.  Use it throughout in place
2944         of ggc.h.
2945         
2946         * call.c: Don't include obstack.h.  Include ggc.h.
2947         (obstack_chunk_alloc): Don't define.
2948         (obstack_chunk_free): Likewise.
2949         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
2950         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
2951         (pop_switch): Free it.
2953         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
2955         * dump.c (dequeue_and_dump): Don't try to print the bit_position
2956         if we don't have a DECL_FIELD_OFFSET.
2958 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
2960         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
2961         special_function_p.
2963 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2965         * cfns.gperf (hash, libc_name_p): Prototype.
2967         * rtti.c (build_dynamic_cast_1): Constification.
2969         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
2971         * semantics.c (deferred_type_access_control): Prototype.
2973 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
2975         Correct many new ABI issues regarding vbase and vcall offset
2976         layout.
2977         * cp-tree.h (BINFO_VTABLE): Document.
2978         (struct lang_type): Tweak formatting.
2979         (BINFO_PRIMARY_BINFO): Add to documentation.
2980         (CLASSTYPE_VSIZE): Fix typo in comment.
2981         (CLASSTYPE_VBASECLASSES): Update documentation.
2982         (BINFO_VBASE_MARKED): Remove.
2983         (SET_BINFO_VBASE_MARKED): Likewise.
2984         (CLEAR_BINFO_VBASE_MARKED): Likewise.
2985         (BINFO_FIELDS_MARKED): Remove.
2986         (SET_BINFO_FIELDS_MARKED): Likewise.
2987         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
2988         (enum access_kind): New enumeration.
2989         (num_extra_vtbl_entries): Remove declaration.
2990         (size_extra_vtbl_entries): Likewise.
2991         (get_vtbl_decl_for_binfo): New function.
2992         (dfs_vbase_unmark): Remove declaration.
2993         (mark_primary_bases): Likewise.
2994         * class.c (SAME_FN): Remove.
2995         (struct vcall_offset_data_s): Move definition.
2996         (build_vbase_pointer): Use `build', not `build_binary_op', to
2997         access the vbase pointer under the new ABI.
2998         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
2999         (build_primary_vtable): Likewise.
3000         (dfs_mark_primary_bases): Move here from search.c.
3001         (mark_primary_bases): Likewise.
3002         (determine_primary_bases): Under the new ABI, don't make a base
3003         class a primary base just because we don't yet have any virtual
3004         functions.
3005         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
3006         (num_vfun_entries): Remove.
3007         (dfs_count_virtuals): Likewise.
3008         (num_extra_vtbl_entries): Likewise.
3009         (size_extra_vtbl_entries): Likewise.
3010         (layout_virtual_bases): Iterate in inheritance graph order under
3011         the new ABI.
3012         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
3013         indicate that a vfield is present.
3014         (init_class_processing): Initialize access_public_node, etc., from
3015         ak_public, etc.
3016         (get_vtbl_decl_for_binfo): New function.
3017         (dump_class_hierarchy_r): Likewise.
3018         (dump_class_hierarchy): Use it.
3019         (finish_vtbls): Build the vtbls in inheritance graph order.
3020         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
3021         (initialize_vtable): Use get_vtbl_decl_for_binfo.
3022         (accumulate_vtbl_inits): Add comments explaining why a pre-order
3023         walk is required.
3024         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
3025         where the vptr points, even for primary vtables.
3026         (build_vtbl_initializer): Adjust handling of vbase and vcall
3027         offsets.
3028         (build_vcall_and_vbase_vtable_entries): New function.
3029         (dfs_build_vbase_offset_vtbl_entries): Remove.
3030         (build_vbase_offset_vtbl_entries): Reimplement.
3031         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
3032         were already handled in a primary base class vtable.
3033         (build_vcall_offset_vtbl_entries): Adjust.
3034         (build_rtti_vtbl_entries): Adjust.
3035         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
3036         * init.c (expand_virtual_init): Simplify.
3037         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
3038         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
3039         * search.c (BINFO_ACCESS): New macro.
3040         (SET_BINFO_ACCESS): Likewise.
3041         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
3042         (access_in_type): Likewise.
3043         (dfs_accessible_p): Likewise.
3044         (protected_accessible_p): Likewise.
3045         (lookup_fnfields_1): Adjust documentation.
3046         (dfs_mark_primary_bases): Move to class.c
3047         (mark_primary_bases): Likewise.
3048         (dfs_vbase_unmark): Remove.
3049         (virtual_context): Use BINFO_FOR_VBASE.
3050         (dfs_get_vbase_types): Simplify.
3051         (dfs_build_inheritance_graph_order): New function.
3052         (get_vbase_types): Use it.
3053         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
3055         * tinfo.cc (get_vbase_offset): New function.
3056         (__vmi_class_type_info::do_find_public_src): Use it.
3057         (__vmi_class_type_info::do_dyncast): Likewise.
3058         (__vmi_class_type_info::do_upcast): Likewise.
3059         
3060 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
3062         * lang-specs.h: Pass -fno-show-column to the preprocessor.
3064 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
3066         * rtti.c (class_hint_flags): Rename flags.
3067         (class_initializer): Remove flags.
3068         (synthesize_tinfo_var): Combine offset and flags. Add flags
3069         for __vmi_class_type_info.
3070         (create_tinfo_types): Remove flags from __class_type_info and
3071         __si_class_type_info. Merge flags and offset from
3072         base_class_type_info.
3073         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
3074         (__base_class_info::is_virtual_p): Adjust.
3075         (__base_class_info::is_public_p): Adjust.
3076         (__base_class_info::offset): New accessor.
3077         (__class_type_info::details): Remove member.
3078         (__class_type_info::__class_type_info): Lose details.
3079         (__class_type_info::detail_masks): Remove.
3080         (__si_class_type_info::__si_class_type_info): Lose details.
3081         (__vmi_class_type_info::details): New member.
3082         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
3083         (__vmi_class_type_info::detail_masks): New member.
3084         * tinfo.cc (__class_type_info::do_upcast): Initialize result
3085         with unknown_details_mask.
3086         (__vmi_class_type_info::do_find_public_src): Adjust
3087         (__vmi_class_type_info::do_dyncast): Adjust.
3088         (__vmi_class_type_info::do_upcast): Set result details, if
3089         needed. Adjust.
3090         (__dynamic_cast): Temporarily #if out optimization.
3092 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
3094         * rtti.c (get_tinfo_decl): Mark used.
3095         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
3096         mark as dealt with, if we output it.
3098 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
3100         * class.c: Reorganize to put virtual function table initialization
3101         machinery at the end of the file.
3103 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
3105         * class.c (finish_struct): Use bitsize_zero_node.
3106         * pt.c (instantiate_class_template): Likewise.
3108 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
3110         Put RTTI entries at negative offsets in new ABI.
3111         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
3112         vbase offset at index -3, not -1.
3113         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
3114         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
3115         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
3116         (build_rtti_vtbl_entries): New function.
3117         (set_rtti_entry): Remove.
3118         (build_primary_vtable): Don't use it.
3119         (build_secondary_vtable): Likewise.
3120         (start_vtable): Remove.
3121         (first_vfun_index): New function.
3122         (set_vindex): Likewise.
3123         (add_virtual_function): Don't call start_vtable.  Do call
3124         set_vindex.
3125         (set_primary_base): Rename parameter.
3126         (determine_primary_base): Likewise.
3127         (num_vfun_entries): Don't use skip_rtti_stuff.
3128         (num_extra_vtbl_entries): Include RTTI information.
3129         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
3130         (skip_rtti_stuff): Remove.
3131         (dfs_modify_vtables): Don't use it.
3132         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
3133         (layout_nonempty_base_or_field): Update size handling.
3134         (create_vtable_ptr): Tweak.
3135         (layout_class_type): Adjust parameter names.
3136         (finish_struct_1): Simplify.
3137         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
3138         (skip_rtti_stuff): Remove.
3139         (first_vfun_index): New function.
3140         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
3141         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
3142         (marked_vtable_pathp): Declare.
3143         (unmarked_vtable_pathp): Likewise.
3144         * error.c (dump_expr): Use first_vfun_index to calculate vtable
3145         offsets.
3146         * rtti.c (build_headof): Look for RTTI at negative offsets.
3147         (get_tinfo_decl_dynamic): Likewise.
3148         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
3149         here.
3150         (create_pseudo_type_info): Do it here instead.  Adjust so that
3151         vptr points at first virtual function.
3152         * search.c (marked_vtable_pathp): Make it global.
3153         (unmarked_vtable_pathp): Likewise.
3154         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
3155         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
3156         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
3157         (get_pure_virtuals): Likewise.
3158         (expand_upcast_fixups): Likewise.
3159         * tree.c (debug_binfo): Likewise.
3160         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
3161         negative offset.
3162         
3163 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3165         * class.c (check_field_decl): Fix typo.
3166         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
3167         (check_methods): Likewise.
3168         (check_field_decls): Likewise.
3169         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
3170         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
3171         Use DECL_RESULT_FLD, not DECL_RESULT.
3172         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
3173         * lex.c (identifier_type): Likewise.
3174         * pt.c (determine_specialization, lookup_template_class): Likewise.
3175         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
3176         (resolve_overloaded_unification, more_specialized): Likewise.
3177         * semantics.c (finish_member_declaration): Likewise.
3178         * typeck.c (build_x_function_call): Likewise.
3179         
3180 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
3182         * class.c (layout_empty_base): Handle empty bases with non-byte
3183         alignment.
3184         (build_base_field): Likewise.
3185         (layout_virtual_bases): Likewise.
3187         * class.c (finish_struct_1): Fix typo in this change:
3188         
3189         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3191 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
3193         * decl.c (grokdeclarator): Count partial specializations when
3194         keeping track of how many template classes have been seen.
3196         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
3197         
3198 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3200         * class.c (build_vbase_pointer_fields): layout_field now place_field.
3201         (get_vfield_offset): Use byte_position.
3202         (set_rtti_entry): Set OFFSET to ssizetype zero.
3203         (get_binfo_offset_as_int): Deleted.
3204         (dfs_record_base_offsets): Use tree_low_cst.
3205         (dfs_search_base_offsets): Likewise.
3206         (layout_nonempty_base_or_field): Reflect changes in RLI format
3207         and call byte_position.
3208         (layout_empty_base): Convert offset to ssizetype.
3209         (build_base_field): use rli_size_unit_so_far.
3210         (dfs_propagate_binfo_offsets): Do computation in proper type.
3211         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
3212         (layout_class_type): Reflect changes in RLI names and fields.
3213         (finish_struct_1): Set DECL_FIELD_OFFSET.
3214         * dump.c (dequeue_and_dump): Call bit_position.
3215         * expr.c (cplus_expand_constant): Use byte_position.
3216         * rtti.c (expand_class_desc): Use bitsize_one_node.
3217         * typeck.c (build_component_addr): Use byte_position and don't
3218         special case for zero offset.
3219         
3220 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3222         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
3223         
3224         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
3225         tinfo object.
3226         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
3227         vtable.
3229 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3231         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
3232         DECL_P macros.
3233         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
3234         make_typename_type, check_initializer, cp_finish_decl,
3235         xref_tag): Likewise.
3236         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
3237         decl_namespace, arg_assoc_template_arg, arg_assoc,
3238         validate_nonmember_using_decl, do_class_using_decl): Likewise.
3239         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
3240         args_to_string): Likewise.
3241         * friend.c (is_friend): Likewise.
3242         * lex.c (note_got_semicolon, note_list_got_semicolon,
3243         is_global): Likewise.
3244         * method.c (build_overload_nested_name, build_overload_value,
3245         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
3246         * parse.y (typename_sub, typename_sub1): Likewise.
3247         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
3248         process_partial_specialization, convert_template_argument,
3249         template_args_equal, add_pending_template, lookup_template_class,
3250         for_each_template_parm_r, maybe_fold_nontype_arg,
3251         tsubst, instantiate_template, type_unification_real, unify,
3252         instantiate_pending_templates, set_mangled_name_for_template_decl):
3253         Likewise.
3254         * repo.c (repo_get_id, repo_template_used): Likewise.
3255         * search.c (lookup_field_1): Likewise.
3256         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
3257         * xref.c (classname): Likewise.
3258         
3259 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
3261         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
3262         (CANONICAL_BINFO): New macro.
3263         (BINFO_NEW_VTABLE_MARKED): Use it.
3264         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
3265         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
3266         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
3267         not TREE_TYPE.
3268         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3269         (build_secondary_vtable): Likewise.
3270         (dfs_finish_vtbls): Likewise.
3271         (dfs_accumulate_vtbl_inits): Likewise.
3272         (accumulate_vtbl_inits): New function.
3273         (finish_vtbls): Make sure that virtual bases come after
3274         non-virtual bases in the vtable group.
3275         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
3276         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3277         * search.c (struct vbase_info): Move definition.
3278         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3279         (unmarked_new_vtable_p): Likewise.
3280         (dfs_mark_vtable_path): Remove.
3281         (dfs_mark_new_vtable): Remove.
3282         (dfs_unmark_new_vtable): Likewise.
3283         (dfs_clear_search_slot): Likewise.
3284         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
3285         (dfs_clear_vbase_slots): Likewise.
3286         (init_vbase_pointers): LIkewise.
3287         
3288 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
3290         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
3291         SIZETYPE to a non-SIZETYPE.
3293 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
3295         * class.c (layout_virtual_bases): Adjust names in conditionally
3296         compiled code.
3297         
3298         * class.c (record_base_offsets): New function.
3299         (layout_conflict_p): Likewise.
3300         (layout_nonempty_base_or_field): Use it.
3301         (layout_empty_base): New function.
3302         (build_base_field): Use it.
3303         (build_base_fields): Update comment.
3304         (layout_virtual_bases): Fold in a little code form
3305         layout_basetypes.  Use layout_empty_base.
3306         (layout_basetypes): Remove.
3307         (end_of_class): New function.
3308         (layout_class_type): Use it.  Adjust.
3310         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
3311         (fntype_p): Remove.
3312         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
3313         comment. 
3314         (dfs_skip_nonprimary_vbases_markedp): Likewise.
3315         * typeck.c (fntype_p): Remove.
3317         * cp-tree.h (TI_SPEC_INFO): Remove.
3318         (CLASSTYPE_TI_SPEC_INFO): Likewise.
3319         * pt.c (process_partial_specialization): Likewise.
3321         * class.c (build_base_field): Fix thinko in computation of binfo
3322         offsets.
3324         * tree.c (mark_local_for_remap_p): Mark variables declared in
3325         TARGET_EXPRs as well.
3327 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
3329         * typeck.c (require_complete_type, complete_type,
3330         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
3331         build_array_ref, convert_arguments, pointer_diff,
3332         build_x_unary_op, build_unary_op, build_c_cast,
3333         build_modify_expr): Use COMPLETE_TYPE_P etc.
3334         * call.c (is_complete, convert_like_real,
3335         build_new_method_call): Likewise.
3336         * class.c (build_vbase_pointer_fields, check_bases,
3337         build_base_field, finish_struct_1, pushclass): Likewise.
3338         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
3339         * decl.c (maybe_process_template_type_declaration, pushtag,
3340         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
3341         layout_var_decl, check_initializer, cp_finish_decl,
3342         grokdeclarator, require_complete_types_for_parms,
3343         grok_op_properties, xref_tag, xref_basetypes,
3344         check_function_type): Likewise.
3345         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
3346         * friend.c (do_friend): Likewise.
3347         * init.c (build_offset_ref): Likewise.
3348         * parse.y (structsp): Likewise.
3349         * pt.c (maybe_process_partial_specialization,
3350         tsubst_friend_function, instantiate_class_template, tsubst,
3351         do_type_instantiation, instantiate_pending_templates): Likewise.
3352         * repo.c (repo_get_id): Likewise.
3353         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
3354         synthesize_tinfo_var, emit_support_tinfos): Likewise.
3355         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
3356         * semantics.c (begin_class_definition): Likewise.
3357         * tree.c (build_cplus_method_type): Likewise.
3358         * typeck2.c (digest_init, build_functional_cast,
3359         add_exception_specifier): Likewise.
3360         * parse.h, parse.c: Regenerated.
3362 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
3364         * inc/cxxabi.h: New header file. Define new-abi entry points.
3365         (__pointer_type_info::target): Rename member to ...
3366         (__pointer_type_info::type): ... here.
3367         (__base_class_info::type): Rename member to ...
3368         (__base_class_info::base): ... here.
3369         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
3370         * cp-tree.h (CPTI_ABI): New global tree enumeration.
3371         (abi_node): New global tree node.
3372         * decl.c (abi_node): Document.
3373         (init_decl_processing): Initialize abi_node.
3374         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
3375         (get_vmi_pseudo_type_info): Likewise.
3376         (create_tinfo_types): Likewise.
3377         (emit_support_tinfos): Likewise.
3378         * tinfo.h (cxxabi.h): Include for new-abi.
3379         Move rtti class definitions to new header file.
3380         * tinfo.cc (abi): Use the namespace.
3381         (std): Move new abi rtti classes from here ...
3382         (__cxxabiv1): ... to here.
3383         * tinfo2.cc (cxxabi.h): Include for new-abi.
3384         Move rtti class definitions to new header file.
3385         (std): Move new abi rtti classes from here ...
3386         (__cxxabiv1): ... to here.
3387         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
3388         namespace.
3390 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
3391             Jason Merrill  <jason@casey.cygnus.com>
3393         * method.c (build_overload_int): Use host_integerp.
3395 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3397         * init.c (build_offset_ref): Handle the case of a templated member
3398         function.
3399     
3400 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3402         * except.c (expand_exception_blocks): Clear catch_clauses_last.
3404 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
3406         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
3407         * class.c (check_bitfield_decl): Turn illegal bitfields into
3408         non-bitfields.
3409         (dfs_propagate_binfo_offsets): Adjust for new size_binop
3410         semantics.
3411         (dfs_offset_for_unshared_vbases): Likewise.
3412         * cvt.c (cp_convert_to_pointer): Convert NULL to a
3413         pointer-to-member correctly under the new ABI.
3414         * expr.c (cplus_expand_constant): Don't use cp_convert when
3415         turning an offset into a pointer-to-member.
3416         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
3417         when dereferencing them under the new ABI.
3418         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
3419         of pointers-to-members under the new ABI.
3420         
3421         * class.c (check_bitfield_decl): Remove restriction on really long
3422         bitfields.
3423         (layout_class_type): Implement new ABI handling of bitfields
3424         longer than their types.
3426 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3428         * parse.y (extdefs): Call ggc_collect.
3429         * parse.c: Regenerated.
3431 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
3433         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
3434         (note_name_declared_in_class): Use OVL_CURRENT to get at a
3435         potential overload.
3437 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3439         * class.c (build_vbase_path): Use integer_zerop.
3440         (build_vtable_entry): Use tree_low_cst.
3441         (get_vfield_offset): Use bit_position.
3442         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
3443         Use tree_low_cst.
3444         (check_bitfield_decl): Set DECL_SIZE using convert.
3445         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
3446         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
3447         Use tree_low_cst.
3448         (finish_struct_1): Use bit_position.
3449         (dump_class_hierarchy): Use tree_low_cst.
3450         * cp-tree.h (min_precision): Add declaration.
3451         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
3452         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
3453         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
3454         * expr.c (cplus_expand_constant): Use bit_position.
3455         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
3456         * rtti.c (get_base_offset): Use bit_position.
3457         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
3458         host_integerp, and tree_low_cst.
3459         (pointer_int_sum): Use integer_zerop.
3460         (build_component_addr): Use bit_position.
3461         
3462 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
3464         * typeck.c (require_complete_type): Don't assume size_zero_node.
3465         (complete_type_or_else): Likewise.
3467 2000-03-16  Steven Grady <grady@digitaldeck.com>
3468             Jason Merrill  <jason@casey.cygnus.com>
3470         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
3472 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
3474         * decl2.c (grokfield): Bail out if type is error_mark_node.
3476 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
3478         * tinfo2.cc (__ptr_to_member_data): Rename to ...
3479         (__pointer_to_member_data): ... here. Adjust.
3480         * rtti.c (create_tinfo_types): Adjust.
3482 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
3484         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
3485         * decl.c (ref_desc_type_node): Undocument.
3486         * rtti.c (ptr_ref_initializer): Rename to ...
3487         (ptr_initializer): ... here. Adjust comments.
3488         (ptmd_initializer): Fix comment thinko.
3489         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
3490         (create_tinfo_types): Remove ref_desc_type_node init.
3491         * tinfo2.cc (__reference_type_info): Remove.
3493 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
3495         * decl.c (cp_finish_decl): Remove obsolete comment.
3496         
3497         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
3499 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
3501         * cp-tree.h: Tweak documentation.
3502         * class.c (build_vbase_pointer_fields): Layout the fields, too.
3503         (avoid_overlap): Remove.
3504         (get_binfo_offset_as_int): New function.
3505         (dfs_serach_base_offsets): Likewise.
3506         (layout_nonempty_base_or_field): Likewise.
3507         (build_base_field): Layout fields here.  Avoid placing two objects
3508         of the same type at the same address, under the new ABI.
3509         (build_base_fields): Adjust accordingly.
3510         (create_vtable_ptr): Return the new field, but don't attach it to
3511         TYPE_FIELDS.
3512         (remove_base_field): Remove.
3513         (remove_base_fields): Remove.
3514         (layout_basetypes): Adjust accordingly.
3515         (layout_class_type): Call layout_field for each field, rather than
3516         just making a wholesale call to layout_type.
3518 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
3520         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
3522 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
3524         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
3526         * except.c (dtor_nothrow): New fn.
3527         (do_pop_exception): Use it.  Take type parm.
3528         (push_eh_cleanup): Take type parm.
3529         (expand_start_catch_block): Pass it.
3530         (build_eh_type_type_ref): Accept null type.
3532 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
3534         * cp-tree.h (revert_static_member_fn): Change prototype.
3535         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
3536         (grok_op_properties): Likewise.
3537         (start_function): Likewise.
3538         (revert_static_member_fn): Simplify.
3539         * pt.c (check_explicit_specialization): Adjust call to
3540         revert_static_member_fn.
3542 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
3544         * cp-tree.h (scope_kind): New type.
3545         (tmpl_spec_kind): Likewise.
3546         (declare_pseudo_global_level): Remove.
3547         (pseudo_global_level_p): Rename to template_parm_scope_p.
3548         (pushlevel): Remove declaration.
3549         (begin_scope): New function.
3550         (finish_scope): Likewise.
3551         (current_tmpl_spec_kind): Likewise.
3552         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
3553         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
3554         Add template_spec_p.
3555         (toplevel_bindings_p): Adjust.
3556         (declare_pseudo_global_level): Remove.
3557         (pseudo_global_level_p): Rename to template_parm_scope_p.
3558         (current_tmpl_spec_kind): New function.
3559         (begin_scope): Likewise.
3560         (finish_scope): Likewise.
3561         (maybe_push_to_top_level): Adjust.
3562         (maybe_process_template_type_declaration): Likewise.
3563         (pushtag): Likewise.
3564         (pushdecl_nonclass_level): Likewise.
3565         (lookup_tag): Likewise.
3566         (grokfndecl): Handle member template specializations.  Share
3567         constructor and non-constructor code.
3568         * decl2.c (check_classfn): Handle member template specializations.
3569         * pt.c (begin_template_parm_list): Use begin_scope.
3570         (begin_specialization): Likewise.
3571         (end_specialization): Likewise.
3572         (check_explicit_specialization): Use current_tmpl_spec_kind.
3573         Handle member template specializations.
3574         (end_template_decl): Use finish_scope.  Remove call to
3575         get_pending_sizes.
3576         (push_template_decl_real): Remove bogus error message.
3577         (tsubst_decl): Fix typo in code contained in comment.
3578         (instantiate_template): Handle member template specializations.
3579         (most_general_template): Likewise.
3580         
3581 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
3583         * lex.c (whitespace_cr): Compress consecutive calls to warning().
3584         (do_identifier): Ditto for error().
3586         * pt.c (convert_nontype_argument): Ditto for cp_error().
3587         (convert_template_argument): Ditto for cp_pedwarn().
3589 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
3591         * exception.cc (__check_null_eh_spec): New fn.
3592         * except.c (expand_end_eh_spec): Call it if the spec is throw().
3594 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
3596         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
3597         * except.c (expand_end_eh_spec): Add the return type.
3598         * rtti.c (throw_bad_cast): Add the parmtypes.
3599         (throw_bad_typeid): Likewise.
3601         * semantics.c (expand_stmt): Only leave out rtl for unused
3602         artificials, and set DECL_IGNORED_P on them as well.
3603         * decl.c (wrapup_globals_for_namespace): Likewise.
3605 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
3607         * decl.c (maybe_commonize_var): Skip all artificial decls.
3608         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
3610 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
3612         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
3613         * cp-tree.h: Declare flag_enforce_eh_specs.
3614         * decl.c (store_parm_decls, finish_function): Check it.
3616         C library functions don't throw.
3617         * Makefile.in (cfns.h): New target.
3618         (except.o): Depend on it.
3619         * Make-lang.in (cc1plus): Depend on cfns.gperf.
3620         * cfns.gperf: New file.
3621         * cfns.h: Generated.
3622         * except.c: Include it.
3623         (nothrow_libfn_p): New fn.
3624         * decl.c (grokfndecl): Use it.
3625         * cp-tree.h: Declare it.
3626         
3627         * decl.c (push_overloaded_decl_1, auto_function, 
3628         define_function): Lose.
3629         (build_library_fn_1): New static fn.
3630         (builtin_function): Use it.
3631         (get_atexit_node): Use build_library_fn_ptr.
3632         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
3633         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
3634         push_void_library_fn, push_throw_library_fn): New fns.
3635         * cp-tree.h: Declare them.
3636         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
3637         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
3638         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
3639         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
3640         * rtti.c (build_runtime_decl): Lose.
3641         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, 
3642         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
3643         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
3645         * call.c (build_call): Remove result_type parm.
3646         Call mark_used on unused artificial fns.
3647         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
3649 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
3651         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
3652         appropriate.
3653         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
3654         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
3655         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
3656         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
3657         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
3658         expand_generic_desc): Likewise.
3660 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
3662         * exception.cc (__cp_pop_exception): Cleanup the original object.
3664 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
3666         * decl.c (grok_op_properties): Merge conversion to void warning
3667         with other silly op warnings.
3669 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
3671         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
3672         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
3674 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
3676         * decl.c (cp_make_fname_decl): New function.
3677         (wrapup_globals_for_namespace): Don't emit unused static vars.
3678         (init_decl_processing): Remove comment about use of
3679         array_domain_type. Set make_fname_decl.
3680         (cp_finish_decl): Remove __FUNCTION__ nadgering.
3681         * semantics.c (begin_compound_stmt): Remove
3682         current_function_name_declared flagging.
3683         (expand_stmt): Don't emit unused local statics.
3684         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
3685         specially.
3687 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
3689         * typeck.c (convert_for_assignment): Don't look at array
3690         initializer.
3691         * call.c (convert_like_real): Likewise. 
3693 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
3695         Add initial support for '\uNNNN' specifier.
3696         * lex.c (read_ucs): New fn.
3697         (readescape, skip_white_space): Call it.
3698         (is_extended_char, is_extended_char_1): New fns.
3699         (utf8_extend_token): New fn, #if 0'd out.
3700         (real_yylex): Treat extended chars like letters.
3702         * search.c (note_debug_info_needed): Walk the bases even if we 
3703         weren't deferring the type itself.
3705 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3707         * decl2.c (finish_objects): Constify a char*.
3709         * method.c (emit_thunk): Likewise.
3711 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
3713         * typeck.c (dubious_conversion_warnings): Look through
3714         REFERENCE_TYPE.
3716 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3718         * class.c (dfs_modify_vtables): I is now unsigned.
3719         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
3720         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
3721         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
3722         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
3723         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
3724         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
3725         Call integer_all_onesp.
3726         * typeck2.c (process_init_constructor): Use compare_tree_int.
3728         * lang-specs.h (as): Don't call if -syntax-only.
3730 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
3732         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
3733         RTL_EXPR_HAS_NO_SCOPE after all.
3735 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
3737         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
3738         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
3739         RTL_EXPR_HAS_NO_SCOPE.
3741         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
3742         later.
3743         
3744         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
3746 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
3748         * call.c (convert_like): Macrofy.
3749         (convert_like_with_context): New macro.
3750         (convert_like_real): Renamed from convert_like.  Add calling
3751         context parameters, for diagnostics. Add recursive flag.  Call 
3752         dubious_conversion_warnings for outer conversion.
3753         (build_user_type_conversion): Use convert_like_with_context.
3754         (build_over_call): Likewise. Don't warn about dubious
3755         conversions here. Adjust convert_default_arg calls.
3756         (convert_default_arg): Add context parameters for diagnostics.
3757         Pass throught to convert_like_with_context.
3758         * cp-tree.h (convert_default_arg): Add context parameters.
3759         (dubious_conversion_warnings): Prototype new function.
3760         * typeck.c (convert_arguments): Adjust convert_default_arg call.
3761         (dubious_conversion_warnings): New function, broken
3762         out of convert_for_assignment. 
3763         (convert_for_assignment): Adjust.
3765 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
3767         * decl2.c (key_method): Break out from...
3768         (import_export_vtable, import_export_class): ...here.
3770         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
3771         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
3773         * search.c (note_debug_info_needed, dfs_debug_mark, 
3774         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
3775         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
3777 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
3779         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
3780         typos.
3782 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
3784         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
3785         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
3786         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
3787         (lang_type): Split gets_new into has_new and has_array_new.
3788         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3789         (TYPE_GETS_NEW): Split into ...
3790         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
3791         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
3792         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
3793         (build_op_new_call): Don't declare.
3794         (build_new_1): Likewise.
3795         * call.c (build_op_new_call): Remove.
3796         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
3797         instead of TYPE_NEEDS_DESTRUCTOR.
3798         (finish_struct_bits): Likewise.
3799         (add_implicitly_declared_members): Likewise.
3800         (check_field_decl): Likewise.
3801         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
3802         correctly under the new ABI.
3803         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
3804         instead of TYPE_NEEDS_DESTRUCTOR.
3805         (initialize_local_var): Likewise.
3806         (destroy_local_var): Likewise.
3807         (cp_finish_decl): Likewise.
3808         (register_dtor_fn): Likewise.
3809         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
3810         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
3811         TYPE_VEC_DELETE_TAKES_SIZE here.
3812         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
3813         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
3814         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3815         (finish_destructor_body): Likewise.
3816         (maybe_build_cleanup_1): Likewise.
3817         * decl2.c (do_static_destruction): Likewise.
3818         * init.c (build_new_1): Make it static.
3819         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3820         (expand_cleanup_for_base): Likewise.
3821         (get_cookie_size): New function.
3822         (build_new_1): Handle array-new cookies correctly under the new
3823         ABI.
3824         (build_vec_delete_1): Likewise.
3825         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3826         (build_delete): Likewise.
3827         (build_vec_delete): Handle array-new cookies correctly under the new
3828         ABI.
3829         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3830         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
3831         TYPE_HAS_ARRAY_NEW_OPERATOR.
3832         * ptree.c (print_lang_type): Check them.
3833         * search.c (context_for_name_lookup): Fix typo in comment.
3834         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
3835         * tree.c (break_out_cleanups): Likewise.
3836         (build_cplus_array_test_1): Likewise.
3837         (cp_build_qualified_type_real): Likewise.
3838         * typeck.c (complete_type): Likewise.
3839         
3840         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
3841         the command-line, not the end.
3842         
3843 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
3845         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
3847 2000-03-02  Tom Tromey  <tromey@cygnus.com>
3849         * cp-tree.h (build_java_class_ref): Declare.
3850         * init.c (build_java_class_ref): No longer static.
3851         * except.c (expand_throw): Generate a Java-style `throw' if the
3852         thrown object is a "Java" object.
3853         (initialize_handler_parm): Generate a Java-style lookup of
3854         exception info if the caught object is a "Java" object.
3855         (catch_language, catch_language_init): New globals.
3856         (decl_is_java_type): New function.
3857         (expand_start_catch_block): Don't call push_eh_info() or
3858         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
3859         class reference to build_catch_block.
3861 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3863         * typeck.c (comptypes): Treat sizetype like its language equivalent.
3865 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
3867         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
3868         to merge reference/pointer code and fix incorrect warnings.
3870 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
3872         * search.c (protected_accessible_p): Use context_for_name_lookup.
3874         * init.c (construct_virtual_bases): Fix thinko.
3875         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
3877 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3879         * decl.c (current_function_decl): Move to toplev.c.
3881 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
3883         * pt.c (fn_type_unification): Unify return type, whenever
3884         provided.
3885         (get_bindings_real): Only pass return type when necessary.
3886         Remove explicit return type check.
3887         * class.c (resolve_address_of_overloaded_function): Pass desired
3888         return type to fn_type_unification.
3890 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3892         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
3893         DECL_FIELD_SIZE.
3894         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
3895         DECL_FIELD_SIZE.
3896         * rtti.c (expand_class_desc): Likewise.
3897         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
3898         (THUNK_VCALL_OFFSET): Likewise.
3899         (THUNK_DELTA): Reflect changes in ../tree.h.
3901 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
3903         * search.c (protected_accessible_p): Also allow the access if
3904         the member is public in DERIVED.  Lose TYPE parm.
3905         (friend_accessible_p): Lose TYPE parm.
3906         (accessible_p): Adjust.
3908 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3910         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
3911         on things that are not sizes; ssize_binop deleted.
3912         Call size_diffop when appropriate.
3913         (dfs_build_vcall_offset_vtbl_entries): Likewise.
3914         (build_primary_vtable, build_secondary_vtable): Likewise.
3915         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
3916         Variable I is HOST_WIDE_INT.
3917         (get_vfield_offset): Pass proper types to size_binop.
3918         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
3919         (finish_struct_1): Likewise.
3920         (skip_rtti_stuff): Arg N is now pointer to signed.
3921         (layout_class_type): Use size_zero_node.
3922         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
3923         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
3924         * decl.c (complete_arry_type): Pass proper types to size_binop.
3925         (xref_basetypes): BINFO_OFFSET is sizetype.
3926         * error.c (dump_expr): Don't use size_binop non-sizes.
3927         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
3928         * init.c (construct_virtual_bases): Fix type error.
3929         (build_vec_delete_1): Pass proper type to size_binop and don't
3930         fold result.
3931         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
3932         * rtti.c (get_base_offset): Pass proper type to size_binop.
3933         * search.c (dfs_find_vbases): Fix type error.
3934         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
3935         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
3936         * tree.c (debug_binfo): Variable N is signed.
3937         Use HOST_WIDE_INT_PRINT_DEC.
3938         * typeck.c (comptypes): sizetype is same as equivalent integer type.
3939         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
3940         size_one_node and size_zero_node.
3941         (c_alignof): Use size_one_node.
3942         (build_component_addr): Pass proper types to size_binop.
3943         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
3945 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
3947         Implement class scope using-declarations for functions.
3948         * class.c (handle_using_decl): Call add_method for used functions.
3949         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
3950         (add_method): Used functions are hidden by local functions.
3951         (check_bases_and_members): Handle using-decls before finalizing
3952         CLASSTYPE_METHOD_VEC.
3953         * call.c (add_function_candidate): Add ctype parm; if non-zero,
3954         override the type of 'this' accordingly.
3955         (add_template_candidate, add_template_candidate_real): Add ctype parm.
3956         (convert_class_to_reference, build_user_type_conversion_1, 
3957         build_new_function_call, build_object_call, build_new_op,
3958         build_new_method_call): Pass ctype parm.
3960         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
3961         the baselink.
3962         * call.c (convert_class_to_reference, build_user_type_conversion_1, 
3963         build_new_function_call, build_object_call, build_new_op,
3964         build_new_method_call, build_op_delete_call): Don't get basetype_path
3965         from a baselink.
3966         * typeck.c (build_component_ref): Likewise.
3967         * init.c (build_offset_ref): Likewise.
3968         (resolve_offset_ref): Don't call enforce_access.  
3969         Call build_scoped_ref.
3970         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
3971         would cause an error or if -pedantic.
3972         * class.c (alter_access): Lose binfo parm.
3974 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
3976         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
3977         types.
3979 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
3981         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
3982         pseudo_type_info creation into the std namespace
3984 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
3986         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
3987         (import_export_class): Remove declaration.
3988         * decl2.c (import_export_class): Make it static.
3989         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
3990         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
3991         EXPR_WITH_FILE_LOCATION.
3992         * lex.c (check_newline): Tweak filename/lineno setting.
3993         * semantics.c (begin_while_stmt): Fix typo in comment.
3994         
3995 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3997         * lang-options.h (-fmessage-length=): Add missing option.
3999         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
4001 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
4003         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
4005 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
4007         * optimize.c (expand_call_inline): Emit the return label before
4008         evaluating the return value.
4010 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
4012         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
4013         than duplicating functionality here.
4014         * optimize.c: Include input.h.
4015         (expand_call_inline): Use push_srcloc and pop_srcloc.
4016         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
4017         * parse.c: Regenerated.
4018         * Makefile.in (lex.o): Depend on input.h.
4019         (optimize.o): Likewise.
4020         
4021 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
4023         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
4024         function type, rather than ICE.
4026 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
4028         * decl.c (grokdeclarator): Call decl_type_access_control.
4029         * parse.y (parse_end_decl): Don't call decl_type_access_control if
4030         decl is null.
4032 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
4034         * decl.c (decls_match): Remove obsolete static member nadgering.
4036 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4038         * decl.c (grokdeclarator): Change ANSI to ISO.
4039         * lex.c (consume_string, readescape, do_identifier): Likewise.
4040         (parse_float, real_yylex): Likewise.
4041         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
4042         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
4043         new_type_id, maybe_label_decls, simple_stmt, 
4044         for.init.statement): Likewise.
4045         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
4046         * semantics.c (finish_named_return_value): Likewise.
4047         * parse.c: Regenerate.
4049 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
4051         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
4052         (CPTI_CLASS_STAR_TYPE): Remove.
4053         (vtable_index_type): Likewise.
4054         (class_star_type_node): Remove.
4055         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
4056         (build_binary_op_nodefault): Remove.
4057         * call.c (build_new_op): Use build_binary_op instead of
4058         build_binary_op_nodefault.
4059         * decl.c (init_decl_processing): Remove class_star_type_node
4060         initialization.  Make delta_type_node ptrdiff_type_node under the
4061         new ABI.  Initialize vtable_index_type.
4062         (build_ptrmemfunc_type): Build different structures for the new
4063         ABI.
4064         (build_enumerator): Use build_binary_op instead of
4065         build_binary_op_nodefault.
4066         * method.c (build_overload_value): Mangle pointers-to-members
4067         appropriately under the new ABI.
4068         * typeck.c (build_array_ref): Use build_binary_op instead of
4069         build_binary_op_nodefault.
4070         (get_member_function_from_ptrfunc): Adjust for the new ABI.
4071         (build_binary_op_nodefault): Rename to ...
4072         (build_binary_op): ... this.  Remove old version.  Adjust for
4073         pointer-to-member comparisons under the new ABI.
4074         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
4075         (build_ptrmemfunc): Adjust for the new ABI.
4076         (expand_ptrmemfunc_cst): Likewise.
4077         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
4078         (pfn_from_ptrmemfunc): Adjust for the new ABI.
4079         
4080 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
4082         * call.c (build_object_call): Compress consecutive calls to
4083         cp_error.
4084         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
4085         (build_op_delete_call): Adjust message formatting.
4087         * class.c (check_bases): Compress consecutive calls to
4088         cp_pedwarn. 
4089         (finish_struct_anon): Say 'ISO C++'.
4091         * decl.c (start_decl): Same here.
4092         (grok_reference_init): Likewise.
4093         (grokfndecl): Correct message formatting.
4094         (grokfndecl): Improve diagnostic.
4095         (check_static_variable_definition): Likewise. Say 'ISO C++'
4096         (compute_array_index_type): Say 'ISO C++'
4097         (create_array_type_for_decl): Compress consecutive calls to
4098         cp_error. 
4099         (grokdeclarator): Say 'ISO C++'
4100         (grok_op_properties): Likewise.
4102         * decl2.c (delete_sanity): Clairify diagnostic.
4103         (check_member_template): Same here.
4104         (grok_function_init): Use consistent terminology.
4106         * expr.c (do_case): Say 'ISO C++'
4108         * friend.c (do_friend): Compress consecutive calls to warning.
4109         
4110 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
4112         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
4113         * class.c (build_secondary_vtable): Reorganize.  Don't create a
4114         new vtable under the new ABI.
4115         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
4116         computing the size.
4117         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
4118         the initializing elements.
4119         (initialize_vtable): New function.
4120         (dfs_finish_vtbls): Use it.
4121         (dfs_accumulate_vtbl_inits): New function.
4122         (finish_vtbls): Merge primary and secondary vtables under the new
4123         ABI.
4124         (finish_struct_1): Remove redundant call to layout_vtable_decl.
4125         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
4126         aren't VAR_DECLs.
4128         * class.c (build_vtable): New function, split out from ...
4129         (get_vtable_decl): ... here, and ...
4130         (build_secondary_vtable): ... here.
4132         * pt.c (tsubst_decl): Fix formatting.
4133         
4134 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4136         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
4137         (avoid_overlap, build_base_field): Likewise.
4138         (build_base_field, build_base_fields, is_empty_class): 
4139         Test DECL_SIZE with integer_zero.
4140         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
4141         * cp-tree.h (struct lang_type): New field size_unit.
4142         (CLASSTYPE_SIZE_UNIT): New macro.
4143         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
4144         (cp_finish_decl): Delete -Wlarger-than processing.
4145         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
4146         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
4147         * tree.c (make_binfo): binfo vector is one entry longer.
4148         (walk_tree): Walk DECL_SIZE_UNIT.
4150 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
4152         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
4153         comment.
4154         (build_vtable_entry): Don't assume all vtable entries are
4155         functions.
4156         (build_vtbl_initializer): Adjust accordingly.
4157         (get_vtable_decl): Fix formatting.
4158         
4159 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
4161         * semantics.c (deferred_type_access_control): Walk the entire
4162         type_lookups list.
4163         (save_type_access_control): Rename from 
4164         initial_deferred_type_access_control.  Just remember the value.
4165         (decl_type_access_control): New fn.
4166         (begin_function_definition): Use deferred_type_access_control, after
4167         we've started the function.  Set type_lookups to error_mark_node.
4168         * parse.y (frob_specs, fn.def1): Adjust.
4169         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
4170         (parse_end_decl, parse_bitfield0, parse_method): New fns.
4171         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
4172         (after_type_component_declarator0): Likewise.
4173         (after_type_component_declarator): Likewise.
4174         (notype_component_declarator): Likewise.
4175         * cp-tree.h: Adjust.
4177         * decl.c (redeclaration_error_message): Allow redeclaration of 
4178         namespace-scope decls.
4180 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4182         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
4184 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
4186         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
4187         * decl2.c (grokclassfn): Likewise.
4189         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
4191         * decl2.c (lang_decode_option): Don't set default message length
4192         here.
4193         * lex.c (lang_init_options): Set it here.
4195 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
4197         Make DECL_CONTEXT mean the class in which a member function was
4198         declared, even for a virtual function.
4199         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
4200         (DECL_FRIEND_CONTEXT): New macro.
4201         (DECL_REAL_CONTEXT): Remove.
4202         (SET_DECL_FRIEND_CONTEXT): Likewise.
4203         (DECL_VIRTUAL_CONTEXT): Adjust.
4204         (DECL_CLASS_SCOPE_P): Use TYPE_P.
4205         (add_friends): Remove.
4206         (hack_decl_function_context): Likewise.
4207         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
4208         CP_DECL_CONTEXT.
4209         (build_over_call): Fix indentation.  Use DECL_CONTEXT
4210         instead of DECL_CLASS_CONTEXT.
4211         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
4212         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
4213         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4214         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
4215         (build_base_field): Likewise.
4216         (finish_struct_1): Likewise.
4217         (build_self_reference): Likewise.
4218         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
4219         DECL_REAL_CONTEXT.
4220         (pushtag): Use decl_function_context, not
4221         hack_decl_function_context.
4222         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4223         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
4224         (pushdecl): Remove bogus code.
4225         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
4226         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4227         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4228         Use decl_function_context, nothack_decl_function_context.
4229         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
4230         (grokdeclarator): Likewise.  Use decl_function_context, not
4231         hack_decl_function_context.
4232         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
4233         (start_function): Use DECL_FRIEND_CONTEXT, not
4234         DECL_CLASS_CONTEXT.  Use decl_function_context, not
4235         hack_decl_function_context.
4236         (finish_function): Use decl_function_context, not
4237         hack_decl_function_context.
4238         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
4239         DECL_CLASS_CONTEXT.
4240         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
4241         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
4242         (grokfield): Likewise.
4243         (finish_builtin_type): Likewise.
4244         (finish_vtable_vardec): Use decl_function_context, not
4245         hack_decl_function_context.
4246         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4247         (start_static_initialization_or_destruction): Likewise.
4248         (finish_static_initialization_or_destruction): Likewise.
4249         (mark_used): Adjust logic for deciding when to synthesize methods.
4250         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
4251         DECL_REAL_CONTEXT.
4252         * error.c (dump_function_decl): Use DECL_CONTEXT, not
4253         DECL_CLASS_CONTEXT.
4254         * friend.c (is_friend): Likewise.
4255         (add_friends): Remove.
4256         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
4257         * lex.c (begin_definition_of_inclass_inline): Use
4258         decl_function_context, not hack_decl_function_context.
4259         (process_next_inline): Likewise.
4260         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4261         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
4262         DECL_CLASSS_CONTEXT.
4263         (hack_identifier): Likewise.
4264         (synthesize_method):  Use decl_function_context, not
4265         hack_decl_function_context.
4266         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
4267         DECL_REAL_CONTEXT.
4268         (is_member_template): Use decl_function_context, not
4269         hack_decl_function_context.  Use DECL_CONTEXT, not
4270         DECL_CLASS_CONTEXT.
4271         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not 
4272         DECL_CLASS_CONTEXT.
4273         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
4274         DECL_REAL_CONTEXT.
4275         (push_template_decl_real): Likewise.
4276         (instantiate_class_template): Don't call add_friends.
4277         (tsubst_default_argument): Use DECL_CONTEXT, not
4278         DECL_REAL_CONTEXT.
4279         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
4280         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4281         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
4282         DECL_CLASS_CONTEXT.
4283         * repo.c (repo_inline_used): Likewise.
4284         * search.c (current_scope): Adjust for new _CONTEXT macros.
4285         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
4286         DECL_REAL_CONTEXT.
4287         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4288         (lookup_fnfields_here):Likewise.
4289         (check_final_overrider): Likewise.
4290         (init_vbase_pointers): Likewise.
4291         (virtual_context): Likewise.
4292         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
4293         (expand_body): Use decl_function_context, not
4294         hack_decl_function_context.
4295         * tree.c (hack_decl_function_context): Remove.
4296         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
4297         DECL_CLASS_CONTEXT.
4298         * typeck2.c (error_not_base_type): Likewise.
4299         
4300 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
4302         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
4304 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4306         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
4308 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
4310         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
4312 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
4314         * decl2.c (lang_decode_option): Enable automatic line wrapping.
4316 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
4318         * parse.y (frob_specs): Split out...
4319         (parse_decl): From here.
4320         (fn.def2): Call initial_deferred_type_access_control.
4321         (after_type_component_declarator0): Call frob_specs.
4322         (notype_component_declarator0): Likewise.
4323         * search.c (friend_accessible_p): Nested classes are friends of their
4324         enclosing classes.
4326 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
4328         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
4329         used to create an implicit temporary.
4331         * class.c (dfs_modify_vtables): Tweak calculation of functions to
4332         override.
4334 2000-02-08  Nathan Sidwell  <nathan@acm.org>
4336         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
4337         strip array element qualifiers too.
4339 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
4341         * decl.c (store_parm_decls): Don't build cleanups for parameters
4342         while processing_template_decl.
4344 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
4346         * cp-tree.h (struct saved_scope): Add incomplete field.
4347         (namespace_scope_incomplete): New macro.
4348         * decl.c (pushdecl): Use it.
4349         (hack_incomplete_structures): Use it.  See through artificial
4350         binding levels.
4351         (mark_saved_scope): Mark it.
4353         Implement access control for nested types.
4354         * search.c (type_access_control): New fn.
4355         (accessible_p): Now we do perform access control for types.
4356         * semantics.c (deferred_type_access_control): New fn.
4357         (initial_deferred_type_access_control): New fn.
4358         (begin_function_definition): Call it.  Add lookups parm.
4359         * decl.c (struct binding_level): Add this_class field.
4360         (pushlevel_class): Set it.
4361         (mark_binding_level): Mark it.
4362         (lookup_name_real): Use it.  Call type_access_control.
4363         (mark_saved_scope): Mark lookups field.
4364         * cp-tree.h (flagged_type_tree): Add lookups field.
4365         (struct saved_scope): Add lookups field.
4366         (type_lookups): New macro.
4367         * parse.y (declmods): Now <ftype>.
4368         (parse_decl): Add lookups parm.  Call 
4369         initial_deferred_type_access_control.
4370         (lang_extdef): Clear type_lookups.
4371         (typed_declspecs, declmods, typespec): Set lookups field.
4372         (initdcl): Call deferred_type_access_control.
4373         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
4374         component_decl_1, named_parm): Adjust.
4375         * friend.c (is_friend): Nested classes are friends of their
4376         enclosing classes.
4378         * class.c (currently_open_derived_class): New fn.
4379         * method.c (hack_identifier): Use it.
4381         * lex.c (do_identifier): Remove obsolete code.
4383         * parse.y (typed_typespecs): Propagate new_type_flag properly.
4385 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
4387         * tinfo.h: Remove apostrophes from C++ comment (xgettext
4388         thinks this file is plain C).
4390 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4392         * Makefile.in (call.o): Depend on $(EXPR_H).
4394         * call.c: Include "expr.h".
4396         * class.c (dump_class_hierarchy): Add prototype.
4398         * search.c (dfs_get_pure_virtuals): Likewise.
4400 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
4402         * parse.y (simple_stmt): Allow :: token in asm parameter list.
4403         * parse.c: Rebuilt.
4405 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
4407         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
4408         Store it in DECL_FCONTEXT.
4409         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
4411 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
4413         * tinfo.h (old abi): #include "tconfig.h".
4414         * tinfo.cc (convert_to_base): Move into old abi section.
4416 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
4418         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
4419         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
4420         (BINFO_PRIMARY_BINFO): New macro.
4421         (BF_DELTA): Rename to ...
4422         (BV_DELTA): ... this.
4423         (BF_VCALL_INDEX): Rename to ...
4424         (BV_VCALL_INDEX): ... this.
4425         (BF_FN): Rename to ...
4426         (BV_FN): ... this.
4427         * class.c (build_vbase_path): Adjust for changes to reverse_path.
4428         (set_rtti_entry): Rename BF_ macros to BV_ variants.
4429         (modify_vtable_entry): Simplify.
4430         (add_virtual_function): Rename BF_ macros to BV_ variants.
4431         (build_vtable_initializer): Likewise.
4432         (get_class_offset_1): Remove.
4433         (dfs_get_class_offset): Likewise.
4434         (get_class_offset): Likewise.
4435         (dfs_find_final_overrider): New function.
4436         (find_final_overrider): Likewise.
4437         (modify_one_vtable): Remove.
4438         (dfs_find_base): New function.
4439         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
4440         find_final_overrider.
4441         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
4442         virtuals.
4443         (dfs_fixup_vtable_deltas): Remove.
4444         (override_one_vtable): Remove.
4445         (merge_overrides): Likewise.
4446         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
4447         unreal chilren of virtual bases.
4448         (finish_struct_1): Don't use merge_overrides.  Don't use
4449         dfs_fixup_vtable_deltas.
4450         * tree.c (reverse_path): Return a TREE_LIST, not a chain of 
4451         BINFOs.
4452         
4453 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
4454             Jason Merrill  <jason@yorick.cygnus.com>
4456         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
4458 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
4460         * exception.cc (__throw_bad_typeid): Add missing std::.
4462 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4464         * cp-tree.h (make_thunk): PROTO -> PARAMS.
4466 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
4468         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
4470         Runtime support for new-abi rtti.
4471         * inc/typeinfo (type_info::operator!=): Define in class.
4472         (type_info::before, type_info::name, type_info::operator==,
4473         type_info::operator!=): Define new ABI implementations.
4474         (type_info::is_pointer_p, type_info::is_function_p): Declare
4475         new virtual functions.
4476         (type_info::do_catch, type_info::do_upcast): Likewise.
4477         
4478         * tinfo.h (__base_class_info): Define new class.
4479         (__class_type_info): Likewise.
4480         (__si_class_type_info): Likewise.
4481         (__vmi_class_type_info): Likewise.
4482         (__dynamic_cast): Prototype.
4483         
4484         * tinfo.cc: Conditionalize old and new rtti mechanisms.
4485         (type_info::is_pointer_p): Define new function.
4486         (type_info::is_function_p): Likewise.
4487         (type_info::do_catch): Likewise.
4488         (type_info::do_upcast): Likewise.
4489         (vtable_prefix): New structure for vtable access.
4490         (adjust_pointer): Define new template function.
4491         (contained_p, public_p, virtual_p, contained_public_p,
4492         contained_nonpublic_p, contained_nonvirtual_p): Define new
4493         functions.
4494         (nonvirtual_base_type): New local variable.
4495         (__class_type_info::~__class_type_info): Define.
4496         (__si_class_type_info::~__si_class_type_info): Likewise.
4497         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
4498         (__class_type_info::do_catch): Define new function.
4499         (__class_type_info::do_upcast): Likewise.
4500         (__class_type_info::find_public_src): Likewise.
4501         (__class_type_info::do_find_public_src): Likewise.
4502         (__si_class_type_info::do_find_public_src): Likewise.
4503         (__vmi_class_type_info::do_find_public_src): Likewise.
4504         (__class_type_info::do_dyncast): Likewise.
4505         (__si_class_type_info::do_dyncast): Likewise.
4506         (__vmi_class_type_info::do_dyncast): Likewise.
4507         (__class_type_info::do_upcast): Likewise.
4508         (__si_class_type_info::do_upcast): Likewise.
4509         (__vmi_class_type_info::do_upcast): Likewise.
4510         (__dynamic_cast): Likewise.
4511         
4512         * tinfo2.cc (__fundamental_type_info): Define new class.
4513         (__pointer_type_info): Likewise.
4514         (__reference_type_info): Likewise.
4515         (__array_type_info): Likewise.
4516         (__function_type_info): Likewise.
4517         (__enum_type_info): Likewise.
4518         (__ptr_to_member_type_info): Likewise.
4519         (__fundamental_type_info::~__fundamental_type_info): Define.
4520         (__pointer_type_info::~__pointer_type_info): Likewise.
4521         (__reference_type_info::~__reference_type_info): Likewise.
4522         (__array_type_info::~__array_type_info): Likewise.
4523         (__function_type_info::~__function_type_info): Likewise.
4524         (__enum_type_info::~__enum_type_info): Likewise.
4525         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
4526         (__pointer_type_info::do_catch): Define new function.
4527         (__ptr_to_member_type_info::do_catch): Define new function.
4528         
4529         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
4530         (__is_pointer): Likewise.
4532         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
4534 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
4536         * cp/class.c (build_vtable): Rename to build_primary_vtable.
4537         (prepare_fresh_vtable): Rename to build_secondary_vtable.
4538         (make_new_vtable): New function.
4539         (modify_vtable_entry): Handle generation of new vtables correctly.
4540         (modify_one_vtable): Remove unused parameter.
4541         (dfs_fixup_vtable_deltas): Likewise.
4542         (override_one_vtable): Use build_secondary_vtable.
4543         (finish_struct_1): Use build_primary_vtable and
4544         build_secondary_vtable.
4545         
4546 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
4548         * cp/decl.c: Adjust variable names, comments, help strings.
4550 2000-01-29  Nathan Sidwell  <nathan@acm.org>
4552         * new2.cc (operator delete[]): Use operator delete, don't assume
4553         implementation.
4555 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
4557         * class.c (build_vtbl_initializer): Add argument to
4558         build_vtable_entry call.
4560 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
4562         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
4563         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
4564         (BF_DELTA): New macro.
4565         (BF_VCALL_INDEX): Likewise.
4566         (BF_FN): Likewise.
4567         (THUNK_VCALL_OFFSET): Likewise.
4568         (make_thunk): Change prototype.
4569         * class.c (build_vtable_entry): Integrate
4570         build_vtable_entry_for_fn.  Handle vcall indices.
4571         (build_vtable_entry_for_fn): Remove.
4572         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
4573         BF_VCALL_INDEX, BF_FN.
4574         (modify_vtable_entry): Integrate common code from
4575         modify_one_vtable and dfs_fixup_vtable_deltas.
4576         (add_virtual_function): Set BF_VCALL_INDEX.
4577         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
4578         and BF_FN.
4579         (modify_one_vtable): Simplify.
4580         (dfs_fixup_vtable_deltas): Likewise.
4581         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 
4582         * method.c (make_thunk): Handle vcall indices.
4583         
4584 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
4586         Compiler side new abi rtti (not enabled).
4587         * cp-tree.h (new_abi_rtti_p): New macro.
4588         (emit_support_tinfos): Prototype new function.
4589         (tinfo_decl_p): Likewise.
4590         (emit_tinfo_decl): Likwise.
4591         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
4592         macros.
4593         (doing_runtime): New local static.
4594         (init_rtti_processing): Add new-abi initializer.
4595         (get_tinfo_decl): Add new-abi logic.
4596         (tinfo_from_decl): Likewise.
4597         (build_dynamic_cast_1): Likewise.
4598         (qualifier_flags): New static function.
4599         (tinfo_base_init): Likewise.
4600         (generic_initializer): Likewise.
4601         (ptr_ref_initializer): Likewise.
4602         (ptmd_initializer): Likewise.
4603         (class_hint_flags): Likewise.
4604         (class_initializer): Likewise.
4605         (synthesize_tinfo_var): Likewise.
4606         (create_real_tinfo_var): Likewise.
4607         (create_pseudo_type_info): Likewise.
4608         (get_vmi_pseudo_type_info): Likewise.
4609         (create_tinfo_types): Likewise.
4610         (emit_support_tinfos): New global function.
4611         (tinfo_decl_p): New global predicate.
4612         (emit_tinfo_decl): New global function.
4613         * class.c (set_rtti_entry): Generalize for old and new rtti.
4614         (build_vtbl_initializer): Likewise.
4615         * decl2.c (finish_file): Likewise.
4617 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
4619         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
4620         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
4622 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
4624         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
4625         for scopes.
4627 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
4629         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
4631 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
4633         * optimize.c (calls_setjmp_r): Supply new argument
4634         to special_function_p.
4636 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4638         * call.c: PROTO -> PARAMS.
4639         * class.c: Likewise.
4640         * cp-tree.h: Likewise.
4641         * cvt.c: Likewise.
4642         * decl.c: Likewise.
4643         * decl.h: Likewise.
4644         * decl2.c: Likewise.
4645         * dump.c: Likewise.
4646         * errfn.c: Likewise.
4647         * error.c: Likewise.
4648         * except.c: Likewise.
4649         * expr.c: Likewise.
4650         * init.c: Likewise.
4651         * input.c: Likewise.
4652         * lex.c: Likewise.
4653         * lex.h: Likewise.
4654         * method.c: Likewise.
4655         * optimize.c: Likewise.
4656         * parse.y: Likewise.
4657         * pt.c: Likewise.
4658         * repo.c: Likewise.
4659         * rtti.c: Likewise.
4660         * search.c: Likewise.
4661         * semantics.c: Likewise.
4662         * spew.c: Likewise.
4663         * tree.c: Likewise.
4664         * typeck.c: Likewise.
4665         * typeck2.c: Likewise.
4666         * xref.c: Likewise.
4668 2000-01-25  Richard Henderson  <rth@cygnus.com>
4670         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
4672 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
4674         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
4675         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
4676         (struct vcall_offset_data_s): New type.
4677         (dfs_vcall_offset_queue_p): New function.
4678         (dfs_build_vcall_offset_vtbl_entries): Likewise.
4679         (build_vcall_offset_vtbl_entries): Likewise.
4680         (layout_vtable_decl): Likewise.
4681         (num_vfun_entries): Likewise.
4682         (num_extra_vtbl_entries): Add the entries for vcall offsets.
4683         (build_vtbl_initializer): Likewise.
4684         (dfs_finish_vtabls): Use layout_vtable_decl.
4685         (modify_one_vtables): Always duplicate vtables under the new ABI.
4686         (finish_struct_1): Use layout_vtable_decl.
4687         
4688 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4690         * decl.c (member_function_or_else): Change third arg from a format
4691         specifier to an `enum overload_flags'.  Callers changed.
4693 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
4695         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
4696         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
4697         build_const_cast, get_delta_difference, check_return_expr): Avoid
4698         ANSI string concatenation usage.  
4700 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
4702         * class.c (layout_class_type): Put the fields required to make a
4703         class non-empty at the end, not the beginning, of the TYPE_FIELDs
4704         list.
4706 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
4708         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
4709         template.
4711         * decl2.c (mark_used): Do instantiate inlines that have been
4712         explicitly instantiated.
4714 2000-01-24  Richard Henderson  <rth@cygnus.com>
4716         * call.c (build_over_call): Use expand_tree_builtin.
4717         * typeck.c (build_function_call_real): Likewise.
4718         (build_binary_op_nodefault): Handle unordered compares.
4720 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
4722         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
4723         cp_tree_index values.
4724         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
4725         New global node #defines for them.
4726         * rtti.c (call_void_fn): Replace with ...
4727         (build_runtime_decl): ... new static function.
4728         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
4729         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
4730         (build_dynamic_cast_1): Always produce correctly typed result.
4731         Explicitly produce type_info addresses. Use dynamic_cast_node.
4732         * exception.cc (__throw_bad_cast): Return `void *'.
4733         (__throw_bad_typeid): Return `const type_info &'.
4735 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
4737         * cp-tree.h (get_vtable_decl): Prototype new function.
4738         * class.c (get_vtable_decl): New function. Broken out from ...
4739         (build_vtable): ... here. Use it.
4740         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
4741         by get_vtable_decl.
4743 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
4745         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
4746         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
4747         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
4748         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
4749         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
4750         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
4751         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
4752         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
4753         (CPTI_TINFO_VAR_ID): New enumeration.
4754         (__tp_desc_type_node, __access_mode_type_node,
4755         __bltn_desc_type_node, __user_desc_type_node,
4756         __class_desc_type_node, __ptr_desc_type_node,
4757         __attr_desc_type_node, __func_desc_type_node,
4758         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
4759         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
4760         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
4761         enum_desc_type_node, class_desc_type_node,
4762         si_class_desc_type_node, vmi_class_desc_type_node,
4763         ptmd_desc_type_node, base_desc_type_node): New #defines.
4764         (tinfo_fn_id, tinfo_fn_type): Rename to ...
4765         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
4766         (tinfo_var_id): New enumeration.
4767         (DECL_TINFO_FN_P): Augment comment.
4768         * decl.c (cp_global_trees): Adjust documentation.
4769         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
4770         tinfo_decl_type and tinfo_var_id.
4771         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
4772         (build_typeid): Remove unused variable.
4773         (get_tinfo_var): Use tinfo_var_id.
4774         (tinfo_name): New static function.
4775         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
4776         (tinfo_from_decl): Likewise.
4777         (get_base_offset): New static function, broken out of
4778         expand_class_desc.
4779         (expand_si_desc): Use tinfo_name.
4780         (expand_class_desc): Likewise. Lose local static variable.
4781         Use base_desc_type_node. Use get_base_offset.
4782         (expand_ptr_desc): Use tinfo_name.
4783         (expand_attr_desc): Likewise.
4784         (expand_generic_desc): Likewise.
4786         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
4787         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
4789 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
4791         * cp-tree.h (__eprintf): Remove declaration.
4792         * tree.c (__eprintf): Remove definition.
4794 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
4795             Mark Mitchell  <mark@codesourcery.com>
4797         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
4798         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
4800 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
4802         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
4804 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
4806         * cp-tree.h (register_dtor_fn): New function.
4807         * decl.c (destroy_local_static): Rename to ...
4808         (register_dtor_fn): ... this.  Give it external linkage.
4809         (expand_static_init): Use it.
4810         * decl2.c (do_static_initialization): Likewise, if using
4811         __cxa_atexit.
4812         (do_static_destruction): Check that __cxa_atexit is not in use.
4813         (finish_file): Don't call do_static_destruction if using
4814         __cxa_atexit.
4816         * typeck.c (convert_arguments): Restore two-message error
4817         reporting.
4818         
4819 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
4821         Remap dynamic cast hint values to be consistent across ABIs.
4822         * search.c (dynamic_cast_base_recurse): Remap generated value.
4823         (get_dynamic_cast_base_type): Adjust documentation.
4824         * tinfo.h (__user_type_info::dyncast): Likewise.
4825         (__user_type_info::find_public_subobj): Remap BOFF meaning.
4826         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
4827         (__class_type_info::do_dyncast): Likewise.
4828         (__class_type_info::do_find_public_subobj): Likewise.
4829         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.     
4831 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
4833         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
4835         * typeck2.c (incomplete_type_error): Restore previous
4836         cp_error and cp_error_at call sequence.
4837         
4838 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
4840         * class.c (dump_class_hierarchy): Make format agree with argument;
4841         cast pointer to unsigned long and print with %lx.
4842         
4843 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
4845         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
4846         
4847         * typeck.c (composite_pointer_type, common_type,
4848         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
4849         build_function_call_real, convert_arguments,
4850         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
4851         build_unary_op, mark_addressable, build_compound_expr,
4852         build_static_cast, build_reinterpret_cast, build_const_cast,
4853         build_c_cast, build_modify_expr, get_delta_difference,
4854         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 
4855         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
4856         into a single one.
4857         * typeck2.c (readonly_error, abstract_virtuals_error,
4858         process_init_constructor, check_for_new_type): Likewise.
4860 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
4862         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
4863         VAR_DECLs.
4865 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
4867         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
4868         (build_x_typeid): Likewise.
4869         (get_tinfo_fn): Likewise.
4870         (get_tinfo_fn_unused): Rename to ...
4871         (get_tinfo_decl): ... here.
4872         * rtti.c (build_headof): Replace logic error with assertion.
4873         (get_tinfo_fn_dynamic): Rename to ...
4874         (get_tinfo_decl_dynamic): ... here. Make static. Use
4875         complete_type_or_else.
4876         (build_x_typeid): Move into ...
4877         (build_typeid): ... here. Adjust call to
4878         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
4879         throw_bad_typeid expression.
4880         (get_tinfo_fn_unused): Rename to ...
4881         (get_tinfo_decl): ... here. Adjust comment.
4882         (get_tinfo_fn): Delete.
4883         (tinfo_from_decl): New static function.
4884         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
4885         (get_typeid): Use complete_type_or_else.
4886         (build_dynamic_cast_1): Adjust calls to
4887         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
4888         * parse.y (primary): Adjust call to build_typeid.
4889         * except.c (build_eh_type_type_ref): Adjust call to
4890         get_tinfo_decl. Mark as used.
4891         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
4892         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
4893         * parse.c: Regenerated.
4895 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
4897         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
4898         calling convention.
4899         (resolves_to_fixed_type_p): Document calling convention.
4900         * rtti.c (build_x_typeid): Initialize NONNULL.
4902         * cp-tree.h (build_shared_int_cst): New function.
4903         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
4904         * class.c (modify_vtable_entry): Likewise.
4905         (add_virtual_function): Split out code to generated shared
4906         INTEGER_CSTs to build_share_int_cst.
4907         (modify_all_vtables): Handle all the overridden functions here.
4908         Add overridden functions from non-primary virtual bases to the
4909         primary vtable.
4910         (finish_struct_1): Adjust call to modify_all_vtables.  Add
4911         overridden functions from non-primary bases to the vtable.
4912         * tree.c (build_shared_int_cst): New function.
4913         
4914         * cp-tree.h (scratchalloc): Remove.
4915         (build_scratch_list): Likewise.
4916         * call.c (convert_class_to_reference): Replace build_scratch_list
4917         and build_expr_list with build_tree_list.
4918         (add_candidate): Replace scratchalloc with expralloc.  Note memory
4919         leak.
4920         (build_user_type_conversion_1):  Replace build_scratch_list
4921         and build_expr_list with build_tree_list.
4922         (build_new_op): Likewise.
4923         (build_op_delete_call): Likewise.
4924         (convert_like): Likewise.
4925         * cvt.c (ocp_convert): Likewise.
4926         * decl.c (start_decl): Likewise.
4927         (start_function): Likewise.
4928         (finish_destructor_body): Likewise.
4929         (maybe_build_cleanup_1): Likewise.
4930         * decl2.c (reparse_decl_as_expr): Likewise.
4931         * init.c (perform_member_init): Likewise.
4932         (expand_cleanup_for_base): Likewise.
4933         (build_builtin_delete_call): Likewise.
4934         (build_new_1): Likewise.
4935         (build_delete): Likewise.
4936         * method.c (do_build_assign_ref): Likewise.
4937         * parse.y (already_scoped_stmt): Likewise.
4938         (nontrivial_exprlist): Likewise.
4939         (net_initializer): Likewise.
4940         (initlist): Likewise.
4941         * parse.c: Regenerated.
4942         * rtti.c (build_x_typeid): Likewise.
4943         (build_dynamic_cast_1): Likewise.
4944         * typeck.c (build_x_compound_expr): Likewise.
4945         (build_static_cast): Likewise.
4946         (build_modify_expr): Likewise.
4947         
4948         * cp-tree.h (DECL_VINDEX): Add documentation.
4949         * class.c (build_vtable_entry): Likewise.
4950         (start_vtable): Add comment.
4951         (add_virtual_function): Replace pending_hard_virtuals with
4952         overridden_virtuals and pending_virtuals with new_virtuals.
4953         Replace redundant assignments with assertions.
4954         (check_for_override): Add comment.
4955         (check_bases_and_members): Replace pending_hard_virtuals with
4956         overridden_virtuals and pending_virtuals with new_virtuals.
4957         (create_vtbl_ptr): Likewise.
4958         (layout_class_type): Likewise.
4959         (finish_struct_1): Likewise.  Add comments.
4960         
4961 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
4963         * class.c (finish_struct_1): Replace redundant code with
4964         assertions.
4966         * cp-tree.h (flag_new_abi): Move.
4967         (flag_use_cxa_atexit): Likewise.
4968         (flag_honor_std): Likewise.
4969         (flag_rtti): Likewise.
4970         (vbase_offsets_in_vtable_p): Define.
4971         (vptrs_present_everywhere_p): Likewise.
4972         (TYPE_CONTAINS_VPTR_P): Likewise.
4973         (dfs_walk_real): Declare.
4974         * class.c (build_vbase_pointer_fields): Check
4975         vbase_offsets_in_vtable_p.
4976         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
4977         BINFO_VPTR_FIELD.
4978         (build_vbase_offset_vtbl_entries): Simplify.
4979         (build_vbase_offset_vtbl_entries): Adjust.
4980         (build_vbase_pointer): Add ability to look up vbase offsets in
4981         vtable. 
4982         (start_vtable): New function.
4983         (add_virtual_function): Use it.
4984         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
4985         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
4986         (build_vtbl_initializer): Take the type of the complete object as
4987         input.  Use it to correctly calculate vbase offsets.
4988         (dfs_finish_vtbls): Pass the complete type to
4989         build_vtbl_initializer.
4990         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
4991         (create_vtable_ptr): Create a vtable even if there are no
4992         new virtual functions, under the new ABI.
4993         (finish_struct_1): Likewise.
4994         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
4995         * decl.c (exapnd_static_init): Remove call to
4996         preserve_initializer.
4997         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
4998         vtables.
4999         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
5000         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
5001         (construct_virtual_bases): Don't initialize virtual base pointers
5002         under the new ABI.
5003         (build_aggr_init): Clean up comment.
5004         (expand_aggr_init_1): Likewise.
5005         * rtti.c (expand_class_desc): Store the virtual function table
5006         index where the vbase offset lives in the offset field.
5007         * search.c (dfs_walk_real): Make it global.
5008         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
5009         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
5010         
5011         * tinfo.h (USItype): Make it signed under the new ABI.
5012         * tinfo.cc (convert_to_base): New function.  Encapsulate base
5013         conversion logic here.
5014         (__class_type_info::do_upcast): Use it.
5015         (__class_type_info::do_dyncast): Likewise.
5016         (__class_type_info::do_find_public_subobj): Likewise.
5017         
5018         * init.c (construct_virtual_bases): Don't look up the addresses of
5019         virtual bases at run-time.
5021         * class.c (build_vbase_pointer): Relocate.
5022         (build_vbase_pointer_fields): Likewise.
5023         (dfs_build_vbase_offset_vtbl_entries): Likewise.
5024         (build_vbase_offset_vtbl_entries): Likewise.
5026         * decl.c (init_decl_processing): Complain if -fnew-abi
5027         -fno-vtable-thunks is used.
5029         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
5030         flag_new_abi.
5032 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
5034         * cp-tree.h (num_extra_vtbl_entries): New function.
5035         (size_extra_vtbl_entries): Likewise.
5036         (dfs_vtable_path_unmark): Likewise.
5037         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
5038         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
5039         * class.c (num_extra_vtbl_entries): New function.
5040         (size_extra_vtbl_entries): Likewise.
5041         (dfs_build_vbase_offset_vtbl_entries): New function.
5042         (build_vbase_offset_vtbl_entries): Likewise.
5043         (build_vtbl_initializer): Use it.
5044         (finish_struct_1): Adjust vtable sizes (using
5045         num_extra_vtbl_entries).
5046         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
5047         THUNK_DECL is non-NULL before expanding it.
5048         * init.c (expand_virtual_init): Adjust the vtable pointer by
5049         size_extra_vtbl_entries before storing it.
5050         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
5051         Handle TREE_LIST parameters here, not in the dfs_* functions.
5052         (dfs_unmarked_real_bases_queue_p): Adjust.
5053         (dfs_marked_real_bases_queue_p): Likewise.
5054         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
5055         (dfs_vtable_path_marked_real_bases_queue_p): New function.
5056         (dfs_vtable_path_unmark): Likewise.
5057         
5058 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
5060         * optimize.c (copy_body_r): Clear the operand three of a
5061         TARGET_EXPR when copying it.
5063 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5065         * method.c (build_decl_overload_real): Check whether we are in ::
5066         before returning __builtin_new/delete.
5068 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
5070         * pt.c (tsubst_friend_function): Improve comment.
5071         (instantiate_decl): Avoid crashing when a "nested" function is
5072         instantiated from the top level.
5073         
5074         * dump.c (dqeueue_and_dump): Dump
5075         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
5077 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5079         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
5081 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
5083         * g++spec.c (lang_specific_driver): Add -fnew-abi if
5084         ENABLE_NEW_GXX_ABI defined.
5085         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
5086         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
5087         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
5089 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
5091         * decl.c (start_cleanup_fn): Call pushdecl.
5093         * call.c (convert_class_to_reference): Fix typos.
5094         (build_conditional_expr): Handle errors gracefully.
5095         * class.c (push_nested_class): Likewise.
5096         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
5097         (DECL_THIS_EXTERN): Use it.
5098         (DECL_THIS_STATIC): Likewise.
5099         * cvt.c (convert_to_void): Handle errors gracefully.
5100         (build_expr_type_conversion): Likewise.
5101         * decl.c (maybe_push_decl): Likewise.
5102         (start_decl_1): Likewise.
5103         (require_complete_types_for_parms): Likewise.
5104         * parse.y (structsp): Likewise.
5105         (base_class): Likewise.
5106         * parse.c: Regenerated.
5107         * pt.c (finish_member_template_decl): Likewise.
5108         * typeck.c (decay_conversion): Likewise.
5109         
5110         * cp-tree.h (dfs_skip_vbases): New function.
5111         (find_vbase_instance): Likewise.
5112         * class.c (determine_primary_base): Allow a nearly empty base to
5113         serve as a primary base class under the new ABI.
5114         (get_class_offset_1): Rename to ...
5115         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
5116         messages here.
5117         (get_class_offset): Use it.  Issue error messages here.
5118         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
5119         find the right copies of virtual bases.
5120         (fixup_vtable_deltas1): Rename to ...
5121         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
5122         bases as primary bases.
5123         (fixup_vtable_deltas): Remove.
5124         (override_one_vtable): Handle virtual bases as primary bases.
5125         (merge_overrides): Likewise.
5126         (finish_struct_1): Likewise.
5127         (dump_class_hierarchy): Dump primary-ness of bases as well.
5128         * search.c (mark_primary_bases): Use a pre-order traversal to
5129         handle primary virtual bases.
5130         (dfs_skip_vbases): New fiunction.
5131         (expand_upcast_fixups): Adjust to handle primary virtual bases.
5132         (fixup_virtual_upcast_offsets): Likewise.
5133         (fixup_all_virtual_upcast_offsets): Likewise.
5134         (dfs_find_vbase_instances): New function.
5135         (find_vbase_instance): Likewise.
5136         
5137 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
5139         * lex.c (DIR_SEPARATOR): Delete macro.
5141 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
5143        * decl2.c (lang_decode_option): Handle automatic line wrapping
5144        option.
5145         
5146 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
5148         * friend.c (do_friend): Don't resolve scopes when processing
5149         template declarations, even if the qualifying scope doesn't
5150         involve template parameters.
5152 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
5154         * class.c (dfs_modify_vtables_queue_p): Remove.
5155         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
5156         and dfs_marked_real_bases_queue_p instead of
5157         dfs_modify_vtables_queue_p.
5159         * class.c (build_vbase_path): Simplify.
5160         (dfs_propagate_binfo_offsets): New function.
5161         (propagate_binfo_offsets): Use it.
5162         (remove_base_field): Simplify.
5163         (dfs_set_offset_for_vbases): Remove.
5164         (dfs_set_offset_for_shared_vbases): New function.
5165         (dfs_set_offset_for_unshared_vbases): Likewise.
5166         (layout_virtual_bases): Use them.
5167         (layout_basetypes): Don't call propagate_binfo_offsets.
5168         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
5169         for the vbases.
5170         
5171         * class.c (build_base_field): New function, split out from ...
5172         (build_base_fields): ... here.  Use it.  Allocate primary bases
5173         first, under the new ABI.
5174         (get_vtable_entry): Remove.
5175         (remove_base_field): New function, split out from ...
5176         (remove_base_fields): ... here.  Adjust since primary bases come
5177         first under the new ABI.
5178         
5179         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
5180         (initialize_vtbl_ptrs): New function.
5181         (expand_indirect_vtbls_init): Change prototype.
5182         (convert_pointer_to_vbase): Declare.
5183         * init.c (expand_direct_vtbls_init): Remove.
5184         (dfs_initialize_vtbl_ptrs): New function.
5185         (initialize_vtbl_ptrs): Likewise.
5186         (emit_base_init): Use initialize_vtbl_ptrs.
5187         * search.c (convert_pointer_to_vbase): Make it global.
5188         (expand_indirect_vtbls_init): Remove vtable initialization code.
5189         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
5190         
5191         * class.c (dfs_finish_vtbls): New function.
5192         (finish_vtbls): Use it.
5193         (dump_class_hierarchy): New function.
5194         
5195         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
5196         (BINFO_VBASE_PRIMARY_P): New macro.
5197         (BINFO_VIRTUALS): Add to documentation.
5198         (SET_BINFO_PRIMARY_MARKED_P): Remove.
5199         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5200         (dfs_mark_primary_bases_queue_p): Likewise.
5201         (dfs_unmarked_real_bases_queue_p): New function.
5202         (dfs_marked_real_bases_queue_p): Likewise.
5203         * search.c (dfs_mark_primary_bases): Adjust.
5204         (mark_primary_bases): Likewise.
5205         (get_shared_vbase_if_not_primary): New function.
5206         (dfs_unmarked_real_bases_queue_p): Likewise.
5207         (dfs_marked_real_bases_queue_p): Likewise.
5208         (dfs_get_pure_virtuals): Simplify.
5209         (get_pure_virtuals): Likewise.
5210         
5211 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5213         * lex.c: Include tm_p.h.
5215 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
5217         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
5219 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
5221         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
5222         * pt.c (instantiate_decl): Defer comdat templates that might not be
5223         needed.
5224         
5225         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
5226         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
5227         (finish_file): Likewise.
5229         * decl2.c (import_export_class): Undo 12/14 change.
5231         * error.c (dump_decl): operator new, not operatornew.
5233         * class.c (field_decl_cmp): A nontype is "greater" than a type.
5234         * search.c (lookup_field_1): Look for the last field with the
5235         desired name.
5237 2000-01-05  Nathan Sidwell  <nathan@acm.org>
5239         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
5240         FUNCTION_DECL.
5242 2000-01-05  Nathan Sidwell  <nathan@acm.org>
5244         * typeck.c (build_static_cast): Don't strip target qualifiers
5245         when casting from a class.
5247 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5249         * class.c (warn_hidden): Initialize variable `fndecl'.
5251 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
5253         * decl.c (flag_isoc9x): New variable to be able to use code in
5254         c-common.c.  For now always zero.
5256 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
5258         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
5259         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
5260         or unshare_base_binfos for virtual bases here.
5261         * search.c (dfs_get_vbase_types): Do it here.
5262         (get_vbase_types): Adjust.
5263         
5264 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
5266         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
5267         (BINFO_PRIMARY_MARKED_P): Use flag 5.
5268         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
5269         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5270         (unmark_primary_bases): Remove declaration.
5271         (unmarkedp): Declare.
5272         (dfs_vbase_unmark): Likewise.
5273         * class.c (determine_primary_base): Return immediately if there
5274         are no base classes.  Call mark_primary_bases here.
5275         (modify_all_direct_vtables): Remove.
5276         (modify_all_indirect_vtables): Remove.
5277         (dfs_modify_vtables_queue_p): New function.     
5278         (dfs_modify_vtables): New function.
5279         (modify_all_vtables): Use them.
5280         (build_base_fields): Build FIELD_DECLs for primary virtual base
5281         classes.
5282         (create_vtable_ptr): Don't call determine_primary_base here.
5283         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
5284         (dfs_set_offset_for_vbases): ... this.
5285         (layout_virtual_bases): Use it.
5286         (layout_class_type): Call determine_primary_base here.
5287         * search.c (unmarkedp): Make it global.
5288         (shared_marked_p): Simplify.
5289         (shared_unmarked_p): Likewise.
5290         (dfs_primary_bases_queue_p): Remove.
5291         (dfs_unmark_primary_bases): Likewise.
5292         (unmark_primary_bases): Likewise.
5293         (mark_primary_bases): Simplify.
5294         (get_pure_virtuals): Don't call mark_primary_bases here.
5295         (dfs_vbase_unmark): New function.
5296         (get_vbase_types): Simplify.
5298         * class.c (struct base_info): Remove.
5299         (determine_primary_base): Take has_virtual_p rather than a
5300         base_info as input.  Don't calculate max_has_virtual.
5301         (finish_struct_bits): Remove max_has_virtual argument.
5302         (create_vtable_ptr): Remove max_has_virtual_p argument.
5303         (layout_virtual_bases): Remove max argument.
5304         (layout_basetypes): Likewise.
5305         (layout_class_type): Remove max_has_virtual_p argument.
5306         (finish_struct_1): Remove max_has_virtual.
5308         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
5309         (layout_basetypes): Remove.
5310         * class.c (propagate_binfo_offsets): Moved here from tree.c.
5311         Update to handle primary virtual bases.
5312         (remove_base_fields): New function, split out from
5313         layout_basetypes.
5314         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
5315         (layout_virtual_bases): New function, split out from
5316         layout_basetypes.  Update to handle primary virtual bases.
5317         (layout_basetypes): Moved here from tree.c.  Use
5318         remove_base_fields and layout_virtual_bases.
5319         * search.c (dfs_mark_primary_bases_queue_p): New function.
5320         (mark_primary_bases): Use it.
5321         * tree.c (CEIL): Remove.
5322         (propagate_binfo_offsets): Remove.
5323         (layout_basetypes): Remove.
5324         
5325 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
5327         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
5328         (BINFO_PRIMARY_MARKED_P): New macro.
5329         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
5330         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5331         (mark_primary_bases): New function.
5332         (unmark_primary_bases): Likewise.
5333         * search.c (get_abstract_virtuals_1): Remove.
5334         (dfs_mark_primary_bases): New function.
5335         (mark_primary_bases): Likewise.
5336         (dfs_unmark_primary_bases): Likewise.
5337         (unmark_primary_bases): Likewise.
5338         (dfs_get_pure_virtuals): Likewise.
5339         
5340 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
5342         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
5343         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
5344         (modify_one_vtable): Adjust.
5345         (fixup_vtable_deltas1): Likewise.
5346         (override_one_vtable): Likewise.
5347         * search.c (get_abstract_virtuals_1): Likewise.
5348         (get_pure_virtuals): Likewise.
5349         (expand_upcast_fixups): Likewise.
5350         * tree.c (debug_binfo): Likewise.
5351         
5352         * class.c (build_vtable): Don't return a value.  Don't rebuild
5353         vtables for bases that have already been handled.
5354         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
5355         already been handled.
5356         (modify_one_vtable): Adjust accordingly.
5357         (fixup_vtable_deltas1): Likewise.
5358         (finish_struct_1): Likewise.
5360 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5362         * call.c (build_new_method_call): Also check destructors.