OSDN Git Service

.:
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2
3         Kill -fhonor-std.
4         * NEWS: Document.
5         * cp-tree.h (flag_honor_std): Remove.
6         (CPTI_FAKE_STD): Remove.
7         (std_node): Remove comment about it being NULL.
8         (fake_std_node): Remove.
9         * decl.c (in_fake_std): Remove.
10         (walk_namespaces_r): Remove fake_std_node check.
11         (push_namespace): Remove in_fake_std code.
12         (pop_namespace): Likewise.
13         (lookup_name_real): Remove fake_std_node check.
14         (init_decl_processing): Always create std_node. Always add
15         std:: things there.
16         (builtin_function): Always put non '_' fns in std.
17         * decl2.c (flag_honor_std): Remove.
18         (lang_f_options): Remove honor-std.
19         (unsupported_options): Add honor-std.
20         (set_decl_namespace): Remove fake_std_node check.
21         (validate_nonmember_using_decl): Likewise.
22         (do_using_directive): Likewise.
23         (handle_class_head): Likewise.
24         * dump.c (cp_dump_tree): Likewise.
25         * except.c (init_exception_processing): Adjust.
26         * init.c (build_member_call): Remove fake_std_node check.
27         (build_offset_ref): Likewise.
28         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
29         * rtti.c (init_rtti_processing): Adjust.
30
31 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
32
33         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
34         operand while calling cp_tree_equal.
35
36 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
37
38         The 3.0 ABI no longer has vbase pointer fields.
39         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
40         FORMAT_VBASE_NAME): Remove.
41         * method.c (do_build_copy_constructor): Adjust.
42         (do_build_assign_ref): Adjust.
43         * search.c (lookup_field_r): Adjust.
44         * typeck.c (build_component_ref): Adjust.
45
46         The 3.0 ABI always has a vtable pointer at the start of every
47         polymorphic class.
48         * rtti.c (build_headof_sub): Remove.
49         (build_headof): Adjust.
50         (get_tinfo_decl_dynamic): No need to check flag_rtti
51         here. Adjust.
52         (create_real_tinfo_var): Explain why we need a hidden name.
53
54 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
55
56         PR c++/3631
57         * class.c (update_vtable_entry_for_fn): The fixed adjustment
58         of a virtual thunk should be from declaring base.
59
60 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
61
62         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
63         the shared virtual base, so preserving inheritance graph order.
64
65 2001-07-30  Andreas Jaeger  <aj@suse.de>
66
67         * decl2.c: Remove unused var global_temp_name_counter.
68
69 2001-07-28  Richard Henderson  <rth@redhat.com>
70
71         * method.c (pending_inlines): Remove.
72
73 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
74
75         * class.c (mark_primary_virtual_base): Don't adjust base
76         offsets here.
77         (dfs_unshared_virtual_bases): Adjust them here.
78         (mark_primary_bases): Explain why we adjust at the end.
79
80 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
81
82         * class.c (finish_struct_1): When copying the primary base's
83         VFIELD, make sure we find it is at offset zero.
84
85 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
86
87         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
88         tsubst_expr for default template arguments.
89
90 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
91
92         PR c++/3621
93         * spew.c (yylex): Only copy the token's lineno, if it is
94         non-zero.
95
96 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
97
98         PR c++/3624
99         * call.c (resolve_args): Simplify, call
100         convert_from_reference.
101         (build_new_op): Resolve and convert from reference ARG1
102         earlier. Adjust ARG2 & ARG3 resolve and conversion.
103
104 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
105
106         * decl.c (last_function_parm_tags): Remove.
107         (current_function_parm_tags): Remove.
108         (init_decl_processing): Adjust.
109         (start_function): Adjust.
110         (store_parm_decls): Adjust.
111
112         PR c++/3152
113         * decl.c (grokdeclarator): Detect when a function typedef is
114         declaring a function, and create last_function_parms correctly.
115
116 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
117
118         * call.c (joust): Only prefer a non-builtin candidate to a builtin
119         one if they have the same signature.
120
121         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
122         it rather than toplevel_bindings_p.  Give it a mangled name if static.
123         (convert_to_reference): Adjust.
124         * decl2.c (get_temp_name): Lose.
125         * mangle.c (mangle_ref_init_variable): New fn.
126         (mangle_guard_variable): Strip the ref-init header.
127         * cp-tree.h: Adjust.
128         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
129         initializer.
130         (grok_reference_init): Always use DECL_INITIAL.
131
132 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
133
134         PR c++/3416
135         * call.c (build_conditional_expr): Recheck args after
136         conversions.
137         * cp-tree.h (build_conditional_expr): Move to correct file.
138         * typeck.c (decay_conversion): Diagnose any unknown types
139         reaching here.
140         (build_binary_op): Don't do initial decay or default
141         conversions on overloaded functions.
142         (build_static_cast): Don't do a decay conversion here.
143
144 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
145
146         PR c++/3543
147         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
148         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
149
150 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
151
152         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
153         (create_vtbl_ptr): ... here.
154
155 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
156
157         * class.c (build_vbase_offset_vbtl_entries): Look for
158         non-primary base of which we are a sub vtable.
159
160 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
161
162         * semantics.c (finish_this_expr):  Remove unused code.
163
164 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
165
166         Simplify rtti, now we've only one ABI.
167         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
168         CPTI_TINFO_VAR_ID.
169         (tinfo_decl_id, tinfo_var_id): Remove.
170         (get_typeid_1): Remove.
171         * rtti.c
172         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
173         (typeid_ok_p): New function.
174         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
175         (get_tinfo_decl): Remove old abi documentation.
176         (tinfo_from_decl): Remove.
177         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
178         (get_typeid_1): Remove.
179         (get_base_offset): Remove.
180         (synthesize_tinfo_var): Absorb get_base_offset.
181         (create_real_tinfo_var): Don't use tinfo_decl_id.
182
183 2001-07-23  Graham Stott  <grahams@redhat.com>
184
185         * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
186         variable has_two_argument_delete_p.
187
188 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
189
190         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
191         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
192         (CPTI_INDEX_IDENTIFIER): Remove.
193         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
194         (delta2_identifier): Remove.
195         (index_identifier): Remove.
196         (pfn_or_delta2_identifier): Remove.
197         (flag_vtable_thunks): Remove.
198         (VTABLE_DELTA2_NAME): Remove.
199         (VTABLE_INDEX_NAME): Remove.
200         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
201         (vfunc_ptr_type_node): Adjust.
202         (VTABLE_NAME_PREFIX): Adjust.
203         (build_vfn_ref): Lose first parameter.
204         (fixup_all_virtual_upcast_offsets): Remove.
205         * decl.c (initialize_predefined_identifiers): Remove
206         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
207         (init_decl_processing): Remove no-vtable-thunk code.
208         * decl2.c (flag_vtable_thunks): Remove.
209         (mark_vtable_entries): Remove no-vtable-thunk code.
210         * error.c (dump_decl): Remove no-vtable-thunk code.
211         (dump_expr): Adjust ptr to member function code.
212         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
213         code.
214         * rtti.c (build_headof): Remove no-vtable-thunk code.
215         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
216         * search.c (get_base_distance): Remove expand_upcast_fixups case.
217         (virtual_context) Remove.
218         (expand_upcast_fixups): Remove.
219         (fixup_virtual_upcast_offsets): Remove.
220         (fixup_all_virtual_upcast_offsets): Remove.
221         * typeck.c (get_member_function_from_ptrfunc): Remove
222         no-vtable-thunk code.
223         * call.c (build_over_call): Adjust call to build_vfn_ref.
224         * class.c (build_vfn_ref): Lose first parameter. Remove
225         no-vtable-thunk code.
226         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
227         (build_vtable_entry): Remove no-vtable-thunk code.
228
229 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
230
231         Remove old-abi remnants. Remove comments about old abi
232         behaviour. Remove refences to 'new-abi' in comments.
233         * cp-tree.h: Adjust comments.
234         (vbase_offsets_in_vtable_p): Delete.
235         (vcall_offsets_in_vtable_p): Delete.
236         (vptrs_present_everywhere_p): Delete.
237         (all_overridden_vfuns_in_vtables_p): Delete.
238         (merge_primary_and_secondary_vtables_p): Delete.
239         (TYPE_CONTAINS_VPTR_P): Adjust.
240         (VTT_NAME_PREFIX): Remove.
241         (CTOR_VTBL_NAME_PREFIX): Remove.
242         (init_vbase_pointers): Remove.
243         * class.c: Adjust coments.
244         (build_vbase_pointer_fields): Delete.
245         (build_vbase_pointer): Remove old-abi code.
246         (build_secondary_vtable): Likewise.
247         (modify_all_vtables): Likewise.
248         (create_vtable_ptr): Likewise.
249         (layout_class_type): Likewise.
250         (finish_struct_1): Likewise.
251         (finish_vtbls): Likewise.
252         (dfs_finish_vtbls): Delete.
253         (build_vbase_offset_vtbl_entries): Remove old-abi code.
254         * cvt.c: Adjust comments.
255         * decl.c: Adjust comments.
256         * decl2.c: Adjust comments.
257         * init.c: Adjust comments.
258         (construct_virtual_bases): Remove old-abi code.
259         * lang-specs.h: Remove -fno-new-abi.
260         * mangle.c: Adjust comments.
261         * rtti.c: Adjust comments.
262         (get_base_offset): Remove old-abi-code.
263         * search.c: Adjust comments.
264         (dfs_init_vbase_pointers): Remove.
265         (dfs_vtable_path_unmark): Remove.
266         (init_vbase_pointers): Remove.
267         * semantics.c: Adjust comments.
268         (emit_associated_thunks): Remove old-abi code.
269         * typeck.c: Adjust comments.
270
271 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
272
273         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
274         params.h.
275
276 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
277
278         * class.c (finish_struct_anon): Forbid nested classes.
279
280 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
281
282         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
283         * optimize.c: Include debug.h.
284         (maybe_clone_body): Use debug hook.
285         * semantics.c: Include debug.h.
286         (expand_body): Use debug hook.
287
288 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
289
290         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
291
292 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
293
294         * class.c (type_requires_array_cookie): New function.
295         (check_methods): Don't try to figure out whether the type needs a
296         cookie here.
297         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
298         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
299         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
300         * pt.c (instantiate_class_template): Don't set
301         TYPE_VEC_DELETE_TAKES_SIZE.
302         * NEWS: Document ABI changes from GCC 3.0.
303
304 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
305             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
306
307         * NEWS (Changes in GCC 3.0): Fix typo.
308
309 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
310
311         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
312         which attributes are to be attached, and a flags argument.  Update
313         call to decl_attributes.
314         (grokfield): Update call to decl_attributes.
315         * class.c (finish_struct): Update call to cplus_decl_attributes.
316         * cp-tree.h (cplus_decl_attributes): Update prototype.
317         * decl.c (start_decl, grokdeclarator, start_function): Update
318         calls to decl_attributes and cplus_decl_attributes.
319         * friend.c (do_friend): Update call to cplus_decl_attributes.
320         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
321
322 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
323
324         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
325         for `register' variables with an asm-specification.
326
327 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
328
329         * semantics.c (finish_asm_stmt): Mark the output operands
330         to an asm addressable, if necessary.
331
332 2001-07-11  Ben Elliston  <bje@redhat.com>
333
334         * Revert this change -- there is a subtle bug.
335
336         PR c++/80
337         * decl.c (finish_enum): New "attributes" argument; pass it to
338         cplus_decl_attributes.  Use a narrower type if the enum is packed.
339         * cp-tree.h (finish_enum): Adjust prototype.
340         * parse.y (enum_head): New non-terminal.
341         (structsp): Use it. Enums now may be preceded or followed by
342         optional attributes -- pass their chained tree to finish_enum().
343         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
344
345 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
346
347         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
348         variables.
349
350 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
351
352         * semantics.c (cp_expand_stmt): Fix for null
353         current_function_return_value.
354
355 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
356
357         * call.c (build_op_delete_call): Initialize fn.
358         (convert_like_real): Delete conditional.
359         (joust): Initialize *w and *l.
360         * class.c: Add prototype for binfo_ctor_vtable.
361         (get_primary_binfo): Initialize result.
362         * init.c (build_java_class_ref): Initialize name.
363
364 2001-07-09  Erik Rozendaal  <dlr@acm.org>
365
366         * typeck.c (unary_complex_lvalue): Do not duplicate the
367         argument to modify, pre-, or post-increment when used as an
368         lvalue and when the argument has side-effects.
369
370 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
371
372         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
373         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
374         cplus_decl_attributes even if attrs is NULL.
375         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
376
377 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
378
379         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
380         calls to decl_attributes.
381
382 2001-07-06  Ira Ruben   <ira@apple.com>
383
384         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
385         be DECL_TEMPLATE_RESULT.
386
387 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
388
389         * cp-tree.h (copy_template_template_parm): Rename to ...
390         (bind_template_template_parm): ... here.
391         * tree.c (copy_template_template_parm): Rename to ...
392         (bind_template_template_parm): ... here.  Remove the case when
393         NEWARGS is NULL_TREE.
394         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
395         BOUND_TEMPLATE_TEMPLATE_PARM.
396         * pt.c (lookup_template_class): Adjust.
397
398 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
399
400         * cvt.c (convert_lvalue): New fn.
401         * cp-tree.h: Declare it.
402         * method.c (do_build_assign_ref): Use it.
403         (do_build_copy_constructor): Convert parm to base types
404         before calling base constructors.
405
406         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
407         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
408         optimize.
409         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
410
411 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
412
413         * optimize.c (optimize_inline_calls): New function, broken out
414         of ...
415         (optimize_function): ... here. Call it. Don't inline if it is
416         a thunk.
417         (dump_function): Print name of dump flag causing this dump.
418         * semantics.c (expand_body): Move thunk inline check to
419         optimize_function.
420
421 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
422
423         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
424         (comptypes): Use target.comp_type_attributes.
425
426 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
427
428         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
429
430 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
431
432         * error.c (lang_print_error_function): Add a `diagnostic_context *'
433         parameter. Tweak.
434
435 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
436
437         * decl2.c (import_export_class): Update.
438
439 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
440
441         * error.c (init_error): Adjust settings.
442
443 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
444
445         * error.c (init_error): Adjust settings.
446
447 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
448
449         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
450         return pointers to data members by reference rather than by value.
451
452 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
453
454         Implement the Named Return Value optimization.
455         * cp-tree.h (struct cp_language_function): Add x_return_value.
456         (current_function_return_value): Now a macro.
457         * decl.c: Don't define it.
458         (define_label, finish_case_label): Don't clear it.
459         (init_decl_processing): Don't register it with GC.
460         * semantics.c (genrtl_finish_function): Don't check it for
461         no_return_label.  Copy the RTL from the return value to
462         current_function_return_value and walk, calling...
463         (nullify_returns_r): ...this new fn.
464         * typeck.c (check_return_expr): Set current_function_return_value.
465
466 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
467
468         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
469         sharing a ctor vtable with.  Merge code for cases 1 and 2.
470         (binfo_ctor_vtable): New fn.
471         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
472
473 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
474
475         * class.c (dfs_find_final_overrider): Fix logic.
476
477         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
478         virtual thunk instead of non-virtual.
479         (get_matching_virtual): Uncomment.
480
481         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
482         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
483         PARM, not ARG.
484
485 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
486
487         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
488         we've not emerged from the hierarchy of RTTI_BINFO on reaching
489         a non-virtual base.
490
491 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
492
493         * NEWS: Update release number.
494
495 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
496
497         PR c++/3130, c++/3131, c++/3132
498         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
499         * class.c (force_canonical_binfo_r): Move
500         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
501         virtual bases unless they're primary and what they're primary
502         too has been moved.
503         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
504         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
505         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
506         derived binfo.
507         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
508         (layout_nonempty_base_or_field): Add most derived type
509         parameter. Adjust.
510         (layout_empty_base): Likewise.
511         (build_base_field): Likewise.
512         (build_base_fields): Likewise.
513         (propagate_binfo_offsets): Add most derived type
514         parameter. Skip non canonical virtual bases too.
515         (dfs_set_offset_for_unshared_vbases): Don't skip primary
516         bases. Do skip canonical bases.
517         (layout_virtual_bases): Adjust.
518         (layout_class_type): Adjust.
519         (dfs_get_primary_binfo): Build list of virtual primary base
520         candidates.
521         (get_primary_binfo): Check that the shared virtual primary
522         base candidate was found first.
523         (accumulate_vtbl_inits): Don't do anything for non-vptr
524         containing binfos. For case 1 primary virtual bases, keep
525         checking that we've not emerged from the hierarchy of RTTI_BINFO.
526
527 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
528
529         PR c++/3089
530         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
531         hierarchy looking for primary bases for a ctor
532         vtable. Recursively call oneself, if we meet our primary via
533         this route and haven't met it yet via inheritance graph order.
534
535 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
536
537         * lang-options.h: Emit documentation for -fno-honor-std, not
538         -fhonor-std.
539
540 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
541
542         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
543         Don't clobber delta.
544         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
545
546 2001-06-10  Mark Mitchell <mark@codesourcery.com>
547             Gabriel Dos Reis  <gdr@codesourcery.com>
548
549         * Make-lang.in (cp/call.o): Depend on diagnostic.h
550         (cp/typeck.o): Depend on diagnostic.h
551         (cp/typeck2.o): Depend on diagnostic.h
552         (cp/repo.o): Depend on dignostic.h
553         * typeck.c: #include diagnostic.h
554         (convert_for_initialization): Remove extern declaration for
555         warningcount and errorcount.
556
557         * call.c: #include diagnostic.h
558         (convert_like_real): Remove extern declaration for warnincount and
559         errorcount.
560
561         * repo.c: #include diagnostic.h
562         * typeck2.c: #include diagnostic.h
563
564 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
565
566         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
567         in previous change.
568
569 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
570
571         PR c++/2929
572         * friend.c (do_friend): Use push_decl_namespace for classes at
573         namespace scope.
574
575 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
576             Jason Merrill <jason_merrill@redhat.com>
577
578         PR c++/3061
579         * class.c (build_secondary_vtable): Use assert, rather than an error
580         message.
581         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
582         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
583         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
584         Don't set BINFO_VTABLE for a primary virtual base.
585
586 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
587
588         * decl.c (duplicate_decls): Update source position information
589         when a template function is defined.
590
591 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
592
593         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
594
595 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
596
597         PR c++/2914
598         * decl.c (pushtag): Don't push into a complete type's scope.
599
600 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
601
602         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
603         (struct lang_decl_flags): Lose generate_with_vtable_p.
604         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
605         * class.c (copy_virtuals): Adjust.
606         * decl2.c (mark_vtable_entries): Adjust.
607         * method.c (make_thunk, build_vtable_entry): Adjust.
608         * class.c (update_vtable_entry_for_fn): Only look as far as the
609         first defining class.
610         (build_vtbl_initializer): Put nothing in the slot for a function only
611         defined in a lost primary virtual base.
612         (add_vcall_offset_vtbl_entries_1): Use the same code for
613         the lost primary case and the normal case.
614         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
615         (get_vfield_offset, get_derived_offset): Lose.
616         (dfs_find_final_overrider): Use look_for_overrides_here.
617         (get_matching_virtual): New fn.
618         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
619         not BV_VCALL_INDEX.
620         * search.c (look_for_overrides_here): Split out from...
621         (look_for_overrides_r): Here.
622
623         * class.c (find_final_overrider): Return error_mark_node on error.
624
625         * decl2.c (key_method): #if 0 accidental change.
626
627 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
628
629         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
630         (build_over_call): Likewise.
631         * decl.c (grokparms): Likewise.
632         * pt.c (tsubst_decl): Likewise.
633         * typeck.c (convert_arguments): Likewise.
634
635 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
636
637         * semantics.c (begin_class_definition): Robustify.
638
639         * pt.c (instantiate_decl): Tell the repository code about the
640         clones, not the cloned functions.
641         * repo.c (repo_template_used): Explicitly instantiate the cloned
642         function, not the clones.
643
644 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
645
646         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
647         ICS_BAD_FLAG on created conversion.
648         (compare_ics): Break out rank.
649
650 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
651
652         * decl.c (xref_tag): Remove extraneous %s on dependent name
653         lookup warning.
654
655 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
656
657         * class.c (layout_vtable_decl): Fix off by one error on
658         build_index_type.
659         (build_vtt): Likewise.
660         (build_ctor_vtbl_group): Likewise.
661
662 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
663
664         * class.c (maybe_indent_hierarchy): New function.
665         (dump_class_hierarchy_r): Add flags. Dump extra binfo
666         information, if enabled. Use maybe_indent_hierarchy. Adjust
667         output format.
668         (dump_class_hierarchy): Adjust prototype. Adjust output format.
669         (dump_array, dump_vtable, dump_vtt): New functions.
670         (finish_struct_1): Adjust hierarchy dumping.
671         (initialize_vtable): Call dump_vtable.
672         (build_vtt): Call dump_vtt.
673         (build_ctor_vtbl_group): Call dump_vtable.
674         * decl2.c (flag_dump_class_layout): Remove.
675         (cxx_decode_option): Remove dump translation unit
676         and dump class hierarchy check. Call dump_switch_p.
677         (finish_file): Adjust dumping.
678         (dump.c): Only dump base classes if not TDF_SLIM.
679         Only dump namespace members if not TDF_SLIM.
680         * optimize.c (dump_function): New function.
681         (optimize_function): Call dump_function.
682         * semantics.c (expand_body): Use dump_enabled_p.
683
684 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
685
686         PR g++/2936
687         Part missed from first commit
688         * decl2.c (finish_anon_union): Copy context.
689
690 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
691
692         PR g++/2936
693         * optimize.c (remap_decl): Remap anonymous aggregate members too.
694
695 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
696
697         PR g++/2823
698         * semantics.c (expand_body): Don't optimize thunks.
699
700 2001-05-25  Sam TH  <sam@uchicago.edu>
701
702         * cp-tree.h lex.h: Fix header include guards.
703
704 2001-05-25  Mark Mitchell <mark@codesourcery.com>
705
706         * decl.c (init_decl_processing): Tweak.
707
708 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
709
710         * decl.c (duplicate_decls): Tidy.
711         (init_decl_processing): Always set flag_no_builtin.
712
713 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
714
715         PR c++/2184
716         * decl2.c (do_local_using_decl): Push the decls, even in a
717         template.
718
719 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
720
721         * optimize.c (initialize_inlined_parameters): Don't set
722         TREE_READONLY for a VAR_DECL taking the place of an inlined
723         PARM_DECL.
724
725 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
726
727         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
728         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
729         attribute.
730
731 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
732
733         * parse.y: Refer to compound literals as such, not as
734         constructor-expressions.
735
736 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
737
738         * call.c (build_op_delete_call): Ignore exception-specifications
739         when looking for matching delete operators.
740         * init.c (build_new_1): Compute whether or not the allocation
741         function used is a placement allocation function or not, and
742         communicate this information to build_op_delete_call.
743
744 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
745
746         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
747         (build_vtbl_ref): Adjust.
748         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
749         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
750         Re-add vtable-gc.
751         (unsupported_options): Correspondingly.
752
753         * decl2.c (maybe_make_one_only): Check flag_weak, not
754         supports_one_only().
755
756         * cp-tree.def (START_CATCH_STMT): Lose.
757         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
758         * tree.c (cp_statement_code_p): Don't case it.
759         * semantics.c (cp_expand_stmt): Likewise.
760         * cp-tree.h (START_CATCH_TYPE): Lose.
761         (HANDLER_TYPE): New.
762         * except.c (expand_start_catch_block): Don't start any blocks.
763         Return the type.
764         (expand_end_catch_block): Don't end any blocks.
765         * parse.y (handler): Don't pass anything from finish_handler_parms
766         to finish_handler.
767         * pt.c (tsubst_expr): Likewise.
768         * semantics.c (begin_handler): Call note_level_for_catch here.
769         (finish_handler_parms): Don't return anything.
770         (genrtl_catch_block, begin_catch_block): Lose.
771         (genrtl_handler): Call expand_start_catch here.
772
773 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
774
775         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
776         (get_vtable_decl, build_vtt): Not here.
777
778 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
779
780         PR c++/2781
781         * optimize.c (update_cloned_parm): Copy addressability and other
782         flags.
783
784 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
785
786         * pt.c (determine_specialization): Ignore artificial functions.
787
788 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
789
790         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
791         (C_RID_CODE): Remove.
792         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
793         (init_parse): Don't do it here.
794
795 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
796
797         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
798         function declaration to avoid stripping the symbol's attributes.
799
800 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
801
802         * decl.c (pushdecl): Adjust error string.
803         (xref_tag): Adjust friend class injection warning. Remove the
804         inherited name from the class shadowed scope.
805
806 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
807
808         * except.c (cp_protect_cleanup_actions): New function.
809         (init_exception_processing): Don't set protect_cleanup_actions
810         here.  Do set lang_protect_cleanup_actions.
811
812 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
813
814         * spew.c (read_token): Call yyerror on all unexpected tokens.
815
816 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
817
818         * init.c (member_init_ok_or_else): Take a tree rather than
819         string for name.
820         (expand_member_init): Adjust.
821
822 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
823
824         * decl.c (duplicate_decls): Suppress warning about duplicate
825         decls if the first decl is a friend.
826
827 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
828
829         * except.c (choose_personality_routine): Export.  Add
830         explanatory comment.  Take an enum languages, not a boolean.
831         (initialize_handler_parm): Adjust to match.
832         * cp-tree.h: Prototype choose_personality_routine.
833         * lex.c (handle_pragma_java_exceptions): New function.
834         (init_cp_pragma): Register #pragma GCC java_exceptions.
835
836 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
837
838         * method.c (build_mangled_C99_name): Remove unused prototype.
839
840 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
841
842         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
843         * typeck.c (get_member_function_from_ptrfunc,
844         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
845         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
846
847         Reverted Geoff Keating's 2001-05-03's patch.
848
849 2001-05-11  Ira Ruben   <ira@apple.com>
850
851         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
852
853 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
854
855         * cp-tree.h (finish_label_expr, lookup_label): Delete.
856         * parse.y: Update for '&&'; don't issue warning here.
857         * semantics.c (finish_label_expr): Delete.
858
859 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
860
861         * splay-tree.h (splay_tree_max): New function.
862         (splay_tree_min): Likewise.
863
864 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
865
866         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
867         (pfn_vflag_identifier): Define.
868         Update comment about layout of pointer functions.
869         (build_ptrmemfunc1): Update prototype.
870         (expand_ptrmemfunc_cst): Update prototype.
871         * decl.c (initialize_predefined_identifiers): Initialize
872         pfn_vflag_identifier.
873         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
874         an extra field to the type.
875         * expr.c (cplus_expand_constant): Pass 'flag' between
876         expand_ptrmemfunc_cst and build_ptrmemfunc1.
877         * typeck.c (get_member_function_from_ptrfunc): When
878         FUNCTION_BOUNDARY < 16, look at additional field to determine
879         if a pointer-to-member is a real pointer or a vtable offset.
880         (build_ptrmemfunc1): Add new parameter to contain extra field.
881         (build_ptrmemfunc): Pass the extra field around.
882         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
883         (pfn_from_ptrmemfunc): Ignore the extra field.
884
885 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
886
887         * cp-tree.h (flag_inline_trees): Update documentation.
888         * decl.c (init_decl_processing): Adjust handling of
889         flag_inline_functions and flag_inline_trees to support -O3.
890         (grokfndecl): Set DECL_INLINE on all functions if that's what
891         the user requested.
892         (save_function_data): Clear DECL_INLINE in
893         current_function_cannot_inline is non-NULL.
894         * decl2.c (flag_inline_trees): Update documentation.
895
896 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
897
898         * dump.c (cp_dump_tree, USING_STMT case): New case.
899         * tree.c (cp_statement_code_p): Add USING_STMT.
900         * decl2.c (do_using_directive): Add the using directive statement.
901
902         * tree.c (walk_tree): Reformat an if block.
903
904 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
905
906         * decl.c (compute_array_index_type): Don't try to do anything with
907         the indices when processing a template.
908
909 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
910
911         * call.c: NULL_PTR -> NULL.
912         * class.c: Likewise.
913         * cvt.c: Likewise.
914         * decl.c: Likewise.
915         * decl2.c: Likewise.
916         * except.c: Likewise.
917         * init.c: Likewise.
918         * rtti.c: Likewise.
919         * search.c: Likewise.
920         * tree.c: Likewise.
921         * typeck.c: Likewise.
922         * typeck2.c: Likewise.
923
924 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
925
926         * decl2.c (do_using_directive): Revert previous patch.
927
928 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
929
930         * cp-tree.def (USING_STMT): New statement node.
931         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
932         * decl2.c (do_using_directive): Add USING_STMT to statement
933         tree. Don't emit errors when processing template decl.
934         * pt.c (tsubst_expr, USING_STMT case): New case.
935         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
936
937 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
938
939         * call.c (build_new_op): Convert args from reference here.
940         (build_conditional_expr): Don't convert here.
941
942 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
943
944         * spew.c (last_token_id): New static variable.
945         (read_token): Set it here.
946         (yyerror): Use it here.
947
948 2001-04-30  Richard Henderson  <rth@redhat.com>
949
950         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
951         * decl.c: Likewise.
952
953 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
954
955         * gxxint.texi: Remove.
956         * Make-lang.in: Remove all traces of gxxint.texi.
957
958 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
959
960         * decl2.c (start_static_initialization_or_destruction): Correct
961         logic to handle the -fno-use-cxa-atexit case.
962
963 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
964
965         * optimize.c (update_cloned_parm): New function.
966         (maybe_clone_body): Use it.  Update the `this' parameter too.
967
968 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
969
970         * decl2.c (unsupported_options): Add new-abi.
971         * lang-options.h: Remove no longer supported options.
972
973 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
974
975         * except.c (can_convert_eh): Don't check template parms,
976         typename types etc.
977
978 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
979
980         * optimize.c (maybe_clone_body): Copy parameter names and locations.
981
982 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
983
984         * cp-tree.h (adjust_clone_args): Prototype new function.
985         * class.c (adjust_clone_args): New function.
986         * decl.c (start_function): Call it for in charge ctors.
987
988 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
989
990         * method.c (use_thunk): Make sure that thunks really are emitted
991         when requested.
992
993 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
994
995         * mangle.c (write_chars): New macro.
996         (hwint_to_ascii): New function
997         (write_number): Use it.
998         (write_integer_cst): Deal with really big numbers.
999
1000 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
1001
1002         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
1003         the clone.
1004
1005 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
1006
1007         * decl.c (grokdeclarator): Set context of namespace scope
1008         TYPE_DECLS.
1009
1010 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
1011
1012         * cp/optimize.c: Include hashtab.h.
1013         (struct inline_data): Add tree_pruner.
1014         (expand_call_inline, expand_calls_inline): Use it when calling
1015         walk_tree.
1016         (optimize_function): Initialize and free tree_pruner.
1017
1018 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
1019
1020         Lazy __FUNCTION__ generation.
1021         * cp-tree.def (FUNCTION_NAME): Remove.
1022         * cp-tree.h (function_name_declared_p): Remove.
1023         (cp_fname_init): Prototype.
1024         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
1025         don't call declare_function_name. Call start_fname_decls.
1026         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
1027         clobber the line number.
1028         (cp_fname_init): New function.
1029         (start_function): Call start_fname_decls.
1030         (finish_function): Call finish_fname_decls.
1031         * lex.c (reswords): Add slots for __FUNCTION__ et al.
1032         (rid_to_yy): Add mappings for __FUNCTION__ et al.
1033         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
1034         * parse.y (VAR_FUNC_NAME): New token.
1035         (primary): Add VAR_FUNC_NAME.
1036         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
1037         generation.
1038         (tsubst, FUNCTION_NAME case): Remove.
1039         (tsubst_copy, FUNCTION_NAME case): Remove.
1040         (tsubst_expr, DECL_STMT case): Be careful with a
1041         DECL_PRETTY_FUNCTION_P.
1042         (instantiate_decl): Remove function_name_declared_p.
1043         * semantics.c (begin_compound_statement): Don't call
1044         declare_function_name here.
1045         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
1046         (finish_translation_unit): Call finish_fname_decls.
1047         (expand_body): Remove function_name_declared_p.
1048         * typeck2.c (digest_init): Allow any ERROR_MARK.
1049
1050 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
1051
1052         * pt.c (tsubst_decl): Use VOID_TYPE_P.
1053         * semantics.c: Fix some typos.
1054
1055 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
1056
1057         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
1058
1059 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1060
1061         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
1062
1063 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
1064
1065         * except.c (build_throw): Wrap the initialization of the exception
1066         object in a MUST_NOT_THROW_EXPR.
1067         (do_free_exception): #if 0.
1068
1069 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
1070
1071         * cp-tree.h (finish_enum): Change prototype.
1072         * decl.c (finish_enum): Reorganize.
1073         * parse.y (structsp): Adjust calls to finish_enum.
1074
1075 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
1076
1077         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
1078         't' case.
1079
1080 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
1081
1082         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
1083         (layout_empty_base): Return at end flag.
1084         (build_base_field): Likewise.
1085         (build_base_fields): Likewise.
1086         (layout_virtual_bases): Don't add 1 to eoc value.
1087         (end_of_class): Use full size for empty bases.
1088         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
1089         empty bases. Don't add 1 to eoc value. Only add trailing padding
1090         if we're an empty class with no empty bases.
1091         (dump_class_hierarchy): Dump size and alignment.
1092
1093 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
1094
1095         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
1096         ICS_BAD_FLAG.
1097
1098 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
1099
1100         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
1101         is found, look first if name does not match the structure name.
1102
1103 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
1104
1105         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
1106         set.
1107         (SET_DECL_LANGUAGE): New macro.
1108         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
1109         (pushdecl): Likewise.
1110         (build_library_fn_1): Likewise.
1111         (build_cp_library_fn): Likewise.
1112         (grokfndecl): Likewise.
1113         (grokvardecl): Mark `extern "C"' variables as having C linkage.
1114         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
1115         * lex.c (retrofit_lang_decl): Likewise.
1116         * mangle.c (mangle_decl_string): Don't mangle the names of
1117         variables declared with C language linkage.
1118         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
1119
1120 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1121
1122         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
1123         flag_access_control from uninitialized storage.
1124
1125 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
1126
1127         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
1128         * mangle.c (write_pointer_to_member_type): Fix mangling of
1129         pointers to cv-qualified member function types.
1130
1131         * init.c (build_delete): Create a SAVE_EXPR for the address if
1132         we're going to use it more than once.
1133
1134 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
1135
1136         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
1137         (expand_ptremfunc_cst): Change prototype.
1138         (delta2_from_ptrmemfunc): Remove.
1139         * expr.c (cplus_expand_constant): Adjust call to
1140         expand_ptrmemfunc_cst.
1141         * typeck.c (build_ptrmemfunc1): Simplify.
1142         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
1143         results in a constant.
1144         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
1145         (delta2_from_ptrmemfunc): Remove.
1146         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
1147
1148 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
1149
1150         * cp-tree.h (decl_namespace_list): New macro.
1151         (struct saved_scope): Add decl_ns_list.
1152         * decl.c (mark_saved_scope): Mark it.
1153         * decl2.c: Lose static decl_namespace_list.
1154         (init_decl2): Don't save it.
1155
1156 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1157
1158         * cp-tree.h (warn_return_type, yylex): Delete redundant
1159         declarations.
1160
1161         * decl.c (current_class_depth, global_namespace): Likewise.
1162
1163         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
1164
1165         * repo.c (flag_use_repository): Likewise.
1166
1167 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1168
1169         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
1170         set_block, pushdecl, getdecls, gettags, init_decl_processing,
1171         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
1172         lvalue_or_else, print_lang_statistics, comp_target_types,
1173         unsigned_type, signed_type, signed_or_unsigned_type,
1174         build_function_call, mark_addressable, incomplete_type_error):
1175         Delete redundant declarations.
1176
1177 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
1178
1179         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
1180         (TYPE_ANONYMOUS_P): New macro.
1181         (TAGGED_TYPE_P): New macro.
1182         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
1183         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
1184         * tree.c (no_linkage_helper): Likewise.
1185         * semantics.c (begin_class_definition): Likewise.
1186         * pt.c (convert_template_argument): Likewise.
1187         * lex.c (check_for_missing_semicolon): Likewise.
1188
1189 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
1190
1191         * class.c (dfs_unshared_virtual_bases): New function.
1192         (mark_primary_bases): Call it.
1193         (check_bases): Ignore virtual bases when determining
1194         nearly-emptiness.
1195
1196 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
1197
1198         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
1199
1200 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
1201
1202         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
1203         cloned function to the clone.
1204
1205 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1206
1207         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
1208
1209         * semantics.c: Include expr.h.
1210
1211 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
1212
1213         * method.c (implicitly_declare_fn): Commonize code for copy ctor
1214         and assignment op. Set TREE_USED for parameter.
1215
1216 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
1217
1218         * class.c (find_final_overrider_data): Add `candidates'.
1219         (dfs_find_final_overrider): Don't issue error messages
1220         prematurely.
1221         (find_final_overrider): Issue error messages here.
1222         (build_base_field): Don't warn about amgibuous direct bases here.
1223         (warn_about_ambiguous_direct_bases): New function.
1224         (layout_class_type): Use it.
1225
1226 2001-04-10  Richard Henderson  <rth@redhat.com>
1227
1228         * typeck.c (build_array_ref): Push the array reference inside
1229         COMPOUND_EXPR and COND_EXPR.
1230
1231 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
1232
1233         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
1234         * decl.c (duplicate_decls): Adjust accordingly.
1235         (maybe_commonize_var): Likewise.
1236         (grokfndecl): Likewise.
1237         (start_function): Likewise.
1238         (start_method): Likewise.
1239         * decl2.c (key_method): Likewise.
1240         (import_export_decl): Likewise.
1241         * method.c (implicitly_declare_fn): Likewise.
1242         * optimize.c (maybe_clone_body): Likewise.
1243
1244 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
1245
1246         * lang-specs.h: Add __DEPRECATED.
1247
1248 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
1249
1250         * search.c (get_dynamic_cast_base_type): When building a new
1251         constant, set its type to ssizetype.
1252
1253 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
1254
1255         * optimize.c (expand_call_inline): Only add newly inlined statements
1256         into inlined_stmts.
1257
1258 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
1259
1260         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
1261         (OPERATOR_FORMAT): Likewise.
1262         (OPERATOR_TYPENAME_FORMAT): Likewise.
1263         * operators.def: Remove old name-mangling information.
1264         * decl.c (grok_op_properties): Adjust accordingly.
1265         * lex.c (init_operators): Likewise.
1266         * rtti.c (get_tinfo_decl): Issue error messages about types that
1267         have variable size.
1268
1269 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
1270
1271         * decl2.c (import_export_decl): Don't call import_export_class
1272         when processing an inline member function.
1273         * semantics.c (expand_body): Call import_export_decl before
1274         emitting inline functions.
1275
1276 2001-03-28  Richard Henderson  <rth@redhat.com>
1277
1278         IA-64 ABI Exception Handling:
1279         * cp-tree.def (EH_SPEC_BLOCK): New.
1280         (MUST_NOT_THROW_EXPR): New.
1281         * cp-tree.h: Update changed function declarations.
1282         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
1283         (CPTI_CALL_UNEXPECTED): New.
1284         (struct cp_language_function): Rename x_eh_spec_try_block
1285         to x_eh_spec_block.
1286         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
1287         * decl.c (current_binding_level): If no current function
1288         bindings, revert to scope_chain.
1289         (initialize_predefined_identifiers): Remove __cp_push_exception.
1290         (store_parm_decls): Use begin_eh_spec_block.
1291         (finish_function): Use finish_eh_spec_block.
1292         (mark_lang_function): Update for name changes.
1293         * decl2.c (finish_file): No mark_all_runtime_matches.
1294         * dump.c (cp_dump_tree): Handle new tree codes.
1295         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
1296         * except.c (catch_language_init, catch_language): Remove.
1297         (init_exception_processing): Don't set language code.
1298         Initialize call_unexpected_node, protect_cleanup_actions,
1299         eh_personality_libfunc, lang_eh_runtime_type.
1300         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
1301         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
1302         (prepare_eh_type): Split out type canonicalizations ...
1303         (build_eh_type_type): ... from here.
1304         (build_eh_type_type_ref): Remove.
1305         (mark_all_runtime_matches): Remove.
1306         (build_exc_ptr): New.
1307         (do_begin_catch, do_end_catch): New.
1308         (do_pop_exception): Remove.
1309         (build_terminate_handler): Remove.
1310         (choose_personality_routine): Split out language choice from ...
1311         (initialize_handler_parm): ... here.
1312         Use MUST_NOT_THROW_EXPR.
1313         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
1314         exception object handling.
1315         (expand_start_eh_spec, expand_end_eh_spec): Remove.
1316         (expand_exception_blocks, alloc_eh_object): Remove.
1317         (begin_eh_spec_block, finish_eh_spec_block): New.
1318         (do_allocate_exception, do_free_exception): New.
1319         (expand_throw): Merge into ...
1320         (build_throw): ... here.  Update for abi.
1321         * expr.c (cplus_expand_expr): No expand_internal_throw.
1322         Handle MUST_NOT_THROW_EXPR.
1323         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
1324         * semantics.c (*) Update for except.h name changes.
1325         (genrtl_try_block): No protect_with_terminate.
1326         (genrtl_eh_spec_block): New.
1327         (genrtl_handler): Don't emit the goto here.
1328         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
1329         (genrtl_finish_function): Don't expand_exception_blocks.
1330         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
1331
1332 2001-03-28  Richard Henderson  <rth@redhat.com>
1333
1334         * decl.c (struct named_label_list): Rename eh_region to
1335         in_try_scope, add in_catch_scope.
1336         (struct binding_level): Rename eh_region to is_try_scope,
1337         add is_catch_scope.
1338         (note_level_for_try): Rename from note_level_for_eh.
1339         (note_level_for_catch): New.
1340         (poplevel): Copy both is_try_scope and is_catch_scope to
1341         the named_label_list struct.
1342         (check_previous_goto_1): Don't check for catch block via
1343         DECL_ARTIFICIAL; use in_try_scope instead.
1344         (check_goto): Likewise.
1345         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
1346         * except.c (expand_start_catch_block): Call note_level_for_catch.
1347         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
1348
1349 2001-03-27  Richard Henderson  <rth@redhat.com>
1350
1351         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
1352         exceptions_via_longjmp.
1353
1354 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
1355
1356         * pt.c (check_default_tmpl_args):  Make error messages clearer.
1357
1358 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
1359
1360         * error.c:  Also undefine 'A' macro used for cp_printers definition.
1361
1362 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1363
1364         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
1365
1366 2001-03-26  Mike Yang <yang@research.att.com>
1367             Mark Mitchell  <mark@codesourcery.com>
1368
1369         * dump.c (dump_access): New function.
1370         (cp_dump_tree): Use it.  Dump basetype information for class
1371         types.
1372
1373 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
1374
1375         * Makefile.in (optimize.o): Depend on params.h.
1376         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
1377         (init_decl_processing): Set flag_no_inline when doing
1378         inlining-on-trees.
1379         * optimize.c: Include params.h.
1380         (struct inline_data): Improve documentation of FNS.  Add
1381         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
1382         (INSNS_PER_STMT): New macro.
1383         (remap_block): Use CLONING_P.
1384         (inlinable_function_p): Don't inline big functions.
1385         (expand_call_inline): Keep track of how much inlining we've done.
1386         (optimize_function): Set FIRST_INLINED_FN.
1387         (maybe_clone_body): Set CLONING_P.
1388         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
1389         tree nodes.
1390         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
1391         rest_of_compilation.  Clear DECL_RTL for local variables
1392         afterwards.
1393         (clear_decl_rtl): New function.
1394
1395 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
1396
1397         Implement DR 209
1398         * cp-tree.h (skip_type_access_control,
1399         reset_type_access_control): Prototype.
1400         * decl.c (grokdeclarator): Access of friends is not checked.
1401         * parse.y (component_decl_list): Reset type access control.
1402         * semantics.c (decl_type_access_control): Clear
1403         current_type_lookups.
1404         (save_type_access_control): Don't save if not deferring.
1405         (skip_type_access_control, reset_type_access_control): New
1406         functions.
1407         (begin_class_definition): Do type access control for basetypes.
1408         Start deferred access control.
1409         (finish_class_definition): Resume immediate access control if
1410         this is a local class.
1411
1412 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1413
1414         * class.c (add_method): Use memcpy/memmove, not bcopy.
1415
1416         * decl.c (duplicate_decls): Likewise.
1417
1418 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
1419
1420         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
1421         not `_'.
1422
1423 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
1424
1425         * decl.c (local_names): Define.
1426         (push_local_name): New.
1427         (grok_reference_init): Return init if initializing static reference
1428         variable with non-constant instead of emitting it.
1429         Move expand_static_init call to cp_finish_decl.
1430         (layout_var_decl): Call push_local_name.
1431         (maybe_commonize_var): Allow inlining functions even if they have
1432         static local variables, use comdat_linkage for them if flag_weak.
1433         (check_initializer): Call obscure_complex_init if
1434         grok_reference_init returned non-zero.
1435         (save_function_data): Clear x_local_names.
1436         (pop_cp_function_context): Free x_local_names.
1437         (mark_inlined_fns): Remove.
1438         (mark_lang_function): Mark x_local_names.
1439         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
1440         Mark inlined_fns as tree, remove call to mark_inlined_fns.
1441         * class.c (alter_access): Ensure DECL_ACCESS is never set if
1442         DECL_DISCRIMINATOR_P.
1443         * cp-tree.h (cp_language_function): Add x_local_names.
1444         (lang_decl_flags): Add discriminator into u2.
1445         (lang_decl_inlined_fns): Remove.
1446         (lang_decl): inlined_fns is now a TREE_VEC.
1447         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
1448         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
1449         TREE_VEC, not a custom structure.
1450         (optimize_function): Likewise.
1451         * mangle.c (discriminator_for_local_entity): Discriminate among
1452         VAR_DECL local entities.
1453         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
1454         is not valid.
1455
1456 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
1457
1458         Add support for Java interface method calls.
1459         * cp-tree.h (struct lang_type): Add java_interface flag.
1460         (TYPE_JAVA_INTERFACE): New macro.
1461         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
1462         by setting TYPE_JAVA_INTERFACE.
1463         * call.c (java_iface_lookup_fn): New static.
1464         (build_over_call): If calling a method declared in a
1465         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
1466         expression which resolves the function address.
1467         (build_java_interface_fn_ref): New function.
1468
1469 2001-03-22  Richard Henderson  <rth@redhat.com>
1470
1471         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
1472         * except.c: Don't include it.
1473
1474 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
1475             based on an idea from Joe Buck <jbuck@synopsys.com>
1476
1477         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
1478         New nonterminals.
1479         (data_def, component_decl): Add reductions to bad_decl.
1480
1481 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
1482
1483         * method.c (do_build_assign_ref): Don't use build_modify_expr for
1484         anonymous aggregates, since they don't have assignment operator
1485         method.
1486         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
1487         assignment operators for anonymous structure fields.
1488
1489 2001-03-21  Jason Merrill  <jason@redhat.com>
1490
1491         * pt.c (instantiate_decl): Abort if we see a member constant
1492         instantiation that doesn't already have its initializer.
1493         Downgrade explicit instantiation without definition to pedwarn.
1494
1495         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
1496         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
1497         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
1498
1499         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
1500         (pending_vtables): Remove.
1501         * decl2.c (pending_vtables): Remove.
1502         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
1503         CLASSTYPE_VTABLE_NEEDS_WRITING.
1504         (import_export_class): Likewise.
1505         (init_decl2): Don't mark pending_vtables.
1506         * lex.c (handle_pragma_vtable): Just sorry.
1507         * pt.c (instantiate_class_template): Don't mess with
1508         CLASSTYPE_VTABLE_NEEDS_WRITING.
1509         (mark_class_instantiated): Likewise.
1510         * ptree.c (print_lang_type): Don't print it.
1511         * semantics.c (begin_class_definition): Don't set it.
1512
1513         * pt.c (template_tail): Replace with last_pending_template.
1514         (maybe_templates, maybe_template_tail): Remove.
1515         (add_pending_template): Adjust.
1516         (instantiate_pending_templates): Adjust.
1517
1518         * cp-tree.h (struct saved_scope): Remove lang_stack field.
1519         (current_lang_stack): Remove.
1520         * decl.c (maybe_push_to_top_level): Don't initialize it.
1521         (duplicate_decls): Use current_lang_depth.
1522         (xref_basetypes): Likewise.
1523         * class.c (current_lang_depth): New fn.
1524         (push_lang_context): Use more varray functionality.
1525         (pop_lang_context): Likewise.
1526
1527         * error.c (GLOBAL_THING): Always use '__'.
1528
1529 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
1530
1531         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
1532
1533         * mangle.c (mangle_decl_string): Mangle the names of overloaded
1534         operators, even when they have `extern "C"' linkage.
1535
1536 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
1537
1538         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
1539         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
1540         where it's not necessary.
1541         (add_method): Remove optimization involving comparison of
1542         DECL_ASSEMBLER_NAME.
1543         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
1544         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
1545         where it's not necessary.
1546         (check_methods): Likewise.
1547         (build_clone): Likewise.
1548         (built_vtt): Likewise.
1549         * cp-tree.h (DECL_NEEDED_P): Likewise.
1550         * decl.c (pushtag): Likewise.
1551         (duplicate_decls): Likewise.
1552         (pushdecl): Likewise.
1553         (builtin_function): Likewise.
1554         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
1555         (build_cp_library_fn): Likewise.
1556         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
1557         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
1558         where it's not necessary.
1559         (make_rtl_for_nonlocal_decl): Likewise.
1560         (cp_finish_decl): Likewise.
1561         (grokfndecl): Likewise.
1562         (grokvardecl): Likewise.
1563         (grokdeclarator): Likewise.
1564         (start_function): Likewise.
1565         (cp_missing_return_ok_p): Likewise.
1566         * decl2.c (grokclassfn): Likewise.
1567         (check_classfn): Likewise.
1568         (finish_static_data_member_decl): Likewise.
1569         (grokfield): Likewise.
1570         * error.c (GLOBAL_IORD_P): Remove.
1571         (dump_global_iord): Improve output.
1572         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
1573         * except.c (nothrow_libfn_p): Summarily reject any function not in
1574         namespace-scope.
1575         * init.c (build_java_class_ref): Don't explicitly set
1576         DECL_ASSEMBLER_NAME after calling mangle_decl.
1577         * mangle.c (mangle_decl_string): Handle extern "C" functions.
1578         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
1579         * method.c (set_mangled_name_for_decl): Don't explicitly set
1580         DECL_ASSEMBLER_NAME after calling mangle_decl.
1581         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
1582         IDENTIFIER_GLOBAL_VALUE for the thunk.
1583         * pt.c (set_mangled_name_for_template_decl): Remove.
1584         (check_explicit_specialization): Don't use it.
1585         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
1586         (tsubst_friend_function): Likewise.
1587         (tsubst_decl): Likewise.
1588         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
1589         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
1590         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
1591         where it's not necessary.
1592         (tinfo_base_init): Likewise.
1593         (create_real_tinfo_var): Likewise.
1594         * search.c (looup_field_1): Likewise.
1595         * semantics.c (finish_named_return_value): Likewise.
1596         * tree.c (init_tree): Set lang_set_decl_assembler_name.
1597
1598 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
1599
1600         Correct semantics restrictions checking in throw-expression.
1601         * except.c (is_admissible_throw_operand): New function.
1602         (build_throw): Use it.
1603
1604 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
1605
1606         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
1607         and its ilk.
1608
1609 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
1610
1611         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
1612         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
1613         * decl.c (duplicate_decls): Likewise.
1614         (builtin_function): Likewise.
1615         (build_library_fn): Likewise.
1616         (build_cp_library_fn): Likewise.
1617         (check_initializer): Likewise.
1618         (cp_finish_decl): Likewise.
1619         * decl2.c (grokfield): Likewise.
1620         (grok_function_init): Remove #if 0'd code.
1621         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
1622         * friend.c (do_friend): Likewise.
1623         * init.c (get_temp_regvar): Likewise.
1624         * method.c (make_thunk): Likewise.
1625         * pt.c (tsubst_friend_function): Likewise.
1626         (tsubst_decl): Likewise.
1627         (regenerate_decl_from_template): Likewise.
1628         * semantics.c (genrtl_named_return_value): Likewise.
1629         (expand_body): Likewise.
1630         (genrtl_finish_function): Likewise.
1631         * tree.c (cp_tree_equal): Likewise.
1632
1633 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
1634
1635         * call.c (convert_like_real): Add extra semantics to INNER
1636         parameter. Don't convert to temporary if a user conversion
1637         gives us an lvalue that we're about to bind to a reference.
1638         Set INNER to indicate pending reference binding on recursive
1639         calls.
1640
1641 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
1642
1643         * cp/lex.c: Delete duplicate pending_lang_change.
1644
1645 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
1646
1647         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
1648         Similarly.
1649         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
1650         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
1651
1652 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
1653
1654         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
1655
1656 2001-03-08  Stan Shebs  <shebs@apple.com>
1657
1658         * cp-tree.h (set_identifier_local_value): Remove unused decl.
1659
1660 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
1661
1662         * spew.c: Remove references to CPP_OSTRING.
1663
1664 2001-03-06  Andrew Haley  <aph@redhat.com>
1665
1666         * typeck.c (convert_arguments): Check that we have an fndecl.
1667
1668 2001-03-05  Andrew Haley  <aph@redhat.com>
1669
1670         * typeck.c (convert_arguments): Don't do ellipsis conversion for
1671         __built_in_constant_p.
1672
1673 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
1674
1675         * typeck.c (build_static_cast): Allow enum to enum conversions
1676         as per DR 128.
1677
1678 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
1679
1680         * class.c (check_field_decls): Pointers to member do not a
1681         non-pod struct make, as per DR 148.
1682
1683 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
1684
1685         * call.c (joust): cp_pedwarn when using gnu extension concerning
1686         worst conversion sequences.
1687
1688 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
1689
1690         * decl.c: Replace all uses of 'boolean' with 'bool'.
1691
1692 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
1693
1694         * lang-specs.h: Add zero initializer for cpp_spec field to
1695         all array elements that need one.  Don't put an #ifdef inside
1696         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
1697         use it.
1698
1699 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
1700
1701         Implement using decls inside template functions.
1702         * decl2.c (validate_nonmember_using_decl): Don't special case
1703         fake_std_node in the global namespace. Don't reject early when
1704         processing a template.
1705         (do_local_using_decl): Add to statement tree. Don't do further
1706         processing when building a template.
1707         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
1708
1709 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
1710
1711         * decl2.c (do_nonmember_using_decl): Don't complain if we find
1712         same function. Do complain about ambiguating extern "C"
1713         declarations.
1714
1715 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
1716
1717         Remove floating point and complex type template constant parms.
1718         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
1719         COMPLEX_TYPE extensions.
1720         (invalid_nontype_parm_type_p): Likewise.
1721
1722 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
1723
1724         * except.c (call_eh_info): Revert "match_function"'s type.
1725
1726 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
1727
1728         Fix ctor vtable vcall offsets.
1729         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
1730         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
1731         (get_matching_base): Remove.
1732         (get_original_base): New function.
1733         (build_vtbl_initializer): Initialize vid.rtti_binfo.
1734         Use a virtual thunk for a ctor vtable with an index
1735         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
1736         primary base within a constructor vtable. Only set
1737         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
1738         when primary base has been lost.
1739         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
1740
1741 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
1742
1743         * call.c (joust): Ensure more_specialized()'s argument length
1744         parameter has correct value for constructors.
1745
1746 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
1747
1748         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
1749
1750         * decl.c (mark_inlined_fns): Prototype.
1751
1752 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
1753
1754         * spew.c (yylex): Correct handling of friends.
1755
1756 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
1757
1758         * mangle.c (write_encoding): Pass write_function_type the
1759         FUNCTION_DECL for the function being encoded.
1760         (write_function_type): Pass it along to write_bare_function_type.
1761         (write_bare_function_type): Pass it along to write_method_parms.
1762         (write_method_parms): Don't mangle the compiler-generated
1763         parameters to a constructor or destructor.
1764
1765 2001-02-22  Andreas Jaeger  <aj@suse.de>
1766
1767         * optimize.c: Include toplev.h for
1768         note_deferral_of_defined_inline_function prototype.
1769
1770 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
1771
1772         * cp-tree.h (struct lang_decl_inlined_fns): New.
1773         (struct lang_decls): Add inlined_fns.
1774         (DECL_INLINED_FNS): New macro.
1775         * optimize.c (struct inline_data): Add inlined_fns.
1776         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
1777         (inlinable_function_p): Likewise, fix typo in comment,
1778         function is not inlinable if it already inlined function currently
1779         being optimized.
1780         (expand_call_inline): Add fn to inlined_fns if neccessary.
1781         (optimize_function): Initialize inlined_fns.
1782         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
1783         * decl.c (mark_inlined_fns): New function.
1784         (lang_mark_tree): Call it.
1785
1786 2001-02-21  Jason Merrill  <jason@redhat.com>
1787
1788         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
1789         (DECL_UNINLINABLE): Move to middle-end.
1790
1791         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
1792         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
1793         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
1794         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
1795         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
1796
1797         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
1798         second parm of op=.
1799
1800 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
1801
1802         * decl2.c (set_decl_namespace): Allow explicit instantiations in
1803         any namespace.
1804
1805 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1806
1807         * optimize.c (expand_call_inline): Don't walk subtrees of type
1808         nodes.
1809
1810 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
1811
1812         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
1813         for a destructor.
1814
1815 2001-02-18  Jason Merrill  <jason@redhat.com>
1816
1817         Do put the VTT parameter in DECL_ARGUMENTS.
1818         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
1819         (current_vtt_parm): New macro.
1820         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
1821         (DECL_HAS_VTT_PARM_P): New macro.
1822         (DECL_VTT_PARM): Remove.
1823         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
1824         * decl.c (duplicate_decls): Only copy the operator code if
1825         appropriate.
1826         (start_function): Set current_vtt_parm.
1827         (lang_mark_tree): Don't mark vtt_parm.
1828         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
1829         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
1830         * class.c (build_clone): Maybe remove the VTT parm.
1831         * optimize.c (maybe_clone_body): Set up the VTT parm.
1832         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
1833         * call.c (build_over_call): Just allow the VTT arg.
1834         * method.c (make_thunk): Don't set DECL_VTT_PARM.
1835         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
1836         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
1837         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
1838         * error.c (dump_function_decl): Likewise.
1839         * call.c (build_user_type_conversion_1, convert_like_real): Abort
1840         if we try to call a constructor with in-charge or VTT parms.
1841         * method.c (skip_artificial_parms_for): New fn.
1842         * call.c (add_function_candidate, build_over_call): Call it.
1843         * call.c (build_new_method_call): Use current_vtt_parm.
1844         * init.c (expand_virtual_init): Likewise.
1845         * class.c (same_signature_p): No longer static.
1846         * cp-tree.h: Declare it.
1847         * search.c (look_for_overrides_r): Use it.
1848
1849 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
1850
1851         * cp-tree.h (new_abi_rtti_p): Remove.
1852         (name_mangling_version): Likewise.
1853         (flag_do_squangling): Likewise.
1854         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
1855         * decl.c (grokfndecl): Likewise.
1856         * decl2.c (name_mangling_version): Remove.
1857         (flag_do_squangling): Likewise.
1858         (lang_f_options): Remove `squangle'.
1859         (unsupported_options): Add `squangle'.
1860         (cxx_decode_option): Issue a warning about uses of
1861         -fname-mangling-version.
1862         (finish_file): Remove old ABI support.
1863         * pt.c (check_explicit_specialization): Likewise.
1864         (tsubst_decl): Likewise.
1865         * rtti.c (init_rtti_processing): Likewise.
1866         (build_headof): Likewise.
1867         (get_tinfo_decl_dynamic): Likewise.
1868         (tinfo_from_decl): Likewise.
1869         (build_dynamic_cast_1): Likewise.
1870         (synthesize_tinfo_var): Likewise.
1871         * init.c (build_new): Allow enumeration types for the array-bounds
1872         in a direct-new-declarator.
1873
1874         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
1875
1876         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
1877         TREE_PROTECTED from the template being specialized.
1878
1879 2001-02-17  Jason Merrill  <jason@redhat.com>
1880
1881         * decl2.c (build_artificial_parm): Set TREE_READONLY.
1882
1883         * decl.c (bad_specifiers): Allow throw specs on things with
1884         pointer-to-function or -member-function type.
1885         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
1886         a pmf.
1887
1888 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
1889
1890         * call.c (check_dtor_name): Handle template names correctly.
1891
1892 2001-02-16  Jason Merrill  <jason@redhat.com>
1893
1894         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
1895         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
1896         * optimize.c (maybe_clone_body): Don't substitute it.
1897         * call.c (build_new_method_call): Check in_chrg instead.
1898         * init.c (expand_virtual_init): Likewise.
1899
1900 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
1901
1902         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
1903         class-type introduces at least a type-name.
1904
1905 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
1906
1907         * call.c (convert_like_real): Create a temporary for non-lvalue.
1908
1909 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
1910
1911         * cp-tree.h: Fix typos in comments.
1912
1913 2001-02-16  Jason Merrill  <jason@redhat.com>
1914
1915         * optimize.c (remap_block): If we're compiling a clone, pass the
1916         new block to insert_block.
1917
1918 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
1919
1920         * semantics.c (finish_asm_stmt): Robustify.
1921
1922 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
1923
1924         * pt.c (push_template_decl_real): Don't remangle the name of a
1925         class template.
1926
1927 2001-02-15  Jim Meyering  <meyering@lucent.com>
1928
1929         * Make-lang.in (c++.install-common): Depend on installdirs.
1930         (c++.install-info): Likewise.
1931         (c++.install-man): Likewise.
1932
1933 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
1934
1935         * typeck2.c (build_m_component_ref): Robustify.
1936
1937 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
1938
1939         * friend.c (do_friend): Don't take the nested [template] class
1940         into account when deciding whether to warn about the friend
1941         function not referring to a template function.
1942
1943 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
1944
1945         * typeck.c (build_unary_op): Clarify error message.
1946
1947 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
1948
1949         * parse.y (component_constructor_declarator): allow optional
1950         parentheses around constructor class name.
1951
1952 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1953
1954         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
1955         section.
1956         * init.c (emit_base_init): Remove incorrect comment about
1957         virtual bases.
1958         * method.c (make_thunk): Fix comment alignment.
1959
1960 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1961
1962         Kill remnants of this is variable.
1963         * cp-tree.h (flag_this_is_variable): Remove.
1964         * decl2.c (flag_this_is_variable): Remove.
1965         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
1966         (build_vbase_path): The path is non-static, even in a cdtor.
1967         (resolves_to_fixed_type_p): Add additional return value.
1968         * search.c (init_vbase_pointers): Adjust.
1969         * tree.c (lvalue_p_1): Adjust.
1970         * typeck.c (mark_addressable): Adjust.
1971
1972 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1973
1974         * pt.c (unify): Don't check cv quals of array types.
1975
1976 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1977
1978         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
1979         check whether we already have the type.
1980
1981 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
1982
1983         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
1984         * call.c (build_op_delete_call): Simplify to remove duplicate
1985         code.
1986         * class.c (clone_function_decl): Don't build the deleting variant
1987         of a non-virtual destructor.
1988         * decl.c (finish_destructor_body): Don't call delete if this is a
1989         non-virtual destructor.
1990         * init.c (build_delete): Explicitly call `operator delete' when
1991         deleting an object with a non-virtual destructor.
1992
1993 2001-02-13  Jason Merrill  <jason@redhat.com>
1994
1995         * lang-specs.h: Add more __EXCEPTIONS.
1996
1997 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
1998
1999         * typeck2.c (process_init_constructor): Check
2000         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
2001
2002 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
2003
2004         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
2005         Remove spurious information in comment. Allow further
2006         adjustments of REFERENCE_TYPE args.
2007
2008 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
2009
2010         * errfn.c (cp_deprecated): Tweak diagnostic text.
2011         * parse.y (new_initializer): Deprecate initializer lists
2012         extension.
2013
2014 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
2015
2016         Remove old ABI support.
2017
2018 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
2019
2020         * decl2.c (flag_vtable_thunks): Always set it to 1.
2021         (flag_new_abi): Likewise.
2022         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
2023
2024         * Makefile.in (g++spec.o): Fix typo.
2025
2026 2001-02-09  Jason Merrill  <jason@redhat.com>
2027
2028         * lang-specs.h: Restore definition of __EXCEPTIONS.
2029
2030 2001-02-08  Jason Merrill  <jason@redhat.com>
2031
2032         * search.c (shared_member_p): New function.
2033         (lookup_field_r): Use it.
2034         * cp-tree.h (SHARED_MEMBER_P): Remove.
2035
2036         * method.c (process_overload_item): Handle template-dependent array
2037         bounds.
2038         * pt.c (type_unification_real): If we end up with undeduced nontype
2039         parms, try again.
2040
2041         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
2042         types.
2043
2044         * typeck2.c (friendly_abort): Don't say anything if we have
2045         earlier errors or sorries.
2046
2047         * decl.c (check_tag_decl): Notice attempts to redefine bool and
2048         wchar_t.  Ignore if in_system_header.
2049
2050         * decl.c (maybe_push_cleanup_level): New fn...
2051         (start_decl_1): ...split out from here.
2052         * cvt.c (build_up_reference): Use it.
2053         * cp-tree.h: Declare it.
2054
2055 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
2056
2057         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
2058         spec.
2059
2060 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
2061
2062         * pt.c (lookup_template_class): Make sure it's a primary
2063         template or template_template_parm when called from the parser.
2064         (instantiate_template_class): Add assertion.
2065
2066 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
2067
2068         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
2069         from error_mark_node.
2070
2071 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
2072
2073         Fix specification and implementation bugs in V3 ABI
2074         construction vtables.
2075         * cp-tree.h (flag_dump_class_layout): New flag.
2076         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
2077         (BINFO_LOST_PRIMARY_P): New flag.
2078         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
2079         (BINFO_PRIMARY_MARKED_P): Rename to ...
2080         (BINFO_PRIMARY_P): ... here.
2081         (binfo_via_virtual): New prototype.
2082         * decl2.c (flag_dump_class_layout): New flag.
2083         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
2084         use `=' as a file name separator.
2085         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
2086         bases.
2087         (build_vtbl_address): If this is a virtual primary base, then
2088         get the vtbl of what it is ultimately primary for.
2089         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
2090         for BINFO_PRIMARY_P.
2091         (dfs_skip_nonprimary_vbases_markedp): Likewise.
2092         (get_shared_vbase_if_not_primary): Likewise.
2093         (dfs_get_pure_virtuals): Likewise.
2094         (expand_upcast_fixups): Likewise.
2095         (fixup_virtual_upcast_offsets): Likewise.
2096         (dfs_find_vbase_instance): Likewise.
2097         (find_vbase_instance): Likewise.
2098         (binfo_from_vbase): Adjust comment to reflect reality.
2099         (binfo_via_virtual): New function.
2100         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
2101         for binfo walking during VTT construction.
2102         (dfs_mark_primary_bases): Remove.
2103         (force_canonical_binfo_r): New function.
2104         (force_canonical_binfo): New function.
2105         (mark_primary_virtual_base): New function.
2106         (mark_primary_bases): Walk in inheritance graph order, use
2107         mark_primary_virtual_base.
2108         (determine_primary_base): Use some more intermediate variables.
2109         (dfs_find_final_overrider): Don't check for overriding along a
2110         virtual path.
2111         (dfs_modify_vtables): Walk into primary virtual bases too.
2112         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
2113         (build_base_fields): Likewise.
2114         (dfs_set_offset_for_unshared_vbases): Likewise.
2115         (layout_virtual_bases): Likewise.
2116         (end_of_class): Likewise.
2117         (finish_struct_1): Call dump_class_hierarchy, if requested.
2118         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
2119         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
2120         (dump_class_hierarchy): Add file parameter. Append to file, if
2121         required.
2122         (finish_vtbls): Adjust accumulate_vtbl_inits call.
2123         Use canonical base for virtual bases.
2124         (build_vtt): Add more comments. Adjust build_vtt_inits call.
2125         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
2126         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
2127         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
2128         virtual VTTs.
2129         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
2130         from DATA.  We want virtual primary bases and all bases via virtual.
2131         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
2132         virtual base when not a construction vtable.
2133         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
2134         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
2135         Use canonical bases when processing virtual bases.
2136         (accumulate_vtbl_inits): We're interested in any base via a
2137         virtual path.
2138         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
2139         within a construction vtable, determine what is being overridden.
2140         (build_vtbl_initializer): Add more comments
2141         (add_vcall_offset_vtbl_entries_1): Adjust comment.
2142         (build_rtti_vtbl_entries): Check if the base has lost its
2143         primary.
2144
2145 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
2146
2147         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
2148
2149 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2150
2151         * decl.c (pushdecl): Call abort instead of fatal.
2152         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
2153         * init.c (build_new_1): Likewise.
2154         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
2155         * decl.c (build_typename_type): hash_table_init now returns void.
2156         decl.c (init_decl_processing): Make an error non-fatal.
2157
2158 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
2159
2160         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
2161         Document.
2162         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
2163         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
2164         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2165         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
2166         * decl.c (maybe_commonize_var): Use the new name-mangling where
2167         appropriate.
2168         * decl2.c (comdat_linkage): Enhance comments.  Make all
2169         compiler-generated things static, if COMDAT is not available.
2170         (get_tinfo_decl): Do not make typeinfo objects that belong in the
2171         library COMDAT.
2172         (tinfo_base_init): Use the correct mangled name for typeinfo
2173         strings, and push them into the global scope.
2174         (typeinfo_in_lib_p): New function.
2175         (synthesize_tinfo_var): Use it.
2176         (create_real_tinfo_var): Likewise.
2177
2178 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
2179
2180         * decl.c (push_class_binding): Use context_for_name_lookup instead
2181         of CP_DECL_CONTEXT.
2182         * search.c (context_for_name_lookup): Remove static.  Check for NULL
2183         context in the loop.
2184         * cp-tree.h (context_for_name_lookup): Add prototype.
2185
2186 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
2187
2188         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
2189         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
2190         Remove.
2191         * call.c (convert_class_to_reference, build_user_type_conversion_1,
2192         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
2193
2194 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
2195
2196         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
2197         of macros used when compiling g++spec.c.
2198         * g++spec.c (lang_specific_driver): Link with the shared
2199         libgcc by default.
2200
2201 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
2202
2203         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
2204         make_reference_declarator, make_call_declarator), method.c
2205         (implicitly_declare_fn), parse.y (namespace_using_decl,
2206         notype_unqualified_id, expr_or_declarator, new_type_id,
2207         after_type_declarator, direct_after_type_declarator,
2208         notype_declarator, complex_notype_declarator,
2209         complex_direct_notype_declarator, qualified_id,
2210         notype_qualified_id, overqualified_id, direct_new_declarator,
2211         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
2212         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
2213         instead of build_parse_node.
2214
2215 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2216
2217         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
2218         (minus_one_node): Moved to top level gcc directory.  Renamed
2219         to integer_minus_one_node.
2220
2221         * init.c (init_init_processing): Don't set minus_one_node.
2222         (build_vec_init): Use integer_minus_one_node.
2223
2224         * rtti.c (get_tinfo_decl_dynamic): Likewise.
2225
2226 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
2227
2228         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
2229         identical and they would be replaced with constant, remove
2230         MODIFY_EXPR from the tree.
2231
2232 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2233
2234         * Make-lang.in: Remove all dependencies on defaults.h.
2235         * call.c: Don't include defaults.h.
2236         * decl.c: Likewise.
2237         * decl2.c: Likewise.
2238         * except.c: Likewise.
2239         * pt.c: Likewise.
2240         * rtti.c: Likewise.
2241         * tree.c: Likewise.
2242         * typeck.c: Likewise.
2243
2244 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
2245
2246         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
2247         operators even in "C" linkage.
2248         * method.c (set_mangled_name_for_decl): Likewise.
2249         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
2250         overloaded operators in "C" linkage.
2251
2252 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
2253
2254         * pt.c (tsubst_decl): Remove IN_DECL parameter.
2255         (tsubst_arg_types): Check parameter is not void.
2256         (tsubst): Adjust tsubst_decl call.
2257
2258 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
2259
2260         * call.c (add_builtin_candidate): Quote std properly, from
2261         previous change.
2262
2263 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2264
2265         * pt.c (check_explicit_specialization): Clone constructors and
2266         destructors.
2267
2268 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
2269
2270         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
2271         indicates anything special about template depth. Make sure we
2272         only count the user visible template classes.
2273
2274 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
2275
2276         * call.c (build_conv): Typo in comment.
2277         (add_builtin_candidate): Add more explanation.
2278         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
2279         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
2280         when we have enumeral types.
2281         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
2282         candidates for relops and eqops.
2283         (joust): Simplify control flow. Allow a non-template user
2284         function to hide a builtin.
2285
2286 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
2287
2288         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
2289         (more_specialized): Add deduction parameter.
2290         * call.c (joust): Adjust more_specialized call.
2291         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
2292         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
2293         (get_bindings_order): Remove.
2294         (get_bindings_real): Add DEDUCE parameter.
2295         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
2296         REFERENCE_TYPE jig for DEDUCE_ORDER.
2297         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
2298         maybe_adjust_types_for_deduction.
2299         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
2300         directly.
2301         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
2302         (check_cv_quals_for_unify): Use new unify qualifier flags.
2303         (unify): Clear new unify qualifier flags.
2304         (get_bindings_real): Add DEDUCE parameter.
2305         (get_bindings): Adjust call to get_bindings_real.
2306         (get_bindings_overload): Likewise.
2307         (most_specialized_instantiation): Adjust call to
2308         more_specialized.
2309
2310 2001-01-19  Jason Merrill  <jason@redhat.com>
2311
2312         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
2313
2314         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
2315         -fnew-abi.
2316
2317 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
2318
2319         * decl2.c (arg_assoc_class): Fix double iteration logic.
2320
2321 2001-01-19  Jason Merrill  <jason@redhat.com>
2322
2323         * init.c (build_delete): Always call convert_force to strip cv-quals.
2324
2325         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
2326         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
2327         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
2328
2329 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
2330
2331         * search.c (get_vbase_1): Count only virtual bases.
2332
2333 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
2334
2335         * class.c (duplicate_tag_error): Robustify flag clearing.
2336
2337 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
2338
2339         * cp-tree.h (lookup_template_class): Add complain parm.
2340         * decl.c (lookup_namespace_name): Adjust call to
2341         lookup_template_class.
2342         (make_typename_type): Likewise.
2343         * semantics.c (finish_template_type): Likewise.
2344         * pt.c (lookup_template_class): Add complain parm. Adjust.
2345         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
2346         (tsubst): Likewise.
2347
2348 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
2349
2350         * pt.c (copy_default_args_to_explicit_spec): Preserve
2351         object's CV quals. Reorganize.
2352
2353 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
2354
2355         * typeck.c (build_modify_expr): Say `initialization' for
2356         INIT_EXPRs.
2357         * init.c (build_default_init): Convert to enumeral type, if
2358         needed.
2359
2360 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
2361
2362         * parse.y (nomods_initdcl0): Properly set things up for
2363         initdcl0_innards.
2364
2365 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
2366
2367         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
2368         (type_unification_real): Set it.
2369         (unify): Use it.
2370
2371 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
2372
2373         * decl.c (finish_destructor_body): Convert to vbase pointer here.
2374
2375 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
2376
2377         * semantics.c (begin_class_definition): Check we're not inside a
2378         template parm list.
2379
2380 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
2381
2382         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
2383         BASELINK_P.
2384
2385 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2386
2387         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
2388         * call.c (build_over_call): Add comment.
2389
2390 2001-01-16 Daniel Berlin <dberlin@redhat.com>
2391
2392         * cvt.c (ocp_convert): Handle vector type conversion
2393         * typeck2.c (digest_init): Handle vector type initializations
2394
2395 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
2396
2397         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
2398           was given.
2399
2400 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
2401
2402         * pt.c (check_nontype_parm): Rename to ...
2403         (invalid_nontype_parm_type_p): ... here.
2404         (process_template_parm): Adjust.
2405         (convert_template_argument): Adjust.
2406
2407 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
2408
2409         * pt.c (check_nontype_parm): New function.
2410         (process_template_parm): Use it.
2411         (convert_template_argument): Use it.
2412         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
2413         member.
2414
2415 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
2416
2417         * tree.c: Add defaults.h
2418         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
2419         * Make-lang.in (cp/tree.o): Add defaults.h.
2420
2421 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
2422
2423         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
2424
2425 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
2426
2427         * g++.1: Change to be ".so man1/gcc.1".
2428
2429 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
2430
2431         * Make-lang.in (c++.info, c++.install-info): Build and install g++
2432         internals info.
2433         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
2434         ($(srcdir)/cp/g++int.info): New target.
2435         * gxxint.texi: Add info directory entry.  Use @@ in email address.
2436         * .cvsignore: Update.
2437
2438 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
2439
2440         * typeck.c (build_c_cast): Do template processing earlier.
2441         Always pedwarn on array casts.
2442
2443 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
2444
2445         * friend.c (make_friend_class): Make sure a templated class is
2446         actually a template.
2447
2448 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
2449
2450         * decl2.c (get_guard): Set linkage from guarded decl.
2451
2452 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
2453
2454         * call.c (convert_default_arg): Check for unprocessed
2455         DEFAULT_ARG.
2456         * cp-tree.h (replace_defarg): Move to spew.c.
2457         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
2458         spew.c, which is where they really are.
2459         (done_pending_defargs): Declare.
2460         (unprocessed_defarg_fn): Declare.
2461         * decl.c (replace_defarg): Move to spew.c
2462         * parse.y (structsp): Call done_pending_defargs.
2463         * spew.c (defarg_fns): Rearrange list structure.
2464         (defarg_fnsdone): New static variable.
2465         (defarg_depfns): New static variable.
2466         (init_spew): Adjust.
2467         (add_defarg_fn): Store the type in TREE_TYPE.
2468         (do_pending_defargs): Detect and deal with ordering constraints
2469         and circularity.
2470         (done_pending_defargs): New function.
2471         (unprocessed_defarg_fn): New function.
2472         (replace_defarg): Moved from decl.c. Robustify. Don't save
2473         if circularity detected.
2474
2475 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
2476
2477         * pt.c (unify): Check array has a domain, before checking
2478         whether it is variable sized.
2479
2480 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
2481
2482         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
2483         parameters with pointers to arrays of unknown bound.
2484
2485 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
2486
2487         * parse.y (template_parm_header, template_spec_header): New
2488         reductions. Split out from ...
2489         (template_header): ... here. Use them.
2490         (template_template_parm): Use template_parm_header.
2491         * semantics.c (finish_template_template_parm): Add assert.
2492
2493 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
2494
2495         * mangle.c (write_builtin_type): Fix thinko.
2496
2497         * pt.c (copy_default_args_to_explicit_spec_1): New function.
2498         (copy_default_args_to_explicit_spec): Likewise.
2499         (check_explicit_specialization): Use it.
2500
2501         * class.c (finish_struct_1):  Remove last argument in call to
2502         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
2503         * decl.c (builtin_function): Likewise.
2504         (build_cp_library_fn): Likewise.
2505         (check_initializer): Likewise.
2506         (make_rtl_for_nonlocal_decl): Likewise.
2507         (cp_finish_decl): Likewise.
2508         (start_function): Likewise.
2509         * decl2.c (finish_anon_union): Likewise.
2510         * friend.c (do_friend): Likewise.
2511         * init.c (build_java_class_ref): Likewise.
2512         * method.c (make_thunk): Likewise.
2513         * pt.c (tsubst_friend_function): Likewise.
2514         * semantics.c (expand_body): Likewise.
2515
2516 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
2517
2518         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
2519         looking at DECL_CLONED_FUNCTION for non-functions.
2520
2521 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
2522
2523         * error.c (dump_template_parameter): Use parm to determine how
2524         to print default value.
2525
2526 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
2527
2528         * class.c (duplicate_tag_error): Clear more flags.
2529
2530 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
2531
2532         * call.c (build_new_method_call): Use binfo_for_vbase.
2533
2534 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
2535
2536         * cp-tree.h (flag_cond_mismatch): Don't declare.
2537         * decl2.c (flag_cond_mismatch): Don't define.
2538         (lang_f_options): Remove cond-mismatch.
2539         (unsupported_options): Add cond-mismatch.
2540
2541 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
2542
2543         * class.c (handle_using_decl): Reject using of constructor name
2544         of sourcing class. Allow injecting of a method with same name as
2545         nested class. Fixup error messages.
2546
2547 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
2548
2549         * decl2.c (lang_decode_option): Handle -Wformat=2.
2550
2551 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
2552
2553         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
2554         initialized_in_class.
2555         (DECL_DEFINED_IN_CLASS_P): Rename to ...
2556         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
2557         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
2558         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
2559         * pt.c (check_default_tmpl_args): Adjust for
2560         DECL_INITIALIZED_IN_CLASS_P.
2561         (instantiate_class_template): Likewise.
2562         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
2563
2564         * class.c (finish_struct): Constify saved_filename.
2565
2566 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
2567
2568         * class.c (duplicate_tag_error): Adjust diagnostic.
2569         (finish_struct): Locally set location to start of struct.
2570         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
2571
2572 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
2573
2574         * decl.c (struct binding_level): Adjust class_shadowed comments
2575         to reflect reality.
2576         (push_class_level_binding): Ajust comments to reflect reality.
2577         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
2578         Don't set TREE_VALUE on the class_shadowed list.
2579
2580 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2581
2582         * decl2.c (acceptable_java_type): Allow references too.
2583         * init.c (build_java_class_ref): When using the new ABI, search
2584         `class$' and have it mangled with `mangle_decl.'
2585         * mangle.c (write_java_integer_type_codes): New function.
2586         (write_builtin_type): Detect and mangle Java integer and real
2587         types.
2588
2589 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
2590
2591         * decl2.c (grokfield): Don't accept `asm' specifiers for
2592         non-static data members.
2593
2594 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2595
2596         * expr.c (cplus_expand_expr): Don't reset `target'.
2597
2598 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
2599
2600         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
2601
2602 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
2603
2604         * parse.y (template_datadef): Check for error_mark_node.
2605
2606 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
2607
2608         * cp-tree.def (DEFAULT_ARG): Make `x' class.
2609
2610 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
2611
2612         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
2613         (record_builtin_type): Make non-static.
2614         (flag_short_double): Don't declare.
2615         (init_decl_processing): Remove the creation of many tree nodes now
2616         in c_common_nodes_and_builtins.
2617         (build_void_list_node): New function.
2618         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
2619         * cp-tree.h (flag_short_wchar): Don't declare.
2620
2621 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
2622
2623         * call.c (build_conv): Don't use build1 for USER_CONV.
2624         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
2625
2626 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
2627
2628         * lex.c (lang_init): Call c_common_lang_init.
2629
2630 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
2631
2632         * search.c (lookup_fnfields_here): Remove.
2633         (look_for_overrides_r): Use lookup_fnfields_1.
2634         Ignore functions from using declarations.
2635
2636 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
2637
2638         Implement exceptions specifiers for implicit member functions.
2639         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
2640         * method.c (synthesize_exception_spec): New function.
2641         (locate_dtor, locate_ctor, locate_copy): New functions.
2642         (implicitly_declare_fn): Generate the exception spec too.
2643         * search.c (check_final_overrider): Check artificial functions
2644         too.
2645         * typeck2.c (merge_exception_specifiers): New function.
2646
2647 2001-01-03  Jason Merrill  <jason@redhat.com>
2648
2649         * init.c (build_default_init): New fn.
2650         (perform_member_init): Split out from here.
2651         (build_new_1): Use it.  Simplify initialization logic.
2652         (build_vec_init): Take an array, rather than a pointer and maxindex.
2653         Speed up simple initializations.  Don't clean up if we're assigning.
2654         * cp-tree.h: Adjust.
2655         * decl2.c (do_static_initialization): Remove TREE_VEC case.
2656         * parse.y (new_initializer): Return void_zero_node for ().
2657         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
2658         * typeck2.c (digest_init): Only complain about user-written
2659         CONSTRUCTORs.
2660
2661 2000-12-22  Mike Stump  <mrs@wrs.com>
2662
2663         * decl2.c: (max_tinst_depth): Increase to 50.
2664
2665 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
2666
2667         * class.c (invalidate_class_lookup_cache): Zero the
2668         previous_class_values.
2669         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
2670         TREE_INT_CST_HIGH.
2671         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
2672         * decl.c (free_bindings): New variable.
2673         (push_binding): Don't create a new binding if we have one on the
2674         free list.
2675         (pop_binding): Put old bindings on the free list.
2676         (init_decl_processing): Use size_int, not build_int_2.
2677         Register free_bindings as a GC root.
2678         (cp_make_fname_decl): Use size_int, not build_int_2.
2679         (push_inline_template_parms_recursive): Likewise.
2680         (end_template_parm_list): Likewise.
2681         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
2682         (tsubst_template_parms): Use size_int, not build_int_2.
2683         (tsubst): Likewise.
2684         * rtti.c (get_vmi_pseudo_type_info): Likewise.
2685
2686 2001-01-02  Richard Henderson  <rth@redhat.com>
2687
2688         * parse.y (asm): Set ASM_INPUT_P.
2689
2690 2001-01-02  Jason Merrill  <jason@redhat.com>
2691
2692         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
2693         for v3 ABI.
2694
2695         * typeck.c (cp_truthvalue_conversion): New fn.
2696         * cvt.c (ocp_convert): Use it.
2697
2698         * cp-tree.h: Lose c-common.c decls.
2699
2700         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
2701         * cvt.c (convert_to_void): Use type_unknown_p.
2702
2703         * typeck.c (strip_all_pointer_quals): Also strip quals from
2704         pointer-to-member types.
2705
2706         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
2707         parse.y as C.
2708
2709         * call.c (build_new_method_call): Do evaluate the object parameter
2710         when accessing a static member.
2711         * typeck.c (build_component_ref): Likewise.
2712
2713 2001-01-02  Andreas Jaeger  <aj@suse.de>
2714
2715         * decl.c (cp_missing_noreturn_ok_p): New.
2716         (init_decl_processing): Set lang_missing_noreturn_ok_p.
2717
2718 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
2719
2720         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
2721
2722 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
2723
2724         * class.c (pushclass): Remove #if 0'd code.
2725         * cp-tree.h (overload_template_name): Remove.
2726         * decl.c (store_bindings): Simplify.
2727         (pop_from_top_level): Likewise.
2728         * pt.c (overload_template_name): Remove.
2729         (instantiate_decl): Don't call push_to_top_level if it's not
2730         needed.
2731
2732 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
2733
2734         * pt.c (register_local_specialization): Don't return a value.
2735         (lookup_template_class): Use move-to-front heuristic when looking
2736         up template instantiations.
2737         (instantiate_decl): Only push_to_top_level when we're actually
2738         going to instantiate the template.
2739
2740 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
2741
2742         * search.c (binfo_for_vtable): Return least derived class, not
2743         most.  Handle secondary vtables.
2744
2745 2000-12-22  Jason Merrill  <jason@redhat.com>
2746
2747         * pt.c (more_specialized): Don't optimize len==0.
2748         (fn_type_unification): If we're adding the return type, increase len.
2749
2750         * typeck.c (build_binary_op): Fix pmf comparison logic.
2751
2752         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
2753         DECL_STATIC_FUNCTION_P.
2754
2755         * semantics.c (genrtl_finish_function): Don't try to jump to
2756         return_label unless it exists.
2757
2758         In partial ordering for a call, ignore parms for which we don't have
2759         a real argument.
2760         * call.c (joust): Pass len to more_specialized.
2761         (add_template_candidate_real): Strip 'this', pass len.
2762         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
2763         (get_bindings_order): New fn.  Pass len down.
2764         (get_bindings_real): Strip 'this', pass len.
2765         (fn_type_unification): Likewise.
2766         (type_unification_real): Succeed after checking 'len' args.
2767         (most_specialized_instantiation): Lose explicit_args parm.
2768         * class.c (resolve_address_of_overloaded_function): Strip 'this',
2769         pass len.
2770
2771 2000-12-21  Jason Merrill  <jason@redhat.com>
2772
2773         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
2774         DECL_TEMPLATE_RESULT.
2775
2776         * search.c (lookup_field_r): Call lookup_fnfields_1, not
2777         lookup_fnfields_here.
2778
2779         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
2780
2781         * call.c (build_object_call): Also allow conversions that return
2782         reference to pointer to function.
2783         (add_conv_candidate): Handle totype being ref to ptr to fn.
2784         (build_field_call): Also allow members of type reference to function.
2785         Lose support for calling pointer to METHOD_TYPE fields.
2786
2787         * error.c (dump_expr): Handle *_CAST_EXPR.
2788
2789         * typeck2.c (build_scoped_ref): Always convert to the naming class.
2790
2791         * tree.c (break_out_cleanups): Lose.
2792         * cp-tree.h: Remove prototype.
2793         * typeck.c (build_component_ref): Don't break_out_cleanups.
2794         (build_compound_expr): Likewise.
2795         * semantics.c (finish_expr_stmt): Likewise.
2796
2797 2000-12-20  Richard Henderson  <rth@redhat.com>
2798
2799         * cp-tree.h: Update declarations.
2800         * decl.c (finish_case_label): Return the new stmt node.
2801         * semantics.c (finish_goto_stmt): Likewise.
2802         (finish_expr_stmt, finish_return_stmt): Likewise.
2803         (finish_break_stmt, finish_continue_stmt): Likewise.
2804         (finish_asm_stmt): Likewise.
2805         * parse.y (already_scoped_stmt): Set STMT_LINENO.
2806         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
2807         (simple_if, simple_stmt): Return the new stmt node.
2808         (save_lineno): New.
2809
2810 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
2811
2812         * cp-tree.h: Don't declare warn_long_long.
2813
2814 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2815
2816         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
2817         IS_AGGR_TYPE.
2818
2819 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2820
2821         * pt.c (unify): Handle when both ARG and PARM are
2822         BOUND_TEMPLATE_TEMPLATE_PARM.
2823
2824 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2825
2826         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
2827         DECL_TEMPLATE_PARM_P.
2828
2829 2000-12-15  Jason Merrill  <jason@redhat.com>
2830
2831         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
2832
2833         * init.c (build_new_1): Don't strip quals from type.
2834
2835         * decl.c (pushdecl): Don't check for linkage on a non-decl.
2836
2837         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
2838
2839         * call.c (build_new_function_call): Lose space before paren in
2840         error message.
2841         (build_new_method_call): Likewise.
2842
2843         * typeck2.c (build_m_component_ref): Propagate quals from datum.
2844
2845 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2846
2847         * pt.c (check_explicit_specialization): Propagate default
2848         function arguments to explicit specializations.
2849
2850 2000-12-13  DJ Delorie  <dj@redhat.com>
2851
2852         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
2853         and <? operators.
2854
2855 2000-12-08  Jason Merrill  <jason@redhat.com>
2856
2857         * error.c (dump_function_name): Don't let the user see __comp_ctor.
2858
2859         Clean up copy-initialization in overloading code.
2860         * call.c (build_user_type_conversion_1): Die if we are asked to
2861         convert to the same or a base type.
2862         (implicit_conversion): Avoid doing so.  Lose reference binding code.
2863         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
2864         direct-initialization.  Also do direct-init part of copy-init.
2865         (build_user_type_conversion): Don't provide context to convert_like.
2866         * cvt.c (ocp_convert): build_user_type_conversion will now provide
2867         the constructor call for copy-init.
2868
2869         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
2870         instantiation of a member template.
2871         (do_decl_instantiation): Not here.
2872
2873 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
2874
2875         * class.c (check_field_decls): Don't special case anonymous
2876         fields in error messages.
2877         (note_name_declared_in_class): Use %D on diagnostic.
2878
2879         * tree.c (pod_type_p): Use strip_array_types.
2880         (cp_valid_lang_attribute): Likewise.
2881         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
2882         multiple evaluations.
2883         (cp_has_mutable_p): Use strip_array_types.
2884
2885 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
2886
2887         * cp-tree.h (sufficient_parms_p): Declare new function.
2888         * call.c (sufficient_parms_p): New function, broken out of ...
2889         (add_function_candidate): ... here. Use it.
2890         (add_conv_candidate): Use it.
2891         * decl.c (grok_ctor_properties): Use it.
2892
2893 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
2894
2895         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
2896
2897 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
2898
2899         * decl2.c (lang_decode_option): Handle -Wformat-security.
2900
2901 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2902
2903         * pt.c (verify_class_unification): New function.
2904         (get_class_bindings): Use it.
2905         (try_class_unification): Tidy.
2906         (unify): Handle when argument of a template-id is not
2907         template parameter dependent.
2908         (template_args_equal): Handle when TREE_CODE's do not match.
2909
2910 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
2911
2912         * lang-specs.h (c++): When invoking the stand-alone preprocessor
2913         for -save-temps, pass all relevant -Defines to it, and then don't
2914         pass them to cc1plus.
2915
2916 2000-12-05  Will Cohen  <wcohen@redhat.com>
2917
2918         * decl.c (finish_case_label): Cleared
2919         more_cleanups_ok in surrounding function scopes.
2920         (define_label): Likewise.
2921
2922 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
2923
2924         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
2925         (get_matching_virtual): Remove.
2926         (look_for_overrides): Declare new function.
2927         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
2928         DECL_VINDEX here.
2929         * class.c (check_for_override): Move base class iteration code
2930         to look_for_overrides.
2931         * search.c (next_baselink): Remove.
2932         (get_virtuals_named_this): Remove.
2933         (get_virtual_destructor): Remove.
2934         (tree_has_any_destructors_p): Remove.
2935         (struct gvnt_info): Remove.
2936         (check_final_overrider): Remove `virtual' from error messages.
2937         (get_matching_virtuals): Remove. Move functionality to ...
2938         (look_for_overrides): ... here, and ...
2939         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
2940         to be overriding.
2941
2942 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
2943
2944         * typeck.c (get_delta_difference): If via a virtual base,
2945         return zero.
2946         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
2947         adjustment.
2948
2949 2000-12-04  Richard Henderson  <rth@redhat.com>
2950
2951         * error.c (dump_tree): Use output_add_string not OB_PUTS.
2952
2953 2000-12-04  Jason Merrill  <jason@redhat.com>
2954
2955         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
2956         (write_builtin_type): Pass intSI_type_node and the like through
2957         type_for_mode.
2958         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
2959         Pass intSI_type_node and the like through type_for_mode.
2960         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
2961         * pt.c (tsubst, unify): Likewise.
2962         * tree.c (walk_tree): Likewise.
2963         * error.c (dump_type): Likewise.
2964         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
2965
2966         * Make-lang.in: Tweak top comment for emacs.
2967         (cp/TAGS): Restore.
2968
2969         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
2970
2971         * class.c (clone_function_decl): Robustify.
2972
2973 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
2974
2975         * decl.c (store_bindings): Only search in the non modified
2976         old_bindings for duplicates.
2977
2978 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
2979
2980         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
2981         TYPE_POLYMORPHIC_P.
2982
2983         * typeck.c (build_static_cast): Remove unused variable.
2984
2985 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2986
2987         * pt.c: Fix typo in comment.
2988
2989 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
2990
2991         * decl2.c (warn_format): Remove definition.
2992         (lang_decode_option): Handle -Wformat-nonliteral,
2993         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
2994
2995 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
2996
2997         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
2998         (init_decl_processing): Don't create string_type_node,
2999         const_string_type_node, wint_type_node, intmax_type_node,
3000         uintmax_type_node, default_function_type, ptrdiff_type_node and
3001         unsigned_ptrdiff_type_node.  Adjust position of call to
3002         c_common_nodes_and_builtins.
3003         (identifier_global_value): New function.
3004
3005 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
3006
3007         * call.c (standard_conversion): Reject pointer to member
3008         conversions from ambiguous, inaccessible or virtual bases.
3009         * typeck.c (build_static_cast): Don't check pointers to members
3010         specially.
3011
3012 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
3013
3014         * method.c (do_build_copy_constructor): Preserve cv
3015         qualifications when accessing source object members.
3016         (do_build_assign_ref): Likewise. Remove separate diagnostics for
3017         unnamed fields.
3018
3019 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
3020
3021         * method.c (do_build_assign_ref): Construct appropriately
3022         CV-qualified base reference. Don't allow const casts in base
3023         conversion.
3024
3025 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
3026
3027         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
3028         incomplete return type.
3029
3030 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
3031
3032         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
3033         * semantics.c (finish_base_specifier): Accept a _TYPE not a
3034         _DECL.
3035
3036 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
3037
3038         * spew.c (yyerror): Cope if yylval.ttype is NULL.
3039
3040 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
3041
3042         * decl.c (grokdeclarator): Diagnose undefined template contexts.
3043
3044 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
3045
3046         * decl.c (grokdeclarator): Do type access control on friend
3047         class.
3048
3049 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
3050
3051         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
3052         bison parser ickiness.
3053         * pt.c (tsubst_friend_function): Enter namespace scope when
3054         tsubsting the function name.
3055         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
3056
3057 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
3058
3059         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
3060         * cvt.c (cp_convert_to_pointer): Add force parameter.
3061         Allow conversions via virtual base if forced.
3062         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
3063         (ocp_convert): Likewise.
3064         * search.c (binfo_from_vbase): Return the virtual base's binfo.
3065         * typeck.c (get_delta_difference): Adjust handling of virtual
3066         bases.
3067
3068 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
3069
3070         * tree.c (struct list_hash): Remove.
3071         (list_hash_table): Make it be an htab.
3072         (struct list_proxy): New type.
3073         (list_hash_eq): New function.
3074         (list_hash_pieces): Renamed from ...
3075         (list_hash): ... this.
3076         (list_hash_lookup): Remove.
3077         (list_hash_add): Remove.
3078         (hash_tree_cons): Use the generic hashtable.
3079         (mark_list_hash): Remove.
3080         (init_tree): Create the hashtable.
3081
3082 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
3083
3084         * method.c (build_mangled_C9x_name): Rename to
3085         build_mangled_C99_name.  Change C9X references in comments to
3086         refer to C99.
3087
3088 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
3089
3090         * parse.y (unary_expr): Move VA_ARG from here ...
3091         (primary): ... to here.
3092
3093 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
3094
3095         * semantics.c (finish_id_expr): If type is error_mark, return
3096         error_mark.
3097
3098 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
3099
3100         * pt.c (lookup_template_class): Simplify loop exit constructs.
3101         Cope when there is no partial instantiation of a template
3102         template member.
3103
3104 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
3105
3106         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
3107
3108 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
3109
3110         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
3111         prefix.
3112
3113         * pt.c (do_decl_instantiate): Explicitly clone constructors and
3114         destructors that haven't already been cloned.
3115
3116 2000-11-20  Richard Henderson  <rth@redhat.com>
3117
3118         * parse.y (yyparse_1): Rename the parser entry point.
3119
3120 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
3121
3122         * mangle.c (write_name): Use <unscoped-name> for names directly in
3123         function scope.
3124         (write_unscoped_name): Accept names directly in function scope.
3125
3126 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
3127
3128         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
3129         * parse.y (extdef): Add EXPORT reduction.
3130         * spew.c (yylex): Don't skip export here.
3131
3132 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
3133
3134         * decl.c (init_decl_processing): Correct name of pure virtual
3135         function under the new ABI.
3136         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
3137         (throw_bad_typeid): Likewise for bad typeid function.
3138
3139 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
3140
3141         * decl.c (grokparms): Don't even function types of `void' type,
3142         either.
3143         * mangle.c (write_type): Don't crash when confronted with the
3144         error_mark_node.
3145
3146         * decl.c (grokparms): Don't create parameters of `void' type.
3147
3148 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
3149
3150         * lex.c (mark_impl_file_chain): Delete.
3151         (init_parse): Remove call to ggc_add_string_root.  No need to
3152         ggc_strdup a string constant.  Do not add impl_file_chain to GC
3153         roots.
3154         (handle_pragma_implementation): No need to ggc_strdup main_filename.
3155
3156 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
3157
3158         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
3159
3160 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
3161
3162         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
3163         * decl.c (grokdeclarator): Don't reject void parms here.
3164         (require_complete_types_for_parms): Simplify, use
3165         complete_type_or_else.
3166         (grokparms): Remove bitrot. Remove funcdef parm.
3167         Deal with ellipsis parm lists here.
3168         * semantics.c (finish_parmlist): Don't append void_list_node
3169         here. Set PARMLIST_ELLIPSIS_P.
3170
3171 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
3172
3173         * typeck2.c (incomplete_type_error): Reorganise to avoid
3174         excessive diagnostics.
3175
3176 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
3177
3178         * lex.c (struct impl_files, internal_filename): Constify a char *.
3179
3180 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
3181
3182         * mangle.c (write_special_name_constructor): Don't generate
3183         assembler junk when confronted with an old-style constructor.
3184         (write_special_name_destructor): Likewise.
3185         (mangle_decl_string): Do it here instead.
3186
3187 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
3188
3189         * call.c (op_error): Make error messages clearer.
3190
3191 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
3192
3193         * decl.c (wrapup_globals_for_namespace): Don't mark things
3194         TREE_ASM_WRITTEN when they're not.
3195
3196 2000-11-15  Jason Merrill  <jason@redhat.com>
3197
3198         * typeck2.c (friendly_abort): Uncount the error before handing
3199         off to fancy_abort.
3200
3201 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
3202
3203         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
3204
3205 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
3206
3207         * class.c (build_vtbl_initializer): Fix typo in comment.
3208         * typeck.c (expr_sizeof): Don't crash on errors.
3209
3210 2000-11-14  Jim Wilson  <wilson@redhat.com>
3211
3212         * lang-specs.h: Add %2 after %(cc1_options).
3213
3214 2000-11-14  Richard Henderson  <rth@redhat.com>
3215
3216         * typeck.c (c_sizeof): Be strict about casting result value
3217         back to c_size_type_node.
3218         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
3219
3220 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
3221
3222         * typeck.c (build_unary_op): Use boolean_increment from
3223         c-common.c, moving the relevant code there.
3224
3225 2000-11-11  Jason Merrill  <jason@redhat.com>
3226
3227         * typeck.c (mark_addressable): Don't call put_var_into_stack.
3228
3229         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
3230         in inlines.
3231
3232 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3233
3234         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
3235         * lex.c (copy_lang_decl): Likewise.
3236
3237 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
3238
3239         * dump.c (cp_dump_tree): Don't dump function bodies here.
3240
3241         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3242         (dump.o): Update dependency list.
3243         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
3244         (flag_dump_translation_unit): Likewise.
3245         (CP_TYPE_QUALS): Adjust definition.
3246         (DECL_C_BIT_FIELD): Remove.
3247         (SET_DECL_C_BIT_FIELD): Likewise.
3248         (CLEAR_DECL_C_BIT_FIELD): Likewise.
3249         (add_maybe_template): Likewise.
3250         (strip_array_types): Likewise.
3251         (dump_node_to_file): Likewise.
3252         (cp_dump_tree): New function.
3253         * decl.c (init_decl_processing): Set lang_dump_tree.
3254         * decl2.c (flag_dump_translation_unit): Remove.
3255         * dump.c: Move most of it to ../c-dump.c.
3256         (cp_dump_tree): New function.
3257         * pt.c (add_maybe_template): Remove.
3258         * typeck.c (strip_array_types): Likewise.
3259
3260 2000-11-07  Eric Christopher  <echristo@redhat.com>
3261
3262         * decl.c (init_decl_processing): Change definition of
3263         __wchar_t to wchar_t.  Remove artificial declaration of
3264         wchar_t.
3265         * lex.c: Change instances of __wchar_t to wchar_t.
3266
3267 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
3268
3269         * lex.c (do_identifier): Don't lookup_name for operators.
3270         * parse.y (operator): Save looking_for_typename.
3271         (unoperator): Restore it.
3272         * spew.c (frob_opname): Use nth_token for lookahead.
3273
3274 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
3275
3276         * decl.c (grok_op_properties): Always use coerce_new_type and
3277         coerce_delete_type.
3278         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
3279         exception specification. Tidy up.
3280         (coerce_delete_type): Preserve exception specification. Tidy up.
3281
3282 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
3283
3284         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
3285         (push_binding_level), error.c (cp_tree_printer), pt.c
3286         (process_partial_specialization, tsubst_template_arg_vector),
3287         search.c (lookup_member): Use memset () instead of bzero ().
3288
3289 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
3290
3291         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
3292
3293 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
3294
3295         * Make-lang.in (c++.distdir): Remove.
3296
3297 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
3298
3299         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
3300         declarations from different namespaces to be combined.
3301
3302 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
3303
3304         * decl.c: Include tm_p.h.
3305
3306 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
3307
3308         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
3309
3310 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
3311
3312         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
3313         (build_overload_value), repo.c (open_repo_file), xref.c
3314         (open_xref_file): Use strchr () and strrchr () instead of index ()
3315         and rindex ().
3316
3317 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
3318
3319         * call.c (build_over_call): Call fold on the CALL_EXPR.
3320
3321 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
3322
3323         * error.c (dump_template_decl): Separate template hearders with
3324         space not comma.
3325
3326 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
3327
3328         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
3329         TS_* flags with corresponding TFF_*.  Adjust prototypes of
3330         functions (which used to take a tree_string_flags) to take an int.
3331
3332         * cp-tree.h (enum tree_string_flags): Remove
3333         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
3334         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
3335         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
3336         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
3337         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
3338         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
3339         (type_as_string, decl_as_string, expr_as_string,
3340         context_as_string): Adjust prototype.
3341
3342         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
3343         instead of TS_PLAIN.
3344
3345         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
3346         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
3347         plain `0'.
3348
3349 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
3350
3351         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
3352         (linkage_kind): New enumeration.
3353         (decl_linkage): New function.
3354         * decl2.c (comdat_linkage): Extend comment.
3355         * error.c (dump_function_decl): Print the arguments used to
3356         instantiate a template, even when not printing the type of the
3357         function.
3358         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
3359         not TREE_PUBLIC, to test for external linkage.
3360         * tree.c (decl_linkage): New function.
3361
3362 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
3363
3364         * pt.c (instantiate_decl): Always instantiate static data members
3365         initialized in-class.
3366
3367 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
3368
3369         * Make-lang.in: Move all build rules here from Makefile.in,
3370         adapt to new context.  Wrap all rules that change the current
3371         directory in parentheses.  Expunge all references to $(P).
3372         When one command depends on another and they're run all at
3373         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
3374         all object-file generation rules.  Delete obsolete variables.
3375
3376         * Makefile.in: Delete.
3377         * config-lang.in: Delete outputs= line.
3378
3379 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
3380
3381         * error.c (dump_function_decl): Print no space between
3382         `ptr-operator' the `type-specifier' of the return type.
3383         (dump_type_prefix): Make sure we put space at the appropriate
3384         place.
3385
3386 2000-10-23  Jason Merrill  <jason@redhat.com>
3387
3388         * call.c (equal_functions): Also call decls_match for extern "C" fns.
3389
3390 2000-10-22  Jason Merrill  <jason@redhat.com>
3391
3392         * call.c (build_conditional_expr): Use ocp_convert to force
3393         rvalue conversion.
3394
3395 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
3396
3397         * call.c (standard_conversion): Use RVALUE_CONVs for all
3398         expressions that satisfy lvalue_p, not just those that satisfy
3399         real_lvalue_p.
3400
3401         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
3402
3403         * typeck.c (c_sizeof): Return an expression of `size_t' type,
3404         not one with TYPE_IS_SIZETYPE set.
3405         (dubious_conversion_warnings): Remove special-case code.
3406
3407 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
3408
3409         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
3410         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
3411         (dump_type_prefix): Print vector-of-int as 'int vector'.
3412         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
3413         * tree.c (walk_tree): Handle VECTOR_TYPE.
3414
3415         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
3416
3417 2000-10-21  Jason Merrill  <jason@redhat.com>
3418
3419         * parse.y (operator): Set got_object from got_scope.
3420         Set looking_for_typename.
3421         * decl.c (lookup_name_real): Clear val after setting from_obj.
3422         Reorganize diagnostic.
3423
3424 2000-10-20  Jason Merrill  <jason@redhat.com>
3425
3426         * tree.c (walk_tree): Don't walk into default args.
3427
3428         * error.c (dump_expr): Use host_integerp.
3429
3430 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
3431
3432         * typeck2.c (abstract_virtuals_error): Use "because" instead of
3433         "since" in error message.
3434
3435 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3436
3437         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
3438
3439 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
3440
3441         * decl.c (revert_static_member_fn): Fixed typo.
3442
3443 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
3444
3445         * class.c (subobject_offset_fn): New type.
3446         (dfs_record_base_offsets): Remove.
3447         (record_base_offsets): Likewise.
3448         (dfs_search_base_offsets): Likewise.
3449         (record_subobject_offset): New function.
3450         (check_subobject_offset): Likewise.
3451         (walk_subobject_offsets): Likewise.
3452         (record_subobject_offsets): Likewise.
3453         (layout_conflict_p): Reimplement.
3454         (layout_nonempty_base_or_field): Correct handling of type
3455         conflicts during layout.
3456         (layout_empty_base): Likewise.
3457         (build_base_field): Adjust to handle new representation of empty
3458         base offset table.
3459         (build_base_fields): Likewise.
3460         (layout_virtual_bases): Likewise.
3461         (splay_tree_compare_integer_csts): New function.
3462         (layout_class_type): Use a splay_tree, rather than a varray, to
3463         represent the offsets of empty bases.
3464
3465         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
3466         * decl.c (select_decl): Don't return declarations that are
3467         DECL_ANTICIPATED.
3468
3469 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
3470
3471         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
3472         (fake_std_node): New macro.
3473         * decl.c (in_std): Rename to ...
3474         (in_fake_std): ... this.
3475         (flag_no_builtin): Remove.
3476         (flag_no_nonansi_builtin): Likewise.
3477         (walk_namespaces_r): Use fake_std_node.
3478         (push_namespace): Use std_identifier.
3479         (pop_namespace): Use in_fake_std.
3480         (lookup_name_real): Use fake_std_node.
3481         (init_decl_processing): When -fhonor-std, create the `std'
3482         namespace.  Don't create a dummy fake_std_node in that case.
3483         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
3484         (builtin_function): Put builtins whose names don't begin
3485         with `_' in the std namespace.
3486         * decl2.c (flag_no_builtin): Remove.
3487         (flag_no_nonansi_builtin): Likewise.
3488         (set_decl_namespace): Use fake_std_node.
3489         (validate_nonmember_using_decl): Likewise.
3490         (do_using_directive): Likewise.
3491         (handle_class_head): Likewise.
3492         * dump.c (dequeue_and_dump): Likewise.
3493         * except.c (init_exception_processing): Use std_identifier.
3494         * init.c (build_member_call): Use fake_std_node.
3495         * rtti.c (init_rtti_processing): Use std_identifier.
3496
3497 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
3498
3499         * cp-tree.h (back_end_hook): Remove declaration.
3500         * decl2.c (back_end_hook): Remove definition.
3501
3502         * dump.c (dequeue_and_dump): Dump TREE_USED.
3503
3504 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
3505
3506         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
3507
3508 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
3509
3510         * decl.c (WINT_TYPE): Define.
3511         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
3512         c_size_type_node, signed_size_type_node and wint_type_node.
3513
3514 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
3515
3516         * decl2.c (warn_missing_format_attribute): New variable.
3517         (lang_decode_option): Decode -Wmissing-format-attribute.
3518
3519 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
3520
3521         * typeck.c (qualify_type): Remove.
3522         (composite_pointer_type): Fix handling of conversions to `cv void*'.
3523
3524 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3525
3526         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
3527
3528 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3529
3530         * Makefile.in (parse.c, parse.h): Create atomically.
3531
3532 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
3533
3534         * class.c (current_obstack): Remove.
3535         * decl.c (ggc_p): Remove.
3536         (start_decl): Don't use decl_tree_cons.
3537         (grokdeclarator): Don't use build_decl_list.
3538         (start_function): Don't use decl_tree_cons.
3539         (finish_function): Don't mess with obstacks.
3540         * decl2.c (grok_x_components): Don't use build_decl_list.
3541         * lex.c (make_call_declarator): Don't call decl_tree_cons.
3542         (implicitly_declare_fn): Don't call build_decl_list.
3543         * parse.y (frob_specs): Don't call build_decl_list or
3544         decl_tree_cons.
3545         (expr_or_declarator_intern): Don't call decl_tree_cons.
3546         (primary): Don't call build_decl_list.
3547         (fcast_or_absdcl): Likewise.
3548         (typed_declspecs): Don't call decl_tree_cons.
3549         (reserved_declspecs): Don't call build_decl_list.
3550         (declmods): Likewise.
3551         (reserved_typespecquals): Likewise.
3552         (aggr): Likewise.
3553         (new_type_id): Likewise.
3554         (cv_qualifiers): Likewise.
3555         (after_type_declarator_intern): Likewise.
3556         (notype_declarator_intern): Likewise.
3557         (absdcl_intern): Likewise.
3558         (named_parm): Likewise.
3559         * pt.c (most_specialized_class): Likewise.
3560         * repo.c (temporary_obstack): Make it a structure, not a pointer.
3561         (init_repo): Initialize it.
3562         * search.c (current_obstack): Remove.
3563         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
3564
3565 2000-10-09  Richard Henderson  <rth@cygnus.com>
3566
3567         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
3568         (c++ language support bits for libgcc): Remove.
3569         (c++.clean): Remove cplib2.txt cleanup.
3570         * config-lang.in (headers, lib2funcs): Remove.
3571
3572         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
3573         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
3574         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
3575         * inc/new.h, inc/typeinfo: Remove files.
3576
3577 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
3578
3579         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
3580         defined.
3581         (init_decl_processing): Initialize intmax_type_node and
3582         uintmax_type_node.
3583
3584 2000-10-06  Richard Henderson  <rth@cygnus.com>
3585
3586         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
3587         (original_result_rtx): Remove.
3588         * decl.c (save_function_data): Don't clear x_result_rtx.
3589         (mark_lang_function): Don't mark it either.
3590         * expr.c (fixup_result_decl): Remove.
3591         * semantics.c (genrtl_named_return_value): Frob the return decl
3592         before calling emit_local_var.
3593         (genrtl_finish_function): Don't call fixup_result_decl.
3594         Always emit the jump to return_label.
3595
3596 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
3597
3598         * pt.c (lookup_template_class): Set current access for enum.
3599         (tsubst_enum): Set file & line for enum decl.
3600
3601         * spew.c (yylex): Remove unused variable.
3602
3603 2000-10-05  Richard Henderson  <rth@cygnus.com>
3604
3605         * semantics.c (genrtl_finish_function): Don't init or check
3606         can_reach_end; remove noreturn and return value checks.
3607
3608 2000-10-05  Tom Tromey  <tromey@cygnus.com>
3609
3610         * init.c (build_java_class_ref): Use `build_static_name' with a
3611         suffix, not a prefix, to build the class object's name.
3612
3613 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
3614
3615         * cp-tree.h (access_kind): Fix comment typo.
3616         * decl2.c (grokfield): Fix diagnostic typo.
3617         * semantics.c (finish_template_type): Fix comment typo.
3618         (finish_qualified_object_call_expr): Likewise.
3619
3620 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
3621
3622         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
3623         tsubsting fails.
3624
3625 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
3626
3627         * spew.c (frob_id): New static function.
3628         (frob_opname): Use it.
3629         (yylex): Use it.
3630
3631 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
3632
3633         * decl.c (lang_mark_false_label_stack): Remove.
3634         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
3635
3636 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
3637
3638         * gxxint.texi: Use @email for formatting email addresses.
3639
3640 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
3641
3642         * error.c: Remove direct obstack manipulation.  Replace with
3643         output_buffer-based formatting.  Adjust calls to removed macros.
3644         (obstack_chunk_alloc, obstack_chunk_free): Remove.
3645         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
3646         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
3647
3648 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
3649
3650         * ir.texi: Move to ../c-tree.texi.
3651
3652 2000-09-20  Jason Merrill  <jason@redhat.com>
3653
3654         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
3655
3656 2000-09-21  Andreas Jaeger  <aj@suse.de>
3657
3658         * errfn.c: Move declaration of cp_printer and cp_printers to ...
3659         * cp-tree.h: ... here.
3660
3661         * error.c: Remove declaration of cp_printer.
3662
3663 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
3664
3665         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
3666
3667 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
3668
3669         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
3670         users.
3671
3672 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
3673
3674         * decl.c (start_function): Robustify.
3675
3676 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3677
3678         * cp-tree.h (check_function_format): Accept a `status' parameter.
3679
3680         * call.c, typeck.c: Updates calls to `check_function_format'.
3681
3682 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
3683
3684         * decl2.c (handle_class_head): Always push some scope even
3685         in the error case.
3686
3687 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
3688
3689         * cp-tree.h (struct cp_language_function): Remove
3690         x_scope_stmt_stack and name_declared.
3691         (current_scope_stmt_stack): Remove.
3692         (function_name_declared_p): New macro.
3693         (struct lang_decl_flags): Use c_lang_decl as a base class.
3694         (context): Remove.
3695         (struct lang_decl): Replace saved_tree with context.
3696         (DECL_FRIEND_CONTEXT): Adjust accordingly.
3697         (SET_DECL_FRIEND_CONTEXT): Likewise.
3698         (DECL_VIRTUAL_CONTEXT): Likewise.
3699         (DECL_SAVED_TREE): Remove.
3700         (C_DECLARED_LABEL_FLAG): Likewise.
3701         (cplus_expand_expr_stmt): Don't declare.
3702         (add_decl_stmt): Likewise.
3703         (add_scope_stmt): Likewise.
3704         * decl.c (mark_stmt_tree): Remove.
3705         (case_compare): Likewise.
3706         (finish_case_label): Use c_add_case_label.
3707         (init_decl_processing): Set more language-specific hooks.
3708         (build_enumerator): Fix typo in comment.
3709         (cplus_expand_expr_stmt): Remove.
3710         (mark_lang_function): Use mark_c_language_function.
3711         (lang_mark_tree): Use c_mark_lang_decl.
3712         * decl2.c: Change order of inclusion.
3713         * except.c: Likewise.
3714         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
3715         back on c_expand_expr.
3716         * friend.c: Include expr.h.
3717         * init.c: Change order of inclusion.
3718         * Makefile.in: Update dependencies.
3719         * lex.h (free_lang_decl_chain): Remove.
3720         * optimize.c (maybe_clone_body): Use function_name_declared_p.
3721         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
3722         it doesn't exist.
3723         (instantiate_decl): Use function_name_declared_p.
3724         * semantics.c (lang_expand_expr_stmt): Remove.
3725         (set_current_function_name_declared): Likewise.
3726         (current_function_name_declared): Likewise.
3727         (begin_compound_stmt): Use function_name_declared_p.
3728         (add_decl_stmt): Remove.
3729         (setup_vtbl_ptr): Use function_name_declared_p.
3730         (add_scope_stmt): Remove.
3731         (current_scope_stmt_stack): New function.
3732         (cp_expand_stmt): Don't handle SCOPE_STMTs.
3733         (expand_body): Use function_name_declared_p.
3734         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
3735         * typeck.c: Change order of includes.
3736         (convert_sequence): Remove.
3737
3738 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
3739
3740         * lex.c (reswords): Add _Complex.
3741
3742 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3743
3744         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
3745
3746 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
3747
3748         * init.c (begin_init_stmts): Don't use // comments.
3749
3750 2000-09-12  Jason Merrill  <jason@redhat.com>
3751
3752         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
3753         all non-extern arrays.
3754
3755         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
3756         typenames, too.  Downgrade complaint to pedwarn.
3757         (xref_tag): Warn about surprising behavior of 'friend struct T'.
3758         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
3759         'class This::Inherited'.
3760
3761 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
3762
3763         * decl.c (finish_case_label): Given the LABEL_DECL a
3764         DECL_CONTEXT.
3765
3766 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
3767
3768         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
3769         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
3770         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
3771         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
3772         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
3773         New macros.
3774         (sorry_for_unsupported_tree, print_scope_operator,
3775         print_left_paren, print_right_paren, print_left_bracket,
3776         print_right_bracket, print_whitespace): Likewise.
3777         (aggr_variety): Rename to class_key_or_enum.
3778         (print_type): Rename to print_type_id.
3779         (print_type_specifier_seq, print_simple_type_specifier,
3780         print_elaborated_type_specifier,
3781         print_rest_of_abstract_declarator,
3782         print_parameter_declaration_clause, print_exception_specification,
3783         print_nested_name_specifier, print_template_id,
3784         typedef_original_name,  print_template_argument_list_start,
3785         print_template_argument_list_end): New functions.
3786
3787 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
3788
3789         * ir.texi: Add more documentation.
3790
3791 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
3792
3793         * cp-tree.h (struct saved_scope): Remove x_function_parms.
3794         (current_function_parms): Don't define.
3795         (struct cp_language_function): Remove parms_stored.
3796         (current_function_just_assigned_this): Don't define.
3797         (current_function_parms_stored): Likewise.
3798         (static_ctors): Declare.
3799         (static_dtors): Likewise.
3800         (SF_EXPAND): Don't define.
3801         (expand_start_early_try_stmts): Remove declaration.
3802         (store_parm_decls): Likewise.
3803         * decl.c (static_ctors): Don't declare.
3804         (static_dtors): Likewise.
3805         (struct binding_level): Remove this_block.
3806         (poplevel): Remove dead code.
3807         (set_block): Likewise.
3808         (mark_binding_level): Don't mark this_block.
3809         (mark_saved_scope): Don't mark x_function_parms.
3810         (init_decl_processing): Don't add current_function_parms as a GC
3811         root.
3812         (check_function_type): Change prototype.
3813         (start_function): Remove RTL-generation code.
3814         (expand_start_early_try_stmts): Remove.
3815         (store_parm_decls): Give it internal linkage.  Remove
3816         RTL-generation code.
3817         (finish_function): Remove RTL-generation code.
3818         * decl2.c (static_ctors): Fix formatting.
3819         (static_dtors): Likewise.
3820         * method.c (use_thunk): Don't call store_parm_decls.
3821         (synthesize_method): Likewise.
3822         * optimize.c (maybe_clone_body): Likewise.
3823         * parse.y (fn.def2): Likewise.
3824         (.set_base_init): Likewise.
3825         (nodecls): Likewise.
3826         * pt.c (instantiate_decl): Likewise.
3827         * rtti.c (synthesize_tinfo_fn): Likewise.
3828         * semantics.c (genrtl_try_block): Simplify.
3829         (expand_body): Use genrtl_start_function and
3830         genrtl_finish_function.
3831         (genrtl_start_function): New function.
3832         (genrtl_finish_function): Likewise.
3833
3834 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
3835
3836         * error.c (cp_tree_printer, case 'P'): Append break.
3837
3838 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
3839
3840         * cp-tree.h (frob_opname): Declare.
3841         * parse.y (saved_scopes): New static variable.
3842         (cp_parse_init): Adjust.
3843         (do_id): If lastiddecl is NULL, do do_identifier.
3844         (operator): Save scope information.
3845         (unoperator): New reduction. Restore scope information.
3846         (operator_name): Append unoperator. Call frob_opname.
3847         * spew.c (frob_opname): Define.
3848
3849 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
3850
3851         * decl.c, rtti.c: Include defaults.h if not already included.
3852         Don't define the *_TYPE_SIZE macros.
3853
3854 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
3855
3856         * cp-tree.h (push_switch): Change prototype.
3857         (check_cp_case_value): Remove declaration.
3858         (decl_constant_value): Likewise.
3859         * decl.c (struct cp_switch): Add switch_stmt and cases.
3860         (case_compare): New function.
3861         (push_switch): Set switch_stmt.  Initialize cases.
3862         (pop_switch): Clean up cases.
3863         (define_case_label): Rename to ...
3864         (finish_case_label): ... this.  Do semantic analysis for case
3865         labels here.
3866         (start_function): Correct comment.
3867         * decl2.c (check_cp_case_value): Remove.
3868         * expr.c (do_case): Remove.
3869         * pt.c (tsubst_expr): Adjust call to finish_case_label.
3870         * semantics.c (genrtl_do_poplevel): Remove declaration.
3871         (RECHAIN_STMTS): Remove.
3872         (finish_break_stmt): Use build_break_stmt.
3873         (finish_continue_stmt): Use build_continue_stmt.
3874         (finish_switch_cond): Adjust condition here, rater than in
3875         c_expand_start_case.
3876         (finish_case_label): Remove.
3877         * typeck.c (c_expand_return): Remove.
3878         (c_expand_start_case): Likewise.
3879
3880 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
3881
3882         * ir.texi: Document type nodes.
3883
3884 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
3885
3886         * cp-tree.h (init_cp_semantics): Declare.
3887         (genrtl_try_block): Don't declare.
3888         (genrtl_handler): Likewise.
3889         (genrtl_catch_block): Likewise.
3890         (genrtl_ctor_stmt): Likewise.
3891         (genrtl_subobject): Likewise.
3892         (genrtl_do_poplevel): Likewise.
3893         (genrtl_named_return_value): Likewise.
3894         * lex.c (init_parse): Call init_cp_semantics.
3895         * semantics.c (genrtl_try_block): Give it internal linkage.
3896         (genrtl_handler): Likewise.
3897         (genrtl_catch_block): Likewise.
3898         (genrtl_ctor_stmt): Likewise.
3899         (genrtl_subobject): Likewise.
3900         (genrtl_do_poplevel): Likewise.
3901         (genrtl_named_return_value): Likewise.
3902         (lang_expand_stmt): Rename to ...
3903         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
3904         (init_cp_semantics): Define.
3905
3906         * decl.c (initialize_local_var): Remove RTL-generating code.
3907         * semantics.c (genrtl_try_block): Fix formatting.
3908
3909         Move statement-tree facilities from C++ to C front-end.
3910         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
3911         (void_zero_node): Remove.
3912         (stmt_tree): Likewise.
3913         (scope_chain): Adjust.
3914         (language_function): Rename to cp_language_function.
3915         (cp_function_chain): Adjust.
3916         (current_stmt_tree): Remove.
3917         (last_tree): Likewise.
3918         (last_expr_type): Likewise.
3919         (struct lang_decl): Adjust.
3920         (STMT_IS_FULL_EXPR_P): Remove.
3921         (add_tree): Remove.
3922         (begin_stmt_tree): Likewise.
3923         (finish_stmt_tree): Likewise.
3924         (walk_tree_fn): Likewise.
3925         (walk_stmt_tree): Likewise.
3926         * class.c (finish_struct): Replace use of add_tree with add_stmt.
3927         * decl.c (mark_stmt_tree): Adjust type.
3928         (init_decl_processing): Don't build void_zero_node.
3929         (initialize_local_var): Adjust usage of current_stmt_tree.
3930         (finish_enum): Use add_stmt, not add_tree.
3931         (save_function_data): Adjust use of language_function.
3932         (finish_constructor_body): Use add_stmt, not add_tree.
3933         (finish_destructor_body): Likewise.
3934         (push_cp_function_context): Adjust use of language_function.
3935         (pop_cp_function_context): Likewise.
3936         (mark_lang_function): Likewise.
3937         (mark_cp_function_context): Likewise.
3938         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
3939         (build_vec_init): Likewise.
3940         * semantics.c (SET_LAST_STMT): Remove.
3941         (RECHAIN_STMTS): Don't use it.
3942         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
3943         (current_stmt_tree): Define.
3944         (add_tree): Remove.
3945         (finish_goto_stmt): Use add_stmt, not add_tree.
3946         (finish_expr_stmt): Likewise.
3947         (begin_if_stmt): Likewise.
3948         (finish_then_clause): Likewise.
3949         (begin_while_stmt): Likewise.
3950         (begin_do_stmt): Likewise.
3951         (finish_return_stmt): Likewise.
3952         (begin_for_stmt): Likewise.
3953         (finish_break_stmt): Likewise.
3954         (finish_continue_stmt): Likewise.
3955         (begin_switch_stmt): Likewise.
3956         (finish_case_label): Likewise.
3957         (begin_try_block): Likewise.
3958         (begin_function_try_block): Likewise.
3959         (begin_handler): Likewise.
3960         (begin_catch_block): Likewise.
3961         (begin_compound_stmt): Likewise.
3962         (begin_asm_stmt): Likewise.
3963         (finish_asm_stmt): Likewise.
3964         (finish_label_stmt): Likewise.
3965         (add_decl_stmt): Likewise.
3966         (finish_subobject): Likewise.
3967         (finish_decl_cleanup): Likewise.
3968         (finish_named_return_value): Likewise.
3969         (setup_vtbl_ptr): Likewise.
3970         (add_scope_stmt): Likewise.
3971         (finish_stmt_expr): Likewise.
3972         (prune_unused_decls): Remove.
3973         (begin_stmt_tree): Likewise.
3974         (finish_stmt_tree): Likewise.
3975         (prep_stmt): Adjust use of current_stmt_tree.
3976         (lang_expand_stmt): Likewise.
3977         * tree.c (statement_code_p): Remove.
3978         (cp_statement_code_p): New function.
3979         (walk_stmt_tree): Remove.
3980         (init_tree): Set lang_statement_code_p.
3981
3982 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
3983
3984         Integrated preprocessor.
3985
3986         * Make-lang.in, Makefile.in: Remove all references to input.c,
3987         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
3988         * gxx.gperf, hash.h, input.c: Delete.
3989         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
3990         initialized properly.
3991
3992         * class.c (fixup_pending_inline): Take a tree, not a
3993         struct pending_inline *.  All callers changed.
3994         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
3995         RID_PROTECTED entries in ridpointers[] array here.
3996         * decl.c (duplicate_decls): Do not refer to struct
3997         pending_inline.
3998         (record_builtin_type, init_decl_processing): Use RID_MAX not
3999         CP_RID_MAX.
4000         (grokdeclarator): Use C_IS_RESERVED_WORD.
4001         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
4002         cpplib.
4003         (grok_x_components): Do not inspect pending_inlines chain.
4004
4005         * cp-tree.h (struct lang_identifier): Add rid_code entry.
4006         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
4007         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
4008         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
4009         TIME_IDENTIFIER_FILEINFO): Kill.
4010         Update prototypes.
4011         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
4012         single 32-bit word.
4013         * parse.y: Call do_pending_inlines unconditionally.
4014         reinit_parse_for_method is now snarf_method.  fn.defpen is no
4015         longer necessary.  Remove unnecessary <itype> annotation on
4016         SCOPE.  Do not refer to end_of_file or struct pending_inline.
4017         * semantics.c (begin_inline_definitions): Call
4018         do_pending_inlines unconditionally.
4019
4020         * lex.c: Remove all code now shared with C front end.
4021         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
4022         into the get_identifier table.  Rewrite pragma handling to
4023         work with the registry.  Move code to save tokens for later
4024         processing to spew.c.
4025
4026         * spew.c: Rewrite everything in terms of token streams instead
4027         of text.  Move routines here from lex.c / input.c as
4028         appropriate.  GC-mark trees hanging off the pending inlines
4029         chain.
4030
4031 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
4032
4033         * NEWS: Mention that the named return value extension has been
4034         deprecated.
4035         * cp-tree.h (original_result_rtx): Define.
4036         (TREE_REFERENCE_EXPR): Remove.
4037         (DECL_VPARENT): Likewise.
4038         (pushdecl_nonclass_level): Likewise.
4039         (store_return_init): Likewise.
4040         (reinit_lang_specific): Likewise.
4041         (genrtl_named_return_value): Change prototype.
4042         * decl.c (original_result_rtx): Remove.
4043         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
4044         Do not generate RTL for local variables here.
4045         (store_return_init): Remove.
4046         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
4047         store_return_init.
4048         (finish_named_return_value): Adjust accordingly.  Warn that this
4049         extension is deprecated.
4050         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
4051
4052 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
4053
4054         * pt.c (type_unification_real): Replace switch with if.
4055         (unify): Tsubst non-type parms before comparing.
4056
4057 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
4058
4059         * error.c (dump_typename): New function, broken out of ...
4060         (dump_type): ... here. Use it.
4061         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
4062
4063 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
4064
4065         * init.c (build_offset_ref): Deal with namespace scoped
4066         TEMPLATE_ID_EXPRs.
4067
4068 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
4069
4070         * class.c (resolve_address_of_overloaded_function): Add
4071         explanation message.
4072         * decl.c (define_case_label): Reformat explanation.
4073         * decl2.c (finish_static_data_member_decl): Likewise.
4074         (grokfield): Likewise.
4075         * friend.c (do_friend): Likewise.
4076
4077 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
4078
4079         * tree.c (walk_tree): Expose tail recursion.
4080         (walk_stmt_tree): New function.
4081         * cp-tree.h: Prototype walk_stmt_tree.
4082         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
4083         the BLOCKs directly.  If a BLOCK has no variables after
4084         pruning, discard it.
4085         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
4086         restore the line number.
4087
4088 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
4089
4090         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
4091         (pt.o): Remove dependency on HTAB_H.
4092         * cp-tree.h: Include hashtab.h.
4093         (walk_tree): Change prototype.
4094         (walk_tree_without_duplicates): New function.
4095         * decl.c (check_default_argument): Use it.
4096         * optimize.c (remap_decl): Adjust calls to walk_tree.
4097         (copy_body): Likewise.
4098         (expand_calls_inline): Likewise.
4099         (calls_setjmp_p): Use walk_tree_without_duplicates.
4100         * pt.c: Don't include hashtab.h.
4101         (for_each_template_parm): Use walk_tree_without_duplicates.
4102         * semantics.c (finish-stmt_tree): Likewise.
4103         (expand_body): Likewise.
4104         * tree.c (walk_tree): Add additional parameter.
4105         (walk_tree_without_duplicates): New function.
4106         (count_trees): Use it.
4107         (verify_stmt_tree): Adjust call to walk_tree.
4108         (find_tree): Use walk_tree_without_duplicates.
4109         (no_linkage_check): Likewise.
4110         (break_out_target_exprs): Adjust call to walk_tree.
4111         (cp_unsave): Likewise.
4112
4113 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4114
4115         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
4116         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
4117         * cp-tree.h (TYPE_BINFO): Adjust comment.
4118         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
4119         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
4120         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
4121         (TYPE_TEMPLATE_INFO): Likewise.
4122         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
4123         * class.c (push_nested_class): Likewise.
4124         * decl.c (lookup_name_real): Likewise.
4125         (grokdeclarator): Likewise.
4126         (grok_op_properties): Likewise.
4127         (xref_tag): Likewise.
4128         (xref_basetypes): Likewise.
4129         * decl2.c (constructor_name_full): Likewise.
4130         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
4131         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
4132         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
4133         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4134         (dump_type_suffix): Likewise.
4135         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
4136         instead.
4137         (get_aggr_from_typedef): Likewise.
4138         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
4139         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4140         (write_template_parm): Likewise.
4141         (write_template_template_parm): Check tree code instead of
4142         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4143         * method.c (build_overload_nested_name): Add
4144         BOUND_TEMPLATE_TEMPLATE_PARM.
4145         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
4146         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4147         * pt.c (convert_template_argument): Check tree code instead of
4148         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4149         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
4150         (for_each_template_parm): Adjust comment.
4151         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
4152         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4153         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
4154         template_args_equal to compare template template parameter cases.
4155         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4156         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
4157         instead.
4158         * tree.c (copy_template_template_parm): Decide whether to create
4159         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
4160         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4161         (copy_tree_r): Likewise.
4162         * typeck.c (comptypes): Likewise.  Check tree code instead of
4163         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4164
4165 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
4166
4167         * decl.c (finish_function): Move the code for handling functions
4168         marked with the constructor and destructor attributes inside the
4169         expand_p block.
4170
4171 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
4172
4173         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
4174
4175 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
4176
4177         * pt.c (lookup_template_class): Remove abort.
4178         * tree.c (get_type_decl): Allow error_mark_node.
4179
4180 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
4181
4182         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
4183         TEMPLATE_ID_EXPRs.
4184
4185 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
4186
4187         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
4188         new ABI mangling.
4189
4190 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
4191
4192         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
4193         union tag mismatch error reporting.
4194
4195 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
4196
4197         * call.c (build_scoped_method_call): Check it is not a namespace.
4198
4199 2000-08-30  Jason Merrill  <jason@redhat.com>
4200
4201         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
4202
4203         * tree.c (bot_manip): Check TREE_CONSTANT rather than
4204         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
4205         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
4206
4207         * decl.c (start_function): Always call make_function_rtl.
4208
4209 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
4210
4211         * semantics.c (prune_unused_decls): New function.
4212         (finish_stmt_tree): Call it via walk_tree.
4213
4214 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
4215
4216         * class.c (build_secondary_vtable): Constify a char *.
4217         * decl.c (init_decl_processing): Initialize function_id_node,
4218         pretty_function_id_node, and func_id_node.
4219         * input.c (struct input_source): Constify 'str'.
4220         (feed_input): Constify first argument.
4221         * mangle.c (write_identifier): Constify argument.
4222         * pt.c (mangle_class_name_for_template): Constify argument.
4223
4224 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
4225
4226         * typeck.c (mark_addressable): Remove code that pokes around in
4227         RTL.
4228
4229 2000-08-28  Jason Merrill  <jason@redhat.com>
4230
4231         * lex.c (file_name_nondirectory): Move to toplev.c.
4232
4233         * cp-tree.h (LOCAL_CLASS_P): New macro.
4234         * class.c (finish_struct_1): Use it.
4235
4236 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
4237
4238         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
4239         (write_encoding): Pass another argument to write_name.
4240         (write_name): Add ignore_local_scope parameter.  Fix handling of
4241         local names.
4242         (write_nested_name): Use write_unqualified_name.
4243         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
4244         (write_template_prefix): Use write_unqualified_name.
4245         (write_component): Remove.
4246         (write_local_name): Add parameter.  Use direct local entity to
4247         discriminator calculation.
4248         (write_class_enum_type): Pass another argument to write_name.
4249         (write_template_template_arg): Likewise.
4250         (make_guard_variable): Likewise.
4251
4252 2000-08-27  Jason Merrill  <jason@redhat.com>
4253
4254         * decl.c (pushdecl): Matching decls for local externs are found in
4255         the current level.  Propagate linkage information from previous
4256         declarations.
4257
4258 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
4259
4260         * ir.texi (Expressions): Fix typo.
4261
4262 2000-08-25  Greg McGary  <greg@mcgary.org>
4263
4264         * tree.c (init_tree): Use ARRAY_SIZE.
4265
4266 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
4267
4268         * error.c (cp_tree_printer): Rework.
4269
4270 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
4271
4272         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
4273         dyn-string.o.
4274         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
4275         (cp-demangle.o): Remove target.
4276         (dyn-string.o): Likewise.
4277
4278         * decl.c (grokfndecl): Require that `main' return an `int'.
4279         * mangle.c (write_encoding): Don't mangle return types for
4280         conversion functions.
4281
4282 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
4283
4284         * error.c (tree_formatting_info): New data type.
4285         (tree_being_formatted): New macro.
4286         (tree_formatting_flags): Likewise.
4287         (put_whitespace): Likewise.
4288         (print_tree_identifier): Likewise.
4289         (print_identifier): Likewise.
4290         (cp_tree_printer, print_function_argument_list, print_declaration,
4291         print_expression, print_function_declaration,
4292         print_function_parameter, print_type, print_cv_qualifier): New
4293         functions.
4294         (init_error): Initialize lang_printer.
4295
4296 2000-08-24  Jason Merrill  <jason@redhat.com>
4297
4298         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
4299         adjustment necessary.
4300
4301 2000-08-24  Greg McGary  <greg@mcgary.org>
4302
4303         * cp-tree.h (MAIN_NAME_P): Remove macro.
4304
4305 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
4306
4307         * error.c (print_instantiation_context): Don't forget to flush the
4308         buffer.
4309
4310 2000-08-23  Jason Merrill  <jason@redhat.com>
4311
4312         * typeck.c (build_ptrmemfunc): Save the input pmf.
4313
4314         * method.c (process_modifiers): Use same_type_p.
4315
4316 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
4317
4318         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
4319         * mangle.c (write_function_type): Change prototype.
4320         (write_encoding): Don't mangle return types for
4321         constructors or destructors.
4322         (write_type): Adjust call to write_function_type.
4323         * pt.c (instantiate_template): Instantiate alternate entry points
4324         when instantiating the main function.
4325
4326 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
4327
4328         * error.c (cp_print_error_function): Don't use embedded '\n' in
4329         output_printf.
4330
4331 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
4332
4333         * decl.c (init_decl_processing): Remove bogus initialization.
4334         * error.c (lang_print_error_function): Restore here.
4335         (init_error): Initialize print_error_function.
4336
4337 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
4338
4339         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
4340
4341 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
4342
4343         * Makefile.in (error.o): Depends on diagnostic.h
4344
4345         * cp-tree.h (problematic_instantiation_changed,
4346         record_last_problematic_instantiation, current_instantiation,
4347         print_instantiation_context): Declare.
4348         (maybe_print_template_context): Remove.
4349
4350         * decl.c (init_decl_processing): Set print_error_function to NULL.
4351         (lang_print_error_function): Remove, since we're using a new
4352         machinery.
4353
4354         * error.c: #include diagnostic.h
4355         (function_category): New function.
4356         (cp_diagnostic_starter): Likewise.
4357         (cp_diagnostic_finalizer): Likewise.
4358         (cp_print_error_function): Likewise.
4359         (maybe_print_instantiation_context): Likewise.
4360         (print_instantiation_full_context): Likewise.
4361         (print_instantiation_partial_context): Likewise.
4362         (print_instantiation_context): Define.
4363         (init_error): Initialize diagnostic pager and finalizer.
4364
4365         * pt.c (problematic_instantiation_changed): Define.
4366         (record_last_problematic_instantiation): Likewise.
4367         (current_instantiation): Likewise.
4368         (maybe_print_template_context): Remove.
4369         (print_template_context): Likewise.
4370         (current_tinst_level): Make static to reflect Brendan Kehoe's
4371         change of 1995-04-13.
4372         (push_tinst_level): Call print_instantiation_context.
4373
4374 2000-08-21  Nix  <nix@esperi.demon.co.uk>
4375
4376         * lang-specs.h: Do not process -o or run the assembler if
4377         -fsyntax-only.
4378
4379 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
4380
4381         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
4382         variables.
4383         * decl2.c (lang_decode_option): Disable gettext attributes for
4384         -ansi.
4385
4386 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
4387
4388         * lex.c (lang_init_options): Default diagnostic message maximum
4389         length to 80, when line-wrapping.
4390
4391 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
4392
4393         * class.c (build_vtbl_initializer): Clear the entire
4394         vtbl_init_data.  Start keeping track of the functions for which we
4395         have created vcall offsets here.
4396         (dfs_build_vcall_offset_vtbl_entries): Remove.
4397         (build_vcall_offset_vtbl_entries): Reimplement.
4398         (add_vcall_offset_vtbl_entries_r): New function.
4399         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
4400         computing when vcall offsets are necessary.
4401
4402 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
4403
4404         * decl.c (member_function_or_else): Use cp_error ... %T.
4405         (grokdeclarator): Likewise.
4406         (start_method): Likewise.
4407         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
4408
4409 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
4410
4411         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
4412         TYPE_DECLs.
4413
4414 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
4415
4416         * cp-tree.h (PTRMEM_OK_P): New macro.
4417         (itf_ptrmem_ok): New enumeration value.
4418         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
4419         argument. Diagnose implicit pointer to member.
4420         (instantiate_type): Don't diagnose implicit pointer to member
4421         here. Pass itf_ptrmem_ok if ok. Adjust calls to
4422         resolve_address_of_overloaded_function.
4423         * init.c (build_offset_ref): Set PTRMEM_OK_P.
4424         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
4425         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
4426         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
4427         (build_unary_op): Deal with single non-static member in
4428         microsoft-land.
4429
4430 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
4431
4432         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
4433
4434 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
4435
4436         * cp-tree.h (enum_name_string): Remove prototype.
4437         (report_case_error): Remove prototype.
4438         * cp/typeck2.c (enum_name_string): Remove.
4439         (report_case_error): Remove.
4440         * error.c (dump_expr): Deal with enum values directly.
4441         Correctly negate integer constant.
4442
4443 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
4444
4445         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
4446         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
4447         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
4448         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
4449         (__cxa_vec_new): Use __cxa_vec_new2.
4450         (__cxa_vec_delete): Use __cxa_vec_delete2.
4451
4452 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
4453
4454         * vec.cc (__cxa_vec_new): Set "C" linkage.
4455         (__cxa_vec_ctor): Likewise.
4456         (__cxa_vec_cctor): Likewise.
4457         (__cxa_vec_dtor): Likewise.
4458         (__cxa_vec_delete): Likewise.
4459         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
4460         (__cxa_vec_ctor): Likewise.
4461         (__cxa_vec_cctor): Likewise.
4462         (__cxa_vec_dtor): Likewise.
4463         (__cxa_vec_delete): Likewise.
4464
4465 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
4466
4467         * class.c (instantiate_type): Reinstate local variable
4468         deleted in previous change.
4469
4470         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
4471         itf_no_attributes.
4472
4473 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
4474
4475         * cp-tree.h (instantiate_type_flags): New enumeration.
4476         (instantiate_type): Change parameter.
4477         * class.c (instantiate_type): Adjust prototype. Adjust.
4478         * call.c (standard_conversion): Adjust instantiate_type call.
4479         (reference_binding): Likewise.
4480         (build_op_delete_call): Likewise.
4481         (convert_like_real): Likewise.
4482         * cvt.c (cp_convert_to_pointer): Likewise.
4483         (convert_to_reference): Likewise.
4484         * pt.c (convert_nontype_argument): Likewise.
4485         * typeck.c (build_binary_op): Likewise.
4486         (build_ptrmemfunc): Likewise.
4487         (convert_for_assignment): Likewise.
4488
4489 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
4490
4491         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
4492         (current_aggr): Define.
4493         * decl.c (grokdeclarator): Make sure a friend class is an
4494         elaborated type specifier.
4495         * parse.y (current_aggr): Remove static definition.
4496         (cp_parse_init): Adjust.
4497         (structsp): Clear and restore current_aggr.
4498         (component_decl_list): Clear current_aggr.
4499
4500         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
4501         aggregate tag on the typename's context.
4502
4503         * pt.c (tsubst_friend_class): Return error_mark_node, if
4504         parms becomes NULL.
4505         (instantiate_class_template): Ignore error_mark_node friend types.
4506
4507 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
4508
4509         * cvt.c (warn_ref_binding): New static function, broken out of ...
4510         (convert_to_reference): ... here. Use it.
4511
4512 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4513
4514         * parse.y (template_arg): Add rule for template qualified with
4515         global scope.
4516
4517 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4518
4519         * decl2.c (add_function): Reorganize.
4520         (arg_assoc): Do not consider function template decls.
4521
4522 2000-08-11  Jason Merrill  <jason@redhat.com>
4523
4524         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
4525         looking inside.
4526
4527 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
4528
4529         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
4530         (lookup_nested_tag): Likewise.
4531
4532         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
4533         can be produced.
4534
4535 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
4536
4537         * parse.y (named_complex_class_head_sans_basetype): Remove
4538         always true if.
4539
4540 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
4541
4542         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
4543         explicit TEMPLATE_ID_EXPR args.
4544         (build_expr_from_tree, case CALL_EXPR): Likewise.
4545
4546 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
4547
4548         * decl.c (check_tag_decl): Diagnose typename's which don't
4549         declare anything.
4550
4551 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
4552
4553         * init.c (build_aggr_init): Reject bogus array initializers
4554         early.
4555
4556 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
4557
4558         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
4559         runtime.
4560         * cp/tinfo.cc (__dynamic_cast): Likewise.
4561         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
4562
4563 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
4564
4565         * cvt.c (convert_to_pointer_force): Fix error message when
4566         attempting to cast from ambiguous base.
4567
4568 2000-08-08  Jason Merrill  <jason@redhat.com>
4569
4570         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
4571         (tsubst_template_arg_vector): Likewise.
4572
4573         * decl2.c (build_anon_union_vars): Choose the largest field; don't
4574         assume that one will be as large as the union.
4575
4576 2000-08-07  Kazu Hirata  <kazu@hxi.com>
4577
4578         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
4579         * decl.c (pop_labels): Likewise.
4580
4581 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
4582
4583         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
4584         specifications.
4585         (__pointer_to_member_type_info): Likewise.
4586         (__base_class_info): Likewise.
4587         (__class_type_info): Likewise.
4588         (__si_class_type_info): Likewise.
4589         (__vmi_class_type_info): Likewise.
4590         * tinfo.cc (__si_class_type_info::__do_find_public_src):
4591         Changed member names to match specifications.
4592         (__vmi_class_type_info::__do_find_public_src): Likewise.
4593         (__si_class_type_info::__do_dyncast): Likewise.
4594         (__vmi_class_type_info::__do_dyncast): Likewise.
4595         (__si_class_type_info::__do_upcast): Likewise.
4596         (__vmi_class_type_info::__do_upcast): Likewise.
4597         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
4598         (__pbase_type_info::__pointer_catch): Likewise.
4599         (__pointer_type_info::__pointer_catch): Likewise.
4600         (__pointer_to_member_type_info::__pointer_catch): Likewise.
4601
4602 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
4603
4604         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
4605         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
4606         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
4607
4608 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
4609
4610         * cp-tree.h (add_method): Change prototype.
4611         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
4612         Don't double the size of the method vector in the error case.
4613         (handle_using_decl): Adjust call to add_method.
4614         (add_implicitly_declared_members): Likewise.
4615         (clone_function_decl): Likewise.
4616         * decl2.c (check_classfn): Likewise.
4617         * semantics.c (finish_member_declaration): Likewise.
4618
4619 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
4620
4621         * decl.c (flag_isoc94): New variable.
4622
4623 2000-08-02  Jason Merrill  <jason@redhat.com>
4624
4625         * pt.c (do_type_instantiation): Add complain parm; don't complain
4626         if called recursively.
4627         * cp-tree.h, parse.y: Adjust.
4628
4629 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
4630
4631         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
4632         -Wno-strict-prototypes.
4633
4634         * g++spec.c: Adjust type of second argument to
4635         lang_specific_driver, and update code as necessary.
4636
4637         * cp-tree.h: Don't prototype min_precision here.
4638         (my_friendly_assert): Cast expression to void.
4639         * semantics.c (do_poplevel): Initialize scope_stmts.
4640
4641 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
4642
4643         * cp-tree.h (DECL_NEEDED_P): Tweak.
4644
4645 2000-07-28  Jason Merrill  <jason@redhat.com>
4646
4647         * lang-specs.h: Use %i in rule for .ii files.
4648
4649 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
4650
4651         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
4652
4653 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
4654
4655         Allow indirect primary bases.
4656         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
4657         primary_base.
4658         (CLASSTYPE_VFIELD_PARENT): Remove.
4659         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
4660         (BINFO_PRIMARY_BINFO): Remove.
4661         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
4662         (BINFO_VBASE_PRIMARY_P): Likewise.
4663         (BINFO_PRIMARY_BASE_OF): New macro.
4664         (BINFO_INDIRECT_PRIMARY_P): Likewise.
4665         (get_primary_binfo): New function.
4666         * decl.c (lang_mark_tree): Make lang_type::primary_base.
4667         * class.c (vcall_offset_data_s): Rename to ...
4668         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
4669         and add ctor_vtbl_p.
4670         (get_derived_offset): Use get_primary_binfo.
4671         (dfs_mark_primary_bases): Adjust handling of virtual primary
4672         bases.
4673         (mark_primary_bases): Likewise.
4674         (set_primary_base): Take a binfo, not an integer, as a
4675         representation of the primary base.
4676         (indirect_primary_base_p): Remove.
4677         (determine_primary_base): Adjust for indirect primary bases.
4678         (dfs_find_final_overrider): Fix typo in coment.
4679         (update_vtable_entry_for_fn): Use get_primary_binfo.
4680         (layout_nonempty_base_or_field): Tweak.
4681         (build_base_fields): Adjust for new primary base semantics.
4682         (dfs_propagate_binfo_offsets): Remove.
4683         (propagate_binfo_offsets): Rewrite.
4684         (dfs_set_offset_for_shared_vbases): Remove.
4685         (layout_virtual_bases): Don't use it.
4686         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
4687         ABI.
4688         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
4689         CLASSTYPE_VFIELD_PARENT.
4690         (dfs_get_primary_binfo): New function.
4691         (get_primary_binfo): Likewise.
4692         (dump_class_hierarchy_r): Tweak printing of primary bases.
4693         (build_vtbl_initializer): Fix typo in comments.  Use
4694         vtbl_init_data.
4695         (build_vcall_and_vbase_vtbl_entries): Likewise.
4696         (build_vbaes_offset_vtbl_entries): Likewise.
4697         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
4698         BV_VCALL_INDEX to handle indirect primary bases.
4699         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
4700         (build_rtti_vtbl_entries): Likewise.
4701         * search.c (get_shared_vbase_if_not_primary): Tweak.
4702         (find_vbase_instance): Likewise.
4703         (binfo_for_vtable): Simplify.
4704         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
4705         (make_binfo): Make it have 11 entries.
4706
4707 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
4708
4709         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
4710         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
4711         ascertaining primaryness.
4712         (G): Remove template_args.
4713         (decl_is_template_id): New function.
4714         (write_encoding): Use decl_is_template_id.
4715         (write_name): Likewise.  Handle type_decls.  Get main variant of
4716         type decls.
4717         (write_nested_name): Likewise.
4718         (write_prefix): Likewise.
4719         (write_template_prefix): Likewise.
4720         (write_special_name_constructor): Remove defunct production from
4721         comment.
4722         (write_bare_function_type): Remove comment about absent parameter.
4723         (write_template_template_arg): Add missing grammar production to
4724         comment.
4725
4726 2000-07-27  Jason Merrill  <jason@redhat.com>
4727
4728         * decl.c (duplicate_decls): If common_type produces a non-typedef
4729         type for a typedef, just use the old type.
4730
4731 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
4732
4733         * cp-tree.h (function_depth): Declare.
4734         (verify_stmt_tree): Likewise.
4735         (find_tree): Likewise.
4736         * decl.c (function_depth): Give it external linkage.
4737         * optimize.c (optimize_function): Increment and decrement it.
4738         * tree.c (verify_stmt_tree_r): New function.
4739         (verify_stmt_tree): Likewise.
4740         (find_tree_r): Likewise.
4741         (find_tree): Likewise.
4742
4743 2000-07-27  Jason Merrill  <jason@redhat.com>
4744
4745         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
4746         TYPE_PTRMEMFUNC_P.
4747         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
4748
4749 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
4750
4751         * decl.c (start_cleanup_fn): Mark the function as `inline'.
4752         * decl2.c (get_guard): Call cp_finish_decl, not
4753         rest_of_decl_compilation, for local guards.
4754         * lex.c (do_identifier): Remove unused variable.
4755
4756 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
4757
4758         * parse.y:  Add missing ';'.
4759
4760 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
4761
4762         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
4763         of `extern "C++"'.
4764
4765 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
4766
4767         Kill strict_prototype. Backwards compatibility only for
4768         non NO_IMPLICIT_EXTERN_C systems.
4769         * cp-tree.h (flag_strict_prototype): Remove.
4770         (strict_prototype): Remove.
4771         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
4772         * decl.c (maybe_push_to_top_level): Adjust.
4773         (pop_from_top_level): Adjust.
4774         (decls_match): Only allow sloppy parm matching for ancient
4775         system headers.
4776         (init_decl_processing): Adjust.
4777         (grokdeclarator): Adjust.
4778         * decl2.c (flag_strict_prototype): Remove.
4779         (strict_prototype): Remove.
4780         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
4781         (lang_f_options): Remove "strict-prototype".
4782         (unsupported-options): Add "strict-prototype".
4783         * lex.c (do_identifier): Adjust.
4784         (do_scoped_id): Adjust.
4785         * parse.y (empty_parms): Adjust.
4786         * class.c (push_lang_context): Adjust.
4787         (pop_lang_context): Adjust.
4788         * typeck.c (comp_target_parms): Adjust.
4789
4790 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
4791
4792         * decl.c (poplevel): Deal with anonymous variables at for scope.
4793         (maybe_inject_for_scope_var): Likewise.
4794
4795 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
4796
4797         * decl.c: Remove all signal handling code, now done in toplev.c.
4798
4799 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
4800
4801         * decl.c (make_rtl_for_nonlocal_decl): Rework.
4802
4803         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
4804         correctly.
4805
4806 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
4807
4808         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
4809         Define my_friendly_assert and my_friendly_abort as macros
4810         which may call friendly_abort.  Prototype friendly abort, not
4811         my_friendly_abort or my_friendly_assert.
4812         * decl.c (signal_catch): Report the signal caught in the error
4813         message.  Call fatal directly.
4814         * typeck2.c (ack, my_friendly_assert): Delete.
4815         (my_friendly_abort): Rename to friendly_abort.  Expect file,
4816         line, and function parameters.  Report the abort code, then
4817         call fancy_abort.  Do not mask an abort if errors have
4818         already occurred.
4819
4820 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
4821
4822         * typeck.c (comp_target_parms): Remove obsolete parameter.
4823         (comp_target_types): Adjust.
4824
4825 2000-07-17  Jason Merrill  <jason@redhat.com>
4826
4827         * typeck.c (mark_addressable): Never set TREE_USED.
4828         * call.c (build_call): Don't abort on calls to library functions
4829         that have been declared normally.
4830
4831         * typeck.c (build_binary_op): Fix grammar in warning.
4832
4833         * exception.cc (__eh_free): Fix prototype.
4834
4835         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
4836
4837         * decl.c (pushdecl): Handle seeing an OVERLOAD in
4838         IDENTIFIER_NAMESPACE_VALUE.
4839
4840 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
4841
4842         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
4843         * method.c (use_thunk): Correct handling of vcall offsets.
4844
4845 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
4846
4847         * .cvsignore: parse.h and parse.c have no cp- prefix.
4848
4849 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
4850
4851         * .cvsignore: New file.
4852
4853 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
4854
4855         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
4856
4857 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
4858
4859         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
4860         * parse.c: Remove.
4861         * parse.h: Likewise.
4862
4863 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
4864
4865         * class.c (layout_class_type): Add pointers to virtual bases after
4866         base classes under the old ABI.
4867
4868 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
4869
4870         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
4871         (finish_continue_stmt): Likewise.
4872         (begin_for_stmt): Remove call to note_level_for_for.
4873         (finish_goto_stmt): Change call from build_min_nt
4874         to build_stmt.
4875         (finish_expr_stmt): Likewise.
4876         (begin_if_stmt): Likewise.
4877         (begin_while_stmt): Likewise.
4878         (finish_while_stmt): Likewise.
4879         (finish_return_stmt): Likewise.
4880         (begin_for_stmt): Likewise.
4881         (finish_for_stmt): Likewise.
4882         (finish_break_stmt): Likewise.
4883         (begin_switch_stmt): Likewise.
4884         (finish_case_label): Likewise.
4885         (genrtl_try_block): Likewise.
4886         (begin_try_block): Likewise.
4887         (begin_handler): Likewise.
4888         (begin_compound_stmt): Likewise.
4889         (finish_asm_stmt): Likewise.
4890         (finish_label_stmt): Likewise.
4891         (add_decl_stmt): Likewise.
4892         (finish_subobject): Likewise.
4893         (finish_decl_cleanup): Likewise.
4894         (finish_named_return_value): Likewise.
4895         (setup_vtbl_ptr): Likewise.
4896         (add_scope_stmt): Likewise.
4897         * decl.c (finish_constructor_body): Likewise.
4898         (finish_destructor_body): Likewise.
4899         * optimize.c (copy_body_r): Likewise.
4900         (initialize_inlined_parameters): Likewise.
4901         (declare_return_variable): Likewise.
4902         (expand_call_inline): Likewise.
4903
4904 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
4905
4906         * semantics.c (expand_body): Sync interface information
4907         at the end of function body expansion.
4908
4909 2000-07-09  Jason Merrill  <jason@redhat.com>
4910
4911         * init.c (build_new_1): Bail early if the call to new fails.
4912
4913         * decl.c (compute_array_index_type): Check specifically for
4914         an INTEGER_CST, not just TREE_CONSTANT.
4915
4916         * decl.c (duplicate_decls): Don't call duplicate_decls on
4917         the DECL_TEMPLATE_RESULT.
4918         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
4919         codes.
4920
4921         * error.c (dump_template_bindings): Don't crash if we had an
4922         invalid argument list.
4923
4924         * typeck.c (c_expand_start_case): Do narrowing here.
4925         * semantics.c (finish_switch_cond): Not here.
4926
4927 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
4928
4929         * parse.y (asm_clobbers): Do string concatenation.
4930
4931 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
4932
4933         * decl.c (pushtag): Don't put local classes in template functions
4934         on the local_classes list.
4935
4936 2000-07-04  Scott Snyder  <snyder@fnal.gov>
4937
4938         * decl2.c (get_guard): Add missing return for old ABI local
4939         variable case.
4940
4941 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
4942
4943         * cp-tree.h (char_type_p): New function.
4944         * decl.c (init_decl_processing): Don't initialize
4945         signed_wchar_type_node or unsigned_wchar_type_node.
4946         (complete_array_type): Handle brace-enclosed string-constants.
4947         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
4948         * tree.c (char_type_p): New function.
4949         * typeck2.c (digest_init): Use char_type_p.
4950
4951 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
4952
4953         * pt.c (tsubst): Don't layout type, if it's error_mark.
4954
4955 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
4956
4957         * pt.c (instantiate_pending_templates): Reset template level.
4958
4959 2000-07-05  Jason Merrill  <jason@redhat.com>
4960
4961         * call.c (joust): Don't complain about `operator char *()' beating
4962         `operator const char *() const'.
4963
4964 2000-07-04  scott snyder  <snyder@fnal.gov>
4965             Jason Merrill  <jason@redhat.com>
4966
4967         * repo.c (repo_get_id): Handle the case where a class with virtual
4968         bases has a null TYPE_BINFO_VTABLE.
4969
4970 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
4971             Jason Merrill  <jason@redhat.com>
4972
4973         * parse.y (member_init): Just pass in the type.
4974         * init.c (expand_member_init): Handle getting a type.
4975
4976 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4977             Jason Merrill  <jason@redhat.com>
4978
4979         * decl.c (finish_function): Warn if a function has no return
4980         statement.
4981         Suggested by Andrew Koenig.
4982         * typeck.c (check_return_expr): Do set current_function_returns_value
4983         if we got an error_mark_node.
4984
4985 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
4986
4987         * decl2.c (push_decl_namespace): Push the original namespace.
4988
4989 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
4990
4991         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
4992         * semantics.c (begin_class_definition): Clear it.
4993
4994 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
4995
4996         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
4997         (genrtl_expr_stmt): Likewise.
4998         (genrtl_decl_stmt): Likewise.
4999         (genrtl_if_stmt): Likewise.
5000         (genrtl_while_stmt): Likewise.
5001         (genrtl_do_stmt): Likewise.
5002         (genrtl_return_stmt): Likewise.
5003         (genrtl_for_stmt): Likewise.
5004         (genrtl_break_stmt): Likewise.
5005         (genrtl_continue_stmt): Likewise.
5006         (genrtl_scope_stmt): Likewise.
5007         (genrtl_switch_stmt): Likewise.
5008         (genrtl_case_label): Likewise.
5009         (genrtl_begin_compound_stmt): Likewise.
5010         (genrtl_finish_compound_stmt): Likewise.
5011         (genrtl_compound_stmt): Likewise.
5012         (genrtl_asm_stmt): Likewise.
5013
5014         * init.c (begin_init_stmts): Remove call to
5015         genrtl_begin_compound_stmt.
5016         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
5017
5018         * semantics.c (lang_expand_stmt): Changed call to
5019         genrtl_compound_stmt to ignore return value.
5020
5021 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
5022
5023         * mangle.c (canonicalize_for_substitution): Return the canonical
5024         variant of a type.
5025
5026         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
5027         TYPE_DECL.
5028         * typeck.c (commonparms): Remove obstack manipulations.
5029
5030 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
5031
5032         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
5033
5034         * Makefile.in (OBJS): Added ../c-semantics.o.
5035         (OBJDEPS): Likewise.
5036
5037         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
5038         ../c-common.h.
5039         (struct stmt_tree): Added comment.
5040         (current_function_name_declared): Removed.
5041         (stmts_are_full_exprs_p): Likewise.
5042         (genrtl_do_pushlevel): Likewise.
5043         (genrtl_clear_out_block): Likewise.
5044         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
5045         (DECL_ANON_UNION_ELEMS): Likewise.
5046         (emit_local_var): Likewise.
5047         (make_rtl_for_local_static): Likewise.
5048         (do_case): Likewise.
5049         (expand_stmt): Likewise.
5050         (genrtl_decl_cleanup): Likewise.
5051         (c_expand_asm_operands): Likewise.
5052         (c_expand_return): Likewise.
5053         (c_expand_start_case): Likewise.
5054
5055         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
5056         (emit_local_var): Likewise.
5057         (initialize_local_var): Change reference to
5058         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
5059         Change reference to stmts_are_full_exprs_p to
5060         current_stmt_tree->stmts_are_full_exprs_p.
5061         (push_cp_function_context): Likewise.
5062
5063         * expect.c (expand_throw): Change reference to
5064         stmts_are_full_exprs_p.
5065
5066         * init.c (build_aggr_init): Change reference to
5067         stmts_are_full_exprs_p.
5068         (build_vec_init): Likewise.
5069
5070         * optimize.c (maybe_clone_body): Change reference to
5071         current_function_name_declared to
5072         cp_function_chain->name_declared.
5073
5074         * pt.c (instantiate_decl): Change reference to
5075         current_function_name_declared to
5076         cp_function_chain->name_declared.
5077
5078         * semantics.c (expand_cond): Moved declaration to c-common.h.
5079         (genrtl_do_pushlevel): Moved to c-semantics.c.
5080         (genrtl_clear_out_block): Likewise.
5081         (genrtl_goto_stmt): Likewise.
5082         (genrtl_expr_stmt): Likewise.
5083         (genrtl_decl_stmt): Likewise.
5084         (gerntl_if_stmt): Likewise.
5085         (genrtl_while_stmt): Likewise.
5086         (genrtl_do_stmt): Likewise.
5087         (genrtl_return_stmt): Likewise.
5088         (genrtl_for_stmt): Likewise.
5089         (genrtl_break_stmt): Likewise.
5090         (genrtl_continue_stmt): Likewise.
5091         (genrtl_scope_stmt): Likewise.
5092         (genrtl_switch_stmt): Likewise.
5093         (genrtl_case_label): Likewise.
5094         (genrtl_begin_compound_stmt): Likewise.
5095         (genrtl_finish_compound_stmt): Likewise.
5096         (genrtl_compound_stmt): Likewise.
5097         (genrtl_asm_stmt): Likewise.
5098         (genrtl_decl_cleanup): Likewise.
5099         (expand_cond): Likewise.
5100         (expand_stmt): Renamed to ...
5101         (lang_expand_stmt): ... this.
5102         (lang_expand_expr_stmt): Initialize.
5103         (set_current_function_name_declared): Likewise.
5104         (stmts_are_full_exprs_p): Likewise.
5105         (current_function_name_declared): Likewise.
5106         (anon_aggr_type_p): Likewise.
5107         (do_poplevel): Change reference to
5108         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
5109         Change reference to stmts_are_full_exprs_p to
5110         current_stmt_tree->stmts_are_full_exprs_p.
5111         (add_tree): Likewise.
5112         (finish_expr_stmt): Likewise.
5113         (prep_stmt): Likewise.
5114         (lang_expand_stmt): Likewise.
5115         (begin_compound_stmt): Change reference to
5116         current_function_name_declared to
5117         cp_function_chain->name_declared and call to
5118         current_function_name_declared().
5119         (setup_vtbl_ptr): Likewise.
5120         (genrtl_do_poplevel): Removed.
5121
5122 2000-06-30  Jason Merrill  <jason@redhat.com>
5123
5124         * init.c (init_init_processing): Go back to aligning like
5125         double_type_node for old ABI.
5126         (get_cookie_size): Make cookie larger if we get a type that needs
5127         more alignment.
5128         (build_vec_delete): Call it.
5129
5130         * typeck.c (qualify_type_recursive): New fn.
5131         (composite_pointer_type): Use it.
5132         (build_binary_op): Use composite_pointer_type.
5133
5134 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
5135             Jason Merrill  <jason@redhat.com>
5136
5137         * typeck.c (check_return_expr): Don't complain about returning
5138         NULL from operator new if -fcheck-new.
5139         * cp-tree.h: Declare flag_check_new here.
5140         * init.c: Not here.
5141
5142 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
5143
5144         * mangle.c (find_substitution): Use same_type_p.
5145         (write_encoding): Don't check for substitutions.
5146
5147 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
5148
5149         * parse.y (expr_no_comma_rangle): New non-terminal.
5150         (template_parm): Use it for default parameter case.
5151         (template_arg): Use it.
5152         (expr_no_commas): Remove commented out undefined extensions.
5153         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
5154         * parse.h, parse.c: Rebuilt.
5155
5156 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
5157
5158         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
5159         (finish_asm_stmt): Do it here, instead.
5160
5161         * cp-tree.h (ridpointers): Don't declare.
5162         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
5163         (record_builtin_java_type): Likewise.
5164         (init_decl_processing): Likewise.
5165         * lex.c: Move inclusion of lex.h.
5166         (ridpointers): Don't define.
5167         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
5168         RID_MAX.
5169         * lex.h (enum rid): Rename to ...
5170         (enum cp_rid): ... this.
5171         (ridpointers): Don't declare.
5172         * parse.y: Move inclusion of lex.h.
5173         * parse.c: Regenerated.
5174         * spew.c: Move inclusion of lex.h.
5175
5176         * cp-tree.h (struct language_function): Remove temp_name_counter.
5177         (temp_name_counter): Remove.
5178         (get_temp_name): Change prototype.
5179         (get_guard): New function.
5180         (get_guard_cond): Likewise.
5181         (set_guard): Likewise.
5182         * cvt.c (build_up_reference): Adjust call to get_temp_name.
5183         * decl.c (expand_static_init): Use get_guard and friends to
5184         implement guard variables.
5185         * decl2.c (get_temp_name): Assume that the variables created are
5186         always static.
5187         (get_sentry): Rename to ...
5188         (get_guard): ... this.  Implement new ABI guard variables.
5189         (get_guard_bits): New function.
5190         (get_guard_cond): Likewise.
5191         (set_guard): Likewise.
5192         (start_static_initialization_or_destruction): Use them.
5193         (do_static_initialization): Replace sentry with guard throughout.
5194         (do_static_destruction): Likewise.
5195         * init.c (create_temporary_var): Add comment.
5196
5197 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
5198
5199         * mangle.c (find_substitution): Use same_type_p.
5200         (write_encoding): Don't check for substitutions.
5201
5202 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
5203
5204         * parse.y (expr_no_comma_rangle): New non-terminal.
5205         (template_parm): Use it for default parameter case.
5206         (template_arg): Use it.
5207         (expr_no_commas): Remove commented out undefined extensions.
5208         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
5209         * parse.h, parse.c: Rebuilt.
5210
5211 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
5212
5213         * cp-tree.h (flag_const_strings): Remove.
5214         (warn_parentheses): Likewise.
5215         (warn_format): Likewise.
5216         (common_type): Likewise.
5217         (default_conversion): Likewise.
5218         (build_binary_op): Likewise.
5219         (cp_build_binary_op): New macro.
5220         * call.c (build_new_op): Use cp_build_binary_op instead of
5221         build_binary_op.
5222         * class.c (build_vtable_entry_ref): Likewise.
5223         * decl.c (expand_static_init): Likewise.
5224         (compute_array_index_type): Likewise.
5225         (build_enumerator): Likewise.
5226         * decl2.c (delete_sanity): Likewise.
5227         (start_static_initialization_or_destruction): Likewise.
5228         * error.c (dump_type_suffix): Likewise.
5229         * init.c (resolve_offset_ref): Likewise.
5230         (build_new): Likewise.
5231         (build_new_1): Likewise.
5232         (build_vec_delete_1): Likewise.
5233         (build_vec_init): Likewise.
5234         (build_delete): Likewise.
5235         * rtti.c (synthesize_tinfo_fn): Likewise.
5236         (synthesize_tinfo_var): Likewise.
5237         * search.c (expand_upcast_fixups): Likewise.
5238         (fixup_all_virtual_upcast_offsets): Likewise.
5239         * typeck.c (build_array_ref): Likewise.
5240         (get_member_function_from_ptrfunc): Likewise.
5241         (build_binary_op): Add parameter.
5242         (pointer_int_sum): Use cp_build_binary_op.
5243         (pointer_diff): Likewise.
5244         (build_modify_expr): Likewise.
5245         (get_delta_difference): Likewise.
5246         (build_ptrmemfunc): Likewise.
5247
5248 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
5249
5250         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
5251         * decl.c (create_implicit_typedef): Adjust.
5252         * decl2.c (build_artificial_parm): Adjust.
5253         * method.c (implicitly_declare_fn): Adjust.
5254         * pt.c (push_inline_template_parms_recursive): Adjust.
5255         (process_template_parm): Adjust.
5256         (overloaded_template_name): Adjust.
5257         * semantics.c (finish_template_template_parm): Adjust.
5258
5259 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
5260
5261         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
5262         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
5263         where to emit thunks.
5264         (build_vtt): Adjust call to build_vtt_inits.
5265         (build_vtt_inits): Add parameter to indicate whether or not
5266         sub-VTTs for virtual bases should be included.  Adjust handling of
5267         construction vtables.
5268         (get_matching_base): New function.
5269         (dfs_build_vtt_inits): Rename to ...
5270         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
5271         construction vtables.
5272         (dfs_fixup_binfo_vtbls): Likewise.
5273         (build_ctor_vtbl_groups): Build construction vtables for virtual
5274         bases, too.
5275         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
5276         to build construction vtbls.
5277         (dfs_accumulate_vtbl_inits): Adjust handling of
5278         construction vtables.
5279
5280         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
5281         types correctly.
5282
5283 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
5284
5285         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
5286
5287 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
5288
5289         * search.c (hides): Remove.
5290         (is_subobject_of_p): Add most_derived parameter. Use
5291         CANONICAL_BINFO.
5292         (lookup_field_queue_p): Adjust.
5293         (lookup_field_r): Adjust.
5294
5295 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
5296
5297         * decl2.c (handle_class_head): Bash typedefs to the type's main
5298         decl.
5299
5300 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
5301
5302         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
5303         (begin_global_stmt_expr): ... this.
5304         (genrtl_finish_stmt_expr): Rename to ...
5305         (finish_global_stmt_expr): ... this.
5306         * init.c (begin_init_stmts): Adjust calls.
5307         (finish_init_stmts): Likewise.
5308         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
5309         (begin_global_stmt_expr): ... this.
5310         (genrtl_finish_stmt_expr): Rename to ...
5311         (finish_global_stmt_expr): ... this.
5312
5313 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5314
5315         * search.c (lookup_member): Fix typo in comment.
5316
5317 2000-06-24  Jason Merrill  <jason@redhat.com>
5318
5319         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
5320         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
5321
5322 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5323
5324         * parse.y (complex_direct_notype_declarator): Support global_scope.
5325         * Makefile.in: Adjust conflict count.
5326
5327 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
5328
5329         * parse.y (template_arg): Convert TEMPLATE_DECL
5330         that is a template template paramter to
5331         TEMPLATE_TEMPLATE_PARM here.
5332
5333         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
5334         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
5335         (copy_template_template_parm): Adjust prototype.
5336         * decl.c (grokdeclarator): Remove dead code.
5337         * pt.c (process_template_parm): Tidy.
5338         (lookup_template_class): Construct nodes in
5339         copy_template_template_parm.
5340         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
5341         lookup_template_class.  Use TYPE_TI_TEMPLATE.
5342         * tree.c (copy_template_template_parm): Add NEWARGS
5343         parameter.
5344         (mapcar): Adjust call to copy_template_template_parm.
5345         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
5346         * method.c (build_template_template_parm_names): Change error
5347         code to avoid compilation warning.
5348
5349         * gxxint.texi: Document template template parameter
5350         name mangling.
5351
5352 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
5353
5354         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
5355         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
5356         (cp-demangle.o): New rule.
5357         (dyn-string.o): Likewise.
5358         * inc/cxxabi.h (__cxa_demangle): New declaration.
5359
5360 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
5361
5362         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
5363         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
5364         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
5365         a tree, not an int.
5366         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
5367         (make_thunk): Change prototype.
5368         (emit_thunk): Rename to use_thunk.
5369         (mangle_thunk): Change prototype.
5370         * class.c (get_derived_offset): Simplify.
5371         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
5372         BV_GENERATE_THUNK_WITH_VTABLE_P.
5373         (build_primary_vtable): Simplify.
5374         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
5375         (dfs_find_base): Remove.
5376         (update_vtable_entry_for_fn): Correct bug in finding the base
5377         where a virtual function was first declared.  Figure out whether
5378         or not to emit a vcall-thunk with the vtables in which it appears.
5379         Correct logic for deciding whether to use an ordinary thunk, or a
5380         vcall thunk.
5381         (finish_struct_1): Remove unnecssary code.
5382         (build_vtbl_initializer): Use ssize_int for the running counter of
5383         negative indices.
5384         (build_vtbl_initializer): Only use vcall thunks where necessary.
5385         Mark thunks as needing to be emitted with their vtables, or not.
5386         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
5387         indices.  Use size_binop.
5388         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
5389         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
5390         size_binop.
5391         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
5392         (build_vtable_entry): Mark thunks as needing to be emitted with
5393         their vtables, or not.
5394         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
5395         * decl2.c (mark_vtable_entries): Use use_thunk instead of
5396         emit_thunk.
5397         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
5398         information.
5399         * error.c (dump_expr): Use BV_FN.
5400         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
5401         not an int.
5402         * method.c (make_thunk): Likewise.
5403         (emit_thunk): Rename to use_thunk.  Allow callers to decide
5404         whether or not to actually emit the thunk.  Adjust for changes in
5405         representation of vcall offsets.
5406         * search.c (dfs_get_pure_virtuals): Use BV_FN.
5407         * semantics.c (emit_associated_thunks): New function.
5408         (expand_body): Use it.
5409         * ir.texi: Adjust decriptions of thunks.
5410
5411 2000-06-22  Jason Merrill  <jason@redhat.com>
5412
5413         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
5414         (tsubst_friend_function): Copy it here.
5415
5416         * decl.c (grok_op_properties): Fix typo.
5417
5418         * decl2.c (delete_sanity): Clarify warning, avoid failure on
5419         deleting void*.
5420
5421         * pt.c (check_explicit_specialization): Clarify error.
5422
5423         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
5424         an old OVERLOAD when we're declaring a non-function.
5425         (pushdecl, destroy_local_var): Check for error_mark_node.
5426         (warn_extern_redeclared_static): Also bail early if
5427         we're a CONST_DECL.
5428         (push_overloaded_decl): Ignore an old error_mark_node.
5429
5430 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
5431
5432         * call.c (build_x_va_arg): Check if in a template decl.
5433         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
5434
5435 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5436
5437         * class.c (push_lang_context): TYPE_NAME gets you to the Java
5438         types DECLs.
5439         * decl.c (check_goto): Computed gotos assumed OK.
5440
5441 2000-06-20  Jason Merrill  <jason@redhat.com>
5442
5443         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
5444         for which we don't need to look for instantiations.
5445
5446 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
5447
5448         * parse.y (program): Always call finish_translation_unit.
5449         * parse.c, parse.h: Rebuilt.
5450
5451 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
5452
5453         * method.c: Don't include hard-reg-set.h.
5454
5455 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
5456
5457         * rtti.c (get_base_offset): Cope when vbase field is in a base.
5458
5459 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
5460
5461         * call.c (build_conditional_expr): Use VOID_TYPE_P.
5462         * cvt.c (cp_convert_to_pointer): Likewise.
5463         (convert_to_void): Likewise.
5464         * error.c (dump_expr): Likewise.
5465         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
5466         * init.c (build_delete): Likewise.
5467         * method.c (emit_thunk): Likewise.
5468         * optmize.c (declare_return_variable): Likewise.
5469         * rtti.c (get_tinfo_decl_dynamic): Likewise.
5470         (get_typeid): Likewise.
5471         (build_dynamic_cast_1): Likewise.
5472         * typeck.c (composite_pointer_type): Likewise.
5473         (common_type): Likewise.
5474         (build_indirect_ref): Likewise.
5475         (build_binary_op): Likewise.
5476         (build_x_compound_expr): Likewise.
5477         (check_return_expr): Likewise.
5478         * typeck2.c (add_exception_specifier): Likewise.
5479
5480         * mangle.c (write_method_parms): Use direct comparison for end
5481         of parmlist.
5482
5483 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
5484
5485         * cp-tree.h (genrtl_try_block): Declare function.
5486         (genrtl_handler): Likewise.
5487         (genrtl_catch_block): Likewise.
5488         (genrtl_ctor_stmt): Likewise.
5489         (genrtl_subobject): Likewise.
5490         (genrtl_decl_cleanup): Likewise.
5491         (genrtl_do_poplevel): Likewise.
5492         (genrtl_do_pushlevel): Likewise.
5493         (genrtl_clear_out_block): Likewise.
5494         (genrtl_goto_stmt): Likewise.
5495         (genrtl_expr_stmt): Likewise.
5496         (genrtl_decl_stmt): Likewise.
5497         (genrtl_if_stmt): Likewise.
5498         (genrtl_while_stmt): Likewise.
5499         (genrtl_do_stmt): Likewise.
5500         (genrtl_return_stmt): Likewise.
5501         (genrtl_for_stmt): Likewise.
5502         (genrtl_break_stmt): Likewise.
5503         (genrtl_continue_stmt): Likewise.
5504         (genrtl_scope_stmt): Likewise.
5505         (genrtl_switch_stmt): Likewise.
5506         (genrtl_case_label): Likewise.
5507         (genrtl_begin_compound_stmt): Likewise.
5508         (genrtl_finish_compound_stmt): Likewise.
5509         (genrtl_compound_stmt): Likewise.
5510         (genrtl_asm_stmt): Likewise.
5511         (genrtl_named_return_value): Likewise.
5512         (genrtl_begin_stmt_expr): Likewise.
5513         (genrtl_finish_stmt_expr): Likewise.
5514         (finish_for_stmt): Removed first argument.
5515         (finish_switch_stmt): Likewise.
5516
5517         * semantics.c (genrtl_try_block): Define function.
5518         (genrtl_handler): Likewise.
5519         (genrtl_catch_block): Likewise.
5520         (genrtl_ctor_stmt): Likewise.
5521         (genrtl_subobject): Likewise.
5522         (genrtl_decl_cleanup): Likewise.
5523         (genrtl_do_poplevel): Likewise.
5524         (genrtl_do_pushlevel): Likewise.
5525         (genrtl_clear_out_block): Likewise.
5526         (genrtl_goto_stmt): Likewise.
5527         (genrtl_expr_stmt): Likewise.
5528         (genrtl_decl_stmt): Likewise.
5529         (genrtl_if_stmt): Likewise.
5530         (genrtl_while_stmt): Likewise.
5531         (genrtl_do_stmt): Likewise.
5532         (genrtl_return_stmt): Likewise.
5533         (genrtl_for_stmt): Likewise.
5534         (genrtl_break_stmt): Likewise.
5535         (genrtl_continue_stmt): Likewise.
5536         (genrtl_scope_stmt): Likewise.
5537         (genrtl_switch_stmt): Likewise.
5538         (genrtl_case_label): Likewise.
5539         (genrtl_begin_compound_stmt): Likewise.
5540         (genrtl_finish_compound_stmt): Likewise.
5541         (genrtl_compound_stmt): Likewise.
5542         (genrtl_asm_stmt): Likewise.
5543         (genrtl_named_return_value): Likewise.
5544         (genrtl_begin_stmt_expr): Likewise.
5545         (genrtl_finish_stmt_expr): Likewise.
5546         (finish_for_stmt): Removed first argument and generate rtl
5547         specific code.
5548         (finish_switch_stmt): Likewise.
5549         (do_poplevel): Removed generate rtl specific code.
5550         (do_pushlevel): Likewise.
5551         (add_tree): Likewise.
5552         (finish_goto_stmt): Likewise.
5553         (finish_expr_stmt): Likewise.
5554         (begin_if_stmt): Likewise.
5555         (finish_if_stmt_cond): Likewise.
5556         (finish_then_clause): Likewise.
5557         (begin_else_clause): Likewise.
5558         (finish_else_clause): Likewise.
5559         (finish_if_stmt): Likewise.
5560         (clear_out_block): Likewise.
5561         (begin_while_stmt): Likewise.
5562         (finish_while_stmt_cond): Likewise.
5563         (finish_while_stmt): Likewise.
5564         (begin_do_stmt): Likewise.
5565         (finish_do_body): Likewise.
5566         (finish_do_stmt): Likewise.
5567         (finish_return_stmt): Likewise.
5568         (begin_for_stmt): Likewise.
5569         (finish_for_init_stmt): Likewise.
5570         (finish_for_cond): Likewise.
5571         (finish_for_expr): Likewise.
5572         (finish_break_stmt): Likewise.
5573         (finish_continue_stmt): Likewise.
5574         (begin_switch_stmt): Likewise.
5575         (finish_switch_cond): Likewise.
5576         (finish_case_label): Likewise.
5577         (begin_try_block): Likewise.
5578         (begin_function_try_block): Likewise.
5579         (finish_try_block): Likewise.
5580         (finish_cleanup_try_block): Likewise.
5581         (finish_cleanup): Likewise.
5582         (finish_function_try_block): Likewise.
5583         (finish_handler_sequence): Likewise.
5584         (finish_function_handler_sequence): Likewise.
5585         (begin_handler): Likewise.
5586         (finish_handler_parms): Likewise.
5587         (begin_catch_block): Likewise.
5588         (finish_handler): Likewise.
5589         (begin_compound_stmt): Likewise.
5590         (finish_compound_stmt): Likewise.
5591         (finish_asm_stmt): Likewise.
5592         (finish_label_stmt): Likewise.
5593         (finish_label_decl): Likewise.
5594         (finish_subobject): Likewise.
5595         (finish_decl_cleanup): Likewise.
5596         (finish_named_return_value): Likewise.
5597         (begin_stmt_expr): Likewise.
5598         (finish_stmt_expr): Likewise.
5599
5600         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
5601         to call genrtl_expr_stmt when appropriate.
5602
5603         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
5604         begin_compound_expr to call genrtl_begin_stmt_expr and
5605         genrtl_begin_compound_expr when appropriate.
5606         (finish_init_stmts): Changed calls to finish_compound_expr and
5607         finish_stmt_expr to call genrtl_finish_compound_expr and
5608         genrtl_finish_stmt_expr when appropriate.
5609         (expand_default_init): Changed call to finish_expr_stmt to call
5610         genrtl_expr_stmt when appropriate.
5611         (build_vec_init): Likewise.
5612
5613         * parse.y (simple_stmt): Removed first argument from call to
5614         finish_for_stmt. Removed first argument from call to
5615         finish_switch_stmt.
5616
5617         * parse.c: Regenerated.
5618
5619         * pt.c (tsubst_expr): Removed first argument from call to
5620         finish_for_stmt. Removed first argument from call to
5621         finish_switch_stmt.
5622
5623 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
5624
5625         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
5626         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
5627
5628         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
5629         (cplus_tree_code_length[]): Likewise.
5630         (cplus_tree_code_name[]): Likewise.
5631         (init_parse): Added call to add_c_tree_codes. Changed
5632         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
5633
5634 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
5635
5636         * cp-tree.h (finish_mem_initializers): Declare.
5637         (count_trees): Likewise.
5638         * parse.y (base_init): Use finish_mem_initializers.
5639         * semantics.c (finish_mem_initializers): New function.
5640
5641         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
5642         the number of trees.
5643         (n_trees): Remove.
5644         (count_trees): Don't use it.
5645
5646 2000-06-15  Jason Merrill  <jason@redhat.com>
5647
5648         * tree.c (count_trees): New debugging function.
5649
5650         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
5651         * init.c (build_member_call): Pull out the name of a DECL.
5652
5653         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
5654         * semantics.c (expand_body): Push to TV_INTEGRATION here.
5655         * optimize.c (optimize_function): Not here.
5656         * pt.c (instantiate_decl): Push to TV_PARSE.
5657
5658 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
5659
5660         * cp-tree.h (struct language_function): Remove x_base_init_list
5661         and x_member_init_list.
5662         (current_base_init_list): Remove.
5663         (current_member_init_list): Likewise.
5664         (setup_vtbl_ptr): Change prototype.
5665         (emit_base_init): Likewise.
5666         (expand_member_init): Likewise.
5667         (reinit_parse_for_function): Remove.
5668         * decl.c (save_function_data): Don't clear x_base_init_list and
5669         x_member_init_list.
5670         (mark_language_function): Don't mark them.
5671         * init.c (perform_member_init): Tweak comment.
5672         (sort_member_init): Take the list of initializers as an argument.
5673         (sort_base_init): Likewise.
5674         (emit_base_init): Likewise.
5675         (expand_member_init): Return the initializer.  Don't use global
5676         variables.
5677         * lex.c (reinit_parse_for_function): Remove.
5678         * method.c (build_template_parm_names): Correct substitution.
5679         (do_build_copy_constructor): Don't use current_member_init_list
5680         and current_base_init_list.
5681         (synthesize_method): Likewise.
5682         * parse.y (base_init): Split mem-initializers into
5683         base-initializers and field-initializers.
5684         (member_init_list): Build up the list here.
5685         (member_init): Return the initializer.
5686         (fn.depfn): Don't use reinit_parse_for_function.
5687         * parse.c: Regenerated.
5688         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
5689         ERROR_MARK.
5690         (tsubst_expr): Don't use current_member_init_list
5691         and current_base_init_list.
5692         (tsubst_expr_values): Rename to ...
5693         (tsubst_initializer_list): ... this.  Use convert_from_reference.
5694         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
5695         and current_base_init_list.
5696         (begin_function_definition): Don't call reinit_parse_for_function.
5697
5698         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
5699
5700         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
5701         correctly.
5702
5703         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
5704
5705 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
5706
5707         * cp-tree.h (IF_COND): Move to c-common.h.
5708         (THEN_CLAUSE): Likewise.
5709         (ELSE_CLAUSE): Likewise.
5710         (WHILE_COND): Likewise.
5711         (WHILE_BODY): Likewise.
5712         (DO_COND): Likewise.
5713         (DO_BODY): Likewise.
5714         (RETURN_EXPR): Likewise.
5715         (EXPR_STMT_EXPR): Likewise.
5716         (FOR_INIT_STMT): Likewise.
5717         (FOR_COND): Likewise.
5718         (FOR_EXPR): Likewise.
5719         (FOR_BODY): Likewise.
5720         (SWITCH_COND): Likewise.
5721         (SWITCH_BODY): Likewise.
5722         (CASE_LOW): Likewise.
5723         (CASE_HIGH): Likewise.
5724         (GOTO_DESTINATION): Likewise.
5725         (COMPOUND_BODY): Likewise.
5726         (ASM_CV_QUAL): Likewise.
5727         (ASM_STRING): Likewise.
5728         (ASM_OUTPUTS): Likewise.
5729         (ASM_INPUTS): Likewise.
5730         (ASM_CLOBBERS): Likewise.
5731         (DECL_STMT_DECL): Likewise.
5732         (STMT_EXPR_STMT): Likewise.
5733         (LABEL_STMT_LABEL): Likewise.
5734         (SCOPE_BEGIN_P): Likewise.
5735         (SCOPE_END_P): Likewise.
5736         (SCOPE_STMT_BLOCK): Likewise.
5737         (SCOPE_NULLIFIED_P): Likewise.
5738         (SCOPE_NO_CLEANUPS_P): Likewise.
5739         (SCOPE_PARTIAL_P): Likewise.
5740         (ASM_VOLATILE_P): Likewise.
5741         (STMT_LINENO): Likewise.
5742         (STMT_LINENO_FOR_FN_P): Likewise.
5743
5744         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
5745         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
5746         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
5747         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
5748         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
5749
5750         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
5751
5752         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
5753         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
5754
5755         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
5756         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
5757         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
5758
5759 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
5760
5761         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
5762         * class.c (dfs_find_final_overrider): Set it appropriately.
5763         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
5764         avoid unneeded secondary vptrs.
5765
5766 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
5767
5768         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
5769         (check_bitfield_decl, check_field_decl): Likewise.
5770         (build_vtbl_or_vbase_field, build_base_field): Likewise.
5771         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
5772         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
5773         (xfer_tag, finish_enum): Likewise.
5774         * decl2.c (finish_builtin_type): Likewise.
5775         * init.c (init_init_processing): Likewise.
5776         * pt.c (instantiate_class_template): Likewise.
5777         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
5778         * cp-tree.h (struct lang_type): Add user_align member.
5779         (CLASSTYPE_USER_ALIGN): Define.
5780
5781 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
5782
5783         * Make-lang.in (c++.install-common): Install g++-cross in
5784         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
5785         $(target_alias)-g++ and $(target_alias)-c++.
5786
5787 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
5788
5789         * class.c (vcall_offset_data_s): Add last_init and fns.
5790         (overrides): Rename to same_signature_p.
5791         (dfs_find_final_overrider): Adjust accordingly.
5792         (mark_overriders): Likewise.
5793         (warn_hidden): Likewise.
5794         (build_vtbl_initializer): Reorganize machinery for building things
5795         at negative offsets.
5796         (build_vcall_and_vbase_vtbl_entries): Likewise.
5797         (build_vbase_offset_vtbl_entries): Likewise.
5798         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
5799         offset entries.  Do not create two entries for functions with the
5800         same signature.
5801         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
5802         (build_rtti_vtbl_entries): Reorganize machinery for building things
5803         at negative offsets.
5804
5805         * optimize.c (expand_call_inline): Don't recurse into the code
5806         used to initialize the parameters more than once.
5807
5808 2000-06-11  Mark Mitchell <mark@codesourcery.com>
5809
5810         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
5811         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
5812         (find_substitution): Only use the `Sa' substitution for
5813         std::allocator, not instantiations of it.
5814         (write_template_prefix): Move comment.  Only use a TREE_LIST to
5815         represent substitutions for a member template.
5816         (write_array_type): Mangle array dimensions correctly.
5817         * optimize.c (maybe_clone_body): Copy more information from the
5818         cloned function.
5819         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
5820         on the regenerated declaration.
5821
5822 2000-06-11  Chip Salzenberg  <chip@valinux.com>
5823             Mark Mitchell <mark@codesourcery.com>
5824
5825         * class.c (build_vtable): Clarify comment.
5826         (build_ctor_vtbl_group): Pass the most derived type to
5827         build_vtable.
5828
5829 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5830
5831         * decl2.c (compare_options): Don't needlessly cast away const-ness.
5832
5833 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
5834
5835         * decl.c (add_binding): Handle duplicate declarations of external
5836         variables.
5837
5838 2000-06-09  Chip Salzenberg  <chip@valinux.com>
5839             Mark Mitchell <mark@codesourcery.com>
5840
5841         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
5842         argument.
5843         (write_signed_number): New macro.
5844         (write_unsigned_number): Likewise.
5845         (write_source_name): Use them.
5846         (write_number): Handle signed and unsigned values.
5847         (write_integer_cst): Use tree_int_cst_sgn, and use
5848         write_unsigned_number or write_signed_number as appropriate.
5849         (write_discriminator): Use write_unsigned_number or
5850         write_signed_number as appropriate.
5851         (write_template_arg_literal): Likewise.
5852         (write_array_type): Use tree_low_cst.
5853         (write_template_parm):  Use write_unsigned_number or
5854         write_signed_number as appropriate.
5855         (write_substitution): Adjust call to write_number.
5856         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
5857         (write_expression): Handle non-type template arguments of
5858         reference type correctly.
5859         (mangle_thunk): Use write_signed_number.
5860
5861 2000-06-09  Chip Salzenberg  <chip@valinux.com>
5862
5863         * mangle.c (find_substition): Don't mangle objects with typename
5864         substitutions (e.g. "cin" as "Si").
5865
5866 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
5867
5868         * call.c (add_candidate): Use ggc_alloc_cleared.
5869         * decl.c (lookup_label): Likewise.
5870         * lex.c (retrofit_lang_decl): Likewise.
5871
5872 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
5873
5874         * semantics.c (expand_body): Push to TV_EXPAND.
5875         * optimize.c (optimize_function): Push to TV_INTEGRATION.
5876         * decl.c (start_function): Always call announce_function.
5877
5878         * tinfo2.cc: Just declare abort.
5879
5880 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
5881
5882         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
5883         whenever @ is a symbolic name.
5884
5885 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
5886
5887         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
5888
5889 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
5890
5891         * decl.c (pushdecl): Look up functions by DECL_NAME, not
5892         DECL_ASSEMBLER_NAME.
5893
5894 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
5895
5896         * decl2.c (c_language): Define.
5897
5898 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
5899
5900         * lex.c (lang_init_options): Tweak.
5901
5902         * decl2.c: Remove #inclusion of diagnostic.h
5903         (lang_decode_option): Move diagnostic formatting options to
5904         toplevel.
5905
5906         * lang-options.h: Remove documentation for diagnostic options.
5907
5908         * Makefile.in (lex.o): Depends upon diagnostic.h
5909
5910 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
5911
5912         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
5913         the same DECL_RESULT, it's not a redefinition.
5914         * pt.c (tsubst_decl): Remove code to handle illegal
5915         specializations.
5916
5917 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
5918
5919         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
5920
5921 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
5922
5923         * search.c (maybe_suppress_debug_info): Don't check
5924         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
5925
5926         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
5927         here if extern_p.
5928
5929         Remember instantiation context in deferred instantiations.
5930         * cp-tree.h (struct tinst_level): Remove.
5931         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
5932         * pt.c (current_tinst_level): Now a tree.
5933         (print_template_context, push_tinst_level, pop_tinst_level,
5934         tinst_for_decl): Adjust.
5935         (reopen_tinst_level): New fn.
5936         (init_pt): Register current_tinst_level as a root.
5937         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
5938         of the pending templates list.
5939         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
5940         * lex.c (extract_interface_info): Adjust.
5941         * decl2.c (warn_if_unknown_interface): Adjust.
5942
5943 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
5944
5945         * class.c (indirect_primary_base_p): New function.
5946         (determine_primary_base): Use it.
5947
5948 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
5949
5950         Update new-abi dynamic cast algorithm.
5951         * tinfo.cc (__class_type_info::__dyncast_result): Add
5952         whole_details. Adjust constructor.
5953         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
5954         Avoid unnecessary searching.
5955         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
5956
5957 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5958
5959         * decl.c (init_decl_processing): Don't call record_component_aliases.
5960         * tree.c (build_cplus_array_type_1): Likewise.
5961
5962 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
5963
5964         * ir.texi: Correct typo.
5965         * mangle.c (write_expression): Handle non-type template arguments
5966         with reference type.
5967         * method.c (build_overload_value): Likewise.
5968         * pt.c (convert_nontype_argument): Explicitly represent conversion
5969         to a reference with an ADDR_EXPR.
5970         (unify): Always unify arguments in left-to-right order.
5971
5972 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
5973             Mark Mitchell  <mark@codesourcery.com>
5974
5975         * Make-lang.in (CXX_SRCS): Add mangle.c.
5976         * Makefile.in (CXX_OBJS): Add mangle.o.
5977         (mangle.o): New rule.
5978
5979         * class.c (local_classes): New variable.
5980         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
5981         (get_vtt_name): Use mangle_vtt_name for new ABI.
5982         (init_class_processing): Initialize local_classes.
5983         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
5984         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
5985         (std_identifier): New macro.
5986         (DECL_VOLATILE_MEMFUNC_P): New macro.
5987         (DECL_NAMESPACE_STD_P): Likewise.
5988         (local_classes): Declare.
5989         (get_mostly_instantiated_function_type): Declare.
5990         (init_mangle): Declare.
5991         (mangle_decl): Likewise.
5992         (mangle_type_string): Likewise.
5993         (mangle_type): Likewise.
5994         (mangle_typeinfo_for_type): Likewise.
5995         (mangle_typeinfo_string_for_type): Likewise.
5996         (mangle_vtbl_for_type): Likewise.
5997         (mangle_vtt_for_type): Likewise.
5998         (mangle_ctor_vtbl_for_type): Likewise.
5999         (mangle_thunk): Likewise.
6000         (mangle_conv_op_name_for_type): Likewise.
6001         (mangle_guard_variable): Likewise.
6002         * decl.c (pushtag): Keep track of local classes.
6003         (initialize_predefined_identifiers): Initialize std_identifier.
6004         (init_decl_processing): Use std_identifier.
6005         (start_decl): Don't treat instantiations as specializations.
6006         (grokdeclarator): Likewise.
6007         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
6008         name for fully-instantiated templates.
6009         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
6010         destructors with the new ABI.
6011         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
6012         (grokfield): Use mangle_type for new ABI.
6013         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
6014         (get_sentry): Use mangle_guard_variable for new ABI.
6015         (start_static_initialization_or_destruction): Likewise.
6016         * expr.c (extract_aggr_init): Remove.
6017         (extract_scalar_init): Likewise.
6018         (extract_init): Remove #if 0'd code.
6019         * mangle.c: New function.
6020         * method.c (build_mangled_name): Assert not flag_new_abi.
6021         (build_static_name): Likewise.
6022         (build_decl_overload_real): Likewise.
6023         (build_typename_overload): Likewise.
6024         (build_overload_with_type): Likewise.
6025         (build_overload_name): Likewise.
6026         (get_ctor_vtbl_name): Likewise.
6027         (start_squangling): Likewise.
6028         (get_id_2): Likewise.
6029         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
6030         (init_method): Call init_mangle for new ABI.
6031         (make_thunk): Call mangle_thunk for new ABI.
6032         * operators.def: Correct new ABI manglings for the `%' operator.
6033         Add `::' operator.
6034         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
6035         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
6036         (lookup_template_class): Call mangle_decl for new ABI.
6037         (get_mostly_instantiated_function_type): New function.
6038         (set_mangled_name_for_template_decl): Use it.
6039         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
6040         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
6041         conversion op names.
6042         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
6043         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
6044         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
6045         mangle_typeinfo_string_for_type.
6046
6047 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
6048
6049         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
6050         (INNERMOST_TEMPLATE_ARGS): New macro.
6051         (innermost_args): Remove.
6052         (get_innermost_template_args): New function.
6053         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
6054         * error.c (dump_function_decl): Be caution when using
6055         most_general_template.
6056         * method.c (build_template_parm_names):  Use
6057         INNERMOST_TEMPLATE_ARGS.
6058         * pt.c (add_to_template_args): Tidy comment
6059         (get_innermost_template_args): New function.
6060         (check_explicit_specialization): Clear DECL_INITIAL for a new
6061         specialization.
6062         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
6063         Tidy.
6064         (push_template_decl): Always register specializations of the most
6065         general template.
6066         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
6067         (coerce_template_parms): Likewise.
6068         (lookup_template_class): Likewise.
6069         (innermost_args): Remove.
6070         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
6071         (tsubst_decl): Handle tricky specializations.  Use
6072         get_innermost_template_args.
6073         (instantiate_template): Simplify handling of partial
6074         instantiations.
6075         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
6076         (most_general_template): Reimplement, in a more straightforward
6077         manner.
6078         (regenerate_decl_from_template): Tweak formatting.  Use
6079         TMPL_ARGS_DEPTH for clarity.
6080         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
6081
6082         * dump.c (dequeue_and_dump): Dump information about thunks.
6083
6084 2000-06-01  Richard Henderson  <rth@cygnus.com>
6085
6086         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
6087
6088 2000-06-01  Richard Henderson  <rth@cygnus.com>
6089
6090         * decl2.c (unsupported_options): Fix typo, make const.
6091         (lang_decode_option): Fix bsearch argument order.
6092
6093 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
6094
6095         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
6096         on FIELD_DECLs.
6097
6098 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6099
6100         * cp-tree.h (c_get_alias_set): Deleted.
6101         * Makefile.in (decl.o): Include ../expr.h.
6102         * decl.c (expr.h): Include.
6103         (init_decl_processing): Call record_component_aliases for arrays.
6104         (grokdeclarator): Likewise.
6105         Set TREE_ADDRESSABLE for fields that aren't bitfields.
6106         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
6107
6108 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
6109
6110         Remove guiding declaration support.
6111         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
6112         (flag_guiding_decls): Remove.
6113         * call.c (build_user_type_conversion_1): Remove support for
6114         guiding decls.
6115         (build_new_function_call): Likewise.
6116         (build_new_op): Likewise.
6117         (build_new_method_call): Likewise.
6118         * decl.c (start_function): Likewise.
6119         * friend.c (is_friend): Likewise.
6120         (do_friend): Likewise.
6121         * decl2.c ((flag_dump_translation_unit): Make it const.
6122         (flag_guiding_decls): Remove.
6123         (unsupported_options): New variable
6124         (compare_options): New function.
6125         (lang_decode_option): Use them.
6126
6127         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
6128
6129         * method.c (mangle_expression): Adjust test for legal expression
6130         operators.
6131
6132         * pt.c (instantiate_decl): Save and restore the local
6133         specializations list.
6134
6135 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
6136
6137         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
6138
6139 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
6140
6141         * call.c (add_template_candidate_real): Handle member template
6142         constructors for classes with virtual bases.
6143         (build_user_type_conversion_1): Use in_charge_arg_for_name.
6144         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
6145
6146         * ir.texi: Update thunk documentation.
6147
6148         * call.c (joust): Fix handling of overloaded builtin operators.
6149
6150 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
6151
6152         * cp-tree.h (DECL_ANTICIPATED): New macro.
6153         Document new use of DECL_LANG_FLAG_7.
6154         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
6155         in the user namespace.
6156         * lex.c (do_identifier): If the identifier's declaration has
6157         DECL_ANTICIPATED on, it has not yet been declared.  But do not
6158         replace it with an ordinary implicit declaration.
6159
6160         * tinfo2.cc: Include stdlib.h.
6161
6162 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
6163
6164         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
6165         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
6166         CLASSTYPE_ALIGN.
6167
6168 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
6169
6170         * decl2.c (lang_decode_option): Use skip_leading_substring instead
6171         of plain strncmp.
6172
6173 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
6174
6175         * operators.def (<?): Duplicated, should have been...
6176         (>?): this.  Fixed.
6177
6178 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
6179             Mark Mitchell  <mark@codesourcery.com>
6180
6181         * cp-tree.h (ansi_opname): Make it a macro.
6182         (ansi_assopname): Likewise.
6183         (struct lang_decl_flags): Add assignment_operator_p.
6184         (struct lang_decl): Add operator_code.
6185         (DECL_VTT_PARM): Adjust.
6186         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
6187         overloaded operator.
6188         (SET_OVERLOADED_OPERATOR_CODE): New macro.
6189         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
6190         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
6191         (opname_tab): Remove.
6192         (assignop_tab): Likewise.
6193         (operator_name_info_t): New type.
6194         (operator_name_info): New variable.
6195         (assignment_operator_name_info): Likewise.
6196         (build_cp_library_fn): Remove declaration.
6197         (push_cp_library_fn): Likewise.
6198         (operator_name_string): Likewise.
6199         (build_decl_overload): Likewise.
6200         * call.c (print_z_candidates): Simplify.
6201         (build_object_call): Adjust usage of ansi_opname.  Use
6202         DECL_OVERLOADED_OPERATOR_P.
6203         (op_error): Adjust operator name lookup.
6204         (build_conditional_expr): Adjust usage of ansi_opname.
6205         (build_new_op): Likewise.
6206         (build_op_delete_call): Likewise.
6207         (build_over_call): Likewise.
6208         (joust): Use DECL_OVERLOADED_OPERATOR_P.
6209         * decl.c (duplicate_decls): Copy operator_code.
6210         (init_decl_processing): Adjust parameters to push_cp_library_fn.
6211         (builtin_function): Adjust parameters to build_library_fn_1.
6212         (build_library_fn_1): Accept an overloaded operator code.
6213         (build_library_fn): Pass ERROR_MARK.
6214         (build_cp_library_fn): Accept an overloaded operator code.
6215         (push_cp_library_fn): Likewise.
6216         (grokfndecl): Tweak.
6217         (grokdeclarator): Simplify code to compute names of overloaded
6218         operators.  Adjust use of ansi_opname.
6219         (ambi_op_p): Work on tree_codes, not identifiers.
6220         (unary_op_p): Likewise.
6221         (grok_op_properties): Likewise.
6222         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
6223         (lang_mark_tree): Don't try to mark the operator_code.
6224         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
6225         * error.c (dump_decl): Remove special handling for operator
6226         names.
6227         (dump_function_name): Likewise.
6228         (dump_expr): Adjust name lookup of operators.
6229         (op_to_string): Simplify.
6230         (assop_to_string): Likewise.
6231         * init.c (build_new_1): Adjust use of ansi_opname.
6232         * lex.c (opname_tab): Remove.
6233         (assignop_tab): Likewise.
6234         (ansi_opname): Likewise.
6235         (ansi_assopname): Likewise.
6236         (operator_name_string): Likewise.
6237         (reinit_lang_specific): Likewise.
6238         (operator_name_info): New variable.
6239         (assignment_operator_name_info): Likewise.
6240         (init_operators): New function.
6241         (init_parse): Use it.
6242         (do_identifier): Adjust use of ansi_opname.
6243         * method.c (mangle_expression): Don't use ansi_opname for
6244         mangling.
6245         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
6246         (build_decl_overload): Remove.
6247         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
6248         (do_build_assign_ref): Adjust use of ansi_opname.
6249         (synthesize_method): Likewise.
6250         (implicitly_declare_fn): Likewise.
6251         * operators.def: New file.
6252         * parse.y (operator): Adjust use of ansi_opname.
6253         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
6254         (set_mangled_name_for_template_decl): Don't play games with
6255         current_namespace.
6256         (special_function_p): Adjust use of ansi_opname.
6257         * typeck.c (check_return_expr): Likewise.
6258         * Make-lang.in (cc1plus): Depend on operators.def.
6259         * Makefile.in (lex.o): Likewise.
6260         (decl.o): Likewise.
6261
6262 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
6263
6264         * Make-lang.in (cplib2.ready): Eradicate.
6265
6266 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6267
6268         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
6269         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
6270         (built_min, cp_tree_equal): Likewise.
6271
6272 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
6273
6274         * class.c (layout_nonempty_base_or_field): Replace
6275         `record_layout_info' with `record_layout_info_s'.
6276
6277 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
6278
6279         Fix goto checking.
6280         * cp-tree.h (struct language_function): x_named_labels is now
6281         a struct named_label_list*.
6282         * decl.c (struct named_label_use_list): Renamed from...
6283         (struct named_label_list): ...this.  New struct.
6284         (push_binding_level): Don't set eh_region.
6285         (note_level_for_eh): New fn.
6286         (pop_label): Take label and old value directly.
6287         (pop_labels): Adjust for new named_labels format.
6288         (lookup_label): Likewise.
6289         (poplevel): Note characteristics of a binding level containing a
6290         named label.  Mess with named label lists earlier.
6291         (mark_named_label_lists): New fn.
6292         (mark_lang_function): Call it.
6293         (use_label): New fn, split out from...
6294         (make_label_decl): ...here.  Don't call it.
6295         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
6296         check_previous_gotos): New fns, split out from...
6297         (define_label): ...here.
6298         (check_switch_goto): New fn.
6299         (define_case_label): Call it.
6300         (check_goto): New fn.
6301         * semantics.c (finish_goto_stmt): Call it and use_label.
6302         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
6303         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
6304
6305 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
6306
6307         * class.c (build_vtable_entry_ref): Correct usage of
6308         get_vtbl_decl_for_binfo.
6309
6310         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
6311         * method.c (implicitly_declare_fn): Not here.
6312
6313 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
6314
6315         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
6316         (CPTI_PTMD_DESC_TYPE): ... here.
6317         (ptmd_desc_type_node): Rename to ...
6318         (ptm_desc_type_node): ... here.
6319         * decl.c: Likewise.
6320         * rtti.c (ptmd_initializer): Rename to ...
6321         (ptm_initializer): ... here.
6322         (sythesize_tinfo_var): Adjust. Deal with pointer to member
6323         function.
6324         (create_tinfo_types): Adjust.
6325
6326 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
6327
6328         Finish implementation of VTTs.
6329         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
6330         CPTI_VTT_PARM_IDENTIFIER.
6331         (vtt_parm_identifier): New macro.
6332         (vtt_parm_type): Likewise.
6333         (BINFO_SUBVTT_INDEX): Likewise.
6334         (BINFO_VPTR_INDEX): Likewise.
6335         (struct lang_decl): Add vtt_parm.
6336         (DECL_VTT_PARM): New macro.
6337         (DECL_USE_VTT_PARM): Likewise.
6338         (DECL_NEEDS_VTT_PARM_P): Likewise.
6339         (get_vtt_name): Declare.
6340         (build_artifical_parm): Likewise.
6341         (fixup_all_virtual_upcast_offsets): Likewise.
6342         (expand_indirect_vtbls_init): Remove.
6343         * call.c (build_new_method_call): Pass the vtt to subobject
6344         constructors and destructors.
6345         * class.c (get_vtt_name): Give it external linkage.
6346         (build_clone): Handle the magic VTT parameters for clones.
6347         (clone_function_decl): Fix typo in comment.
6348         (build_vtt): Keep track of the indices in the VTTs where various
6349         entities are stored.
6350         (build_vtt_inits): Likewise.
6351         (dfs_build_vtt_inits): Likewise.
6352         (build_ctor_vtbl_group): Tweak type of construction vtables.
6353         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
6354         primary bases, when building construction vtables.
6355         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
6356         (initialize_predefined_identifiers): Add vtt_parm_identifier.
6357         (init_decl_processing): Initialize vtt_parm_type.
6358         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
6359         (lang_mark_tree): Make vtt_parm.
6360         * decl2.c (build_artificial_parm): New function.
6361         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
6362         (grokclassfn): Use build_artificial_parm.
6363         * init.c (initialize_vtbl_ptrs): Call
6364         fixup_all_virtual_upcast_offsets directly.
6365         (perform_member_init): Use the complete subobject destructor for
6366         member cleanups.
6367         (build_vtbl_address): New function.
6368         (expand_virtual_init): Handle VTTs.
6369         * optimize (maybe_clone_body): Likewise.
6370         * search.c (fixup_all_virtual_upcast_offsets): Give it external
6371         linkage.
6372         (expand_indirect_vtbls_init): Remove.
6373         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
6374         * tree.c (make_binfo): Make them bigger.
6375
6376 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
6377
6378         * inc/cxxabi.h (__pbase_type_info): Define, based on
6379         __pointer_type_info.
6380         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
6381         (__pointer_to_member_type_info): Likewise.
6382         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
6383         (__pointer_to_member_type_info::__is_pointer_p): Remove.
6384         (__pointer_type_info::__do_catch): Rename to ...
6385         (__pbase_type_info::__do_catch): ... here. Adjust.
6386         (__pbase_type_info::__pointer_catch): Implement.
6387         (__pointer_type_info::__pointer_catch): Adjust.
6388         (__pointer_to_member_type_info::__pointer_catch): Adjust.
6389
6390 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
6391
6392         * tinfo.h (__user_type_info::contained_virtual_p): New
6393         predicate.
6394         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
6395         shaped heirarchy.
6396         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
6397         diamond shaped heirarchy. Add early out for mixed diamond and
6398         duplicate shaped heirarchy.
6399
6400 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
6401
6402         * cp-tree.h (build_delete): Change prototype.
6403         (build_vec_delete): Likewise.
6404         * call.c (build_scoped_method_call): Use special_function_kind
6405         values to indicate the kind of destruction to be done.
6406         (build_method_call): Likewise.
6407         * decl.c (finish_destructor_body): Likewise.
6408         (maybe_build_cleanup_1): Likewise.  Rename to ...
6409         (maybe_build_cleanup): ... this.
6410         * decl2.c (delete_sanity): Use special_function_kind
6411         values to indicate the kind of destruction to be done.
6412         (build_cleanup): Likewise.
6413         * init.c (perform_member_init): Likewise.
6414         (build_vec_delete_1): Likewise.
6415         (build_dtor_call): Simplify.
6416         (build_delete): Use special_function_kind
6417         values to indicate the kind of destruction to be done.
6418         (build_vbase_delete): Likewise.
6419         (build_vec_delete): Likewise.
6420
6421         * init.c (sort_member_init): Fix typo in error message generation
6422         code.
6423
6424 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
6425
6426         * semantics.c (begin_class_definition): make the packed
6427         attribute be sensitive to the "-fpack-struct" command line flag
6428
6429 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
6430
6431         Update new-abi upcast algorithm.
6432         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
6433         prototype and meaning of return value.
6434         (__si_class_type_info::__do_upcast): Likewise.
6435         (__vmi_class_type_info::__do_upcast): Likewise.
6436         * tinfo.cc (__class_type_info::__upcast_result): Replace
6437         whole2dst with part2dst. Adjust ctor.
6438         (__class_type_info::__do_upcast): Adjust call of worker function.
6439         (__class_type_info::__do_upcast): Adjust.
6440         (__si_class_type_info::__do_upcast): Adjust. Use parent's
6441         __do_upcast.
6442         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
6443         virtual base in diamond heirarchy bug.
6444
6445 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
6446
6447         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
6448         and bitfield to tinfo_fn_p.
6449         (DECL_TINFO_FN_P): Adjust.
6450         (SET_DECL_TINFO_FN_P): Likewise.
6451         (DECL_MUTABLE_P): Likewise.
6452         (DECL_C_BIT_FIELD): Likewise.
6453         (SET_DECL_C_BIT_FIELD): Likewise.
6454         (CLEAR_DECL_C_BIT_FIELD): Likewise.
6455         (DECL_UNINLINABLE): Likewise.
6456         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
6457         (handle_using_decl): Remove assertion.
6458         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
6459         to build FIELD_DECLs.
6460         (build_base_field): Likewise.
6461         (layout_class_type): Likewise.
6462         * decl.c (init_decl_processing): Likewise.
6463         (build_ptrmemfunc_type): Likewise.
6464         (grokdeclarator): Likewise.
6465         * decl2.c (grok_x_components): Likewise.
6466         * except.c (call_eh_info): Likewise.
6467         * init.c (init_init_processing): Likewise.
6468         * rtti.c (expand_class_desc): Likewise.
6469         (create_pseudo_type_info): Likewise.
6470         (get_vmi_pseudo_type_info): Likewise.
6471         (create_tinfo_types): Likewise.
6472         * ptree.c (print_lang_decl): Adjust.
6473         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
6474         before checking DECL_MUTABLE_P.
6475
6476         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
6477         parameters for template functions.
6478         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
6479         destructors as well as constructors.
6480
6481 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
6482
6483         * class.c (build_ctor_vtbl_group): Set inits.
6484         * optimize.c (maybe_clone_body): Set DECL_INLINE and
6485         DECL_THIS_INLINE appropriately for clones.
6486
6487         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
6488         (DECL_CONV_FN_P): Simplify.
6489         (DECL_OPERATOR): Remove.
6490         (language_to_string): Declare.
6491         * decl.c (duplicate_decls): Fix typo in comment.
6492         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
6493         (grok_op_properties): Use DECL_CONV_FN_P instead of
6494         IDENTIFIER_TYPENAME_P.
6495         * dump.c (dequeue_and_dump): Dump the language linkage of
6496         declarations.
6497         * error.c (language_to_string): Give it external linkage.
6498         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
6499         (implicitly_declare_fn): Set DECL_LANGUAGE.
6500         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
6501         IDENTIFIER_TYPENAME_P.
6502         (tsubst_decl): Likewise.
6503         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
6504         * semantics.c (finish_member_declaration): Don't mark members of
6505         classes declared in an extern "C" region as extern "C".
6506
6507 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6508
6509         * decl2.c (qualified_lookup_using_namespace): Look through
6510         namespace aliases.
6511
6512         * decl.c (push_using_decl): Return the old decl on namespace level.
6513
6514 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
6515
6516         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
6517         (VTT_NAME_PREFIX): New macro.
6518         (CTOR_VTBL_NAME_PREFIX): Likewise.
6519         (get_ctor_vtbl_name): New function.
6520         * class.c (get_vtable_name): Simplify.
6521         (get_vtt_name): New function.
6522         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
6523         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
6524         when a virtual base becomes primary.
6525         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
6526         VTTs.
6527         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
6528         additional parameters.
6529         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
6530         (initialize_array): New function.
6531         (build_vtt): Likewise.
6532         (build_vtt_inits): Likewise.
6533         (dfs_build_vtt_inits): Likewise.
6534         (dfs_fixup_binfo_vtbls): Likewise.
6535         (build_ctor_vtbl_group): Likewise.
6536         (initialize_vtable): Use initialize_array.
6537         (accumulate_vtbl_inits): Reimplement to handle construction
6538         vtables.
6539         (dfs_accumulate_vtbl_inits): Likewise.
6540         (bulid_vtbl_initializer): Adjust parameter name.
6541         * method.c (build_typename_overload): Remove #if 0'd code.
6542         (get_ctor_vtbl_name): New function.
6543         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
6544         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
6545
6546         * cp-tree.h (struct lang_type): Remove search_slot.
6547         (CLASSTYPE_SEARCH_SLOT): Remove.
6548         (emit_base_init): Change prototype.
6549         (initialize_vtbl_ptrs): Likewise.
6550         (expand_indirect_vtbls_init): Likewise.
6551         (clear_search_slots): Remove.
6552         * decl.c (lang_mark_tree): Don't mark search_slot.
6553         * init.c (initialize_vtbl_ptrs): Simplify.
6554         (emit_base_init): Likewise.
6555         * search.c (struct vbase_info): Document decl_ptr.
6556         (convert_pointer_to_single_level): Remove.
6557         (dfs_find_vbases): Remove.
6558         (dfs_init_base_pointers): Simplify.
6559         (dfs_clear_vbase_slots): Remove.
6560         (dfs_vtable_path_unmark): New function.
6561         (init_vbase_pointers): Simplify.
6562         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
6563         (expand_indirect_vtbls_init): Simplify.  Don't call
6564         mark_all_temps_used.
6565         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
6566         initialize_vtbl_ptrs.
6567
6568 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
6569
6570         * except.c: Add static prototypes.
6571
6572 2000-05-20  H.J. Lu  <hjl@gnu.org>
6573
6574         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
6575
6576 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
6577
6578         Don't create a separate copy of virtual bases for the
6579         CLASSTYPE_VBASECLASSES list.
6580         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
6581         (BINFO_FOR_VBASE): Remove.
6582         (CANONICAL_BINFO): Adjust.
6583         (binfo_for_vbase): New function.
6584         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
6585         instead of BINFO_FOR_VBASE.
6586         (build_vbase_pointer): Likewise.
6587         (build_secondary_vtable): Likewise.
6588         (dfs_mark_primary_bases): Likewise.
6589         (mark_primary_bases): Likewise.
6590         (layout_nonempty_base_or_field): Likewise.
6591         (dfs_set_offset_for_shared_vbases): Likewise.
6592         (dfs_set_offset_for_unshared_vbases): Likewise.
6593         (layout_virtual_bases): Likewise.  Adjust for changes to the
6594         CLASSTYPE_VBASECLASSES list.
6595         (dump_class_hierarchy_r): Use binfo_for_vbase
6596         instead of BINFO_FOR_VBASE.
6597         (dump_class_hierarchy): Likewise.
6598         (finish_vtbls): Likewise.
6599         (build_vtbl_initializer): Adjust for changes to the
6600         CLASSTYPE_VBASECLASSES list.
6601         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
6602         * decl.c (finish_destructor_body): Adjust for changes to the
6603         CLASSTYPE_VBASECLASSES list.
6604         * init.c (sort_base_init): Use binfo_for_vbase.
6605         (construct_virtual_bases): Adjust for changes to the
6606         CLASSTYPE_VBASECLASSES list.
6607         (expand_member_init): Use binfo_for_vbase.
6608         (build_vbase_delete):  Adjust for changes to the
6609         CLASSTYPE_VBASECLASSES list.
6610         * method.c (do_build_copy_constructor): Likewise.
6611         * rtti.c (get_base_offset): Use binfo_for_vbase.
6612         (expand_class_desc): Remove #if 0'd code.
6613         * search.c (struct vbase_info): Remove vbase_types.
6614         (get_base_distance):  Use binfo_for_vbase.
6615         (lookup_field_queue_p): Use CANONICAL_BINFO.
6616         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
6617         (get_pure_virtuals): Adjust for changes to the
6618         CLASSTYPE_VBASECLASSES list.
6619         (dfs_find_vbases): Use binfo_for_vbase.
6620         (dfs_init_vbase_pointers): Likewise.
6621         (init_vbase_pointers): Don't initialize vi.vbase_types.
6622         (virtual_context): Use binfo_for_vbase.
6623         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
6624         CLASSTYPE_VBASECLASSES list.
6625         (expand_indirect_vtbls_init): Simplify.
6626         (dfs_get_vbase_types): Don't replicate virtual bases.
6627         (find_vbase_instance): Use binfo_for_vbase.
6628         (binfo_for_vbase): New function.
6629         * typeck.c (get_delta_difference): Use binfo_for_vbase.
6630
6631 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
6632
6633         * decl2.c (finish_anon_union): Generalize error messages to handle
6634         anonymous structures.
6635         * init.c (perform_member_init): Remove `name' parameter.
6636         (build_field_list): New function.
6637         (sort_member_init): Handle anonymous union initialization order
6638         correctly.  Check for multiple initializations of the same union.
6639         (emit_base_init): Don't look up fields by name here.
6640         (expand_member_init): Record the result of name lookup for future
6641         reference.
6642         * typeck.c (build_component_ref): Fix formatting.
6643
6644 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
6645
6646         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
6647         * typeck.c (build_x_compound_expr): Replace warn_unused with
6648         warn_unused_value.
6649
6650         * decl2.c (lang_decode_option): Update -Wall unused flags by
6651         calling set_Wunused.
6652
6653 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
6654
6655         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
6656         * init.c (dfs_vtable_path_unmark): Remove.
6657         * search.c (marked_new_vtable_p): Likewise.
6658         (unmarked_new_vtable_p): Likewise.
6659         (dfs_search_slot_nonempty_p): Likewise.
6660         (dfs_mark): Likewise.
6661         (dfs_vtable_path_unmark): Likewise.
6662         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
6663         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
6664         (dfs_init_vbase_pointers): Remove special-case new ABI code.
6665         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
6666         (init_vbase_pointers): Simplify.
6667         (expand_indirect_vtbls_init): Likewise.
6668
6669         * class.c (copy_virtuals): New function.
6670         (build_primary_table): Use it.
6671         (build_secondary_vtable): Likewise.
6672         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
6673         indicate that no vcall offset is required.
6674         (add_virtual_function): Likewise.
6675         (modify_all_vtables): Likewise.
6676         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
6677         (dfs_accumulate_vtbl_inits): Likewise.
6678         (build_vtbl_initializer): Make changes to handle construction
6679         vtables.
6680         (dfs_build_vcall_offset_vtbl_entries): Likewise.
6681         (build_rtti_vtbl_entries): Likewise.
6682         (build_vtable_entries): Handle a NULL vcall_index.
6683
6684 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
6685
6686         * decl2.c (lang_decode_option): Fix thinko.
6687
6688 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
6689
6690         * except.c (check_handlers): New fn.
6691         * cp-tree.h: Declare it.
6692         * semantics.c (finish_handler_sequence): Call it.
6693         (finish_function_handler_sequence): Likewise.
6694         (finish_handler_parms): Set TREE_TYPE on the handler.
6695         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
6696         * search.c (get_base_distance_recursive): If protect>1, ignore
6697         special access.
6698         (get_base_distance): Don't reduce watch_access.
6699
6700 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
6701
6702         * lex.c: #include diagnostic.h.
6703         (lang_init_options): Set default prefixing rules.
6704
6705         * lang-options.h: Add -fdiagnostics-show-location=.
6706
6707         * decl2.c: #include diagnostic.h.
6708         (lang_decode_option): Handle -fdiagnostics-show-location=.
6709
6710 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
6711
6712         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
6713         * vec.cc: Revert my 2000-05-07 change.
6714
6715 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
6716
6717         * class.c (check_field_decls): Complain about non-static data
6718         members with same name as class in class with constructor.
6719
6720 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
6721
6722         * decl.c (grokdeclarator): Allow non-static data members with
6723         same name as class.
6724
6725 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
6726
6727         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
6728         and pending_inline.filename.  Update prototypes.
6729         * decl.c (define_label): Constify filename parameter.
6730         * decl2.c (warn_if_unknown_interface): Constify local char *.
6731         * input.c Constify input_source.filename. Don't declare
6732         input_filename or lineno.  Constify filename parameter to feed_input.
6733         * lex.c (init_parse): Constify parameter and return value.
6734         (cp_pragma_interface, cp_pragma_implementation): Constify
6735         filename argument.
6736         (reinit_parse_for_method, reinit_parse_for_block,
6737         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
6738         Constify local char *.
6739         * pt.c: Don't declare lineno or input_filename.
6740         (print_template_context, tsubst_friend_function, tsubst_decl,
6741         tsubst, instantiate_decl): Constify local char *.
6742         * semantics.c (expand_body): Constify local char *.
6743         * tree.c (build_srcloc): Constify filename parameter.
6744         * typeck.c (c_expand_asm_operands): Constify filename
6745         parameter.
6746
6747 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
6748
6749         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
6750         offsetof expansion.
6751
6752 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
6753
6754         * inc/cxxabi.h:  Fix typos in comment.
6755         (__base_class_info::__offset): Use a static_cast.
6756
6757 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
6758
6759         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
6760         of std::size_t and std::ptrdiff_t respectively.
6761         * tinfo.cc: Likewise.
6762         * vec.cc: Likewise.
6763
6764 2000-05-06  Richard Henderson  <rth@cygnus.com>
6765
6766         * typeck.c (build_c_cast): Don't warn integer->pointer size
6767         mismatch for constants.
6768
6769 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
6770
6771         * rtti.c (ptmd_initializer): Set non-public, if class is
6772         incomplete.
6773
6774         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
6775         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6776         __cxa_vec_delete): Likewise.
6777         * tinfo.cc (__dynamic_cast): Likewise.
6778         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6779         __cxa_vec_delete): Likewise.
6780
6781 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
6782
6783         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
6784         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
6785         (lang_decl_flags): Add vcall_offset.
6786         (THUNK_VCALL_OFFSET): Use it.
6787         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
6788         * method.c (make_thunk): Create the lang_decl here, not in
6789         emit_thunk.
6790         (emit_thunk): Make generic thunks into ordinary functions once
6791         they have been fed to expand_body.
6792         * semantics.c (expand_body): Set current_function_is_thunk here.
6793
6794 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6795
6796         * class.c (update_vtable_entry_for_fn): Prototype.
6797
6798         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
6799         and `tmpl'.
6800
6801         * search.c (dfs_build_inheritance_graph_order): Prototype.
6802
6803 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
6804
6805         * cp-tree.h (special_function_kind): Add various kinds of
6806         destructors.
6807         (special_function_p): New function.
6808         * class.c (overrides): Don't let one kind of destructor override
6809         another.
6810         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
6811         whether or not to instantiate a template.
6812         * tree.c (special_function_p): Define.
6813
6814 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
6815
6816         * cp-tree.def (THUNK_DECL): Remove.
6817         * cp-tree.h (DECL_THUNK_P): New macro.
6818         (DECL_NON_THUNK_FUNCTION_P): Likewise.
6819         (DECL_EXTERN_C_FUNCTION_P): Likewise.
6820         (SET_DECL_THUNK_P): Likewise.
6821         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
6822         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
6823         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
6824         * decl.c (decls_match): Use DECL_EXTERN_C_P.
6825         (duplicate_decls): Likewise.
6826         (pushdecl): Likewise.  Adjust thunk handling.
6827         (grokfndecl): Use DECL_EXTERN_C_P.
6828         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
6829         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
6830         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
6831         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
6832         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
6833         DECL_NO_STATIC_CHAIN.
6834         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
6835         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
6836         * search.c (covariant_return_p): Remove THUNK_DECL handling.
6837         * ir.texi: Update.
6838
6839 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
6840
6841         * tree.c (walk_tree): Set lineno.
6842
6843 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
6844
6845         * exception.cc: Update license notice.
6846         * new.cc: Likewise.
6847         * new1.cc: Likewise.
6848         * new2.cc: Likewise.
6849         * tinfo.cc: Likewise.
6850         * tinfo2.cc: Likewise.
6851         * vec.cc: Likewise.
6852         * inc/cxxabi.h: Likewise.
6853         * inc/exception: Likewise.
6854         * inc/new: Likewise.
6855         * inc/new.h: Likewise.
6856         * inc/typeinfo: Likewise.
6857
6858 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
6859
6860         * tree.c (build_target_expr_with_type): If we already have a
6861         TARGET_EXPR, just return it.
6862
6863         * optimize.c (initialize_inlined_parameters): Don't generate an
6864         EXPR_STMT if we can just use DECL_INITIAL.
6865         * decl.c (emit_local_var): Only make the initialization a
6866         full-expression if stmts_are_full_exprs_p.
6867
6868 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
6869
6870         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
6871         macro.
6872         * call.c (standard_conversion): Use it.
6873         (direct_reference_binding): Likewise.
6874         (build_over_call): Likewise.
6875         (is_properly_derived_from): Likewise.
6876         (compare_ics): Likewise.
6877         * class.c (resolves_to_fixed_type_p): Likewise.
6878         * optimize.c (declare_return_variable): Likewise.
6879         * pt.c (is_specialization_of): Likewise.
6880         (unify): Likewise.
6881         * typeck.c (comp_target_parms): Likeiwse.
6882         (build_static_cast): Likewise.
6883         (build_reinterpret_cast): Likewise.
6884         (build_const_cast): Likewise.
6885         (comp_ptr_ttypes_real): Likewise.
6886         (comp_ptr_ttypes_const): Likewise.
6887         * typeck2.c (process_init_constructor): Likewise.
6888
6889 2000-04-30  Scott Snyder <snyder@fnal.gov>
6890
6891         * decl.c (finish_destructor_body): Use the base destructor when
6892         destroying virtual bases.
6893
6894 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
6895
6896         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
6897         STMT_EXPRs.
6898         * optimize.c (struct inline_data): Add target_exprs field.
6899         (declare_return_variable): When a function returns an aggregate,
6900         use the variable declared in the TARGET_EXPR as the remapped
6901         DECL_RESULT.
6902         (expand_call_inline): Update the pending target_exprs stack.
6903         (optimize_function): Initialize the stack.
6904
6905         * decl2.c (finish_file): Fix typo in comment.
6906
6907         * method.c (emit_thunk): Don't try to return a `void' value.
6908
6909         * optimize.c (initialize_inlined_parameters): If the parameter is
6910         addressable, we need to make a new VAR_DECL, even if the
6911         initializer is constant.
6912
6913 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
6914
6915         * decl.c (grok_op_properties): Add an extra check of argtypes.
6916
6917 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
6918
6919         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
6920         variables.
6921         (initialize_inlined_parameters): Try to avoid creating new
6922         VAR_DECLs.
6923
6924 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
6925
6926         * lex.c (my_get_run_time): Remove.
6927         (init_filename_times): Use get_run_time instead of my_get_run_time.
6928         (check_newline): Likewise.
6929         (dump_time_statistics): Likewise.
6930         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
6931         of computing elapsed time explicitly.
6932
6933 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
6934
6935         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
6936         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
6937         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
6938         before calling decl_constant_value.
6939         * class.c (check_bitfield_decl): Likewise.
6940         * cvt.c (ocp_convert): Likewise.
6941         (convert): Likewise.
6942         * decl.c (compute_array_index_type): Likewise.
6943         (build_enumerator): Likewise.
6944         * decl2.c (check_cp_case_value): Likewise.
6945         * pt.c (convert_nontype_argument): Likewise.
6946         (tsubst): Likewise.
6947         * typeck.c (decay_conversion): Likewise.
6948         (build_compound_expr): Likewise.
6949         (build_reinterpret_cast): Likewise.
6950         (build_c_cast): Likewise.
6951         (convert_for_assignment): Likewise.
6952
6953 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
6954
6955         * decl.c (finish_function): Don't play games with DECL_INLINE.
6956
6957 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
6958
6959         * ir.texi: Correct typo.
6960
6961 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6962
6963         * decl.c (grokdeclarator): Reject VLAs as members.
6964
6965 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
6966
6967         * call.c (standard_conversion): Accept conversion between
6968         COMPLEX_TYPEs.
6969
6970         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
6971
6972 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
6973
6974         * decl2.c (finish_file): Remove double setup for accounting
6975         compile time.
6976
6977 2000-04-24  Robert Lipe <robertlipe@usa.net>
6978
6979         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
6980
6981 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
6982
6983         * new.cc (set_new_handler): Needs to be in std::.
6984
6985 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
6986
6987         * cp-tree.h (lang_decl): Remove pretty_function_p.
6988         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
6989         language-specific node.
6990         * decl.c (cp_make_fname_decl): Use build_decl, not
6991         build_lang_decl, to build the variables.
6992         (grokvardecl): Don't call build_lang_decl for local variables in
6993         templates.
6994         (grokdeclarator): Don't call build_lang_decl for local type
6995         declarations in templates.
6996         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
6997         zero'd memory, rather than calling memset.
6998         * pt.c: Include hashtab.h.
6999         (local_specializations): New variable.
7000         (retrieve_local_specialization): Use it.
7001         (register_local_specialization): Likewise.
7002         (tsubst_decl): Don't assume local variables have
7003         DECL_LANG_SPECIFIC.
7004         (instantiate_decl): Set up local_specializations.
7005         * Makefile.in (HTAB_H): New variable.
7006
7007 2000-04-23  Richard Henderson  <rth@cygnus.com>
7008
7009         * typeck.c (c_expand_asm_operands): Restore the original
7010         contents of the output list.
7011
7012 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
7013
7014         * ir.texi:  Document complex number representation.
7015
7016 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7017
7018         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
7019         (target_incomplete_p): New function.
7020         (tinfo_base_init): Create comdat NTBS name variable.
7021         (ptr_initializer): Add non_public parameter. Calculate it.
7022         (ptmd_initializer): Likewise.
7023         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
7024         (create_real_tinfo_var): Add non_public parameter. Use it.
7025         Push proxy into global namespace.
7026         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
7027         New enumeration.
7028         * inc/typeinfo (type_info::before, type_info::operator==):
7029         Compare __name addresses.
7030
7031         * tinfo2.cc: Remove new-abi builtins comment.
7032
7033 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
7034
7035         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
7036
7037         * call.c (joust): Exit early if we get the same function, too.
7038
7039         * decl2.c (key_method): Return NULL_TREE for template classes.
7040         (import_export_class): Don't need to check for template classes.
7041
7042 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
7043
7044         * lex.c: Remove references to cccp.c.
7045
7046 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
7047
7048         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
7049         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
7050         (DECL_DESTRUCTOR_P): Use destructor_attr.
7051         (DECL_CONST_MEMFUNC_P): Reimplement.
7052         (DECL_VOLATILE_MEMFUNC_P): Remove.
7053         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
7054         (overrides): Use DECL_DESTRUCTOR_P.
7055         (check_for_override): Likewise.
7056         * decl.c (start_function): Likewise.
7057         * decl2.c (grokfclassfn): Likewise.
7058         (check_classfn): Likewise.
7059         (grok_function_init): Likewise.
7060
7061 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
7062
7063         * decl2.c (grokfield): Issue error on illegal data member
7064         declaration.
7065
7066 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
7067
7068         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
7069
7070 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
7071
7072         * class.c (build_vtable_entry): Don't build thunks for type-info
7073         functions.
7074
7075 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
7076
7077         * decl.c (decls_match): Allow a redeclaration of a builtin to
7078         specify args while the builtin did not.
7079
7080 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
7081
7082         * cp-tree.def (THUNK_DECL): Add to documentation.
7083         * cp-tree.h (flag_huge_objects): Declare.
7084         * class.c (modify_vtable_entry): Tidy.
7085         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
7086         Calculate delta appropriately for the new ABI.
7087         (dfs_modify_vtables): Use it.
7088         (modify_all_vtables): Fix thinko in code to add overriding copies
7089         of functions to primary vtables.
7090         (build_clone): Fix typo in comment.
7091         (clone_function_decl): Correct order of destructors in vtable.
7092         (build_vbase_offset_vtbl_entries): Adjust comment.
7093         (dfs_vcall_offset_queue_p): Remove.
7094         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
7095         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
7096         (build_vtable_entry): Correct check for pure virtual functions.
7097         Don't declare flag_huge_objects.
7098         * decl.c (flag_huge_objects): Remove declaration.
7099         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
7100         Use int_size_in_bytes.
7101         (emit_thunk): Handle vcall offset thunks.
7102
7103 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7104
7105         * decl2.c (parse_time, varconst_time): Delete declarations.
7106         (finish_file): Delete LINENO declaration.
7107         START_TIME and THIS_TIME now long.
7108
7109 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
7110
7111         * class.c (build_base_field): Reformat comment.
7112
7113         * inc/cxxabi.h (stddef.h): Comment inclusion.
7114         (__base_class_info::__offset): Comment shift.
7115
7116 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
7117
7118         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
7119         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
7120         (cp_push_exception_identifier): New macro.
7121         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
7122         (DECL_BASE_DESTRUCTOR_P): Likewise.
7123         (DECL_DELETING_DESTRUCTOR_P): Likewise.
7124         (get_vtbl_decl_for_binfo): Fix formatting.
7125         (in_charge_arg_for_name): New macro.
7126         (maybe_build_cleanup_and_delete): Remove declaration.
7127         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
7128         (in_charge_arg_for_name): New function.
7129         (build_new_method_call): Use it.  Handle cloned destructors.
7130         (build_clone): Don't make the base constructor virtual.
7131         Automatically defer generated functions.
7132         (clone_function_decl): Handle destructors, too.
7133         (clone_constructors_and_destructors): Likewise.
7134         (create_vtable_ptr): Don't create a vtable entry for a cloned
7135         function.
7136         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
7137         (initialize_predefined_identifiers): Update appropriately.
7138         (finish_destructor_body): Simplify.
7139         (maybe_build_cleanup_and_delete): Remove.
7140         * except.c (expand_throw): Handle new-ABI destructors.
7141         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
7142         (build_dtor_call): New function.
7143         (build_delete): Use it.  Simplify.
7144         * optimize.c (maybe_clone_body): Handle destructors.
7145         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
7146
7147         * exception.cc (cleanup_fn): New typedef.
7148         (CALL_CLEANUP): New macro.
7149         (cp_eh_info): Use them.
7150         (__cp_push_exception): Likewise.
7151         (__cp_pop_exception): Likewise.
7152
7153 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
7154
7155         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
7156         (complete_dtor_identifier): New macro.
7157         (CLASSTYPE_FIRST_CONVERSION): Remove.
7158         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
7159         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
7160         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
7161         (CLASSTYPE_CONSTRUCTORS): Likewise.
7162         (CLASSTYPE_DESTRUCTORS): Likewise.
7163         (lang_decl): Add cloned_function.
7164         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
7165         (DECL_BASE_CONSTRUCTOR_P): Likewise.
7166         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
7167         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
7168         (DECL_CLONED_FUNCTION_P): Likewise.
7169         (DECL_CLONED_FUNCTION): Likewise.
7170         (clone_function_decl): Declare.
7171         (maybe_clone_body): Likewise.
7172         * call.c (build_user_type_conversion_1): Call complete object
7173         constructors in the new ABI.
7174         (build_new_method_call): Don't add in-charge parameters under the
7175         new ABI.
7176         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
7177         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
7178         CLASSTYPE_DESTRUCTOR_SLOT.
7179         (build_clone): New function.
7180         (clone_function_decl): Likewise.
7181         (clone_constructors_and_destructors): Likewise.
7182         (check_bases_and_members): Use it.
7183         * decl.c (iniitialize_predefined_identifiers): Initialize
7184         complete_dtor_identifier.
7185         (finish_function): Don't add extra code to a clone.
7186         (lang_mark_tree): Mark cloned_function.
7187         * decl2.c (mark_used): Don't bother trying to instantiate things
7188         we synthesized.
7189         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
7190         * method.c (set_mangled_name_for_decl): Don't treat clones as
7191         constructors.
7192         (synthesize_method): Sythesize cloned functions, not the clones.
7193         * optimize.c (inline_data): Update comment on ret_label.
7194         (remap_block): Don't assume DECL_INITIAL exists.
7195         (copy_body_r): Allow ret_label to be NULL.
7196         (maybe_clone_body): Define.
7197         * pt.c (tsubst_decl): Handle clones.
7198         (instantiate_clone): New function.
7199         (instantiate_template): Use it.
7200         (set_mangled_name_for_template_decl): Don't treat clones as
7201         constructors.
7202         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
7203         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
7204         * semantics.c (expand_body): Clone function bodies as necessary.
7205
7206         * optimize.c (remap_decl): Avoid sharing structure for arrays
7207         whose size is only known at run-time.
7208         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
7209
7210         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
7211         to has_in_charge_parm_p.
7212         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
7213         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
7214         (DECL_COPY_CONSTRUCTOR_P): New macro.
7215         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
7216         (build_user_type_conversion_1): Likewise.
7217         (convert_like_real): Likewise.
7218         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
7219         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
7220         (copy_args_p): Likewise.
7221         (grok_ctor_properties): Likewise.
7222         (start_function): Likewise.
7223         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
7224         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
7225         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
7226         * method.c (do_build_copy_constructor): Use
7227         DECL_HAS_IN_CHARGE_PARM_P.
7228         (synthesize_method): Likewise.
7229         * pt.c (instantiate_template): Remove goto.
7230         * tree.c (build_cplus_method_type): Remove mention of obstacks in
7231         comment.
7232
7233         * cp-tre.h (finish_function): Change prototype.
7234         * decl.c (end_cleanup_fn): Adjust caller.
7235         (finish_function): Take only one parameter.
7236         * decl2.c (finish_objects): Adjust caller.
7237         (finish_static_storage_duration_function): Likewise.
7238         * method.c (emit_thunk): Likewise.
7239         * parse.y: Likewise.
7240         * parse.c: Regenerated.
7241         * pt.c (instantiate_decl): Likewise.
7242         * rtti.c (synthesize_tinfo_fn): Likewise.
7243         * semantics.c (expand_body): Likewise.
7244
7245         * cp-tree.h (copy_decl): New function.
7246         * class.c (finish_struct_1): Use it.
7247         * lex.c (copy_decl): Define it.
7248         * pt.c (tsubst_decl): Likewise.
7249         * tree.c (copy_template_template_parm): Likewise.
7250
7251         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
7252         has_nonpublic_assign_ref.
7253         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
7254         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
7255         * class.c (finish_struct_methods): Don't set
7256         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
7257         (interface_only): Don't declare.
7258         (interface_unknown): Likewise.
7259
7260 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7261
7262         * tree.h (HAVE_TEMPLATES): Remove definition.
7263         * lang-options.h (-fthis-is-variable): Remove documentation.
7264
7265 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
7266
7267         * class.c (instantiate_type): Handle object-relative template-id.
7268
7269         * semantics.c (finish_expr_stmt): Call convert_to_void here.
7270         * decl.c (cplus_expand_expr_stmt): Not here.
7271
7272         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
7273         Initialize exprtype earlier.
7274
7275         * parse.y (fn.def1): Check for defining types in return types.
7276
7277         * decl.c (check_tag_decl): Notice extra fundamental types.
7278         Diagnose empty decls in classes, too.
7279
7280         * decl.c (grokdeclarator): Don't override an anonymous name if no
7281         declarator was given.
7282
7283         * cvt.c (convert_to_void): Call resolve_offset_ref.
7284
7285         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
7286
7287         * decl2.c (decl_namespace): Handle getting a type.
7288
7289         * typeck.c (build_c_cast): Re-enable warning for cast between
7290         pointer and integer of different size.
7291
7292 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
7293
7294         * inc/cxxabi.h (__pointer_type_info): Add restrict and
7295         incomplete flags.
7296         (__pointer_type_info::__pointer_catch): New virtual function.
7297         (__pointer_to_member_type_info): Derive from
7298         __pointer_type_info. Adjust.
7299         (__pointer_to_member_type_info::__do_catch): Remove.
7300         (__pointer_to_member_type_info::__is_pointer_p): Declare.
7301         (__pointer_to_member_type_info::__pointer_catch): Declare.
7302         * rtti.c (qualifier_flags): Add restrict flag.
7303         (ptmd_initializer): Reorder members.
7304         (create_tinfo_types): Expand comments. Reorder
7305         ptmd_desc_type_node members.
7306         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
7307         Implement.
7308         (__pointer_type_info::__do_catch): Move specific code into
7309         __pointer_catch. Call it.
7310         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
7311         specific catch checking. Fix void conversion check.
7312         (__pointer_to_member_type_info::__do_catch): Remove.
7313         (__pointer_to_member_type_info::__pointer_catch): Implement.
7314
7315 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7316
7317         * lex.c (init_parse): Remove traces of classof and headof.
7318         * decl2.c (flag_operator_names): Default to 1.
7319         (lang_decode_option): Do not set it for -ansi.
7320
7321 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
7322
7323         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
7324         (DECL_MAIN_VARIANT): Remove.
7325         * decl.c (duplicate_decls): Don't set it.
7326         (start_function): Likewise.
7327         (lang_mark_tree): Don't mark it.
7328         * decl2.c (defer_fn): Don't use it.
7329         * lex.c (retrofit_lang_decl): Don't set it.
7330         * pt.c (tsubst_decl): Likewise.
7331         * ptree.c (print_lang_decl): Don't print it.
7332         * typeck.c (mark_addressable): Don't use it.
7333
7334 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
7335
7336         * vec.cc: Include <new> and <exception>.
7337         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
7338         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
7339         terminate.
7340         (__cxa_vec_delete): Catch dtor exceptions.
7341
7342 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
7343
7344         Prepend __ to implementation defined names.
7345         * inc/typeinfo (type_info): Rename _name to __name.
7346         (type_info::type_info): Rename parameter.
7347         (type_info::operator==, type_info::operator!=,
7348         type_info::before): Likewise.
7349         (type_info::is_pointer_p, type_info::is_function_p,
7350         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
7351         parameters.
7352         * inc/cxxabi.h
7353         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
7354         (__pointer_type_info::__pointer_type_info): Likewise.
7355         (__pointer_type_info::is_pointer_p,
7356         __pointer_type_info::do_catch): Prepend __. Rename parameters.
7357         (__array_type_info::__array_type_info): Rename parameters.
7358         (__function_type_info::__function_type_info): Likewise.
7359         (__function_type_info::is_function_p): Prepend __.
7360         (__enum_type_info::__enum_type_info): Rename parameters.
7361         (__pointer_to_member_type_info::__pointer_to_member_type_info):
7362         Likewise.
7363         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
7364         parameters.
7365         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
7366         (__class_type_info::__class_type_info): Rename parameters.
7367         (__class_type_info::sub_kind): Prepend __. Adjust member names.
7368         (__class_type_info::upcast_result,
7369         __class_type_info::dyncast_result): Prepend __. Move definition
7370         into tinfo.cc.
7371         (__class_type_info::do_upcast, __class_type_info::do_catch,
7372         __class_type_info::find_public_src,
7373         __class_type_info::do_dyncast,
7374         __class_type_info::do_find_public_src): Prepend __. Rename
7375         parameters.
7376         (__si_class_type_info::__si_class_type_info): Rename parameters.
7377         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
7378         __si_class_type_info::do_find_public_src): Prepent __. Rename
7379         parameters.
7380         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
7381         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
7382         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
7383         parameters.
7384         (__dynamic_cast): Rename parameters.
7385         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
7386         type_info::do_catch, type_info::do_upcast): Prepend __.
7387         (contained_p, public_p, virtual_p, contained_public_p,
7388         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
7389         (__class_type_info::do_catch,
7390         __class_type_info::do_upcast): Prepend __. Adjust.
7391         (__class_type_info::__upcast_result,
7392         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
7393         Adjust.
7394         (__class_type_info::find_public_src): Prepend __. Adjust.
7395         (__class_type_info::do_find_public_src,
7396         __si_class_type_info::do_find_public_src,
7397         __vmi_class_type_info::do_find_public_src): Likewise.
7398         (__class_type_info::do_dyncast,
7399         __si_class_type_info::do_dyncast,
7400         __vmi_class_type_info::do_dyncast): Likewise.
7401         (__class_type_info::do_upcast,
7402         __si_class_type_info::do_upcast,
7403         __vmi_class_type_info::do_upcast): Likewise.
7404         (__dynamic_cast): Adjust.
7405         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
7406         (__function_type_info::is_function_p): Likewise.
7407         (__pointer_type_info::do_catch): Likewise. Adjust.
7408         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
7409         (__throw_type_match_rtti_2): Adjust.
7410         (__is_pointer): Adjust.
7411
7412 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
7413
7414         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
7415         (complete_ctor_identifier): New macro.
7416         (special_function_kind): Add sfk_copy_constructor and
7417         sfk_assignment_operator.
7418         (LOOKUP_HAS_IN_CHARGE): Remove.
7419         (cons_up_default_function): Rename to ...
7420         (implicitly_declare_fn): ... this.
7421         * call.c (build_new_method_call): Add in-charge parameters for
7422         constructors here.
7423         * class.c (add_implicitly_declared_members): Change parameter name
7424         from cant_have_assignment to cant_have_const_assignment.
7425         Replace calls to cons_up_default_function to implicitly_declare_fn.
7426         * cvt.c (ocp_convert): Use complete_ctor_identifier.
7427         * decl.c (initialize_predefined_identifiers): Initialize it.
7428         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
7429         complex expression.
7430         * init.c (expand_default_init): Don't calculate the in-charge
7431         parameter here.
7432         (build_new_1): Likewise.
7433         * lex.c (cons_up_default_function): Move to method.c.
7434         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
7435         (implicitly_declare_fn): New function.
7436         * typeck.c (build_static_cast): Use complete_ctor_identifier.
7437         (build_modify_expr): Likewise.
7438         * typeck2.c (build_functional_cast): Likewise.
7439
7440         Under the new ABI, constructors don't return `this'.
7441         * cp-tree.h (warn_reorder): Declare.
7442         (special_function_kind): New enum.
7443         (global_base_init_list): Remove declaration.
7444         (emit_base_init): Don't return a value.
7445         (check_base_init): Don't declare.
7446         (is_aggr_typedef): Likewise.
7447         * decl.c (check_special_function_return_type): New function.
7448         (return_types): Remove.
7449         (grokdeclarator): Use check_special_function_return_type.
7450         (start_function): Don't initialize ctor_label under the new ABI.
7451         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
7452         * init.c (begin_init_stmts): Move to top of file.
7453         (finish_init_stmts): Likewise.
7454         (warn_reorder): Don't declare.
7455         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
7456         value.
7457         (check_base_init): Remove.
7458         (is_aggr_typedef): Likewise.
7459         (build_new_1): Don't use the return value of a constructor.
7460         * semantics.c (setup_vtbl_ptr): Don't use the return value
7461         of emit_base_init.
7462         * typeck.c (check_return_expr): Don't magically convert return
7463         statements into `return this' in constructors under the new ABI.
7464
7465         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
7466         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
7467         (base_ctor_identifier): New macro.
7468         (base_dtor_identifier): Likewise.
7469         (deleting_dtor_identifier): Likewise.
7470         * decl.c: Don't include obstack.h.
7471         (obstack_chunk_alloc): Don't define.
7472         (obstack_chunk_free): Likewise.
7473         (struct predefined_identifier): New type.
7474         (initialize_predefined_identifiers): New function.
7475         (init_decl_processing): Use it.
7476         (debug_temp_inits): Remove.
7477         (start_method): Don't call preserve_data.
7478         (hack_incomplete_structures): Update comment.
7479         * init.c (init_init_processing): Don't initialize
7480         nelts_identifier.
7481         (build_offset_rf): Remove dead code.
7482         (build_delete): Use CLASSTYPE_N_BASECLASSES.
7483         * search.c (init_search_processing): Don't initialize
7484         vptr_identifier.
7485
7486 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7487
7488         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
7489         some sign_compare warnings.
7490
7491 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
7492
7493         Rename abi::__vmi_class_type_info members.
7494         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
7495         base_list, detail_masks members to vmi_flags, vmi_base_count,
7496         vmi_bases and vmi_flags_masks respectively.
7497         (__vmi_class_type_info::vmi_flags_masks): Rename
7498         details_unknown_mask to flags_unknown_mask.
7499         * tinfo.cc (__class_type_info::do_upcast): Adjust.
7500         (__vmi_class_type_info::do_find_public_src): Adjust.
7501         (__vmi_class_type_info::do_dyncast): Adjust.
7502         (__vmi_class_type_info::do_upcast): Adjust.
7503
7504 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
7505
7506         * tinfo.cc (convert_to_base): New function.
7507         (get_vbase_offset): Remove. Move into convert_to_base.
7508         (__vmi_class_type_info::do_find_public_src): Adjust.
7509         (__vmi_class_type_info::do_dyncast): Adjust.
7510         (__vmi_class_type_info::do_upcast): Adjust.
7511
7512 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
7513
7514         * tinfo.cc (operator=): Use __builtin_strcmp.
7515         * tinfo2.cc (before): Likewise.
7516
7517 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
7518
7519         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
7520         (DECL_SAVED_INLINE): Rename to ...
7521         (DECL_DEFERRED_FN): ... this.
7522         (in_function_p): Remove declaration.
7523         (mark_inline_for_output): Rename to ...
7524         (defer_fn): ... this.
7525         * decl.c (finish_function): Adjust call to mark_inline_for_output.
7526         (in_function_p): Remove definition.
7527         * decl2.c (saved_inlines): Rename to ...
7528         (deferred_fns): ... this.
7529         (saved_inlines_used): Rename to ...
7530         (deferred_fns_used): ... this.
7531         (mark_inline_for_output): Rename to ...
7532         (defer_fn): ... this.
7533         (finish_file): Adjust accordingly.
7534         (init_decl2): Likewise.
7535         * lex.c (cons_up_default_function): Likewise.
7536         * pt.c (mark_decl_instantiated): Likewise.
7537         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
7538         circumstances.
7539         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
7540         * semantics.c (expand_body): Defer more functions.
7541
7542 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
7543
7544         * vec.cc: New file.
7545         * Make-lang.in (CXX_LIB2FUNCS): Add it.
7546         (vec.o): Build it.
7547         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
7548         __cxa_vec_delete): Declare.
7549
7550 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
7551
7552         * rtti.c (dfs_class_hint_mark): New static function.
7553         (dfs_class_hint_unmark): New static function.
7554         (class_hint_flags): Use them.
7555
7556 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
7557
7558         * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
7559
7560 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
7561
7562         * cp-tree.h (instantiate_decl): Change prototype.
7563         * decl2.c (mark_used): Adjust call.
7564         * optimize.c (inlinable_function_p): Adjust handling of templates.
7565         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
7566         (do_type_instantiation): Likewise.
7567         (instantiate_decl): Defer more templates.
7568         (instantiate_pending_templates): Adjust logic to handle inline
7569         friend functions.
7570
7571         * Makefile.in (GGC_H): New variable.  Use it throughout in place
7572         of ggc.h.
7573
7574         * call.c: Don't include obstack.h.  Include ggc.h.
7575         (obstack_chunk_alloc): Don't define.
7576         (obstack_chunk_free): Likewise.
7577         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
7578         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
7579         (pop_switch): Free it.
7580
7581         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
7582
7583         * dump.c (dequeue_and_dump): Don't try to print the bit_position
7584         if we don't have a DECL_FIELD_OFFSET.
7585
7586 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
7587
7588         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
7589         special_function_p.
7590
7591 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7592
7593         * cfns.gperf (hash, libc_name_p): Prototype.
7594
7595         * rtti.c (build_dynamic_cast_1): Constification.
7596
7597         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
7598
7599         * semantics.c (deferred_type_access_control): Prototype.
7600
7601 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
7602
7603         Correct many new ABI issues regarding vbase and vcall offset
7604         layout.
7605         * cp-tree.h (BINFO_VTABLE): Document.
7606         (struct lang_type): Tweak formatting.
7607         (BINFO_PRIMARY_BINFO): Add to documentation.
7608         (CLASSTYPE_VSIZE): Fix typo in comment.
7609         (CLASSTYPE_VBASECLASSES): Update documentation.
7610         (BINFO_VBASE_MARKED): Remove.
7611         (SET_BINFO_VBASE_MARKED): Likewise.
7612         (CLEAR_BINFO_VBASE_MARKED): Likewise.
7613         (BINFO_FIELDS_MARKED): Remove.
7614         (SET_BINFO_FIELDS_MARKED): Likewise.
7615         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
7616         (enum access_kind): New enumeration.
7617         (num_extra_vtbl_entries): Remove declaration.
7618         (size_extra_vtbl_entries): Likewise.
7619         (get_vtbl_decl_for_binfo): New function.
7620         (dfs_vbase_unmark): Remove declaration.
7621         (mark_primary_bases): Likewise.
7622         * class.c (SAME_FN): Remove.
7623         (struct vcall_offset_data_s): Move definition.
7624         (build_vbase_pointer): Use `build', not `build_binary_op', to
7625         access the vbase pointer under the new ABI.
7626         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
7627         (build_primary_vtable): Likewise.
7628         (dfs_mark_primary_bases): Move here from search.c.
7629         (mark_primary_bases): Likewise.
7630         (determine_primary_bases): Under the new ABI, don't make a base
7631         class a primary base just because we don't yet have any virtual
7632         functions.
7633         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
7634         (num_vfun_entries): Remove.
7635         (dfs_count_virtuals): Likewise.
7636         (num_extra_vtbl_entries): Likewise.
7637         (size_extra_vtbl_entries): Likewise.
7638         (layout_virtual_bases): Iterate in inheritance graph order under
7639         the new ABI.
7640         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
7641         indicate that a vfield is present.
7642         (init_class_processing): Initialize access_public_node, etc., from
7643         ak_public, etc.
7644         (get_vtbl_decl_for_binfo): New function.
7645         (dump_class_hierarchy_r): Likewise.
7646         (dump_class_hierarchy): Use it.
7647         (finish_vtbls): Build the vtbls in inheritance graph order.
7648         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
7649         (initialize_vtable): Use get_vtbl_decl_for_binfo.
7650         (accumulate_vtbl_inits): Add comments explaining why a pre-order
7651         walk is required.
7652         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
7653         where the vptr points, even for primary vtables.
7654         (build_vtbl_initializer): Adjust handling of vbase and vcall
7655         offsets.
7656         (build_vcall_and_vbase_vtable_entries): New function.
7657         (dfs_build_vbase_offset_vtbl_entries): Remove.
7658         (build_vbase_offset_vtbl_entries): Reimplement.
7659         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
7660         were already handled in a primary base class vtable.
7661         (build_vcall_offset_vtbl_entries): Adjust.
7662         (build_rtti_vtbl_entries): Adjust.
7663         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
7664         * init.c (expand_virtual_init): Simplify.
7665         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
7666         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
7667         * search.c (BINFO_ACCESS): New macro.
7668         (SET_BINFO_ACCESS): Likewise.
7669         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
7670         (access_in_type): Likewise.
7671         (dfs_accessible_p): Likewise.
7672         (protected_accessible_p): Likewise.
7673         (lookup_fnfields_1): Adjust documentation.
7674         (dfs_mark_primary_bases): Move to class.c
7675         (mark_primary_bases): Likewise.
7676         (dfs_vbase_unmark): Remove.
7677         (virtual_context): Use BINFO_FOR_VBASE.
7678         (dfs_get_vbase_types): Simplify.
7679         (dfs_build_inheritance_graph_order): New function.
7680         (get_vbase_types): Use it.
7681         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
7682
7683         * tinfo.cc (get_vbase_offset): New function.
7684         (__vmi_class_type_info::do_find_public_src): Use it.
7685         (__vmi_class_type_info::do_dyncast): Likewise.
7686         (__vmi_class_type_info::do_upcast): Likewise.
7687
7688 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
7689
7690         * lang-specs.h: Pass -fno-show-column to the preprocessor.
7691
7692 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
7693
7694         * rtti.c (class_hint_flags): Rename flags.
7695         (class_initializer): Remove flags.
7696         (synthesize_tinfo_var): Combine offset and flags. Add flags
7697         for __vmi_class_type_info.
7698         (create_tinfo_types): Remove flags from __class_type_info and
7699         __si_class_type_info. Merge flags and offset from
7700         base_class_type_info.
7701         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
7702         (__base_class_info::is_virtual_p): Adjust.
7703         (__base_class_info::is_public_p): Adjust.
7704         (__base_class_info::offset): New accessor.
7705         (__class_type_info::details): Remove member.
7706         (__class_type_info::__class_type_info): Lose details.
7707         (__class_type_info::detail_masks): Remove.
7708         (__si_class_type_info::__si_class_type_info): Lose details.
7709         (__vmi_class_type_info::details): New member.
7710         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
7711         (__vmi_class_type_info::detail_masks): New member.
7712         * tinfo.cc (__class_type_info::do_upcast): Initialize result
7713         with unknown_details_mask.
7714         (__vmi_class_type_info::do_find_public_src): Adjust
7715         (__vmi_class_type_info::do_dyncast): Adjust.
7716         (__vmi_class_type_info::do_upcast): Set result details, if
7717         needed. Adjust.
7718         (__dynamic_cast): Temporarily #if out optimization.
7719
7720 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
7721
7722         * rtti.c (get_tinfo_decl): Mark used.
7723         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
7724         mark as dealt with, if we output it.
7725
7726 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
7727
7728         * class.c: Reorganize to put virtual function table initialization
7729         machinery at the end of the file.
7730
7731 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
7732
7733         * class.c (finish_struct): Use bitsize_zero_node.
7734         * pt.c (instantiate_class_template): Likewise.
7735
7736 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
7737
7738         Put RTTI entries at negative offsets in new ABI.
7739         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
7740         vbase offset at index -3, not -1.
7741         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
7742         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
7743         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
7744         (build_rtti_vtbl_entries): New function.
7745         (set_rtti_entry): Remove.
7746         (build_primary_vtable): Don't use it.
7747         (build_secondary_vtable): Likewise.
7748         (start_vtable): Remove.
7749         (first_vfun_index): New function.
7750         (set_vindex): Likewise.
7751         (add_virtual_function): Don't call start_vtable.  Do call
7752         set_vindex.
7753         (set_primary_base): Rename parameter.
7754         (determine_primary_base): Likewise.
7755         (num_vfun_entries): Don't use skip_rtti_stuff.
7756         (num_extra_vtbl_entries): Include RTTI information.
7757         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
7758         (skip_rtti_stuff): Remove.
7759         (dfs_modify_vtables): Don't use it.
7760         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
7761         (layout_nonempty_base_or_field): Update size handling.
7762         (create_vtable_ptr): Tweak.
7763         (layout_class_type): Adjust parameter names.
7764         (finish_struct_1): Simplify.
7765         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
7766         (skip_rtti_stuff): Remove.
7767         (first_vfun_index): New function.
7768         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
7769         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
7770         (marked_vtable_pathp): Declare.
7771         (unmarked_vtable_pathp): Likewise.
7772         * error.c (dump_expr): Use first_vfun_index to calculate vtable
7773         offsets.
7774         * rtti.c (build_headof): Look for RTTI at negative offsets.
7775         (get_tinfo_decl_dynamic): Likewise.
7776         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
7777         here.
7778         (create_pseudo_type_info): Do it here instead.  Adjust so that
7779         vptr points at first virtual function.
7780         * search.c (marked_vtable_pathp): Make it global.
7781         (unmarked_vtable_pathp): Likewise.
7782         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
7783         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
7784         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
7785         (get_pure_virtuals): Likewise.
7786         (expand_upcast_fixups): Likewise.
7787         * tree.c (debug_binfo): Likewise.
7788         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
7789         negative offset.
7790
7791 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7792
7793         * class.c (check_field_decl): Fix typo.
7794         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
7795         (check_methods): Likewise.
7796         (check_field_decls): Likewise.
7797         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
7798         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
7799         Use DECL_RESULT_FLD, not DECL_RESULT.
7800         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
7801         * lex.c (identifier_type): Likewise.
7802         * pt.c (determine_specialization, lookup_template_class): Likewise.
7803         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
7804         (resolve_overloaded_unification, more_specialized): Likewise.
7805         * semantics.c (finish_member_declaration): Likewise.
7806         * typeck.c (build_x_function_call): Likewise.
7807
7808 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
7809
7810         * class.c (layout_empty_base): Handle empty bases with non-byte
7811         alignment.
7812         (build_base_field): Likewise.
7813         (layout_virtual_bases): Likewise.
7814
7815         * class.c (finish_struct_1): Fix typo in this change:
7816
7817         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7818
7819 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
7820
7821         * decl.c (grokdeclarator): Count partial specializations when
7822         keeping track of how many template classes have been seen.
7823
7824         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
7825
7826 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7827
7828         * class.c (build_vbase_pointer_fields): layout_field now place_field.
7829         (get_vfield_offset): Use byte_position.
7830         (set_rtti_entry): Set OFFSET to ssizetype zero.
7831         (get_binfo_offset_as_int): Deleted.
7832         (dfs_record_base_offsets): Use tree_low_cst.
7833         (dfs_search_base_offsets): Likewise.
7834         (layout_nonempty_base_or_field): Reflect changes in RLI format
7835         and call byte_position.
7836         (layout_empty_base): Convert offset to ssizetype.
7837         (build_base_field): use rli_size_unit_so_far.
7838         (dfs_propagate_binfo_offsets): Do computation in proper type.
7839         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
7840         (layout_class_type): Reflect changes in RLI names and fields.
7841         (finish_struct_1): Set DECL_FIELD_OFFSET.
7842         * dump.c (dequeue_and_dump): Call bit_position.
7843         * expr.c (cplus_expand_constant): Use byte_position.
7844         * rtti.c (expand_class_desc): Use bitsize_one_node.
7845         * typeck.c (build_component_addr): Use byte_position and don't
7846         special case for zero offset.
7847
7848 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
7849
7850         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
7851
7852         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
7853         tinfo object.
7854         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
7855         vtable.
7856
7857 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7858
7859         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
7860         DECL_P macros.
7861         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
7862         make_typename_type, check_initializer, cp_finish_decl,
7863         xref_tag): Likewise.
7864         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
7865         decl_namespace, arg_assoc_template_arg, arg_assoc,
7866         validate_nonmember_using_decl, do_class_using_decl): Likewise.
7867         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
7868         args_to_string): Likewise.
7869         * friend.c (is_friend): Likewise.
7870         * lex.c (note_got_semicolon, note_list_got_semicolon,
7871         is_global): Likewise.
7872         * method.c (build_overload_nested_name, build_overload_value,
7873         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
7874         * parse.y (typename_sub, typename_sub1): Likewise.
7875         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
7876         process_partial_specialization, convert_template_argument,
7877         template_args_equal, add_pending_template, lookup_template_class,
7878         for_each_template_parm_r, maybe_fold_nontype_arg,
7879         tsubst, instantiate_template, type_unification_real, unify,
7880         instantiate_pending_templates, set_mangled_name_for_template_decl):
7881         Likewise.
7882         * repo.c (repo_get_id, repo_template_used): Likewise.
7883         * search.c (lookup_field_1): Likewise.
7884         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
7885         * xref.c (classname): Likewise.
7886
7887 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
7888
7889         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
7890         (CANONICAL_BINFO): New macro.
7891         (BINFO_NEW_VTABLE_MARKED): Use it.
7892         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
7893         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
7894         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
7895         not TREE_TYPE.
7896         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7897         (build_secondary_vtable): Likewise.
7898         (dfs_finish_vtbls): Likewise.
7899         (dfs_accumulate_vtbl_inits): Likewise.
7900         (accumulate_vtbl_inits): New function.
7901         (finish_vtbls): Make sure that virtual bases come after
7902         non-virtual bases in the vtable group.
7903         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
7904         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7905         * search.c (struct vbase_info): Move definition.
7906         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7907         (unmarked_new_vtable_p): Likewise.
7908         (dfs_mark_vtable_path): Remove.
7909         (dfs_mark_new_vtable): Remove.
7910         (dfs_unmark_new_vtable): Likewise.
7911         (dfs_clear_search_slot): Likewise.
7912         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
7913         (dfs_clear_vbase_slots): Likewise.
7914         (init_vbase_pointers): LIkewise.
7915
7916 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
7917
7918         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
7919         SIZETYPE to a non-SIZETYPE.
7920
7921 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
7922
7923         * class.c (layout_virtual_bases): Adjust names in conditionally
7924         compiled code.
7925
7926         * class.c (record_base_offsets): New function.
7927         (layout_conflict_p): Likewise.
7928         (layout_nonempty_base_or_field): Use it.
7929         (layout_empty_base): New function.
7930         (build_base_field): Use it.
7931         (build_base_fields): Update comment.
7932         (layout_virtual_bases): Fold in a little code form
7933         layout_basetypes.  Use layout_empty_base.
7934         (layout_basetypes): Remove.
7935         (end_of_class): New function.
7936         (layout_class_type): Use it.  Adjust.
7937
7938         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
7939         (fntype_p): Remove.
7940         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
7941         comment.
7942         (dfs_skip_nonprimary_vbases_markedp): Likewise.
7943         * typeck.c (fntype_p): Remove.
7944
7945         * cp-tree.h (TI_SPEC_INFO): Remove.
7946         (CLASSTYPE_TI_SPEC_INFO): Likewise.
7947         * pt.c (process_partial_specialization): Likewise.
7948
7949         * class.c (build_base_field): Fix thinko in computation of binfo
7950         offsets.
7951
7952         * tree.c (mark_local_for_remap_p): Mark variables declared in
7953         TARGET_EXPRs as well.
7954
7955 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
7956
7957         * typeck.c (require_complete_type, complete_type,
7958         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
7959         build_array_ref, convert_arguments, pointer_diff,
7960         build_x_unary_op, build_unary_op, build_c_cast,
7961         build_modify_expr): Use COMPLETE_TYPE_P etc.
7962         * call.c (is_complete, convert_like_real,
7963         build_new_method_call): Likewise.
7964         * class.c (build_vbase_pointer_fields, check_bases,
7965         build_base_field, finish_struct_1, pushclass): Likewise.
7966         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
7967         * decl.c (maybe_process_template_type_declaration, pushtag,
7968         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
7969         layout_var_decl, check_initializer, cp_finish_decl,
7970         grokdeclarator, require_complete_types_for_parms,
7971         grok_op_properties, xref_tag, xref_basetypes,
7972         check_function_type): Likewise.
7973         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
7974         * friend.c (do_friend): Likewise.
7975         * init.c (build_offset_ref): Likewise.
7976         * parse.y (structsp): Likewise.
7977         * pt.c (maybe_process_partial_specialization,
7978         tsubst_friend_function, instantiate_class_template, tsubst,
7979         do_type_instantiation, instantiate_pending_templates): Likewise.
7980         * repo.c (repo_get_id): Likewise.
7981         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
7982         synthesize_tinfo_var, emit_support_tinfos): Likewise.
7983         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
7984         * semantics.c (begin_class_definition): Likewise.
7985         * tree.c (build_cplus_method_type): Likewise.
7986         * typeck2.c (digest_init, build_functional_cast,
7987         add_exception_specifier): Likewise.
7988         * parse.h, parse.c: Regenerated.
7989
7990 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
7991
7992         * inc/cxxabi.h: New header file. Define new-abi entry points.
7993         (__pointer_type_info::target): Rename member to ...
7994         (__pointer_type_info::type): ... here.
7995         (__base_class_info::type): Rename member to ...
7996         (__base_class_info::base): ... here.
7997         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
7998         * cp-tree.h (CPTI_ABI): New global tree enumeration.
7999         (abi_node): New global tree node.
8000         * decl.c (abi_node): Document.
8001         (init_decl_processing): Initialize abi_node.
8002         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
8003         (get_vmi_pseudo_type_info): Likewise.
8004         (create_tinfo_types): Likewise.
8005         (emit_support_tinfos): Likewise.
8006         * tinfo.h (cxxabi.h): Include for new-abi.
8007         Move rtti class definitions to new header file.
8008         * tinfo.cc (abi): Use the namespace.
8009         (std): Move new abi rtti classes from here ...
8010         (__cxxabiv1): ... to here.
8011         * tinfo2.cc (cxxabi.h): Include for new-abi.
8012         Move rtti class definitions to new header file.
8013         (std): Move new abi rtti classes from here ...
8014         (__cxxabiv1): ... to here.
8015         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
8016         namespace.
8017
8018 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
8019             Jason Merrill  <jason@casey.cygnus.com>
8020
8021         * method.c (build_overload_int): Use host_integerp.
8022
8023 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8024
8025         * init.c (build_offset_ref): Handle the case of a templated member
8026         function.
8027
8028 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8029
8030         * except.c (expand_exception_blocks): Clear catch_clauses_last.
8031
8032 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
8033
8034         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
8035         * class.c (check_bitfield_decl): Turn illegal bitfields into
8036         non-bitfields.
8037         (dfs_propagate_binfo_offsets): Adjust for new size_binop
8038         semantics.
8039         (dfs_offset_for_unshared_vbases): Likewise.
8040         * cvt.c (cp_convert_to_pointer): Convert NULL to a
8041         pointer-to-member correctly under the new ABI.
8042         * expr.c (cplus_expand_constant): Don't use cp_convert when
8043         turning an offset into a pointer-to-member.
8044         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
8045         when dereferencing them under the new ABI.
8046         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
8047         of pointers-to-members under the new ABI.
8048
8049         * class.c (check_bitfield_decl): Remove restriction on really long
8050         bitfields.
8051         (layout_class_type): Implement new ABI handling of bitfields
8052         longer than their types.
8053
8054 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8055
8056         * parse.y (extdefs): Call ggc_collect.
8057         * parse.c: Regenerated.
8058
8059 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
8060
8061         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
8062         (note_name_declared_in_class): Use OVL_CURRENT to get at a
8063         potential overload.
8064
8065 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8066
8067         * class.c (build_vbase_path): Use integer_zerop.
8068         (build_vtable_entry): Use tree_low_cst.
8069         (get_vfield_offset): Use bit_position.
8070         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
8071         Use tree_low_cst.
8072         (check_bitfield_decl): Set DECL_SIZE using convert.
8073         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
8074         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
8075         Use tree_low_cst.
8076         (finish_struct_1): Use bit_position.
8077         (dump_class_hierarchy): Use tree_low_cst.
8078         * cp-tree.h (min_precision): Add declaration.
8079         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
8080         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
8081         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
8082         * expr.c (cplus_expand_constant): Use bit_position.
8083         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
8084         * rtti.c (get_base_offset): Use bit_position.
8085         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
8086         host_integerp, and tree_low_cst.
8087         (pointer_int_sum): Use integer_zerop.
8088         (build_component_addr): Use bit_position.
8089
8090 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
8091
8092         * typeck.c (require_complete_type): Don't assume size_zero_node.
8093         (complete_type_or_else): Likewise.
8094
8095 2000-03-16  Steven Grady <grady@digitaldeck.com>
8096             Jason Merrill  <jason@casey.cygnus.com>
8097
8098         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
8099
8100 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
8101
8102         * decl2.c (grokfield): Bail out if type is error_mark_node.
8103
8104 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
8105
8106         * tinfo2.cc (__ptr_to_member_data): Rename to ...
8107         (__pointer_to_member_data): ... here. Adjust.
8108         * rtti.c (create_tinfo_types): Adjust.
8109
8110 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
8111
8112         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
8113         * decl.c (ref_desc_type_node): Undocument.
8114         * rtti.c (ptr_ref_initializer): Rename to ...
8115         (ptr_initializer): ... here. Adjust comments.
8116         (ptmd_initializer): Fix comment thinko.
8117         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
8118         (create_tinfo_types): Remove ref_desc_type_node init.
8119         * tinfo2.cc (__reference_type_info): Remove.
8120
8121 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
8122
8123         * decl.c (cp_finish_decl): Remove obsolete comment.
8124
8125         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
8126
8127 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
8128
8129         * cp-tree.h: Tweak documentation.
8130         * class.c (build_vbase_pointer_fields): Layout the fields, too.
8131         (avoid_overlap): Remove.
8132         (get_binfo_offset_as_int): New function.
8133         (dfs_serach_base_offsets): Likewise.
8134         (layout_nonempty_base_or_field): Likewise.
8135         (build_base_field): Layout fields here.  Avoid placing two objects
8136         of the same type at the same address, under the new ABI.
8137         (build_base_fields): Adjust accordingly.
8138         (create_vtable_ptr): Return the new field, but don't attach it to
8139         TYPE_FIELDS.
8140         (remove_base_field): Remove.
8141         (remove_base_fields): Remove.
8142         (layout_basetypes): Adjust accordingly.
8143         (layout_class_type): Call layout_field for each field, rather than
8144         just making a wholesale call to layout_type.
8145
8146 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
8147
8148         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
8149
8150 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
8151
8152         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
8153
8154         * except.c (dtor_nothrow): New fn.
8155         (do_pop_exception): Use it.  Take type parm.
8156         (push_eh_cleanup): Take type parm.
8157         (expand_start_catch_block): Pass it.
8158         (build_eh_type_type_ref): Accept null type.
8159
8160 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
8161
8162         * cp-tree.h (revert_static_member_fn): Change prototype.
8163         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
8164         (grok_op_properties): Likewise.
8165         (start_function): Likewise.
8166         (revert_static_member_fn): Simplify.
8167         * pt.c (check_explicit_specialization): Adjust call to
8168         revert_static_member_fn.
8169
8170 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
8171
8172         * cp-tree.h (scope_kind): New type.
8173         (tmpl_spec_kind): Likewise.
8174         (declare_pseudo_global_level): Remove.
8175         (pseudo_global_level_p): Rename to template_parm_scope_p.
8176         (pushlevel): Remove declaration.
8177         (begin_scope): New function.
8178         (finish_scope): Likewise.
8179         (current_tmpl_spec_kind): Likewise.
8180         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
8181         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
8182         Add template_spec_p.
8183         (toplevel_bindings_p): Adjust.
8184         (declare_pseudo_global_level): Remove.
8185         (pseudo_global_level_p): Rename to template_parm_scope_p.
8186         (current_tmpl_spec_kind): New function.
8187         (begin_scope): Likewise.
8188         (finish_scope): Likewise.
8189         (maybe_push_to_top_level): Adjust.
8190         (maybe_process_template_type_declaration): Likewise.
8191         (pushtag): Likewise.
8192         (pushdecl_nonclass_level): Likewise.
8193         (lookup_tag): Likewise.
8194         (grokfndecl): Handle member template specializations.  Share
8195         constructor and non-constructor code.
8196         * decl2.c (check_classfn): Handle member template specializations.
8197         * pt.c (begin_template_parm_list): Use begin_scope.
8198         (begin_specialization): Likewise.
8199         (end_specialization): Likewise.
8200         (check_explicit_specialization): Use current_tmpl_spec_kind.
8201         Handle member template specializations.
8202         (end_template_decl): Use finish_scope.  Remove call to
8203         get_pending_sizes.
8204         (push_template_decl_real): Remove bogus error message.
8205         (tsubst_decl): Fix typo in code contained in comment.
8206         (instantiate_template): Handle member template specializations.
8207         (most_general_template): Likewise.
8208
8209 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
8210
8211         * lex.c (whitespace_cr): Compress consecutive calls to warning().
8212         (do_identifier): Ditto for error().
8213
8214         * pt.c (convert_nontype_argument): Ditto for cp_error().
8215         (convert_template_argument): Ditto for cp_pedwarn().
8216
8217 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
8218
8219         * exception.cc (__check_null_eh_spec): New fn.
8220         * except.c (expand_end_eh_spec): Call it if the spec is throw().
8221
8222 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
8223
8224         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
8225         * except.c (expand_end_eh_spec): Add the return type.
8226         * rtti.c (throw_bad_cast): Add the parmtypes.
8227         (throw_bad_typeid): Likewise.
8228
8229         * semantics.c (expand_stmt): Only leave out rtl for unused
8230         artificials, and set DECL_IGNORED_P on them as well.
8231         * decl.c (wrapup_globals_for_namespace): Likewise.
8232
8233 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
8234
8235         * decl.c (maybe_commonize_var): Skip all artificial decls.
8236         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
8237
8238 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
8239
8240         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
8241         * cp-tree.h: Declare flag_enforce_eh_specs.
8242         * decl.c (store_parm_decls, finish_function): Check it.
8243
8244         C library functions don't throw.
8245         * Makefile.in (cfns.h): New target.
8246         (except.o): Depend on it.
8247         * Make-lang.in (cc1plus): Depend on cfns.gperf.
8248         * cfns.gperf: New file.
8249         * cfns.h: Generated.
8250         * except.c: Include it.
8251         (nothrow_libfn_p): New fn.
8252         * decl.c (grokfndecl): Use it.
8253         * cp-tree.h: Declare it.
8254
8255         * decl.c (push_overloaded_decl_1, auto_function,
8256         define_function): Lose.
8257         (build_library_fn_1): New static fn.
8258         (builtin_function): Use it.
8259         (get_atexit_node): Use build_library_fn_ptr.
8260         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
8261         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
8262         push_void_library_fn, push_throw_library_fn): New fns.
8263         * cp-tree.h: Declare them.
8264         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
8265         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
8266         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
8267         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
8268         * rtti.c (build_runtime_decl): Lose.
8269         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
8270         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
8271         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
8272
8273         * call.c (build_call): Remove result_type parm.
8274         Call mark_used on unused artificial fns.
8275         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
8276
8277 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
8278
8279         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
8280         appropriate.
8281         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
8282         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
8283         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
8284         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
8285         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
8286         expand_generic_desc): Likewise.
8287
8288 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
8289
8290         * exception.cc (__cp_pop_exception): Cleanup the original object.
8291
8292 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
8293
8294         * decl.c (grok_op_properties): Merge conversion to void warning
8295         with other silly op warnings.
8296
8297 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
8298
8299         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
8300         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
8301
8302 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
8303
8304         * decl.c (cp_make_fname_decl): New function.
8305         (wrapup_globals_for_namespace): Don't emit unused static vars.
8306         (init_decl_processing): Remove comment about use of
8307         array_domain_type. Set make_fname_decl.
8308         (cp_finish_decl): Remove __FUNCTION__ nadgering.
8309         * semantics.c (begin_compound_stmt): Remove
8310         current_function_name_declared flagging.
8311         (expand_stmt): Don't emit unused local statics.
8312         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
8313         specially.
8314
8315 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
8316
8317         * typeck.c (convert_for_assignment): Don't look at array
8318         initializer.
8319         * call.c (convert_like_real): Likewise.
8320
8321 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
8322
8323         Add initial support for '\uNNNN' specifier.
8324         * lex.c (read_ucs): New fn.
8325         (readescape, skip_white_space): Call it.
8326         (is_extended_char, is_extended_char_1): New fns.
8327         (utf8_extend_token): New fn, #if 0'd out.
8328         (real_yylex): Treat extended chars like letters.
8329
8330         * search.c (note_debug_info_needed): Walk the bases even if we
8331         weren't deferring the type itself.
8332
8333 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8334
8335         * decl2.c (finish_objects): Constify a char*.
8336
8337         * method.c (emit_thunk): Likewise.
8338
8339 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
8340
8341         * typeck.c (dubious_conversion_warnings): Look through
8342         REFERENCE_TYPE.
8343
8344 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8345
8346         * class.c (dfs_modify_vtables): I is now unsigned.
8347         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
8348         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
8349         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
8350         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8351         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
8352         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
8353         Call integer_all_onesp.
8354         * typeck2.c (process_init_constructor): Use compare_tree_int.
8355
8356         * lang-specs.h (as): Don't call if -syntax-only.
8357
8358 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
8359
8360         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
8361         RTL_EXPR_HAS_NO_SCOPE after all.
8362
8363 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
8364
8365         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
8366         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
8367         RTL_EXPR_HAS_NO_SCOPE.
8368
8369         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
8370         later.
8371
8372         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
8373
8374 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
8375
8376         * call.c (convert_like): Macrofy.
8377         (convert_like_with_context): New macro.
8378         (convert_like_real): Renamed from convert_like.  Add calling
8379         context parameters, for diagnostics. Add recursive flag.  Call
8380         dubious_conversion_warnings for outer conversion.
8381         (build_user_type_conversion): Use convert_like_with_context.
8382         (build_over_call): Likewise. Don't warn about dubious
8383         conversions here. Adjust convert_default_arg calls.
8384         (convert_default_arg): Add context parameters for diagnostics.
8385         Pass throught to convert_like_with_context.
8386         * cp-tree.h (convert_default_arg): Add context parameters.
8387         (dubious_conversion_warnings): Prototype new function.
8388         * typeck.c (convert_arguments): Adjust convert_default_arg call.
8389         (dubious_conversion_warnings): New function, broken
8390         out of convert_for_assignment.
8391         (convert_for_assignment): Adjust.
8392
8393 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
8394
8395         * decl2.c (key_method): Break out from...
8396         (import_export_vtable, import_export_class): ...here.
8397
8398         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
8399         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
8400
8401         * search.c (note_debug_info_needed, dfs_debug_mark,
8402         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
8403         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
8404
8405 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
8406
8407         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
8408         typos.
8409
8410 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
8411
8412         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
8413         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
8414         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
8415         (lang_type): Split gets_new into has_new and has_array_new.
8416         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8417         (TYPE_GETS_NEW): Split into ...
8418         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
8419         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
8420         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
8421         (build_op_new_call): Don't declare.
8422         (build_new_1): Likewise.
8423         * call.c (build_op_new_call): Remove.
8424         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
8425         instead of TYPE_NEEDS_DESTRUCTOR.
8426         (finish_struct_bits): Likewise.
8427         (add_implicitly_declared_members): Likewise.
8428         (check_field_decl): Likewise.
8429         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
8430         correctly under the new ABI.
8431         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
8432         instead of TYPE_NEEDS_DESTRUCTOR.
8433         (initialize_local_var): Likewise.
8434         (destroy_local_var): Likewise.
8435         (cp_finish_decl): Likewise.
8436         (register_dtor_fn): Likewise.
8437         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
8438         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
8439         TYPE_VEC_DELETE_TAKES_SIZE here.
8440         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
8441         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
8442         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8443         (finish_destructor_body): Likewise.
8444         (maybe_build_cleanup_1): Likewise.
8445         * decl2.c (do_static_destruction): Likewise.
8446         * init.c (build_new_1): Make it static.
8447         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8448         (expand_cleanup_for_base): Likewise.
8449         (get_cookie_size): New function.
8450         (build_new_1): Handle array-new cookies correctly under the new
8451         ABI.
8452         (build_vec_delete_1): Likewise.
8453         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8454         (build_delete): Likewise.
8455         (build_vec_delete): Handle array-new cookies correctly under the new
8456         ABI.
8457         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8458         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
8459         TYPE_HAS_ARRAY_NEW_OPERATOR.
8460         * ptree.c (print_lang_type): Check them.
8461         * search.c (context_for_name_lookup): Fix typo in comment.
8462         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8463         * tree.c (break_out_cleanups): Likewise.
8464         (build_cplus_array_test_1): Likewise.
8465         (cp_build_qualified_type_real): Likewise.
8466         * typeck.c (complete_type): Likewise.
8467
8468         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
8469         the command-line, not the end.
8470
8471 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
8472
8473         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
8474
8475 2000-03-02  Tom Tromey  <tromey@cygnus.com>
8476
8477         * cp-tree.h (build_java_class_ref): Declare.
8478         * init.c (build_java_class_ref): No longer static.
8479         * except.c (expand_throw): Generate a Java-style `throw' if the
8480         thrown object is a "Java" object.
8481         (initialize_handler_parm): Generate a Java-style lookup of
8482         exception info if the caught object is a "Java" object.
8483         (catch_language, catch_language_init): New globals.
8484         (decl_is_java_type): New function.
8485         (expand_start_catch_block): Don't call push_eh_info() or
8486         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
8487         class reference to build_catch_block.
8488
8489 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8490
8491         * typeck.c (comptypes): Treat sizetype like its language equivalent.
8492
8493 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
8494
8495         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
8496         to merge reference/pointer code and fix incorrect warnings.
8497
8498 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
8499
8500         * search.c (protected_accessible_p): Use context_for_name_lookup.
8501
8502         * init.c (construct_virtual_bases): Fix thinko.
8503         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
8504
8505 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8506
8507         * decl.c (current_function_decl): Move to toplev.c.
8508
8509 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
8510
8511         * pt.c (fn_type_unification): Unify return type, whenever
8512         provided.
8513         (get_bindings_real): Only pass return type when necessary.
8514         Remove explicit return type check.
8515         * class.c (resolve_address_of_overloaded_function): Pass desired
8516         return type to fn_type_unification.
8517
8518 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8519
8520         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
8521         DECL_FIELD_SIZE.
8522         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
8523         DECL_FIELD_SIZE.
8524         * rtti.c (expand_class_desc): Likewise.
8525         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
8526         (THUNK_VCALL_OFFSET): Likewise.
8527         (THUNK_DELTA): Reflect changes in ../tree.h.
8528
8529 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
8530
8531         * search.c (protected_accessible_p): Also allow the access if
8532         the member is public in DERIVED.  Lose TYPE parm.
8533         (friend_accessible_p): Lose TYPE parm.
8534         (accessible_p): Adjust.
8535
8536 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8537
8538         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
8539         on things that are not sizes; ssize_binop deleted.
8540         Call size_diffop when appropriate.
8541         (dfs_build_vcall_offset_vtbl_entries): Likewise.
8542         (build_primary_vtable, build_secondary_vtable): Likewise.
8543         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
8544         Variable I is HOST_WIDE_INT.
8545         (get_vfield_offset): Pass proper types to size_binop.
8546         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
8547         (finish_struct_1): Likewise.
8548         (skip_rtti_stuff): Arg N is now pointer to signed.
8549         (layout_class_type): Use size_zero_node.
8550         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
8551         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
8552         * decl.c (complete_arry_type): Pass proper types to size_binop.
8553         (xref_basetypes): BINFO_OFFSET is sizetype.
8554         * error.c (dump_expr): Don't use size_binop non-sizes.
8555         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
8556         * init.c (construct_virtual_bases): Fix type error.
8557         (build_vec_delete_1): Pass proper type to size_binop and don't
8558         fold result.
8559         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
8560         * rtti.c (get_base_offset): Pass proper type to size_binop.
8561         * search.c (dfs_find_vbases): Fix type error.
8562         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
8563         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
8564         * tree.c (debug_binfo): Variable N is signed.
8565         Use HOST_WIDE_INT_PRINT_DEC.
8566         * typeck.c (comptypes): sizetype is same as equivalent integer type.
8567         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
8568         size_one_node and size_zero_node.
8569         (c_alignof): Use size_one_node.
8570         (build_component_addr): Pass proper types to size_binop.
8571         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
8572
8573 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
8574
8575         Implement class scope using-declarations for functions.
8576         * class.c (handle_using_decl): Call add_method for used functions.
8577         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
8578         (add_method): Used functions are hidden by local functions.
8579         (check_bases_and_members): Handle using-decls before finalizing
8580         CLASSTYPE_METHOD_VEC.
8581         * call.c (add_function_candidate): Add ctype parm; if non-zero,
8582         override the type of 'this' accordingly.
8583         (add_template_candidate, add_template_candidate_real): Add ctype parm.
8584         (convert_class_to_reference, build_user_type_conversion_1,
8585         build_new_function_call, build_object_call, build_new_op,
8586         build_new_method_call): Pass ctype parm.
8587
8588         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
8589         the baselink.
8590         * call.c (convert_class_to_reference, build_user_type_conversion_1,
8591         build_new_function_call, build_object_call, build_new_op,
8592         build_new_method_call, build_op_delete_call): Don't get basetype_path
8593         from a baselink.
8594         * typeck.c (build_component_ref): Likewise.
8595         * init.c (build_offset_ref): Likewise.
8596         (resolve_offset_ref): Don't call enforce_access.
8597         Call build_scoped_ref.
8598         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
8599         would cause an error or if -pedantic.
8600         * class.c (alter_access): Lose binfo parm.
8601
8602 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
8603
8604         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
8605         types.
8606
8607 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
8608
8609         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
8610         pseudo_type_info creation into the std namespace
8611
8612 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
8613
8614         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
8615         (import_export_class): Remove declaration.
8616         * decl2.c (import_export_class): Make it static.
8617         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
8618         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
8619         EXPR_WITH_FILE_LOCATION.
8620         * lex.c (check_newline): Tweak filename/lineno setting.
8621         * semantics.c (begin_while_stmt): Fix typo in comment.
8622
8623 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8624
8625         * lang-options.h (-fmessage-length=): Add missing option.
8626
8627         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
8628
8629 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
8630
8631         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
8632
8633 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
8634
8635         * optimize.c (expand_call_inline): Emit the return label before
8636         evaluating the return value.
8637
8638 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
8639
8640         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
8641         than duplicating functionality here.
8642         * optimize.c: Include input.h.
8643         (expand_call_inline): Use push_srcloc and pop_srcloc.
8644         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
8645         * parse.c: Regenerated.
8646         * Makefile.in (lex.o): Depend on input.h.
8647         (optimize.o): Likewise.
8648
8649 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
8650
8651         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
8652         function type, rather than ICE.
8653
8654 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
8655
8656         * decl.c (grokdeclarator): Call decl_type_access_control.
8657         * parse.y (parse_end_decl): Don't call decl_type_access_control if
8658         decl is null.
8659
8660 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
8661
8662         * decl.c (decls_match): Remove obsolete static member nadgering.
8663
8664 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8665
8666         * decl.c (grokdeclarator): Change ANSI to ISO.
8667         * lex.c (consume_string, readescape, do_identifier): Likewise.
8668         (parse_float, real_yylex): Likewise.
8669         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
8670         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
8671         new_type_id, maybe_label_decls, simple_stmt,
8672         for.init.statement): Likewise.
8673         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
8674         * semantics.c (finish_named_return_value): Likewise.
8675         * parse.c: Regenerate.
8676
8677 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
8678
8679         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
8680         (CPTI_CLASS_STAR_TYPE): Remove.
8681         (vtable_index_type): Likewise.
8682         (class_star_type_node): Remove.
8683         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
8684         (build_binary_op_nodefault): Remove.
8685         * call.c (build_new_op): Use build_binary_op instead of
8686         build_binary_op_nodefault.
8687         * decl.c (init_decl_processing): Remove class_star_type_node
8688         initialization.  Make delta_type_node ptrdiff_type_node under the
8689         new ABI.  Initialize vtable_index_type.
8690         (build_ptrmemfunc_type): Build different structures for the new
8691         ABI.
8692         (build_enumerator): Use build_binary_op instead of
8693         build_binary_op_nodefault.
8694         * method.c (build_overload_value): Mangle pointers-to-members
8695         appropriately under the new ABI.
8696         * typeck.c (build_array_ref): Use build_binary_op instead of
8697         build_binary_op_nodefault.
8698         (get_member_function_from_ptrfunc): Adjust for the new ABI.
8699         (build_binary_op_nodefault): Rename to ...
8700         (build_binary_op): ... this.  Remove old version.  Adjust for
8701         pointer-to-member comparisons under the new ABI.
8702         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
8703         (build_ptrmemfunc): Adjust for the new ABI.
8704         (expand_ptrmemfunc_cst): Likewise.
8705         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
8706         (pfn_from_ptrmemfunc): Adjust for the new ABI.
8707
8708 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
8709
8710         * call.c (build_object_call): Compress consecutive calls to
8711         cp_error.
8712         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
8713         (build_op_delete_call): Adjust message formatting.
8714
8715         * class.c (check_bases): Compress consecutive calls to
8716         cp_pedwarn.
8717         (finish_struct_anon): Say 'ISO C++'.
8718
8719         * decl.c (start_decl): Same here.
8720         (grok_reference_init): Likewise.
8721         (grokfndecl): Correct message formatting.
8722         (grokfndecl): Improve diagnostic.
8723         (check_static_variable_definition): Likewise. Say 'ISO C++'
8724         (compute_array_index_type): Say 'ISO C++'
8725         (create_array_type_for_decl): Compress consecutive calls to
8726         cp_error.
8727         (grokdeclarator): Say 'ISO C++'
8728         (grok_op_properties): Likewise.
8729
8730         * decl2.c (delete_sanity): Clairify diagnostic.
8731         (check_member_template): Same here.
8732         (grok_function_init): Use consistent terminology.
8733
8734         * expr.c (do_case): Say 'ISO C++'
8735
8736         * friend.c (do_friend): Compress consecutive calls to warning.
8737
8738 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
8739
8740         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
8741         * class.c (build_secondary_vtable): Reorganize.  Don't create a
8742         new vtable under the new ABI.
8743         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
8744         computing the size.
8745         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
8746         the initializing elements.
8747         (initialize_vtable): New function.
8748         (dfs_finish_vtbls): Use it.
8749         (dfs_accumulate_vtbl_inits): New function.
8750         (finish_vtbls): Merge primary and secondary vtables under the new
8751         ABI.
8752         (finish_struct_1): Remove redundant call to layout_vtable_decl.
8753         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
8754         aren't VAR_DECLs.
8755
8756         * class.c (build_vtable): New function, split out from ...
8757         (get_vtable_decl): ... here, and ...
8758         (build_secondary_vtable): ... here.
8759
8760         * pt.c (tsubst_decl): Fix formatting.
8761
8762 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8763
8764         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
8765         (avoid_overlap, build_base_field): Likewise.
8766         (build_base_field, build_base_fields, is_empty_class):
8767         Test DECL_SIZE with integer_zero.
8768         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
8769         * cp-tree.h (struct lang_type): New field size_unit.
8770         (CLASSTYPE_SIZE_UNIT): New macro.
8771         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
8772         (cp_finish_decl): Delete -Wlarger-than processing.
8773         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
8774         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
8775         * tree.c (make_binfo): binfo vector is one entry longer.
8776         (walk_tree): Walk DECL_SIZE_UNIT.
8777
8778 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
8779
8780         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
8781         comment.
8782         (build_vtable_entry): Don't assume all vtable entries are
8783         functions.
8784         (build_vtbl_initializer): Adjust accordingly.
8785         (get_vtable_decl): Fix formatting.
8786
8787 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
8788
8789         * semantics.c (deferred_type_access_control): Walk the entire
8790         type_lookups list.
8791         (save_type_access_control): Rename from
8792         initial_deferred_type_access_control.  Just remember the value.
8793         (decl_type_access_control): New fn.
8794         (begin_function_definition): Use deferred_type_access_control, after
8795         we've started the function.  Set type_lookups to error_mark_node.
8796         * parse.y (frob_specs, fn.def1): Adjust.
8797         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
8798         (parse_end_decl, parse_bitfield0, parse_method): New fns.
8799         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
8800         (after_type_component_declarator0): Likewise.
8801         (after_type_component_declarator): Likewise.
8802         (notype_component_declarator): Likewise.
8803         * cp-tree.h: Adjust.
8804
8805         * decl.c (redeclaration_error_message): Allow redeclaration of
8806         namespace-scope decls.
8807
8808 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8809
8810         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
8811
8812 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
8813
8814         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
8815         * decl2.c (grokclassfn): Likewise.
8816
8817         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
8818
8819         * decl2.c (lang_decode_option): Don't set default message length
8820         here.
8821         * lex.c (lang_init_options): Set it here.
8822
8823 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
8824
8825         Make DECL_CONTEXT mean the class in which a member function was
8826         declared, even for a virtual function.
8827         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
8828         (DECL_FRIEND_CONTEXT): New macro.
8829         (DECL_REAL_CONTEXT): Remove.
8830         (SET_DECL_FRIEND_CONTEXT): Likewise.
8831         (DECL_VIRTUAL_CONTEXT): Adjust.
8832         (DECL_CLASS_SCOPE_P): Use TYPE_P.
8833         (add_friends): Remove.
8834         (hack_decl_function_context): Likewise.
8835         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
8836         CP_DECL_CONTEXT.
8837         (build_over_call): Fix indentation.  Use DECL_CONTEXT
8838         instead of DECL_CLASS_CONTEXT.
8839         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
8840         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
8841         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8842         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
8843         (build_base_field): Likewise.
8844         (finish_struct_1): Likewise.
8845         (build_self_reference): Likewise.
8846         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
8847         DECL_REAL_CONTEXT.
8848         (pushtag): Use decl_function_context, not
8849         hack_decl_function_context.
8850         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8851         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
8852         (pushdecl): Remove bogus code.
8853         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
8854         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8855         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8856         Use decl_function_context, nothack_decl_function_context.
8857         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
8858         (grokdeclarator): Likewise.  Use decl_function_context, not
8859         hack_decl_function_context.
8860         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
8861         (start_function): Use DECL_FRIEND_CONTEXT, not
8862         DECL_CLASS_CONTEXT.  Use decl_function_context, not
8863         hack_decl_function_context.
8864         (finish_function): Use decl_function_context, not
8865         hack_decl_function_context.
8866         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
8867         DECL_CLASS_CONTEXT.
8868         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
8869         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
8870         (grokfield): Likewise.
8871         (finish_builtin_type): Likewise.
8872         (finish_vtable_vardec): Use decl_function_context, not
8873         hack_decl_function_context.
8874         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8875         (start_static_initialization_or_destruction): Likewise.
8876         (finish_static_initialization_or_destruction): Likewise.
8877         (mark_used): Adjust logic for deciding when to synthesize methods.
8878         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
8879         DECL_REAL_CONTEXT.
8880         * error.c (dump_function_decl): Use DECL_CONTEXT, not
8881         DECL_CLASS_CONTEXT.
8882         * friend.c (is_friend): Likewise.
8883         (add_friends): Remove.
8884         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
8885         * lex.c (begin_definition_of_inclass_inline): Use
8886         decl_function_context, not hack_decl_function_context.
8887         (process_next_inline): Likewise.
8888         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8889         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
8890         DECL_CLASSS_CONTEXT.
8891         (hack_identifier): Likewise.
8892         (synthesize_method):  Use decl_function_context, not
8893         hack_decl_function_context.
8894         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
8895         DECL_REAL_CONTEXT.
8896         (is_member_template): Use decl_function_context, not
8897         hack_decl_function_context.  Use DECL_CONTEXT, not
8898         DECL_CLASS_CONTEXT.
8899         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
8900         DECL_CLASS_CONTEXT.
8901         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
8902         DECL_REAL_CONTEXT.
8903         (push_template_decl_real): Likewise.
8904         (instantiate_class_template): Don't call add_friends.
8905         (tsubst_default_argument): Use DECL_CONTEXT, not
8906         DECL_REAL_CONTEXT.
8907         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
8908         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8909         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
8910         DECL_CLASS_CONTEXT.
8911         * repo.c (repo_inline_used): Likewise.
8912         * search.c (current_scope): Adjust for new _CONTEXT macros.
8913         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
8914         DECL_REAL_CONTEXT.
8915         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8916         (lookup_fnfields_here):Likewise.
8917         (check_final_overrider): Likewise.
8918         (init_vbase_pointers): Likewise.
8919         (virtual_context): Likewise.
8920         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
8921         (expand_body): Use decl_function_context, not
8922         hack_decl_function_context.
8923         * tree.c (hack_decl_function_context): Remove.
8924         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
8925         DECL_CLASS_CONTEXT.
8926         * typeck2.c (error_not_base_type): Likewise.
8927
8928 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
8929
8930         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
8931
8932 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8933
8934         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
8935
8936 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
8937
8938         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
8939
8940 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
8941
8942         * decl2.c (lang_decode_option): Enable automatic line wrapping.
8943
8944 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
8945
8946         * parse.y (frob_specs): Split out...
8947         (parse_decl): From here.
8948         (fn.def2): Call initial_deferred_type_access_control.
8949         (after_type_component_declarator0): Call frob_specs.
8950         (notype_component_declarator0): Likewise.
8951         * search.c (friend_accessible_p): Nested classes are friends of their
8952         enclosing classes.
8953
8954 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
8955
8956         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
8957         used to create an implicit temporary.
8958
8959         * class.c (dfs_modify_vtables): Tweak calculation of functions to
8960         override.
8961
8962 2000-02-08  Nathan Sidwell  <nathan@acm.org>
8963
8964         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
8965         strip array element qualifiers too.
8966
8967 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
8968
8969         * decl.c (store_parm_decls): Don't build cleanups for parameters
8970         while processing_template_decl.
8971
8972 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
8973
8974         * cp-tree.h (struct saved_scope): Add incomplete field.
8975         (namespace_scope_incomplete): New macro.
8976         * decl.c (pushdecl): Use it.
8977         (hack_incomplete_structures): Use it.  See through artificial
8978         binding levels.
8979         (mark_saved_scope): Mark it.
8980
8981         Implement access control for nested types.
8982         * search.c (type_access_control): New fn.
8983         (accessible_p): Now we do perform access control for types.
8984         * semantics.c (deferred_type_access_control): New fn.
8985         (initial_deferred_type_access_control): New fn.
8986         (begin_function_definition): Call it.  Add lookups parm.
8987         * decl.c (struct binding_level): Add this_class field.
8988         (pushlevel_class): Set it.
8989         (mark_binding_level): Mark it.
8990         (lookup_name_real): Use it.  Call type_access_control.
8991         (mark_saved_scope): Mark lookups field.
8992         * cp-tree.h (flagged_type_tree): Add lookups field.
8993         (struct saved_scope): Add lookups field.
8994         (type_lookups): New macro.
8995         * parse.y (declmods): Now <ftype>.
8996         (parse_decl): Add lookups parm.  Call
8997         initial_deferred_type_access_control.
8998         (lang_extdef): Clear type_lookups.
8999         (typed_declspecs, declmods, typespec): Set lookups field.
9000         (initdcl): Call deferred_type_access_control.
9001         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
9002         component_decl_1, named_parm): Adjust.
9003         * friend.c (is_friend): Nested classes are friends of their
9004         enclosing classes.
9005
9006         * class.c (currently_open_derived_class): New fn.
9007         * method.c (hack_identifier): Use it.
9008
9009         * lex.c (do_identifier): Remove obsolete code.
9010
9011         * parse.y (typed_typespecs): Propagate new_type_flag properly.
9012
9013 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
9014
9015         * tinfo.h: Remove apostrophes from C++ comment (xgettext
9016         thinks this file is plain C).
9017
9018 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9019
9020         * Makefile.in (call.o): Depend on $(EXPR_H).
9021
9022         * call.c: Include "expr.h".
9023
9024         * class.c (dump_class_hierarchy): Add prototype.
9025
9026         * search.c (dfs_get_pure_virtuals): Likewise.
9027
9028 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
9029
9030         * parse.y (simple_stmt): Allow :: token in asm parameter list.
9031         * parse.c: Rebuilt.
9032
9033 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
9034
9035         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
9036         Store it in DECL_FCONTEXT.
9037         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
9038
9039 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
9040
9041         * tinfo.h (old abi): #include "tconfig.h".
9042         * tinfo.cc (convert_to_base): Move into old abi section.
9043
9044 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
9045
9046         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
9047         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
9048         (BINFO_PRIMARY_BINFO): New macro.
9049         (BF_DELTA): Rename to ...
9050         (BV_DELTA): ... this.
9051         (BF_VCALL_INDEX): Rename to ...
9052         (BV_VCALL_INDEX): ... this.
9053         (BF_FN): Rename to ...
9054         (BV_FN): ... this.
9055         * class.c (build_vbase_path): Adjust for changes to reverse_path.
9056         (set_rtti_entry): Rename BF_ macros to BV_ variants.
9057         (modify_vtable_entry): Simplify.
9058         (add_virtual_function): Rename BF_ macros to BV_ variants.
9059         (build_vtable_initializer): Likewise.
9060         (get_class_offset_1): Remove.
9061         (dfs_get_class_offset): Likewise.
9062         (get_class_offset): Likewise.
9063         (dfs_find_final_overrider): New function.
9064         (find_final_overrider): Likewise.
9065         (modify_one_vtable): Remove.
9066         (dfs_find_base): New function.
9067         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
9068         find_final_overrider.
9069         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
9070         virtuals.
9071         (dfs_fixup_vtable_deltas): Remove.
9072         (override_one_vtable): Remove.
9073         (merge_overrides): Likewise.
9074         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
9075         unreal chilren of virtual bases.
9076         (finish_struct_1): Don't use merge_overrides.  Don't use
9077         dfs_fixup_vtable_deltas.
9078         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
9079         BINFOs.
9080
9081 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
9082             Jason Merrill  <jason@yorick.cygnus.com>
9083
9084         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
9085
9086 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
9087
9088         * exception.cc (__throw_bad_typeid): Add missing std::.
9089
9090 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9091
9092         * cp-tree.h (make_thunk): PROTO -> PARAMS.
9093
9094 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
9095
9096         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
9097
9098         Runtime support for new-abi rtti.
9099         * inc/typeinfo (type_info::operator!=): Define in class.
9100         (type_info::before, type_info::name, type_info::operator==,
9101         type_info::operator!=): Define new ABI implementations.
9102         (type_info::is_pointer_p, type_info::is_function_p): Declare
9103         new virtual functions.
9104         (type_info::do_catch, type_info::do_upcast): Likewise.
9105
9106         * tinfo.h (__base_class_info): Define new class.
9107         (__class_type_info): Likewise.
9108         (__si_class_type_info): Likewise.
9109         (__vmi_class_type_info): Likewise.
9110         (__dynamic_cast): Prototype.
9111
9112         * tinfo.cc: Conditionalize old and new rtti mechanisms.
9113         (type_info::is_pointer_p): Define new function.
9114         (type_info::is_function_p): Likewise.
9115         (type_info::do_catch): Likewise.
9116         (type_info::do_upcast): Likewise.
9117         (vtable_prefix): New structure for vtable access.
9118         (adjust_pointer): Define new template function.
9119         (contained_p, public_p, virtual_p, contained_public_p,
9120         contained_nonpublic_p, contained_nonvirtual_p): Define new
9121         functions.
9122         (nonvirtual_base_type): New local variable.
9123         (__class_type_info::~__class_type_info): Define.
9124         (__si_class_type_info::~__si_class_type_info): Likewise.
9125         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
9126         (__class_type_info::do_catch): Define new function.
9127         (__class_type_info::do_upcast): Likewise.
9128         (__class_type_info::find_public_src): Likewise.
9129         (__class_type_info::do_find_public_src): Likewise.
9130         (__si_class_type_info::do_find_public_src): Likewise.
9131         (__vmi_class_type_info::do_find_public_src): Likewise.
9132         (__class_type_info::do_dyncast): Likewise.
9133         (__si_class_type_info::do_dyncast): Likewise.
9134         (__vmi_class_type_info::do_dyncast): Likewise.
9135         (__class_type_info::do_upcast): Likewise.
9136         (__si_class_type_info::do_upcast): Likewise.
9137         (__vmi_class_type_info::do_upcast): Likewise.
9138         (__dynamic_cast): Likewise.
9139
9140         * tinfo2.cc (__fundamental_type_info): Define new class.
9141         (__pointer_type_info): Likewise.
9142         (__reference_type_info): Likewise.
9143         (__array_type_info): Likewise.
9144         (__function_type_info): Likewise.
9145         (__enum_type_info): Likewise.
9146         (__ptr_to_member_type_info): Likewise.
9147         (__fundamental_type_info::~__fundamental_type_info): Define.
9148         (__pointer_type_info::~__pointer_type_info): Likewise.
9149         (__reference_type_info::~__reference_type_info): Likewise.
9150         (__array_type_info::~__array_type_info): Likewise.
9151         (__function_type_info::~__function_type_info): Likewise.
9152         (__enum_type_info::~__enum_type_info): Likewise.
9153         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
9154         (__pointer_type_info::do_catch): Define new function.
9155         (__ptr_to_member_type_info::do_catch): Define new function.
9156
9157         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
9158         (__is_pointer): Likewise.
9159
9160         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
9161
9162 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
9163
9164         * cp/class.c (build_vtable): Rename to build_primary_vtable.
9165         (prepare_fresh_vtable): Rename to build_secondary_vtable.
9166         (make_new_vtable): New function.
9167         (modify_vtable_entry): Handle generation of new vtables correctly.
9168         (modify_one_vtable): Remove unused parameter.
9169         (dfs_fixup_vtable_deltas): Likewise.
9170         (override_one_vtable): Use build_secondary_vtable.
9171         (finish_struct_1): Use build_primary_vtable and
9172         build_secondary_vtable.
9173
9174 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
9175
9176         * cp/decl.c: Adjust variable names, comments, help strings.
9177
9178 2000-01-29  Nathan Sidwell  <nathan@acm.org>
9179
9180         * new2.cc (operator delete[]): Use operator delete, don't assume
9181         implementation.
9182
9183 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
9184
9185         * class.c (build_vtbl_initializer): Add argument to
9186         build_vtable_entry call.
9187
9188 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
9189
9190         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
9191         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
9192         (BF_DELTA): New macro.
9193         (BF_VCALL_INDEX): Likewise.
9194         (BF_FN): Likewise.
9195         (THUNK_VCALL_OFFSET): Likewise.
9196         (make_thunk): Change prototype.
9197         * class.c (build_vtable_entry): Integrate
9198         build_vtable_entry_for_fn.  Handle vcall indices.
9199         (build_vtable_entry_for_fn): Remove.
9200         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
9201         BF_VCALL_INDEX, BF_FN.
9202         (modify_vtable_entry): Integrate common code from
9203         modify_one_vtable and dfs_fixup_vtable_deltas.
9204         (add_virtual_function): Set BF_VCALL_INDEX.
9205         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
9206         and BF_FN.
9207         (modify_one_vtable): Simplify.
9208         (dfs_fixup_vtable_deltas): Likewise.
9209         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
9210         * method.c (make_thunk): Handle vcall indices.
9211
9212 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
9213
9214         Compiler side new abi rtti (not enabled).
9215         * cp-tree.h (new_abi_rtti_p): New macro.
9216         (emit_support_tinfos): Prototype new function.
9217         (tinfo_decl_p): Likewise.
9218         (emit_tinfo_decl): Likwise.
9219         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
9220         macros.
9221         (doing_runtime): New local static.
9222         (init_rtti_processing): Add new-abi initializer.
9223         (get_tinfo_decl): Add new-abi logic.
9224         (tinfo_from_decl): Likewise.
9225         (build_dynamic_cast_1): Likewise.
9226         (qualifier_flags): New static function.
9227         (tinfo_base_init): Likewise.
9228         (generic_initializer): Likewise.
9229         (ptr_ref_initializer): Likewise.
9230         (ptmd_initializer): Likewise.
9231         (class_hint_flags): Likewise.
9232         (class_initializer): Likewise.
9233         (synthesize_tinfo_var): Likewise.
9234         (create_real_tinfo_var): Likewise.
9235         (create_pseudo_type_info): Likewise.
9236         (get_vmi_pseudo_type_info): Likewise.
9237         (create_tinfo_types): Likewise.
9238         (emit_support_tinfos): New global function.
9239         (tinfo_decl_p): New global predicate.
9240         (emit_tinfo_decl): New global function.
9241         * class.c (set_rtti_entry): Generalize for old and new rtti.
9242         (build_vtbl_initializer): Likewise.
9243         * decl2.c (finish_file): Likewise.
9244
9245 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
9246
9247         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
9248         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
9249
9250 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
9251
9252         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
9253         for scopes.
9254
9255 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
9256
9257         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
9258
9259 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
9260
9261         * optimize.c (calls_setjmp_r): Supply new argument
9262         to special_function_p.
9263
9264 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9265
9266         * call.c: PROTO -> PARAMS.
9267         * class.c: Likewise.
9268         * cp-tree.h: Likewise.
9269         * cvt.c: Likewise.
9270         * decl.c: Likewise.
9271         * decl.h: Likewise.
9272         * decl2.c: Likewise.
9273         * dump.c: Likewise.
9274         * errfn.c: Likewise.
9275         * error.c: Likewise.
9276         * except.c: Likewise.
9277         * expr.c: Likewise.
9278         * init.c: Likewise.
9279         * input.c: Likewise.
9280         * lex.c: Likewise.
9281         * lex.h: Likewise.
9282         * method.c: Likewise.
9283         * optimize.c: Likewise.
9284         * parse.y: Likewise.
9285         * pt.c: Likewise.
9286         * repo.c: Likewise.
9287         * rtti.c: Likewise.
9288         * search.c: Likewise.
9289         * semantics.c: Likewise.
9290         * spew.c: Likewise.
9291         * tree.c: Likewise.
9292         * typeck.c: Likewise.
9293         * typeck2.c: Likewise.
9294         * xref.c: Likewise.
9295
9296 2000-01-25  Richard Henderson  <rth@cygnus.com>
9297
9298         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
9299
9300 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
9301
9302         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
9303         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
9304         (struct vcall_offset_data_s): New type.
9305         (dfs_vcall_offset_queue_p): New function.
9306         (dfs_build_vcall_offset_vtbl_entries): Likewise.
9307         (build_vcall_offset_vtbl_entries): Likewise.
9308         (layout_vtable_decl): Likewise.
9309         (num_vfun_entries): Likewise.
9310         (num_extra_vtbl_entries): Add the entries for vcall offsets.
9311         (build_vtbl_initializer): Likewise.
9312         (dfs_finish_vtabls): Use layout_vtable_decl.
9313         (modify_one_vtables): Always duplicate vtables under the new ABI.
9314         (finish_struct_1): Use layout_vtable_decl.
9315
9316 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9317
9318         * decl.c (member_function_or_else): Change third arg from a format
9319         specifier to an `enum overload_flags'.  Callers changed.
9320
9321 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
9322
9323         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
9324         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
9325         build_const_cast, get_delta_difference, check_return_expr): Avoid
9326         ANSI string concatenation usage.
9327
9328 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
9329
9330         * class.c (layout_class_type): Put the fields required to make a
9331         class non-empty at the end, not the beginning, of the TYPE_FIELDs
9332         list.
9333
9334 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
9335
9336         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
9337         template.
9338
9339         * decl2.c (mark_used): Do instantiate inlines that have been
9340         explicitly instantiated.
9341
9342 2000-01-24  Richard Henderson  <rth@cygnus.com>
9343
9344         * call.c (build_over_call): Use expand_tree_builtin.
9345         * typeck.c (build_function_call_real): Likewise.
9346         (build_binary_op_nodefault): Handle unordered compares.
9347
9348 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
9349
9350         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
9351         cp_tree_index values.
9352         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
9353         New global node #defines for them.
9354         * rtti.c (call_void_fn): Replace with ...
9355         (build_runtime_decl): ... new static function.
9356         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
9357         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
9358         (build_dynamic_cast_1): Always produce correctly typed result.
9359         Explicitly produce type_info addresses. Use dynamic_cast_node.
9360         * exception.cc (__throw_bad_cast): Return `void *'.
9361         (__throw_bad_typeid): Return `const type_info &'.
9362
9363 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
9364
9365         * cp-tree.h (get_vtable_decl): Prototype new function.
9366         * class.c (get_vtable_decl): New function. Broken out from ...
9367         (build_vtable): ... here. Use it.
9368         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
9369         by get_vtable_decl.
9370
9371 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
9372
9373         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
9374         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
9375         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
9376         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
9377         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
9378         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
9379         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
9380         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
9381         (CPTI_TINFO_VAR_ID): New enumeration.
9382         (__tp_desc_type_node, __access_mode_type_node,
9383         __bltn_desc_type_node, __user_desc_type_node,
9384         __class_desc_type_node, __ptr_desc_type_node,
9385         __attr_desc_type_node, __func_desc_type_node,
9386         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
9387         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
9388         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
9389         enum_desc_type_node, class_desc_type_node,
9390         si_class_desc_type_node, vmi_class_desc_type_node,
9391         ptmd_desc_type_node, base_desc_type_node): New #defines.
9392         (tinfo_fn_id, tinfo_fn_type): Rename to ...
9393         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
9394         (tinfo_var_id): New enumeration.
9395         (DECL_TINFO_FN_P): Augment comment.
9396         * decl.c (cp_global_trees): Adjust documentation.
9397         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
9398         tinfo_decl_type and tinfo_var_id.
9399         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
9400         (build_typeid): Remove unused variable.
9401         (get_tinfo_var): Use tinfo_var_id.
9402         (tinfo_name): New static function.
9403         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
9404         (tinfo_from_decl): Likewise.
9405         (get_base_offset): New static function, broken out of
9406         expand_class_desc.
9407         (expand_si_desc): Use tinfo_name.
9408         (expand_class_desc): Likewise. Lose local static variable.
9409         Use base_desc_type_node. Use get_base_offset.
9410         (expand_ptr_desc): Use tinfo_name.
9411         (expand_attr_desc): Likewise.
9412         (expand_generic_desc): Likewise.
9413
9414         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
9415         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
9416
9417 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
9418
9419         * cp-tree.h (__eprintf): Remove declaration.
9420         * tree.c (__eprintf): Remove definition.
9421
9422 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
9423             Mark Mitchell  <mark@codesourcery.com>
9424
9425         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
9426         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
9427
9428 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
9429
9430         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
9431
9432 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
9433
9434         * cp-tree.h (register_dtor_fn): New function.
9435         * decl.c (destroy_local_static): Rename to ...
9436         (register_dtor_fn): ... this.  Give it external linkage.
9437         (expand_static_init): Use it.
9438         * decl2.c (do_static_initialization): Likewise, if using
9439         __cxa_atexit.
9440         (do_static_destruction): Check that __cxa_atexit is not in use.
9441         (finish_file): Don't call do_static_destruction if using
9442         __cxa_atexit.
9443
9444         * typeck.c (convert_arguments): Restore two-message error
9445         reporting.
9446
9447 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
9448
9449         Remap dynamic cast hint values to be consistent across ABIs.
9450         * search.c (dynamic_cast_base_recurse): Remap generated value.
9451         (get_dynamic_cast_base_type): Adjust documentation.
9452         * tinfo.h (__user_type_info::dyncast): Likewise.
9453         (__user_type_info::find_public_subobj): Remap BOFF meaning.
9454         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
9455         (__class_type_info::do_dyncast): Likewise.
9456         (__class_type_info::do_find_public_subobj): Likewise.
9457         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
9458
9459 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
9460
9461         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
9462
9463         * typeck2.c (incomplete_type_error): Restore previous
9464         cp_error and cp_error_at call sequence.
9465
9466 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
9467
9468         * class.c (dump_class_hierarchy): Make format agree with argument;
9469         cast pointer to unsigned long and print with %lx.
9470
9471 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
9472
9473         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
9474
9475         * typeck.c (composite_pointer_type, common_type,
9476         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
9477         build_function_call_real, convert_arguments,
9478         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
9479         build_unary_op, mark_addressable, build_compound_expr,
9480         build_static_cast, build_reinterpret_cast, build_const_cast,
9481         build_c_cast, build_modify_expr, get_delta_difference,
9482         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
9483         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
9484         into a single one.
9485         * typeck2.c (readonly_error, abstract_virtuals_error,
9486         process_init_constructor, check_for_new_type): Likewise.
9487
9488 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
9489
9490         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
9491         VAR_DECLs.
9492
9493 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
9494
9495         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
9496         (build_x_typeid): Likewise.
9497         (get_tinfo_fn): Likewise.
9498         (get_tinfo_fn_unused): Rename to ...
9499         (get_tinfo_decl): ... here.
9500         * rtti.c (build_headof): Replace logic error with assertion.
9501         (get_tinfo_fn_dynamic): Rename to ...
9502         (get_tinfo_decl_dynamic): ... here. Make static. Use
9503         complete_type_or_else.
9504         (build_x_typeid): Move into ...
9505         (build_typeid): ... here. Adjust call to
9506         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
9507         throw_bad_typeid expression.
9508         (get_tinfo_fn_unused): Rename to ...
9509         (get_tinfo_decl): ... here. Adjust comment.
9510         (get_tinfo_fn): Delete.
9511         (tinfo_from_decl): New static function.
9512         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
9513         (get_typeid): Use complete_type_or_else.
9514         (build_dynamic_cast_1): Adjust calls to
9515         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
9516         * parse.y (primary): Adjust call to build_typeid.
9517         * except.c (build_eh_type_type_ref): Adjust call to
9518         get_tinfo_decl. Mark as used.
9519         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
9520         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
9521         * parse.c: Regenerated.
9522
9523 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
9524
9525         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
9526         calling convention.
9527         (resolves_to_fixed_type_p): Document calling convention.
9528         * rtti.c (build_x_typeid): Initialize NONNULL.
9529
9530         * cp-tree.h (build_shared_int_cst): New function.
9531         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
9532         * class.c (modify_vtable_entry): Likewise.
9533         (add_virtual_function): Split out code to generated shared
9534         INTEGER_CSTs to build_share_int_cst.
9535         (modify_all_vtables): Handle all the overridden functions here.
9536         Add overridden functions from non-primary virtual bases to the
9537         primary vtable.
9538         (finish_struct_1): Adjust call to modify_all_vtables.  Add
9539         overridden functions from non-primary bases to the vtable.
9540         * tree.c (build_shared_int_cst): New function.
9541
9542         * cp-tree.h (scratchalloc): Remove.
9543         (build_scratch_list): Likewise.
9544         * call.c (convert_class_to_reference): Replace build_scratch_list
9545         and build_expr_list with build_tree_list.
9546         (add_candidate): Replace scratchalloc with expralloc.  Note memory
9547         leak.
9548         (build_user_type_conversion_1):  Replace build_scratch_list
9549         and build_expr_list with build_tree_list.
9550         (build_new_op): Likewise.
9551         (build_op_delete_call): Likewise.
9552         (convert_like): Likewise.
9553         * cvt.c (ocp_convert): Likewise.
9554         * decl.c (start_decl): Likewise.
9555         (start_function): Likewise.
9556         (finish_destructor_body): Likewise.
9557         (maybe_build_cleanup_1): Likewise.
9558         * decl2.c (reparse_decl_as_expr): Likewise.
9559         * init.c (perform_member_init): Likewise.
9560         (expand_cleanup_for_base): Likewise.
9561         (build_builtin_delete_call): Likewise.
9562         (build_new_1): Likewise.
9563         (build_delete): Likewise.
9564         * method.c (do_build_assign_ref): Likewise.
9565         * parse.y (already_scoped_stmt): Likewise.
9566         (nontrivial_exprlist): Likewise.
9567         (net_initializer): Likewise.
9568         (initlist): Likewise.
9569         * parse.c: Regenerated.
9570         * rtti.c (build_x_typeid): Likewise.
9571         (build_dynamic_cast_1): Likewise.
9572         * typeck.c (build_x_compound_expr): Likewise.
9573         (build_static_cast): Likewise.
9574         (build_modify_expr): Likewise.
9575
9576         * cp-tree.h (DECL_VINDEX): Add documentation.
9577         * class.c (build_vtable_entry): Likewise.
9578         (start_vtable): Add comment.
9579         (add_virtual_function): Replace pending_hard_virtuals with
9580         overridden_virtuals and pending_virtuals with new_virtuals.
9581         Replace redundant assignments with assertions.
9582         (check_for_override): Add comment.
9583         (check_bases_and_members): Replace pending_hard_virtuals with
9584         overridden_virtuals and pending_virtuals with new_virtuals.
9585         (create_vtbl_ptr): Likewise.
9586         (layout_class_type): Likewise.
9587         (finish_struct_1): Likewise.  Add comments.
9588
9589 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
9590
9591         * class.c (finish_struct_1): Replace redundant code with
9592         assertions.
9593
9594         * cp-tree.h (flag_new_abi): Move.
9595         (flag_use_cxa_atexit): Likewise.
9596         (flag_honor_std): Likewise.
9597         (flag_rtti): Likewise.
9598         (vbase_offsets_in_vtable_p): Define.
9599         (vptrs_present_everywhere_p): Likewise.
9600         (TYPE_CONTAINS_VPTR_P): Likewise.
9601         (dfs_walk_real): Declare.
9602         * class.c (build_vbase_pointer_fields): Check
9603         vbase_offsets_in_vtable_p.
9604         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
9605         BINFO_VPTR_FIELD.
9606         (build_vbase_offset_vtbl_entries): Simplify.
9607         (build_vbase_offset_vtbl_entries): Adjust.
9608         (build_vbase_pointer): Add ability to look up vbase offsets in
9609         vtable.
9610         (start_vtable): New function.
9611         (add_virtual_function): Use it.
9612         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
9613         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
9614         (build_vtbl_initializer): Take the type of the complete object as
9615         input.  Use it to correctly calculate vbase offsets.
9616         (dfs_finish_vtbls): Pass the complete type to
9617         build_vtbl_initializer.
9618         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
9619         (create_vtable_ptr): Create a vtable even if there are no
9620         new virtual functions, under the new ABI.
9621         (finish_struct_1): Likewise.
9622         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
9623         * decl.c (exapnd_static_init): Remove call to
9624         preserve_initializer.
9625         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
9626         vtables.
9627         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
9628         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
9629         (construct_virtual_bases): Don't initialize virtual base pointers
9630         under the new ABI.
9631         (build_aggr_init): Clean up comment.
9632         (expand_aggr_init_1): Likewise.
9633         * rtti.c (expand_class_desc): Store the virtual function table
9634         index where the vbase offset lives in the offset field.
9635         * search.c (dfs_walk_real): Make it global.
9636         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
9637         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
9638
9639         * tinfo.h (USItype): Make it signed under the new ABI.
9640         * tinfo.cc (convert_to_base): New function.  Encapsulate base
9641         conversion logic here.
9642         (__class_type_info::do_upcast): Use it.
9643         (__class_type_info::do_dyncast): Likewise.
9644         (__class_type_info::do_find_public_subobj): Likewise.
9645
9646         * init.c (construct_virtual_bases): Don't look up the addresses of
9647         virtual bases at run-time.
9648
9649         * class.c (build_vbase_pointer): Relocate.
9650         (build_vbase_pointer_fields): Likewise.
9651         (dfs_build_vbase_offset_vtbl_entries): Likewise.
9652         (build_vbase_offset_vtbl_entries): Likewise.
9653
9654         * decl.c (init_decl_processing): Complain if -fnew-abi
9655         -fno-vtable-thunks is used.
9656
9657         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
9658         flag_new_abi.
9659
9660 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
9661
9662         * cp-tree.h (num_extra_vtbl_entries): New function.
9663         (size_extra_vtbl_entries): Likewise.
9664         (dfs_vtable_path_unmark): Likewise.
9665         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
9666         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
9667         * class.c (num_extra_vtbl_entries): New function.
9668         (size_extra_vtbl_entries): Likewise.
9669         (dfs_build_vbase_offset_vtbl_entries): New function.
9670         (build_vbase_offset_vtbl_entries): Likewise.
9671         (build_vtbl_initializer): Use it.
9672         (finish_struct_1): Adjust vtable sizes (using
9673         num_extra_vtbl_entries).
9674         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
9675         THUNK_DECL is non-NULL before expanding it.
9676         * init.c (expand_virtual_init): Adjust the vtable pointer by
9677         size_extra_vtbl_entries before storing it.
9678         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
9679         Handle TREE_LIST parameters here, not in the dfs_* functions.
9680         (dfs_unmarked_real_bases_queue_p): Adjust.
9681         (dfs_marked_real_bases_queue_p): Likewise.
9682         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
9683         (dfs_vtable_path_marked_real_bases_queue_p): New function.
9684         (dfs_vtable_path_unmark): Likewise.
9685
9686 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
9687
9688         * optimize.c (copy_body_r): Clear the operand three of a
9689         TARGET_EXPR when copying it.
9690
9691 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9692
9693         * method.c (build_decl_overload_real): Check whether we are in ::
9694         before returning __builtin_new/delete.
9695
9696 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
9697
9698         * pt.c (tsubst_friend_function): Improve comment.
9699         (instantiate_decl): Avoid crashing when a "nested" function is
9700         instantiated from the top level.
9701
9702         * dump.c (dqeueue_and_dump): Dump
9703         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
9704
9705 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9706
9707         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
9708
9709 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
9710
9711         * g++spec.c (lang_specific_driver): Add -fnew-abi if
9712         ENABLE_NEW_GXX_ABI defined.
9713         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
9714         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
9715         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
9716
9717 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
9718
9719         * decl.c (start_cleanup_fn): Call pushdecl.
9720
9721         * call.c (convert_class_to_reference): Fix typos.
9722         (build_conditional_expr): Handle errors gracefully.
9723         * class.c (push_nested_class): Likewise.
9724         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
9725         (DECL_THIS_EXTERN): Use it.
9726         (DECL_THIS_STATIC): Likewise.
9727         * cvt.c (convert_to_void): Handle errors gracefully.
9728         (build_expr_type_conversion): Likewise.
9729         * decl.c (maybe_push_decl): Likewise.
9730         (start_decl_1): Likewise.
9731         (require_complete_types_for_parms): Likewise.
9732         * parse.y (structsp): Likewise.
9733         (base_class): Likewise.
9734         * parse.c: Regenerated.
9735         * pt.c (finish_member_template_decl): Likewise.
9736         * typeck.c (decay_conversion): Likewise.
9737
9738         * cp-tree.h (dfs_skip_vbases): New function.
9739         (find_vbase_instance): Likewise.
9740         * class.c (determine_primary_base): Allow a nearly empty base to
9741         serve as a primary base class under the new ABI.
9742         (get_class_offset_1): Rename to ...
9743         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
9744         messages here.
9745         (get_class_offset): Use it.  Issue error messages here.
9746         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
9747         find the right copies of virtual bases.
9748         (fixup_vtable_deltas1): Rename to ...
9749         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
9750         bases as primary bases.
9751         (fixup_vtable_deltas): Remove.
9752         (override_one_vtable): Handle virtual bases as primary bases.
9753         (merge_overrides): Likewise.
9754         (finish_struct_1): Likewise.
9755         (dump_class_hierarchy): Dump primary-ness of bases as well.
9756         * search.c (mark_primary_bases): Use a pre-order traversal to
9757         handle primary virtual bases.
9758         (dfs_skip_vbases): New fiunction.
9759         (expand_upcast_fixups): Adjust to handle primary virtual bases.
9760         (fixup_virtual_upcast_offsets): Likewise.
9761         (fixup_all_virtual_upcast_offsets): Likewise.
9762         (dfs_find_vbase_instances): New function.
9763         (find_vbase_instance): Likewise.
9764
9765 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
9766
9767         * lex.c (DIR_SEPARATOR): Delete macro.
9768
9769 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
9770
9771        * decl2.c (lang_decode_option): Handle automatic line wrapping
9772        option.
9773
9774 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
9775
9776         * friend.c (do_friend): Don't resolve scopes when processing
9777         template declarations, even if the qualifying scope doesn't
9778         involve template parameters.
9779
9780 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
9781
9782         * class.c (dfs_modify_vtables_queue_p): Remove.
9783         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
9784         and dfs_marked_real_bases_queue_p instead of
9785         dfs_modify_vtables_queue_p.
9786
9787         * class.c (build_vbase_path): Simplify.
9788         (dfs_propagate_binfo_offsets): New function.
9789         (propagate_binfo_offsets): Use it.
9790         (remove_base_field): Simplify.
9791         (dfs_set_offset_for_vbases): Remove.
9792         (dfs_set_offset_for_shared_vbases): New function.
9793         (dfs_set_offset_for_unshared_vbases): Likewise.
9794         (layout_virtual_bases): Use them.
9795         (layout_basetypes): Don't call propagate_binfo_offsets.
9796         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
9797         for the vbases.
9798
9799         * class.c (build_base_field): New function, split out from ...
9800         (build_base_fields): ... here.  Use it.  Allocate primary bases
9801         first, under the new ABI.
9802         (get_vtable_entry): Remove.
9803         (remove_base_field): New function, split out from ...
9804         (remove_base_fields): ... here.  Adjust since primary bases come
9805         first under the new ABI.
9806
9807         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
9808         (initialize_vtbl_ptrs): New function.
9809         (expand_indirect_vtbls_init): Change prototype.
9810         (convert_pointer_to_vbase): Declare.
9811         * init.c (expand_direct_vtbls_init): Remove.
9812         (dfs_initialize_vtbl_ptrs): New function.
9813         (initialize_vtbl_ptrs): Likewise.
9814         (emit_base_init): Use initialize_vtbl_ptrs.
9815         * search.c (convert_pointer_to_vbase): Make it global.
9816         (expand_indirect_vtbls_init): Remove vtable initialization code.
9817         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
9818
9819         * class.c (dfs_finish_vtbls): New function.
9820         (finish_vtbls): Use it.
9821         (dump_class_hierarchy): New function.
9822
9823         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
9824         (BINFO_VBASE_PRIMARY_P): New macro.
9825         (BINFO_VIRTUALS): Add to documentation.
9826         (SET_BINFO_PRIMARY_MARKED_P): Remove.
9827         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9828         (dfs_mark_primary_bases_queue_p): Likewise.
9829         (dfs_unmarked_real_bases_queue_p): New function.
9830         (dfs_marked_real_bases_queue_p): Likewise.
9831         * search.c (dfs_mark_primary_bases): Adjust.
9832         (mark_primary_bases): Likewise.
9833         (get_shared_vbase_if_not_primary): New function.
9834         (dfs_unmarked_real_bases_queue_p): Likewise.
9835         (dfs_marked_real_bases_queue_p): Likewise.
9836         (dfs_get_pure_virtuals): Simplify.
9837         (get_pure_virtuals): Likewise.
9838
9839 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9840
9841         * lex.c: Include tm_p.h.
9842
9843 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
9844
9845         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
9846
9847 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
9848
9849         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
9850         * pt.c (instantiate_decl): Defer comdat templates that might not be
9851         needed.
9852
9853         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
9854         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
9855         (finish_file): Likewise.
9856
9857         * decl2.c (import_export_class): Undo 12/14 change.
9858
9859         * error.c (dump_decl): operator new, not operatornew.
9860
9861         * class.c (field_decl_cmp): A nontype is "greater" than a type.
9862         * search.c (lookup_field_1): Look for the last field with the
9863         desired name.
9864
9865 2000-01-05  Nathan Sidwell  <nathan@acm.org>
9866
9867         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
9868         FUNCTION_DECL.
9869
9870 2000-01-05  Nathan Sidwell  <nathan@acm.org>
9871
9872         * typeck.c (build_static_cast): Don't strip target qualifiers
9873         when casting from a class.
9874
9875 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9876
9877         * class.c (warn_hidden): Initialize variable `fndecl'.
9878
9879 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
9880
9881         * decl.c (flag_isoc9x): New variable to be able to use code in
9882         c-common.c.  For now always zero.
9883
9884 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
9885
9886         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
9887         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
9888         or unshare_base_binfos for virtual bases here.
9889         * search.c (dfs_get_vbase_types): Do it here.
9890         (get_vbase_types): Adjust.
9891
9892 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
9893
9894         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
9895         (BINFO_PRIMARY_MARKED_P): Use flag 5.
9896         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
9897         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9898         (unmark_primary_bases): Remove declaration.
9899         (unmarkedp): Declare.
9900         (dfs_vbase_unmark): Likewise.
9901         * class.c (determine_primary_base): Return immediately if there
9902         are no base classes.  Call mark_primary_bases here.
9903         (modify_all_direct_vtables): Remove.
9904         (modify_all_indirect_vtables): Remove.
9905         (dfs_modify_vtables_queue_p): New function.
9906         (dfs_modify_vtables): New function.
9907         (modify_all_vtables): Use them.
9908         (build_base_fields): Build FIELD_DECLs for primary virtual base
9909         classes.
9910         (create_vtable_ptr): Don't call determine_primary_base here.
9911         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
9912         (dfs_set_offset_for_vbases): ... this.
9913         (layout_virtual_bases): Use it.
9914         (layout_class_type): Call determine_primary_base here.
9915         * search.c (unmarkedp): Make it global.
9916         (shared_marked_p): Simplify.
9917         (shared_unmarked_p): Likewise.
9918         (dfs_primary_bases_queue_p): Remove.
9919         (dfs_unmark_primary_bases): Likewise.
9920         (unmark_primary_bases): Likewise.
9921         (mark_primary_bases): Simplify.
9922         (get_pure_virtuals): Don't call mark_primary_bases here.
9923         (dfs_vbase_unmark): New function.
9924         (get_vbase_types): Simplify.
9925
9926         * class.c (struct base_info): Remove.
9927         (determine_primary_base): Take has_virtual_p rather than a
9928         base_info as input.  Don't calculate max_has_virtual.
9929         (finish_struct_bits): Remove max_has_virtual argument.
9930         (create_vtable_ptr): Remove max_has_virtual_p argument.
9931         (layout_virtual_bases): Remove max argument.
9932         (layout_basetypes): Likewise.
9933         (layout_class_type): Remove max_has_virtual_p argument.
9934         (finish_struct_1): Remove max_has_virtual.
9935
9936         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
9937         (layout_basetypes): Remove.
9938         * class.c (propagate_binfo_offsets): Moved here from tree.c.
9939         Update to handle primary virtual bases.
9940         (remove_base_fields): New function, split out from
9941         layout_basetypes.
9942         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
9943         (layout_virtual_bases): New function, split out from
9944         layout_basetypes.  Update to handle primary virtual bases.
9945         (layout_basetypes): Moved here from tree.c.  Use
9946         remove_base_fields and layout_virtual_bases.
9947         * search.c (dfs_mark_primary_bases_queue_p): New function.
9948         (mark_primary_bases): Use it.
9949         * tree.c (CEIL): Remove.
9950         (propagate_binfo_offsets): Remove.
9951         (layout_basetypes): Remove.
9952
9953 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
9954
9955         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
9956         (BINFO_PRIMARY_MARKED_P): New macro.
9957         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
9958         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9959         (mark_primary_bases): New function.
9960         (unmark_primary_bases): Likewise.
9961         * search.c (get_abstract_virtuals_1): Remove.
9962         (dfs_mark_primary_bases): New function.
9963         (mark_primary_bases): Likewise.
9964         (dfs_unmark_primary_bases): Likewise.
9965         (unmark_primary_bases): Likewise.
9966         (dfs_get_pure_virtuals): Likewise.
9967
9968 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
9969
9970         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
9971         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
9972         (modify_one_vtable): Adjust.
9973         (fixup_vtable_deltas1): Likewise.
9974         (override_one_vtable): Likewise.
9975         * search.c (get_abstract_virtuals_1): Likewise.
9976         (get_pure_virtuals): Likewise.
9977         (expand_upcast_fixups): Likewise.
9978         * tree.c (debug_binfo): Likewise.
9979
9980         * class.c (build_vtable): Don't return a value.  Don't rebuild
9981         vtables for bases that have already been handled.
9982         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
9983         already been handled.
9984         (modify_one_vtable): Adjust accordingly.
9985         (fixup_vtable_deltas1): Likewise.
9986         (finish_struct_1): Likewise.
9987
9988 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9989
9990         * call.c (build_new_method_call): Also check destructors.