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