OSDN Git Service

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