OSDN Git Service

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