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