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