OSDN Git Service

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