OSDN Git Service

* decl.c (grokdeclarator): Count partial specializations when
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
2
3         * decl.c (grokdeclarator): Count partial specializations when
4         keeping track of how many template classes have been seen.
5
6         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
7         
8 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9
10         * class.c (build_vbase_pointer_fields): layout_field now place_field.
11         (get_vfield_offset): Use byte_position.
12         (set_rtti_entry): Set OFFSET to ssizetype zero.
13         (get_binfo_offset_as_int): Deleted.
14         (dfs_record_base_offsets): Use tree_low_cst.
15         (dfs_search_base_offsets): Likewise.
16         (layout_nonempty_base_or_field): Reflect changes in RLI format
17         and call byte_position.
18         (layout_empty_base): Convert offset to ssizetype.
19         (build_base_field): use rli_size_unit_so_far.
20         (dfs_propagate_binfo_offsets): Do computation in proper type.
21         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
22         (layout_class_type): Reflect changes in RLI names and fields.
23         (finish_struct_1): Set DECL_FIELD_OFFSET.
24         * dump.c (dequeue_and_dump): Call bit_position.
25         * expr.c (cplus_expand_constant): Use byte_position.
26         * rtti.c (expand_class_desc): Use bitsize_one_node.
27         * typeck.c (build_component_addr): Use byte_position and don't
28         special case for zero offset.
29         
30 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
31
32         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
33         
34         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
35         tinfo object.
36         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
37         vtable.
38
39 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
40
41         * call.c (check_dtor_name,build_new_method_call): Use DECL_P and
42         TYPE_P macros.
43         * decl.c (push_class_binding,poplevel,pushtag,lookup_namespace_name,
44         make_typename_type,check_initializer,cp_finish_decl,xref_tag): Likewise.
45         * decl2.c (grokfield,build_expr_from_tree,build_expr_from_tree,
46         decl_namespace,arg_assoc_template_arg,arg_assoc,
47         validate_nonmember_using_decl,do_class_using_decl): Likewise.
48         * error.c (dump_template_argument,dump_expr,cp_file_of,cp_line_of,
49         args_to_string): Likewise.
50         * friend.c (is_friend): Likewise.
51         * lex.c (note_got_semicolon,note_list_got_semicolon,is_global): Likewise.
52         * method.c (build_overload_nested_name,build_overload_value,
53         build_qualified_name,build_qualified_name,hack_identifier): Likewise.
54         * parse.y (typename_sub,typename_sub1): Likewise.
55         * pt.c (push_inline_template_parms_recursive,check_template_shadow,
56         process_partial_specialization,convert_template_argument,
57         template_args_equal,add_pending_template,lookup_template_class,
58         for_each_template_parm_r,maybe_fold_nontype_arg,
59         tsubst,instantiate_template,type_unification_real,unify,
60         instantiate_pending_templates,set_mangled_name_for_template_decl):
61         Likewise.
62         * repo.c (repo_get_id,repo_template_used): Likewise.
63         * search.c (lookup_field_1): Likewise.
64         * tree.c (walk_tree,get_type_decl,cp_tree_equal,member_p): Likewise.
65         * xref.c (classname): Likewise.
66         
67 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
68
69         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
70         (CANONICAL_BINFO): New macro.
71         (BINFO_NEW_VTABLE_MARKED): Use it.
72         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
73         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
74         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
75         not TREE_TYPE.
76         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
77         (build_secondary_vtable): Likewise.
78         (dfs_finish_vtbls): Likewise.
79         (dfs_accumulate_vtbl_inits): Likewise.
80         (accumulate_vtbl_inits): New function.
81         (finish_vtbls): Make sure that virtual bases come after
82         non-virtual bases in the vtable group.
83         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
84         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
85         * search.c (struct vbase_info): Move definition.
86         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
87         (unmarked_new_vtable_p): Likewise.
88         (dfs_mark_vtable_path): Remove.
89         (dfs_mark_new_vtable): Remove.
90         (dfs_unmark_new_vtable): Likewise.
91         (dfs_clear_search_slot): Likewise.
92         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
93         (dfs_clear_vbase_slots): Likewise.
94         (init_vbase_pointers): LIkewise.
95         
96 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
97
98         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
99         SIZETYPE to a non-SIZETYPE.
100
101 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
102
103         * class.c (layout_virtual_bases): Adjust names in conditionally
104         compiled code.
105         
106         * class.c (record_base_offsets): New function.
107         (layout_conflict_p): Likewise.
108         (layout_nonempty_base_or_field): Use it.
109         (layout_empty_base): New function.
110         (build_base_field): Use it.
111         (build_base_fields): Update comment.
112         (layout_virtual_bases): Fold in a little code form
113         layout_basetypes.  Use layout_empty_base.
114         (layout_basetypes): Remove.
115         (end_of_class): New function.
116         (layout_class_type): Use it.  Adjust.
117
118         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
119         (fntype_p): Remove.
120         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
121         comment. 
122         (dfs_skip_nonprimary_vbases_markedp): Likewise.
123         * typeck.c (fntype_p): Remove.
124
125         * cp-tree.h (TI_SPEC_INFO): Remove.
126         (CLASSTYPE_TI_SPEC_INFO): Likewise.
127         * pt.c (process_partial_specialization): Likewise.
128
129         * class.c (build_base_field): Fix thinko in computation of binfo
130         offsets.
131
132         * tree.c (mark_local_for_remap_p): Mark variables declared in
133         TARGET_EXPRs as well.
134
135 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
136
137         * typeck.c (require_complete_type, complete_type,
138         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
139         build_array_ref, convert_arguments, pointer_diff,
140         build_x_unary_op, build_unary_op, build_c_cast,
141         build_modify_expr): Use COMPLETE_TYPE_P etc.
142         * call.c (is_complete, convert_like_real,
143         build_new_method_call): Likewise.
144         * class.c (build_vbase_pointer_fields, check_bases,
145         build_base_field, finish_struct_1, pushclass): Likewise.
146         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
147         * decl.c (maybe_process_template_type_declaration, pushtag,
148         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
149         layout_var_decl, check_initializer, cp_finish_decl,
150         grokdeclarator, require_complete_types_for_parms,
151         grok_op_properties, xref_tag, xref_basetypes,
152         check_function_type): Likewise.
153         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
154         * friend.c (do_friend): Likewise.
155         * init.c (build_offset_ref): Likewise.
156         * parse.y (structsp): Likewise.
157         * pt.c (maybe_process_partial_specialization,
158         tsubst_friend_function, instantiate_class_template, tsubst,
159         do_type_instantiation, instantiate_pending_templates): Likewise.
160         * repo.c (repo_get_id): Likewise.
161         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
162         synthesize_tinfo_var, emit_support_tinfos): Likewise.
163         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
164         * semantics.c (begin_class_definition): Likewise.
165         * tree.c (build_cplus_method_type): Likewise.
166         * typeck2.c (digest_init, build_functional_cast,
167         add_exception_specifier): Likewise.
168         * parse.h, parse.c: Regenerated.
169
170 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
171
172         * inc/cxxabi.h: New header file. Define new-abi entry points.
173         (__pointer_type_info::target): Rename member to ...
174         (__pointer_type_info::type): ... here.
175         (__base_class_info::type): Rename member to ...
176         (__base_class_info::base): ... here.
177         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
178         * cp-tree.h (CPTI_ABI): New global tree enumeration.
179         (abi_node): New global tree node.
180         * decl.c (abi_node): Document.
181         (init_decl_processing): Initialize abi_node.
182         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
183         (get_vmi_pseudo_type_info): Likewise.
184         (create_tinfo_types): Likewise.
185         (emit_support_tinfos): Likewise.
186         * tinfo.h (cxxabi.h): Include for new-abi.
187         Move rtti class definitions to new header file.
188         * tinfo.cc (abi): Use the namespace.
189         (std): Move new abi rtti classes from here ...
190         (__cxxabiv1): ... to here.
191         * tinfo2.cc (cxxabi.h): Include for new-abi.
192         Move rtti class definitions to new header file.
193         (std): Move new abi rtti classes from here ...
194         (__cxxabiv1): ... to here.
195         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
196         namespace.
197
198 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
199             Jason Merrill  <jason@casey.cygnus.com>
200
201         * method.c (build_overload_int): Use host_integerp.
202
203 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
204
205         * init.c (build_offset_ref): Handle the case of a templated member
206         function.
207     
208 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
209
210         * except.c (expand_exception_blocks): Clear catch_clauses_last.
211
212 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
213
214         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
215         * class.c (check_bitfield_decl): Turn illegal bitfields into
216         non-bitfields.
217         (dfs_propagate_binfo_offsets): Adjust for new size_binop
218         semantics.
219         (dfs_offset_for_unshared_vbases): Likewise.
220         * cvt.c (cp_convert_to_pointer): Convert NULL to a
221         pointer-to-member correctly under the new ABI.
222         * expr.c (cplus_expand_constant): Don't use cp_convert when
223         turning an offset into a pointer-to-member.
224         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
225         when dereferencing them under the new ABI.
226         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
227         of pointers-to-members under the new ABI.
228         
229         * class.c (check_bitfield_decl): Remove restriction on really long
230         bitfields.
231         (layout_class_type): Implement new ABI handling of bitfields
232         longer than their types.
233
234 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
235
236         * parse.y (extdefs): Call ggc_collect.
237         * parse.c: Regenerated.
238
239 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
240
241         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
242         (note_name_declared_in_class): Use OVL_CURRENT to get at a
243         potential overload.
244
245 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
246
247         * class.c (build_vbase_path): Use integer_zerop.
248         (build_vtable_entry): Use tree_low_cst.
249         (get_vfield_offset): Use bit_position.
250         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
251         Use tree_low_cst.
252         (check_bitfield_decl): Set DECL_SIZE using convert.
253         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
254         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
255         Use tree_low_cst.
256         (finish_struct_1): Use bit_position.
257         (dump_class_hierarchy): Use tree_low_cst.
258         * cp-tree.h (min_precision): Add declaration.
259         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
260         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
261         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
262         * expr.c (cplus_expand_constant): Use bit_position.
263         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
264         * rtti.c (get_base_offset): Use bit_position.
265         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
266         host_integerp, and tree_low_cst.
267         (pointer_int_sum): Use integer_zerop.
268         (build_component_addr): Use bit_position.
269         
270 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
271
272         * typeck.c (require_complete_type): Don't assume size_zero_node.
273         (complete_type_or_else): Likewise.
274
275 2000-03-16  Steven Grady <grady@digitaldeck.com>
276             Jason Merrill  <jason@casey.cygnus.com>
277
278         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
279
280 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
281
282         * decl2.c (grokfield): Bail out if type is error_mark_node.
283
284 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
285
286         * tinfo2.cc (__ptr_to_member_data): Rename to ...
287         (__pointer_to_member_data): ... here. Adjust.
288         * rtti.c (create_tinfo_types): Adjust.
289
290 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
291
292         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
293         * decl.c (ref_desc_type_node): Undocument.
294         * rtti.c (ptr_ref_initializer): Rename to ...
295         (ptr_initializer): ... here. Adjust comments.
296         (ptmd_initializer): Fix comment thinko.
297         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
298         (create_tinfo_types): Remove ref_desc_type_node init.
299         * tinfo2.cc (__reference_type_info): Remove.
300
301 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
302
303         * decl.c (cp_finish_decl): Remove obsolete comment.
304         
305         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
306
307 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
308
309         * cp-tree.h: Tweak documentation.
310         * class.c (build_vbase_pointer_fields): Layout the fields, too.
311         (avoid_overlap): Remove.
312         (get_binfo_offset_as_int): New function.
313         (dfs_serach_base_offsets): Likewise.
314         (layout_nonempty_base_or_field): Likewise.
315         (build_base_field): Layout fields here.  Avoid placing two objects
316         of the same type at the same address, under the new ABI.
317         (build_base_fields): Adjust accordingly.
318         (create_vtable_ptr): Return the new field, but don't attach it to
319         TYPE_FIELDS.
320         (remove_base_field): Remove.
321         (remove_base_fields): Remove.
322         (layout_basetypes): Adjust accordingly.
323         (layout_class_type): Call layout_field for each field, rather than
324         just making a wholesale call to layout_type.
325
326 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
327
328         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
329
330 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
331
332         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
333
334         * except.c (dtor_nothrow): New fn.
335         (do_pop_exception): Use it.  Take type parm.
336         (push_eh_cleanup): Take type parm.
337         (expand_start_catch_block): Pass it.
338         (build_eh_type_type_ref): Accept null type.
339
340 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
341
342         * cp-tree.h (revert_static_member_fn): Change prototype.
343         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
344         (grok_op_properties): Likewise.
345         (start_function): Likewise.
346         (revert_static_member_fn): Simplify.
347         * pt.c (check_explicit_specialization): Adjust call to
348         revert_static_member_fn.
349
350 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
351
352         * cp-tree.h (scope_kind): New type.
353         (tmpl_spec_kind): Likewise.
354         (declare_pseudo_global_level): Remove.
355         (pseudo_global_level_p): Rename to template_parm_scope_p.
356         (pushlevel): Remove declaration.
357         (begin_scope): New function.
358         (finish_scope): Likewise.
359         (current_tmpl_spec_kind): Likewise.
360         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
361         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
362         Add template_spec_p.
363         (toplevel_bindings_p): Adjust.
364         (declare_pseudo_global_level): Remove.
365         (pseudo_global_level_p): Rename to template_parm_scope_p.
366         (current_tmpl_spec_kind): New function.
367         (begin_scope): Likewise.
368         (finish_scope): Likewise.
369         (maybe_push_to_top_level): Adjust.
370         (maybe_process_template_type_declaration): Likewise.
371         (pushtag): Likewise.
372         (pushdecl_nonclass_level): Likewise.
373         (lookup_tag): Likewise.
374         (grokfndecl): Handle member template specializations.  Share
375         constructor and non-constructor code.
376         * decl2.c (check_classfn): Handle member template specializations.
377         * pt.c (begin_template_parm_list): Use begin_scope.
378         (begin_specialization): Likewise.
379         (end_specialization): Likewise.
380         (check_explicit_specialization): Use current_tmpl_spec_kind.
381         Handle member template specializations.
382         (end_template_decl): Use finish_scope.  Remove call to
383         get_pending_sizes.
384         (push_template_decl_real): Remove bogus error message.
385         (tsubst_decl): Fix typo in code contained in comment.
386         (instantiate_template): Handle member template specializations.
387         (most_general_template): Likewise.
388         
389 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
390
391         * lex.c (whitespace_cr): Compress consecutive calls to warning().
392         (do_identifier): Ditto for error().
393
394         * pt.c (convert_nontype_argument): Ditto for cp_error().
395         (convert_template_argument): Ditto for cp_pedwarn().
396
397 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
398
399         * exception.cc (__check_null_eh_spec): New fn.
400         * except.c (expand_end_eh_spec): Call it if the spec is throw().
401
402 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
403
404         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
405         * except.c (expand_end_eh_spec): Add the return type.
406         * rtti.c (throw_bad_cast): Add the parmtypes.
407         (throw_bad_typeid): Likewise.
408
409         * semantics.c (expand_stmt): Only leave out rtl for unused
410         artificials, and set DECL_IGNORED_P on them as well.
411         * decl.c (wrapup_globals_for_namespace): Likewise.
412
413 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
414
415         * decl.c (maybe_commonize_var): Skip all artificial decls.
416         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
417
418 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
419
420         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
421         * cp-tree.h: Declare flag_enforce_eh_specs.
422         * decl.c (store_parm_decls, finish_function): Check it.
423
424         C library functions don't throw.
425         * Makefile.in (cfns.h): New target.
426         (except.o): Depend on it.
427         * Make-lang.in (cc1plus): Depend on cfns.gperf.
428         * cfns.gperf: New file.
429         * cfns.h: Generated.
430         * except.c: Include it.
431         (nothrow_libfn_p): New fn.
432         * decl.c (grokfndecl): Use it.
433         * cp-tree.h: Declare it.
434         
435         * decl.c (push_overloaded_decl_1, auto_function, 
436         define_function): Lose.
437         (build_library_fn_1): New static fn.
438         (builtin_function): Use it.
439         (get_atexit_node): Use build_library_fn_ptr.
440         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
441         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
442         push_void_library_fn, push_throw_library_fn): New fns.
443         * cp-tree.h: Declare them.
444         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
445         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
446         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
447         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
448         * rtti.c (build_runtime_decl): Lose.
449         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, 
450         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
451         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
452
453         * call.c (build_call): Remove result_type parm.
454         Call mark_used on unused artificial fns.
455         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
456
457 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
458
459         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
460         appropriate.
461         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
462         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
463         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
464         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
465         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
466         expand_generic_desc): Likewise.
467
468 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
469
470         * exception.cc (__cp_pop_exception): Cleanup the original object.
471
472 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
473
474         * decl.c (grok_op_properties): Merge conversion to void warning
475         with other silly op warnings.
476
477 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
478
479         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
480         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
481
482 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
483
484         * decl.c (cp_make_fname_decl): New function.
485         (wrapup_globals_for_namespace): Don't emit unused static vars.
486         (init_decl_processing): Remove comment about use of
487         array_domain_type. Set make_fname_decl.
488         (cp_finish_decl): Remove __FUNCTION__ nadgering.
489         * semantics.c (begin_compound_stmt): Remove
490         current_function_name_declared flagging.
491         (expand_stmt): Don't emit unused local statics.
492         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
493         specially.
494
495 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
496
497         * typeck.c (convert_for_assignment): Don't look at array
498         initializer.
499         * call.c (convert_like_real): Likewise. 
500
501 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
502
503         Add initial support for '\uNNNN' specifier.
504         * lex.c (read_ucs): New fn.
505         (readescape, skip_white_space): Call it.
506         (is_extended_char, is_extended_char_1): New fns.
507         (utf8_extend_token): New fn, #if 0'd out.
508         (real_yylex): Treat extended chars like letters.
509
510         * search.c (note_debug_info_needed): Walk the bases even if we 
511         weren't deferring the type itself.
512
513 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
514
515         * decl2.c (finish_objects): Constify a char*.
516
517         * method.c (emit_thunk): Likewise.
518
519 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
520
521         * typeck.c (dubious_conversion_warnings): Look through
522         REFERENCE_TYPE.
523
524 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
525
526         * class.c (dfs_modify_vtables): I is now unsigned.
527         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
528         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
529         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
530         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
531         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
532         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
533         Call integer_all_onesp.
534         * typeck2.c (process_init_constructor): Use compare_tree_int.
535
536         * lang-specs.h (as): Don't call if -syntax-only.
537
538 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
539
540         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
541         RTL_EXPR_HAS_NO_SCOPE after all.
542
543 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
544
545         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
546         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
547         RTL_EXPR_HAS_NO_SCOPE.
548
549         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
550         later.
551         
552         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
553
554 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
555
556         * call.c (convert_like): Macrofy.
557         (convert_like_with_context): New macro.
558         (convert_like_real): Renamed from convert_like.  Add calling
559         context parameters, for diagnostics. Add recursive flag.  Call 
560         dubious_conversion_warnings for outer conversion.
561         (build_user_type_conversion): Use convert_like_with_context.
562         (build_over_call): Likewise. Don't warn about dubious
563         conversions here. Adjust convert_default_arg calls.
564         (convert_default_arg): Add context parameters for diagnostics.
565         Pass throught to convert_like_with_context.
566         * cp-tree.h (convert_default_arg): Add context parameters.
567         (dubious_conversion_warnings): Prototype new function.
568         * typeck.c (convert_arguments): Adjust convert_default_arg call.
569         (dubious_conversion_warnings): New function, broken
570         out of convert_for_assignment. 
571         (convert_for_assignment): Adjust.
572
573 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
574
575         * decl2.c (key_method): Break out from...
576         (import_export_vtable, import_export_class): ...here.
577
578         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
579         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
580
581         * search.c (note_debug_info_needed, dfs_debug_mark, 
582         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
583         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
584
585 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
586
587         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
588         typos.
589
590 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
591
592         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
593         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
594         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
595         (lang_type): Split gets_new into has_new and has_array_new.
596         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
597         (TYPE_GETS_NEW): Split into ...
598         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
599         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
600         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
601         (build_op_new_call): Don't declare.
602         (build_new_1): Likewise.
603         * call.c (build_op_new_call): Remove.
604         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
605         instead of TYPE_NEEDS_DESTRUCTOR.
606         (finish_struct_bits): Likewise.
607         (add_implicitly_declared_members): Likewise.
608         (check_field_decl): Likewise.
609         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
610         correctly under the new ABI.
611         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
612         instead of TYPE_NEEDS_DESTRUCTOR.
613         (initialize_local_var): Likewise.
614         (destroy_local_var): Likewise.
615         (cp_finish_decl): Likewise.
616         (register_dtor_fn): Likewise.
617         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
618         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
619         TYPE_VEC_DELETE_TAKES_SIZE here.
620         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
621         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
622         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
623         (finish_destructor_body): Likewise.
624         (maybe_build_cleanup_1): Likewise.
625         * decl2.c (do_static_destruction): Likewise.
626         * init.c (build_new_1): Make it static.
627         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
628         (expand_cleanup_for_base): Likewise.
629         (get_cookie_size): New function.
630         (build_new_1): Handle array-new cookies correctly under the new
631         ABI.
632         (build_vec_delete_1): Likewise.
633         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
634         (build_delete): Likewise.
635         (build_vec_delete): Handle array-new cookies correctly under the new
636         ABI.
637         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
638         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
639         TYPE_HAS_ARRAY_NEW_OPERATOR.
640         * ptree.c (print_lang_type): Check them.
641         * search.c (context_for_name_lookup): Fix typo in comment.
642         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
643         * tree.c (break_out_cleanups): Likewise.
644         (build_cplus_array_test_1): Likewise.
645         (cp_build_qualified_type_real): Likewise.
646         * typeck.c (complete_type): Likewise.
647         
648         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
649         the command-line, not the end.
650         
651 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
652
653         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
654
655 2000-03-02  Tom Tromey  <tromey@cygnus.com>
656
657         * cp-tree.h (build_java_class_ref): Declare.
658         * init.c (build_java_class_ref): No longer static.
659         * except.c (expand_throw): Generate a Java-style `throw' if the
660         thrown object is a "Java" object.
661         (initialize_handler_parm): Generate a Java-style lookup of
662         exception info if the caught object is a "Java" object.
663         (catch_language, catch_language_init): New globals.
664         (decl_is_java_type): New function.
665         (expand_start_catch_block): Don't call push_eh_info() or
666         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
667         class reference to build_catch_block.
668
669 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
670
671         * typeck.c (comptypes): Treat sizetype like its language equivalent.
672
673 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
674
675         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
676         to merge reference/pointer code and fix incorrect warnings.
677
678 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
679
680         * search.c (protected_accessible_p): Use context_for_name_lookup.
681
682         * init.c (construct_virtual_bases): Fix thinko.
683         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
684
685 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
686
687         * decl.c (current_function_decl): Move to toplev.c.
688
689 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
690
691         * pt.c (fn_type_unification): Unify return type, whenever
692         provided.
693         (get_bindings_real): Only pass return type when necessary.
694         Remove explicit return type check.
695         * class.c (resolve_address_of_overloaded_function): Pass desired
696         return type to fn_type_unification.
697
698 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
699
700         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
701         DECL_FIELD_SIZE.
702         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
703         DECL_FIELD_SIZE.
704         * rtti.c (expand_class_desc): Likewise.
705         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
706         (THUNK_VCALL_OFFSET): Likewise.
707         (THUNK_DELTA): Reflect changes in ../tree.h.
708
709 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
710
711         * search.c (protected_accessible_p): Also allow the access if
712         the member is public in DERIVED.  Lose TYPE parm.
713         (friend_accessible_p): Lose TYPE parm.
714         (accessible_p): Adjust.
715
716 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
717
718         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
719         on things that are not sizes; ssize_binop deleted.
720         Call size_diffop when appropriate.
721         (dfs_build_vcall_offset_vtbl_entries): Likewise.
722         (build_primary_vtable, build_secondary_vtable): Likewise.
723         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
724         Variable I is HOST_WIDE_INT.
725         (get_vfield_offset): Pass proper types to size_binop.
726         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
727         (finish_struct_1): Likewise.
728         (skip_rtti_stuff): Arg N is now pointer to signed.
729         (layout_class_type): Use size_zero_node.
730         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
731         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
732         * decl.c (complete_arry_type): Pass proper types to size_binop.
733         (xref_basetypes): BINFO_OFFSET is sizetype.
734         * error.c (dump_expr): Don't use size_binop non-sizes.
735         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
736         * init.c (construct_virtual_bases): Fix type error.
737         (build_vec_delete_1): Pass proper type to size_binop and don't
738         fold result.
739         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
740         * rtti.c (get_base_offset): Pass proper type to size_binop.
741         * search.c (dfs_find_vbases): Fix type error.
742         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
743         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
744         * tree.c (debug_binfo): Variable N is signed.
745         Use HOST_WIDE_INT_PRINT_DEC.
746         * typeck.c (comptypes): sizetype is same as equivalent integer type.
747         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
748         size_one_node and size_zero_node.
749         (c_alignof): Use size_one_node.
750         (build_component_addr): Pass proper types to size_binop.
751         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
752
753 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
754
755         Implement class scope using-declarations for functions.
756         * class.c (handle_using_decl): Call add_method for used functions.
757         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
758         (add_method): Used functions are hidden by local functions.
759         (check_bases_and_members): Handle using-decls before finalizing
760         CLASSTYPE_METHOD_VEC.
761         * call.c (add_function_candidate): Add ctype parm; if non-zero,
762         override the type of 'this' accordingly.
763         (add_template_candidate, add_template_candidate_real): Add ctype parm.
764         (convert_class_to_reference, build_user_type_conversion_1, 
765         build_new_function_call, build_object_call, build_new_op,
766         build_new_method_call): Pass ctype parm.
767
768         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
769         the baselink.
770         * call.c (convert_class_to_reference, build_user_type_conversion_1, 
771         build_new_function_call, build_object_call, build_new_op,
772         build_new_method_call, build_op_delete_call): Don't get basetype_path
773         from a baselink.
774         * typeck.c (build_component_ref): Likewise.
775         * init.c (build_offset_ref): Likewise.
776         (resolve_offset_ref): Don't call enforce_access.  
777         Call build_scoped_ref.
778         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
779         would cause an error or if -pedantic.
780         * class.c (alter_access): Lose binfo parm.
781
782 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
783
784         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
785         types.
786
787 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
788
789         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
790         pseudo_type_info creation into the std namespace
791
792 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
793
794         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
795         (import_export_class): Remove declaration.
796         * decl2.c (import_export_class): Make it static.
797         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
798         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
799         EXPR_WITH_FILE_LOCATION.
800         * lex.c (check_newline): Tweak filename/lineno setting.
801         * semantics.c (begin_while_stmt): Fix typo in comment.
802         
803 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
804
805         * lang-options.h (-fmessage-length=): Add missing option.
806
807         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
808
809 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
810
811         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
812
813 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
814
815         * optimize.c (expand_call_inline): Emit the return label before
816         evaluating the return value.
817
818 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
819
820         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
821         than duplicating functionality here.
822         * optimize.c: Include input.h.
823         (expand_call_inline): Use push_srcloc and pop_srcloc.
824         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
825         * parse.c: Regenerated.
826         * Makefile.in (lex.o): Depend on input.h.
827         (optimize.o): Likewise.
828         
829 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
830
831         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
832         function type, rather than ICE.
833
834 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
835
836         * decl.c (grokdeclarator): Call decl_type_access_control.
837         * parse.y (parse_end_decl): Don't call decl_type_access_control if
838         decl is null.
839
840 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
841
842         * decl.c (decls_match): Remove obsolete static member nadgering.
843
844 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
845
846         * decl.c (grokdeclarator): Change ANSI to ISO.
847         * lex.c (consume_string, readescape, do_identifier): Likewise.
848         (parse_float, real_yylex): Likewise.
849         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
850         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
851         new_type_id, maybe_label_decls, simple_stmt, 
852         for.init.statement): Likewise.
853         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
854         * semantics.c (finish_named_return_value): Likewise.
855         * parse.c: Regenerate.
856
857 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
858
859         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
860         (CPTI_CLASS_STAR_TYPE): Remove.
861         (vtable_index_type): Likewise.
862         (class_star_type_node): Remove.
863         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
864         (build_binary_op_nodefault): Remove.
865         * call.c (build_new_op): Use build_binary_op instead of
866         build_binary_op_nodefault.
867         * decl.c (init_decl_processing): Remove class_star_type_node
868         initialization.  Make delta_type_node ptrdiff_type_node under the
869         new ABI.  Initialize vtable_index_type.
870         (build_ptrmemfunc_type): Build different structures for the new
871         ABI.
872         (build_enumerator): Use build_binary_op instead of
873         build_binary_op_nodefault.
874         * method.c (build_overload_value): Mangle pointers-to-members
875         appropriately under the new ABI.
876         * typeck.c (build_array_ref): Use build_binary_op instead of
877         build_binary_op_nodefault.
878         (get_member_function_from_ptrfunc): Adjust for the new ABI.
879         (build_binary_op_nodefault): Rename to ...
880         (build_binary_op): ... this.  Remove old version.  Adjust for
881         pointer-to-member comparisons under the new ABI.
882         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
883         (build_ptrmemfunc): Adjust for the new ABI.
884         (expand_ptrmemfunc_cst): Likewise.
885         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
886         (pfn_from_ptrmemfunc): Adjust for the new ABI.
887         
888 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
889
890         * call.c (build_object_call): Compress consecutive calls to
891         cp_error.
892         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
893         (build_op_delete_call): Adjust message formatting.
894
895         * class.c (check_bases): Compress consecutive calls to
896         cp_pedwarn. 
897         (finish_struct_anon): Say 'ISO C++'.
898
899         * decl.c (start_decl): Same here.
900         (grok_reference_init): Likewise.
901         (grokfndecl): Correct message formatting.
902         (grokfndecl): Improve diagnostic.
903         (check_static_variable_definition): Likewise. Say 'ISO C++'
904         (compute_array_index_type): Say 'ISO C++'
905         (create_array_type_for_decl): Compress consecutive calls to
906         cp_error. 
907         (grokdeclarator): Say 'ISO C++'
908         (grok_op_properties): Likewise.
909
910         * decl2.c (delete_sanity): Clairify diagnostic.
911         (check_member_template): Same here.
912         (grok_function_init): Use consistent terminology.
913
914         * expr.c (do_case): Say 'ISO C++'
915
916         * friend.c (do_friend): Compress consecutive calls to warning.
917         
918 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
919
920         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
921         * class.c (build_secondary_vtable): Reorganize.  Don't create a
922         new vtable under the new ABI.
923         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
924         computing the size.
925         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
926         the initializing elements.
927         (initialize_vtable): New function.
928         (dfs_finish_vtbls): Use it.
929         (dfs_accumulate_vtbl_inits): New function.
930         (finish_vtbls): Merge primary and secondary vtables under the new
931         ABI.
932         (finish_struct_1): Remove redundant call to layout_vtable_decl.
933         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
934         aren't VAR_DECLs.
935
936         * class.c (build_vtable): New function, split out from ...
937         (get_vtable_decl): ... here, and ...
938         (build_secondary_vtable): ... here.
939
940         * pt.c (tsubst_decl): Fix formatting.
941         
942 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
943
944         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
945         (avoid_overlap, build_base_field): Likewise.
946         (build_base_field, build_base_fields, is_empty_class): 
947         Test DECL_SIZE with integer_zero.
948         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
949         * cp-tree.h (struct lang_type): New field size_unit.
950         (CLASSTYPE_SIZE_UNIT): New macro.
951         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
952         (cp_finish_decl): Delete -Wlarger-than processing.
953         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
954         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
955         * tree.c (make_binfo): binfo vector is one entry longer.
956         (walk_tree): Walk DECL_SIZE_UNIT.
957
958 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
959
960         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
961         comment.
962         (build_vtable_entry): Don't assume all vtable entries are
963         functions.
964         (build_vtbl_initializer): Adjust accordingly.
965         (get_vtable_decl): Fix formatting.
966         
967 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
968
969         * semantics.c (deferred_type_access_control): Walk the entire
970         type_lookups list.
971         (save_type_access_control): Rename from 
972         initial_deferred_type_access_control.  Just remember the value.
973         (decl_type_access_control): New fn.
974         (begin_function_definition): Use deferred_type_access_control, after
975         we've started the function.  Set type_lookups to error_mark_node.
976         * parse.y (frob_specs, fn.def1): Adjust.
977         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
978         (parse_end_decl, parse_bitfield0, parse_method): New fns.
979         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
980         (after_type_component_declarator0): Likewise.
981         (after_type_component_declarator): Likewise.
982         (notype_component_declarator): Likewise.
983         * cp-tree.h: Adjust.
984
985         * decl.c (redeclaration_error_message): Allow redeclaration of 
986         namespace-scope decls.
987
988 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
989
990         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
991
992 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
993
994         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
995         * decl2.c (grokclassfn): Likewise.
996
997         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
998
999         * decl2.c (lang_decode_option): Don't set default message length
1000         here.
1001         * lex.c (lang_init_options): Set it here.
1002
1003 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
1004
1005         Make DECL_CONTEXT mean the class in which a member function was
1006         declared, even for a virtual function.
1007         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
1008         (DECL_FRIEND_CONTEXT): New macro.
1009         (DECL_REAL_CONTEXT): Remove.
1010         (SET_DECL_FRIEND_CONTEXT): Likewise.
1011         (DECL_VIRTUAL_CONTEXT): Adjust.
1012         (DECL_CLASS_SCOPE_P): Use TYPE_P.
1013         (add_friends): Remove.
1014         (hack_decl_function_context): Likewise.
1015         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
1016         CP_DECL_CONTEXT.
1017         (build_over_call): Fix indentation.  Use DECL_CONTEXT
1018         instead of DECL_CLASS_CONTEXT.
1019         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
1020         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
1021         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
1022         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
1023         (build_base_field): Likewise.
1024         (finish_struct_1): Likewise.
1025         (build_self_reference): Likewise.
1026         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
1027         DECL_REAL_CONTEXT.
1028         (pushtag): Use decl_function_context, not
1029         hack_decl_function_context.
1030         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
1031         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
1032         (pushdecl): Remove bogus code.
1033         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
1034         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
1035         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
1036         Use decl_function_context, nothack_decl_function_context.
1037         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
1038         (grokdeclarator): Likewise.  Use decl_function_context, not
1039         hack_decl_function_context.
1040         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
1041         (start_function): Use DECL_FRIEND_CONTEXT, not
1042         DECL_CLASS_CONTEXT.  Use decl_function_context, not
1043         hack_decl_function_context.
1044         (finish_function): Use decl_function_context, not
1045         hack_decl_function_context.
1046         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
1047         DECL_CLASS_CONTEXT.
1048         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
1049         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
1050         (grokfield): Likewise.
1051         (finish_builtin_type): Likewise.
1052         (finish_vtable_vardec): Use decl_function_context, not
1053         hack_decl_function_context.
1054         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
1055         (start_static_initialization_or_destruction): Likewise.
1056         (finish_static_initialization_or_destruction): Likewise.
1057         (mark_used): Adjust logic for deciding when to synthesize methods.
1058         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
1059         DECL_REAL_CONTEXT.
1060         * error.c (dump_function_decl): Use DECL_CONTEXT, not
1061         DECL_CLASS_CONTEXT.
1062         * friend.c (is_friend): Likewise.
1063         (add_friends): Remove.
1064         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
1065         * lex.c (begin_definition_of_inclass_inline): Use
1066         decl_function_context, not hack_decl_function_context.
1067         (process_next_inline): Likewise.
1068         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
1069         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
1070         DECL_CLASSS_CONTEXT.
1071         (hack_identifier): Likewise.
1072         (synthesize_method):  Use decl_function_context, not
1073         hack_decl_function_context.
1074         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
1075         DECL_REAL_CONTEXT.
1076         (is_member_template): Use decl_function_context, not
1077         hack_decl_function_context.  Use DECL_CONTEXT, not
1078         DECL_CLASS_CONTEXT.
1079         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not 
1080         DECL_CLASS_CONTEXT.
1081         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
1082         DECL_REAL_CONTEXT.
1083         (push_template_decl_real): Likewise.
1084         (instantiate_class_template): Don't call add_friends.
1085         (tsubst_default_argument): Use DECL_CONTEXT, not
1086         DECL_REAL_CONTEXT.
1087         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
1088         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
1089         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
1090         DECL_CLASS_CONTEXT.
1091         * repo.c (repo_inline_used): Likewise.
1092         * search.c (current_scope): Adjust for new _CONTEXT macros.
1093         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
1094         DECL_REAL_CONTEXT.
1095         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
1096         (lookup_fnfields_here):Likewise.
1097         (check_final_overrider): Likewise.
1098         (init_vbase_pointers): Likewise.
1099         (virtual_context): Likewise.
1100         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
1101         (expand_body): Use decl_function_context, not
1102         hack_decl_function_context.
1103         * tree.c (hack_decl_function_context): Remove.
1104         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
1105         DECL_CLASS_CONTEXT.
1106         * typeck2.c (error_not_base_type): Likewise.
1107         
1108 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
1109
1110         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
1111
1112 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1113
1114         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
1115
1116 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
1117
1118         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
1119
1120 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
1121
1122         * decl2.c (lang_decode_option): Enable automatic line wrapping.
1123
1124 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
1125
1126         * parse.y (frob_specs): Split out...
1127         (parse_decl): From here.
1128         (fn.def2): Call initial_deferred_type_access_control.
1129         (after_type_component_declarator0): Call frob_specs.
1130         (notype_component_declarator0): Likewise.
1131         * search.c (friend_accessible_p): Nested classes are friends of their
1132         enclosing classes.
1133
1134 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
1135
1136         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
1137         used to create an implicit temporary.
1138
1139         * class.c (dfs_modify_vtables): Tweak calculation of functions to
1140         override.
1141
1142 2000-02-08  Nathan Sidwell  <nathan@acm.org>
1143
1144         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
1145         strip array element qualifiers too.
1146
1147 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
1148
1149         * decl.c (store_parm_decls): Don't build cleanups for parameters
1150         while processing_template_decl.
1151
1152 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
1153
1154         * cp-tree.h (struct saved_scope): Add incomplete field.
1155         (namespace_scope_incomplete): New macro.
1156         * decl.c (pushdecl): Use it.
1157         (hack_incomplete_structures): Use it.  See through artificial
1158         binding levels.
1159         (mark_saved_scope): Mark it.
1160
1161         Implement access control for nested types.
1162         * search.c (type_access_control): New fn.
1163         (accessible_p): Now we do perform access control for types.
1164         * semantics.c (deferred_type_access_control): New fn.
1165         (initial_deferred_type_access_control): New fn.
1166         (begin_function_definition): Call it.  Add lookups parm.
1167         * decl.c (struct binding_level): Add this_class field.
1168         (pushlevel_class): Set it.
1169         (mark_binding_level): Mark it.
1170         (lookup_name_real): Use it.  Call type_access_control.
1171         (mark_saved_scope): Mark lookups field.
1172         * cp-tree.h (flagged_type_tree): Add lookups field.
1173         (struct saved_scope): Add lookups field.
1174         (type_lookups): New macro.
1175         * parse.y (declmods): Now <ftype>.
1176         (parse_decl): Add lookups parm.  Call 
1177         initial_deferred_type_access_control.
1178         (lang_extdef): Clear type_lookups.
1179         (typed_declspecs, declmods, typespec): Set lookups field.
1180         (initdcl): Call deferred_type_access_control.
1181         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
1182         component_decl_1, named_parm): Adjust.
1183         * friend.c (is_friend): Nested classes are friends of their
1184         enclosing classes.
1185
1186         * class.c (currently_open_derived_class): New fn.
1187         * method.c (hack_identifier): Use it.
1188
1189         * lex.c (do_identifier): Remove obsolete code.
1190
1191         * parse.y (typed_typespecs): Propagate new_type_flag properly.
1192
1193 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
1194
1195         * tinfo.h: Remove apostrophes from C++ comment (xgettext
1196         thinks this file is plain C).
1197
1198 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1199
1200         * Makefile.in (call.o): Depend on $(EXPR_H).
1201
1202         * call.c: Include "expr.h".
1203
1204         * class.c (dump_class_hierarchy): Add prototype.
1205
1206         * search.c (dfs_get_pure_virtuals): Likewise.
1207
1208 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
1209
1210         * parse.y (simple_stmt): Allow :: token in asm parameter list.
1211         * parse.c: Rebuilt.
1212
1213 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
1214
1215         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
1216         Store it in DECL_FCONTEXT.
1217         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
1218
1219 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
1220
1221         * tinfo.h (old abi): #include "tconfig.h".
1222         * tinfo.cc (convert_to_base): Move into old abi section.
1223
1224 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
1225
1226         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
1227         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
1228         (BINFO_PRIMARY_BINFO): New macro.
1229         (BF_DELTA): Rename to ...
1230         (BV_DELTA): ... this.
1231         (BF_VCALL_INDEX): Rename to ...
1232         (BV_VCALL_INDEX): ... this.
1233         (BF_FN): Rename to ...
1234         (BV_FN): ... this.
1235         * class.c (build_vbase_path): Adjust for changes to reverse_path.
1236         (set_rtti_entry): Rename BF_ macros to BV_ variants.
1237         (modify_vtable_entry): Simplify.
1238         (add_virtual_function): Rename BF_ macros to BV_ variants.
1239         (build_vtable_initializer): Likewise.
1240         (get_class_offset_1): Remove.
1241         (dfs_get_class_offset): Likewise.
1242         (get_class_offset): Likewise.
1243         (dfs_find_final_overrider): New function.
1244         (find_final_overrider): Likewise.
1245         (modify_one_vtable): Remove.
1246         (dfs_find_base): New function.
1247         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
1248         find_final_overrider.
1249         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
1250         virtuals.
1251         (dfs_fixup_vtable_deltas): Remove.
1252         (override_one_vtable): Remove.
1253         (merge_overrides): Likewise.
1254         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
1255         unreal chilren of virtual bases.
1256         (finish_struct_1): Don't use merge_overrides.  Don't use
1257         dfs_fixup_vtable_deltas.
1258         * tree.c (reverse_path): Return a TREE_LIST, not a chain of 
1259         BINFOs.
1260         
1261 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
1262             Jason Merrill  <jason@yorick.cygnus.com>
1263
1264         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
1265
1266 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
1267
1268         * exception.cc (__throw_bad_typeid): Add missing std::.
1269
1270 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1271
1272         * cp-tree.h (make_thunk): PROTO -> PARAMS.
1273
1274 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
1275
1276         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
1277
1278         Runtime support for new-abi rtti.
1279         * inc/typeinfo (type_info::operator!=): Define in class.
1280         (type_info::before, type_info::name, type_info::operator==,
1281         type_info::operator!=): Define new ABI implementations.
1282         (type_info::is_pointer_p, type_info::is_function_p): Declare
1283         new virtual functions.
1284         (type_info::do_catch, type_info::do_upcast): Likewise.
1285         
1286         * tinfo.h (__base_class_info): Define new class.
1287         (__class_type_info): Likewise.
1288         (__si_class_type_info): Likewise.
1289         (__vmi_class_type_info): Likewise.
1290         (__dynamic_cast): Prototype.
1291         
1292         * tinfo.cc: Conditionalize old and new rtti mechanisms.
1293         (type_info::is_pointer_p): Define new function.
1294         (type_info::is_function_p): Likewise.
1295         (type_info::do_catch): Likewise.
1296         (type_info::do_upcast): Likewise.
1297         (vtable_prefix): New structure for vtable access.
1298         (adjust_pointer): Define new template function.
1299         (contained_p, public_p, virtual_p, contained_public_p,
1300         contained_nonpublic_p, contained_nonvirtual_p): Define new
1301         functions.
1302         (nonvirtual_base_type): New local variable.
1303         (__class_type_info::~__class_type_info): Define.
1304         (__si_class_type_info::~__si_class_type_info): Likewise.
1305         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
1306         (__class_type_info::do_catch): Define new function.
1307         (__class_type_info::do_upcast): Likewise.
1308         (__class_type_info::find_public_src): Likewise.
1309         (__class_type_info::do_find_public_src): Likewise.
1310         (__si_class_type_info::do_find_public_src): Likewise.
1311         (__vmi_class_type_info::do_find_public_src): Likewise.
1312         (__class_type_info::do_dyncast): Likewise.
1313         (__si_class_type_info::do_dyncast): Likewise.
1314         (__vmi_class_type_info::do_dyncast): Likewise.
1315         (__class_type_info::do_upcast): Likewise.
1316         (__si_class_type_info::do_upcast): Likewise.
1317         (__vmi_class_type_info::do_upcast): Likewise.
1318         (__dynamic_cast): Likewise.
1319         
1320         * tinfo2.cc (__fundamental_type_info): Define new class.
1321         (__pointer_type_info): Likewise.
1322         (__reference_type_info): Likewise.
1323         (__array_type_info): Likewise.
1324         (__function_type_info): Likewise.
1325         (__enum_type_info): Likewise.
1326         (__ptr_to_member_type_info): Likewise.
1327         (__fundamental_type_info::~__fundamental_type_info): Define.
1328         (__pointer_type_info::~__pointer_type_info): Likewise.
1329         (__reference_type_info::~__reference_type_info): Likewise.
1330         (__array_type_info::~__array_type_info): Likewise.
1331         (__function_type_info::~__function_type_info): Likewise.
1332         (__enum_type_info::~__enum_type_info): Likewise.
1333         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
1334         (__pointer_type_info::do_catch): Define new function.
1335         (__ptr_to_member_type_info::do_catch): Define new function.
1336         
1337         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
1338         (__is_pointer): Likewise.
1339
1340         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
1341
1342 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
1343
1344         * cp/class.c (build_vtable): Rename to build_primary_vtable.
1345         (prepare_fresh_vtable): Rename to build_secondary_vtable.
1346         (make_new_vtable): New function.
1347         (modify_vtable_entry): Handle generation of new vtables correctly.
1348         (modify_one_vtable): Remove unused parameter.
1349         (dfs_fixup_vtable_deltas): Likewise.
1350         (override_one_vtable): Use build_secondary_vtable.
1351         (finish_struct_1): Use build_primary_vtable and
1352         build_secondary_vtable.
1353         
1354 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
1355
1356         * cp/decl.c: Adjust variable names, comments, help strings.
1357
1358 2000-01-29  Nathan Sidwell  <nathan@acm.org>
1359
1360         * new2.cc (operator delete[]): Use operator delete, don't assume
1361         implementation.
1362
1363 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
1364
1365         * class.c (build_vtbl_initializer): Add argument to
1366         build_vtable_entry call.
1367
1368 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
1369
1370         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
1371         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
1372         (BF_DELTA): New macro.
1373         (BF_VCALL_INDEX): Likewise.
1374         (BF_FN): Likewise.
1375         (THUNK_VCALL_OFFSET): Likewise.
1376         (make_thunk): Change prototype.
1377         * class.c (build_vtable_entry): Integrate
1378         build_vtable_entry_for_fn.  Handle vcall indices.
1379         (build_vtable_entry_for_fn): Remove.
1380         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
1381         BF_VCALL_INDEX, BF_FN.
1382         (modify_vtable_entry): Integrate common code from
1383         modify_one_vtable and dfs_fixup_vtable_deltas.
1384         (add_virtual_function): Set BF_VCALL_INDEX.
1385         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
1386         and BF_FN.
1387         (modify_one_vtable): Simplify.
1388         (dfs_fixup_vtable_deltas): Likewise.
1389         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 
1390         * method.c (make_thunk): Handle vcall indices.
1391         
1392 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
1393
1394         Compiler side new abi rtti (not enabled).
1395         * cp-tree.h (new_abi_rtti_p): New macro.
1396         (emit_support_tinfos): Prototype new function.
1397         (tinfo_decl_p): Likewise.
1398         (emit_tinfo_decl): Likwise.
1399         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
1400         macros.
1401         (doing_runtime): New local static.
1402         (init_rtti_processing): Add new-abi initializer.
1403         (get_tinfo_decl): Add new-abi logic.
1404         (tinfo_from_decl): Likewise.
1405         (build_dynamic_cast_1): Likewise.
1406         (qualifier_flags): New static function.
1407         (tinfo_base_init): Likewise.
1408         (generic_initializer): Likewise.
1409         (ptr_ref_initializer): Likewise.
1410         (ptmd_initializer): Likewise.
1411         (class_hint_flags): Likewise.
1412         (class_initializer): Likewise.
1413         (synthesize_tinfo_var): Likewise.
1414         (create_real_tinfo_var): Likewise.
1415         (create_pseudo_type_info): Likewise.
1416         (get_vmi_pseudo_type_info): Likewise.
1417         (create_tinfo_types): Likewise.
1418         (emit_support_tinfos): New global function.
1419         (tinfo_decl_p): New global predicate.
1420         (emit_tinfo_decl): New global function.
1421         * class.c (set_rtti_entry): Generalize for old and new rtti.
1422         (build_vtbl_initializer): Likewise.
1423         * decl2.c (finish_file): Likewise.
1424
1425 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
1426
1427         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
1428         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
1429
1430 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
1431
1432         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
1433         for scopes.
1434
1435 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
1436
1437         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
1438
1439 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
1440
1441         * optimize.c (calls_setjmp_r): Supply new argument
1442         to special_function_p.
1443
1444 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1445
1446         * call.c: PROTO -> PARAMS.
1447         * class.c: Likewise.
1448         * cp-tree.h: Likewise.
1449         * cvt.c: Likewise.
1450         * decl.c: Likewise.
1451         * decl.h: Likewise.
1452         * decl2.c: Likewise.
1453         * dump.c: Likewise.
1454         * errfn.c: Likewise.
1455         * error.c: Likewise.
1456         * except.c: Likewise.
1457         * expr.c: Likewise.
1458         * init.c: Likewise.
1459         * input.c: Likewise.
1460         * lex.c: Likewise.
1461         * lex.h: Likewise.
1462         * method.c: Likewise.
1463         * optimize.c: Likewise.
1464         * parse.y: Likewise.
1465         * pt.c: Likewise.
1466         * repo.c: Likewise.
1467         * rtti.c: Likewise.
1468         * search.c: Likewise.
1469         * semantics.c: Likewise.
1470         * spew.c: Likewise.
1471         * tree.c: Likewise.
1472         * typeck.c: Likewise.
1473         * typeck2.c: Likewise.
1474         * xref.c: Likewise.
1475
1476 2000-01-25  Richard Henderson  <rth@cygnus.com>
1477
1478         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
1479
1480 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
1481
1482         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
1483         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
1484         (struct vcall_offset_data_s): New type.
1485         (dfs_vcall_offset_queue_p): New function.
1486         (dfs_build_vcall_offset_vtbl_entries): Likewise.
1487         (build_vcall_offset_vtbl_entries): Likewise.
1488         (layout_vtable_decl): Likewise.
1489         (num_vfun_entries): Likewise.
1490         (num_extra_vtbl_entries): Add the entries for vcall offsets.
1491         (build_vtbl_initializer): Likewise.
1492         (dfs_finish_vtabls): Use layout_vtable_decl.
1493         (modify_one_vtables): Always duplicate vtables under the new ABI.
1494         (finish_struct_1): Use layout_vtable_decl.
1495         
1496 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1497
1498         * decl.c (member_function_or_else): Change third arg from a format
1499         specifier to an `enum overload_flags'.  Callers changed.
1500
1501 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
1502
1503         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
1504         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
1505         build_const_cast, get_delta_difference, check_return_expr): Avoid
1506         ANSI string concatenation usage.  
1507
1508 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
1509
1510         * class.c (layout_class_type): Put the fields required to make a
1511         class non-empty at the end, not the beginning, of the TYPE_FIELDs
1512         list.
1513
1514 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
1515
1516         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
1517         template.
1518
1519         * decl2.c (mark_used): Do instantiate inlines that have been
1520         explicitly instantiated.
1521
1522 2000-01-24  Richard Henderson  <rth@cygnus.com>
1523
1524         * call.c (build_over_call): Use expand_tree_builtin.
1525         * typeck.c (build_function_call_real): Likewise.
1526         (build_binary_op_nodefault): Handle unordered compares.
1527
1528 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
1529
1530         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
1531         cp_tree_index values.
1532         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
1533         New global node #defines for them.
1534         * rtti.c (call_void_fn): Replace with ...
1535         (build_runtime_decl): ... new static function.
1536         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
1537         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
1538         (build_dynamic_cast_1): Always produce correctly typed result.
1539         Explicitly produce type_info addresses. Use dynamic_cast_node.
1540         * exception.cc (__throw_bad_cast): Return `void *'.
1541         (__throw_bad_typeid): Return `const type_info &'.
1542
1543 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
1544
1545         * cp-tree.h (get_vtable_decl): Prototype new function.
1546         * class.c (get_vtable_decl): New function. Broken out from ...
1547         (build_vtable): ... here. Use it.
1548         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
1549         by get_vtable_decl.
1550
1551 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
1552
1553         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
1554         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
1555         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
1556         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
1557         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
1558         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
1559         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
1560         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
1561         (CPTI_TINFO_VAR_ID): New enumeration.
1562         (__tp_desc_type_node, __access_mode_type_node,
1563         __bltn_desc_type_node, __user_desc_type_node,
1564         __class_desc_type_node, __ptr_desc_type_node,
1565         __attr_desc_type_node, __func_desc_type_node,
1566         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
1567         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
1568         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
1569         enum_desc_type_node, class_desc_type_node,
1570         si_class_desc_type_node, vmi_class_desc_type_node,
1571         ptmd_desc_type_node, base_desc_type_node): New #defines.
1572         (tinfo_fn_id, tinfo_fn_type): Rename to ...
1573         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
1574         (tinfo_var_id): New enumeration.
1575         (DECL_TINFO_FN_P): Augment comment.
1576         * decl.c (cp_global_trees): Adjust documentation.
1577         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
1578         tinfo_decl_type and tinfo_var_id.
1579         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
1580         (build_typeid): Remove unused variable.
1581         (get_tinfo_var): Use tinfo_var_id.
1582         (tinfo_name): New static function.
1583         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
1584         (tinfo_from_decl): Likewise.
1585         (get_base_offset): New static function, broken out of
1586         expand_class_desc.
1587         (expand_si_desc): Use tinfo_name.
1588         (expand_class_desc): Likewise. Lose local static variable.
1589         Use base_desc_type_node. Use get_base_offset.
1590         (expand_ptr_desc): Use tinfo_name.
1591         (expand_attr_desc): Likewise.
1592         (expand_generic_desc): Likewise.
1593
1594         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
1595         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
1596
1597 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
1598
1599         * cp-tree.h (__eprintf): Remove declaration.
1600         * tree.c (__eprintf): Remove definition.
1601
1602 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
1603             Mark Mitchell  <mark@codesourcery.com>
1604
1605         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
1606         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
1607
1608 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
1609
1610         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
1611
1612 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
1613
1614         * cp-tree.h (register_dtor_fn): New function.
1615         * decl.c (destroy_local_static): Rename to ...
1616         (register_dtor_fn): ... this.  Give it external linkage.
1617         (expand_static_init): Use it.
1618         * decl2.c (do_static_initialization): Likewise, if using
1619         __cxa_atexit.
1620         (do_static_destruction): Check that __cxa_atexit is not in use.
1621         (finish_file): Don't call do_static_destruction if using
1622         __cxa_atexit.
1623
1624         * typeck.c (convert_arguments): Restore two-message error
1625         reporting.
1626         
1627 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
1628
1629         Remap dynamic cast hint values to be consistent across ABIs.
1630         * search.c (dynamic_cast_base_recurse): Remap generated value.
1631         (get_dynamic_cast_base_type): Adjust documentation.
1632         * tinfo.h (__user_type_info::dyncast): Likewise.
1633         (__user_type_info::find_public_subobj): Remap BOFF meaning.
1634         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
1635         (__class_type_info::do_dyncast): Likewise.
1636         (__class_type_info::do_find_public_subobj): Likewise.
1637         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.     
1638
1639 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
1640
1641         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
1642
1643         * typeck2.c (incomplete_type_error): Restore previous
1644         cp_error and cp_error_at call sequence.
1645         
1646 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
1647
1648         * class.c (dump_class_hierarchy): Make format agree with argument;
1649         cast pointer to unsigned long and print with %lx.
1650         
1651 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
1652
1653         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
1654         
1655         * typeck.c (composite_pointer_type, common_type,
1656         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
1657         build_function_call_real, convert_arguments,
1658         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
1659         build_unary_op, mark_addressable, build_compound_expr,
1660         build_static_cast, build_reinterpret_cast, build_const_cast,
1661         build_c_cast, build_modify_expr, get_delta_difference,
1662         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 
1663         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
1664         into a single one.
1665         * typeck2.c (readonly_error, abstract_virtuals_error,
1666         process_init_constructor, check_for_new_type): Likewise.
1667
1668 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
1669
1670         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
1671         VAR_DECLs.
1672
1673 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
1674
1675         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
1676         (build_x_typeid): Likewise.
1677         (get_tinfo_fn): Likewise.
1678         (get_tinfo_fn_unused): Rename to ...
1679         (get_tinfo_decl): ... here.
1680         * rtti.c (build_headof): Replace logic error with assertion.
1681         (get_tinfo_fn_dynamic): Rename to ...
1682         (get_tinfo_decl_dynamic): ... here. Make static. Use
1683         complete_type_or_else.
1684         (build_x_typeid): Move into ...
1685         (build_typeid): ... here. Adjust call to
1686         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
1687         throw_bad_typeid expression.
1688         (get_tinfo_fn_unused): Rename to ...
1689         (get_tinfo_decl): ... here. Adjust comment.
1690         (get_tinfo_fn): Delete.
1691         (tinfo_from_decl): New static function.
1692         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
1693         (get_typeid): Use complete_type_or_else.
1694         (build_dynamic_cast_1): Adjust calls to
1695         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
1696         * parse.y (primary): Adjust call to build_typeid.
1697         * except.c (build_eh_type_type_ref): Adjust call to
1698         get_tinfo_decl. Mark as used.
1699         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
1700         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
1701         * parse.c: Regenerated.
1702
1703 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
1704
1705         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
1706         calling convention.
1707         (resolves_to_fixed_type_p): Document calling convention.
1708         * rtti.c (build_x_typeid): Initialize NONNULL.
1709
1710         * cp-tree.h (build_shared_int_cst): New function.
1711         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
1712         * class.c (modify_vtable_entry): Likewise.
1713         (add_virtual_function): Split out code to generated shared
1714         INTEGER_CSTs to build_share_int_cst.
1715         (modify_all_vtables): Handle all the overridden functions here.
1716         Add overridden functions from non-primary virtual bases to the
1717         primary vtable.
1718         (finish_struct_1): Adjust call to modify_all_vtables.  Add
1719         overridden functions from non-primary bases to the vtable.
1720         * tree.c (build_shared_int_cst): New function.
1721         
1722         * cp-tree.h (scratchalloc): Remove.
1723         (build_scratch_list): Likewise.
1724         * call.c (convert_class_to_reference): Replace build_scratch_list
1725         and build_expr_list with build_tree_list.
1726         (add_candidate): Replace scratchalloc with expralloc.  Note memory
1727         leak.
1728         (build_user_type_conversion_1):  Replace build_scratch_list
1729         and build_expr_list with build_tree_list.
1730         (build_new_op): Likewise.
1731         (build_op_delete_call): Likewise.
1732         (convert_like): Likewise.
1733         * cvt.c (ocp_convert): Likewise.
1734         * decl.c (start_decl): Likewise.
1735         (start_function): Likewise.
1736         (finish_destructor_body): Likewise.
1737         (maybe_build_cleanup_1): Likewise.
1738         * decl2.c (reparse_decl_as_expr): Likewise.
1739         * init.c (perform_member_init): Likewise.
1740         (expand_cleanup_for_base): Likewise.
1741         (build_builtin_delete_call): Likewise.
1742         (build_new_1): Likewise.
1743         (build_delete): Likewise.
1744         * method.c (do_build_assign_ref): Likewise.
1745         * parse.y (already_scoped_stmt): Likewise.
1746         (nontrivial_exprlist): Likewise.
1747         (net_initializer): Likewise.
1748         (initlist): Likewise.
1749         * parse.c: Regenerated.
1750         * rtti.c (build_x_typeid): Likewise.
1751         (build_dynamic_cast_1): Likewise.
1752         * typeck.c (build_x_compound_expr): Likewise.
1753         (build_static_cast): Likewise.
1754         (build_modify_expr): Likewise.
1755         
1756         * cp-tree.h (DECL_VINDEX): Add documentation.
1757         * class.c (build_vtable_entry): Likewise.
1758         (start_vtable): Add comment.
1759         (add_virtual_function): Replace pending_hard_virtuals with
1760         overridden_virtuals and pending_virtuals with new_virtuals.
1761         Replace redundant assignments with assertions.
1762         (check_for_override): Add comment.
1763         (check_bases_and_members): Replace pending_hard_virtuals with
1764         overridden_virtuals and pending_virtuals with new_virtuals.
1765         (create_vtbl_ptr): Likewise.
1766         (layout_class_type): Likewise.
1767         (finish_struct_1): Likewise.  Add comments.
1768         
1769 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
1770
1771         * class.c (finish_struct_1): Replace redundant code with
1772         assertions.
1773
1774         * cp-tree.h (flag_new_abi): Move.
1775         (flag_use_cxa_atexit): Likewise.
1776         (flag_honor_std): Likewise.
1777         (flag_rtti): Likewise.
1778         (vbase_offsets_in_vtable_p): Define.
1779         (vptrs_present_everywhere_p): Likewise.
1780         (TYPE_CONTAINS_VPTR_P): Likewise.
1781         (dfs_walk_real): Declare.
1782         * class.c (build_vbase_pointer_fields): Check
1783         vbase_offsets_in_vtable_p.
1784         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
1785         BINFO_VPTR_FIELD.
1786         (build_vbase_offset_vtbl_entries): Simplify.
1787         (build_vbase_offset_vtbl_entries): Adjust.
1788         (build_vbase_pointer): Add ability to look up vbase offsets in
1789         vtable. 
1790         (start_vtable): New function.
1791         (add_virtual_function): Use it.
1792         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
1793         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
1794         (build_vtbl_initializer): Take the type of the complete object as
1795         input.  Use it to correctly calculate vbase offsets.
1796         (dfs_finish_vtbls): Pass the complete type to
1797         build_vtbl_initializer.
1798         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
1799         (create_vtable_ptr): Create a vtable even if there are no
1800         new virtual functions, under the new ABI.
1801         (finish_struct_1): Likewise.
1802         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
1803         * decl.c (exapnd_static_init): Remove call to
1804         preserve_initializer.
1805         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
1806         vtables.
1807         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
1808         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
1809         (construct_virtual_bases): Don't initialize virtual base pointers
1810         under the new ABI.
1811         (build_aggr_init): Clean up comment.
1812         (expand_aggr_init_1): Likewise.
1813         * rtti.c (expand_class_desc): Store the virtual function table
1814         index where the vbase offset lives in the offset field.
1815         * search.c (dfs_walk_real): Make it global.
1816         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
1817         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
1818         
1819         * tinfo.h (USItype): Make it signed under the new ABI.
1820         * tinfo.cc (convert_to_base): New function.  Encapsulate base
1821         conversion logic here.
1822         (__class_type_info::do_upcast): Use it.
1823         (__class_type_info::do_dyncast): Likewise.
1824         (__class_type_info::do_find_public_subobj): Likewise.
1825         
1826         * init.c (construct_virtual_bases): Don't look up the addresses of
1827         virtual bases at run-time.
1828
1829         * class.c (build_vbase_pointer): Relocate.
1830         (build_vbase_pointer_fields): Likewise.
1831         (dfs_build_vbase_offset_vtbl_entries): Likewise.
1832         (build_vbase_offset_vtbl_entries): Likewise.
1833
1834         * decl.c (init_decl_processing): Complain if -fnew-abi
1835         -fno-vtable-thunks is used.
1836
1837         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
1838         flag_new_abi.
1839
1840 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
1841
1842         * cp-tree.h (num_extra_vtbl_entries): New function.
1843         (size_extra_vtbl_entries): Likewise.
1844         (dfs_vtable_path_unmark): Likewise.
1845         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
1846         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
1847         * class.c (num_extra_vtbl_entries): New function.
1848         (size_extra_vtbl_entries): Likewise.
1849         (dfs_build_vbase_offset_vtbl_entries): New function.
1850         (build_vbase_offset_vtbl_entries): Likewise.
1851         (build_vtbl_initializer): Use it.
1852         (finish_struct_1): Adjust vtable sizes (using
1853         num_extra_vtbl_entries).
1854         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
1855         THUNK_DECL is non-NULL before expanding it.
1856         * init.c (expand_virtual_init): Adjust the vtable pointer by
1857         size_extra_vtbl_entries before storing it.
1858         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
1859         Handle TREE_LIST parameters here, not in the dfs_* functions.
1860         (dfs_unmarked_real_bases_queue_p): Adjust.
1861         (dfs_marked_real_bases_queue_p): Likewise.
1862         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
1863         (dfs_vtable_path_marked_real_bases_queue_p): New function.
1864         (dfs_vtable_path_unmark): Likewise.
1865         
1866 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
1867
1868         * optimize.c (copy_body_r): Clear the operand three of a
1869         TARGET_EXPR when copying it.
1870
1871 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1872
1873         * method.c (build_decl_overload_real): Check whether we are in ::
1874         before returning __builtin_new/delete.
1875
1876 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
1877
1878         * pt.c (tsubst_friend_function): Improve comment.
1879         (instantiate_decl): Avoid crashing when a "nested" function is
1880         instantiated from the top level.
1881         
1882         * dump.c (dqeueue_and_dump): Dump
1883         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
1884
1885 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1886
1887         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
1888
1889 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
1890
1891         * g++spec.c (lang_specific_driver): Add -fnew-abi if
1892         ENABLE_NEW_GXX_ABI defined.
1893         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
1894         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
1895         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
1896
1897 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
1898
1899         * decl.c (start_cleanup_fn): Call pushdecl.
1900
1901         * call.c (convert_class_to_reference): Fix typos.
1902         (build_conditional_expr): Handle errors gracefully.
1903         * class.c (push_nested_class): Likewise.
1904         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
1905         (DECL_THIS_EXTERN): Use it.
1906         (DECL_THIS_STATIC): Likewise.
1907         * cvt.c (convert_to_void): Handle errors gracefully.
1908         (build_expr_type_conversion): Likewise.
1909         * decl.c (maybe_push_decl): Likewise.
1910         (start_decl_1): Likewise.
1911         (require_complete_types_for_parms): Likewise.
1912         * parse.y (structsp): Likewise.
1913         (base_class): Likewise.
1914         * parse.c: Regenerated.
1915         * pt.c (finish_member_template_decl): Likewise.
1916         * typeck.c (decay_conversion): Likewise.
1917         
1918         * cp-tree.h (dfs_skip_vbases): New function.
1919         (find_vbase_instance): Likewise.
1920         * class.c (determine_primary_base): Allow a nearly empty base to
1921         serve as a primary base class under the new ABI.
1922         (get_class_offset_1): Rename to ...
1923         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
1924         messages here.
1925         (get_class_offset): Use it.  Issue error messages here.
1926         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
1927         find the right copies of virtual bases.
1928         (fixup_vtable_deltas1): Rename to ...
1929         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
1930         bases as primary bases.
1931         (fixup_vtable_deltas): Remove.
1932         (override_one_vtable): Handle virtual bases as primary bases.
1933         (merge_overrides): Likewise.
1934         (finish_struct_1): Likewise.
1935         (dump_class_hierarchy): Dump primary-ness of bases as well.
1936         * search.c (mark_primary_bases): Use a pre-order traversal to
1937         handle primary virtual bases.
1938         (dfs_skip_vbases): New fiunction.
1939         (expand_upcast_fixups): Adjust to handle primary virtual bases.
1940         (fixup_virtual_upcast_offsets): Likewise.
1941         (fixup_all_virtual_upcast_offsets): Likewise.
1942         (dfs_find_vbase_instances): New function.
1943         (find_vbase_instance): Likewise.
1944         
1945 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
1946
1947         * lex.c (DIR_SEPARATOR): Delete macro.
1948
1949 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
1950  
1951        * decl2.c (lang_decode_option): Handle automatic line wrapping
1952        option.
1953         
1954 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
1955
1956         * friend.c (do_friend): Don't resolve scopes when processing
1957         template declarations, even if the qualifying scope doesn't
1958         involve template parameters.
1959
1960 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
1961
1962         * class.c (dfs_modify_vtables_queue_p): Remove.
1963         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
1964         and dfs_marked_real_bases_queue_p instead of
1965         dfs_modify_vtables_queue_p.
1966
1967         * class.c (build_vbase_path): Simplify.
1968         (dfs_propagate_binfo_offsets): New function.
1969         (propagate_binfo_offsets): Use it.
1970         (remove_base_field): Simplify.
1971         (dfs_set_offset_for_vbases): Remove.
1972         (dfs_set_offset_for_shared_vbases): New function.
1973         (dfs_set_offset_for_unshared_vbases): Likewise.
1974         (layout_virtual_bases): Use them.
1975         (layout_basetypes): Don't call propagate_binfo_offsets.
1976         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
1977         for the vbases.
1978         
1979         * class.c (build_base_field): New function, split out from ...
1980         (build_base_fields): ... here.  Use it.  Allocate primary bases
1981         first, under the new ABI.
1982         (get_vtable_entry): Remove.
1983         (remove_base_field): New function, split out from ...
1984         (remove_base_fields): ... here.  Adjust since primary bases come
1985         first under the new ABI.
1986         
1987         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
1988         (initialize_vtbl_ptrs): New function.
1989         (expand_indirect_vtbls_init): Change prototype.
1990         (convert_pointer_to_vbase): Declare.
1991         * init.c (expand_direct_vtbls_init): Remove.
1992         (dfs_initialize_vtbl_ptrs): New function.
1993         (initialize_vtbl_ptrs): Likewise.
1994         (emit_base_init): Use initialize_vtbl_ptrs.
1995         * search.c (convert_pointer_to_vbase): Make it global.
1996         (expand_indirect_vtbls_init): Remove vtable initialization code.
1997         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
1998         
1999         * class.c (dfs_finish_vtbls): New function.
2000         (finish_vtbls): Use it.
2001         (dump_class_hierarchy): New function.
2002         
2003         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
2004         (BINFO_VBASE_PRIMARY_P): New macro.
2005         (BINFO_VIRTUALS): Add to documentation.
2006         (SET_BINFO_PRIMARY_MARKED_P): Remove.
2007         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
2008         (dfs_mark_primary_bases_queue_p): Likewise.
2009         (dfs_unmarked_real_bases_queue_p): New function.
2010         (dfs_marked_real_bases_queue_p): Likewise.
2011         * search.c (dfs_mark_primary_bases): Adjust.
2012         (mark_primary_bases): Likewise.
2013         (get_shared_vbase_if_not_primary): New function.
2014         (dfs_unmarked_real_bases_queue_p): Likewise.
2015         (dfs_marked_real_bases_queue_p): Likewise.
2016         (dfs_get_pure_virtuals): Simplify.
2017         (get_pure_virtuals): Likewise.
2018         
2019 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2020
2021         * lex.c: Include tm_p.h.
2022
2023 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
2024
2025         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
2026
2027 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
2028
2029         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
2030         * pt.c (instantiate_decl): Defer comdat templates that might not be
2031         needed.
2032         
2033         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
2034         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
2035         (finish_file): Likewise.
2036
2037         * decl2.c (import_export_class): Undo 12/14 change.
2038
2039         * error.c (dump_decl): operator new, not operatornew.
2040
2041         * class.c (field_decl_cmp): A nontype is "greater" than a type.
2042         * search.c (lookup_field_1): Look for the last field with the
2043         desired name.
2044
2045 2000-01-05  Nathan Sidwell  <nathan@acm.org>
2046
2047         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
2048         FUNCTION_DECL.
2049
2050 2000-01-05  Nathan Sidwell  <nathan@acm.org>
2051
2052         * typeck.c (build_static_cast): Don't strip target qualifiers
2053         when casting from a class.
2054
2055 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2056
2057         * class.c (warn_hidden): Initialize variable `fndecl'.
2058
2059 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
2060
2061         * decl.c (flag_isoc9x): New variable to be able to use code in
2062         c-common.c.  For now always zero.
2063
2064 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
2065
2066         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
2067         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
2068         or unshare_base_binfos for virtual bases here.
2069         * search.c (dfs_get_vbase_types): Do it here.
2070         (get_vbase_types): Adjust.
2071         
2072 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
2073
2074         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
2075         (BINFO_PRIMARY_MARKED_P): Use flag 5.
2076         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
2077         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
2078         (unmark_primary_bases): Remove declaration.
2079         (unmarkedp): Declare.
2080         (dfs_vbase_unmark): Likewise.
2081         * class.c (determine_primary_base): Return immediately if there
2082         are no base classes.  Call mark_primary_bases here.
2083         (modify_all_direct_vtables): Remove.
2084         (modify_all_indirect_vtables): Remove.
2085         (dfs_modify_vtables_queue_p): New function.     
2086         (dfs_modify_vtables): New function.
2087         (modify_all_vtables): Use them.
2088         (build_base_fields): Build FIELD_DECLs for primary virtual base
2089         classes.
2090         (create_vtable_ptr): Don't call determine_primary_base here.
2091         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
2092         (dfs_set_offset_for_vbases): ... this.
2093         (layout_virtual_bases): Use it.
2094         (layout_class_type): Call determine_primary_base here.
2095         * search.c (unmarkedp): Make it global.
2096         (shared_marked_p): Simplify.
2097         (shared_unmarked_p): Likewise.
2098         (dfs_primary_bases_queue_p): Remove.
2099         (dfs_unmark_primary_bases): Likewise.
2100         (unmark_primary_bases): Likewise.
2101         (mark_primary_bases): Simplify.
2102         (get_pure_virtuals): Don't call mark_primary_bases here.
2103         (dfs_vbase_unmark): New function.
2104         (get_vbase_types): Simplify.
2105
2106         * class.c (struct base_info): Remove.
2107         (determine_primary_base): Take has_virtual_p rather than a
2108         base_info as input.  Don't calculate max_has_virtual.
2109         (finish_struct_bits): Remove max_has_virtual argument.
2110         (create_vtable_ptr): Remove max_has_virtual_p argument.
2111         (layout_virtual_bases): Remove max argument.
2112         (layout_basetypes): Likewise.
2113         (layout_class_type): Remove max_has_virtual_p argument.
2114         (finish_struct_1): Remove max_has_virtual.
2115
2116         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
2117         (layout_basetypes): Remove.
2118         * class.c (propagate_binfo_offsets): Moved here from tree.c.
2119         Update to handle primary virtual bases.
2120         (remove_base_fields): New function, split out from
2121         layout_basetypes.
2122         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
2123         (layout_virtual_bases): New function, split out from
2124         layout_basetypes.  Update to handle primary virtual bases.
2125         (layout_basetypes): Moved here from tree.c.  Use
2126         remove_base_fields and layout_virtual_bases.
2127         * search.c (dfs_mark_primary_bases_queue_p): New function.
2128         (mark_primary_bases): Use it.
2129         * tree.c (CEIL): Remove.
2130         (propagate_binfo_offsets): Remove.
2131         (layout_basetypes): Remove.
2132         
2133 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
2134
2135         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
2136         (BINFO_PRIMARY_MARKED_P): New macro.
2137         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
2138         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
2139         (mark_primary_bases): New function.
2140         (unmark_primary_bases): Likewise.
2141         * search.c (get_abstract_virtuals_1): Remove.
2142         (dfs_mark_primary_bases): New function.
2143         (mark_primary_bases): Likewise.
2144         (dfs_unmark_primary_bases): Likewise.
2145         (unmark_primary_bases): Likewise.
2146         (dfs_get_pure_virtuals): Likewise.
2147         
2148 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
2149
2150         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
2151         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
2152         (modify_one_vtable): Adjust.
2153         (fixup_vtable_deltas1): Likewise.
2154         (override_one_vtable): Likewise.
2155         * search.c (get_abstract_virtuals_1): Likewise.
2156         (get_pure_virtuals): Likewise.
2157         (expand_upcast_fixups): Likewise.
2158         * tree.c (debug_binfo): Likewise.
2159         
2160         * class.c (build_vtable): Don't return a value.  Don't rebuild
2161         vtables for bases that have already been handled.
2162         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
2163         already been handled.
2164         (modify_one_vtable): Adjust accordingly.
2165         (fixup_vtable_deltas1): Likewise.
2166         (finish_struct_1): Likewise.
2167
2168 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2169
2170         * call.c (build_new_method_call): Also check destructors.
2171
2172 1999-12-31  Mark Mitchell  <mark@codesourcery.com>
2173
2174         * cp-tree.h (VF_NORMAL_VALUE): Remove.
2175         * class.c (struct base_info): Remove vfield, vfields, and rtti.
2176         (set_primary_base): New function, split out from ...
2177         (finish_base_struct): ... here.  Rename to ...
2178         (determine_primary_base): ... this.  Simplify.
2179         (create_vtable_ptr): Tweak accordingly.
2180         (finish_struct_1): Simplify.
2181         
2182         * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
2183         (CLASSTYPE_N_BASECLASSES): Likewise.
2184         (BINFO_FOR_VBASE): New macro.
2185         (get_vbase_types): Change prototype.
2186         * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
2187         (prepare_fresh_vtable): Likewise.
2188         (finish_vtbls): Likewise.
2189         (get_class_offset_1): Likewise.
2190         (modify_all_indirect_vtables): Likewise.
2191         (build_vbase_pointer_fields): Likewise.
2192         * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
2193         * init.c (sort_base_init): Use BINFO_FOR_VBASE.
2194         (expand_member_init): Likewise.
2195         * search.c (get_base_distance): Likewise.
2196         (lookup_field_queue_p): Likewise.
2197         (virtual_context): Likewise.
2198         (get_vbase_types): Don't return a value.  Set
2199         CLASSTYPE_VBASECLASSES here.
2200         * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
2201         
2202 1999-12-30  Mark Mitchell  <mark@codesourcery.com>
2203
2204         * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
2205
2206 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
2207
2208         * class.c (create_vtable_ptr): Put the vtable at the beginning of
2209         the class, not the end, in the new ABI.
2210         * tree.c (propagate_binfo_offsets): Do the right thing for the new
2211         ABI.
2212
2213 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
2214
2215         * cp-tree.h (lang_type): Add nearly_empty_p.  Adjust dummy.
2216         (CLASSTYPE_NEARLY_EMPTY_P): New macro.
2217         * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
2218         (check_field_decls): Likewise.
2219         (check_bases_and_members): Likewise.
2220
2221 1999-12-28  Mark Mitchell  <mark@codesourcery.com>
2222
2223         * cp-tree.h (do_inline_function_hair): Remove.
2224         * class.c (layout_class_type): New function, split out from
2225         finish_struct_1.
2226         (fixup_pending_inline): Likewise.
2227         (fixup_inline_methods): New function.
2228         * method.c (fixup_pending_inline): Remove.
2229         (do_inline_function_hair): Likewise.
2230         
2231         * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
2232         new ABI.
2233         
2234         * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
2235         (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
2236         (CLASSTYPE_PURE_VIRTUALS): ... this.
2237         (lang_decl_flags): Replace abstract_virtual with pure_virtual.
2238         (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
2239         (DECL_PURE_VIRTUAL_P): ... this.
2240         (get_abstract_virtuals): Rename to ...
2241         (get_pure_virtuals): ... this.
2242         * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
2243         DECL_ABSTRACT_VIRTUAL_P.  Replace CLASSTYPE_ABSTRACT_VIRTUALS with
2244         CLASSTYPE_PURE_VIRTUALS.
2245         * class.c (build_vtable_entry): Likewise.
2246         (finish_struct_bits): Likewise.  Call get_pure_virtuals, not
2247         get_abstract_virtuals.
2248         (build_vtbl_initializer): Likewise.
2249         (override_one_vtable): Likewise.
2250         (check_methods): Likewise.
2251         * decl.c (duplicate_decls): Likewise.
2252         (redeclaration_error_message): Likewise.
2253         (lang_mark_tree): Likewise.
2254         * decl2.c (grok_function_init): Likewise.
2255         (import_export_vtable): Likewise.
2256         (import_expor_class): Likewise.
2257         * typeck2.c (abstract_virtuals_error): Likewise.
2258         * xref.c (GNU_xref_member): Likewise.
2259         * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
2260         
2261 1999-12-26  Zack Weinberg  <zack@wolery.cumb.org>
2262
2263         * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
2264         throughout.
2265
2266 1999-12-26  Mark Mitchell  <mark@codesourcery.com>
2267
2268         * decl.c (store_return_init): Use mode of old RTL generated for
2269         DECL_RESULT, not the mode of DECL_RESULT itself.
2270         * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
2271         for functions that used named return values.
2272         
2273 1999-12-24  Mark Mitchell  <mark@codesourcery.com>
2274
2275         * semantics.c (expand_body): Use
2276         note_deferral_of_defined_inline_function.
2277
2278 1999-12-22  Mark Mitchell  <mark@codesourcery.com>
2279
2280         * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
2281
2282 1999-12-22  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
2283
2284         * error.c (dump_decl): Support named return values.
2285
2286 1999-12-20  Mark Mitchell  <mark@codesourcery.com>
2287
2288         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
2289         (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
2290         (CLASSTYPE_PRIMARY_BINFO): Likewise.
2291         * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
2292         TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
2293         (check_bases_and_members): Set them here instead.
2294         (create_vtable_ptr): New function, split out from ...
2295         (finish_struct_1): ... here.  Use it.  Tidy.  Use
2296         CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
2297         * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
2298         the first field in the class.
2299         * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES.  Handle
2300         seeing TYPE_VFIELD as the first field in the class.
2301         
2302         * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
2303         (TYPE_POLYMORPHIC_P): ... this.
2304         (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
2305         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
2306         (TREE_CALLS_NEW): Remove.
2307         (TREE_MANGLED): Likewise.
2308         * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
2309         and TYPE_POLYMORPHIC_P.
2310         * class.c (check_bases): Likewise.
2311         (finish_base_struct): Likewise.
2312         (finish_struct_bits): Likewise.
2313         (check_for_override): Likewise.
2314         (finish_struct_1): Likewise.
2315         (get_vfield_name): Likewise.
2316         * decl.c (xref_basetypes): Likewise.
2317         * decl2.c (import_export_class): Likewise.
2318         (import_export_decl): Likewise.
2319         * error.c (dump_function_decl): Likewise.
2320         * pt.c (instantiate_class_template): Likewise.
2321         * repo.c (repo_inline_used): Likewise.
2322         * rtti.c (build_headof): Likewise.
2323         (get_tinfo_fn_dynamic): Likewise.
2324         (build_x_typeid): Likewise.
2325         (get_tinfo_var): Likewise.
2326         (build_dynamic_cast_1): Likewise.
2327         (synthesize_tinfo_fn): Likewise.
2328         * search.c (lookup_field_1): Likewise.
2329         (dfs_debug_mark): Likewise.
2330         (maybe_suppress_debug_info): Likewise.
2331         * typeck.c (build_component_ref): Likewise.
2332         (build_component_addr): Likewise.
2333         * typeck2.c (process_init_constructor): Likewise.
2334         
2335 1999-12-20  Nathan Sidwell  <nathan@acm.org>
2336
2337         * typeck.c (strip_all_pointer_quals): New static function.
2338         (build_static_cast): Use it. Don't use at_least_as_qualified_p.
2339
2340 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
2341
2342         * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
2343         (dso_handle_node): New macro.
2344         (flag_use_cxa_atexit): New variable.
2345         (declare_global_var): New function.
2346         (start_anon_func): Remove declaration.
2347         (end_anon_func): Likewise.
2348         * decl.c (get_atexit_node): New function, split out from
2349         destroy_local_static.  Handle flag_use_cxa_atexit.
2350         (get_dso_handle_node): Likewise.
2351         (start_cleanup_fn): Renamed from start_anon_func.  Moved here from
2352         except.c.  Handle flag_use_cxa_atexit.
2353         (end_cleanup_fn): Renamed from end_anon_func.  Moved here from
2354         except.c.
2355         (declare_global_var): New variable.
2356         (destroy_local_static): Handle flag_use_cxa_atexit.
2357         * decl2.c (flag_use_cxa_atexit): New variable.
2358         (lang_f_options): Likewise.
2359         * except.c (start_anon_func): Remove.
2360         (end_anon_func): Liekwise.
2361         * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
2362         * rtti.c (get_tinfo_var): Use declare_global_var.
2363
2364 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
2365
2366         * class.c (check_field_decls): Don't return a value.
2367         (avoid_overlap): Moved here from tree.c.
2368         (build_base_fields): Likewise.
2369         (check_bases): New function, split out from finish_base_struct.
2370         (check_bases_and_members): New function, split out from 
2371         finish_struct_1.
2372         (struct base_info): Remove cant_have_default_ctor,
2373         cant_have_const_ctor, cant_have_asn_ref.
2374         (finish_base_struct): Split semantic analysis into check_bases.
2375         (finish_struct_methods): Fix bogus assertion.
2376         (check_field_decls): Call finish_struct_anon here.
2377         (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
2378         (finish_struct_1): Use check_bases_and_members.  Reorganize.
2379         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
2380         (build_base_fields): Don't declare.
2381         * tree.c (avoid_overlap): Remove.
2382         (build_base_fields): Likewise.
2383         
2384         * optimize.c (struct inline_data): Remove scope_stmt.
2385         (remap_block): Don't use insert_block_after_note.  Don't update
2386         scope_stmt.
2387         (expand_call_inline): Don't update scope_stmt.
2388         (optimize_function): Don't initialize scope_stmt.
2389         * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
2390         NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
2391
2392 1999-12-15  Mark Mitchell  <mark@codesourcery.com>
2393
2394         * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
2395         out of the class, rather than taking them as parameters.
2396         (build_vbase_pointer_fields): Move here from tree.c.
2397         (build_vtbl_or_vbase_field): New function.
2398         (check_methods): Likewise.
2399         (remove_zero_width_bitfields): Likewise.
2400         (add_virtual_function): Use tree_cons instead of temp_tree_cons.
2401         (delete_duplicate_fields_1): Tidy.  Don't delete duplicate
2402         USING_DECLs here.
2403         (finish_struct_methods): Handle the case where there are no
2404         methods here.
2405         (get_basefndecls): Use tree_cons instead of temp_tree_cons.
2406         (check_field_decls): Call delete_duplicate_fields here.
2407         (finish_struct_1): Tidy.  Use check_methods and
2408         remove_zero_width_bitfields.
2409         * cp-tree.h (build_vbase_pointer_fields): Remove.
2410         * decl.c (grokdeclarator): Use tree_cons instead of
2411         temp_tree_cons.
2412         * decl2.c (qualified_lookup_using_namespace): Use tree_cons
2413         instead of temp_tree_cons.
2414         * lex.c (cons_up_default_function): Remove dead code.
2415         * method.c (fixup_pending_inline): New function, split out from ...
2416         (do_inline_function_hair): ... here.
2417         * tree.c (build_vbase_pointer_fields): Remove.
2418         
2419 1999-12-15  Jason Merrill  <jason@casey.cygnus.com>
2420
2421         * tree.c (walk_tree): Walk operand subtrees in forward order.
2422         * optimize.c (expand_call_inline): Likewise.
2423         (optimize_function): Initialize id->scope_stmt to something useful.
2424         (remap_block): Assume id->scope_stmt has a useful value.
2425
2426 1999-12-15  Nathan Sidwell  <nathan@acm.org>
2427
2428         * typeck.c (build_c_cast): Expand warning message. Move pointer
2429         alignment warning to after the cast. Don't warn about pointer
2430         alignment when given a pointer to incomplete.
2431
2432 1999-12-15  Richard Henderson  <rth@cygnus.com>
2433
2434         * cp-tree.h (make_aggr_type): Declare.
2435         * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
2436         (make_aggr_type): New.
2437
2438         * decl.c (build_typename_type, init_decl_processing): Use it.
2439         (build_ptrmemfunc_type, xref_tag): Likewise.
2440         * except.c (call_eh_info): Likewise.
2441         * init.c (init_init_processing): Likewise.
2442         * pt.c (process_template_parm, lookup_template_class): Likewise.
2443         * rtti.c (expand_class_desc): Likewise.
2444         * semantics.c (begin_class_definition, finish_typeof): Likewise.
2445         * tree.c (copy_template_template_parm): Likewise.
2446
2447 1999-12-15  Jason Merrill  <jason@yorick.cygnus.com>
2448
2449         * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
2450         sizeof (struct tree_common).
2451
2452 1999-12-14  Jason Merrill  <jason@casey.cygnus.com>
2453
2454         * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
2455         outermost block to point to the inlined function decl.
2456
2457         * error.c (dump_decl): operator==, not operator ==.
2458         (op_to_string): Likewise.
2459
2460         * decl.c (compute_array_index_type): Handle null name.
2461
2462         * decl2.c (ambiguous_decl): Fix to match comment.
2463         (lookup_using_namespace): Adjust.
2464
2465         * decl2.c (import_export_class): Don't ignore dllimport.
2466
2467 1999-12-14  Mark Mitchell  <mark@codesourcery.com>
2468
2469         * class.c (check_field_decls): Split out from ...
2470         (finish_struct_1): ... here.  Use it.  Tidy.
2471
2472         * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
2473         * optimize.c (copy_body_r): Pass it.
2474         * tree.c (remap_save_expr): Clear walk_subtrees for an
2475         already-handled SAVE_EXPR.
2476         (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
2477
2478         * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
2479         * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
2480
2481         * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
2482
2483 1999-12-14  Mumit Khan  <khan@xraylith.wisc.edu>
2484
2485         * class.c (finish_base_struct): Allow multiple COM base classes
2486         as well as non-COM bases as long as it's not the leftmost.
2487
2488 1999-12-13  Mumit Khan  <khan@xraylith.wisc.edu>
2489
2490         * lex.c (saving_parse_to_obstack): New global.
2491         (reinit_parse_for_block): Use.
2492         (reinit_parse_for_expr): Use.
2493         (check_newline): Use.
2494
2495 1999-12-13  Mark Mitchell  <mark@codesourcery.com>
2496
2497         * optimize.c (initialize_inlined_parameters): Take FN to which the
2498         parameters belong as an argument.
2499         (expand_call_inline): Expand calls into the parameter
2500         initializations before pushing the function onto the list of
2501         functions we are presently expanding.
2502
2503 1999-12-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2504
2505         * class.c (get_vtable_name): Use a literal format string and
2506         VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
2507         (prepare_fresh_vtable): Likewise.
2508
2509         * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
2510         VTABLE_NAME_FORMAT.
2511
2512         * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
2513
2514         * init.c (build_vec_init): Initialize variable `try_body'.
2515
2516         * lex.c (yyerror): Don't call a variadic function with a
2517         non-literal format string.
2518
2519         * optimize.c (optimize_function): Call memset, not bzero.
2520
2521         * pt.c (for_each_template_parm_r): Add static prototype.
2522
2523 1999-12-09  Andreas Jaeger  <aj@suse.de>
2524
2525         * except.c (expand_throw): Add static attribute to match
2526         prototype.
2527
2528         * Makefile.in (semantics.o): Add dependency on output.h.
2529         * semantics.c: Include output.h for declaration of
2530         make_function_rtl.
2531
2532 1999-12-09  Mark Mitchell  <mark@codesourcery.com>
2533
2534         * decl.c (init_decl_processing): Reenable inlining on trees.
2535         (finish_function): Likewise.
2536         * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
2537         * semantics.c (simplify_aggr_init_exprs): New function.
2538         (expand_body): Use it.
2539         * tree.c (walk_tree): Special-case TARGET_EXPRs since they
2540         sometimes present the same sub-tree twice.
2541         
2542         * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
2543         `csl'.
2544
2545         * semantics.c (finish_switch_cond): Do conversions here, not ...
2546         * typeck.c (c_expand_start_case): Here.
2547
2548         * semantics.c (do_poplevel): Remove unused variable.
2549         
2550 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
2551
2552         * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
2553         unless we're declaring the variable in question.
2554
2555 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
2556
2557         * decl.c (init_decl_processing): #if 0 last patch.
2558         (finish_function): Likewise.
2559
2560 1999-12-05  Mark Mitchell  <mark@codesourcery.com>
2561
2562         * decl.c (init_decl_processing): Set flag_inline_trees if
2563         !flag_no_inline.
2564
2565         * cp-tree.h (calls_setjmp_p): Declare.
2566         * decl.c (finish_function): Mark functions that call setjmp as
2567         uninlinable.
2568         * optimize.c (calls_setjmp_r): New function.
2569         (calls_setjmp_p): Likewise.
2570
2571 1999-12-04  Mark Mitchell  <mark@codesourcery.com>
2572
2573         * optimize.c (expand_call_inline): Wrap the expanded call in an
2574         EXPR_WITH_FILE_LOCATION node to get correct line numbers for
2575         inlined functions.
2576
2577         * optimize.c (inline_data): Remove fns_top.  Add scope_stmt.  Add
2578         in_target_cleanup_p.
2579         (remap_decl): New function.
2580         (remap_block): Likewise.
2581         (copy_scope_stmt): Likewise.
2582         (copy_body_r): Use remap_decl and copy_scope_stmt.
2583         (copy_body): Use VARRAY_TOP_TREE.
2584         (initialize_inlined_parameters): Likewise.
2585         (declare_return_variable): Likewise.
2586         (inlinable_function_p): Check flag_inline_trees.
2587         (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
2588         specially.  Use VARRAY_PUSH_TREE.  Create a BLOCK for the
2589         parameters of the inlined function.
2590         (optimize_function): Prevent recursion into partially complete
2591         functions.
2592         
2593         * cp-tree.def (SCOPE_STMT): Take one operand.
2594         * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
2595         (SCOPE_NULLIFIED_P): Redefine.
2596         (SCOPE_NO_CLEANUPS_P): New macro.
2597         (add_scope_stmt): Change prototype.
2598         * decl.c (poplevel): Tidy.  Warn about unused variables here.
2599         Record SCOPE_STMT_BLOCKs.
2600         (finish_function): Keep DECL_INITIAL for functions that might be
2601         inlined.
2602         * ir.texi: Document SCOPE_NO_CLEANUPS_P.
2603         * semantics.c: Include rtl.h.
2604         (add_scope_stmt): Return the new scope statement and, for an
2605         end-of-scope statement, its matching begin statement.  Don't set
2606         SCOPE_NULLIFIED_P.
2607         (do_pushlevel): Simplify, now that we are always
2608         function-at-a-time.
2609         (do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
2610         (expand_stmt): Don't call expand_start_bindings or
2611         expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
2612         * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
2613         SCOPE_NULLIFIED_P.
2614         * Makefile.in (semantics.o): Depend on RTL_H.
2615         
2616         * decl2.c (pending_statics_used): Make it a macro.
2617         (saved_inlines_used): Likewise.
2618         (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
2619         (mark_inline_for_output): Likewise.
2620         (ssdf_decls_used): Remove.
2621         (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
2622         (generate_ctor_or_dtor_function): Adjust accordingly.
2623         
2624 1999-11-24  Geoffrey Keating  <geoffk@cygnus.com>
2625             Greg McGary  <gkm@gnu.org>
2626
2627         * decl.c (duplicate_decls): Merge
2628         DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
2629         DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
2630
2631 1999-12-02  Mike Stump  <mrs@wrs.com>
2632
2633         * init.c (perform_member_init): Handle parse errors better.
2634
2635 1999-12-01  Mark Mitchell  <mark@codesourcery.com>
2636
2637         * cp-tree.h (min_tree_cons): Remove.
2638         (scratch_ovl_cons): Likewise.
2639         * decl.c (saveable_obstack): Don't declare.
2640         (duplicate_decls): Tweak error-message.
2641         (initialize_local_var): Explicitly mark the definition as static.
2642         (finish_function): Call permanent_allocation, just so
2643         that the middle-end sees the obstacks it expects.
2644         (mark_cp_function_context): Likewise.
2645         * init.c (build_new): Don't use min_tree_cons.
2646         * lex.c (permanent_obstack): Don't declare.
2647         (current_obstack, saveable_obstack): Likewise.
2648         * spew.c (current_obstack, saveable_obstack): Likewise.
2649         * tree.c (current_obstack, saveable_obstack): Likewise.
2650         (scratch_ovl_cons): Remove.
2651         (build_min_nt): Don't mess with obstacks.
2652         (build_min): Likewise.
2653         (min_tree_cons): Remove
2654         * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
2655         (build_x_function_call): Likewise.
2656         (build_c_cast): Don't use min_tree_cons.
2657         
2658 1999-11-29  Mark Mitchell  <mark@codesourcery.com>
2659
2660         * pt.c (tsubst_decl): Robustify.
2661
2662 1999-11-27  Mark Mitchell  <mark@codesourcery.com>
2663
2664         * decl2.c (finish_file): Call expand_body for inline functions
2665         that will be written out but that do not yet have RTL.
2666         * semantics.c (expand_body): Do not generate RTL For inline
2667         functions that do not yet need to be written out.
2668
2669 1999-11-25  Mark Mitchell  <mark@codesourcery.com>
2670
2671         * Make-lang.in (CXX_SRCS): Add optimize.c.  
2672         * Makefile.in (CXX_OBJS): Add optimize.o.
2673         (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
2674         (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
2675         (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
2676         (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
2677         (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
2678         (dump.o): Likewise.
2679         (optimize.o): New target.  
2680         * class.c: Don't include splay-tree.h.
2681         * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.  
2682         * cp-tree.h: Include splay-tree.h.
2683         (DECL_UNINLINABLE): New macro.
2684         (CTOR_BEGIN_P, CTOR_END_P): New macros.
2685         (flag_inline_trees): New variable.
2686         (local_variable_p): New function.
2687         (nonstatic_local_decl_p): Likewise.
2688         (optimize_function): Likewise.
2689         (cplus_unsave_expr_now): Remove.
2690         (copy_tree_r): Declare.
2691         (remap_save_expr): Likewise.  
2692         * decl.c (local_variable_p): Don't
2693         make it static.
2694         (local_variable_p_walkfn): New function.
2695         (make_rtl_for_local_static): Remove code to try to avoid writing
2696         out static constants.
2697         (emit_local_var): Fix indentation.
2698         (nonstatic_local_decl_p): New function.
2699         (check_default_argument): Use local_variable_p_walkfn, not
2700         local_variable_p, when walking the tree.
2701         (start_function): Set the DECL_CONTEXT for automatically generated
2702         labels.
2703         (finish_constructor_body): Use CTOR_STMT to mark the end of a
2704         constructor.  
2705         * decl2.c: Don't include splay-tree.h.
2706         (flag_inline_trees): Define.  
2707         * dump.c: Don't include
2708         splay-tree.h.  
2709         * except.c (expand_end_catch_block): Fix comment formatting.
2710         (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
2711         (expand_throw): Tidy comment.  
2712         * init.c (build_vec_delete_1): Use create_temporary_var.  
2713         * lex.c (cplus_tree_code_type): Make it static.
2714         (cplus_tree_code_length): Likewise.
2715         (cplus_tree_code_name): Likewise.  
2716         * optimize.c: New file.  
2717         * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
2718         with computed gotos.
2719         (setup_vtbl_ptr): Mark the beginnings of constructors with
2720         CTOR_STMT.
2721         (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
2722         (expand_body): Call optimize_function.  Save bodies if we're doing
2723         inlining on trees.
2724         * tree.c: Don't include splay-tree.h.  Include insn-config.h and
2725         integrate.h.
2726         (copy_tree_r): Make it public.
2727         (statement_code_p): New function.
2728         (mark_local_for_remap_r): Likewise.
2729         (cp_usave_r): Likewise.
2730         (cp_unsave): Likewise.
2731         (build_cplus_new): Set DECL_CONTEXT for temporary variables.
2732         (walk_tree): Walk into `s' class nodes.  Walk statement chains.
2733         (copy_tree_r): Handle 's' class nodes.  Restore chains for
2734         statements.  Nullify scopes.  Don't copy types.
2735         (init_tree): Set lang_unsave to cp_unsave.
2736         (remap_save_expr): Define.
2737         * ir.texi: Document CTOR_STMT.
2738         
2739 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>
2740
2741         * search.c (note_debug_info_needed): Do perform this optimization
2742         for dwarf2.  
2743         (maybe_suppress_debug_info): Likewise.  Start by clearing
2744         TYPE_DECL_SUPPRESS_DEBUG.
2745
2746 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
2747
2748         * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
2749
2750         * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
2751
2752 1999-11-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2753
2754         * decl.c (pushdecl, grokdeclarator): Don't call a variadic
2755         function with a non-literal format string.
2756
2757         * lex.c (do_identifier): Likewise.
2758
2759         * typeck.c (build_unary_op): Likewise.
2760
2761 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
2762
2763         * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
2764
2765 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
2766
2767         * cp-tree.def (CTOR_COMPLETE): New tree node.
2768         * decl.c (finish_constructor_body): Add it, to mark the end of the
2769         constructor.
2770         (finish_function): Don't call end_protect_partials here.
2771         * ir.texi (CTOR_COMPLETE): Document it.
2772         * semantics.c (expand_stmt): Handle it.
2773         
2774         * cp-tree.def (FUNCTION_NAME): New tree node.
2775         * cp-tree.h (current_function_name_declared): Tweak documentation.
2776         (lang_decl_flags): Add pretty_function_p, adjust dummy.
2777         (DECL_PRETTY_FUNCTION_P): New macro.
2778         * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
2779         etc., in a template function.  Use at_function_scope_p instead of
2780         expanding it inline.
2781         * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
2782         specially.
2783         (tsubst): Handle FUNCTION_NAME.
2784         (tsubst_copy): Likewise.
2785         (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
2786         etc. in instantiation.
2787         * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
2788         even in template functions.
2789         (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
2790         conditional scope at the top of a destructor.
2791         
2792         * error.c (dump_function_decl): Use `[ with ... ]' syntax for
2793         specializations too.
2794
2795 1999-11-22  Nathan Sidwell  <nathan@acm.org>
2796
2797         * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
2798         when actually negative.
2799
2800         * typeck.c (convert_for_assignment): Expand comment about
2801         strange NULL check, moved from ...
2802         (convert_for_initialization): ... here. Remove unneeded
2803         code.
2804
2805 1999-11-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
2806
2807         * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
2808         * init.c (build_vec_delete, build_vec_delete_1): Likewise.
2809         Always destruct virtual bases of array components, but never
2810         delete them.
2811         (build_vec_init): Adjust invocations.
2812         (build_delete): Likewise.
2813         * decl2.c (delete_sanity): Likewise.
2814
2815 1999-11-19  Nathan Sidwell  <nathan@acm.org>
2816
2817         * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
2818         * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
2819         * decl2.c (grok_method_quals): Accept `restrict' as applying to
2820         the object pointer. Return such qualifiers.
2821         (grokclassfn): Apply this pointer qualifiers. Cleanup unused
2822         variables.
2823
2824 1999-11-18  Mark Mitchell  <mark@codesourcery.com>
2825
2826         * except.c (expand_end_catch_block): Fix typo.
2827         (expand_exception_blocks): Simplify.  Don't call
2828         expand_leftover_cleanups.
2829
2830 1999-11-15  Jason Merrill  <jason@casey.cygnus.com>
2831
2832         * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
2833         * pt.c (tsubst, case INTEGER_TYPE): Call it.  
2834         Check uses_template_parms.
2835
2836         * class.c (finish_struct): If we're a local class in a template
2837         function, add a TAG_DEFN.
2838         * pt.c (lookup_template_class): If this is a local class in a
2839         template function, call pushtag.
2840         (tsubst_expr, case TAG_DEFN): Handle classes, too.
2841
2842         Emit debug info with the vtable.
2843         * search.c (maybe_suppress_debug_info): New function...
2844         * class.c (finish_struct_1): ...split out from here.
2845         * cp-tree.h: Declare it.
2846         * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
2847         if we're writing out the vtable.
2848         * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 
2849         note_debug_info_needed): #if 0 out.
2850
2851 1999-11-14  Mark Mitchell  <mark@codesourcery.com>
2852
2853         * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
2854         * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
2855         TREE_PERMANENT.
2856         * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
2857         * decl2.c (lookup_arg_dependent): Use it.
2858         
2859         * cp-tree.h (cp_finish_decl): Change prototype.
2860         (finish_static_data_member_decl): Likewise.
2861         (push_permanent_obstack): Remove declaration.
2862         (push_expression_obstack): Likewise.
2863         (push_scratch_obstack): Likewise.
2864         (DECL_TEMPLATE_PARM_P): Robustify.
2865         (SET_DECL_TEMPLATE_PARM_P): New macro.
2866         * class.c (add_method): Don't manipulate obstacks.
2867         (finish_vtbls): Likewise.
2868         * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
2869         * decl.c (binding_for_name): Don't manipulate obstacks.
2870         (maybe_push_to_top_level): Likewise.
2871         (pop_from_top_level): Likewise.
2872         (duplicate_decls): Likewise.
2873         (pushdecl): Likewise.
2874         (implicitly_declare): Likewise.
2875         (build_typename_type): Likewise.
2876         (start_decl): Likewise.
2877         (cp_finish_decl): Likewise.
2878         (finish_decl): Likewise.
2879         (destroy_local_static): Likewise.
2880         (expand_static_init): Likewise.
2881         (complete_array_type): Likewise.
2882         (grokvardecl): Likewise.
2883         (build_ptrmemfnc_type): Likewise.
2884         (grokdeclarator): Likewise.
2885         (xref_tag): Likewise.
2886         (xref_basetypes): Likewise.
2887         (start_enum): Likewise.
2888         (finish_enum): Likewise.
2889         (start_function): Likewise.
2890         (finish_function): Likewise.
2891         (start_method): Adjust call to cp_finish_decl.
2892         * decl2.c (finish_static_data_member_decl): Don't manipulate
2893         obstacks.
2894         (grokfield): Likewise.
2895         (grokbitfield): Likewise.
2896         (get_temp_name): Likewise.
2897         (get_sentry): Likewise.
2898         (fnish_file): Likewise.
2899         (lookup_arg_dependent): Likewise.
2900         * except.c (call_eh_info): Likewise.
2901         (push_eh_info): Likewise.
2902         (do_pop_exception): Likewise.
2903         (initialize_handler_parm): Likewise.
2904         (expand_end_eh_spec): Likewise.
2905         (alloc_eh_object): Likewise.
2906         (expand_throw): Likewise.
2907         * expr.c (extract_scalar_init): Likewise.
2908         * init.c (build_java_class_ref): Likewise.
2909         * lex.c (get_time_identifier): Likewise.
2910         (snarf_defarg): Likewise.
2911         (add_defarg_fn): Likewise.
2912         (is_global): Simplify.
2913         (do_identifier): Don't check TREE_PERMANENT.
2914         * method.c (emit_thunk): Don't manipulate obstacks.
2915         * parse.y (condition): Adjust call to cp_finish_decl.
2916         (primary): Likewise.
2917         (initdcl): Likewise.
2918         (initdcl0_innards): Likewise.
2919         (nomods_initdcl0): Likewise.
2920         * pt.c (push_inline_template_parms_recursive): Use
2921         SET_DECL_TEMPLATE_PARM_P.
2922         (process_template_parm): Likewise.
2923         (lookup_template_class): Don't manipulate obstacks.
2924         (instantiate_class_template): Adjust call to
2925         finish_static_data_member_decl.
2926         (tsubst_decl): Don't manipulate obstacks.
2927         (tsubst_expr): Likewise.
2928         (instantiate_template): Likewise.
2929         (instantiate_decl): Adjust calls to cp_finish_decl.
2930         * rtti.c (call_void_fn): Don't manipulate obstacks.
2931         (get_tinfo_var): Likewise.
2932         (get_tinfo_fn_unused): Likewise.
2933         (build_dynamic_cast_1): Likewise.
2934         (expand_si_desc): Likewise.
2935         (expand_class_desc): Likewise.
2936         (expand_ptr_desc): Likewise.
2937         (expand_attr_desc): Likewise.
2938         (expand_generic_desc): Likewise.
2939         (synthesize_tinfo_fn): Likewise.
2940         * search.c (expand_upcast_fixups): Likewise.
2941         * semantics.c (finish_asm_stmt): Likewise.
2942         (finish_named_return_value): Likewise.
2943         (begin_class_definition): Likewise.
2944         (finish_class_definition): Likewise.
2945         (finish_typeof): Likewise.
2946         * tree.c (build_cplus_method_type): Likewise.
2947         (reverse_path): Likewise.
2948         (copy_template_template_parm): Likewise.
2949         (build_expr_ptr_wrapper): Likewise.
2950         (push_expression_obstack): Remove.
2951         (push_permanent_obstack): Likewise.
2952         * typeck.c (mark_addressable): Likewise.
2953         
2954 1999-11-13  Mark Mitchell  <mark@codesourcery.com>
2955
2956         * call.c (build_conditional_expr): Use build_target_expr_with_type.
2957         (convert_like): Likewise.
2958         (build_over_call): Likewise.
2959         * cp-tree.h (build_target_expr): Remove.
2960         (build_target_expr_with_type): New function.
2961         * cvt.c (build_up_reference): Use get_target_expr.
2962         * decl.c (build_target_expr): Move to ...
2963         * tree.c (build_target_expr): Here.  Make it static.
2964         (build_target_expr_with_type): New function.  Set DECL_CONTEXT on
2965         the temporary VAR_DECLs.
2966         (get_target_expr): Use it.
2967
2968 1999-11-13  Jason Merrill  <jason@yorick.cygnus.com>
2969
2970         * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
2971         * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
2972         * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
2973         * class.c (set_rtti_entry): Use it.
2974
2975 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
2976
2977         * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
2978         here.
2979         * semantics.c (finish_expr_stmt): Call it here instead.  Move
2980         default_conversion logic to semantic-analysis time.
2981
2982 1999-11-12  Jason Merrill  <jason@yorick.cygnus.com>
2983
2984         * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
2985
2986 Fri Nov 12 12:56:32 MST 1999    Diego Novillo <dnovillo@cygnus.com>
2987
2988         * init.c (init_init_processing): Re-instated Nov 11 patch after
2989         approval.
2990
2991 Fri Nov 12 10:42:02 MST 1999    Diego Novillo <dnovillo@cygnus.com>
2992
2993         * init.c (init_init_processing): Undo patch from Nov 11, 1999.
2994         Patch had not been approved yet.
2995
2996 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
2997
2998         * decl.c (compute_array_index_type): New function, split out from
2999         grokdeclarator.
3000         (create_array_type_for_decl): Likewise.
3001         (grokdeclarator): Use them.
3002
3003         * semantics.c (expand_stmt): Don't suspend_momentary or
3004         resume_momentary.
3005
3006 Thu Nov 11 12:42:11 MST 1999    Diego Novillo <dnovillo@cygnus.com>
3007
3008         * init.c (init_init_processing): Header information for
3009         arrays allocated via `new' should have the same alignment used by
3010         malloc.
3011
3012 1999-11-10  Mark Mitchell  <mark@codesourcery.com>
3013
3014         * error.c (dump_function_name): Don't crash if given a friend
3015         pseudo-instantiation.
3016
3017         * cp-tree.h (build_enumerator): Change prototype.
3018         * decl.c (enum_next_value): Remove.
3019         (enum_overflow): Likewise.
3020         (init_decl_processing): Don't register enum_next_value as a root.
3021         (start_enum): Clear TYPE_VALUES for a redefined enum.
3022         (finish_enum): Reset the type of enumeration constants.
3023         (build_enumerator): Fix indentation.  Don't copy CONST_DECLs when
3024         we don't need to.  Maintain the TYPE_VALUES list and look there
3025         for the previously defined enumeration constant.  Let enumeration
3026         constants have the type of their values until the enumeration type
3027         is complete.
3028         * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
3029         (structsp): Adjust.
3030         * parse.c: Regenerated.
3031         * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
3032         
3033 Wed Nov 10 12:43:21 1999  Philippe De Muyter  <phdm@macqel.be>
3034                           Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3035
3036         * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
3037
3038 1999-11-09  Mark Mitchell  <mark@codesourcery.com>
3039
3040         * cp-tree.h (language_function): Remove x_last_dtor_insn and
3041         x_last_parm_cleanup_insn.
3042         * decl.c (last_dtor_insn): Remove.
3043         (last_parm_cleanup_insn): Likewise.
3044         (expand_start_early_try_stmts): Don't set them.
3045         (store_parm_decls): Likewise.
3046         (save_function_data): Or save them.
3047         (mark_lang_function): Or mark them.
3048
3049 1999-11-08  Mark Mitchell  <mark@codesourcery.com>
3050
3051         * decl.c (store_parm_decls): Generate cleanup code at
3052         semantic-analysis time.  Destroy objects in the correct order.
3053
3054 1999-11-07  Mark Mitchell  <mark@codesourcery.com>
3055
3056         * cp-tree.h (begin_new_placement): Remove.
3057         (finish_new_placement): Likewise.
3058         * class.c (finish_struct_1): Don't suspend_momentary or
3059         resume_momentary.
3060         * decl.c (grokdeclarator): Likewise.
3061         (maybe_build_cleanup_1): Likewise.
3062         * except.c (push_eh_cleanup): Likewise.
3063         (build_terminate_handler): Likewise.
3064         * init.c (build_new_1): Likewise.
3065         * parse.y (parse_decl): Change prototype.
3066         (initdecls, notype_initdecls, initdcl): Don't return int.
3067         (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
3068         (.begin_new_placement): Remove.
3069         (.finish_new_placement): Likewise.
3070         (nonmomentary_expr): Likewise.
3071         (suspend_mom): Likewise.
3072         (condition): Don't suspend_momentary, resume_momentary, or keep
3073         track of need to resume.
3074         (unary_expr): Likewise.
3075         (new_placement): Likewise.
3076         (decl): Likewise.
3077         (structsp): Likewise.
3078         (new_type_id): Likewise.
3079         (maybe_parmlist): Likewise.
3080         (direct_after_type_declaration): Likewise.
3081         (direct_new_declarator): Likewise.
3082         (direct_abstract_declaration): Likewise.
3083         * parse.c: Regenerated.
3084         * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
3085         * semantics.c (begin_new_placement): Remove.
3086         (finish_new_placement): Likewise.
3087         
3088 1999-11-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3089
3090         * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
3091         (DECL_TEMPLATE_INFO): Use it.
3092         * decl.c (warn_extern_redeclared_static): Do nothing for
3093         TEMPLATE_DECLs.
3094         * decl2.c (mark_used): Explicitly check for function or variable.
3095         * semantics.c (finish_unary_op_expr): Check whether result is also
3096         an INTEGER_CST.
3097
3098 1999-11-05  Mark Mitchell  <mark@codesourcery.com>
3099
3100         * Makefile.in (typeck2.o): Depend on output.h.
3101         * typeck2.c: Include output.h.
3102
3103         * decl.c (flag_ansi): Remove declaration.
3104
3105         * pt.c (tinst_level_tick): Make it static.
3106         (last_template_error_tick): Likewise.
3107         
3108         * cp-tree.h (mapcar): Remove declaration.
3109         (search_tree): Likewise.
3110         (walk_tree_fn): New typedef.
3111         (walk_tree): New function.
3112         * tree.c (bot_manip): Change prototype.  Adjust to be called via
3113         walk_tree.
3114         (bot_replace): Likewise.
3115         (no_linkage_helper): Likewise.
3116         (copy_tree_r): New function.
3117         (search_tree): Rename, and adjust, to become ...
3118         (walk_tree): New function.
3119         (mapcar): Remove.
3120         (target_remap): Remove.
3121         (target_remap_count): Likewise.
3122         (break_out_target_exprs): Use walk_tree.
3123         * decl.c (local_variable_p): Change prototype.
3124         (check_default_argument): Use walk_tree.
3125         * pt.c (for_each_template_parm_r): New function, split out from ...
3126         (for_each_template_parm): Here.  Use it, via walk_tree.
3127         
3128 1999-11-03  Mark Mitchell  <mark@codesourcery.com>
3129
3130         * class.c (check_bitfield_decl): New function, split out from
3131         finish_stuct_1.
3132         (check_field_decl): Likewise.  Recursively examine members of
3133         anonymous structs.
3134         (finish_struct_1): Use them.
3135         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
3136         
3137 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
3138
3139         * decl.c (grokfndecl): Remove dead code.
3140
3141         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
3142
3143 1999-11-02  Scott Snyder  <snyder@fnal.gov>
3144
3145         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
3146         IMAGPART_EXPR.
3147         * pt.c (tsubst_copy): Likewise.
3148
3149 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
3150
3151         * decl2.c (maybe_make_one_only): Always make things comdat on
3152         ELF targets, too.
3153
3154 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
3155
3156         * decl.c (finish_function): Call free_after_parsing for functions
3157         we are not immediately turning into RTL.
3158
3159 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
3160
3161         * cp-tree.h (flag_dump_translation_unit): Add decl.
3162
3163 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
3164
3165         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
3166
3167 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
3168
3169         * decl.c (pop_cp_function_context): Don't call free on a NULL
3170         pointer.
3171         * semantics.c: Include ggc.h.
3172         (expand_body): Do garbage-collection after processing a template
3173         function.  Clear DECL_SAVED_TREE after generating RTL for a
3174         function.
3175         * Makefile.in (semantics.o): Depend on ggc.h.
3176         
3177 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
3178
3179         * cp-tree.h (make_typename_type): Change prototype.
3180         * decl.c (make_typename_type): Only complain if so requested.
3181         * parse.y (nested_name_specifier): Adjust calls.
3182         (typename_sub0): Likewise.
3183         (typename_sub1): Likewise.
3184         * parse.c: Regenerated.
3185         * pt.c (convert_template_argument): Pass complain to
3186         make_typename_type.
3187         (tsubst): Likewise.
3188         
3189 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
3190
3191         * semantics.c (finish_handler): End the scope of the handler
3192         before attaching it to the statement-tree.
3193
3194 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
3195
3196         * rtti.c (build_dynamic_cast_1): Give a better error message for
3197         an attempt to dynamic_cast from a non-polymorphic type.
3198
3199 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
3200
3201         * cp-tree.h (make_temp_vec): Remove.
3202         (make_scratch_vec): Likewise.
3203         * call.c (add_function_candidate): Use make_tree_vec.
3204         (add_conv_candidate): Likewise.
3205         (build_builtin_candidate): Likewise.
3206         (add_template_candidate_real): Likewise.
3207         * class.c (resolve_address_of_overloaded_function): Likewise.
3208         * decl.c (start_function): Don't fool with the momentary obstack.
3209         (finish_function): Likewise.
3210         * init.c (expand_direct_vtbls_init): Likewise.
3211         (begin_init_stmts): Likewise.
3212         (finish_init_stmts): Likewise.
3213         * pt.c (add_to_template_args): Use make_tree_vec.
3214         (check_explicit_specialization): Likewise.
3215         (coerce_template_parms): Likewise.
3216         (lookup_template_class): Don't fool with the momentary obstack.
3217         (instantiate_class_template): Likewise.
3218         (tsubst_template_arg_vector): Use make_tree_vec.
3219         (tsubst_aggr_type): Don't fool with the momentary obstack.
3220         (tsubst_decl): Likewise.  Use make_tree_vec.
3221         (try_one_overload): Likewise.
3222         (try_class_unification):  Don't fool with the momentary obstack.
3223         (get_bindings_real): Use make_tree_vec.
3224         (set_mangled_name_for_template_decl): Likewise.
3225         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
3226         * semantics.c (finish_expr_stmt): Likewise.
3227         (finish_do_stmt): Likewise.
3228         (finish_for_expr): Likewise.
3229         (finish_switch_cond): Likewise.
3230         (do_pushlevel): Likewise.
3231         (do_poplevel): Likewise.
3232         * tree.c (make_temp_vec): Remove.
3233         
3234         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
3235         CLEANUP_P for a TRY_BLOCK.
3236         * ir.texi: Document SAVE_EXPR.
3237
3238 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
3239
3240         * call.c (build_over_call):  Check that the built-in function is
3241         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
3242         * typeck.c (build_function_call_real): Similarly. 
3243
3244 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
3245
3246         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
3247         remember_end_note.
3248
3249 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
3250
3251         * decl.c (push_overloaded_decl_1): Use pushdecl.
3252         
3253         * decl.c (auto_function): Replace #ifdef'd __inline with just
3254         plain inline.
3255         * lex.c (my_get_run_time): Likeise.
3256         (yyprint): Likewise.
3257         (identifier_type): Likewise.
3258         * method.c (start_squangling): Likewise.
3259         (end_squangling): Likewise.
3260         (icat): Likewise.
3261         (old_backref_index): Likewise.
3262         (flush_repeats): Likewise.
3263         (issue_ktype): Likewise.
3264         * parse.y (empty_parms): Likewise.
3265         * parse.c: Regenerated.
3266         
3267 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
3268
3269         * dump.c (dequeue_and_dump): Replace several uses of
3270         queue_and_dump_index with dump_child.
3271
3272 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3273
3274         * expr.c: Include tm_p.h.
3275
3276 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
3277
3278         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
3279         (pushlevel_temporary): Remove.
3280         (add_scope_stmt): New function.
3281         * decl.c (pushlevel_temporary): Remove.
3282         (poplevel): Use add_scope_stmt.
3283         (start_decl_1): Likewise.
3284         * semantics.c (add_scope_stmt): New function.
3285         (do_pushlevel): Use it.
3286         (do_poplevel): Use it.
3287         (expand_stmt): Check SCOPE_PARTIAL_P.
3288         
3289         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
3290         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
3291         * expr.c (cplus_expand_expr): Expand it.
3292         * ir.texi: Document EMPTY_CLASS_EXPR.
3293         
3294 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
3295
3296         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
3297         parameters as having namespace scope.
3298
3299 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
3300
3301         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
3302         (mangling_flags): New type.
3303         (build_overload_int): Change prototype.
3304         (build_overload_value): Likewise.
3305         (numeric_output_need_bar): Improve comment.
3306         (mangle_expression): New function, broken out from ...
3307         (build_overload_int): Here.
3308         (build_overload_value): Adjust for use of mangling flags.  Don't
3309         warn about real-valued template parameters here.  Do handle
3310         complex expressions involving real-valued template parameters.
3311         (build_template_parm_names): Encase non-type template parameters
3312         in underscores, if necessary.
3313         (process_overload_item): Remove conditional on
3314         PARM_CAN_BE_ARRAY_TYPE.
3315
3316 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
3317
3318         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
3319
3320         * ir.texi: Clean up documentation of RETURN_INIT.
3321         
3322 1999-10-15  Greg McGary  <gkm@gnu.org>
3323
3324         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
3325         (lang_init): Set default for flag_bounds_check if still "unspecified".
3326
3327 1999-10-13  Andrew Haley  <aph@cygnus.com>
3328
3329         * class.c (finish_struct_1): Force alignment of non-bitfields to
3330         BITS_PER_UNIT.
3331
3332 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
3333
3334         * typeck2.c (process_init_constructor): Handle empty constructors.
3335
3336 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
3337
3338         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
3339
3340         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
3341         array error.
3342
3343 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
3344
3345         * decl.c (make_rtl_for_local_static): Don't create register RTL
3346         for addressable constants.
3347
3348 1999-10-13  Nathan Sidwell  <nathan@acm.org>
3349
3350         * cp-tree.h (build_x_va_arg): Prototype new function.
3351         * call.c (build_x_va_arg): Define it.
3352         * parse.y (unary_expr): Call build_x_va_arg.
3353         
3354         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
3355         * call.c (convert_type_from_ellipsis): Define it.
3356         * decl.c (init_decl_processing): Set lang_type_promotes_to.
3357
3358         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
3359
3360 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
3361
3362         * class.c (fixed_type_or_null): Always set *nonnull.
3363
3364 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3365
3366         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
3367         __GNUC__ and __GNUC_MINOR__.
3368
3369 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
3370
3371         * cp-tree.h (make_rtl_for_local_static): New function.  
3372         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
3373         local statics ...
3374         (make_rtl_for_local_static): Here.
3375         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
3376         
3377 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3378
3379         * method.c: Include tm_p.h.
3380
3381 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3382
3383         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
3384         * lex.c (cp_make_lake_type): Likewise.
3385         * tree.c (init_tree): Init make_lang_type_fn.
3386         
3387 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
3388
3389         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
3390         paramter.
3391         
3392         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
3393         local statics if we don't really have them.
3394
3395         * ir.texi: Improve documentation for STMT_EXPR.  Describe
3396         CLEANUP_POINT_EXPR.
3397
3398 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
3399
3400         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
3401
3402 1999-10-07  Greg McGary  <gkm@gnu.org>
3403
3404         * class.c (finish_struct_1): Use simpler method of
3405         removing elements of a singly-linked list which doesn't
3406         lose for classes without data members.
3407
3408 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
3409
3410         * friend.c (make_friend_class): Robustify.
3411
3412         * semantics.c (finish_object_call_expr): Reject calls to template
3413         types.
3414
3415 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
3416
3417         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
3418
3419         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
3420         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
3421         CLASSTYPE_VFIELD.
3422         * class.c (get_vfield_offset): Likewise.
3423         (finish_base_struct): Likewise.
3424         (modify_one_vtable): Likewise.
3425         (fixup_vtable_deltas): Likewise.
3426         (finish_struct_1): Likewise.
3427         * init.c (expand_virtual_init): Likewise.
3428         * search.c (lookup_field_1): Likewise.
3429         (expand_upcast_fixups): Likewise.
3430         * typeck.c (build_component_ref): Likewise.
3431         (build_binary_op_nodefault): Likewise.
3432         
3433         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
3434         * ir.texi: Document TYPE_VFIELD.
3435
3436 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
3437
3438         * decl.c (grokdeclarator): Only warn about non-zero arrays if
3439         !in_system_header (linux socketbits.h can give this for
3440         __cmsg_data, which is using a GNU extension).
3441
3442 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
3443
3444         * decl2.c (start_static_storage_duration_function): Push the
3445         function declaration so it ends up in namespace scope.
3446
3447         * dump.c (DUMP_CHILDREN): Remove.
3448         (DUMP_BINFO): Adjust.
3449         (struct dump_node_info): Remove dump_children_p.
3450         (queue_and_dump_type): Remove dump_children_p parameter.
3451         (queue): Don't set dump_children_p.
3452         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
3453         queue_and_dump_index.
3454         (dequeue_and_dump): Unconditionally print children.  Adjust calls
3455         to functions mentioned above.
3456         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
3457         
3458         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
3459         * dump.c (dequeue_and_dump): Dump them.
3460         
3461         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
3462
3463         * decl.c (start_function): Set current_in_charge_parm for
3464         constructors, too, where appropriate.
3465         * search.c (fixup_all_virtual_upcast_offsets): New function.
3466         (expand_indirect_vtbls_init): Use it.
3467         
3468 1999-10-04  Nathan Sidwell  <nathan@acm.org>
3469
3470         * decl2.c (grok_alignof): Don't decay lvalues.
3471         
3472         * init.c (build_new): Remove unused variable.
3473
3474 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
3475
3476         * cp-tree.h (struct language_function): Remove static_labelno.
3477         (static_labelno): Remove macro.
3478         * method.c (build_overload_nested_name): Make static_labelno
3479         static here.
3480         
3481         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
3482         to decide whether or not a function is defined.
3483
3484         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
3485         situations where make_node will do it automatically.
3486         * decl.c (grok_reference_init): Likewise.
3487         (expand_static_init): Likewise.
3488         (do_static_initialization): Likewise.
3489         * init.c (perform_member_init): Likewise.
3490         (expand_aggr_init_1): Likewise.
3491         (build_new_1): Likewise.
3492         * method.c (do_build_copy_constructor): Likewise.
3493         (do_build_assign_ref): Likewise.
3494         * search.c (expand_upcast_fixups): Likewise.
3495         * semantics.c (finish_stmt_expr): Likewise.
3496         * typeck.c (build_unary_op): Likewise.
3497         (check_return_expr): Likewise.
3498
3499 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
3500
3501         * init.c (build_vec_delete_1): Fold COND_EXPRs.
3502
3503 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
3504
3505         * cp-tree.def (VEC_INIT_EXPR): Remove.
3506         * cp-tree.h (struct stmt_tree): New type.
3507         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
3508         x_stmt_tree.
3509         (class_cache_firstobj): Remove.
3510         (struct language_function): Remove stmts_are_full_exprs_p,
3511         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
3512         (current_stmt_tree): New macro.
3513         (last_tree): Adjust.
3514         (last_expr_type): Likewise.
3515         (doing_semantic_analysis_p): Simplify.
3516         (stmts_are_full_exprs_p): Adjust.
3517         (begin_tree): Remove prototype.
3518         (end_tree): Likewise.
3519         (begin_stmt_tree): Change prototype.
3520         (finish_stmt_tree): Likewise.
3521         (building_stmt_tree): Simplify.
3522         * decl.c (mark_stmt_tree): New function.
3523         (mark_saved_scope): Use it.
3524         (start_function): Rearrange slightly to call begin_stmt_tree 
3525         earlier.
3526         (save_function_data): Tweak.
3527         (finish_function): Adjust call to finish_stmt_tree.
3528         (mark_lang_function): Use mark_stmt_tree.
3529         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
3530         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
3531         (build_vec_init): Remove creation of stand-in intializer.
3532         * pt.c (begin_tree): Remove.
3533         (end_tree): Likewise.
3534         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
3535         (begin_compound_stmt): Handle a compound-statement outside of a
3536         function.
3537         (begin_stmt_expr): Handle a statement-expression outsidef of a
3538         function.
3539         (finish_stmt_expr): Likewise.
3540         (begin_class_definition): Don't call begin_tree.
3541         (finish_inline_definitions): Don't call end_tree.
3542         (begin_stmt_tree): Take a pointer to tree, not a function as input.
3543         (finish_stmt_tree): Likewise.
3544         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
3545         (mapcar): Likewise.
3546         
3547         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
3548         * parse.c: Regenerated.
3549         
3550         * dump.c (dqueue_and_dump): Dump bitfieldness.
3551         
3552         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
3553         bitfields, rather than DECL_BIT_FIELD.
3554         * ir.texi: Document how to tell whether or not a field is a
3555         bitfield.
3556         
3557         * lex.c (make_lang_type): Fix typo in comment.
3558
3559 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
3560
3561         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
3562
3563 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
3564
3565         * pt.c (tsubst_decl): If the type of a template instantiation is
3566         bogus, so is the whole instantiation.
3567
3568 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
3569
3570         * decl.c (initialize_local_var): Handle static variables here.
3571         (cp_finish_decl): Tweak handling of function-scope static
3572         variables.
3573         * semantics.c (expand_stmt): Handle DECL_STMTs for static
3574         variables.
3575
3576         * method.c (emit_thunk): Don't crash when -fsyntax-only.
3577
3578         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
3579         global_dtor_p.  Add init_priority.
3580         (DECL_ACCESS): Adjust accordingly.
3581         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
3582         (GLOBAL_INIT_PRIORITY): Likewise.
3583         * decl.c (lang_mark_tree): Adjust accordingly.
3584         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
3585         and GLOBAL_INIT_PRIORITY.
3586         * dump.c (dequeue_and_dump): Print them.
3587         * ir.texi: Document them.
3588
3589         * decl2.c (struct priority_info_s): Remove initialization_sequence
3590         and destruction_sequence.
3591         (start_static_storage_duration_function): Return the body of the
3592         function.  Convert for function-at-a-time mode.
3593         (generate_inits_for_priority): Remove.
3594         (finish_static_storage_duration_function): Change prototype.
3595         Adjust for function-at-a-time mode.
3596         (do_static_initialization): Likewise.
3597         (do_static_destruction): Likewise.
3598         (do_static_initialization_and_destruction): Remove.
3599         (start_static_initialization_or_destruction): New function.
3600         (finish_static_initialization_or_destruction): Likewise.
3601         (get_priority_info): Don't manipulation initialization_sequence or
3602         destruction_sequence.
3603         (prune_vars_needing_no_initialization): New function.
3604         (write_out_vars): Likewise.
3605         (finish_file): Use the various new functions instead of the old.
3606         
3607 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
3608
3609         * cp-tree.h (warn_float_equal): Declare.
3610         * decl2.c (warn_float_equal): Define.
3611         (lang_decode_option): Recognize -W[no-]float-equal.
3612         * typeck.c (build_binary_op_nodefault): Conditionally warn
3613         about equality tests of floating point types.
3614
3615 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
3616
3617         Support normal type_info-based EH mechanisms with -fno-rtti.
3618         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
3619         (build_eh_type_type_ref): Likewise.
3620         (build_eh_type): Remove.
3621         (expand_throw): Call build_eh_type_type, not build_eh_type.
3622         * decl2.c (import_export_decl): Don't associate the tinfo fn with
3623         the vtable if -fno-rtti.
3624         * decl.c (init_decl_processing): Always init_rtti_processing.
3625
3626         * rtti.c (get_typeid): Don't complain about -fno-rtti.
3627
3628         * class.c (class_cache_obstack, class_obstack): Remove.
3629         (init_class_processing): Don't initialize class_obstack.
3630         (push_cache_obstack): Remove.
3631         (pushclass): Don't call it.
3632         * cp-tree.h: Remove prototype for push_cache_obstack.
3633         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
3634         (pushlevel_class): Don't push_decl_level.
3635         (poplevel_class): Don't pop_stack_level.
3636         (push_class_level_binding): Don't push_cache_obstack.
3637         (init_decl_processing): Don't intialize decl_obstack.
3638         * search.c (push_class_decls): Don't push_cache_obstack.
3639         * tree.c (list_hash_add): Put hash node on permanent_obstack.
3640         (hash_tree_cons): Don't mess with obstacks.
3641         (print_lang_statistics): Don't print stats for class_obstack and
3642         decl_obstack.
3643
3644 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
3645
3646         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
3647         * ir.texi: Document DECL_EXTERNAL.
3648
3649         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
3650         * ir.texi: Document THUNK_DECLs.
3651
3652         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
3653         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
3654         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
3655         * error.c (dump_template_bindings): Remove unused parameter.
3656         Handle multiple levels of template parameters.
3657         (dump_template_decl): Use `parms', not `args', for template
3658         parameters.  Fix thinko.
3659         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
3660         flags to dump_template_bindings.
3661         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
3662         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
3663         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
3664         (tsubst_copy): Clarify variable name.
3665         (most_general_template): Robustify.
3666         
3667 1999-09-29  Nathan Sidwell  <nathan@acm.org>
3668
3669         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
3670         to change primary template rendering.
3671
3672 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
3673
3674         * cp-tree.h (UPT_TEMPLATE): Remove.
3675         (UPT_PARMS): Likewise.
3676         (DECL_NEEDED_P): New macro.
3677         * decl2.c (finish_vtable_vardecl): Use it.
3678         (finish_objects): Don't crash with -fsyntax-only.
3679         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
3680         -fsyntax-only.
3681         * pt.c (tsubst_friend_function): Remove FIXME that talks about
3682         obstacks.
3683         (tsubst_expr): Correct handling of function try-blocks.
3684         * semantics.c: Include flags.h.
3685         (expand_body): Don't do RTL generation if -fsyntax-only.
3686         * Makefile.in (semantics.o): Depends on flags.h.
3687         
3688 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
3689
3690         * pt.c (most_general_template): Adjust declaration.
3691
3692         * cp-tree.h: (most_general_template): Declare.
3693
3694         * error.c (dump_template_value): Rename to ...
3695         (dump_template_argument): This.
3696         (dump_template_argument_list): New function.
3697         (dump_type): Use it.
3698         (dump_template_parameter): New function.
3699         (dump_template_decl): Use it.
3700         (dump_template_bindings): New function.
3701         (dump_function_decl): Use it. Pretty print function template
3702         instantiations.
3703
3704 1999-09-28  Nathan Sidwell  <nathan@acm.org>
3705
3706         * decl.c (grokdeclarator): Distinguish parameter context for
3707         diagnostics. Tidy up missing type diagnostic.
3708         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
3709
3710 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
3711
3712         * ir.texi: Improve documentation for TARGET_EXPR.
3713
3714 1999-09-27  Nathan Sidwell  <nathan@acm.org>
3715
3716         Augment stringification of trees.
3717         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
3718         (fndecl_as_string, type_as_string_real, args_as_string,
3719         code_as_string, language_as_string, parm_as_string,
3720         op_as_string, assop_as_string, cv_as_string): Remove.
3721         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
3722         (context_as_string): Declare new function.
3723         * error.c (cp_printers): Move definition.
3724         (OB_UNPUT): Remove.
3725         (OB_END_TEMPLATE_ID): Adjust.
3726         (interesting_scope_p): Remove.
3727         (dump_scope): New static function.
3728         (dump_qualifiers): Adjust prototype, reimplement.
3729         (dump_template_value): Use tree_string_flags.
3730         (dump_type_real): Move back to dump_type.
3731         (dump_type): Adjust prototype. Use tree_string_flags.
3732         (dump_aggr_type): Likewise. Use dump_template_parms.
3733         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
3734         Return pad flag.
3735         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
3736         (dump_simple_decl): Likewise.
3737         (dump_decl): Likewise. Use dump_template_decl.
3738         (dump_template_decl): New static function broken out of dump_decl.
3739         (dump_function_decl): Adjust prototype. Use tree_string_flags.
3740         (dump_parameters): Likewise. Prefix space.
3741         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
3742         (dump_function_name): Likewise. Use dump_template_parms.
3743         (dump_template_parms): New static function broken out of
3744         dump_function_name.
3745         (dump_expr_list): Adjust prototype. Use tree_string_flags.
3746         (dump_expr): Likewise.
3747         (fndecl_as_string): Removed
3748         (type_as_string_real): Removed
3749         (dump_binary_op): Adjust prototype. Use tree_string_flags.
3750         (dump_unary_op): Likewise.
3751         (type_as_string): Likewise.
3752         (expr_as_string): Likewise.
3753         (decl_as_string): Likewise.
3754         (context_as_string): New function.
3755         (lang_decl_name): Adjust.
3756         (decl_to_string): New static print callback.
3757         (expr_to_string): Likewise.
3758         (fndecl_to_string): Likewise.
3759         (code_as_string): Renamed to ...
3760         (code_to_string): ... here. Adjust.
3761         (language_as_string): Renamed to ...
3762         (language_to_string): ... here. Adjust.
3763         (parm_as_string): Renamed to ...
3764         (parm_to_string): ... here.
3765         (op_as_string): Renamed to ...
3766         (op_to_string): ... here.
3767         (assop_as_string): Renamed to ...
3768         (assop_to_string): ... here.
3769         (type_to_string): New static print callback.
3770         (args_as_string): Renamed to ...
3771         (args_to_string): ... here. Adjust.
3772         (cv_as_string): Renamed to ...
3773         (cv_to_string): ... here. Adjust.
3774         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
3775         (print_template_context): Likewise.
3776
3777 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
3778
3779         * cp-tree.h (expand_throw): Remove prototype.
3780         * except.c (expand_throw): Make it static.  Use tree-generation
3781         functions, rather than RTL-generation functions.
3782         (build_throw): Use it.
3783         * expr.c: Include except.h.
3784         (cplus_expand_expr): Don't call expand_throw here.
3785         * Makefile.in (expr.o): Depend on except.h.
3786         * ir.texi: Update documentation for THROW_EXPR.
3787         
3788         * decl.c (start_function): Set x_dont_save_pending_sizes rather
3789         than calling get_pending_sizes.
3790         * init.c (build_new): Don't save and restore
3791         immediate_size_expand; instead, assert that it has the expected
3792         value already.
3793
3794 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3795
3796         * lex.c (compiler_error): Add missing call to va_end().
3797
3798 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
3799
3800         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
3801         * ir.texi: Document RESULT_DECL and DECL_RESULT.
3802
3803         * cp-tree.h (check_return_expr): New function.
3804         * decl.c (finish_constructor_body): New function.
3805         (pushdecl): Put global friend functions in namespace binding
3806         level, not the class binding level.
3807         (finish_destructor_body): Make sure the dtor_label is always
3808         defined.  Fix typo in comment.
3809         (finish_function): Move generation of constructor-termination code
3810         to semantic-analysis time.  Move generation of implicit `main'
3811         return value to semantic-analysis time.
3812         * semantics.c (finish_return_stmt): Generate goto's to
3813         ctor_label/dtor_label here.  Use check_return_expr to do semantic
3814         analysis on the returned expression.
3815         * typeck.c (maybe_warn_about_returning_address_of_local): New
3816         function split out from c_expand_return.
3817         (check_return_expr): Likewise.
3818         (c_expand_return): Just generate the RTL for the return.
3819         
3820 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
3821
3822         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
3823         (cleanup_type): Likewise.
3824         (search_tree): Change prototype.
3825         * decl.c (local_variable_p): Adjust for new interface to
3826         search_tree.
3827         (check_default_argument): Likewise.
3828         * error.c (dump_expr): Handle INIT_EXPR.
3829         * except.c (expand_throw): Don't make cleanup_type a local static.
3830         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
3831         * init.c (build_new): Call build_new_1 directly, rather than
3832         building a NEW_EXPR.
3833         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
3834         processing file-scope initializers.
3835         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
3836         * tree.c: Include splay-tree.h
3837         (no_linkage_helper): Adjust for new interface to search_tree.
3838         (search_tree): Pass around pointers to tree nodes, rather than the
3839         nodes themselves.  Handle VEC_INIT_EXPR.
3840         (no_linkage_check): Adjust for new interface to search_tree.
3841         (mapcar): Handle VEC_INIT_EXPR.
3842         (target_remap): New variable.
3843         (bot_manip): Use it.
3844         (bot_replace): New function.
3845         (break_out_target_exprs): Use it to remap all variables used in a
3846         default argument expression.
3847         * typeck.c (build_modify_expr): Don't crash when outside a
3848         function and presented with an INIT_EXPR assignment
3849         * Makefile.in (tree.o): Depend on splay-tree.h.
3850
3851 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3852
3853         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
3854         DECL_BUILT_IN.
3855         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
3856         callers changed.
3857         Set the builtin's DECL_BUILT_IN_CLASS.
3858
3859 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
3860
3861         * decl.c (pushdecl): Don't make local declarations of extern
3862         variables give the variable a DECL_CONTEXT for the function.
3863         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
3864         Don't accidentally make RTL for local declarations.
3865         (emit_local_var): Handle declarations with asm-specifiers here.
3866         
3867 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
3868
3869         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
3870         STMT_IS_FULL_EXPR_P.
3871
3872         * cp-tree.h (language_function): Add cannot_inline.
3873         * decl.c (start_function): Restore current_function_cannot_inline
3874         from the saved value.
3875         (save_function_data): Save current_function_cannot_inline.
3876         * decl2.c (start_objects): Change prototype.  Build the function
3877         in function-at-a-time mode.
3878         (finish_objects): Likewise.
3879         (generate_ctor_or_dtor_function): Adjust accordingly.
3880         
3881         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
3882         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
3883         Don't call expand_anon_union_decl here
3884         * semantics.c (exapnd_stmt): Call it here, instead.
3885         * typeck.c (mark_addressable): Addressed variables are implicitly
3886         used.
3887         
3888 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3889
3890         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
3891         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
3892         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
3893         * cp-tree.h: Add tree checking macros to various tree access
3894         macros. 
3895         * ptree.c (print_lang_decl): Test for function or variable
3896         before accessing template info.
3897
3898 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
3899
3900         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
3901         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
3902         * decl2.c (lang_f_options): Add -fshort-wchar.
3903         * cp-tree.h: Declare flag_short_wchar.
3904         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
3905         int' for wchar_t.
3906
3907 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3908
3909         * ir.texi: Fix formatting errors and typos.
3910
3911 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
3912
3913         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
3914
3915         * decl.c (pushdecl): Do create a binding for extern "C" functions,
3916         but not for their DECL_ASSEMBLER_NAMEs.
3917         (lookup_name_current_level): Fix formatting.
3918         (xref_tag): Likewise.
3919         * decl2.c (start_objects): Mark static constructors and
3920         destructors as used.
3921
3922 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
3923
3924         * decl.c (define_case_label): Don't crash if we're not in a switch.
3925
3926         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
3927         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
3928         for unsupported flags.
3929
3930 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
3931
3932         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
3933         Accept and warn about -fthis-is-variable.
3934
3935 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
3936
3937         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
3938         CLEANUP_STMT, and SCOPE_STMT.
3939
3940         * decl2.c (lang_decode_option): Adjust, in the wake of recent
3941         changes to option processing.
3942
3943 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3944
3945         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
3946         function pointer from pmfs with no object given.
3947         (convert_for_assignment): Do not return error when converting
3948         pmfs.
3949
3950 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
3951
3952         * lex.c (internal_filename): New variable.
3953         (INTERNAL_FILENAME): New macro.
3954         (init_parse): Allocate internal_filename and mark as root.  Use it
3955         instead of a string constant.
3956
3957 1999-09-21  Nathan Sidwell  <nathan@acm.org>
3958
3959         Reimplement dynamic cast and catch matching.
3960         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
3961         * search.c (dynamic_cast_base_recurse): New function.
3962         (get_dynamic_cast_base_type): New function for dynamic cast.
3963         * rtti.c (build_dynamic_cast_1): Determine source and target
3964         class relationship. Call __dynamic_cast_2.
3965         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
3966         (__user_type_info::dyncast): New dynamic cast dispatcher.
3967         (__user_type_info::sub_kind): New nested enumeration.
3968         (__user_type_info::contained_p): sub_kind predicate.
3969         (__user_type_info::contained_public_p): Likewise.
3970         (__user_type_info::contained_nonpublic_p): Likewise.
3971         (__user_type_info::contained_nonvirtual_p: Likewise.
3972         (__user_type_info::upcast_result): New nested struct.
3973         (__user_type_info::dyncast_result): New nested struct.
3974         (*::do_upcast): New catch function.
3975         (*::do_dyncast): New dynamic cast function.
3976         (__user_type_info::find_public_subobj): New dynamic cast
3977         helper dispatcher.
3978         (*::do_find_public_subobj): New dynamic cast helper function.
3979         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
3980         (__user_type_info::dyncast): Define dynamic cast dispatcher.
3981         (*::do_upcast): Define catch function.
3982         (*::do_dyncast): Define dynamic cast function.
3983         (*::do_find_public_subobj): Define dynamic cast helper function.
3984         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
3985         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
3986         (__dynamic_cast_2): New dynamic cast runtime.
3987
3988 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
3989
3990         * cp-tree.h (finish_stmt_expr): Change prototype.
3991         * expr.c (cplus_expand_expr): Adjust call accordingly.
3992         * init.c (finish_init_stmts): Likewise.
3993         * parse.y (primary): Likewise.
3994         * pt.c (tsubst_copy): Likewise.
3995         * semantics.c (finish_stmt_expr): Don't take two parameters.
3996         Don't remove generated BLOCKs from the block-tree.
3997
3998         Remove support for assigning to `this'.
3999         * NEWS: Note that fact.
4000         * class.c (build_vbase_path): Don't check flag_this_is_variable.
4001         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
4002         (language_function): Remove assigns_this, just_assigned_this, and
4003         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
4004         (base_init_expr): Remove.
4005         (current_vcalls_possible_p): New macro.
4006         (vtbls_set_up_p): Likewise.
4007         (emit_base_init): Change prototype.
4008         * decl.c (finish_destructor_body): New function, split out from
4009         finish_function.
4010         (current_function_assigns_this): Remove.
4011         (current_function_just_assigned_this): Likewise.
4012         (start_function): Don't set them.
4013         (finish_function): Don't check them.  Don't emit
4014         base-initialization code here.  Generate code for destructors when
4015         doing semantic analysis.
4016         (finish_stmt): Don't check current_function_just_assigned_this.
4017         * decl2.c (lang_f_options): Remove this-is-variable.
4018         (lang_decode_option): Likewise.
4019         (grokclassfn): Don't check flag_this_is_variable.
4020         * init.c (emit_base_init): Return the expression generated.
4021         (construct_virtual_bases): Don't push/pop obstacks.  Fix
4022         typo.
4023         (build_new_1): Don't check flag_this_is_variable.
4024         (get_temp_regvar): Don't set DECL_REGISTER.
4025         (build_vec_init): Don't call use_variable.
4026         * lang-options.h: Remove "-fthis-is-variable" and
4027         "-fno-this-is-variable".
4028         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
4029         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
4030         expand_expr_stmt.
4031         * semantics.c (finish_expr_stmt_real): Rename to ...
4032         (finish_expr_stmt): This.  Remove assigned_this parameter.
4033         (begin_if_stmt): Call do_pushlevel before starting the statement.
4034         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
4035         blocks.
4036         (setup_vtbl_ptr): Emit initialization code for bases and members
4037         at semantic-analysis time.  Emit code to initialize vtables in
4038         destructors here.
4039         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
4040         Don't handle CTOR_INITIALIZER any more.
4041         * typeck.c (build_modify_expr): Don't check for assignments to
4042         this.
4043         (c_expand_return): Don't suggest assigning to `this'.
4044         
4045         * Makefile.in (decl.o): Depend on RTL_H.
4046         (decl2.o): Likewise.
4047         (class.o): Likewise.
4048         (call.o): Likewise.
4049         (method.o): Likewise.
4050         (search.o): Likewise.
4051         (tree.o): Likewise.
4052         (pt.o): Likewise.
4053
4054         * decl.c (duplicate_decls): When a builtin function is redeclared
4055         as static, make sure it is mangled correctly.
4056
4057         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
4058         detail about the statement-tree.
4059         
4060 1999-09-20  Nathan Sidwell  <nathan@acm.org>
4061
4062         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
4063
4064 1999-09-20  Nick Clifton  <nickc@cygnus.com>
4065
4066         * decl2.c (lang_decode_option): Extend comment.
4067
4068 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
4069
4070         * typeck.c: Include "tm_p.h".
4071
4072 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
4073
4074         * ir.texi: New file.
4075
4076 1999-09-19  Paul Burchard <burchard@pobox.com>
4077
4078         * semantics.c (expand_stmt): Initialize return value.
4079
4080 1999-09-18  Paul Burchard <burchard@pobox.com>
4081
4082         * gxxint.texi: G++ now implements namespaces.
4083         
4084 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
4085
4086         * decl.c (pop_label): Don't warn about unused labels more than
4087         once.
4088         * semantics.c (finish_goto_stmt): Always marked used labels as
4089         used.
4090
4091         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
4092         even when the declaration is external.
4093         (cp_finish_decl): Adjust call to layout_var_decl.
4094         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
4095
4096 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4097
4098         * typeck.c (get_member_function_from_ptrfunc): Always consider
4099         virtuality inside member pointer.
4100
4101 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
4102
4103         Turn on function-at-a-time processing.  
4104         * cp-tree.h (doing_semantic_analysis_p): New macro.
4105         (SF_DEFAULT): Define to zero, not SF_EXPAND.
4106         (start_handler_parms): Change prototype.
4107         (expand_start_catch_block): Likewise.
4108         (expand_end_catch_block): Likewise.
4109         (expand_start_eh_spec): Likewise.
4110         (expand_end_eh_spec): Declare.
4111         (finish_handler_parms): Change prototype.
4112         (begin_catch_block): Declare.
4113         (finish_handler): Change prototype.
4114         (do_pushlevel): Declare.
4115         (do_poplevel): Likewise.  
4116         * decl.c (pushlevel): Don't create
4117         binding levels when not doing semantic analysis.
4118         (poplevel): Don't pop them.
4119         (pushdecl): Assert that we are never called when not doing
4120         semantic analysis.
4121         (pushdecl_top_level): Use push_to_top_level.
4122         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
4123         label when expanding.
4124         (cp_finish_decl): Only inject for-scope variables when doing
4125         semantic analysis.  Add comments.
4126         (start_handler_parms): Return the handler parm.
4127         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
4128         already set.  Reinitialize from saved function data if available.
4129         Don't pushlevel when not doing semantic analysis.
4130         (store_parm_decls): Only generate RTL when expanding.  Only
4131         pushdecl when doing semantic analysis.  Set
4132         current_eh_spec_try_block if appropriate.
4133         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
4134         Combine common code.  Don't poplevel when not doing semantic
4135         analysis.
4136         (push_cp_function_context): Don't expand functions without an
4137         explicit call to expand_body.
4138         (mark_lang_function): Make eh_spec_try_block and
4139         x_scope_stmt_stack.  
4140         * except.c (expand_end_eh_spec): Don't
4141         declare.
4142         (process_start_catch_block): Likewise.
4143         (push_eh_cleanup): Use finish_decl_cleanup.
4144         (initialize_handler_parm): New function.
4145         (expand_start_catch_block): Use it.
4146         (expand_end_catch_block): Use tree-generation functions, not
4147         RTL-generation functions.
4148         (expand_start_eh_spec): Likewise.
4149         (expand_end_eh_spec): Likewise.
4150         (expand_exception_blocks): Simplify.
4151         (start_anon_func): Use do_pushlevel.
4152         (end_anon_func): Use do_poplvel.  Call expand_body for the
4153         function.  
4154         * expr.c (do_case): Don't call define_case_label.  
4155         * init.c (create_temporary_var): Set DECL_CONTEXT for local
4156         variables.  
4157         * method.c (emit_thunk): Call expand_body for the
4158         thunk.
4159         (sythesize_method): Likewise.  
4160         * parse.y (handler_args): Give it ttype.
4161         (eat_saved_input): Call expand_body.
4162         (base_init): Use do_pushlevel.
4163         (pending_inline): Call expand_body.
4164         (handler): Adjust calls to finish_handler_parms and
4165         finish_handler.
4166         (handler_args): Don't call expand_start_catch_block.  Return the
4167         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
4168         * parse.c: Regenerated.
4169         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
4170         * semantics.c (do_pushlevel): Give it external linkage.  Build
4171         SCOPE_STMTs.
4172         (do_poplevel): Likewise.
4173         (finish_case_label): Call define_case_label when doing semantic
4174         analysis.
4175         (finish_goto_stmt): Create RTL for labels.
4176         (finish_function_try_block): Set in_function_try_handler
4177         unconditionally.
4178         (finish_function_handler_sequence): Unset it.
4179         (finish_handler_parms): Use expand_start_catch_block even when
4180         building a statement-tree.
4181         (begin_catch_block): New function.
4182         (finish_handler): Move a little RTL-generation logic here.
4183         (finish_decl_cleanup): Allow cleanups for empty declarations.
4184         (finish_named_return_value): Don't pushdecl when not doing
4185         semantic analysis.
4186         (expand_stmt): Don't do semantic analysis for variable
4187         declarations.  Handle START_CATCH_STMT.  Call expand_label
4188         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
4189         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
4190         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
4191         RETURN_INIT and function try blocks.
4192         
4193         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
4194         x_scope_stmt_stack.  Add x_in_charge_parm.
4195         (current_eh_spec_try_block): New macro.
4196         (current_scope_stmt_stack): Likewise.
4197         (current_in_charge_parm): Likewise.
4198         * decl.c (start_function): Initialize current_in_charge_parm.
4199         (finish_function): Use current_in_charge_parm rather than looking
4200         up __in_chrg.
4201         * search.c (expand_indirect_vtbls_init): Likewise.
4202
4203         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
4204         (TRY_BLOCK): Likewise.
4205         (HANDLER): Likewise.
4206         (START_CATCH_STMT): New tree node.
4207         (SCOPE_STMT): Likewise.
4208         * cp-tree.h (SCOPE_BEGIN_P): New macro.
4209         (SCOPE_NULLIFIED_P): Likewise.
4210         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
4211         (struct lang_decl): Add saved_language_function.
4212         (DECL_PENDING_INLINE_INFO): Adjust documentation.
4213         (DECL_PENDING_INLINE_P): New macro.
4214         (TYPE_TI_ARGS): Fix typo in comment.
4215         (DECL_SAVED_TREE): Add to documentation.
4216         (DECL_SAVED_FUNCTION_DATA): New macro.
4217         (START_CATCH_TYPE): Likewise.
4218         (SCOPE_END_P): New macro.
4219         (declare_parm_level): Don't declare.
4220         * decl.c (mark_lang_function): New function, split out from
4221         mark_cp_function_context.
4222         (save_function_data): New function.
4223         (declare_parm_level): Remove.
4224         (finish_function): Use save_function_data to squirrel away
4225         important stuff for later use.
4226         (mark_cp_function_context): Use mark_function_data.
4227         (lang_mark_tree): Likewise.
4228         * lex.c (begin_definition_of_inclass_inline): Set
4229         DECL_PENDING_INLINE_P.
4230         (store_pending_inline): Clear it.
4231         * pt.c (tsubst_decl): Likewise.
4232
4233 1999-09-17  Nathan Sidwell  <nathan@acm.org>
4234
4235         * call.c (perform_implicit_conversion): Deal with error_mark_node.
4236
4237 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
4238
4239         * decl.c (warn_extern_redeclared_static): Don't get confused by
4240         static member functions.
4241         (duplicate_decls): Merge DECL_THIS_STATIC.
4242
4243         * decl.c (expand_static_init): Make sure assignments to local
4244         statics actually occur.
4245
4246 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
4247
4248         * cp-tree.h (poplevel_class): Declare.
4249         * class.c (popclass): Use poplevel_class, not poplevel.
4250         * decl.c (poplevel_class): Don't make it static.  Don't return a
4251         value.
4252         (poplevel): Don't call poplevel_class; abort in a class
4253         binding level is seen.
4254         * semantics.c (finish_translation_unit): Use pop_everything.
4255         * parse.y (member_init): Allow errors.
4256         (pending_inline): Call finish_function.
4257         * parse.c: Regenerated.
4258         * Makefile.in (CONFLICTS): Adjust.
4259
4260 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
4261         
4262         * error.c: Reduce code duplication.
4263         (dump_template_value): New function.
4264         (dump_type_real): Use it.
4265         (dump_decl): Likewise.
4266         (dump_function_name): Likewise.
4267         (dump_function_decl): Don't be too talkative about function return
4268         type variety.
4269
4270 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4271
4272         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
4273
4274         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
4275
4276 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
4277
4278         * decl2.c (finish_file): Also call check_global_declarations for
4279         the pending_statics list.
4280
4281 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
4282
4283         * lex.c (cp_pragma_implementation): Allow #pragma implementation
4284         in header files.
4285
4286 1999-09-15  Richard Henderson  <rth@cygnus.com>
4287
4288         * lex.c (mark_impl_file_chain): Follow the next chain.
4289
4290 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
4291
4292         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
4293         problems with extern "C" functions redeclared as static.
4294         (duplicate_decls): When a builtin is redeclared static, make the
4295         new function have internal linkage.
4296         
4297 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
4298
4299         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
4300         * pt.c (tsubst_copy): Likewise.
4301         * tree.c (search_tree): Likewise.
4302         (mapcar): Likewise.
4303
4304 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4305
4306         * typeck2.c (ack): Don't declare progname.
4307
4308 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
4309
4310         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
4311         filenames with ggc_alloc_string.
4312
4313 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
4314
4315         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
4316         TARGET_EXPR.
4317         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
4318         the TARGET_EXPR.
4319         * cvt.c (build_up_reference): Likewise.
4320         * tree.c (build_cplus_new): Likewise.
4321         (get_target_expr): Likewise.
4322         
4323 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
4324
4325         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
4326
4327 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
4328
4329         * cp-tree.h (build_target_expr): New function.
4330         * call.c (build_conditional_expr): Use build_target_expr.
4331         (convert_like): Likewise.
4332         (build_over_call): Likewise.
4333         * cvt.c (build_up_reference): Likewise.
4334         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
4335         (destroy_local_var): Here.
4336         (build_target_expr): New function.
4337         * tree.c (build_cplus_new): Use it.
4338         (get_target_expr): Likewise.
4339
4340 1999-09-13  Nathan Sidwell  <nathan@acm.org>
4341
4342         * typeck.c (expr_sizeof): Don't decay arrays and functions.
4343         Remove misleading comment.
4344         (build_compound_expr): Don't decay arrays.
4345
4346 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
4347
4348         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
4349         class rvalues again.
4350
4351 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4352
4353         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
4354
4355         * g++spec.c: Include gcc.h.
4356         (lang_specific_driver): Constify a char*.  Call xcalloc, not
4357         xmalloc/bzero.  All calls to the function pointer parameter now
4358         explicitly call `fatal'.
4359
4360 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
4361
4362         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
4363         * cvt.c (ocp_convert): Complete the from and destination types.
4364         Adjust warning about functions always being `true' in conditionals.
4365         * decl.c (duplicate_decls): Don't play funny games with abort.
4366         * error.c (dump_expr): Handle OVERLOADs.
4367         * spew.c (probe_obstack): Remove.
4368         * typeck.c (condition_conversion): Use perform_implicit_conversion.
4369         
4370 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
4371
4372         * cp-tree.h (auto_function, define_function): Adjust prototypes.
4373         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
4374         changed.
4375         (auto_function): Likewise, for CODE arg.
4376         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
4377         (builtin_function): ... here.
4378
4379 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
4380
4381         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
4382         (init_decl_processing): Don't set TREE_PERMANENT for the
4383         error_mark_node.
4384         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
4385         (grokdeclarator): Likewise.
4386         (grokparms): Don't check TREE_PERMANENT when building up lists.
4387         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
4388         (mark_inline_for_output): Likewise.
4389         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
4390         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
4391         * lex.c (check_newline): Don't check ggc_p; it is always one.
4392         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
4393         * spew.c (yylex): Don't copy_node or probe_obstacks for
4394         non-permanent CONSTANTs and STRINGs.
4395         * tree.c (build_cplus_array_type_1): Don't fuss with
4396         TREE_PERMANENT on ARRAY_TYPEs.
4397         
4398         * cp-tree.def (CLEANUP_STMT): New node.
4399         * cp-tree.h (language_function): Add name_declared.
4400         (current_function_name_declared): New macro.
4401         (CLEANUP_DECL): New macro.
4402         (CLEANUP_EXPR): Likewise.
4403         (emit_local_var): Likewise.
4404         (finish_decl_cleanup): New function.
4405         * cvt.c (build_up_reference): Simplify.
4406         (ocp_convert): Remove dead code.
4407         * decl.c (start_decl): Remove call to add_decl_stmt.
4408         (grok_reference_init): Adjust, to handle bindings temporaries to
4409         references.  Remove dead code.
4410         (initialize_local_var): Don't generate RTL for
4411         declarations here, or build cleanups here.  Don't fuss with
4412         obstacks.  Replace expand_start_target_temps calls with explicit
4413         setting of stms_are_full_exprs_p.
4414         (destroy_local_var): New function.
4415         (emit_local_var): Likewise.
4416         (cp_finish_decl): Use them, as appropriate.
4417         (start_function): Announce template functions.
4418         (store_parm_decls): Don't call declare_function_name here.
4419         (finish_stmt): Don't start emit base-initialization code when just
4420         building the statement-tree.
4421         * init.c (create_temporary_var): Move add_decl_stmt call ...
4422         (get_temp_regvar): Here.
4423         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
4424         cp_finish_decl would expect.  Don't call add_decl_stmt.
4425         * semantics.c (begin_compound_stmt): Call declare_function_name,
4426         if appropriate.
4427         (finish_decl_cleanup): New function.
4428         (expand_stmt): Use emit_local_var to output variables.          
4429         (expand_body): Set current_funtion_name_declared.
4430         
4431 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
4432
4433         * cp-tree.h (finish_cleanup_try_block): New function.
4434         * semantics.c (finish_cleanup_try_block): Add comment.
4435
4436 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
4437
4438         * cp-tree.h: Delete declarations for all tree nodes now moved to
4439         global_trees.
4440         * decl.c: Delete their definitions.
4441         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
4442         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
4443         provide defaults.
4444         (init_decl_processing): Call build_common_tree_nodes and
4445         build_common_tree_nodes_2 instead of building their nodes here.
4446         Don't add gc roots for them.
4447
4448 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
4449
4450         * cp-tree.h (language_function): Rename expanding_p to
4451         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
4452         (expanding_p): Adjust accordingly.
4453         (TREE_VIA_PRIVATE): Fix typo in comment.
4454         (DECL_REFERENCE_SLOT): Remove.
4455         (SET_DECL_REFERENCE_SLOT): Likewise.
4456         * decl.c (named_label_uses): Adjust. Remove chicken comment.
4457         (push_overloaded_decl): Don't truncate the chain of bindings when
4458         adding an overloaded function.
4459         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
4460         (initialize_local_var): Fix typo in comment.
4461         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
4462         * decl2.c (start_objects): Make the fact that we are expanding
4463         the generated function right away explicit.
4464         (start_static_storage_duration_function): Likewise.
4465         (finish_file): Fix typo in comment.
4466         * init.c (build_vec_init): Correct bugs in handling cleanups.
4467         * semantics.c (maybe_convert_cond): New function.
4468         (FINISH_COND): Always store the condition, even if there's
4469         a declaration.
4470         (finish_if_stmt_cond): Use maybe_convert_cond.
4471         (finish_while_stmt_cond): Likewise.
4472         (finish_do_stmt): Likewise.
4473         (finish_for_cond): Likewise.
4474         (expand_cond): Adjust.
4475         
4476         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
4477         * init.c (perform_member_init): Remove obstack machinations.
4478         (expand_cleanup_for_base): Likewise.
4479         (finish_init_stmts): Mark the statement-expression as used.
4480         * method.c (emit_thunk): Use tree-generating functions, not
4481         RTL.
4482         (do_build_copy_constructor): Likewise.
4483         (do_build_assign_ref): Likewise.
4484         (synthesize_method): Likewise.  Keep track of line numbers.
4485         * pt.c (tsubst_expr): Handle various kinds of try blocks.
4486         * semantics.c (expand_stmts): Remove.
4487         (begin_function_try_block): Set FN_TRY_BLOCK_P.
4488         (finish_function_try_block): Be careful rechaining 
4489         function try blocks.
4490         (expand_stmt): Loop through all the statements at a given level.
4491         (exapnd_body): Be careful with line-numbers here too.  Prepare for
4492         being called directly from the parser.
4493
4494         * cp-tree.h (finish_function): Adjust prototype.
4495         * decl.c (finish_function): Return the function compiled.
4496         * pt.c (instantiate_decl): Don't play games with obstacks.
4497         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
4498         (search_tree): Likewise.
4499         * typeck.c: Fix typo in comment.
4500         * typeck2.c (store_init_value): Add comment.
4501
4502         * cp-tree.h (CPTI_ATEXIT): New macro.
4503         (atexit_node): Likewise.
4504         * decl.c (destroy_local_static): New function, broken out from ...
4505         (expand_static_init): Here.
4506
4507         * rtti.c (get_tinfo_var): These should always be global
4508         (expand_si_desc): Use tree, not RTL, functions to generate code.
4509         (expand_class_desc): Likewise.
4510         (expand_ptr_desc): Likewise.
4511         (expand_attr_desc): Likewise.
4512         (expand_generic_desc): Likewise.
4513         (synthesize_tinfo_fn): Likewise.
4514
4515 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
4516
4517         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
4518         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
4519         RECHAIN_STMTS. 
4520         (RECHAIN_STMST_FROM_CHAIN): Likewise.
4521
4522         * parse.y (simple_stmt): Fix typo in last change.
4523
4524         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
4525         (STMT_IS_FULL_EXPR_P): Likewise.
4526         (STMT_LINENO_FOR_FN_P): Likewise.
4527         (prep_stmt): New function.
4528         (building_stmt_tree): Tweak for safety.
4529         * pt.c (tsubst_expr): Use prep_stmt throughout.
4530         (add_tree): Move it to semantics.c
4531         * semantics.c (add_tree): Move it here.
4532         (finish_expr_stmt_real): New function.
4533         (finish_expr_stmt): Use it.
4534         (finish_if_stmt_cond): Use FINISH_COND.
4535         (finish_while_stmt_cond): Likewise.
4536         (finish_for_cond): Likewise.
4537         (finish_stmt_tree): Tweak line-number handling.
4538         (prep_stmt): New function.
4539         (expand_stmt): Use it.
4540         
4541         * cp-tree.h (begin_switch_stmt): Adjust prototype.
4542         (finish_switch_cond): Likewise.
4543         * parse.y (simple_stmt): Adjust accordingly.
4544         * parse.c: Regenerated.
4545         * pt.c (tsubst_expr): Adjust accordingly.
4546         * semantics.c (expand_cond): New function.
4547         (FINISH_COND): New macro.
4548         (begin_switch_stmt): Build the SWITCH_STMT here.
4549         (finish_switch_stmt_cond): Not here.
4550         (expand_stmt): Adjust calls to begin_switch_stmt and
4551         finish_switch_cond.  Use expand_cond throughout.
4552
4553         * dump.c (dequeue_and_dump): Dump types for constants.
4554         Describe DECL_ARG_TYPE more intuitively.
4555         Handle ARRAY_REF.
4556
4557         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
4558         (lang_cleanup_tree): Remove.
4559         * lex.c (make_lang_type): Use ggc_alloc to allocate
4560         TYPE_LANG_SPECIFIC.
4561
4562         Reorganize per-function data.
4563         * cp-tree.h (saved_scope): Add function_decl, bindings.
4564         (language_function): Rename binding_level to bindings.
4565         (cp_function_chain): Use the current_function, not the
4566         outer_function_chain.
4567         (current_class_ptr): Make it work, even when there's no 
4568         current function.
4569         (current_class_ref): Likewise.
4570         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
4571         macros.
4572         (clear_temp_name): Remove.
4573         * decl.c (check_function_type): New function, broken out from
4574         start_function.
4575         (current_binding_level): Adjust definition.
4576         (pushlevel): Simplify.
4577         (poplevel): Don't use named_label_uses when we're outside
4578         a function scope.
4579         (mark_saved_scope): Mark function_decl and bindings.
4580         (maybe_push_to_top_level): Don't unconditionally push a new
4581         function context.  Save bindings and the current_function_decl.
4582         Don't clear named_labels.
4583         (pop_from_top_level): Pop function context if appropriate.
4584         (init_decl_processing): Set init_lang_status and free_lang_status,
4585         rather than save_lang_status and restore_lang_status.
4586         (start_function): Take SF_* flags.  Don't clear per-function data.
4587         Reorder and simplify to use new per-function data code.  Add
4588         asserts.
4589         (store_parm_decls): Don't call init_function_start here.
4590         (finish_function): Adjust for new handling of per-function data.
4591         (push_cp_function_context): Simplify.
4592         (mark_cp_function_context): Change binding_level to bindings.
4593         * decl2.c (clear_temp_name): Remove.
4594         (start_objects): Use SF flags to start_function.
4595         (start_static_storage_duration_function): Likewise.
4596         * except.c (start_anon_func): Remove redundant calls to 
4597         push_function_context_to.  Use SF flags to start function.
4598         (end_anon_func): Remove redundant call to pop_function_context
4599         from.
4600         * lex.c (reinit_parse_for_function): Don't initialize per-function 
4601         data.
4602         * method.c (emit_thunk): Clear current_function after calling
4603         assemble_end_function.  Use SF flags for start_function.
4604         (synthesize_method): Use SF flags for start_function.
4605         * parse.c: Regenerated.
4606         * parse.y (fn.defpen): Likewise.
4607         (pending_inline): Clear current_function, even if something goes
4608         wrong.
4609         * pt.c (instantiate_decl): Use SF flags to start_function.
4610         Don't save and restore expanding_p.
4611         (add_tree): Handle the case where we are outside any function.
4612         (end_tree): Likewise.
4613         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
4614         * semantics.c (begin_function_definition): Likewise.
4615         (expand_body): Likewise.
4616         
4617 1999-09-09  Nathan Sidwell  <nathan@acm.org>
4618
4619         * cp-tree.h (convert_to_void): Prototype new function.
4620         (require_complete_type_in_void): Remove prototype.
4621         * cvt.c (convert_to_void): New function.
4622         (ocp_convert): Use convert_to_void.
4623         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
4624         expressions.
4625         * typeck.c (require_complete_type_in_void): Remove function.
4626         (build_compound_expr): Use convert_to_void.
4627         (build_static_cast): Likewise.
4628         (build_c_cast): Likewise.
4629         * semantics.c (finish_expr_stmt): Do not decay full expressions.
4630         
4631         * typeck.c (build_x_compound_expr): Add FIXME.
4632
4633 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
4634
4635         * cp-tree.h (scratch_tree_cons): Remove.
4636         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
4637         and perm_tree_cons with plain tree_cons.
4638         * class.c: Likewise.
4639         * decl.c: Likewise.
4640         * decl2.c: Likewise.
4641         * except.c: Likewise.
4642         * expr.c: Likewise.
4643         * init.c: Likewise.
4644         * lex.c: Likewise.
4645         * method.c: Likewise.
4646         * parse.y: Likewise.
4647         * pt.c: Likewise.
4648         * repo.c: Likewise.
4649         * rtti.c: Likewise.
4650         * search.c: Likewise.
4651         * typeck.c: Likewise.
4652         * parse.c: Regenerated.
4653         * tree.c (build_srcloc): Simplify.
4654         
4655 1999-09-08  Bruce Korb  autogen@linuxbox.com
4656
4657         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
4658
4659 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
4660
4661         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
4662         Remove next.
4663         (LANG_DECL_PERMANENT): Remove.
4664         * decl.c (duplicate_decls): Don't mess about with obstacks trying
4665         to free memory.
4666         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
4667         * lex.c (free_lang_decl_chain): Remove.
4668         (build_lang_decl): Don't use obstacks.
4669         (retrofit_lang_decl): Likewise.
4670         (copy_lang_decl): Likewise.
4671
4672         * cp-tree.h (saved_scope): Remove old_binding_level and 
4673         function_decl.  Tidy up.
4674         * decl.c (mark_saved_scope): Don't set them.
4675         (maybe_push_to_top_level): Clear memory.
4676
4677         * decl.c (layout_var_decl): Change prototype.  Don't complete
4678         types for external objects.
4679         (check_initializer): Likewise.  Tidy.
4680         (initialize_local_var): Complete types here.
4681         (cp_finish_decl): Not here.  Reorganize a little.
4682         (grokvardecl): Don't complete types here.
4683
4684         * decl.c (start_function): Clear last_dtor_insn and
4685         last_parm_cleanup_insn. 
4686         (push_cp_function_context): Just copy over a little of
4687         the old context, not all of it.
4688
4689         * cp-tree.h (copy_to_permanent): Remove.
4690         (permanent_p): Likewise.
4691         * decl.c (building_typename_type): Don't use copy_to_permanent.
4692         (start_decl): Likewise.
4693         (grok_reference_init): Likewise.
4694         (cp_finish_decl): Likewise.
4695         * init.c (build_new_1): Don't use mapcar.
4696         (build_vec_delete_1): Don't use copy_to_permanent.
4697         (build_vec_init): Likewise.
4698         * parse.y (primary): Likewise.
4699         * parse.c: Regenerated.
4700         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
4701         (lookup_template_class): Likewise.
4702         (tsubst_friend_function): Likewise.
4703         (instantiate_class_template): Likewise.
4704         (tsubst_decl): Likewise.
4705         (tsubst): Likewise.
4706         (instantiate_template): Likewise.
4707         (unify): Likewise.
4708         * rtti.c (get_tinfo_fn): Likewise.
4709         (build_dynamic_cast): Likewise.
4710         * semantics.c (finish_if_stmt_cond): Likewise.
4711         (finish_while_stmt_cond): Likewise.
4712         (finish_do_stmt): Likewise.
4713         (finish_for_cond): Likewise.
4714         (finish_for_expr): Likewise.
4715         (finish_cleanup): Likewise.
4716         (add_decl_stmt): Likewise.
4717         (finish_named_return_value): Likewise.
4718         (finish_qualified_call_expr): Likewise.
4719         * tree.c (perm_manip): Remove.
4720         (build_exception_variant): Don't use copy_to_permanent.
4721         (permanent_p): Remove.
4722         (copy_to_permament): Remove.
4723         (build_min_nt): Don't use copy_to_permanent.
4724         (build_min): Likewise.
4725         (min_tree_cons): Likewise.
4726         * typeckc.c (build_static_cast): Likewise.
4727         (build_reinterpret_cast): Likewise.
4728         (build_const_cast): Likewise.
4729         
4730 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
4731
4732         * decl.c (ggc_p): Set it to 1.
4733         (mark_saved_scope): Add prototype.
4734
4735 1999-09-07  Richard Henderson  <rth@cygnus.com>
4736
4737         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
4738         * typeck.c (self_promoting_args_p): Delete.
4739
4740 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
4741
4742         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
4743         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
4744
4745 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
4746
4747         * Makefile.in (tree.o): Depend on ggc.h.
4748         * class.c (make_method_vec): Remove.
4749         (free_method_vec): Likewise.
4750         (free_method_vecs): Remove.
4751         (add_method): Don't use them.
4752         * cp-tree.def (PTRMEM_CST): Make it longer.
4753         (TEMPLATE_PARM_INDEX): Make it shorter.
4754         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
4755         (template_parm_index): Remove RTL field.
4756         (ptrmem_cst): Add RTL field.
4757         (finish_function): Removed parameter.
4758         (process_next_inline): Change prototype.
4759         (init_cplus_unsave): Rename to init_tree.
4760         (binding_init): Remove.
4761         * decl.c (free_binding_nodes): Remove.
4762         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
4763         (pop_binding): Don't use free_binding_nodes.
4764         (free_binding_vecs): Remove.
4765         (store_bindings): Don't use them.
4766         (pop_from_top_level): Likewise.
4767         (lookup_namespace_name): Simplify.
4768         (build_typename_type): Don't use obstack_free.
4769         (unqualified_namespace_lookup): Simplify.
4770         (lookup_name_real): Simplify.
4771         (start_function): Remove comment about leaks.
4772         (finish_function): Removed nested parameter.  Call
4773         expand_end_bindings even when building_stmt_tree.
4774         Call ggc_push_context and ggc_pop_context around
4775         rest_of_compilation, if necessary.
4776         (mark_cp_function_context): Handle a NULL language-context.
4777         (lang_mark_false_label_stack): Fix typo.
4778         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
4779         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
4780         pointer to method types.
4781         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
4782         * decl2.c (finish_objects): Adjust call to finish_function.
4783         (finish_static_store_duration_function): Likewise.
4784         (do_nonmember_using_decl): Remove call to binding_init.
4785         * except.c (end_anon_func): Adjust call to finish_function.
4786         * lex.c (mark_impl_file_chain): New function.
4787         (init_parse): Call init_tree, not init_cplus_unsave.
4788         Add GC roots.
4789         (cp_pramga_interface): Use xmalloc, not permalloc.
4790         (cp_pragma_implementation): Likewise.
4791         (begin_definition_of_inclass_inline): Simplify.
4792         (process_next_inline): Adjust prototype.
4793         (do_scoped_id): Don't call binding_init.
4794         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
4795         * method.c (emit_thunk): Adjust call to finish_function.
4796         (synthesize_method): Likewise.
4797         * parse.y (%union): Add a new `pi' variant.
4798         (PRE_PARSED_FUNCTION_DECL): Use it.
4799         (fn.defpen): Likewise.
4800         (fndef): Adjust call to finish_function.
4801         * pt.c (instantiate_decl): Likewise.
4802         * rtti.c (syntheisze_tinfo_fn): Likewise.
4803         * semantics.c (expand_body): Likewise.
4804         * tree.c: Include ggc.h.
4805         (mark_list_hash): New function.
4806         (binding_init): Remove.
4807         (init_cplus_unsave): Rename to ...
4808         (init_tree): This.  Add GC roots.
4809         
4810 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
4811
4812         Get ready for garbage collection.
4813         * Makefile.in (CXX_TREE_H): Add varray.h
4814         (lex.o): Depend on ggc.h.
4815         (decl.o): Likewise.
4816         (decl2.o): Likewise.
4817         (method.o): Likewise.
4818         (search.o): Likewise.
4819         (pt.o): Likewise.
4820         (repo.o): Likewise.
4821         * class.c: Include ggc.h.
4822         (current_class_name): Remove.
4823         (current_class_type): Likewise.
4824         (current_access_specifier): Likewise.
4825         (previous_class_type): Likewise.
4826         (previous_class_values): Likewise.
4827         (class_cache_firstobj): Likewise.
4828         (current_lang_base): Likewise.
4829         (current_lang_stack): Likewise.
4830         (current_lang_stacksize): Likewise.
4831         (lang_name_c): Likewise.
4832         (lang_name_cplusplus): Likewise.
4833         (lang_name_java): Likewise.
4834         (current_lang_name): Likewise.
4835         (base_layout_decl): Likewise.
4836         (access_default_node): Likewise.
4837         (access_public_node): Likewise.
4838         (access_protected_node): Likewise.
4839         (access_private_node): Likewise.
4840         (access_default_virtual_node): Likewise.
4841         (access_public_virtual_node): Likewise.
4842         (access_protected_virtual_node): Likewise.
4843         (access_private_virtual_node): Likewise.
4844         (signed_zero_node): Likewise.
4845         (init_class_processing): Don't build base_layout_decl.
4846         (push_lang_context): Adjust now that current_lang_base is a varray.
4847         (pop_lang_context): Likewise.
4848         * cp-tree.h: Include varray.h.
4849         (cp_global_trees): Add access_default, access_public,
4850         access_protected, access_private, access_default_virtual,
4851         access_public_virtual, access_protected_virtual,
4852         access_private_virtual, ctor_identifier, delta2_identifier, 
4853         delta_identifier, dtor_identifier, in_charge_identifier,
4854         index_identifier, nelts_identifier, this_identifier,
4855         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
4856         lang_name_c, lang_name_cplusplus, lang_name_java,
4857         empty_except_spec, null, jclass, minus_one, terminate.
4858         (saved_scope): Move here from decl.c.  Define globals in terms of
4859         saved_scope: current_namespace, current_class_name,
4860         current_class_type, current_access_specifier, current_lang_stack,
4861         current_lang_base, current_lang_name, current_function_parms,
4862         current_template_parms, processing_template_decl,
4863         processing_specialization, processing_explicit_instantiation,
4864         previous_class_type, previous_class_values, class_cache_firstobj.
4865         (scope_chain): New variable.
4866         (init_pt): New function.
4867         * decl.c (current_namespace): Remove.
4868         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
4869         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
4870         (delta_identifier, delta2_identifier): Likewise.
4871         (pfn_or_delta2_identifier, tag_identifier): Likewise
4872         (vt_off_identifier, empty_except_spec, null_node): Likewise.
4873         (current_function_parms, current_lang_base): Remove.
4874         (current_lang_stack, previous_class_values): Remove.
4875         (class_binding_level): Macroize.
4876         (saved_scope): Remove.
4877         (current_saved_scope): Rename to scope_chain.
4878         (mark_saved_scope): Adjust for new scope structure.
4879         (maybe_push_to_top_level): Likewise.
4880         (pop_from_top_level): Likewise.
4881         (duplicate_decls): Adjust now that current_lang_base is a varray.
4882         (build_typename_type): Call ggc_add_tree_hash_table_root.
4883         (init_decl_processing): Call init_pt.  Call push_to_top_level to
4884         set up globals.  Add GC roots.
4885         (xref_basetypes): Adjust now that current_lang_base is a varray.
4886         * decl.h (this_identifier): Remove.
4887         (in_charge_identifier): Likewise.
4888         * decl2.c: Don't include varray.h.
4889         (current_namespace): Remove.
4890         (init_decl2): Add GC roots.
4891         * except.c (Terminate): Remove. 
4892         (init_exception_processing): Use terminate_node instead.
4893         (build_terminate_handler): Likewise.
4894         * init.c (nc_nelts_field_id): Remove.
4895         (minus_one): Likewise.
4896         (init_init_processing): Use minus_one_node and nelts_identifier
4897         instead.  Add GC roots.
4898         (jclass_node): Remove.
4899         (build_new_1): Use nelts_identifier.
4900         (build_vec_init): Likewise.
4901         (build_vec_delete): Likewise.
4902         * lex.c: Include ggc.h.
4903         (defarg_fn): Move declaration early.
4904         (defarg_parms): Likewise.
4905         (init_parse): Add GC roots.
4906         (handle_cp_pragma): Remove redundant declaration of
4907         pending_vtables.
4908         * method.c: Include ggc.h.
4909         (btypelist): Make it a varray.  All uses changed.
4910         (ktypelist): Likewise.
4911         (init_method): Add GC roots.
4912         * pt.c: Don't include varray.h.  Include ggc.h.
4913         (current_template_parms): Remove.
4914         (processing_template_decl): Likewise.
4915         (processing_specialization): Likewise.
4916         (processing_explicit_instantiation): Likewise.
4917         (init_pt): New function.
4918         * repo.c: Include ggc.h.
4919         (init_repo): Add GC roots.
4920         * search.c: Don't include varray.h.
4921         (_vptr_name): Remove.
4922         (lookup_field_1): Use vtpr_identifier instead.
4923         (expand_indirect_vtbls_init): Remove redundant declaration of
4924         in_charge_identifier.
4925         (init_search_processing): Use vptr_identifier.
4926         
4927 1999-09-05  Richard Henderson  <rth@cygnus.com>
4928             Bernd Schmidt <bernds@cygnus.co.uk>
4929             Mark Mitchell  <mark@codesourcery.com>
4930
4931         * Makefile.in (parse.o): Depend on ggc.h.
4932         (decl2.o): Depend on ggc.h.
4933         (init.o): Depend on ggc.h.
4934         * cp-tree.h (init_decl2): Declare.
4935         (cp_parse_init): Likewise.
4936         * decl.c (ggc_p): Define to zero.
4937         (mark_saved_scope): New function.
4938         (init_decl_processing): Call cp_parse_init, and cp_decl2.
4939         Register GC roots.
4940         (expand_static_init): Add GC roots.
4941         * decl2.c: Include ggc.h.
4942         (init_decl2): New function.
4943         * init.c: Include ggc.h.
4944         (init_init_processing): Add GC roots.
4945         * parse.y: Include ggc.h.
4946         (cp_parse_init): New function.
4947         
4948 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
4949
4950         * decl.c (init_decl_processing): Set mark_lang_status.
4951         (lang_mark_false_label_stack): Adjust prototype.
4952         * decl2.c (grok_function_init): Remove extraneous declaration of
4953         abort_fndecl.
4954
4955         * Make-lang.in (cc1plus): Remove dependency on GGC.
4956         * Makefile.in (OBJS): Don't mention ggc-simple.o.
4957         (OBJDEPS): Don't mention ggc-simple.o.
4958
4959         * Make-lang.in (cc1plus): Depend on $(GGC).
4960         * Makefile.in (OBJS): Add ggc-simple.o.
4961         (OBJDEPS): Likewise.
4962         * cp-tree.h (language_function): Rename members to `x_' versions;
4963         we now have x_named_labels, x_ctor_label, x_dtor_label,
4964         x_base_init_list, x_member_init_list, x_base_init_expr,
4965         x_current_class_ptr, x_current_class_ref, x_last_tree,
4966         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
4967         x_result_rtx. 
4968         (dtor_label, ctor_label, current_base_init_list,
4969         current_member_init_list, base_init_expr, current_class_ptr,
4970         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
4971         * decl.c: Include ggc.h.
4972         (last_dtor_insn): Adjust to use x_ names.
4973         (last_parm_cleanup_insn): Likewise.
4974         (original_result_rtx): Likewise.
4975         (named_labels): Likewise.
4976         (mark_binding_level): New function.
4977         (mark_cp_function_context): Likewise.
4978         (mark_false_label_stack): Likewise.
4979         (lang_mark_tree): Likewise.
4980         (lang_cleanup_tree): Likewise.
4981         
4982 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
4983
4984         * Makefile.in (CXX_TREE_H): Include function.h.
4985         (decl.o): Don't depend on function.h.
4986         (decl2.o): Likewise.
4987         (typeck.o): Likewise.
4988         (init.o): Likewise.
4989         (method.o): Likewise.
4990         * cp-tree.h: Include function.h.
4991         (cp_function): Rename to language_function.  Remove next.
4992         (cp_function_chain): Make it a macro, not a variable.
4993         (push_cp_function_context): Don't declare.
4994         (pop_cp_function_context): Likewise.
4995         * decl.c: Don't include function.h.
4996         (push_cp_function_context): Make it static.  Make it suitable for
4997         a save_lang_status callback.
4998         (pop_cp_function_context): Likewise.
4999         (maybe_push_to_top_level): Call push_function_context_to, not
5000         push_cp_function_context.
5001         (pop_from_top_level): Call pop_function_context_from, not
5002         pop_cp_function_context.
5003         (init_decl_processing):  Set save_lang_status and
5004         restore_lang_status.  Call push_function_context_to, not
5005         push_cp_function_context.
5006         (cp_function_chain): Remove.
5007         * decl2.c: Don't include function.h.
5008         * except.c: Don't include function.h.
5009         (start_anon_func): Call push_function_context_to, not
5010         push_cp_function_context.
5011         (end_anon_func):  Call pop_function_context_from, not
5012         pop_cp_function_context.
5013         * init.c: Don't include function.h.
5014         * lex.c (begin_definition_of_inclass_inline): Call
5015         push_function_context_to, not push_cp_function_context. 
5016         (process_next_inline):  Call pop_function_context_from, not
5017         pop_cp_function_context.
5018         * method.c: Don't include function.h.
5019         (synthesize_method): Call push_function_context_to, not
5020         push_cp_function_context.  Call pop_function_context_from, not
5021         pop_cp_function_context.
5022         * typeck.c: Don't include function.h.
5023         
5024         * decl.c (expand_static_init): Tweak handling of static
5025         initializations for objects without constructors.
5026
5027 1999-09-03  Nathan Sidwell  <nathan@acm.org>
5028
5029         * typeck.c (build_indirect_ref): Reject dereference of pointer to
5030         void.
5031
5032 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
5033
5034         * cp-tree.h (cp_function): Move here, from decl.c.
5035         (cp_function_chain): Declare.
5036         (dtor_label): New macro, instead of variable.
5037         (ctor_label): Likewise.
5038         (current_base_init_list): Likewise.
5039         (current_member_init_list): Likewise.
5040         (base_init_expr): Likewise.
5041         (current_class_ptr): Likewise.
5042         (current_class_ref): Likewise.
5043         (last_tree): Likewise.
5044         (last_expr_type): Likewise.
5045         (current_function_returns_value): Likewise.
5046         (current_function_returns_null): Likewise.
5047         (current_function_just_assigned_this): Likewise.
5048         (current_function_parms_stored): Likewise.
5049         (temp_name_counter): Likewise.
5050         (static_labelno): Likewise.
5051         (expanding_p): Likewise.
5052         (stmts_are_full_exprs_p): Likewise.
5053         (in_function_try_handler): Likewise.
5054         (lang_type): Remove nested type_flags.  All uses changed.
5055         * call.c (ctor_label): Remove.
5056         (dtor_label): Likewise.
5057         * class.c (current_class_ptr): Remove.
5058         (current_class_ref): Likewise.
5059         * decl.c (static_labelno): Remove.
5060         (dtor_label): Likewise.
5061         (last_dtor_insn): New macro, instead of variable.
5062         (last_parm_cleanup_insn): Likewise.
5063         (original_result_rtx): Likewise.
5064         (in_function_try_handler): Remove.
5065         (named_label_uses): New macro, instead of variable.
5066         (named_labels): Likewise.
5067         (current_function_returns_value): Remove.
5068         (current_function_returns_null): Likewise.
5069         (current_function_assigns_this): New macro, instead of variable.
5070         (current_function_just_assigned_this): Likewise.
5071         (current_binding_level): Likewise.
5072         (init_decl_processing): Call push_cp_function_context.
5073         (cp_function): Move to cp-tree.h
5074         (cp_function_chain): Make it global.
5075         (temp_name_counter): Remove.
5076         (push_cp_function_context): Simplify.
5077         (pop_cp_function_context): Likewise.
5078         * decl2.c (temp_name_counter): Remove.
5079         * init_c (current_base_init_list): Likewise.
5080         (current_member_init_list): Likewise.
5081         (base_init_expr): Likewise.
5082         * method.c (static_labelno): Likewise.
5083         * pt.c (last_tree): Likewise.
5084         * semantics.c (expanding_p): Likewise.
5085         (stmts_are_full_exprs_p): Likewise.
5086         (last_expr_type): Likewise.
5087         * typeck.c (dtor_label): Likewise.
5088         (ctor_label): Likewise.
5089         
5090 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
5091
5092         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
5093         (arg_assoc_class): Use arg_assoc_template_arg for template
5094         arguments. 
5095         (arg_assoc): Likewise.
5096         * pt.c (mangle_class_name_for_template): Allow member template
5097         template arguments.
5098
5099 1999-09-02  Nathan Sidwell  <nathan@acm.org>
5100
5101         * call.c (build_conditional_expr): Warn on enum mismatches.
5102         (convert_arg_to_ellipsis): Move non-pod check to after
5103         conversion.
5104
5105 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5106
5107         * gxx.gperf (hash, is_reserved_word): Add prototypes.
5108
5109         * init.c (build_vec_init): Initialize variable `try_block'.
5110
5111         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
5112         Likewise for bzero/memset.
5113         (token_getch, token_put_back): Add static prototypes.  Remove
5114         `inline' from the definitions.
5115         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
5116
5117 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
5118
5119         * cp-tree.h (lang_type): Move align into type_flags.
5120         (CLASSTYPE_ALIGN): Adjust accordingly.
5121         * call.c (direct_reference_binding): Remove misleading comment.
5122
5123 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5124
5125         * parse.y (language_string): Constify.
5126
5127 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5128
5129         * repo.c (getpwd): Don't prototype.
5130         * xref.c (getpwd): Likewise
5131
5132 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5133
5134         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
5135         Remove hacks for stuff which now comes from libiberty.
5136
5137 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
5138
5139         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
5140
5141 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
5142
5143         * cp-tree.h (begin_init_stmts): Declare.
5144         (finish_init_stmts): Likewise.
5145         * cvt.c (build_up_reference): Wrap the declaration of a temporary
5146         in a statement-expression so that we will see it when expanding
5147         tree structure later.
5148         * init.c (begin_init_stmts): Don't make it static.
5149         (finish_init_stmts): Likewise.
5150
5151         * cp-tree.h (start_handler_parms): New function.
5152         (expand_start_catch_block): Take only one parameter.
5153         (start_handler_parms): New function.
5154         * decl.c (start_handler_parms): Define it.
5155         * except.c (process_start_catch_block): Take only one parameter.
5156         Don't call grokdeclarator here.
5157         (expand_start_catch_block): Don't call grokdeclarator here,
5158         either.
5159         * parse.y (handler_args): Adjust call to
5160         expand_start_catch_block.  Use start_handler_parms.
5161         * pt.c (push_template_decl_real): Make permanent lists have
5162         permanent elements.
5163         (tsubst_expr): Adjust calls to expand_start_catch_block
5164         appropriately.
5165         * semantics.c (expand_stmt): Likewise.
5166         
5167 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
5168
5169         * pt.c (push_template_decl_real): Use template declaration from
5170         class type if it exists.
5171
5172 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
5173
5174         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
5175         (maybe_inject_for_scope_var): Declare it.
5176         (initialize_local_var): Likewise.
5177         * decl.c (maybe_inject_for_scope_var): Make it global.
5178         (initialize_local_var): Likewise.  Move cleanup handling here,
5179         from cp_finish_decl.
5180         (make_rtl_for_nonlocal_decl): Use
5181         push_obstacks_nochange/pop_obstacks, rather than
5182         end_temporary_allocation/resume_temporary_allocation.
5183         (cp_finish_decl): Try to complete the type of a variable when it
5184         is declared.  Move cleanup-handling to initialize_local_var.
5185         (expand_static_init): Use tree-building code, rather than
5186         RTL-building code.
5187         * decl2.c (get_temp_name): Assert non-initializedness of
5188         temporaries.
5189         * init.c (create_temporary_var): Move RTL-assigning code to ...
5190         (get_temp_regvar): Here.
5191         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
5192         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
5193         call initialize_local_var to generate initialization code.
5194         
5195 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5196
5197         * cp-tree.h (fndecl_as_string, type_as_string,
5198         type_as_string_real, args_as_string, decl_as_string,
5199         expr_as_string, code_as_string, language_as_string,
5200         parm_as_string, op_as_string, assop_as_string, cv_as_string,
5201         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
5202
5203         * errfn.c (cp_printer): Likewise.
5204
5205         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
5206         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
5207         cp_file_of, code_as_string, language_as_string, parm_as_string,
5208         op_as_string, assop_as_string, args_as_string, cv_as_string):
5209         Likewise.
5210
5211         * tree.c (lang_printable_name): Likewise.
5212
5213 1999-08-28  Richard Henderson  <rth@cygnus.com>
5214
5215         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
5216
5217 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
5218
5219         * cp-tree.h (strip_array_types): New function.
5220         * decl.c (maybe_deduce_size_from_array_init): New function, split
5221         out from cp_finish_decl.
5222         (layout_var_decl): Likewise.
5223         (maybe_commonize_var): Likewise.
5224         (maybe_inject_for_scope_var): Likewise.
5225         (initialize_local_var): Likewise.
5226         (build_cleanup_on_safe_obstack): Likewise.
5227         (check_initializer): Likewise.
5228         (make_rtl_for_nonlocal_decl): Likewise.
5229         (cp_finish_decl): Use them.
5230         * typeck.c (strip_array_types): New function.
5231         
5232         * cp-tree.def (LABEL_STMT): New tree node.
5233         * cp-tree.h (LABEL_STMT_LABEL): New macro.
5234         (shadow_label): Remove.
5235         (declare_local_label): New function.
5236         (finish_label_decl): Likewise.
5237         * decl.c (make_label_decl): New function, split out from
5238         lookup_label.
5239         (shadowed_labels): Remove.
5240         (binding_level): Add shadowed_labels.
5241         (clear_binding_level): Remove.
5242         (push_binding_level): Just bzero the new binding level.
5243         (pushlevel): Fix indentation.
5244         (pop_label): New function.
5245         (pop_labels): Likewise, split out from poplevel.
5246         (poplevel): Pop local labels.  Use pop_labels.
5247         (maybe_push_to_top_level): Don't clear shadowed_labels.
5248         (lookup_label): Use make_label_decl.
5249         (shadow_label): Remove.
5250         (declare_local_label): New function.
5251         (define_label): Simplify.
5252         (start_function): Don't clear shadowed_labels.
5253         (cp_function): Remove shadowed_labels.
5254         (push_cp_function_context): Don't save shadowed_labels.
5255         (pop_cp_function_context): Don't restore it.
5256         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
5257         * parse.y (label_decl): Use finish_label_decl.
5258         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
5259         declarations.
5260         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
5261         building_stmt_tree.
5262         (finish_label_decl): New function.
5263         (expand_stmt): Handle LABEL_STMTs and local label declarations.
5264         
5265 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
5266
5267         * decl.c (lookup_label): Build labels on the permanent obstack
5268         when building statement trees.  Don't build RTL for labels when
5269         building statement trees.
5270         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
5271         building statement trees.
5272         (finish_label_stmt): Likewise.
5273         (expand_stmt): Adjust accordingly.
5274         * pt.c (tsubst_expr); Likewise.
5275         (do_decl_instantiation): Robustify.
5276         
5277         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
5278         * tree.c (build_cplus_new): Set it.
5279         * expr.c (cplus_expand_expr): Use it.
5280         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
5281         
5282         * decl.c (store_parm_decls): Reset immediate_size_expand.
5283         (finish_function): Likewise.
5284         
5285         * tree.c (cplus_unsave_expr_now): Don't return a value.
5286
5287         * semantics.c (do_poplevel): Always initialize the return value.
5288
5289 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
5290
5291         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
5292         * tree.h (cplus_unsave_expr_now) : Same.
5293
5294 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
5295
5296         * decl.c (grokdeclarator): Amend comment.
5297         * except.c (expand_start_catch_block): Call push_template_decl for
5298         catch-block parameters.
5299         * method.c (synthesize_method): Build an empty compound statement
5300         for the body of a constructor.
5301
5302 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
5303
5304         * tree.c (cp_build_qualified_type_real): If we're asking for the
5305         same quals we already have, just return.
5306
5307 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
5308
5309         * cp-tree.def (SUBOBJECT): New tree node.
5310         * cp-tree.h (CLEANUP_P): New macro.
5311         (SUBOBJECT_CLEANUP): Likewise.
5312         (keep_next_level): Add parameter.
5313         (get_temp_regvar): Don't declare.
5314         (emit_base_init): Remove parameter.
5315         (expand_aggr_init): Rename to build_aggr_init.
5316         (expand_vec_init): Rename to build_vec_init.
5317         (do_pushlevel): Remove.
5318         (do_poplevel): Likewise.
5319         (finish_cleanup): New function.
5320         (finish_subobject): Likewise.
5321         (stmts_are_full_exprs_p): New variable.
5322         * decl.c (keep_next_level): Add parameter.
5323         (cp_finish_decl): Use build_aggr_init, not
5324         expand_aggr_init.  Use finish_expr_stmt to expand the code.
5325         (expand_static_init): Use tree-generating, not RTL-generating,
5326         functions to handle the initialization.
5327         (start_function): Remove dead code.  Always have a momentary
5328         obstack inside the function, even before hitting the first curly
5329         brace.
5330         (cplus_expand_expr_stmt): Move calls to
5331         expand_{start,end}_target_temps into semantics.c.
5332         (cp_function): Add stmts_are_full_exprs_p.
5333         (push_cp_function_context): Save it.
5334         (pop_cp_function_context): Restore it.
5335         * decl2.c (get_temp_regvar): Move to init.c.
5336         (do_static_initialization): Use build_{aggr,vec}_init.
5337         (do_static_destruction): Fix typo in comment.
5338         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
5339         * except.c (expand_throw): Use create_temporary_var.
5340         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
5341         * init.c (expand_vec_init_try_block): Remove.
5342         (expand_vec_init_catch_clause): Likewise.
5343         (get_temp_regvar): New function.
5344         (begin_init_stmts): Likewise.
5345         (finish_init_stmts): Likewise.
5346         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
5347         structure here.
5348         (emit_base_init): Likewise.  Remove unused parameter.
5349         (expand_virtual_init): Likewise.
5350         (expand_cleanup_for_base): Use finish_subobject.
5351         (expand_aggr_vbase_init_1): Simplify.
5352         (construct_virtual_bases): Use tree-generating functions to build
5353         up initialization.
5354         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
5355         (expand_default_init): Likewise.
5356         (expand_aggr_init_1): Likewise.
5357         (expand_vec_init): Rename to build_vec_init.
5358         * method.c (do_build_copy_constructor): Use tree-generating
5359         functions.  Don't call clear_last_expr.
5360         (do_build_assign_ref): Likewise.
5361         (synthesize_method): Call clear_last_expr here.
5362         * parse.y (base_init): Don't call clear_last_expr here.
5363         (nodecls): Likewise.
5364         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
5365         * semantics.c (do_pushlevel): Move to here.
5366         (do_poplevel): Likewise.
5367         (stmts_are_full_exprs_p): New variable.
5368         (finish_expr_stmt): Handle logic for temoprary cleanup here.
5369         (finish_for_stmt): Use finish_expr_stmt.
5370         (finish_cleanup): New function.
5371         (finish_function_try_block): Fix indentation.
5372         (finish_subobject): New function.
5373         (setup_vtbl_ptr): Call keep_next_level here.
5374         (finish_stmt_expr): Handle a block with no scope inside the
5375         statement-expression.
5376         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
5377         SUBOBJECT.
5378         * tree.c (search_tree): Handle INIT_EXPR.
5379         (mapcar): Likewise.
5380         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
5381         * typeck2.c (store_init_value): Change expand_aggr_init to
5382         build_aggr_init in comment.
5383         
5384 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
5385
5386         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
5387
5388 1999-08-25  Nathan Sidwell  <nathan@acm.org>
5389
5390         * decl2.c (handle_class_head): Be graceful about additional
5391         scope qualifiers. Adjust comments to reflect reality.
5392
5393 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
5394
5395         * call.c (build_conditional_expr): Fix typo.
5396         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
5397         lvalue before trying to mess with the sides.
5398
5399         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
5400
5401 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
5402
5403         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
5404
5405 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
5406
5407         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
5408         Return arbitrary pointer or NULL.
5409         (check_eh_spec): Call __throw_type_match_rtti_2.
5410         * tinfo.h (*::dcast): Return int.  Add valp parm.
5411         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
5412         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
5413         (__throw_type_match_rtti): Now just a wrapper.
5414
5415         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
5416         (init_exception_processing): Don't initialize them.
5417
5418 1999-08-23  Paul Burchard <burchard@pobox.com>
5419
5420         * decl.c (check_default_argument): Fix typo.
5421
5422 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
5423
5424         * cp-tree.def (STMT_EXPR): Fix typo in node name.
5425
5426         * dump.c (dump_next_stmt): New function.
5427         (dequeue_and_dump): Use it.
5428         
5429         * pt.c (tsubst_copy): Make sure to initialize return value for a
5430         STMT_EXPR, even when processing_template_decl.
5431         * semantics.c (finish_stmt_expr): A statement-expression whose
5432         last statement is not an expression-statement has type `void'.  
5433         
5434 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
5435
5436         * semantics.c (finish_stmt_expr): Fix typo in comment.
5437         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
5438         (mapcar): Likewise.
5439         * init.c (build_vec_delete_1): Make the children of a permanent
5440         BIND_EXPR permanent.
5441         * pt.c (register_specialization): Don't register a specialization
5442         more than once.
5443         
5444 1999-08-18  Andrew Haley  <aph@cygnus.com>
5445
5446         * method.c (process_overload_item): Call build_mangled_C9x_name ()
5447         for all integer parameter types larger than long long.
5448
5449 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
5450
5451         * pt.c (redeclare_class_template): Merge default template
5452         arguments in both directions.
5453
5454         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
5455         compiler_error message.
5456
5457 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
5458
5459         * cp-tree.h: Declare flag_use_repository.
5460         * pt.c (do_decl_instantiation): Don't complain about duplicate
5461         instantiation with -frepo.
5462         (do_type_instantiation): Likewise.
5463
5464         * pt.c (push_template_decl_real): Complain about everything
5465         that isn't a valid template.
5466
5467         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
5468         affect inlines.
5469
5470 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
5471
5472         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
5473         * decl2.c (build_expr_from_tree): Handle it.
5474         * error.c (dump_expr): Likewise.
5475         * pt.c (for_each_template_parm): Likewise.
5476         (tsubst_copy): Likewise.
5477         * tree.c (search_tree): Likewise.
5478         * semantics.c (finish_pseudo_destructor_call): Create it.
5479         
5480 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
5481
5482         * search.c (setup_class_bindings): Robustify.
5483         * typeck.c (common_type): Use same_type_p, not pointer equality,
5484         to compare types.
5485
5486         * cp-tree.h (build_lang_field_decl): Remove.
5487         * class.c (build_vtable): Replace calls to build_lang_field_decl
5488         with build_lang_decl.
5489         (prepare_fresh_vtable): Likewise.
5490         (finish_struct_1): Likewise.
5491         (init_class_processing): Likewise.
5492         * decl.c (push_using_decl): Likewise.
5493         (init_decl_processsing): Likewise.
5494         (grokvardecl): Likewise.
5495         (build_ptrmemfunc_type): Likewise.
5496         (grokdeclarator): Likewise.
5497         (build_enumerator): Likewise.
5498         * decl2.c (grok_x_components): Likewise.
5499         (do_class_using_decl): Likewise.
5500         * except.c (call_eh_info): Likewise.
5501         * init.c (init_init_processing): Likewise.
5502         * rtti.c (expand_class_decl): Likewise.
5503         * tree.c (build_base_fields): Likewise.
5504         (build_vbase_pointer_fields): Likewise.
5505         * lex.c (build_lang_decl): Build declarations on the permanent
5506         obstack if we're building statmeent trees.
5507         (retrofit_lang_decl): Handle both the full lang_decl and also the
5508         smaller lang_decl_flags here.
5509         (build_lang_field_decl): Remove.
5510         * pt.c (push_template_decl_real): Issue errors for variable
5511         declarations that are not static members.
5512
5513 1999-08-18  Richard Henderson  <rth@cygnus.com>
5514
5515         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
5516         (mapcar): Likewise.
5517
5518 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
5519
5520         * cp-tree.h (back_end_hook): New variable.
5521         * decl2.c (back_end_hook): Define it.
5522         (finish_file): If it's non-NULL, call it.
5523
5524         * decl.c (add_decl_to_level): New function.
5525         (push_local_binding): Use it.
5526         (find_binding): Fix typo in comment.
5527         (pushdecl): Use add_decl_to_level.  Put templates on the
5528         corresponding namespace-scope binding levels.
5529         * dump.c (dequeue_and_dump): Print the specializations of a
5530         template.
5531         * pt.c (push_template_decl_real): Don't push a template multiple
5532         times.
5533
5534 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
5535
5536         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
5537         (CALL_DECLARATOR_QUALS): Likewise.
5538         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
5539         * decl.c (grokdeclarator): Adjust to use them.
5540         * decl2.c (grokfield): Likewise.
5541         (reparse_absdcl_as_casts): Likewise.
5542         * lex.c (make_call_declarator): Likewise.
5543         (set_quals_and_spec): Likewise.
5544         * pt.c (tsubst): Likewise.
5545         * tree.c (mapcar): Remove special hack to handle third operand of
5546         a CALL_EXPR.
5547
5548 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
5549
5550         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
5551         * class.c (build_vtable): Use build_lang_field_decl to build the
5552         VAR_DECLs for vtables.
5553         (prepare_fresh_vtable): Likewise.
5554         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
5555         CAN_HAVE_FULL_LANG_DECL_P.
5556         (push_using_decl): Use build_lang_decl to build USING_DECLs.
5557         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
5558         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
5559         (build_lang_field_decl): Likewise.
5560         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
5561         to copy.
5562         
5563         * cp-tree.def (STMT_EXPR): New tree node.
5564         * cp-tree.h (STMT_EXPR_STMT): New macro.
5565         (store_return_init): Change prototype.
5566         (finish_named_return_value): New function.
5567         (expand_stmt): Likewise.
5568         (expand_body): Likewise.
5569         (begin_stmt_tree): Likewise.
5570         (finish_stmt_tree): Likewise.
5571         (expanding_p): New variable.
5572         (last_expr_type): Likewise.
5573         (building_stmt_tree): New macro.
5574         * decl.c (start_function): Use building_stmt_tree, not
5575         processing_template_decl, where appropriate.
5576         (store_parm_decls): Likewise.
5577         (store_return_init): Move most of the body to semantics.c.
5578         (finish_function): Use building_stmt_tree.
5579         (finish_stmt): Clear last_expr_type here.
5580         (cp_function): Add expanding_p, last_tree, last_expr_type.
5581         (push_cp_function_context): Save them.
5582         (pop_cp_function_context): Restore them.
5583         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
5584         * error.c (dump_expr): Handle STMT_EXPR.
5585         * except.c (expand_start_catch_block): Use building_stmt_tree.
5586         Use add_decl_stmt.
5587         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
5588         (do_case): Move add_tree call to semantics.c.
5589         * parse.y (return_init): Use finish_named_return_value.
5590         (for.init.statement): Use finish_expr_stmt.
5591         * parse.c: Regenerated.
5592         * pt.c (do_pushlevel): Move to semantics.c.
5593         (do_poplevel): Likewise.
5594         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
5595         (tsubst_expr): Don't expand all the way to RTL here.  Handle
5596         RETURN_INIT and CTOR_INITIALIZER.
5597         (instantiate_decl): Call expand_body after tsubst'ing into
5598         DECL_SAVED_TREE.
5599         * semantics.c (expand_stmts): New function.
5600         (expanding_p): New variable.
5601         (last_expr_type): Likewise.
5602         (finish_expr_stmt): Use building_stmt_tree.
5603         (begin_if_stmt): Likewise.
5604         (finish_if_stmt_cond): Likewise.
5605         (finish_then_clause): Likewise.
5606         (begin_else_clause): Likewise.
5607         (finish_else_clause): Likewise.
5608         (begin_while_stmt): Likewise.
5609         (finish_while_stmt_cond): Likewise.
5610         (finish_while_stmt): Likewise.
5611         (finish_do_body): Likewise.
5612         (finish_do_stmt): Likewise.
5613         (finish_return_stmt): Likewise.
5614         (begin_for_stmt): Likewise.
5615         (fnish_for_init_stmt): Likewise.
5616         (finish_for_cond): Likewise.
5617         (finish_for_expr): Likewise.
5618         (finish_for_stmt): Likewise.
5619         (finish_break_stmt): Likewise.
5620         (finish_continue_stmt): Likewise.
5621         (finish_switch_cond): Likewise.
5622         (finish_switch_stmt): Likewise.
5623         (finish_case_label): Call add_tree here if necessary.
5624         (finish_goto_statement): Use building_stmt_tree.
5625         (begin_try_block): Likewise.
5626         (begin_function_try_block): Likewise.
5627         (finish_try_block): Likewise.
5628         (finish_function_try_block): Likewise.
5629         (finish_handler_sequence): Likewise.
5630         (finish_function_handler_sequence): Likewise.
5631         (begin_handler): Likewise.
5632         (finish_handler_parms): Likewise.
5633         (finish_handler): Likewise.
5634         (begin_compound_stmt): Likewise.
5635         (finish_compound_stmt): Likewise.
5636         (finish_asm_stmt): Likewise.
5637         (finish_label_stmt): Likewise.
5638         (finish_named_return_value): New function.
5639         (setup_vtbl_ptr): Moved here from decl2.c.
5640         (do_pushlevel): Moved here from pt.c.
5641         (do_poplevel): Likewise.
5642         (begin_stmt_expr): Use building_stmt_tree.
5643         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
5644         when building_stmt_tree.
5645         (begin_stmt_tree): New function.
5646         (finish_stmt_tree): Likewise.
5647         (expand_stmt): Likewise.
5648         (expand_body): Likewise.
5649         * tree.c (build_cplus_method_type): Make sure the argument types
5650         end up on the same obstack as the METHOD_TYPE.
5651         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
5652         THROW_EXPR, STMT_EXPR.
5653         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
5654         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
5655         sorry, if an unsupported node is encountered.
5656         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
5657         (c_expand_return): Don't call add_tree here.
5658         
5659 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
5660
5661         * pt.c (check_default_tmpl_args): Don't check in local scopes.
5662         (tsubst_decl): Make sure the declaration is on a saveable
5663         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
5664         variable.
5665         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
5666         
5667 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
5668
5669         Speed up Koenig lookup.
5670         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
5671         to return namespaces we've looked at.
5672         * decl2.c (lookup_using_namespace): Likewise.
5673         (add_function): Don't call ovl_member.
5674         (lookup_arg_dependent): Initialize k.namespaces to the list of 
5675         namespaces seen in unqualified lookup.
5676         * call.c (equal_functions): Move here from tree.c.
5677         (joust): Use it to handle duplicate candidates.
5678         * tree.c (ovl_member): Use ==.
5679
5680 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
5681
5682         * cp-tree.def (DECL_STMT): Make it smaller.
5683         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
5684         (lang_decl): ... here.  Add next.
5685         (DECL_SAVED_TREE): Adjust accordingly.
5686         (DECL_IMPLICIT_TYPEDEF_P): New macro.
5687         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5688         (DECL_STMT_DECL): Likewise.
5689         (create_implicit_typedef): New function.
5690         (maybe_push_decl): Likewise.
5691         (tsubst_default_argument): New function.
5692         (at_function_scope_p): Likewise.
5693         (add_decl_stmt): Likewise.
5694         (push_permanent_obstack): Likewise.
5695         * call.c (convert_default_arg): Use tsubst_default_argument.
5696         * class.c (add_method): Use push_permanent_obstack.
5697         (build_self_reference): Create a TEMPLATE_DECL for the
5698         self-reference, if necessary.
5699         * decl.c (pseudo_global_level_p): Only look at the current binding
5700         level.
5701         (push_binding): Use push_permanent_obstack.
5702         (create_implicit_typedef): New function.
5703         (pushtag): Use it.
5704         (duplicate_decls): Use push_permanent_obstack.
5705         (maybe_push_decl): New function.
5706         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
5707         (start_decl_1): Remove dead code.
5708         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
5709         pseudo_global_level_p.
5710         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
5711         template.
5712         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
5713         pseudo_global_level_p.
5714         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
5715         a template.
5716         (get_sentry): Use push_permanent_obstack.
5717         * dump.c (dequeue_and_dump): Enable DECL_STMT.
5718         * except.c (call_eh_info): Use push_permanent_obstack.
5719         (build_eh_type_ref): Likewise.
5720         (do_pop_exception): Likewise.
5721         (expand_eh_spec): Likewise.
5722         (alloc_eh_object): Likewise.
5723         (expand_throw): Likewise.
5724         * init.c (build_java_class_ref): Likewise.
5725         * lex.c (get_time_identifier): Likewise.
5726         (free_lang_decl_chain): Correct type.
5727         (retrofit_lang_decl): Adjust accordingly.
5728         (build_lang_field_decl): Likewise.
5729         * lex.h (free_lang_decl_chain): Likewise.
5730         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
5731         * parse.c: Regenerated.
5732         * pt.c (tsubst_default_arguments): New function.
5733         (retrieve_local_specialization): Likewise.
5734         (register_local_specialization): Likewise.
5735         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
5736         pseudo_global_level_p to determine whether or not a template is
5737         primary.
5738         (lookup_template_class): Likewise.  Use create_implicit_typedef.
5739         (instantiate_class_template): Call tsubst_default_arguments for
5740         member functions, if appropriate.
5741         (tsubst_default_argument): New function.
5742         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
5743         * search.c (at_function_scope_p): New function.
5744         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
5745         (finish_label_stmt): Likewise.
5746         (add_decl_stmt): New function.
5747         (begin_class_definition): Likewise.
5748         (finish_typeof): Likewise.
5749         * tree.c (copy_template_template_parm): Likewise.
5750         (copy_to_permanent): Likewise.
5751         (push_permanent_obstack): Define.
5752         (mark_addressable): Use it.
5753         * typeck.c (mark_addressable): Likewise.
5754         
5755 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
5756
5757         * cp-tree.h (init_cplus_unsave): New.
5758         (cplus_unsave_expr_now): New.
5759         * lex.c (init_parse): Call init_cplus_unsave.
5760         * tree.c (init_cplus_unsave): New.
5761         (cplus_unsave_expr_now): New.
5762
5763 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
5764
5765         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
5766         decl_constant_value to simplify array bounds.
5767
5768 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
5769
5770         * lang-options.h: Add -fms-extensions.
5771         * cp-tree.h: Declare flag_ms_extensions.
5772         * decl2.c: Define it.
5773         * class.c (instantiate_type): Don't complain about taking the address
5774         of a bound member function if -fms-extensions.
5775         * typeck.c (build_unary_op): Likewise.
5776         * decl.c (grokdeclarator): Or about implicit int.
5777         * init.c (resolve_offset_ref): Or about implicit '&'.
5778
5779 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
5780
5781         * cp-tree.h (minimal_parse_mode): Remove.
5782         (finish_label_stmt): New function.
5783         * decl.c (saved_scope): Remove minimal parse mode.
5784         (maybe_push_to_top_level): Don't save it.
5785         (pop_from_top_level): Don't restore it.
5786         (define_label): Split out template-handling code to semantics.c.
5787         (start_decl): Don't use minimal_parse_mode.
5788         (cp_finish_decl): Likewise.
5789         (start_function): Don't increment it.
5790         (store_return_init): Don't use it.
5791         (finish_function): Don't decrement it.
5792         * parse.y (label_colon): Use finish_label_stmt throughout.
5793         * parse.c: Regenerated.
5794         * pt.c (minimal_parse_mode): Don't define it.
5795         (tsubst_expr): Use finish_label_stmt.
5796         * semantics.c (finish_label_stmt): New function.
5797
5798         * dump.c (queue): Be careful when computing bitmasks.
5799         (dequeue_and_dump): Describe binfos as binfos, not as
5800         vectors.
5801         
5802         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
5803         throughout.     
5804         * parse.c: Regenerated.
5805         
5806         * Make-lang.in (CXX_SRCS): Remove sig.c.
5807         * Makefile.in (CXX_OBJS): Remove sig.o.
5808         (sig.o): Remove.
5809         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
5810         (CPTI_SIGNATURE_TYPE): Likewise.
5811         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
5812         (opaque_type_node): Likewise.
5813         (signature_type_node): Likewise.
5814         (sigtable_entry_type): Likewise.
5815         (flag_handle_signatures): Likewise.
5816         (lang_type): Remove is_signature, is_signature_pointer,
5817         is_signature_reference, has_opaque_typedecls,
5818         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
5819         signature_pointer_to, signature_reference_to.
5820         (IS_SIGNATURE): Remove.
5821         (SET_SIGNATURE): Remove.
5822         (CLEAR_SIGNATURE): Remove.
5823         (IS_SIGNATURE_POINTER): Remove.
5824         (IS_SIGNATURE_REFERENCE): Remove.
5825         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
5826         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
5827         (CLASSTYPE_SIGNATURE): Remove.
5828         (SIGNATURE_TYPE): Remove.
5829         (SIGNATURE_METHOD_VEC): Remove.
5830         (SIGNATURE_POINTER_TO): Remove.
5831         (SIGNATURE_REFERENCE_TO): Remove.
5832         (lang_decl_flags): Remove is_default_implementation.  Rename
5833         memfunc_pointer_to to saved_tree.
5834         (IS_DEFAULT_IMPLEMENTATION): Remove.
5835         (DECL_MEMFUNC_POINTER_TO): Remove.
5836         (DECL_MEMFUNC_POINTING_TO): Remove.
5837         (DECL_SAVED_TREE): Adjust definition.
5838         (tag_types): Remove signature_type_node.
5839         (SIGNATURE_FIELD_NAME): Remove.
5840         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
5841         (SIGNATURE_OPTR_NAME): Likewise.
5842         (SIGNATURE_SPTR_NAME): Likewise.
5843         (SIGNATURE_POINTER_NAME): Likewise.
5844         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
5845         (SIGNATURE_REFERENCE_NAME): Likewise.
5846         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
5847         (SIGTABLE_PTR_TYPE): Likewise.
5848         (SIGTABLE_NAME_FORMAT): Likewise.
5849         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
5850         (SIGTABLE_TAG_NAME): Likewise.
5851         (SIGTABLE_VB_OFF_NAME): Likewise.
5852         (SIGTABLE_VT_OFF_NAME): Likewise.
5853         (finish_base_specifiers): Change prototype.
5854         (build_signature_pointer_type): Remove.
5855         (build_signature_reference_type): Remove.
5856         (build_signature_pointer_constructor): Remove.
5857         (build_signature_method_call): Remove.
5858         (build_optr_ref): Likewise.
5859         (append_signature_fields): Likewise.
5860         (signature_error): Likewise.
5861         * call.c (build_this): Remove signature support.
5862         (build_over_call): Likewise.
5863         (build_new_method_call): Likewise.
5864         * class.c (add_implicitly_declared_members): Likewise.
5865         (finish_struct_1): Likewise.
5866         (finish_struct): Likewise.
5867         * cvt.c (cp_convert_to_pointer): Likewise.
5868         (convert_to_pointer_force): Likewise.
5869         (ocp_convert): Likewise.
5870         * decl.c (sigtable_decl_p): Remove.
5871         (init_decl_processing): Remove support for signatures.
5872         (cp_finish_decl): Likewise.
5873         (grokdeclarator): Likewise.
5874         (grokparms): Likewise.
5875         (xref_tag): Likewise.
5876         (start_function): Likewise.
5877         (start_method): Likewise.
5878         * decl2.c (finish_sigtable_vardecl): Remove.
5879         (flag_handle_signatures): Remove.
5880         (lang_f_options): Remove handle-signatures.
5881         (grokfield): Remove support for signatures.
5882         (grokbitfield): Likewise.
5883         (finish_file): Likewise.
5884         (reparse_absdcl_as_casts): Likewise.
5885         * error.c (dump_type_real): Likewise.
5886         (dump_function_decl): Likewise.
5887         * friend.c (make_friend_class): Likewise.
5888         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
5889         * hash.h: Regenerated.
5890         * init.c (build_new_1): Remove support for signatures.
5891         * lang-options.h: Remove -fhandle-signatures,
5892         -fno-handle-signatures. 
5893         * lex.c (init_parse): Remove support for signatures.
5894         (yyprint): Likewise.
5895         * lex.h (rid): Remove RID_SIGNATURE.
5896         * method.c (build_decl_overload_real): Remove support for
5897         signatures. 
5898         (hack_identifier): Likewise.
5899         * parse.y (base_class): Likewise.
5900         (base_class.1): Likewise.
5901         (access_specifier): Likewise.
5902         * search.c (lookup_member): Likewise.
5903         * semantics.c (finish_qualified_object_call_expr): Likewise.
5904         (finish_template_type_parm): Likewise.
5905         (begin_class_definition): Likewise.
5906         (finish_base_specifier): Likewise.
5907         * sig.c: Remove.
5908         * tree.c (build_cplus_method_type): Remove support for signatures.
5909         * typeck.c (require_complete_type): Likewise.
5910         (c_sizeof): Likewise.
5911         (c_alignof): Likewise.
5912         (build_object_ref): Likewise.
5913         (build_component_ref): Likewise.
5914         (build_indirect_ref): Likewise.
5915         (build_c_cast): Likewise.
5916         (build_modify_expr): Likewise.
5917         (convert_for_initialization): Likewise.
5918         * typeck2.c (signature_error): Remove.
5919         (store_init_value): Remove support for signatures.
5920         (digest_init): Likewise.
5921         (build_x_arrow): Likewise.
5922         (build_functional_cast): Likewise.
5923         * xref.c (GNU_xref_decl): Likewise.
5924         
5925 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
5926
5927         * lex.c (do_identifier): Remove unnecessary lookup of class field.
5928
5929 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
5930
5931         * decl2.c (set_decl_namespace): Do not complain about non-matching
5932         decls if processing a template.
5933
5934 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
5935
5936         * decl.c (build_ptrmemfunc_type): Handle qualified
5937         pointer-to-member types here.
5938         * tree.c (cp_build_qualified_type_real): Simplify handling here.
5939
5940 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5941
5942         * lex.c (lang_identify): Likewise.
5943
5944 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
5945
5946         * Makefile.in: Update dependencies.
5947         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
5948         NULL_RTX.
5949         * decl.c: Include "function.h"
5950         (cleanup_label, return_label): Delete declarations.
5951         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
5952         (finish_function): Rename last_parm_insn variable to
5953         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
5954         * decl2.c: Include "function.h".
5955         (rtl_expr_chain): Delete declaration.
5956         * method.c: Include "function.h"
5957         * tree.c (build_vbase_pointer_fields): Don't initialize
5958         DECL_SAVED_INSNS with NULL_RTX.
5959         * typeck.c: Include "function.h"
5960
5961 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
5962
5963         * semantics.c (begin_function_try_block, finish_function_try_block,
5964         finish_function_handler_sequence): New fns.
5965         * parse.y (function_try_block): Use them.
5966         * pt.c (instantiate_decl): Likewise.
5967
5968         * cp-tree.h: Declare in_function_try_handler.
5969         * decl.c: Define it.
5970         (start_function): Clear it.
5971         (struct cp_function, push_cp_function_context): Save it.
5972         (pop_cp_function_context): Restore it.
5973         * parse.y (function_try_block): Set and clear it.
5974         * except.c (expand_end_catch_block): Rethrow if we reach the end
5975         of a function-try-block handler in a ctor or dtor.
5976         * typeck.c (c_expand_return): Complain about returning from a
5977         function-try-block handler of a ctor.
5978
5979         * parse.y (function_try_block): Call end_protect_partials
5980         before expand_start_all_catch.
5981
5982 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
5983
5984         * decl.c (struct binding_level): Add eh_region field.
5985         (push_binding_level): Set it.
5986         (define_label): Complain about jumping into an EH block.
5987
5988         * ptree.c (print_lang_type): Print the real type of a PMF.
5989         Print what exceptions a fn type throws.
5990
5991 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5992
5993         * class.c (count_fields, add_fields_to_vec): Add static prototype.
5994
5995         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
5996         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
5997         char*.
5998
5999         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
6000         Constify a char*.
6001
6002         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
6003         char*.
6004
6005         * dump.c (queue_and_dump_index, dump_int, dump_string,
6006         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
6007         a char*.
6008         (dump_stmt): Add static prototype.
6009
6010         * errfn.c (cp_thing): Constify a char*.
6011
6012         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
6013         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
6014         dump_expr): Constify a char*.
6015
6016         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
6017         read_line_number): Add static prototype.
6018         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
6019         (real_yylex): Move label `letter' into the scope where it is used.
6020
6021         * method.c (build_mangled_template_parm_index, build_overload_int,
6022         build_decl_overload_real, get_id_2): Constify a char*.
6023
6024         * search.c (check_final_overrider): Make static.
6025
6026         * typeck.c (composite_pointer_type): Constify a char*.
6027
6028 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
6029
6030         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
6031         we're looking at a class.
6032
6033         * decl.c (lookup_name_real): Set the complain flag if we're
6034         looking for a namespace member.
6035
6036         * lex.c (real_yylex): We can have a number with no digits.
6037
6038         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
6039
6040         * search.c (binfo_from_vbase): New fn.
6041         * cp-tree.h: Declare it.
6042         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
6043         from pointer to member of virtual base.  
6044         * typeck.c (get_delta_difference): Likewise.
6045
6046 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
6047
6048         * pt.c (tsubst): Use build_index_type to build in-template array
6049         index type.  Fixes g++.oliva/dwarf1.C.
6050         * decl.c (grokdeclarator): Likewise, just for consistency, as it
6051         doesn't seem to trigger the bug without it.
6052
6053 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
6054
6055         * typeck2.c (add_exception_specifier): Use complete_type.
6056
6057 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
6058
6059         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
6060         (dump_binary_op): Bulletproof.
6061         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
6062         * tree.c (search_tree): Don't enumerate all the nodes of classes
6063         `1', `2', and `<'; handle them generically.  Don't be sorry about
6064         "unrecognized tree codes"; just abort.
6065         (no_linkage_check): Don't do linkage checks for templates.
6066         
6067         * tree.c (cp_build_qualified_type_real): Handle
6068         pointer-to-member-function types correctly.
6069
6070 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
6071
6072         * decl.c (pushdecl): Only give an error for shadowing a parm 
6073         from *this* function.
6074
6075 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
6076
6077         * typeck2.c: Update URLs and mail addresses.
6078
6079 1999-08-04  Nathan Sidwell  <nathan@acm.org>
6080
6081         * cp-tree.h (empty_except_spec): New global var.
6082         (compexcepttypes): Remove prototype.
6083         (comp_except_specs): Prototype new global function.
6084         (add_exception_specifier): Prototype new global function.
6085         * decl.c (empty_except_spec): Define new global var.
6086         (duplicate_decls): Use comp_except_specs, reword error message.
6087         (init_decl_processing): Initialize empty_except_spec.
6088         Adjust build_exception_variant calls.
6089         * parse.y (exception_specification_opt): Use empty_except_spec.
6090         (ansi_raise_identifier): Call check_for_new_type.
6091         (ansi_raise_identifiers): Use add_exception_specifier.
6092         * pt.c (tsubst): Use add_exception_specifier to build exception
6093         specifier.
6094         * search.c (check_final_overrider): New static function, broken
6095         out of get_matching_virtual. Check throw specifiers, reword
6096         diagnostics.
6097         (get_matching_virtual): Use check_final_overrider.
6098         * tree.c (build_exception_variant): Use comp_except_specs.
6099         * typeck.c (compexcepttypes): Remove.
6100         (comp_except_types): New static function, helper for
6101         comp_except_specs. Compare two types as exception specifiers.
6102         (comp_except_specs): New global function, compare two exception
6103         specifiers.
6104         (comptypes): Adjust for comp_except_specs.
6105         * typeck2.c (add_exception_specifier): New global function.
6106         
6107         * class.c (check_for_override): Reword error message.
6108
6109 1999-08-03  Nathan Sidwell  <nathan@acm.org>
6110
6111         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
6112         * cp-tree.h (struct lang_type): Added non_pod_class flag.
6113         (CLASSTYPE_NON_POD_P): New macro to access it.
6114         * class.c (finish_struct_1): Determine non-PODness.
6115         Check for arrays of pointers (-Weffc++).
6116         Remove array inspection duplicated code.
6117         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
6118         Use CLASSTYPE_NON_POD_P.
6119
6120 1999-08-03  Nathan Sidwell  <nathan@acm.org>
6121
6122         * class.c (duplicate_tag_error): Preserve template information.
6123
6124 1999-08-03  Nathan Sidwell  <nathan@acm.org>
6125
6126         * decl.c (start_enum): Show location of previous definition.
6127         * parse.y (enumlist_opt): New reduction.
6128         (structsp): Simplify enum rules to use enumlist_opt.
6129
6130 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
6131
6132         * lex.c (yyprint): Handle PFUNCNAME.
6133
6134         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
6135         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
6136
6137 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
6138
6139         * decl.c (start_decl): Set attributes before duplicate_decls call.
6140
6141 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
6142
6143         * Make-lang.in (CXX_SRCS): Add dump.c.
6144         * Makefile.in (CXX_OBJS): Add dump.o.
6145         (dump.o): New target.
6146         * cp-tree.h (DECL_CONV_FN_P): Document.
6147         (DECL_OVERLOADED_OPERATOR_P): New function.
6148         (TYPE_PTRMEM_CLASS_TYPE): New macro.
6149         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
6150         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
6151         (ASM_VOLATILE_P): New macro.
6152         (STMT_LINENO): Likewise.
6153         (cp_namespace_decls): New function.
6154         (dump_node_to_file): New function.
6155         * decl.c (cp_namespace_decls): New function.
6156         (walk_namespaces_r): Use it.
6157         (wrapup_globals_for_namespace): Likewise.
6158         * decl2.c (flag_dump_translation_unit): New variable.
6159         (lang_decode_option): Handle -fdump-translation-unit.
6160         (finish_file): If flag_dump_translation_unit is set, dump the
6161         translation unit.
6162         * dump.c: New file.
6163         * lang-options.h: Add -fdump-translation-unit.
6164         * pt.c (tsubst_template_parms): Robustify.
6165         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
6166         (tsubst_expr): Use STMT_LINENO.
6167         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
6168         for invalid cv-qualifiers even while building templates.
6169         
6170 1999-08-02  Richard Henderson  <rth@cygnus.com>
6171
6172         * call.c: Include defaults.h instead of expr.h.
6173         * decl.c: Likewise.
6174         * pt.c: Likewise.
6175         * typeck.c: Include defaults.h.
6176
6177 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
6178
6179         * lex.c (errorcount, sorrycount): Don't declare.
6180         * repo.c (errorcount, sorrycount): Likewise.
6181         * typeck2.c (errorcount, sorrycount): Likewise.
6182
6183 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
6184
6185         * call.c (convert_default_arg, build_over_call): Change all uses of
6186         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
6187         Ensure expr.h is included.
6188         * decl.c (grokparams): Ditto.
6189         * pt.c (tsubst_decl): Ditto.
6190         * typeck.c (convert_arguments): Ditto.
6191
6192 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
6193
6194         * class.c (mark_overriders): Fix order of args to overrides.
6195         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
6196         functions with the same name.
6197
6198 1999-08-02  Richard Henderson  <rth@cygnus.com>
6199
6200         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
6201
6202 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
6203
6204         * call.c (build_conditional_expr): Fix typo in comment.
6205
6206 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
6207
6208         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
6209         case_stack; use in_control_zone_p.
6210         * typeck.c (c_expand_return): Likewise.
6211
6212 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
6213
6214         * except.c (catch_clauses): Delete declaration.
6215
6216 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
6217
6218         * call.c (build_conditional_expr): Call convert_from_reference to
6219         avoid reference/non-reference type confusion.  Fix typo.
6220
6221 1999-07-30  Richard Henderson  <rth@cygnus.com>
6222
6223         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
6224         * cp-tree.h (initializer_constant_valid_p): Remove.
6225
6226 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
6227
6228         * call.c (conditional_conversion): Don't build BASE_CONVs for
6229         conversions between things that have the same type.
6230         (build_conditional_expr): Tweak.
6231         (convert_like): Some BASE_CONVs really do require the generation
6232         of code.
6233         
6234         * init.c (perform_member_init): Don't go through build_modify_expr
6235         for simple initializations.
6236
6237 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
6238
6239         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
6240         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
6241         virtual functions and MI.  Simplify.
6242
6243         * method.c: Remove prototype for largest_union_member.
6244         * pt.c (determine_specialization): Fix uninitialized warning.
6245         * lex.c (real_yylex): Likewise.
6246
6247 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
6248
6249         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
6250         here too.
6251
6252         * cp-tree.h (BINFO_VIRTUALS): Document new format.
6253         * class.c (modify_one_vtable): Change prototype accordingly.
6254         (modify_all_vtables): Likewise.
6255         (modify_all_direct_vtables): Likewise.
6256         (modify_all_indirect_vtables): Likewise.
6257         (build_vtable_entry_for_fn): New function.
6258         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
6259         (modify_vtable_entry): Likewise.
6260         (add_virtual_function): Likewise.
6261         (build_vtbl_initializer): New function.
6262         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
6263         (fixup_vtable_deltas1): Likewise.
6264         (fixup_vtable_deltas): Likewise.
6265         (override_one_vtable): Likewise.
6266         (finish_struct_1): Likewise.
6267
6268         * error.c (dump_expr): Likewise.
6269         * search.c (get_abstract_virtuals_1): Likewise.
6270         (get_abstract_virtuals): Likewise.
6271         (expand_upcast_fixups): Likewise.
6272         * tree.c (debug_binfo): Likewise.
6273         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
6274         __pure_virtual here.
6275         
6276 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
6277
6278         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
6279         as per 1999-07-26 change.
6280
6281         * typeck.c (c_sizeof): Don't allow non-static data members.
6282         (expr_sizeof): Likewise.
6283
6284 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
6285
6286         * input.c (feed_input): Only touch lineno and input_filename
6287         if !USE_CPPLIB.  Save the old values before setting the new ones.
6288
6289         * input.c (feed_input): Add file, line parms.
6290         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
6291         (real_yylex): Check linemode before input_redirected().
6292
6293         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
6294         from op new to warning.
6295
6296 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
6297
6298         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
6299         * call.c: All uses changed.
6300         * typeck.c: Likewise.
6301
6302 1999-07-26  Nathan Sidwell  <nathan@acm.org>
6303
6304         * exception.cc (__cplus_type_matcher): Match __eh_matcher
6305         prototype.
6306
6307 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
6308
6309         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
6310         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
6311         (strip_top_quals): Declare.
6312         (ncp_convert): Likewise.
6313         (type_after_usual_arithmetic_converions): Likewise.
6314         (composite_pointer_type): Likewise.
6315         * call.c (strip_top_quals): Don't make it static.
6316         (promoted_arithmetic_type_p): New function.
6317         (conditional_conversion): Likewise.
6318         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
6319         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
6320         for converting a type to itself.
6321         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
6322         (implicit_conversion): Make sure the from and to types are
6323         complete.
6324         (add_builtin_candidate): Correct handling of ?: operator.
6325         (add_builtin_candidates): Improve documentation.
6326         (build_conditional_expr): New function.
6327         (can_convert): Implement in terms of can_convert_arg.
6328         (ncp_convert): New function.
6329         * typeck.c (type_after_usual_arithmetic_conversions): New
6330         function, split out from common_type.
6331         (composite_pointer_type): New function, split out from
6332         build_conditional_expr.
6333         (common_type): Use type_after_usual_arithmetic_conversions.
6334         Remove redundant attribute merging.
6335         (comptypes): Tidy.  Handle COMPLEX_TYPE.
6336         (build_binary_op_nodefault): Use null_ptr_cst_p.
6337         (build_conditional_expr): Remove.
6338         (convert_for_assignment): Use new conversion functions.
6339         
6340         * cp-tree.h (abstract_virtuals_error): Change declaration.
6341         * typeck2.c (abstract_virtuals_error): Check to see if an error
6342         ocurred, and return a boolean value accordingly.
6343         (build_functional_cast): Adjust accordingly.
6344         * class.c (finish_struct_1): Likewise.
6345         * cvt.c (ocp_convert): Likewise.
6346         * decl.c (cp_finish_decl): Likewise.
6347         (grokparams): Likewise.
6348         (grok_op_properties): Likewise.
6349         (start_function): Likewise.
6350         * init.c (build_new_1): Likewise.
6351
6352         * pt.c (unify): Don't get confused by pointers-to-member functions.
6353
6354         * search.c (build_cplus_new): Robustify.
6355         
6356 1999-07-24  Richard Henderson  <rth@cygnus.com>
6357
6358         * gxx.gperf (__builtin_va_arg): New.
6359         * parse.y (VA_ARG): New token.
6360         (unary_expr): Recognize it.
6361
6362 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
6363
6364         * g++FAQ.texi: Deleted per Joe Buck's request.
6365         * Makefile.in: Corresponding changes.
6366
6367 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
6368
6369         * lex.c: Sync with C frontend.
6370         (whitespace_cr): New fn.
6371         (skip_white_space): Use it.
6372         (init_parse): Reorder.
6373         (yyprint): Support CONSTANT.
6374         (pragma_getc, pragma_ungetc): Bring back.
6375         (read_line_number): Change in_system_header directly.
6376         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
6377         (parse_float): Update to C version.
6378         (yylex): Handle '$' under the letter case.
6379         Remove looking_for_typename handling.
6380         Support hex floating point constants.
6381         Follow C's lead for choosing type of integer constants.
6382         Rearrange stuff to match C frontend.
6383         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
6384         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
6385
6386 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
6387
6388         * call.c (reference_binding): Tweak.
6389         (mayble_handle_implicit_object): Use direct_reference_binding to
6390         create the right implicit conversion sequence.
6391
6392 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
6393
6394         * pt.c (convert_nontype_argument): Don't call decl_constant_value
6395         if we're converting to a reference type.
6396
6397         * call.c (NEED_TEMPORARY_P): New macro.
6398         (standard_conversion): Set it, for derived-to-base conversions.
6399         (reference_related_p): New function.
6400         (reference_compatible_p): Likewise.
6401         (convert_class_to_reference): Likewise.
6402         (direct_reference_binding): Likewise.
6403         (reference_binding): Rework for standards-compliance.
6404         (convert_like): Adjust accordingly.
6405         (maybe_handle_ref_bind): Simplify; the right conversion sequences
6406         are now built up in reference_binding.
6407         (initialize_reference): New function.
6408         * cp-tree.h (ICS_USER_FLAG): Document.
6409         (ICS_THIS_FLAG): Likewise.
6410         (ICS_BAD_FLAG): Likewise.
6411         (NEED_TEMPORARY_P): Likewise.
6412         (cp_lvalue_kind): New type.
6413         (real_lvalue_p): Return it.
6414         * error.c (dump_expr): Provide more accurate representation for
6415         AGGR_INIT_EXPRs.
6416         * init.c (expand_default_init): Do not try to perform implicit
6417         conversions for a brace-enclosed initializer.
6418         * search.c (lookup_conversions): Document.
6419         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
6420         appropriately.
6421         (real_lvalue_p): Adjust accordingly.
6422         (lvalue_p): Likewise.
6423         (build_cplus_new): Don't allow the creation of an abstract class.
6424         * typeck.c (convert_for_initialization): Use initialize_reference.
6425         
6426 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
6427
6428         * lex.c (real_yylex) : Correct the test for overflow when lexing
6429         integer literals.
6430
6431 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
6432
6433         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
6434         not DECL_BUILT_IN, to determine if a function is internally declared.
6435         (duplicate_decls): Likewise.  Improve handling of builtins.
6436         (push_overloaded_decl): Remove special handling of builtins.
6437
6438         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
6439
6440         * decl.c (grokdeclarator): Pull out decl_constant_value in
6441         templates, too.
6442
6443         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
6444         * cp-tree.h, pt.c, semantics.c: Adjust.
6445         * method.c (largest_union_member): Remove.
6446
6447         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
6448
6449         * lex.c (token_getch, token_put_back): New fns.
6450         (real_yylex): Use them.
6451
6452         * lex.c (lang_init): Generalize.
6453         (lang_init_options): Tell cpplib this is C++.
6454         (nextchar): Remove.  Replace uses with put_back.
6455         (skip_white_space): Handle linemode here.  Optimize for cpplib.
6456         (extend_token_buffer_to): New fn.
6457         (extend_token_buffer): Use it.
6458         (read_line_number, check_newline): Just deal with tokens.
6459         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
6460         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
6461         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
6462         * parse.y (PAREN_STAR_PAREN): Remove.
6463         * input.c: Don't use the putback machinery with cpplib.
6464         (sub_getch): Fold back into getch.
6465         (getch): Don't handle linemode here.
6466         (feed_input): Unget any text in the token buffer.
6467
6468         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
6469         nextyychar, nextyylval): Remove.
6470
6471 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
6472             Jason Merrill  <jason@yorick.cygnus.com>
6473
6474         * lex.c (indent_level): New variable.
6475         (init_parse): Set cpp_token to CPP_DIRECTIVE.
6476         (consume_string): Make this smart about USE_CPPLIB.
6477         (yyungetc): Use put_back function.
6478         (pragma_getc, pragma_ungetc): Functions deleted.
6479         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
6480         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
6481         pragma_ungetc.
6482         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
6483         Also, clean up cases where we redundantly set token_buffer[0].
6484         (read_line_number): New fn.
6485         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
6486         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
6487         (sub_getch): Conditionalize out code that's not appropriate if
6488         USE_CPPLIB.
6489         (put_back): Rewrite in case USE_CPPLIB is defined.
6490         (input_redirected): Ditto.
6491
6492 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
6493
6494         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
6495         c_global_trees and accessor macros defined in c-common.h.
6496         (cp_tree_index): New enumeration.
6497         (cp_global_trees): Declare new array.  Add accessor macros for it, and
6498         delete declarations of tree nodes replaced by it.
6499         (builtin_function): Delete macro, add declaration for new function.
6500         Include c-common.h.
6501         * decl.c: Delete definitions for tree nodes that were replaced by
6502         cp_global_trees and c_global_trees.
6503         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
6504         to generate the common builtins here.
6505         (builtin_function): New function.
6506         * decl2.c (abort_fndecl): Delete declaration.
6507         * except.c (expand_builtin_return_address): Delete declaration.
6508         (builtin_return_address_fndecl): Delete variable.
6509         (const_ptr_type_node): Delete declaration.
6510         * lex.c (cons_up_default_function): Delete declaration of
6511         void_list_node.
6512         * parse.y (void_list_node): Delete declaration.
6513         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
6514         Delete variables.
6515         (const_string_type_node): Delete declaration.
6516         * search.c (abort_fndecl): Delete declaration.
6517         * Makefile.in: Update dependencies.
6518
6519 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
6520
6521         * pt.c (check_default_tmpl_args): Move test for missing default
6522         arguments here, from ...
6523         (end_template_parm_list): Here.
6524
6525 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
6526
6527         * decl.c (lookup_nested_type): Remove.
6528         (pushtag): Don't call it.
6529
6530 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
6531
6532         * Makefile.in (INTERFACE): Bump to 2.
6533
6534 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
6535         
6536         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
6537         instructions to gcc.gnu.org.  Removed e-mail address.
6538
6539 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
6540
6541         * pt.c (determine_specialization): Tighten error-checking.
6542         (end_template_parm_list): Likewise.
6543
6544 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
6545
6546         * pt.c (check_default_tmpl_args): Handle friends defined in the
6547         class just like member functions defined in the class.
6548
6549 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
6550             Jason Merrill  <jason@yorick.cygnus.com>
6551
6552         * cp-tree.h (struct lang_decl): Added field for storing sorted
6553         FIELD_DECLs (used in TYPE_DECLs).
6554         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
6555         (DECL_SORTED_FIELDS): New macro.
6556         * class.c (method_name_cmp): New function.
6557         (finish_struct_methods): Modified to support sorting and searching
6558         methods.
6559         (finish_struct_anon): Changed code in inner loop to use ELT rather 
6560         than UELT (which required an extra indirection for every reference).
6561         (field_decl_cmp): New function to support sorting FIELD_DECLs.
6562         (finish_struct_1): Sort fields.
6563         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
6564         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
6565         Also, switch to using array indexing rather than a changing pointer.
6566         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
6567         DECL_SORTED_FIELDS.
6568
6569 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
6570
6571         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
6572         casts in system headers or extern "C" blocks.
6573
6574         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
6575         errors to pedwarn.
6576
6577 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
6578
6579         * decl2.c (write_virtuals): Deleted declaration.
6580         * cp-tree.h (write_virtuals): Deleted extern declaration.
6581         * class.c (finish_struct_1): Removed #if 0'd code that mentions
6582         write_virtuals.
6583         * semantics.c (begin_class_definition): Rewrite code to not depend
6584         on write_virtuals.
6585
6586         * lex.c (cp_pragma_interface): New function.
6587         (cp_pragma_implementation): Likewise.
6588         (handle_cp_pragma): Call them.
6589
6590         * typeck.c (comptypes): Simplify C code in look_hard.
6591
6592         * xref.c (PALLOC): Use xcalloc, not calloc.
6593         (SALLOC): Use xmalloc, not malloc.
6594
6595         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
6596
6597         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
6598         is NO_DEBUG.
6599
6600         * decl.c (duplicate_decls): If a redeclaration doesn't match the
6601         initial declaration, then don't save the inline info and by all
6602         means don't mark the function as a builtin function.
6603
6604         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
6605         CURRENT_CLASS_TYPE is 0.
6606
6607         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
6608         NULL_TREE.
6609
6610         * ptree.c (print_lang_type): Added vtable-needs-writing.
6611
6612 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
6613
6614         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
6615
6616 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
6617
6618         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
6619         Merged into c-common.
6620
6621 1999-07-05  Dave Brolley  <brolley@cygnus.com>
6622
6623         * lex.c (errorcount): Declare it.
6624         (finish_parse): Update errorcount for when using CPPLIB.
6625
6626 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
6627
6628         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
6629         parameters.
6630         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
6631         * decl.c (push_class_binding): Use it.
6632         (lookup_name_real): Likewise.
6633
6634 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
6635
6636         * cp-tree.h (widest_integer_literal_type_node,
6637         widest_unsigned_literal_type) : New.
6638         * decl.c (widest_integer_literal_type_node,
6639         widest_unsigned_literal_type) : New.
6640         (init_decl_processing): Handle/use the two new types.
6641         * lex.c (real_yylex): Same.
6642         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
6643         Same. 
6644
6645 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
6646
6647         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
6648         to anonymous cv-qualified types.
6649
6650 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
6651
6652         * lex.c (real_yylex) : Change integer literal overflow handling to
6653         be like c-lex.c.
6654
6655         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
6656
6657 1999-06-28  Richard Henderson  <rth@cygnus.com>
6658
6659         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
6660
6661 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
6662
6663         * error.c (dump_type_real): Handle TREE_LIST again.
6664
6665         * typeck.c (comp_target_parms): Don't complain about 
6666         converting from () to (...) if !flag_strict_prototype.
6667
6668         * decl.c (grokdeclarator): Update the names of all variants when
6669         de-anonymizing.
6670
6671 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
6672
6673         * init.c (expand_aggr_vbase_init): Rename to
6674         construct_virtual_bases.  Conditionalize construction here, 
6675         rather than ...
6676         (emit_base_init): Here.
6677
6678 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
6679
6680         * semantics.c (finish_asm_stmt): Apply decay conversions to
6681         input operands.
6682
6683         * decl.c (expand_static_init): When building an anonymous function
6684         for use with atexit, compute its body before and after entering
6685         the function.
6686
6687         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
6688         EXIT_EXPR.
6689         
6690 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
6691
6692         * init.c (expand_aggr_vbase_init): Add flag parameter.
6693         (build_partial_cleanup_for): Remove, inlining into ..
6694         (expand_cleanup_for_base): ... here.  Take flag parameter.
6695         (emit_base_init): Pass the in_chrg parameter to
6696         emit_aggr_vbase_init. 
6697         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
6698         
6699 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
6700
6701         * decl2.c (import_export_decl): Use same_type_p, rather than
6702         relying on pointer-equality for types.
6703
6704         * method.c (do_build_copy_constructor): Simplify.
6705
6706         * call.c (build_method_call): Remove bogus code for two-argument
6707         delete.
6708         * init.c (build_new_1): Expand on comment, and remove dead code.
6709
6710         * init.c (expand_cleanup_for_base): New function, split out
6711         from ...
6712         (emit_base_init): Here.
6713         (expand_aggr_vbase_init): Use it.
6714
6715 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
6716
6717         * cp-tree.h (class_cache_firstobj): Declare.
6718         (maybe_push_cache_obstack): Rename to push_cache_obstack.
6719         * class.c (permanent_obstack): Remove declaration.
6720         (class_cache_firstobj): Make it global.
6721         (add_method): Don't use permanent_obstack directly.
6722         (pushclass): Only free the class_cache_obstack if we know how far
6723         back to free it.
6724         (maybe_push_cache_obstack): Rename to push_cache_obstack.
6725         * decl.c: Remove dead comment.
6726         (saved_scope): Add class_cache_firstobj.
6727         (push_to_top_level): Save it.
6728         (pop_from_top_level): Restore it.
6729         (push_class_level_binding): Use push_cache_obstack, not
6730         maybe_push_cache_obstack.
6731         * search.c (push_class_decls): Likewise.
6732         
6733 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6734
6735         * pt.c (tsubst_friend_function): Push into namespace of friend
6736         function before pushdecl'ing it.
6737
6738 1999-06-14  Nathan Sidwell  <nathan@acm.org>
6739
6740         * call.c (build_new_op): Remove REF_BIND from all operands.
6741
6742 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
6743
6744         * init.c (build_new_1): Look up operator delete even if there was
6745         no explicit new placement.
6746
6747 1999-06-08  Nathan Sidwell  <nathan@acm.org>
6748
6749         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
6750         of ...
6751         (build_throw): ... here. Call it.
6752         (process_start_catch_block): Call it.
6753
6754 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
6755
6756         * search.c (convert_pointer_to_single_level): Reimplement without
6757         using get_binfo.
6758
6759 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
6760
6761         * method.c (is_back_referenceable_type): Back-reference bools when
6762         not squangling.
6763
6764 1999-06-07  Dave Brolley  <brolley@cygnus.com>
6765
6766         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
6767         * input.c (putback_buffer): New structure type.
6768         (putback): Replaces putback_char member.
6769         (putback): Replaces putback_char static variable.
6770         (feed_input): Use putback.
6771         (end_input): Use putback.
6772         (sub_getch): Use putback.
6773         (put_back): Use putback.
6774
6775 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
6776
6777         * decl.c (grokdeclarator): Fix typo in last change.
6778
6779 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
6780
6781         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
6782         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
6783
6784 1999-06-04  Nathan Sidwell  <nathan@acm.org>
6785
6786         * except.c (build_throw): Check throw expression validity.
6787
6788 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
6789
6790         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
6791         just because flag_signed_bitfields is false.
6792
6793 1999-06-03  Nathan Sidwell  <nathan@acm.org>
6794
6795         * semantics.c (begin_class_definition): Update the struct's
6796         location here ...
6797         * class.c (finish_struct): ... rather than here.
6798
6799         * decl.c (make_typename_type): Don't rely on uninitialized
6800         variable.
6801
6802 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6803
6804         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
6805
6806 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
6807
6808         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
6809         and friends rather than messing with current_obstack directly.
6810         (cp_build_qualified_type_real): Rework ARRAY_TYPE
6811         allocation to match practice throughout the rest of the 
6812         compiler.
6813
6814 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
6815
6816         * lex.c (make_lang_type): Create TYPE_BINFO for
6817         TEMPLATE_TYPE_PARMs just like for non-template types.
6818
6819         * decl.c (start_decl): Move checks on initialization to ...
6820         (cp_finish_decl): Here.  Tidy formatting slightly.
6821
6822 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
6823
6824         * decl.c (add_binding): Don't complain about a redeclaration of a
6825         semantically identical typedef in a local scope.
6826
6827 1999-05-28  Nathan Sidwell  <nathan@acm.org>
6828
6829         * decl.c (complete_array_type): Allocate off same obstack. Fix
6830         DO_DEFAULT comment to match reality.
6831
6832         * friend.c (make_friend_class): Fix diagnostic typo.
6833
6834 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
6835
6836         * decl.c (lookup_namespace_name): Handle getting a
6837         TEMPLATE_ID_EXPR.
6838         (expand_static_init): Don't call pushdecl for implicitly declared
6839         `atexit' used to register destructors.
6840
6841 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
6842
6843         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
6844         intialize a vtable.
6845
6846         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
6847         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
6848         by combining TEMPLATE_INFO and LEVEL into a single union.
6849         (DECL_TEMPLATE_INFO): Reformat.
6850         (DECL_SAVED_TREE): Document.
6851         (DECL_TEMPLATE_INJECT): Remove.
6852         * class.c (finish_struct): Remove code to deal with
6853         DECL_TEMPLATE_INJECT. 
6854
6855         * decl.c (maybe_process_template_type_declaration): Handle all new
6856         types in templates uniformly.
6857         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
6858         DECL_CONTEXT.
6859         * pt.c (lookup_template_class): Inject template instantiations of
6860         forward-declarations.
6861         (instantiate_class_template): Remove code processing
6862         DECL_TEMPLATE_INJECT.
6863         
6864         * pt.c (lookup_template_class): Tweak lookup to find member
6865         templates.
6866
6867         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
6868         ASM_CV_QUAL.
6869         * semantics.c (finish_asm_stmt): Make strings permanent if they're
6870         used in a template.
6871         
6872 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
6873
6874         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
6875         parts of pointer to data member types.
6876
6877 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
6878
6879         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
6880         and then make it look like `abort'.  Just use `abort' instead.
6881         
6882         * typeck.c (build_static_cast): Don't allow static_casts that cast
6883         away constness.
6884         (casts_away_constness_r): New function.
6885         (casts_away_constness): Likewise.
6886
6887         * decl.c (lookup_tag): Remove code no longer needed after
6888         name-lookup improvements.
6889         * decl2.c (handle_class_head): Make error-recovery more robust.
6890         * friend.c (make_friend_class): Reject templated typename types.
6891         * lex.c (is_global): A template parameter isn't global.
6892         * parse.y (class_head): Robustify.
6893         * parse.c: Regenerated.
6894         
6895 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
6896
6897         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
6898         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
6899         
6900         * cp-tree.h (push_nested_namespace): Declare.
6901         (pop_nested_namespace): Likewise.
6902         * decl.c (push_nested_namespace): New function.
6903         (pop_nested_namespace): Likewise.
6904         * pt.c (instantiate_class_template): Use them.
6905
6906         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
6907
6908         * cp-tree.h (cplus_expand_constant): Declare.
6909         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
6910         converted from one pointer-to-object type to another.
6911         * expr.c (cplus_expand_constant): Don't make it static.
6912         * typeck.c (build_component_ref): Don't crash when presented with
6913         a component which is a TEMPLATE_DECL.
6914         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
6915         cast from a pointer-to-member constant to its own type does not
6916         result in a valid non-type template argument.
6917
6918 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
6919             Nathan Sidwell  <nathan@acm.org>
6920         
6921         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
6922         * cp-tree.h: Fix typo in documentation on pointers-to-members.
6923         (cp_build_qualified_type): Make it a macro.
6924         (cp_build_qualified_type_real): Declare.
6925         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
6926         problem with template parameters and restrict-qualification.
6927         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
6928         * hash.h: Regenerated.
6929         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
6930         the enumeration.
6931         (NORID): Remove definition.
6932         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
6933         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
6934         (fn_type_unification): Check that the function type resulting from
6935         the deduction is legal.
6936         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
6937         (unify): Use cp_build_qualified_type_real.
6938         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
6939         (cp_build_qualified_type): Rename to ...
6940         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
6941         and modify appropriately.
6942         
6943         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
6944         reveal optimization opportunities.
6945
6946         * pt.c (tsubst): Don't issue error messages when we're not
6947         complaining, even if we see a qualified function type.
6948         (check_cv_quals_for_unify): Don't allow a qualified function
6949         type.
6950
6951 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
6952
6953         * class.c (instantiate_type): Downgrade errors for object-dependent
6954         memfn refs to pedwarn.
6955
6956 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
6957
6958         * decl.c (grokdeclarator): Don't treat [] as indicating a
6959         zero-sized array in a typedef.
6960
6961         * call.c (build_object_call): Don't look at DECL_NAME for a type.
6962         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
6963         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
6964
6965         * pt.c (for_each_template_parm): Rework to match documentation.
6966         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
6967
6968 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
6969
6970         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
6971
6972         * class.c (finish_base_struct): Allow non-COM bases for COM classes
6973         except at the leftmost position.
6974         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
6975         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
6976         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
6977
6978         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
6979         (build_cplus_new): Make sure that what we return is of the right type.
6980
6981 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
6982
6983         * cp-tree.h (make_ptrmem_cst): New function.
6984         * expr.c (cplus_expand_constant): Split out from ...
6985         (cplus_expand_expr): Here.  Use cplus_expand_constant.
6986         (init_cplus_expand): Set lang_expand_constant.
6987         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
6988
6989         * tree.c (make_ptrmem_cst): Define.
6990         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
6991         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
6992
6993 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
6994
6995         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
6996
6997         * decl2.c (start_static_storage_duration_function): Fix comment.
6998         (finish_file): Create static storage duration functions lazily.
6999
7000 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
7001
7002         Implement anonymous structs.
7003         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
7004         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
7005         * class.c (finish_struct_1): Remove redundant check for anon struct.
7006         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
7007         (check_tag_decl): Check for anonymous struct here.
7008         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
7009         * init.c (sort_member_init, emit_base_init): Handle getting fields
7010         as well as names in current_member_init_list.
7011         (perform_member_init): Handle getting an anon aggr.
7012         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
7013         (do_build_copy_constructor): Likewise.
7014
7015 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
7016
7017         * tree.c (cp_build_qualified_type): Don't allow qualified function
7018         types.
7019
7020 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
7021
7022         * gxxint.texi: Fix typo.
7023
7024 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
7025
7026         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
7027         * class.c (finish_struct_1): Use CLASS_TYPE_P.
7028         * ptree.c (print_lang_type): Likewise.
7029         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
7030         IS_AGGR_TYPE_CODE.
7031         * typeck2.c (digest_init): Likewise.
7032
7033 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
7034
7035         * call.c (joust): Compare the types of the conv ops, not the
7036         target types of the conversions.
7037
7038 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
7039
7040         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
7041         was not given.
7042
7043 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
7044
7045         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
7046         * decl.c (grokfndecl): Don't allow inline declarations of friend
7047         template specializations, or friend template specializations with
7048         default arguments.
7049         * pt.c (tsubst): Handle substitution into array types that does
7050         not yield a fixed upper bound, even when not processing a
7051         template.
7052         (tsubst_copy): Deal with the fact that the second operand to a
7053         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
7054         * search.c (marked_pushdecls_p): Don't descend into
7055         TEMPLATE_TYPE_PARMs and the like.
7056         (unmarked_pushdecls_p): Likewise.
7057         
7058         * call.c (build_over_call): Don't throw away
7059         initializations/copies of empty classes; use MODIFY_EXPR and
7060         INIT_EXPR as for non-empty classes.
7061         * class.c (finish_struct_1): Put the padding byte for an empty
7062         class on the TYPE_NONCOPIED_PARTS list for the class.
7063
7064 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
7065
7066         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
7067         indicate a reference to a field that is a qualified name.
7068
7069 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
7070
7071         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
7072         ASM_OUTPUT_CONSTRUCTOR.
7073
7074         * friend.c (do_friend): Add attrlist arg.  Remove support for
7075         getting a non-decl as 'decl'.
7076         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
7077         rtl.
7078         (grokdeclarator): Adjust.
7079         * cp-tree.h: Adjust.
7080
7081 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
7082
7083         * cp-tree.h (permanent_p): New function.
7084         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
7085         possibly complex tree node.
7086         * tree.c (mapcar): Adjust comments, and follow coding standards in
7087         conditional.
7088         (permanent_p): New function.
7089
7090 1999-05-13  Per Bothner  <bothner@cygnus.com>
7091
7092         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
7093         primitive Java types, if we actually see `extern "Java"'.
7094
7095 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
7096
7097         * lang-specs.h: Pass -$ to the preprocessor.
7098
7099 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
7100
7101         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
7102         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
7103         (resolve_offset_ref): Don't handle a raw baselink.
7104         * cvt.c (build_expr_type_conversion): Likewise.
7105         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
7106         convert_for_initialization): Likewise.
7107         * class.c (instantiate_type): Handle seeing a baselink under an
7108         OFFSET_REF.
7109         * error.c (dump_expr): Likewise.        
7110         * pt.c (for_each_template_parm): Likewise.
7111         (resolve_overloaded_unification): Likewise.
7112         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
7113         * typeck.c (expr_sizeof): Also complain about other permutations
7114         of overloaded functions.
7115
7116 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
7117
7118         * init.c (resolve_offset_ref): Don't return a raw method.
7119         Use BASELINK_P.
7120         * typeck.c (decay_conversion): Don't handle a raw method.
7121         Resolve all OFFSET_REFs.
7122         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
7123         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
7124         same_type_p for pmf bits.  Don't use build_binary_op to compare
7125         raw pointers to methods.
7126         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
7127         to decide when to call resolve_offset_ref.
7128         (build_c_cast, convert_for_initialization): Likewise.
7129         * cvt.c (build_expr_type_conversion): Likewise.
7130
7131 1999-05-06  Nathan Sidwell  <nathan@acm.org>
7132
7133         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
7134
7135 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
7136
7137         * decl2.c (start_objects): Don't let static constructors and
7138         destructors get inlined.
7139
7140         * parse.y (nested_name_specifier): Make sure ordinary types are
7141         complete, just like template types.
7142         * parse.c: Regenerated.
7143
7144         * pt.c (check_explicit_specialization): Improve error messages.
7145
7146 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7147
7148         * typeck.c (string_conv_p): Use same_type_p to check whether we
7149         try to convert between char and wchar_t.
7150
7151 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
7152
7153         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
7154         lookup to error_mark_node here.
7155         (lookup_member): Revise documentation.  Add comments.  Don't set
7156         the TREE_TYPE to error_mark_node here, and don't build up an extra
7157         TREE_LIST for ambiguous lookups.
7158         (setup_class_bindings): Adjust accordingly.
7159         (push_class_decls): Revise out-of-date comments.
7160         
7161         * typeck.c (build_const_cast): Tighten checks for legality.
7162
7163 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7164
7165         * init.c (build_member_call): Lookup names coming from
7166         namespace-scoped LOOKUP_EXPR.
7167
7168 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
7169
7170         * gxxint.texi: Add documentation for 'I'.
7171
7172 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7173
7174         * tinfo.cc (operator==): Qualify type_info with std::.
7175
7176 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
7177
7178         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
7179         (DECL_COMDAT): Remove definition.
7180
7181 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
7182
7183         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
7184         change.
7185
7186 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
7187
7188         * class.c (build_vtable): Use build_lang_decl when building
7189         vtables, not just build_decl.
7190         (prepare_fresh_vtable): Likewise.
7191         * decl.c (wrapup_globals_for_namespace): Mark vtables as
7192         DECL_EXTERNAL when calling wrapup_global_declarations.
7193         * decl2.c (priority_info_s): Add initializations_p and
7194         destructions_p members.
7195         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
7196         when deciding what vtables to write out.
7197         (ssdf_decls): New variable.
7198         (ssdf_decls_used): Likewise.
7199         (start_static_storage_duration_function): Deal with being called
7200         multiple times.  Avoid inlining this function.
7201         (generate_inits_for_priority): Deal with reuse of priority map.
7202         (get_priority_info): Clear initializations_p and destructions_p.
7203         (do_static_initialization): Tweak comment.
7204         (do_static_destruction): Likewise.  Fix condition on sentries for
7205         destruction.
7206         (generate_ctor_or_dtor_function): Call all of the static storage
7207         duration functions.
7208         (generate_ctor_or_dtor_function_for_priority): Check
7209         initializations_p and destructions_p to see what priorities need
7210         initialization functions.
7211         (finish_file): Rework to generate multiple static storage duration
7212         functions, rather than just one.
7213
7214         * typeck.c (build_const_cast): Tweak last change to handle
7215         templates correctly.
7216
7217         * typeck.c (build_const_cast): Disallow use of const_cast to
7218         anything but a pointer or reference type.
7219
7220 1999-04-30  Nathan Sidwell  <nathan@acm.org>
7221
7222         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
7223         signature type.
7224
7225 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
7226
7227         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
7228         (finish_file): Indent comments properly.
7229
7230 1999-04-29  Richard Henderson  <rth@cygnus.com>
7231
7232         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
7233         (do_static_destruction): Likewise.
7234
7235 1999-04-29  Nathan Sidwell  <nathan@acm.org>
7236
7237         * cp-tree.h (TYPE_NOTHROW_P): New macro.
7238         * decl2.c (delete_sanity): Warn on deleting void *.
7239         * init.c (build_new_1): Use TYPE_NOTHROW_P.
7240         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
7241         throwing operator new.
7242
7243 1999-04-28  Nathan Sidwell  <nathan@acm.org>
7244
7245         * cp-tree.h (build_component_addr): Remove prototype.
7246         * typeck.c (build_component_addr): Make static. Remove MSG
7247         argument.
7248         (build_component_addr): Remove MSG parameter, clean up
7249         comment.
7250         (build_x_function_call): Use cp_error.
7251         (build_unary_op): Adjust call of build_component_addr.
7252
7253 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
7254
7255         * pt.c (tsubst_friend_class): Check for NULL.
7256
7257 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
7258
7259         * search.c (binfo_for_vtable): Initialize bfvi.var.
7260
7261 1999-04-27  Nathan Sidwell  <nathan@acm.org>
7262
7263         * rtti.c (build_x_typeid): Check rtti is enabled.
7264
7265 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
7266
7267         * search.c (is_subobject_of_p): Make sure we're looking at the
7268         right baseclasses.
7269
7270 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
7271
7272         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
7273
7274 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
7275
7276         * decl2.c (finish_file): Tweak handling of extern inlines so that
7277         they are not unnecessarily put out.
7278
7279         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
7280         such as base classes.
7281
7282 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
7283
7284         * tree.c (build_exception_variant): Fix typo: use the chain of U,
7285         not trying V, while cycling through U.
7286
7287 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
7288
7289         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
7290         preserves_first_arg.  Enlarge dummy accordingly.
7291         (DECL_TINFO_FN_P): New macro.
7292         (SET_DECL_TINFO_FN_P): Likeiwse.
7293         (DECL_RETURNS_FIRST_ARG): Remove.
7294         (DECL_PRESERVES_THIS): Likewise.
7295         (DECL_INIT_PRIORITY): New macro.
7296         (finish_struct_1): Change prototype.
7297         (cat_namespace_levels): Remove prototype.
7298         (vtable_decl_p): New prototype.
7299         (vtype_decl_p): Likewise.
7300         (sigtable_decl_p): Likewise.
7301         (walk_globals_pred): New typedef.
7302         (walk_globals_fn): Likewise.
7303         (walk_globals): New prototype.
7304         (walk_namespaces_fn): New typedef.
7305         (walk_namespaces): New prototype.
7306         (wrapup_globals_for_namespace): Likewise.
7307         (walk_vtables): Remove prototype.
7308         (walk_sigtables): Likewise.
7309         (instantiate_pending_templates): New prototype.
7310         * class.c (finish_struct_1): Don't return a value.
7311         * decl.h (pending_statics): Remove declaration.
7312         * decl.c (walk_namespaces_r): New function.
7313         (walk_globals_r): Likewise.
7314         (vtable_decl_p): Likewise.
7315         (vtype_decl_p): Likewise.
7316         (sigtable_decl_p): Likewise.
7317         (walk_namespaces): Likewise.
7318         (walk_globals_data): New type.
7319         (walk_globals): New function.
7320         (wrapup_globals_for_namespace): Likewise.
7321         (expand_static_init): Remove assertion.  Remove redundancy in
7322         conditional.  Don't put static data members in static_aggregates
7323         Tidy.
7324         (finish_function): Remove redundancy in conditional.  Don't set
7325         DECL_RETURNS_FIRST_ARG.
7326         (cat_namespace_levels): Remove.
7327         * decl2.c: Include splay-tree.h and varray.h.
7328         (priority_info_s): New structure.
7329         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
7330         conventions.
7331         (prune_vtable_vardecl): Likewise.
7332         (finish_sigtable_vardecl): Likewise.
7333         (setup_initp): Remove.
7334         (do_dtors): Remove.
7335         (do_ctors): Remove.
7336         (start_static_storage_duration_function): New function.
7337         (generate_inits_for_priority): Likewise.
7338         (finish_static_storage_duration_function): Likewise.
7339         (get_priority_info): Likewise.
7340         (do_static_initialization): Likewise.
7341         (do_static_destruction): Likewise.
7342         (do_static_initialization_and_destruction): Likewise.
7343         (generate_ctor_or_dtor_function): Likewise.
7344         (generate_ctor_and_dtor_functions_for_priority): Likewise.
7345         (pending_statics): Make it a varray.
7346         (pending_statics_used): New variable.
7347         (saved_inlines): Make it a varray.
7348         (saved_inlines_used): New variable.
7349         (finish_static_data_member): Change method of updating
7350         pending_statics.
7351         (mark_inline_for_output): Remove #if 0'd code.  Change method of
7352         updating saved_inlines.
7353         (walk_vtables): Remove.
7354         (walk_sigtables): Likewise.
7355         (import_export_decl): Use DECL_TINFO_FN_P.
7356         (pending_templates): Remove declaration.
7357         (maybe_templates): Likewise.
7358         (static_aggregates_initp): Likewise.
7359         (setup_initp): Likewise.
7360         (finish_objects): Simplify.
7361         (INITIALIZE_P_IDENTIFIER): New macro.
7362         (PRIORITY_IDENTIFIER): New macro.
7363         (SSDF_IDENTIFIER): New macro.
7364         (initialize_p_decl): New variable.
7365         (priority_decl): Likewise.
7366         (ssdf_decl): Likewise.
7367         (priority_info_map): Likewise.
7368         (finish_file): Recode output of static intializers and other
7369         file-scope finalization tasks.
7370         * error.c (OB_END_TEMPLATE_ID): New macro.
7371         (dump_type_real): Use it.
7372         (dump_decl): Likewise.
7373         (dump_function_name): Likewise.
7374         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
7375         interface.
7376         (check_newline): Use walk_globals, not walk_vtables.
7377         * pt.c (pending_tempalte_expansions): Remove.
7378         (set_vardecl_interface_info): Likewise.
7379         (pending_templates): Make static.
7380         (maybe_templates): Likewise.
7381         (instantiate_class_template): Adjust call to finish_struct_1.
7382         (instantiate_pending_templates): New function.
7383         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
7384         * tree.c (static_aggregates_initp): Remove.
7385         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
7386         instead.
7387         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
7388
7389         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
7390         with the RTL code RETURN.
7391         * hash.h: Regenerated.
7392         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
7393         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
7394         * parse.c: Regenerated.
7395         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
7396         it.
7397         (inline_parm_levels): New variable.
7398         (inline_parm_levels_used): Likewise.
7399         (maybe_begin_member_template_processing): Update them.
7400         (maybe_end_member_template_processing): Use them, rather than
7401         guessing how many levels to pop.
7402
7403         * decl.c (make_typename_type): Tighten error-checking.
7404
7405 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
7406
7407         * cp-tree.h (build_binary_op): Remove unneeded parameter.
7408         * class.c (build_vrable_entry_ref): Adjust call to
7409         build_binary_op.
7410         * decl.c (expand_static_init): Likewise.
7411         (grokdeclarator): Likewise.
7412         (finish_function): Likewise.
7413         * decl2.c (delete_sanity): Likewise.
7414         (do_dtors): Likewise.
7415         (do_ctors): Likewise.
7416         * error.c (dump_type_suffix): Likewise.
7417         * expr.c (cplus_expand_expr): Likewise.
7418         * init.c (resolve_offset_ref): Likewise.
7419         (build_new): Likewise.
7420         (build_new_1): Likewise.
7421         (build_vec_delete_1): Likewise.
7422         (expand_vec_init_catch_clause): Likewise.
7423         (build_delete): Likewise.
7424         * pt.c (tsubst): Likewise.
7425         * rtti.c (synthesize_tinfo_fn): Likewise.
7426         * search.c (expand_upcast_fixups): Likewise.
7427         (expand_direct_vtbls_init): Likewise.
7428         * typeck.c (get_member_function_from_ptrfunc): Likewise.
7429         (build_binary_op_nodefault): Likewise.
7430         (point_int_sum): Likewise.
7431         (pointer_diff): Likewise.
7432         (build_unary_op): Likewise.
7433         (build_modify_expr): Likewise.
7434         (get_delta_difference): Likewise.
7435         (build_ptrmemfunc): Likewise.
7436         (expand_ptrmemfunc_cst): Likewise.
7437
7438 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
7439
7440         * decl.c (grokfndecl): Always call cplus_decl_attributes.
7441         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
7442
7443 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
7444
7445         * cp-tree.h (finish_static_data_member_decl): New function.
7446         * decl2.c (finish_static_data_member_decl): Split out from ...
7447         (grokfield): Here.
7448         * pt.c (instantiate_class_template): Use it here instead of
7449         trying to fake it.
7450         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
7451         finish_static_data_member_decl will do that.  Explicit set
7452         DECL_EXTERNAL to match non-template processing.
7453
7454 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
7455
7456         * cp-tree.h (finish_class_definition): Add parameter.
7457         * parse.y (structsp): Use it.  Don't call pop_scope here.
7458         * parse.c: Regenerated.
7459         * semantics.c (finish_class_definition): Pop it here.
7460
7461 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
7462
7463         * decl.c (xref_tag): Revise handling of nested template
7464         declarations.
7465         * pt.c (check_explicit_specialization): Tweak handling of friend
7466         templates in template classes.
7467         (tsubst_friend_class): Handle friend declarations for nested
7468         member template classes.
7469
7470 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
7471
7472         * class.c (finish_struct): Remove unused variable.
7473         (pushclass): Likewise.
7474         (invalidate_class_lookup_cache): Likewise.
7475         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
7476         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
7477         doesn't get obliterated.
7478         (make_typename_type): Handle template classes correctly.
7479
7480         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
7481         (storetags): Declare.
7482         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
7483         (pushclass): Likewise.  Use storetags to install tag declarations,
7484         not pushtag.
7485         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
7486         * decl.c (storetags): Make it global.
7487         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
7488         implicit typename declaration.
7489         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
7490         * method.c (hack_identifier): Likewise.
7491         * search.c (lookup_member): Likewise.
7492
7493         * decl.c (warn_about_implicit_typename_lookup): New function.
7494         (lookup_name_real): Use it.  Rework handling of implicit typename
7495         extension.
7496
7497 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
7498
7499         * cp-tree.h (lookup_nested_field): Remove.
7500         * class.c (push_nested_class): Handle UNION_TYPEs.
7501         (pop_nested_class): Likewise.
7502         * decl.c (lookup_name_real): Don't call lookup_nested_field.
7503         (start_decl): Use push_nested_class, not just pushclass.
7504         (cp_finish_decl): Use pop_nested_class, not just popclass.
7505         * search.c (lookup_nested_field): Remove.
7506
7507         * cp-tree.h (lang_type): Add documentation.
7508         * decl2.c (handle_class_head): Create template declarations here,
7509         as appropriate.
7510         * parse.y (class_head): Return whether or not we entered a new
7511         scope, as well as the type named.
7512         (named_class_head): Likewise.
7513         (named_complex_class_head_sans_basetype): Likewise.
7514         (structsp): Adjust accordingly.  Pop scope when required.
7515         * parse.c: Regenerated.
7516         * pt.c (check_default_tmpl_args): Robustify.
7517         (redeclare_class_template): Likewise.
7518         (instantiate_class_template): An instantiation of an
7519         anonymous union is itself an anonymous union.
7520         * semantics.c (begin_class_definition): Don't create template
7521         declarations here.
7522
7523 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
7524
7525         * parse.y (after_type_declarator_intern): New nonterminal.
7526         (after_type_declarator): Use it.
7527         (direct_after_type_declarator): Likewise.  Move above
7528         nonnested_type to fix reduce/reduce conflict resolution.
7529         (declmods): Reducing from just 'attributes' has EMPTY precedence.
7530         * Makefile.in (CONFLICTS): Update.
7531
7532         * decl.c (define_label): Downgrade error for jumping over a
7533         non-POD decl to pedwarn.
7534
7535 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
7536
7537         * cp-tree.h (popclass): Change declaration.
7538         (pop_nested_class): Likewise.
7539         (poplevel_class): Remove declaration.
7540         * call.c (convert_default_argument): Pass no arguments to
7541         popclass.
7542         * class.c (finish_struct_1): Likewise.
7543         (finish_struct): Likewise.
7544         (popclass): Remove argument.  Simplify code accordingly.
7545         (pop_nested_class): Likewise.
7546         * decl.c (poplevel_class): Declare it here, and make it static.
7547         (poplevel): Handle class scopes.
7548         (poplevel_class): Don't take an rgument.  Simplify.
7549         (pop_everything): Pass no arguments to pop_nested_class.
7550         (cp_finish_decl): Pass no arguments to popclass.
7551         (grokdeclarator): Pass no arguments to pop_nested_class.
7552         (finish_function): Likewise.
7553         * decl2.c (grokfield): Likewise.
7554         (pop_scope): Pass no arguments to popclass.
7555         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
7556         * pt.c (instantiate_class_template): Move call to pushclass, and
7557         document.  Pass no arguments to popclass.
7558         (regenerate_decl_from_template): Likewise.
7559
7560 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
7561
7562         * typeck.c (build_unary_op): Handle taking the address of a unique
7563         bound non-static member function.
7564
7565 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7566
7567         * lang-options.h (-Wdeprecated): New flag.
7568         * decl2.c (warn_deprecated): New flag.
7569         (lang_decode_option): Deprecated this-is-variable,
7570         external-templates, alt-external-templates.
7571         Support -Wdeprecated.
7572         * errfn.c (cp_deprecated): New function.
7573
7574 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
7575
7576         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
7577         of the decls themselves.
7578
7579         * pt.c (tsubst_function_type): Copy attributes over.
7580
7581         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
7582         and com_interface.
7583         * cp-tree.h: Add prototype.
7584         * decl.c (init_decl_processing): Set valid_lang_attribute.
7585
7586 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
7587
7588         * class.c (finish_struct_1): Look at the const-ness of the field's
7589         type, not the TREE_READONLY-ness of the declaration.
7590         * method.c (synthesize_method): Likewise.
7591         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
7592         creating new declarations.
7593
7594 1999-04-13  Mike Stump  <mrs@wrs.com>
7595
7596         * decl2.c (import_export_decl): Because vtables always reference
7597         virtual functions, even if they are inlined, don't allow
7598         -fno-implement-inlines to not emit them, instead, emit them with
7599         the vtable.
7600         * decl.c (start_function): Likewise.
7601
7602 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
7603
7604         * cp-tree.h (struct lang_type): Add com_interface.
7605         (CLASSTYPE_COM_INTERFACE): New macro.
7606         * class.c (set_rtti_entry): COM interface classes have no RTTI
7607         entries in their vtables; adjust.
7608         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
7609         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
7610         finish_struct_1): Likewise.
7611         * decl2.c (mark_vtable_entries): Likewise.
7612         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
7613         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
7614         expand_upcast_fixups): Likewise.
7615         * tree.c (debug_binfo): Likewise.
7616
7617         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
7618         * typeck.c (comptypes): If we get it, ignore attributes.
7619         * class.c (instantiate_type): Use BASELINK_P.  Change complain
7620         parameter to flags; 2 means ignore attributes.
7621         * call.c (build_op_delete_call): Pass it.
7622
7623         * decl.c (xref_tag): Only complain once about using a typedef-name
7624         with 'struct'.  Downgrade to pedwarn.
7625
7626         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
7627
7628         * parse.y (absdcl_intern): New nonterminal.
7629         (absdcl, direct_abstract_declarator): Use it.
7630
7631         * pt.c (lookup_template_class): Look through implict typename.
7632
7633 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
7634
7635         * friend.c (add_friend): Deal gracefully with error_mark_node.
7636         * method.c (build_overload_value): Handle pointers-to-members as
7637         template parameters.
7638
7639         * decl.c (push_binding): Fix typo in comment.
7640
7641 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
7642
7643         * error.c (dump_type_real): If a typename is a template-id, put
7644         out the template arguments.
7645         (dump_expr): Handle TEMPLATE_ID_EXPR.
7646         * pt.c (lookup_template_class): Now that full arguments are
7647         available everywhere, remove code that tried to guess them.
7648
7649 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
7650
7651         * decl.c (make_typename_type): Complain if we don't find a type
7652         when trying to make a typename type for a non-template type.
7653
7654 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
7655
7656         * decl.c (start_decl): Pass attributes to grokdeclarator.
7657         (grokdeclarator): Handle attributes on constructor-syntax
7658         initializers.
7659
7660 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
7661
7662         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
7663         don't have types.
7664
7665         * search.c (template_self_reference_p): Tweak.
7666
7667 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
7668
7669         * init.c (build_offset_ref): Don't build yet another weird data
7670         structure to describe overloaded functions.
7671
7672 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
7673
7674         * cp-tree.h (BASELINK_P): New macro.
7675         (SET_BASELINK_P): Likewise.
7676         * init.c (build_member_call): Remove needless assignment in if
7677         statement.
7678         * search.c (lookup_field_r): Fix handling when we are looking
7679         specifically for a type; these are not hidden by functions and
7680         variables.
7681         (lookup_member): Use SET_BASELINK_P.
7682         * tree.c (is_overloaded_fn): Use BASELINK_P.
7683         (really_overloaed_fn): Likewise.
7684         (get_first_fn): Likewise.
7685
7686 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
7687
7688         * decl.c (lookup_name_current_level): Tweak, and improve
7689         documentation.
7690
7691         * class.c (maybe_fixup_vptrs): Remove declaration.
7692         (build_class_init_list): Likewise.
7693         * decl.c (pushdecl_class_level): Call check_template_shadow here
7694         ...
7695         (push_class_level_binding): ... not here.
7696         * search.c (dfs_push_type_decls): Only avoid
7697         template-self-reference TYPE_DECLs if they are from base classes.
7698
7699 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
7700
7701         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
7702         nodes.  Tidy.
7703
7704 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
7705
7706         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
7707         (finish_struct_1): Don't call build_class_init_list.
7708
7709 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
7710
7711         * tinfo.h (__class_type_info): Fix illegal declaration.
7712
7713         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
7714         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
7715         (IDENTIFIER_CLASS_VALUE): Improve documentation.
7716         (is_properly_derived_from): Declare.
7717         (invalidate_class_lookup_cache): Likewise.
7718         (maybe_maybe_note_name_used_in_class): Likewise.
7719         (note_name_declared_in_class): Likewise.
7720         (push_using_decl): Remove duplicate declaration.
7721         (id_in_current_class): Remove declaration.
7722         (push_class_binding): Change prototype.
7723         (clear_identitifer_class_values): Declare.
7724         * call.c (is_properly_derived_from): Make it global.
7725         (build_new_function_call): Be careful about updating candidates.
7726         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
7727         asked to make illegal calls.
7728         * class.c: Include splay-tree.h.
7729         (class_stack_node): Add names_used slot.
7730         (check_member_decl_is_same_in_complete_scope): Remove.
7731         (add_method): Fix comment.  Push the declaration into class
7732         scope.
7733         (finish_struct_1): When popping the class, pop the bindings too.
7734         Remove check for data member/function member conflict.
7735         (finish_struct): Remove calls to
7736         check_member_decl_is_same_in_complete_scope.  Change calls to
7737         popclass.
7738         (pushclass): Clear names_used in the class stack entry.
7739         Use invalidate_class_lookup_cache to remove cached entries, rather
7740         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
7741         before entering a new class.  Remove dead code.  Don't mess with
7742         current_function_decl when pushing declarations.
7743         (invalidate_class_lookup_cache): New function, split out from ...
7744         (popclass): Here.  Clean up names_used on our way out.
7745         (instantiate_type): Adjust.
7746         (build_self_reference): Don't push the declaration here.
7747         (maybe_note_name_used_in_class): New function.
7748         (note_name_declared_in_class): Likewise.
7749         * decl.c (add_binding): Change prototype.
7750         (find_class_binding_level): New function.
7751         (innermost_nonclass_level): Likewise.
7752         (current_binding_level): Update documentation.
7753         (inner_binding_level): Remove.  Replace with current_binding_level
7754         throughout.
7755         (push_binding_level): Remove special handling of
7756         class_binding_level.
7757         (pop_binding_level): Likewise.  Use find_class_binding_level.
7758         (suspend_binding_level): Likewise.
7759         (global_bindings_p): Use innermost_nonclass_level.
7760         (toplevel_bindings_p): Likewise.
7761         (namespace_bindings_p): Likewise.
7762         (pseudo_global_level_p): Likewise.
7763         (push_binding): Clear INHERITED_VALUE_BINDING_P.
7764         (add_binding): Check for illegal multiple declarations.  Return a
7765         value indicating whether or not the new binding was legal.
7766         (push_local_binding): Skip over class binding levels.  Check
7767         return value from add_binding.
7768         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
7769         note_name_declared_in_class.
7770         (pushlevel_class): Remove "fake out the rest of the compiler"
7771         code.
7772         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
7773         (clear_identifier_class_values): New function.
7774         (pop_from_top_level): Use it.
7775         (pop_everything): Tweak.
7776         (maybe_process_template_type_declaration): Don't push the
7777         declaration for the template here.
7778         (pushtag): Don't push tag declarations into class scope here.
7779         (pushdecl): Apply DeMorgan's law for readability.
7780         (pushdecl_class_level): Remove special-case code for
7781         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
7782         (push_class_level_bindng): Deal with inherited bindings.
7783         (lookup_name_real): Remove special-case code for
7784         TYPE_BEING_DEFINED, and some implicit typename magic.
7785         (grokdeclarator): Handle COMPONENT_REF for a template function.
7786         (build_enumerator): Don't call pushdecl_class_level here.
7787         (id_in_current_class): Remove.
7788         * decl2.c (grokfield): Don't call pushdecl_class_level or
7789         check_template_shadow.
7790         * errfn.c (cp_file_of): Don't declare.
7791         (cp_line_of): Likewise.
7792         * error.c (dump_decl): Handle an OVERLOAD.
7793         (cp_file_of): Likewise.
7794         (cp_line_of): Likewise.
7795         * init.c (build_member_call): Handle a COMPONENT_REF.
7796         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
7797         pushdecl_class_level.
7798         * method.c (hack_identifier): Build COMPONENT_REFs for references
7799         to member templates as well as member functions.  Remove dead
7800         code.
7801         * parse.y (left_curly): Remove.
7802         (nonnested_type): Call maybe_note_name_used_in_class, not
7803         pushdecl_class_level.
7804         * parse.c: Regenerated.
7805         (nested_name_specifier_1): Likewise.
7806         * pt.c (check_explicit_specialization): Adjust, for robustness.
7807         (check_template_shadow): Handle OVERLOADs.
7808         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
7809         TEMPLATE_DECL, if appropriate.
7810         * search.c (envelope_add_decl): Remove.
7811         (dfs_pushdecls): Likewise.
7812         (dfs_compress_decls): Likewise.
7813         (dfs_push_decls): New function.
7814         (dfs_push_type_decls): Likewise.
7815         (setup_class_bindings): Likewise.
7816         (template_self_reference_p): Likewise.
7817         (lookup_field_r): Use it.
7818         (looup_member): Remove old comment.  Deal with ambiguity.
7819         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
7820         and remove envelope processing.
7821         * semantics.c (begin_class_definition): Let pushclass push
7822         declarations for base classes.
7823         (finish_member_declaration): Push declarations into class scope.
7824         * typeck.c (build_component_ref): Just put an OVERLOAD into the
7825         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
7826         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
7827         * Makefile.in (class.o): Depend on splay-tree.h.
7828
7829 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
7830
7831         * cvt.c (convert_pointer_to_real): Use same_type_p.
7832         * typeck.c (comp_target_types): Use same_type_p.
7833
7834 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
7835
7836         * semantics.c (begin_inline_definitions,
7837         finish_inline_definitions): Rename from finish_default_args and
7838         begin_inline_definitions, respectively, to something that isn't a
7839         total lie.  :)
7840         * parse.y (structsp): Adjust.
7841
7842         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
7843         (list_hash_lookup): Likewise.
7844         (hash_tree_chain): Adjust.
7845         * pt.c (tsubst): Adjust.
7846         (tsubst_arg_types): Use plain hash_tree_cons.
7847         * cp-tree.h (hash_tree_cons_simple): Lose.
7848         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
7849
7850 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7851
7852         * Makefile.in (hash.h): Generate using gperf language 'C', not
7853         'KR-C', so gperf uses the `const' keyword on strings.
7854
7855         * gxx.gperf (resword): Const-ify a char*.
7856
7857 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
7858
7859         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
7860         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
7861         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
7862         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
7863         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
7864         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
7865         tree.c: Adjust.
7866
7867 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
7868
7869         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
7870
7871 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
7872
7873         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
7874
7875 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
7876
7877         * cp-tree.h (add_friend): Declare.
7878         (add_friends): Likewise.
7879         * friend.c (add_friend): Make it global.  Don't add to
7880         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
7881         (add_friends): Make it global.
7882         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
7883         befriending class is a template.
7884         * parse.y (component_decl_1): Fix typo in comment.
7885         * parse.c: Regenerated.
7886         * pt.c (instantiate_class_template): Use add_friend and
7887         add_friends rather that duplicating some of their functionality
7888         here.
7889
7890 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
7891
7892         * call.c (build_field_call): Unify 'this' and non-'this' cases.
7893
7894         * typeck.c (build_indirect_ref): Check for 'this' sooner.
7895
7896 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7897
7898         * call.c (op_error): Const-ify a char*.
7899         (add_candidate, source_type, add_warning): Add static prototype.
7900         (print_z_candidates): Const-ify a char*.
7901
7902         * class.c (resolve_address_of_overloaded_function,
7903         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
7904         (get_vtable_name, finish_struct_1): Const-ify a char*.
7905
7906         * cvt.c (convert_to_reference): Likewise.
7907
7908         * decl.c (redeclaration_error_message, record_builtin_type,
7909         record_unknown_type, member_function_or_else, bad_specifiers):
7910         Likewise.
7911         (find_binding, select_decl, unqualified_namespace_lookup,
7912         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
7913         Add static prototype.
7914         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
7915         implicitly_declare, record_builtin_java_type, define_function,
7916         grok_op_properties, tag_name): Const-ify a char*.
7917
7918         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
7919         (define_function, finish_builtin_type): Const-ify a char*.
7920         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
7921         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
7922         (file_name_nondirectory): Const-ify a char*.
7923         (init_filename_times): Don't prototype.
7924         (compiler_error): Prototype.
7925         (yyerror, init_repo): Const-ify a char*.
7926         (build_srcloc): Don't prototype.
7927         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
7928         Const-ify a char*.
7929         (warn_for_assignment): Don't prototype.
7930         (convert_for_initialization, readonly_error, check_for_new_type,
7931         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
7932         Const-ify a char*.
7933
7934         * decl2.c (acceptable_java_type, output_vtable_inherit,
7935         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
7936         merge_functions, decl_namespace, validate_nonmember_using_decl,
7937         do_nonmember_using_decl): Add static prototype.
7938         (lang_f_options): Const-ify a char*.
7939         (finish_builtin_type): Likewise.
7940         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
7941         prototype.
7942
7943         * errfn.c: Include cp-tree.h.
7944         (cp_thing): Add static prototype.
7945         (compiler_error): Don't protoptype.
7946         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
7947         passing it to `cp_thing'.
7948
7949         * error.c (interesting_scope_p): Add static prototype.
7950
7951         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
7952         a char*.
7953
7954         * init.c (compiler_error): Don't prototype.
7955         (member_init_ok_or_else): Const-ify a char*.
7956         (build_java_class_ref): Add static prototype.
7957
7958         * lex.c (compiler_error): Don't prototype.
7959         (get_time_identifier, interface_strcmp, extend_token_buffer,
7960         handle_cp_pragma): Const-ify a char*.
7961         (is_global, init_filename_times): Add static prototype.
7962         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
7963         (compiler_error): Change from fixed args to variable args.
7964         (yyerror): Const-ify a char*.
7965
7966         * parse.y (cond_stmt_keyword): Const-ify a char*.
7967         (parse_decl): Add static prototype.
7968
7969         * pt.c (template_args_equal, print_template_context): Likewise.
7970         (print_candidates, check_default_tmpl_args): Const-ify a char*.
7971         (instantiate_class_template): Likewise.
7972
7973         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
7974
7975         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
7976         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
7977
7978         * search.c (lookup_field_info, lookup_member): Likewise.
7979         (lookup_member): Cast the first argument of `bzero' to a PTR.
7980
7981         * sig.c (compiler_error): Don't prototype.
7982         (build_signature_pointer_or_reference_nam): Const-ify a char*.
7983         (get_sigtable_name, build_member_function_pointer): Likewise.
7984
7985         * tree.c (compiler_error): Don't prototype.
7986         (no_linkage_helper, build_srcloc): Add static prototype.
7987         (build_vbase_pointer_fields): Const-ify a char*.
7988         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
7989
7990         * typeck.c (compiler_error): Don't prototype.
7991         (convert_for_assignment): Const-ify a char*.
7992         (comp_cv_target_types): Add static prototype.
7993         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
7994         build_component_addr, build_unary_op, convert_for_initialization):
7995         Const-ify a char*.
7996
7997         * typeck2.c (ack): Add static prototype and change from fixed args
7998         to variable args.
7999         (readonly_error, check_for_new_type): Const-ify a char*.
8000
8001         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
8002         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
8003         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
8004         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
8005         gen_assign, GNU_xref_member): Const-ify a char*.
8006
8007 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8008
8009         * gxxint.texi: Remove old discussion on copying virtual bases.
8010
8011 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
8012
8013         * Make-lang.in: Remove all references to g++.o/g++.c.
8014         Link g++ from gcc.o.
8015
8016 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
8017
8018         * decl2.c (comdat_linkage): Treat vtables like functions.
8019
8020 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
8021
8022         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
8023
8024 1999-03-25  Nathan Sidwell  <nathan@acm.org>
8025
8026         * decl.c (init_decl_processing): Add `signed' type as a synonym
8027         for `int'.
8028
8029 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
8030
8031         * typeck.c (common_type): Handle cv-qual unification for pointers
8032         to members.
8033
8034         * decl.c (unqualified_namespace_lookup): Return error_mark_node
8035         on error.
8036         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
8037         * lex.c (do_identifier): If we got error_mark_node, call
8038         lookup_name again.
8039
8040 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8041
8042         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
8043         classes.
8044
8045 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
8046
8047         * decl.c (lookup_name_real): Do nested field lookup regardless of
8048         TYPE_BEING_DEFINED.
8049
8050 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
8051
8052         * cp-tree.h (lang_type): Remove has_assignment and
8053         has_real_assignment.  Add befriending_classes.
8054         (TYPE_HAS_ASSIGNMENT): Remove.
8055         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
8056         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
8057         (lang_decl): Document.
8058         (DECL_BEFRIENDING_CLASSES): New macro.
8059         (FRIEND_NAME): Move declaration to more obvious location.
8060         (FRIEND_DECLS): Likewise.
8061         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
8062         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
8063         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
8064         (grok_op_properties): Likewise.
8065         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
8066         (add_friend): Likewise.  Don't do weird things with assignment
8067         operators.  Update DECL_BEFRIENDING_CLASSES.
8068         (add_friends): Don't do weird things with assignment operators.
8069         (make_friend_class): Likewise.  Update
8070         CLASSTYPE_BEFRIENDING_CLASSES.
8071         * pt.c (instantiate_class_template): Don't set
8072         TYPE_HAS_ASSIGNMENT.
8073         (tsubst_copy): Substitute the TREE_TYPE for more unary
8074         expressions.
8075         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
8076         * search.c (protected_accessible_p): New function.
8077         (friend_accessible_p): Likewise.
8078         (accessible_p): Use them.
8079
8080 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
8081
8082         * pt.c (convert_nontype_argument): Don't create things that aren't
8083         PTRMEM_CSTs when applying a qualification conversion to a
8084         PTRMEM_CST.
8085
8086 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
8087
8088         * Makefile.in (OBJS): Don't mention hash.o.
8089         (OBJDEPS): Likewise.
8090
8091 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
8092
8093         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
8094         * decl.c (expand_static_init): Make sure we don't add any after
8095         then.
8096
8097         * decl.c (cp_finish_decl): Move intelligence about handling
8098         DECL_COMDAT for variables from here...
8099         * decl2.c (comdat_linkage): ...to here.
8100         (maybe_make_one_only): Tweak.
8101         (import_export_decl): Call comdat_linkage for variables, too.
8102         (finish_file): Handle template statics properly.
8103
8104 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
8105
8106         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
8107         Document internals of pointer-to-member-functions.
8108         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
8109         (PFN_FROM_PTRMEMFUNC): Likewise.
8110         (build_type_conversion): Remove unused parameter.
8111         (build_ptrmemfunc1): Declare.
8112         (expand_ptrmemfunc_cst): New function.
8113         (delta2_from_ptrmemfunc): Likewise.
8114         (pfn_from_ptrmemfunc): Likewise.
8115         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
8116         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
8117         (convert_to_reference): Remove unused parameter to
8118         build_type_conversion.
8119         (ocp_convert): Likewise.
8120         (build_user_type_conversion): Likewise.
8121         * error.c (dump_expr): Handle NULL pointer-to-member functions.
8122         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
8123         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
8124         open when handling pointer-to-member functions.
8125         * pt.c (convert_nontype_argument): Clean up error messages.  Be
8126         more stringent with pointers-to-members.
8127         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
8128         (build_unary_op): Tidy ever-so-slightly.
8129         (build_conditional_expr): Remove extra parameter to
8130         build_type_conversion.
8131         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
8132         we're using.
8133         (expand_ptrmemfunc_cst): Define.
8134         (delta2_from_ptrmemfunc): Likewise.
8135         (pfn_from_ptrmemfunc): Likewise.
8136
8137 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
8138
8139         * init.c (build_member_call): Handle template-id expressions
8140         correctly.
8141         * typeck.c (build_x_function_call): Likewise.
8142
8143 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
8144
8145         * friend.c (make_friend_class): Avoid core dump when
8146         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
8147
8148 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
8149
8150         * decl.c (start_function): Suppress normal linkage heuristics
8151         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
8152
8153 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
8154
8155         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
8156         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
8157
8158 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8159
8160         * parse.y (named_complex_class_head_sans_basetype):
8161         Do not push a scope for error_mark_node.
8162         (maybe_base_class_list): Likewise.
8163
8164         * decl.c (start_decl): Check for error_mark_node as a type.
8165         Detected by g++.brendan/array-refs.C.
8166         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
8167         (maybe_build_cleanup_1): Likewise.  Detected by
8168         g++.jason/incomplete1.C.
8169
8170         * tree.c (build_dummy_object): Use void_zero_node instead of the
8171         error_mark_node.
8172         (is_dummy_object): Check for such a node.
8173         Detected by g++.bob/inherit1.C
8174
8175 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
8176
8177         * method.c (old_backref_index): Split out...
8178         (flush_repeats): From here.  Rename back from try_old_backref.
8179         (build_mangled_name): Put back some old-style repeat handling.
8180
8181 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8182
8183         * lex.c: Don't include setjmp.h.
8184         (parse_float): New static function.
8185         (pf_args): New struct.
8186         (real_yylex): Use them in call to `do_float_handler'.
8187
8188 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
8189
8190         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
8191         * tree.c (layout_basetypes): Not here.
8192         * search.c (dfs_search): Remove; no longer used.
8193
8194 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
8195
8196         * decl2.c (validate_nonmember_using_decl): Issue sensible
8197         error-messages on bogus qualifiers.
8198
8199 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
8200
8201         * call.c (add_function_candidate): Fix uninitialized variable.
8202
8203         * Makefile.in (search.o): Add dependency on varray.h.
8204
8205 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
8206
8207         * decl.c (duplicate_decls): Use same_type_p.
8208         * method.c (try_old_backref): Renamed from flush_repeats.  Use
8209         same_type_p.  Don't try to handle repeats.  Return success.
8210         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
8211         calls from old-style code, too.
8212         (check_ktype): Use same_type_p.
8213         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
8214         (build_qualified_name): Simplify logic.
8215         (process_overload_item): Strip typedefs and quals at the top.
8216         (build_mangled_name_for_type_with_Gcode): Remove call to
8217         type_canonical_variant.
8218         (build_mangled_name): Likewise.  Remove support for old-style
8219         repeats, which have been disabled since 2.7.2.  Don't mess with
8220         TREE_USED.
8221         (build_decl_overload_real): Don't mess with TREE_USED.
8222
8223 1999-03-13  Nathan Sidwell  <nathan@acm.org>
8224
8225         * error.c (cp_printers): Add 'F' escape character.
8226         (dump_type_real): Remove TREE_LIST (fnargs) printing.
8227         Functionality moved to dump_parameters.
8228         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
8229         (dump_function_decl): Extend meaning of V parameter.  Use
8230         dump_parameters and dump_exception_spec.
8231         (dump_parameters): New static function.
8232         (dump_exception_spec): New static function.
8233         (fndecl_as_string): Change argument semantics.  Use
8234         dump_function_decl directly.
8235
8236         * sig.c (build_signature_table_constructor): Use cp_error.
8237
8238 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8239
8240         * semantics.c (finish_switch_cond): Handle error cases gracefully.
8241         Detected by g++.law/enum5.C.
8242
8243         * typeck.c (build_modify_expr): Check for errors after resolving
8244         offsets.  Detected by g++.brendan/static1.C.
8245
8246         * decl.c (complete_array_type): Ignore initial_value if it is an
8247         error.  Detected by g++.benjamin/17930.C.
8248
8249         * typeck2.c (process_init_constructor): Return error if one argument
8250         is in error.  Detected by g++.benjamin/13478.C.
8251
8252 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8253
8254         * decl.c (select_decl): Allow class templates when we need types.
8255         * decl2.c (ambiguous_decl): Likewise.
8256
8257 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
8258
8259         * lex.c (do_identifier): Correct call to enforce_access.
8260         * search.c (accessible_p): Tweak comment.
8261
8262 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
8263
8264         * semantics.c (begin_class_definition): Call build_self_reference.
8265         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
8266
8267         * search.c (assert_canonical_unmarked): Fix typo in prototype.
8268
8269         * search.c (dfs_canonical_queue): New function.
8270         (dfs_assert_unmarked_p): Likewise.
8271         (assert_canonical_unmarked): Likewise.
8272         (access_in_type): Use it.
8273         (accessible_p): Likewise.  Walk the whole tree when umarking.
8274
8275         * sig.c (build_signature_table_constructor): Use accessible_p
8276         instead of compute_access.
8277
8278 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
8279
8280         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
8281
8282 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
8283
8284         * cp-tree.h (flag_access_control): Declare.
8285         (TREE_VIA_PPUBLIC): Document.
8286         (DECL_NONSTATIC_MEMBER_P): New macro.
8287         (enforce_access): Return an indication of whether or not access
8288         was permitted.
8289         (build_self_reference): Change prototype.
8290         (compute_access): Replace with ...
8291         (accessible_p): New function.
8292         (dfs_walk): Change prototype.
8293         (dfs_unmark): Likewise.
8294         (markedp): Likewise.
8295         * call.c (enforce_access): Use accessible_p.
8296         * class.c (build_self_reference): Insert the declaration into the
8297         list of members for this type, and make it public.
8298         * decl.c (xref_basetypes): Avoid ill-timed recursion.
8299         * init.c (build_offset_ref): Use lookup_member, not three separate
8300         name-lookups.  Call enforce_access rather than checking for
8301         illegal accesses here.
8302         (resolve_offset_ref): Likewise.
8303         * lex.c (do_identifier): Likewise.
8304         * method.c (hack_identifier): Likewise.
8305         * parse.y (self_reference): Remove.
8306         (opt_component_decl_list): Don't use it.
8307         * parse.c: Regenerated.
8308         * pt.c (print_candidates): Generalize to handle lists of
8309         overloaded functions.
8310         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
8311         not set.
8312         (get_template_base): Use new calling convention for dfs_walk.
8313         * search.c: Include varray.h.  Add prototypes.
8314         (dfs_walk): Accept a data pointer to pass to the work functions.
8315         All callers changed.  All work functions changed.
8316         (breadth_first_search): Rename to bfs_walk, and make consistent
8317         with dfs_walk.
8318         (dfs_walk_real): New function.
8319         (canonical_binfo): New function.
8320         (context_for_name_lookup): Likewise.
8321         (shared_marked_p): Likewise.
8322         (shared_unmarked_p): Likewise.
8323         (lokup_field_queue_p): Likewise.
8324         (lookup_field_r): Generalize to handle both functions and fields.
8325         (lookup_field): Just call lookup_member.
8326         (lookup_fnfields): Likewise.
8327         (lookup_member): Move body of lookup_field here and generalize.
8328         (dfs_accessible_queue_p): Likewise.
8329         (dfs_accessible_p): Likewise.
8330         (dfs_access_in_type): Likewise.
8331         (access_in_type): Likewise.
8332         (compute_access): Remove, and replace with ...
8333         (accessible_p): New function.
8334         (vbase_types): Remove.
8335         (vbase_decl_ptr_intermediate): Likewise.
8336         (vbase_decl_ptr): Likewise.
8337         (vbase_init_result): Likewise.
8338         (closed_envelopes): Likewise.
8339         (bvtable): Likewise.
8340
8341 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
8342
8343         * call.c (add_function_candidate): Check for proper number of args
8344         before checking the validity of those args.
8345
8346 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
8347
8348         * cp-tree.h (struct lang_type): Add anon_union field.
8349         (ANON_UNION_TYPE_P): Use it instead of examining type.
8350         (SET_ANON_UNION_TYPE_P): New macro.
8351         * decl.c (check_tag_decl): Use it.
8352
8353         * search.c (compute_access): Handle non-type contexts earlier, and
8354         handle NULL_TREE.
8355
8356         * tree.c (build_exception_variant): Use copy_to_permanent.
8357
8358         * decl2.c (setup_initp): Give statics with no priority the default
8359         priority here.
8360         (do_dtors, do_ctors, finish_file): Remove special handling of
8361         non-prioritized statics.
8362
8363 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
8364
8365         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
8366         * decl.c (make_typename_type): Don't issue an error if an
8367         immediate lookup fails; it migt be resolved later.
8368         * friend.c (is_friend): Add comment.
8369         * search.c (breadth_first_search): Add POSTFN and DATA
8370         parameters.  Tidy.  All callers changed.
8371         (lookup_field_queue_p): New function.
8372         (lookup_field_r): Likewise.
8373         (lookup_field_post): Likewise.
8374         (lookup_field): Use them, via breadth_first_search, instead of
8375         duplicating logic.
8376         (compute_access): Robustify.
8377         (lookup_fnfield_info): New structure.
8378
8379 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
8380
8381         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
8382
8383 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
8384
8385         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
8386         cc happy.
8387
8388         * decl2.c (import_export_class): Also return if
8389         CLASSTYPE_INTERFACE_ONLY is set.
8390
8391 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8392
8393         * decl.c (push_overloaded_decl): Only overwrite the old binding if
8394         there was one.
8395         * decl2.c (do_local_using_decl): Fix loop termination.
8396
8397 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
8398
8399         * cp-tree.h (determine_specialization): Don't declare.
8400         * pt.c (determine_specialization): Make it static.  Eliminate
8401         complain parameter.  Note that decl is always non-NULL now, and
8402         simplify accordingly.
8403
8404         * decl.c (maybe_push_to_top_level): Always call
8405         push_cp_function_context.
8406         (pop_from_top_level): Always call pop_cp_function_context.
8407
8408 1999-02-26  Nathan Sidwell  <nathan@acm.org>
8409
8410         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
8411         diagnostics.
8412         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
8413         * init.c (build_new_1): Extra arg to complete_type_or_else.
8414         (build_delete): Likewise.
8415         * typeck.c (require_complete_type): Likewise.
8416         (pointer_int_sum): Likewise.
8417         (pointer_diff): Likewise.
8418         (build_component_ref): Likewise.
8419
8420         * typeck2.c (incomplete_type_error): Always use cp_error.
8421         Show declaration of undefined type, if appropriate.
8422         Deal with UNKNOWN_TYPE nodes.
8423
8424         * typeck.c (require_complete_type): Use TYPE_SIZE as
8425         size_zero_node to mean incomplete type.
8426         (require_complete_type_in_void): New function.
8427         (build_compound_expr): Call complete_type_in_void for LHS.
8428         (build_c_cast): Call complete_type_in_void for void cast.
8429         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
8430         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
8431         require_complete_type_in_void.  Call it.
8432         * cp-tree.h (require_complete_type_in_void): Prototype new function.
8433
8434         * typeck.c (convert_arguments): Use alternative format for
8435         function decls.  Don't require_complete_type here.  Simplify
8436         diagnostic printing.
8437         (convert_for_initialization): Don't require_complete_type on RHS yet.
8438         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
8439
8440         * call.c (build_over_call): Cope with qualified void return type.
8441         * semantics.c (finish_call_expr): Likewise.
8442         * typeck.c (build_function_call_real): Likewise.
8443         (c_expand_return): Likewise.
8444         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
8445
8446         * call.c (print_z_candidates): Use alternate print format, to be
8447         consistent with (pt.c) print_candidates.
8448         * method.c (hack_identifier): List candidate members.
8449         * search.c (lookup_field): Build ambiguous list, and show it, if
8450         ambiguous.
8451
8452 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
8453
8454         * typeck.c (decay_conversion): Don't confuse constant array
8455         variables with their initializers.
8456
8457         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
8458         merging decls.
8459         * pt.c (regenerate_decl_from_template): Tweak for clarity.
8460         (instantiate_decl): Mark a decl instantiated before regenerating
8461         it to avoid recursion.
8462         * tree.c (mapcar): Don't call decl_constant_value unless we know
8463         something is TREE_READONLY_DECL_P.
8464
8465         * class.c (check_for_override): Don't stop checking when we find
8466         the first overridden function.  Delete #if 0'd code.
8467         * search.c (get_matching_virtual): Likewise.
8468
8469 1999-02-25  Richard Henderson  <rth@cygnus.com>
8470
8471         * lang-specs.h: Define __FAST_MATH__ when appropriate.
8472
8473 1999-02-24  Mike Stump  <mrs@wrs.com>
8474
8475         * typeck.c (convert_for_assignment): Allow boolean integral constant
8476         expressions to convert to null pointer.
8477
8478 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8479
8480         * decl.c (lookup_namespace_name): Resolve namespace aliases.
8481
8482         * class.c (push_nested_class): Allow namespaces.
8483
8484         * decl2.c (set_decl_namespace): Add friendp parameter.
8485         * decl.c (grokfndecl): Pass it.
8486         (grokvardecl): Likewise.
8487         * cp-tree.h: Change declaration.
8488
8489 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
8490
8491         * pt.c (tsubst): Allow an array of explicit size zero.
8492
8493 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
8494
8495         * errfn.c: Change varargs code to look like toplev.c.
8496
8497         * method.c (process_modifiers): Don't prepend 'U' for char or
8498         wchar_t.
8499
8500 1999-02-20  Craig Burley  <craig@jcb-sc.com>
8501
8502         * Make-lang.in (cplib2.ready): Don't consider updating
8503         cplib2 stuff if the current directory isn't writable, as
8504         it won't work (such as during a `make install').
8505
8506 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
8507
8508         * decl2.c (start_objects): Make file scope constructors and
8509         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
8510         ASM_OUTPUT_DESTRUCTOR are defined.
8511
8512 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
8513
8514         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
8515         (fn_type_unification): Adjust prototype.
8516         (lookup_fnfields_1): Declare.
8517         * call.c (add_template_candidate_real): Adjust call to
8518         fn_type_unification.
8519         * class.c (add_method): Don't allow duplicate declarations of
8520         constructors or destructors.
8521         (resolve_address_of_overloaded_function): Remove unused variable.
8522         Adjust call to fn_type_unification.
8523         * decl.c (grokfndecl): Be more robust in the face of illegal
8524         specializations.
8525         * decl2.c (check_classfn): Remove hokey handling of member
8526         templates.
8527         * pt.c (determine_specialization): Improve comments.  Adjust to
8528         handle template argument deduction as per the standard.
8529         (check_explicit_specialization): Fix comment spacing.  Handle
8530         type-conversion operators correctly.  Improve error-recovery.
8531         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
8532         (get_bindings_real): Simplify handling of static members.
8533         * search.c (lookup_fnfields_1): Make it have external linkage.
8534         * typeck.c (compparms): Fix comment.
8535         (build_unary_op): Don't try to figure out which template
8536         specialization is being referred to when when the address-of
8537         operator is used with a template function.
8538
8539 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8540
8541         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
8542         keyword to match an analogous change at the top level.
8543
8544         * tree.c (lvalue_or_else): Likewise.
8545
8546 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
8547
8548         * decl.c (xref_basetypes): Comment.
8549         * pt.c (instantiate_class_template): Use xref_basetypes.
8550
8551 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
8552
8553         * cp-tree.h (tsubst): Change prototype.
8554         (tsubst_expr): Likewise.
8555         (tsubst_copy): Likewise.
8556         (type_unification): Remove prototype.
8557         * call.c (convert_default_arg): Adjust call to tsubst_expr.
8558         * class.c (resolve_address_of_overloaded_function): Just use
8559         fn_type_unification.
8560         * decl.c (grokdeclarator): Adjust call to tsubst.
8561         * method.c (build_template_parm_names): Likewise.
8562         * pt.c (GTB_VIA_VIRTUAL): New macro.
8563         (GTB_IGNORE_TYPE): Likewise.
8564         (resolve_overloaded_unification): Add `complain' parameter.
8565         (try_one_overload): Likewise.
8566         (tsubst_template_arg_vector): Likewise.
8567         (tsubst_template_parms): Likewise.
8568         (tsubst_aggr_type): Likewise.
8569         (tsubst_arg_types): Likewise.
8570         (tsubst_call_declarator_parms): Likewise.
8571         (unify): Remove explicit_mask.
8572         (type_unification_real): Likewise.
8573         (get_template_base_recursive): Likewise.
8574         (coerce_template_template_parms): Provide prototype.
8575         (tsubst_function_type): Likewise.
8576         (try_class_unification): New function.
8577         All callers changed to use new complain parameter.
8578         (get_template_base): Use try_class_unification.
8579         (unify): Adjust handling of classes derived from template types.
8580         (fn_type_unification): Substitute explicit arguments before
8581         unification.
8582
8583 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8584
8585         * decl.c (pushdecl): Remove dead code.
8586
8587 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
8588
8589         * decl2.c (finish_objects): Fix code I missed in previous change.
8590
8591 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
8592
8593         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
8594         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
8595
8596         * pt.c (maybe_process_partial_specialization): Complain about
8597         'template <>' on non-specialization.
8598
8599 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
8600
8601         * decl.c (grokdeclarator): Catch wierd declarators.
8602         * decl2.c (finish_file): Don't abort because of namespace parsing
8603         failure.
8604         (check_decl_namespace): Remove.
8605
8606 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
8607
8608         * cp-tree.h (get_template_base): Don't declare.
8609         (dfs_walk): Declare.
8610         (dfs_unmark): Likewise.
8611         (markedp): Likewise.
8612         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
8613         targs to get_template_base.
8614         (get_template_base_recursive): Move here from search.c.  Check to
8615         see that the base found can be instantiated to form the desired
8616         type.
8617         (get_template_base): Likewise.
8618         (get_class_bindings): Simplify.
8619         * search.c (get_template_base_recursive): Move to pt.c.
8620         (get_template_base): Likewise.
8621         (markedp): Make it global.
8622         (dfs_walk): Likewise.
8623         (dfs_unmark): Likewise.
8624
8625 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
8626
8627         * pt.c (maybe_process_partial_specialization): Complain about
8628         specialization in wrong namespace.
8629         * tree.c (decl_namespace_context): New fn.
8630
8631 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8632
8633         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
8634         * pt.c (coerce_template_template_parms): Handle nested
8635         template template parameters.
8636
8637 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
8638
8639         * typeck2.c: Update email addresses.
8640
8641 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8642
8643         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
8644         turned off.
8645
8646 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
8647
8648         * lex.c (retrofit_lang_decl): Split out...
8649         (build_lang_decl): From here.
8650         * decl.c (pushdecl): Call it for functions generated by the middle
8651         end that don't have DECL_LANG_SPECIFIC.
8652         * cp-tree.h: Declare it.
8653
8654         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
8655         (start_objects, finish_objects): Only use special
8656         init_priority code if the user specified a priority.
8657         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
8658         objects.
8659
8660 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
8661
8662         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
8663         mkstemp.o.  Get them from libiberty now.
8664         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
8665
8666 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
8667
8668         * decl2.c (lang_decode_option): Use read_integral_parameter.
8669
8670 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
8671
8672         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
8673         before calling complete_type_or_else.
8674
8675 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8676
8677         * input.c (inline): Don't define, its handled by system.h.
8678
8679 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
8680
8681         * decl2.c: Don't define flag_no_ident here.  Don't process
8682         -f(no-)ident here.
8683         * cp-tree.h: Don't declare flag_no_ident here.
8684         * lang-specs.h: Map -Qn to -fno-ident.
8685
8686 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
8687
8688         * cp-tree.h (struct tree_binding): Replace scope field with a union.
8689         (BINDING_SCOPE): Adjust.
8690         * decl.c (BINDING_LEVEL): Adjust.
8691
8692 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
8693
8694         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
8695         member constants.
8696
8697         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
8698         a ctor initializer.
8699
8700         * tree.c (equal_functions): Fix name in prototype.
8701
8702         * decl.c (push_local_binding): Add FLAGS argument.
8703         (pushdecl, push_overloaded_decl): Pass it.
8704         * decl2.c (do_local_using_decl): Likewise.
8705         * cp-tree.h: Adjust prototype.
8706         * decl.c (poplevel): Fix logic.
8707
8708         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
8709         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
8710         (cat_namespace_levels): Don't loop forever.
8711
8712 1999-01-25  Richard Henderson  <rth@cygnus.com>
8713
8714         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
8715
8716 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
8717
8718         * class.c (resolve_address_of_overloaded_function): Mark the
8719         chosen function used.
8720
8721         * call.c (build_call): Make sure that a function coming in has
8722         been marked used already.
8723         * decl.c (expand_static_init): Call mark_used instead of
8724         assemble_external.
8725         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
8726         alloc_eh_object, expand_throw): Likewise.
8727         * init.c (build_builtin_delete_call): Likewise.
8728         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
8729         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
8730         expand_generic_desc): Likewise.
8731
8732 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8733
8734         * tree.c (equal_functions): New function.
8735         (ovl_member): Call it.
8736
8737 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
8738
8739         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
8740
8741 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8742
8743         * decl.c (decls_match): Return 1 if old and new are identical.
8744         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
8745
8746 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
8747
8748         * decl.c (start_function): Make member functions one_only on windows.
8749         * decl2.c (import_export_decl): Likewise.
8750
8751         * decl.c (grokdeclarator): Don't complain about implicit int in
8752         a system header.  Change same-name field check to not complain in
8753         a system header instead of within extern "C".
8754
8755 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
8756
8757         * cp-tree.h (PUSH_GLOBAL): New macro.
8758         (PUSH_LOCAL): Likewise.
8759         (PUSH_USING): Likewise.
8760         (namespace_bindings_p): Declare.
8761         (push_overloaded_decl): Likewise.
8762         * decl.c (push_overloaded_decl): Don't make it static.  Check for
8763         illegal declarations after using declarations here.
8764         (namespace_bindings_p): Likewise.
8765         (duplicate_decls): Don't consider declarations from different
8766         namespaces to be the same.
8767         (pushdecl): Use symbolic PUSH_ constants in calls to
8768         push_overloaded_decl.
8769         (push_overloaded_decl_1): Likewise.
8770         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
8771         (do_nonmember_using_decl): Check for illegal using declarations
8772         after ordinary declarations here.
8773         (do_local_using_decl): Call pushdecl to insert declarations.
8774
8775 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
8776
8777         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
8778
8779 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
8780
8781         * tree.c (build_cplus_array_type_1): Don't call build_array_type
8782         for types involving template parameters.
8783
8784         * cp-tree.h (PARM_DECL_EXPR): Delete.
8785         (convert_default_arg): Change prototype.
8786         (check_default_argument): Declare.
8787         (search_tree): Likewise.
8788         * call.c (convert_default_arg): Take the function to which the
8789         default argument belongs as a parameter, and do any necessary
8790         instantiation here, instead of ...
8791         (build_over_call): Here.
8792         * decl.c (local_variable_p): New function.
8793         (check_default_argument): Likewise, split out and tidied from ...
8794         (grokparms): Here.
8795         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
8796         * pt.c (tsubst_call_declarator_parms): New function.
8797         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
8798         with CALL_EXPRs, rather than trying to be clever.
8799         (tsubst): Use tsubst_call_declarator_parms.
8800         * tree.c (search_tree): Don't make it static.
8801         * typeck.c (convert_arguments): Use new interface to
8802         convert_default_arg.
8803
8804 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
8805
8806         * error.c (dump_function_decl): Don't print the argument types for
8807         a function when the verbosity level is negative.
8808
8809         * call.c (build_over_call): Check format attributes at call-time.
8810
8811         * pt.c (tsubst_copy): Fix comment.
8812         (unify): Don't allow unification with variable-sized arrays.
8813
8814         * semantics.c (finish_stmt_expr): When processing a template make
8815         the BIND_EXPR long-lived.
8816
8817 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
8818
8819         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
8820         (import_export_vtable): Not here.
8821
8822 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
8823
8824         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
8825         non-static member function.
8826
8827 1999-01-18  Nathan Sidwell  <nathan@acm.org>
8828
8829         * class.c (instantiate_type): Only diagnose illegal address of member
8830         function if complaining.
8831
8832         * decl.c (lookup_name_real): Remove duplicate code.
8833
8834 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
8835
8836         * tree.c (copy_template_template_parm): Use permanent_obstack.
8837
8838 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8839
8840         * pt.c (unify): Remove restrictions on deduction of argument
8841         of template template parameters.
8842
8843 1999-01-18  Nathan Sidwell  <nathan@acm.org>
8844
8845         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
8846
8847         * class.c (resolve_address_of_overloaded_function): Show list of
8848         all candidates, when none of them match.
8849
8850 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
8851
8852         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
8853         definition of 'casting away const' in reinterpret_cast<>.
8854
8855 1999-01-18  Graham  <grahams@rcp.co.uk>
8856
8857         * cvt.c: Add include for decl.h, remove extern for
8858         static_aggregates which is now provided by decl.h.
8859
8860         * Makefile.in (cvt.o): Add dependency for decl.h and missing
8861         dependencies for convert.h and flags.h.
8862
8863 1999-01-18  Nathan Sidwell  <nathan@acm.org>
8864
8865         * decl2.c (do_dtors): Set current location to that of the
8866         decl, for sensible diagnostics and debugging.
8867         (check_classfn): Issue `incomplete type' error, if
8868         class is not defined.
8869
8870 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
8871
8872         * cp-tree.h: Add prototype for bound_pmf_p.
8873
8874 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
8875             Manfred Hollstein <manfred@s-direktnet.de>
8876
8877         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
8878         -Wreturn-type.
8879
8880 1999-01-16  Nathan Sidwell  <nathan@acm.org>
8881
8882         * cp-tree.h (struct lang_type): Added has_mutable flag.
8883         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
8884         (TYPE_HAS_MUTABLE_P): New macro to read it.
8885         (cp_has_mutable_p): Prototype for new function.
8886         * class.c (finish_struct_1): Set has_mutable from members.
8887         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
8888         it contains a mutable.
8889         * typeck.c (cp_has_mutable_p): New function.
8890
8891 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
8892
8893         * pt.c (process_template_parm): Ignore top-level qualifiers on
8894         non-type parameters.
8895
8896         * decl.c (start_function): Use current_function_parms in the call
8897         to require_complete_type_for_parms, not the probably empty
8898         DECL_ARGUMENTS.
8899
8900 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
8901
8902         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
8903
8904         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
8905         that we don't suppress the other copies.
8906         * lex.c (handle_cp_pragma): Likewise.
8907
8908 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
8909
8910         * decl.c (grokdeclarator): Undo 1998-12-14 change.
8911         * tree.c (build_cplus_array_type_1): Likewise.
8912         * pt.c (instantiate_class_template): Remove misleading comment.
8913         (tsubst_aggr_type): Substitute if there are template parameters,
8914         regardless of whether or not they use template arguments.
8915         (unify): Likewise, but for unification.
8916
8917 1999-01-12  Richard Henderson  <rth@cygnus.com>
8918
8919         * cp-tree.h (flag_permissive): Declare extern.
8920
8921 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
8922
8923         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
8924         here.
8925         (lang_type): Add is_partial_instantiation.  Decrease width of
8926         dummy.
8927         (PARTIAL_INSTANTIATION_P): New macro.
8928         (OPERATOR_TYPENAME_P): Remove.
8929         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
8930         OPERATOR_TYPENAME_P.
8931         (grok_op_properties): Likewise.
8932         * friend.c (do_friend): Handle friends that are member functions
8933         correctly.
8934         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
8935         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
8936         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
8937         any more partial instantiation than is absolutely necessary for
8938         implicit typename.  Set PARTIAL_INSTANTIATION_P.
8939         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
8940         * semantics.c (begin_class_definition): Handle partial
8941         specializations of a type that was previously partially
8942         instantiated.
8943
8944 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
8945
8946         * g++spec.c (LIBSTDCXX): Provide default definition.
8947         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
8948
8949 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8950
8951         * Make-lang.in (g++.o): Depend on prefix.h.
8952
8953 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
8954
8955         * tree.c (bound_pmf_p): New fn.
8956         * typeck.c (build_c_cast): Use it.
8957
8958         * decl.c (grok_op_properties): Use same_type_p.
8959
8960 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8961
8962         * Makefile.in (cvt.o): Depend on toplev.h.
8963
8964         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
8965
8966         * cvt.c: Include toplev.h.
8967
8968         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
8969         definitions.
8970
8971         * init.c (expand_vec_init): Initialize variable `itype'.
8972
8973         * lex.c (yyerror): Cast the argument passed to a ctype function to
8974         an unsigned char.
8975
8976         * method.c (build_mangled_C9x_name): Wrap prototype and definition
8977         in "HOST_BITS_PER_WIDE_INT >= 64".
8978
8979         * typeck.c (build_binary_op): Mark parameter `convert_p' with
8980         ATTRIBUTE_UNUSED.
8981
8982 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
8983
8984         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
8985         * tree.c (build_exception_variant): Don't crash on empty throw
8986         specs.
8987
8988 1998-12-18  DJ Delorie  <dj@cygnus.com>
8989
8990         * cvt.c (convert_to_reference): Check for both error_mark_node
8991         and NULL_NODE after call to convert_for_initialization.
8992
8993 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
8994
8995         * error.c (interesting_scope_p): New fn.
8996         (dump_simple_decl): Use it.
8997         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
8998         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
8999
9000 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
9001
9002         * class.c (resolve_address_of_overloaded_function): Do conversion
9003         to correct type here, rather than ...
9004         (instantiate_type): Here.
9005
9006         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
9007         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
9008         (decl_template_parm_p): Remove.
9009         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
9010         parameter.
9011         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
9012         * pt.c (push_inline_template_parms_recursive): Set it.
9013         (decl_template_parm_p): Remove.
9014         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
9015         (process_template_parm): Set it.
9016
9017 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
9018
9019         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
9020         if configured with cpplib.
9021
9022 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
9023
9024         * decl.c (poplevel): Make sure ns_binding is initialized.
9025
9026         * decl.c (finish_function): Undo inadvertent change in previous
9027         patch.
9028
9029 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
9030
9031         * class.c (pushclass): Tweak handling of class-level bindings.
9032         (resolve_address_of_overloaded_function): Update pointer-to-member
9033         handling.
9034         (instantiate_type): Likewise.
9035         * cvt.c (cp_convert_to_pointer): Likewise.
9036         * decl.c (pop_binding): Take the DECL to pop, not just the name.
9037         Deal with `struct stat' hack.
9038         (binding_level): Add to documentation.
9039         (push_binding): Clear BINDING_TYPE.
9040         (add_binding): New function.
9041         (push_local_binding): Use it.
9042         (push_class_binding): Likewise.
9043         (poplevel): Adjust calls to pop_binding.
9044         (poplevel_class): Likewise.
9045         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
9046         declarations to current binding level.
9047         (push_class_level_binding): Likewise.
9048         (push_overloaded_decl): Adjust handling of OVERLOADs in local
9049         bindings.
9050         (lookup_namespace_name): Don't crash when confronted with a
9051         TEMPLATE_DECL.
9052         (lookup_name_real): Do `struct stat' hack in local binding
9053         contexts.
9054         (build_ptrmemfunc_type): Adjust documentation.
9055         (grokdeclarator): Don't avoid building real array types when
9056         processing templates unless really necessary.
9057         (finish_method): Adjust calls to pop_binding.
9058         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
9059         not reparse_decl_as_expr.
9060         (build_expr_from_tree): Deal with a template-id as the function to
9061         call in a METHOD_CALL_EXPR.
9062         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
9063         (maybe_adjust_types_For_deduction): Don't do peculiar things with
9064         METHOD_TYPEs here.
9065         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
9066         pointer-to-member types where necessary.
9067         * tree.c (build_cplus_array_type_1): Don't avoid building real
9068         array types when processing templates unless really necessary.
9069         (build_exception_variant): Compare the exception lists correctly.
9070
9071 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
9072
9073         * cp-tree.def (CPLUS_BINDING): Update documentation.
9074         * cp-tree.h (LOCAL_BINDING_P): New macro.
9075         (lang_identifier): Rename local_value to bindings.
9076         (tree_binding): Make `scope' of type `void*', not `tree'.
9077         (BINDING_SCOPE): Update documentation.
9078         (IDENTIFIER_LOCAL_VALUE): Remove.
9079         (IDENTIFIER_CLASS_VALUE): Document.
9080         (IDENTIFIER_BINDING): New macro.
9081         (IDENTIFIER_VALUE): Likewise.
9082         (TIME_IDENTIFIER_TIME): Likewise.
9083         (TIME_IDENTIFIER_FILEINFO): Likewise.
9084         (IMPLICIT_TYPENAME_P): Likewise.
9085         (set_identifier_local_value): Remove.
9086         (push_local_binding): New function.
9087         (push_class_binding): Likewise.
9088         * class.c (pushclass): Update comments; use push_class_binding.
9089         * decl.c (set_identifier_local_value_with_scope): Remove.
9090         (set_identifier_local_value): Likewise.
9091         (push_binding): New function.
9092         (pop_binding): Likewise.
9093         (binding_level): Update documentation.  Remove shadowed.
9094         (BINDING_LEVEL): New macro.
9095         (free_binding_nodes): New variable.
9096         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
9097         BLOCK_VARs when doing for-scope extension.  Remove effectively
9098         dead code.
9099         (pushlevel_class): Tweak formatting.
9100         (poplevel_class): Adjust for new name-lookup scheme.
9101         (print_binding_level): Likewise.
9102         (store_bindings): Likewise.
9103         (pushdecl): Likewise.
9104         (pushdecl_class_level): Likewise.
9105         (push_class_level_binding): Likewise.
9106         (push_overloaded_decl): Update comments.  Adjust for new
9107         name-lookup scheme.
9108         (lookup_name_real): Likewise.
9109         (lookup_name_current_level): Likewise.
9110         (cp_finish_decl): Likewise.
9111         (require_complete_types_for_parms): Likewise.  Remove misleading
9112         #if 0'd code.
9113         (grok_parms): Likewise.  Don't call
9114         require_complete_types_for_parms here.
9115         (grok_ctor_properties): Don't treat templates as copy
9116         constructors.
9117         (grop_op_properties): Or as assignment operators.
9118         (start_function): Document.  Adjust for new name-lookup scheme.
9119         (finish_function): Likewise.
9120         * decl2.c (do_local_using_decl): Use push_local_binding.
9121         * lex.c (begin_definition_of_inclass_inline): New function, split
9122         out from ...
9123         (do_pending_inlines): Here, and ...
9124         (process_next_inline): Here.
9125         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
9126         (init_filename_times): Likewise.
9127         (extract_interface_info): Likewise.
9128         (ste_typedecl_interface_info): Likewise.
9129         (check_newline): Likewise.
9130         (dump_time_statistics): Likewise.
9131         (handle_cp_pragma): Likewise.
9132         (do_identifier): Adjust for new name-lookup scheme.
9133         * parse.y (function_try_block): Return ctor_initializer_opt value.
9134         (fndef): Use it.
9135         (fn.defpen): Pass appropriate values to start_function.
9136         (pending_inline): Use functor_try_block value, and pass
9137         appropriate values to finish_function.
9138         * pt.c (is_member_template): Update documentation; remove handling
9139         of FUNCTION_DECLs.  As per name, this function should deal only in
9140         TEMPLATE_DECLs.
9141         (decl_template_parm_p): Change name of olddecl parameter to decl.
9142         (check_template_shadow): Adjust for new name-lookup scheme.
9143         (lookup_template_class): Likewise.
9144         (tsubst_decl): Tweak so as not to confuse member templates with
9145         copy constructors and assignment operators.
9146         (unify): Handle UNION_TYPEs.
9147         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
9148         (lang_print_xnode): Adjust for new name-lookup scheme.
9149         * typeck.c (mark_addressable): Likewise.
9150         (c_expand_return): Likewise.
9151
9152 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
9153
9154         * decl.c (grokdeclarator): Allow field with same name as class
9155         in extern "C".
9156
9157         * decl.c (lookup_name_real): Don't limit field lookup to types.
9158         * class.c (check_member_decl_is_same_in_complete_scope): No error
9159         if icv and x are the same.
9160         * lex.c (do_identifier): Tweak error message.
9161
9162 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
9163
9164         * decl.c (start_enum): Use push_obstacks, not
9165         end_temporary_allocation.
9166         (finish_enum): Call pop_obstacks.
9167
9168 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
9169
9170         * class.c (instantiate_type): Return error_mark_node rather than
9171         junk.
9172
9173 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
9174
9175         * cp-tree.h (most_specialized_instantiation): New function.
9176         (print_candidates): Likewise.
9177         * class.c (validate_lhs): Remove.
9178         (resolve_address_of_overloaded_function): New function, split out
9179         and then substantially reworked, from ...
9180         (instantiate_type): Use it.  Simplify.
9181         * cvt.c (convert_to_reference): Complain when caller has indicated
9182         that's the right thing to do.  Don't crash if instantiate_type
9183         fails.
9184         * pt.c: Substitute `parameters' for `paramters' throughout.
9185         (print_candidates): Don't make it static.
9186         (most_specialized_instantiation): Split out from ...
9187         (most_specialized): Here.
9188
9189 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
9190
9191         * lex.c (lang_init_options): Initialize cpplib.
9192         * decl2.c (parse_options,cpp_initialized): Removed.
9193         (lang_decode_option): Move initialization of cpplib to
9194         lang_init_options.
9195
9196 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
9197
9198         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
9199         well as the TYPE_DECL, when a typedef name is assigned to a
9200         previously anonymous type.
9201
9202 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
9203
9204         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
9205         __cp_eh_info for getting the eh info pointer.  Add table_index to
9206         field list.
9207         (push_eh_cleanup): Don't increment 'handlers' data field.
9208         (process_start_catch_block): Don't set the 'caught' field.
9209
9210         * cp/exception.cc (CP_EH_INFO): New macro for getting the
9211         exception info pointer within library routines.
9212         (__cp_eh_info): Use CP_EH_INFO.
9213         (__start_cp_handler): Get exception info pointer, set caught field,
9214         and increment the handlers field.  Avoids this being done by handlers.
9215         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
9216         (uncaught_exception): Use CP_EH_INFO macro.
9217
9218 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
9219
9220         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
9221
9222 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
9223
9224         * lex.c (check_newline): Add support for \ as `natural'
9225         characters in file names in #line to be consistent with #include
9226         handling.  We support escape processing in the # 1 "..." version of
9227         the command.  See also support in cp/lex.c.
9228
9229 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
9230
9231         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
9232         structure.
9233
9234 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
9235
9236         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
9237
9238         * error.c (dump_simple_decl): Also print namespace context.
9239         (dump_function_decl): Likewise.
9240
9241         * decl2.c (ambiguous_decl): Don't print old value if it's
9242         error_mark_node.
9243
9244         * decl.c (lookup_name_real): Fix handling of local types shadowed
9245         by a non-type decl.  Remove obsolete code.
9246         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
9247
9248         * lang-options.h: Add -fpermissive.
9249         * decl2.c: Likewise.
9250         * cp-tree.h: Add flag_permissive.
9251         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
9252         were specified, set flag_pedantic_errors.
9253         * call.c (build_over_call): Turn dropped qualifier messages
9254         back into pedwarns.
9255         * cvt.c (convert_to_reference): Likewise.
9256         * typeck.c (convert_for_assignment): Likewise.
9257
9258 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
9259
9260         * decl2.c (coerce_new_type): Use same_type_p.
9261         (coerce_delete_type): Likewise.
9262
9263         * call.c (check_dtor_name): Return 1, not error_mark_node.
9264
9265 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
9266
9267         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
9268         if MULTIPLE_SYMBOL_SPACES.
9269
9270         * pt.c (check_template_shadow): New fn.
9271         * decl2.c (grokfield): Use it.
9272         * decl.c (pushdecl): Likewise.
9273         (pushdecl_class_level): Likewise.
9274         (start_method): Likewise.
9275         (xref_tag): Don't try to use 't' if we're defining.
9276
9277         * call.c (check_dtor_name): Just return an error_mark_node.
9278         * pt.c (lookup_template_class): Complain about using non-template here.
9279         * parse.y (apparent_template_type): Not here.
9280
9281         * pt.c (check_explicit_specialization): Complain about specialization
9282         with C linkage.
9283
9284         * lang-options.h: Add -f{no-,}implicit-inline-templates.
9285
9286         * pt.c (convert_nontype_argument): Don't assume that any integer
9287         argument is intended to be a constant-expression.
9288
9289 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
9290
9291         * class.c (handle_using_decl): Fix comment.  Don't lookup
9292         constructors in base classes.
9293         (validate_lhs): Fix typo in comment.
9294         * search.c (lookup_field_1): Don't return a USING_DECL.
9295
9296         * cp-tree.h (DECL_ACCESS): Improve documentation.
9297
9298         * decl.c (expand_static_init): Don't set the initialization-done
9299         flag until the initialization is done.
9300
9301 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
9302
9303         * decl2.c (validate_nonmember_using_decl): Complain about using
9304         declarations for class members.
9305
9306 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
9307
9308         * typeck2.c (process_init_constructor): Use same_type_p.
9309
9310         * decl.c (check_tag_decl): Don't warn about null decl inside a
9311         class.
9312
9313         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
9314         UNIFY_ALLOW_NONE.
9315         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
9316         (resolve_overloaded_unification): Strip baselinks.
9317
9318 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9319
9320         * g++spec.c: Don't prototype xmalloc.
9321
9322 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
9323
9324         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
9325
9326         * decl.c (check_tag_decl): Do complain about null friend decl at
9327         file scope.
9328
9329 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
9330
9331         * lex.c (make_lang_type): Clear the whole struct lang_type, not
9332         only the first multiple of sizeof (int).
9333
9334 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
9335
9336         * decl.c (start_decl): An explicit specialization of a static data
9337         member is only a definition if it has an initializer.
9338
9339         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
9340         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
9341         cp_finish_decl.
9342         * init.c (expand_default_init): Check for DIRECT_BIND instead of
9343         DECL_ARTIFICIAL.
9344
9345         * call.c (build_over_call): Use build_decl.
9346
9347         * except.c (expand_throw): Just use convert, not
9348         build_reinterpret_cast.
9349
9350         * lex.c (handle_generic_pragma): Use token_buffer.
9351
9352         * decl.c (check_tag_decl): Don't complain about null friend decl.
9353
9354 1998-11-24  Dave Pitts  <dpitts@cozx.com>
9355
9356         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
9357         first position.
9358         * lex.c (check_newline): Use ISALPHA.
9359         (readescape): Use ISGRAPH.
9360         (yyerror): Use ISGRAPH.
9361
9362 1998-11-24  Nathan Sidwell  <nathan@acm.org>
9363
9364         * search.c (get_abstract_virtuals): Do not use initial
9365         CLASSTYPE_ABSTRACT_VIRTUALS.
9366         * typeck2.c (abstract_virtuals_error): Show location of abstract
9367         declaration.
9368         * call.c (build_new_method_call): Use
9369         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
9370         * class.c (finish_struct_bits): Don't bother working out whether
9371         get_abstract_virtuals will do anything, just do it.
9372
9373 1998-11-24  Graham  <grahams@rcp.co.uk>
9374
9375         * typeck.c (build_component_ref): Remove unused statement.
9376
9377 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
9378
9379         * class.c (add_method): Catch invalid overloads.
9380
9381         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
9382         * search.c (lookup_conversions): Handle getting real OVERLOADs.
9383         (add_conversions): Likewise.  Revert last change.
9384         * call.c (add_conv_candidate): Pass totype to add_candidate instead
9385         of fn.  Don't add a new candidate if the last one was for the same
9386         type.
9387         (print_z_candidates): Handle getting a type as a function.
9388         (joust): If we got two conversion candidates to the same type,
9389         just pick one.
9390         (build_object_call): Lose 'templates'.
9391         (build_user_type_conversion_1): Handle getting real OVERLOADs.
9392
9393 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
9394
9395         * typeck2.c (process_init_constructor): If there are elements
9396         that don't have initializers and they need to have constructors
9397         run, supply them with initializers.
9398
9399         * class.c (finish_struct_1): A class with a 0-width bitfield is
9400         still empty.
9401
9402 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
9403
9404         * pt.c (instantiate_class_template): Don't try to figure out what
9405         specialization to use for a partial instantiation.  Correct
9406         typos in a couple of comments.  Avoid calling uses_template_parms
9407         multiple times.
9408
9409 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
9410
9411         * method.c (process_overload_item): Add call to
9412         build_mangled_C9x_name for intTI_type_nodes.
9413         (build_mangled_C9x_name): Add prototype, define.
9414         * decl.c (init_decl_processing): Add names for
9415         TImode_type_node.
9416
9417 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
9418
9419         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
9420
9421         * class.c (finish_struct_1): Set things up for 0-width bitfields
9422         like we do for others.
9423
9424         * decl.c (check_tag_decl): New fn.
9425         (shadow_tag): Split out from here.
9426         * decl2.c (grok_x_components): Call it.
9427
9428 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
9429
9430         * decl.c: Lose warn_about_return_type.
9431         (grokdeclarator): Always complain about implicit int, except for
9432         `main () { ... }'.
9433
9434         * decl.c (tag_name): New fn.
9435         (xref_tag): Complain about using typedef-name after class-key.
9436
9437         * init.c (expand_vec_init): Also keep going if from_array.
9438
9439         * tree.c (is_overloaded_fn): Also handle the output of
9440         build_offset_ref.
9441
9442         * decl.c (grokdeclarator): Use constructor_name when comparing
9443         field name against enclosing class.
9444         * class.c (finish_struct_anon): Likewise.
9445
9446 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
9447
9448         * decl.c (poplevel): Remove code to handle KEEP == 2.
9449         (finish_function): Don't confuse BLOCK-order when
9450         processing a destructor.
9451
9452 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
9453
9454         * decl.c (require_complete_types_for_parms): Call layout_decl
9455         after we've completed the type.
9456
9457 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9458
9459         * decl2.c (validate_nonmember_using_decl): Allow using templates
9460         from the global namespace.
9461
9462 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
9463
9464         Handle specifying template args to member function templates.
9465         * tree.c (build_overload): Always create an OVERLOAD for a template.
9466         * search.c (add_conversions): Handle finding an OVERLOAD.
9467         * decl2.c (check_classfn): Likewise.
9468         * lex.c (identifier_type): See through a baselink.
9469         * parse.y (do_id): Don't call do_identifier if we got a baselink.
9470         * class.c (instantiate_type, case TREE_LIST): Recurse.
9471
9472         * decl.c (grokdeclarator): Allow a boolean constant for array
9473         bounds, odd as that sounds.
9474
9475         * pt.c (unify): Be more strict about non-type parms, except for
9476         array bounds.
9477         (UNIFY_ALLOW_INTEGER): New macro.
9478
9479 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
9480
9481         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
9482
9483 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
9484
9485         * semantics.c (begin_class_definition): Call
9486         maybe_process_partial_specialization before push_template_decl.
9487         Don't call push_template_decl for a specialization.
9488         * search.c (lookup_field): Do return a member template class.
9489         * decl2.c (handle_class_head): Handle member template classes.
9490
9491         * decl.c (grokdeclarator): A parm type need not be complete.
9492
9493         * pt.c (convert_nontype_argument): Fix thinko.
9494
9495 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
9496
9497         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
9498         (global_delete_fndecl): New variable.
9499         * decl.c (global_delete_fndecl): Define it.
9500         (init_decl_processing): Set it.
9501         * init.c (build_builtin_delete_call): Use it.
9502         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
9503         nodes.
9504
9505 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
9506
9507         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
9508         type.
9509
9510         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
9511         * call.c (build_object_call): Also support references to functions.
9512         * typeck.c (convert_for_initialization): Don't decay a function
9513         if the target is a reference to function.
9514
9515         * search.c (add_conversions): Get all the overloads from a class.
9516
9517         * decl.c (grok_ctor_properties): Complain about any constructor
9518         that will take a single arg of the class type by value.
9519
9520         * typeck2.c (build_functional_cast): Can't create objects of
9521         abstract classes this way.
9522         * cvt.c (ocp_convert): Likewise.
9523
9524         * decl.c (grokfndecl): Member functions of local classes are not
9525         public.
9526
9527 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
9528
9529         * Make-lang.in (cc1plus): Add dependency on hash.o.
9530
9531 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
9532
9533         * search.c (get_abstract_virtuals): Complain about virtuals with
9534         no final overrider.
9535         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
9536         with no final overrider.
9537         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
9538         on virtuals with no final overrider.
9539
9540         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
9541
9542         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
9543         after layout_type.
9544
9545         * friend.c (do_friend): Don't set_mangled_name_for_decl.
9546
9547         * class.c (finish_struct_anon): Complain about non-fields.
9548         * decl2.c (build_anon_union_vars): Likewise.
9549
9550         * decl.c (grokdeclarator): Normal data members can't have the same
9551         name as the class, either.
9552         * class.c (finish_struct_anon): Neither can members of an
9553         anonymous union.
9554
9555 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
9556
9557         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
9558         (TYPE_BINFO): Likewise.
9559         (IS_AGGR_TYPE): Tweak.
9560         (SET_IS_AGGR_TYPE): New macro.
9561         (CLASS_TYPE_P): Tweak.
9562         (lang_type): Group mark bitfields together.  Remove linenum.
9563         (CLASSTYPE_SOURCE_LINE): Remove macro.
9564         (CLASSTYPE_MARKED_N): New macro.
9565         (SET_CLASSTYPE_MARKED_N): Likewise.
9566         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
9567         (CLASS_TYPE_MARKED_*): Use them.
9568         (SET_CLASSTYPE_MARKED_*): Likewise.
9569         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
9570         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
9571         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
9572         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
9573         * class.c (class_cache_obstack): New variable.
9574         (class_cache_firstobj): Likewise.
9575         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
9576         (pushclass): Free the cache, when appropriate.
9577         (popclass): Tidy.
9578         (maybe_push_cache_obstack): Use class_cache_obstack.
9579         * decl.c (include hash.h).
9580         (typename_hash): New function.
9581         (typename_compare): Likewise.
9582         (build_typename_type): Check the hash table to avoid creating
9583         duplicates.
9584         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
9585         (grokdeclarator): Use CLASS_TYPE_P.
9586         (xref_basetypes): Likewise.
9587         (start_function): Likewise.  Don't put current_class_ref on the
9588         permanent obstack.
9589         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
9590         and TYPE_TI_ARGS.
9591         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
9592         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
9593         fields for types other than class types.  Do clear TYPE_ALIAS_SET
9594         for types other than class types, though.
9595         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
9596         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9597         * pt.c (process_template_parm): Don't set
9598         CLASSTYPE_GOT_SEMICOLON.
9599         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9600         Coerce arguments on the momentary obstack.
9601         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9602         (instantiate_class_template): Calculate template arguments on the
9603         momentary obstack.  Tidy.
9604         (tsubst_template_arg_vector): Use make_temp_vec.
9605         (tsubst_aggr_type): Put template arguments on the momentary
9606         obstack.
9607         (tsubst_decl): Likewise.
9608         (tsubst): Copy the array bounds index to the permanent obstack
9609         before building index types.  Use new macros.
9610         (unify): Use new macros.
9611         (do_type_instantiation): Likewise.
9612         * search.c (lookup_fnfields_1): Use new macros.
9613         (dfs_pushdecls): Build envelopes on the cache obstack.
9614         (dfs_compress_decls): Use new macros.
9615         (push_class_decls): Build on the cache obstack.
9616         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
9617         * sign.c (build_signature_pointer_or_reference_type): Use
9618         SET_IS_AGGR_TYPE.
9619         * tree.c (make_binfo): Check CLASS_TYPE_P.
9620         (copy_template_template_parm): Adjust.
9621         (make_temp_vec): Use push_expression_obstack.
9622         * typeck.c (complete_type): Use new macros.
9623         (comptypes): Likewise.
9624
9625 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
9626
9627         * pt.c (tsubst): Add diagnostics for invalid array, reference
9628         and pointer to member types.
9629
9630 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
9631
9632         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
9633
9634         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
9635         Simplify.
9636
9637         * parse.y (structsp): Fix cut-and-paste error.
9638
9639         * init.c (build_new): Complain about non-integral size.
9640
9641         * parse.y (unary_expr): Complain about defining types in sizeof.
9642
9643         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
9644
9645         * rtti.c (build_x_typeid): Complain about typeid without
9646         including <typeinfo>.
9647         (get_typeid): Likewise.  Complain about typeid of incomplete type.
9648         (get_tinfo_fn_dynamic): Likewise.
9649         (get_typeid_1): Not static anymore.
9650         * except.c (build_eh_type_type): Use get_typeid_1.
9651
9652         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
9653         ambiguous or private bases.  Fix warning for reference cast.
9654
9655 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
9656
9657         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
9658         * decl.c (duplicate_decls): Remove special-case code to deal with
9659         template friends, and just do the obvious thing.
9660         * pt.c (register_specialization): Tweak for clarity, and also to
9661         clear DECL_INITIAL for an instantiation before it is merged with a
9662         specialization.
9663         (check_explicit_specialization): Fix indentation.
9664         (tsubst_friend_function): Handle both definitions in friend
9665         declaration and outside friend declarations.
9666         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
9667         (regenerate_decl_from_template): Tweak accordingly.
9668         (instantiate_decl): Likewise.
9669
9670 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
9671
9672         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
9673         member function reference to error.
9674         * cvt.c (ocp_convert): Complain about converting an overloaded
9675         function to void.
9676
9677         * init.c (build_offset_ref): Just return a lone static member
9678         function.
9679
9680         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
9681         not internal ones.
9682
9683         * typeck.c (build_binary_op_nodefault): Improve error handling.
9684
9685         * decl.c (grokfndecl): Complain about making 'main' a template.
9686
9687         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
9688
9689         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
9690         TYPE_DECL in a template.
9691
9692 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
9693
9694         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
9695
9696         * decl.c (struct cp_function): Add named_label_uses.
9697         (push_cp_function_context): Save it.
9698         (pop_cp_function_context): Restore it.
9699         (define_label): Also complain about jumping into the scope of
9700         non-POD objects that don't have constructors.
9701         * tree.c (pod_type_p): New fn.
9702
9703         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
9704         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
9705         (get_tinfo_fn): Not here.
9706         * repo.c (repo_get_id): Abort if we get called for an incomplete
9707         type.
9708
9709 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
9710
9711         * except.c (expand_throw): Make sure first argument to
9712         __cp_push_exception is of type `void*' to avoid spurious error
9713         messages.
9714
9715 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
9716
9717         * pt.c (try_one_overload): Take orig_targs again.  Only check for
9718         mismatches against them; we don't care what a previous call found.
9719         (resolve_overloaded_unification): Adjust.
9720
9721         * search.c (lookup_field): Don't return anything for a non-type
9722         field from a dependent type.
9723         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
9724         in an array declarator.
9725         (start_decl): Push into the class before looking for the field.
9726
9727 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
9728
9729         * method.c (build_overload_value): Handle REFERENCE_TYPE.
9730
9731 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9732
9733         * decl.c (grokdeclarator): Allow namespace-scoped members if they
9734         are friends.
9735
9736 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
9737
9738         * pt.c (tsubst_decl): Don't mess with the global value of an
9739         un-mangled DECL_ASSEMBLER_NAME.
9740
9741 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
9742
9743         * decl.c (init_decl_processing): Remove CYGWIN conditional
9744         since CYGWIN is now able to deal with trapping signals.
9745
9746 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9747
9748         * cp-tree.h: Don't include gansidecl.h.
9749         * exception.cc: Include gansidecl.h (since we don't include config.h)
9750         * g++spec.c: Don't include gansidecl.h.
9751
9752 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
9753
9754         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
9755         size of dummy.
9756         (DECL_DEFINED_IN_CLASS_P): New macro.
9757         (TEMPLATE_PARMS_FOR_INLINE): Document.
9758         (check_static_variable_definition): New function.
9759         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
9760         appropriate.
9761         (check_static_variable_definition): Split out from ...
9762         (grokdeclarator): Here.
9763         * pt.c (check_default_tmpl_args): New function, split out from ...
9764         (push_template_decl_real): Here.
9765         (instantiate_template): Fix comment.
9766
9767 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
9768
9769         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
9770         (CP_TYPE_VOLATILE_P): Likewise.
9771         (CP_TYPE_RESTRICT_P): Likewise.
9772
9773 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
9774
9775         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
9776
9777 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
9778
9779         * class.c (instantiate_type): Be more helpful.
9780
9781         * decl2.c (import_export_decl): Call import_export_class.
9782
9783         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
9784         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
9785         * pt.c (tsubst_copy): Likewise.
9786
9787 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
9788
9789         * init.c (expand_vec_init): Fix off-by-one error.
9790
9791 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
9792
9793         * parse.y (apparent_template_type): New type.
9794         (named_complex_class_head_sans_basetype): Use it.
9795         * Makefile.in (CONFLICTS): One new conflict.
9796         * parse.c: Regenerated.
9797
9798 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
9799
9800         * cp-tree.h (COMPARE_STRICT): New macro.
9801         (COMPARE_BASE): Likewise.
9802         (COMPARE_RELAXED): Likewise.
9803         (COMPARE_REDECLARATION): Likewise.
9804         (same_type_p): Likewise.
9805         (same_or_base_type_p): Likewise.
9806         * call.c (standard_conversion): Use them, in place of comptypes
9807         with numeric arguments.
9808         (reference_binding): Likewise.
9809         (convert_like): Likewise.
9810         (build_over_call): Likewise.
9811         (is_subseq): Likewise.
9812         (is_properly_derived_from): Likewise.
9813         (compare_ics): Likewise.
9814         (joust): Likewise.
9815         * class.c (delete_duplicate_fields_1): Likewise.
9816         (resolves_to_fixed_type_p): Likewise.
9817         (instantiate_type): Likewise.  Remove #if 0'd code.
9818         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
9819         (pushdecl): Likewise.
9820         (lookup_name_real): Likewise.
9821         (grokdeclarator): Likewise.  Check for illegal array declarations.
9822         (grokparms): Likewise.
9823         (grok_op_properties): Likewise.
9824         * decl2.c (check_classfn): Likewise.
9825         * friend.c (is_friend): Likewise.
9826         (make_friend_class): Likewise.
9827         * init.c (expand_aggr_init): Likewise.
9828         (expand_vec_init): Likewise.
9829         * pt.c (is_member_template_class): Remove declaration.
9830         (is_specialization_of): Use COMPARE_* and new macros.
9831         (comp_template_parms): Likewise.
9832         (convert_nontype_argument): Likewise.
9833         (coerce_template_template_parms): Likewise.
9834         (template_args_equal): Likewise.
9835         (lookup_template_class): Likewise.
9836         (type_unification_real): Likewise.
9837         (unify): Likewise.
9838         (get_bindings_real): Likewise.
9839         * search.c (covariant_return_p): Likewise.
9840         (get_matching_virtual): Likewise.
9841         * sig.c (match_method_types): Likewise.
9842         * tree.c (vec_binfo_member): Likewise.
9843         (cp_tree_equal): Likewise.
9844         * typeck.c (common_type): Likewise.
9845         (comp_array_types): Likewise.  Get issues involving unknown array
9846         bounds right.
9847         (comptypes): Update comments.  Use new flags.
9848         (comp_target_types): Use new macros.
9849         (compparms): Likewise.
9850         (comp_target_parms): Likewise.
9851         (string_conv_p): Likewise.
9852         (build_component_ref): Likewise.
9853         (build_indirect_ref): Likewise.
9854         (build_conditional_expr): Likewise.
9855         (build_static_cast): Likewise.
9856         (build_reinterpret_cast): Likewise.
9857         (build_const_cast): Likewise.
9858         (build_modify_expr): Likewise.
9859         (convert_for_assignment): Likewise.
9860         (comp_ptr_ttypes_real): Likewise.
9861         (ptr_reasonably_similar): Likewise.
9862         (comp_ptr_ttypes_const): Likewise.
9863
9864 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
9865
9866         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
9867
9868 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
9869
9870         * decl2.c (delete_sanity): Pass integer_zero_node, not
9871         integer_two_node, to build_vec_delete.
9872         * init.c (build_array_eh_cleanup): Remove.
9873         (expand_vec_init_try_block): New function.
9874         (expand_vec_init_catch_clause): Likewise.
9875         (build_vec_delete_1): Don't deal with case that auto_delete_vec
9876         might be integer_two_node anymore.
9877         (expand_vec_init): Rework for initialization-correctness and
9878         exception-correctness.
9879         * typeck2.c (process_init_constructor): Make mutual exclusivity
9880         of cases more obvious.
9881
9882 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
9883
9884         * decl.c (lookup_name_real): OK, only warn if not lexing.
9885         Simplify suggested fix.
9886
9887         * cp-tree.h (IDENTIFIER_MARKED): New macro.
9888         * search.c (lookup_conversions): Use breadth_first_search.
9889         (add_conversions): Avoid adding two conversions to the same type.
9890         (breadth_first_search): Work with base binfos, rather
9891         than binfos and base indices.
9892         (get_virtual_destructor): Adjust.
9893         (tree_has_any_destructor_p): Adjust.
9894         (get_matching_virtual): Adjust.
9895
9896         * pt.c (push_template_decl_real): Generalize check for incorrect
9897         number of template parms.
9898         (is_member_template_class): #if 0.
9899
9900 1998-10-29  Richard Henderson  <rth@cygnus.com>
9901
9902         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
9903         last.
9904
9905 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
9906
9907         * lex.c: Call check_newline from lang_init always.  After
9908         calling cpp_start_read, set yy_cur and yy_lim to read from the
9909         cpplib token buffer.
9910
9911 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
9912
9913         * class.c (instantiate_type): Don't consider templates for a normal
9914         match.
9915
9916         * class.c (finish_struct_1): Don't complain about non-copy
9917         assignment ops in union members.
9918
9919         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
9920         (prepare_fresh_vtable): Likewise.
9921         (finish_struct_1): Don't call import_export_class.
9922         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
9923         (finish_prevtable_vardecl): Lose.
9924         (finish_file): Don't call it.
9925         * pt.c (instantiate_class_template): Likewise.
9926         * cp-tree.h: Remove it.
9927
9928         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
9929         * decl.c (finish_function): Not here.
9930         (start_function): Do set DECL_INITIAL.
9931
9932         * pt.c (push_template_decl_real): Complain about default template
9933         args for enclosing classes.
9934
9935         * call.c (add_function_candidate): Treat conversion functions
9936         as coming from the argument's class.
9937         * cp-tree.h (DECL_CONV_FN_P): New fn.
9938         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
9939         * class.c (add_method): Use DECL_CONV_FN_P.
9940         * decl2.c (check_classfn): Likewise.
9941         * error.c (dump_function_name): Likewise.
9942         (dump_function_decl): Likewise.
9943         * pt.c (fn_type_unification): Likewise.
9944         * search.c (add_conversions): Likewise.
9945
9946 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
9947
9948         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
9949         * method.c (hack_identifier): Also check for using RESULT_DECL
9950         from outer context.
9951
9952 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
9953
9954         * decl.c (grokdeclarator): Use type_quals, rather than constp,
9955         consistently.
9956
9957 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
9958
9959         * call.c (standard_conversion): instantiate_type here.
9960         (reference_binding): And here.
9961         (implicit_conversion): Not here.
9962         (build_op_delete_call): No need to cons up an OVERLOAD.
9963         * cvt.c (cp_convert_to_pointer): instantiate_type here.
9964         (convert_to_reference): And here.
9965         * decl.c (grok_reference_init): Not here.
9966         (grokparms): Or here.
9967         * typeck2.c (digest_init): Or here.
9968         * typeck.c (decay_conversion): Take the address of overloaded
9969         functions, too.
9970         (require_instantiated_type): Lose.
9971         (convert_arguments): Don't handle unknown types here.
9972         (build_c_cast): Likewise.
9973         (build_binary_op): Gut.
9974         (build_conditional_expr): Don't require_instantiated_type.
9975         (build_modify_expr): Likewise.
9976         (build_static_cast): Don't instantiate_type.
9977         (build_reinterpret_cast): Likewise.
9978         (build_const_cast): Likewise.
9979         (convert_for_initialization): Likewise.
9980         (build_ptrmemfunc): Use type_unknown_p.
9981         (convert_for_assignment): Also do default_conversion on overloaded
9982         functions.  Hand them off to ocp_convert.
9983
9984 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
9985
9986         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
9987         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
9988
9989         * class.c (finish_struct_1): Use build_cplus_array_type to build
9990         array types.
9991         * decl.c (init_decl_processing): Likewise.
9992         * except.c (expand_end_eh_spec): Likewise.
9993         * search.c (expand_upcast_fixups): Simplify very slightly.
9994
9995 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
9996
9997         * decl.c (grokdeclarator): Complain about a variable using
9998         constructor syntax coming back null from start_decl.
9999
10000         * friend.c (make_friend_class): Complain about trying to make
10001         a non-class type a friend.
10002
10003         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
10004         (start_function): Not here.
10005
10006 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
10007
10008         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
10009
10010 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
10011
10012         * typeck2.c (process_init_constructor): Only skip anonymous fields
10013         if they are bitfields.
10014
10015         * cp-tree.def (TYPEOF_TYPE): New code.
10016         * error.c (dump_type_real): Handle it.
10017         * pt.c (tsubst): Likewise.
10018         * tree.c (search_tree): Likewise.
10019         * semantics.c (finish_typeof): New fn.
10020         * parse.y (typespec): Use it.
10021         * cp-tree.h: Declare it.
10022
10023 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
10024
10025         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
10026
10027 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
10028
10029         * typeck.c (convert_arguments): Don't handle pmf references
10030         specially.
10031
10032         * init.c (build_member_call): Don't try to convert to the base type
10033         if it's ambiguous or pedantic.
10034
10035         * typeck2.c (check_for_new_type): Only depend on pedantic for
10036         C-style casts.
10037
10038 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
10039
10040         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
10041         non-converting constructors.
10042
10043 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10044
10045         * gxxint.texi: Correct documentation for n, N, Q, and B.
10046
10047 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10048
10049         * parse.y (condition): Convert VAR_DECL from reference to indirect
10050         reference.
10051
10052 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
10053
10054         * exception.cc (__cp_pop_exception): Free the original exception
10055         value, not the potentially coerced one.
10056
10057 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
10058
10059         * Makefile.in (hash.h): Run gperf when necessary.
10060
10061         * cp-tree.h (CP_TYPE_READONLY): Remove.
10062         (CP_TYPE_VOLATILE): Likewise.
10063         (CP_TYPE_QUALS): New macro.
10064         (CP_TYPE_CONST_P): Likewise.
10065         (CP_TYPE_VOLATILE_P): Likewise.
10066         (CP_TYPE_RESTRICT_P): Likewise.
10067         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
10068         (cp_build_type_variant): Rename to ...
10069         (cp_build_qualified_type): New function.
10070         (c_apply_type_quals_to_decl): Declare.
10071         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
10072         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
10073         (cp_type_qual_from_rid): New function.
10074         (compparms): Remove unused parameter.  All callers changed.
10075         (cp_type_quals): New function.
10076         (at_least_as_qualified_p): Likewise.
10077         (more_qualified_p): Likewise.
10078
10079         * call.c (standard_conversion): Replace calls to
10080         cp_build_type_variant with cp_build_qualified_type.  Use
10081         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
10082         compare them.  Use CP_TYPE_* macros to check qualifiers.
10083         (reference_binding): Likewise.
10084         (implicit_conversion): Likewise.
10085         (add_builtin_candidates): Likewise.
10086         (build_over_call): Likewise.
10087         * class.c (overrides): Compare all qualifiers, not just `const',
10088         on method declarations.
10089         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
10090         (convert_pointer_to_real): Likewise.
10091         (type_promotes_to): Likewise.
10092         * decl.c (check_for_uninitialized_const_var): New function.
10093         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
10094         (cp_finish_decl): Use check_for_uninitialized_const_var.
10095         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
10096         handle `restrict'.
10097         (grok_ctor_properties): Likewise.
10098         (grok_op_properties): Likewise.
10099         (start_function): Likewise.
10100         (rever_static_member_fn): Likewise.
10101         * decl2.c (grok_method_quals): Likewise.
10102         (grokfield): Likewise.
10103         * error.c (dump_readonly_or_volatile): Rename to ...
10104         (dump_qualifiers): New function.  Handle `restrict'.
10105         (dump_type_real): Use it.
10106         (dump_aggr_type): Likewise.
10107         (dump_type_prefix): Likewise.
10108         (dump_type_suffix): Likewise.
10109         (dump_function_decl): Likewise.
10110         (cv_as_string): Likewise.
10111         * gxx.gperf: Add __restrict and __restrict__.
10112         * gxxint.texi: Document `u' as used for `__restrict', and a few
10113         other previously undocumented codes.
10114         * hash.h: Regenerated.
10115         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
10116         (build_member_call): Likewise.
10117         (build_new_1): Likewise.
10118         * lex.c (init_parse): Add entry for RID_RESTRICT.
10119         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
10120         (cp_type_qual_from_rid): Define.
10121         * lex.h (enum rid): Add RID_RESTRICT.
10122         * method.c (process_modifiers): Deal with `restrict'.
10123         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
10124         * parse.c: Regenerated.
10125         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
10126         (tsubst_aggr_type): Likewise.
10127         (tsubst): Likewise.
10128         (check_cv_quals_for_unify): Likewise.
10129         (unify): Likewise.
10130         * rtti.c (init_rtti_processing): Likewise.
10131         (build_headof): Likewise.
10132         (get_tinfo_var): Likewise.
10133         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
10134         (expand_class_desc): Likewise.
10135         (expand_attr_desc): Likewise.
10136         (synthesize_tinfo_fn): Likewise.
10137         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
10138         (get_matching_virtual): Likewise.
10139         (expand_upcast_fixups): Likewise.
10140         * sig.c (build_signature_pointer_or_reference_name): Take
10141         type_quals, not constp and volatilep.
10142         (build_signature_pointer_or_reference_type): Likewise.
10143         (match_method_types): More CP_TYPE_QUALS conversion, etc.
10144         (build_signature_pointer_constructor): Likewise.
10145         (build_signature_method_call): Likewise.
10146         * tree.c (build_cplus_array_type): Likewise.
10147         (cp_build_type_variant): Rename to ...
10148         (cp_build_qualified_type): New function.  Deal with `__restrict'.
10149         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
10150         (build_exception_variant): Likewise.
10151         (mapcar): Likewise.
10152         * typeck.c (qualif_type): Likewise.
10153         (common_type): Likewise.
10154         (comptypes): Likewise.
10155         (comp_cv_target_types): Likewise.
10156         (at_least_as_qualified_p): Define.
10157         (more_qualified_p): Likewise.
10158         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
10159         (compparms): Likewise.
10160         (inline_conversion): Likewise.
10161         (string_conv_p): Likewise.
10162         (build_component_ref): Likewise.
10163         (build_indirect_ref): Likewise.
10164         (build_array_ref): Likewise.
10165         (build_unary_op): Likewise.
10166         (build_conditional_expr): Likewise.
10167         (build_static_cast): Likewise.
10168         (build_c_cast): Likewise.
10169         (build_modify_expr): Likewise.
10170         (convert_For_assignment): Likewise.
10171         (comp_ptr_ttypes_real): Likewise.
10172         (cp_type_quals): New function.
10173
10174 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
10175
10176         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
10177         (CP_TYPE_VOLATILE): Likewise.
10178         * decl.c (grokdeclarator): Use them.
10179         * tree.c (canonical_type_variant): Likewise.
10180
10181 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10182
10183         * parse.y (named_class_head): Push into class while parsing the
10184         base class list.
10185         * decl2.c (push_scope, pop_scope): New functions.
10186         * cp-tree.h: Declare them.
10187         * init.c (build_new_1): Delay cleanup until end of full expression.
10188
10189 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
10190
10191         * typeck.c (build_component_ref): Use of a type here is an error.
10192
10193 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
10194
10195         Revamp references to member functions.
10196         * method.c (hack_identifier): Call build_component_ref for a
10197         reference to a member function.
10198         * typeck.c (build_component_ref): Only return a single function
10199         if it's static.  Otherwise, return a COMPONENT_REF.
10200         (build_x_function_call): Handle a COMPONENT_REF.
10201         (build_unary_op): Handle all unknown-type things.
10202         * decl2.c (arg_assoc): Handle COMPONENT_REF.
10203         * class.c (instantiate_type): Complain if the function we get is a
10204         nonstatic member function.  Remove code for finding "compatible"
10205         functions.
10206         * pt.c (tsubst_copy): Handle NOP_EXPR.
10207         * tree.c (build_dummy_object): New fn.
10208         (maybe_dummy_object): New fn.
10209         (is_dummy_object): New fn.
10210         * cp-tree.h: Declare them.
10211         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
10212         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
10213         * init.c (build_member_call): Use maybe_dummy_object and
10214         is_dummy_object.
10215         (build_offset_ref): Use maybe_dummy_object.
10216         (resolve_offset_ref): Use is_dummy_object.
10217         * typeck.c (build_x_function_call): Call build_dummy_object.
10218         (unary_complex_lvalue): Call is_dummy_object.
10219
10220         * typeck.c (build_component_addr): Make sure field is a field.
10221
10222         * call.c (build_new_op): Delete obsolete code.
10223
10224         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
10225
10226 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10227
10228         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
10229         std if std is ignored.
10230
10231 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
10232
10233         * decl.c (grokvardecl): Fix thinko.
10234
10235         * decl.c (grokdeclarator): Embedded attrs bind to the right,
10236         not the left.
10237
10238         * parse.y (fn.def2): Fix 'attrs' format.
10239
10240 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
10241
10242         * Makefile.in (CONFLICTS): Update.
10243         * parse.y (expr_or_declarator_intern): New rule.
10244         (expr_or_declarator, direct_notype_declarator, primary,
10245         functional_cast): Use it.
10246         (notype_declarator_intern): New rule.
10247         (notype_declarator, complex_notype_declarator): Use it.
10248
10249 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
10250
10251         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
10252         (grokvardecl): Likewise.
10253
10254 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10255
10256         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
10257         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
10258
10259         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
10260
10261         * pt.c (process_partial_specialization): Cast 1st argument of
10262         `bzero' to (PTR).
10263
10264         * tree.c (build_base_fields): Cast `base_align' to (int) when
10265         comparing against one.
10266
10267 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
10268
10269         * decl.c (lookup_name_real): Handle template parameters for member
10270         templates where said parameters have the same name as the
10271         surrounding class.
10272
10273         * decl.c (expand_static_init): Build cleanups before entering the
10274         anonymous function used to do them to avoid access-checking
10275         confusion.
10276
10277         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
10278         accidentally removed by previous change, and make DECL_RTL here.
10279         * class.c (add_method): Don't make DECL_RTL here.
10280
10281         * pt.c (for_each_template_parm): Don't examine uninstantiated
10282         default arguments.
10283
10284 1998-10-16  Dave Brolley  <brolley@cygnus.com>
10285
10286         * lex.c (real_yylex): Fix unaligned access of wchar_t.
10287
10288 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
10289
10290         * class.c (add_method): Fix documentation to reflect previous
10291         changes.  Check for duplicate method declarations here.
10292         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
10293         correctly; such things never match.
10294         (grokfndecl): Don't look for duplicate methods here.
10295         * decl2.c (check_classfn): Don't assume names are mangled.
10296         Don't add bogus member function declarations to a class before the
10297         class type is complete.
10298         (grokfield): Reformat error message.
10299         * method.c (set_mangled_name_for_decl): Don't mangle names while
10300         processing_template_decl.
10301
10302 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
10303
10304         * typeck.c (build_indirect_ref): Complain about a pointer to data
10305         member, too.
10306         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
10307         data member.
10308         * init.c (resolve_offset_ref): Don't undo the above.
10309
10310         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
10311         (struct lang_decl_flags): Add `bitfield'.
10312         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
10313         DECL_BIT_FIELD.
10314         * decl2.c (grokbitfield, grok_alignof): Likewise.
10315         * init.c (build_offset_ref): Likewise.
10316         * typeck.c (build_component_addr, expr_sizeof): Likewise.
10317         * cvt.c (build_up_reference): Don't crash if taking the address
10318         returns error_mark_node.
10319
10320         * decl.c (grokfndecl): Also check ctype when checking for ::main().
10321
10322 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
10323
10324         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
10325         Do mangling here.
10326         (grokdeclarator): Instead of here.
10327         * friend.c (do_friend): Lose special handling of ::main and
10328         __builtin_*.
10329         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
10330
10331         * spew.c (yylex): Clear looking_for_typename if we got
10332         'enum { ... };'.
10333
10334 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
10335
10336         * class.c (maybe_warn_about_overly_private_class): Improve error
10337         messages for class with only private constructors.
10338
10339         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
10340         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
10341         (build_typename_type): New function.
10342         * decl.c (build_typename_type): Broken out from ...
10343         (make_typename_type): Use it.
10344         * search.c (lookup_field): Likewise.
10345
10346 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10347
10348         * pt.c (convert_nontype_argument): Check against type_referred_to.
10349         * decl.c (grokvardecl): Check for declarator name before building
10350         DECL_ASSEMBLER_NAME.
10351
10352 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
10353
10354         * pt.c (lookup_template_class): Add comment.
10355         (instantiate_class_template): Don't mark the _TYPE node for
10356         member class templates as an instantiation.
10357
10358 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
10359
10360         * decl.c (grokfndecl): Fix my thinko.
10361
10362 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
10363
10364         * tinfo2.cc (fast_compare): Remove.
10365         (before): Just use strcmp.
10366         * tinfo.cc (operator==): Just use strcmp.
10367
10368 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
10369
10370         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
10371         declarations.
10372
10373 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
10374
10375         * cp-tree.h (specializations_of_same_template_p): Remove.
10376         * search.c (get_template_base): Don't use it.
10377         (get_template_base_recursive): Likewise.
10378         * pt.c (specializations_of_same_template_p): Remove.
10379         (unify): Don't use it.
10380         (lookup_template_class): Find the correct parent when setting
10381         CLASSTYPE_TI_TEMPLATE.
10382
10383 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
10384
10385         * tinfo.cc (operator==): Always compare names.
10386
10387 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
10388
10389         * decl.c (start_function): Fix cut-and-paste error.
10390
10391 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
10392
10393         * inc/typeinfo: Add #pragma interface.
10394         (operator!=): Just call operator==.
10395         * tinfo.cc: Add #pragma implementation.
10396         (operator==): Move from inc/typeinfo and tinfo2.cc.
10397         Check __COMMON_UNRELIABLE instead of _WIN32.
10398
10399         * typeck2.c (my_friendly_abort): Add URL.
10400
10401 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
10402
10403         * decl.c (start_method): Added extra parameter for attributes.
10404         * cp-tree.h (start_method): Update prototype.
10405         * parse.y (fn.def2): Update start_method parameter list.
10406
10407 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
10408
10409         * cp-tree.h (specializations_of_same_template_p): Declare.
10410         * pt.c (specializations_of_same_template_p): New function.
10411         (unify): Use it.
10412         * search.c (get_template_base): Use it.
10413         (get_template_base_recursive): Likewise.
10414
10415 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
10416
10417         * decl2.c (start_objects): Add new variable `joiner' and
10418         initialize it properly.
10419
10420 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
10421
10422         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
10423         change to vtable types.
10424
10425         * cvt.c (ocp_convert): Avoid infinite recursion caused by
10426         1998-10-03 change.
10427
10428 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
10429
10430         * pt.c (resolve_overloaded_unification): New fn.
10431         (try_one_overload): Likewise.
10432         (unify): Don't fail on unknown type.
10433         (type_unification_real): Likewise.  Use resolve_overloaded_unification
10434         to handle an overloaded argument.
10435         (template_args_equal): Split out...
10436         (comp_template_args): From here.
10437         (determine_specialization): Also allow a template with more
10438         parms than were explicitly specified.
10439         * cp-tree.h: Add template_args_equal.
10440         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
10441
10442 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
10443
10444         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
10445         change.
10446
10447 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
10448
10449         * typeck.c (unsigned_type): Only return TItype nodes when
10450         HOST_BITS_PER_WIDE_INT is >= 64 bits.
10451         (signed_type): Likewise.
10452         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
10453         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
10454         (init_decl_processing): Only create TItype nodes when
10455         HOST_BITS_PER_WIDE_INT is >= 64 bits.
10456         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
10457         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
10458
10459 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10460
10461         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
10462         (gxx.gperf): Update comments describing invocation flags.
10463         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
10464
10465 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
10466
10467         * class.c (finish_struct_1): Add commentary on previous change.
10468
10469         * cp-tree.h (vtbl_ptr_type_node): New variable.
10470         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
10471         already of the right type.
10472         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
10473         Simplify code to grow vtable.
10474         * decl.c (vtbl_ptr_type_node): Define.
10475         (init_decl_processing): Initialize it.
10476
10477 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
10478
10479         * cp-tree.def (PTRMEM_CST): New tree node.
10480         * cp-tree.h (ptrmem_cst): New type.
10481         (lang_type): Remove local_typedecls.
10482         (dummy): Increase to 12 bits from 11.
10483         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
10484         (PTRMEM_CST_CLASS): New macro.
10485         (PTRMEM_CST_MEMBER): Likewise.
10486         (current_access_specifier): New variable.
10487         (current_class_type): Remove duplicate declaration.
10488         (finish_struct): Change prototype.
10489         (unreverse_member_declarations): New function.
10490         (pushdecl_class_level): Change prototype.
10491         (grok_enum_decls): Remove.
10492         (fixup_anonymous_union): New function.
10493         (grok_x_components): Change prototype.
10494         (tsubst_chain): Remove.
10495         (finish_member_template_decl): Likewise.
10496         (check_explicit_specialization): Fix indentation.
10497         (finish_class_definition): Change prototype.
10498         (finish_member_class_template): Likewise.
10499         (finish_member_declaration): New function.
10500         (check_multiple_declarators): Likewise.
10501         * class.c (class_stack_node_t): New type.
10502         (current_class_base): Remove.
10503         (current_class_stack): Change type.
10504         (current_access_specifier): New variable.
10505         (grow_method): Remove.
10506         (check_member_decl_is_same_in_complete_scope): Break out from
10507         finish_struct.
10508         (make_method_vec): New function.
10509         (free_method_vec): Likewise.
10510         (add_implicitly_declared_members): Break out from finish_struct_1.
10511         (free_method_vecs): New variable.
10512         (add_method): Rework for direct use from parser.
10513         (handle_using_decl): Watch for NULL_TREE while iterating through
10514         CLASSTYPE_METHOD_VEC.
10515         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
10516         just do some error-checking.
10517         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
10518         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
10519         (finish_struct): Change prototype.  Simplify; fields and methods
10520         are already set up at this point.
10521         (init_class_processing): Set up current_class_stack.
10522         (pushclass): Save current_access_specifier.
10523         (popclass): Restore it.
10524         (currently_open_class): Simplify.
10525         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
10526         * decl.c (saved_scope): Add access_specifier.
10527         (maybe_push_to_top_level): Save it.
10528         (pop_from_top_level): Restore it.
10529         (maybe_process_template_type_declaration): Use
10530         finish_member_declaration.
10531         (pushtag): Likewise.
10532         (pushdecl_class_level): Don't return a value.
10533         (fixup_anonymous_union): Break out from grok_x_components.
10534         (shadow_tag): Use it.
10535         (xref_tag): Complain about using an elaborated type specifier to
10536         reference a template type parameter or typedef name.
10537         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
10538         (current_local_enum): Remove.
10539         (build_enumerator): Call finish_member_declaration.
10540         (grok_enum_decls): Remove.
10541         * decl2.c (grok_x_components): Simplify.
10542         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
10543         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
10544         (merge_functions): Add to comment.
10545         (arg_assoc_type): Prototype.
10546         (arg_assoc): Pass as many arguments as there are parameters.
10547         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
10548         OFFSET_REF.
10549         * expr.c (cpls_expand_expr): Remove dead code.  Handle
10550         PTRMEM_CST.
10551         * friend.c (do_friend): Lookup friends when in nested classes.
10552         Change comments.
10553         * init.c (build_offset_ref): Do lookup even for classes that are
10554         only partially defined.
10555         (decl_constant_value): Remove dead code.
10556         * method.c (build_overload_value): Remove hack where by TYPE was
10557         not a TYPE.  Handle PTRMEM_CST.
10558         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
10559         should go.
10560         * parse.y (components, notype_components, component_decl,
10561         component_decl_1, component_declarator, component_declarator0):
10562         Now all are itype rather than ttype.  Rework to add members to
10563         classes on the fly.
10564         (typesqpecqual_reserved): Use check_multiple_declarators.
10565         (structsp): Update class to finish_class_definition.
10566         (do_xref_defn): Unsplit into named_class_head.
10567         (access_specifier): Set current_access_specifier.
10568         * pt.c (set_current_access_from_decl): New function.
10569         (finish_member_template_decl): Don't take the parameters.
10570         (comp_template_args): Make more robust.
10571         (lookup_template_class): Don't use current_local_enum.
10572         (for_each_template_parm): Handle PTRMEM_CST.
10573         (instantiate_class_template): Use set_current_access_from_decl,
10574         finish_member_declaration and unreverse_member_declarations.  Set
10575         lineno/input_filename before generating implicit member functions.
10576         (type_unification_real): Don't assume back-unification happens
10577         only for the last argument.
10578         (regenerate_decl_from_template): Call pushclass a bit earlier.
10579         (tsubst_chain): Remove.
10580         (tsubst_enum): Use set_current_access_from_decl.
10581         (set_mangled_name_for_template_decl): Fix indentation.
10582         * search.c (lookup_fnfields_1): Change iteration through
10583         CLASSTYPE_METHOD_VEC.
10584         (dfs_pushdecls): Likewise.
10585         (dfs_compress_decls): Likewise.
10586         (add_conversions): Likewise.
10587         * semantics.c (finish_class_definition): Don't take components.
10588         Change call to finish_struct.
10589         (finish_member_declaration): New function.
10590         (finish_member_class_template): Don't take template parameters.
10591         Change call to grok_x_components.  Call finish_member_template_decl.
10592         (check_multiple_declarators): New function.
10593         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
10594         a passed in fieldlist.
10595         * tree.c (search_tree): Handle PTRMEM_CST.
10596         (mapcar): Likewise.
10597         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
10598         INTEGER_CSTs, for pointer-to-data members.
10599
10600         * call.c (resolve_args): Resolve template specializations, if
10601         possible.
10602
10603 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10604
10605         * Makefile.in (spew.o): Depend on toplev.h.
10606
10607         * call.c (compare_ics): Initialize variables `deref_from_type2',
10608         `deref_to_type1' and `deref_to_type2'.
10609
10610         * except.c (get_eh_type): Hide prototype and definition.
10611         (process_start_catch_block_old): Remove unused static prototype.
10612
10613         * pt.c (tsubst_decl): Initialize variable `argvec'.
10614
10615         * spew.c: Include toplev.h.
10616
10617 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
10618
10619         * pt.c (instantiate_decl): Do save and restore file position.
10620
10621 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10622
10623         * method.c (build_decl_overload_real): Clear
10624         numeric_output_need_bar after __.
10625
10626 1998-10-05  Nathan Sidwell  <nathan@acm.org>
10627
10628         * call.c (build_new_method_call): Issue 'incomplete type' error,
10629         if class is not defined.
10630
10631 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10632
10633         * call.c (build_object_call): Move declaration of variable
10634         `fn' into the scope where it is used.  Don't access variable
10635         `fn' when it is uninitialized, instead use `fns'.
10636
10637 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10638
10639         * errfn.c (cp_thing): Print buf as a string not as a printf format
10640         to avoid problems with the operator%.  Consequently, `%%' sequences
10641         in format are copied as `%' in buf.
10642
10643 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
10644
10645         * pt.c (pop_tinst_level): Call extract_interface_info.
10646         (instantiate_decl): Don't save and restore file position.
10647
10648         * decl.c (cp_finish_decl): Make statics in extern inlines and
10649         templates common, if possible and the target doesn't support weak
10650         symbols.
10651
10652         * decl.c (grokdeclarator): Remove redundant calls to
10653         build_type_variant and some duplicated code.
10654         * sig.c (build_signature_reference_type): Only take the type parm.
10655         (build_signature_pointer_type): Likewise.
10656         * tree.c (build_cplus_method_type): Adjust.
10657         * cp-tree.h: Update.
10658
10659 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
10660
10661         * call.c (build_over_call): Make pedwarns about dropped qualifiers
10662         into full-fledged errors.
10663         * cvt.c (convert_to_reference): Likewise.
10664         * typeck.c (convert_for_assignment): Likewise.
10665
10666         * search.c (expand_upcast_vtables): In addition to unsetting
10667         TREE_READONLY, remove top-level const type qualifier.
10668
10669 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
10670
10671         * class.c (current_class_ptr, current_class_ref): Clarify
10672         documentation.
10673         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
10674         NOP type conversions.
10675         * decl.c (decls_match): Use comptypes directly; ignore
10676         qualifiers on the DECL.
10677         (duplicate_decls): Remove qualifier checks on DECL.
10678         (grokdeclarator): Make the type built up include top-level
10679         qualifiers.
10680         * decl2.c (do_dtors): Fix spelling error.
10681         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
10682         when printing type information.
10683         * init.c (build_new_1): Add documentation.  Deal with the fact
10684         that type of allocated memory now contains qualifiers.
10685         * lex.c (is_global): Improve error-recovery.
10686         * sig.c (build_member_function_pointer): Don't cast away const
10687         on fields of sigtable_entry_type.
10688         * tree.c (lvalue_type): Don't look at top-level qualifiers on
10689         expressions.
10690         * typeck.c (decay_conversion): Likewise.
10691         (build_component_ref): Make sure the type of the COMPONENT_REF
10692         contains top-level qualifiers, as appropriate.  Improve
10693         error-handling.
10694         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
10695         (build_array_ref): Likewise.
10696         (build_unary_op): Improve error-recovery.
10697         (unary_complex_lvalue): Make taking the address a bound member
10698         function an error, not a sorry.
10699         (build_conditional_expr): Look at the type qualifiers, not the
10700         qualifiers on the expression itself.
10701
10702 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
10703
10704         * decl2.c (merge_functions): Remove duplicates.
10705
10706         * decl2.c: Add -f{no-,}implicit-inline-templates.
10707         (import_export_decl): Check it.
10708
10709         * decl.c (lookup_name_real): Template parms also take precedence
10710         over implicit typename.  Only warn if yylex.
10711
10712         * typeck.c (build_conditional_expr): Only fold if ifexp is an
10713         INTEGER_CST.
10714
10715         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
10716         instead of linkage.
10717
10718 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
10719
10720         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
10721         * class.c (build_vbase_pointer): Use it.
10722         * rtti.c (expand_class_desc): Likewise.
10723         * tree.c (build_vbase_pointer_fields): Likewise.
10724
10725 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
10726
10727         * decl.c (start_decl): Add invocation of
10728         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
10729         (start_function): Add invocation of
10730         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
10731
10732         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
10733         HANDLE_GENERIC_PRAGMAS.
10734
10735 1998-09-28  Anthony Green  <green@cygnus.com>
10736
10737         * semantics.c (finish_asm_stmt): Always permit volatile asms.
10738
10739 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
10740
10741         * decl.c (grokdeclarator): Tighten checks for invalid
10742         destructors.  Improve error-messages and error-recovery.
10743         * decl2.c (check_classfn): Don't assume that mangled destructor
10744         names contain type information.
10745
10746 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
10747
10748         * search.c (get_base_distance): Remove assert.
10749
10750         * decl2.c (build_anon_union_vars): Don't process a field with no
10751         name.
10752         (finish_anon_union): Also complain about local anon unions with no
10753         members.
10754
10755 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10756
10757         * decl.c (lookup_namespace_name): If the name is a namespace,
10758         return it immediately.
10759
10760 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10761
10762         * cp-tree.h (define_case_label): Remove unused parameter.
10763         (check_java_method): Likewise.
10764         (grokclassfn): Likewise.
10765         (expand_aggr_init): Likewise.
10766         (build_x_delete): Likewise.
10767         (maybe_end_member_template_processing): Likewise.
10768         (unshare_base_binfos): Add prototype.
10769         (string_conv_p): Likewise.
10770         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
10771
10772         * cvt.c (build_up_reference): Remove unused parameter
10773         `checkconst', all callers changed.
10774         (build_type_conversion): Mark parameter `code' with
10775         ATTRIBUTE_UNUSED.
10776         (build_expr_type_conversion): Initialize variable `conv'.
10777
10778         * decl.c (push_namespace): Initialize variable `d'.
10779         (define_case_label): Remove unused parameter `decl', all callers
10780         changed.
10781
10782         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
10783         `argc' with ATTRIBUTE_UNUSED.
10784         (grokclassfn): Remove unused parameter `cname', all callers
10785         changed.
10786         (check_java_method): Likewise for parameter `ctype'.
10787         (copy_assignment_arg_p): Mark parameter `virtualp' with
10788         ATTRIBUTE_UNUSED.
10789         (finish_prevtable_vardecl): Likewise for parameter `prev'.
10790
10791         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
10792
10793         * init.c (expand_aggr_init_1): Remove unused parameter
10794         `alias_this', all callers changed.
10795         (expand_aggr_init): Likewise.
10796         (expand_default_init): Likewise.
10797         (build_new_1): Initialize variable `susp'.
10798         (build_x_delete): Remove unused parameter `type', all callers
10799         changed.
10800
10801         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
10802         ATTRIBUTE_UNUSED.
10803         (readescape): Use (unsigned) value in shift.
10804         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
10805         comparing to a signed quantity.
10806
10807         * pt.c (maybe_end_member_template_processing): Remove unused
10808         parameter `decl', all callers changed.
10809         (check_explicit_specialization): Add braces around empty body in
10810         an else-statement.
10811         (current_template_args): Initialize variable `args'.
10812         (lookup_template_class): Likewise for variable `prev_local_enum'.
10813         (tsubst_decl): Likewise for variable `r'.
10814         (set_mangled_name_for_template_decl): Initialize variable
10815         `context'.
10816
10817         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
10818         Likewise for variable `i'.
10819         (yylex): Initialize variable `trrr'.
10820
10821         * typeck.c (compparms): Mark variable `strict' with
10822         ATTRIBUTE_UNUSED.
10823
10824         * xref.c (simplify_type): Cast argument of ctype function to
10825         `unsigned char'.
10826
10827 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
10828
10829         * cp-tree.h (language_lvalue_valid): Remove.
10830         * decl.c (grokdeclarator): Don't disallow references to functions.
10831         * tree.c (lvalue_p_1): New function, combining duplicated
10832         code from ...
10833         (lvalue_p): Use it.
10834         (real_lvalue_p): Likewise.
10835         * typeck.c (language_lvalue_valid): Remove.
10836         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
10837         they don't have TREE_READONLY set.
10838         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
10839
10840 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10841
10842         * spew.c (yylex): Give diagnostic.
10843         * hash.h (is_reserved_word): Add export.
10844         * gxx.gperf: Likewise.
10845         * lex.h (rid): Add RID_EXPORT.
10846         * lex.c (init_parse): Likewise.
10847
10848 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
10849
10850         * friend.c (do_friend): Make warning a full sentence.
10851
10852 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
10853
10854         * parse.y (component_decl_list): Improve error-recovery.
10855
10856 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10857
10858         * decl.c (make_typename_type): Move error to point where name
10859         variable can be used by dump_type.
10860
10861 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
10862
10863         * decl.c (grokfndecl): Improve error-recovery.
10864         * decl2.c (grokfield): Likewise.
10865         * pt.c (finish_member_template_decl): Likewise.
10866
10867 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10868
10869         * method.c (hack_identifier): Finding multiple members is always
10870         an error.
10871
10872 1998-09-21  Per Bothner  <bothner@cygnus.com>
10873
10874         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
10875
10876 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
10877
10878         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
10879
10880 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
10881
10882         * class.c (maybe_warn_about_overly_private_class): Reformat.
10883
10884 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
10885
10886         * exception.cc (__cplus_type_matcher): Realign some code.
10887
10888 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
10889
10890         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
10891         (tinfo2.o): Likewise.
10892         (exception.o): Likewise.
10893         (new.o): Likewise.
10894         (opnew.o): Likewise.
10895         (opnewnt.o): Likewise.
10896         (opvnew.o): Likewise.
10897         (opvnewnt.o): Likewise.
10898         (opdel.o): Likewise.
10899         (opdelnt.o): Likewise.
10900         (opvdel.o): Likewise.
10901         (opvdelnt.o): Likewise.
10902
10903 1998-09-16  Richard Henderson  <rth@cygnus.com>
10904
10905         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
10906
10907 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
10908
10909         * call.c (build_field_call): Handle static data members too.
10910
10911         * typeck.c (comptypes): When comparing pointer types, check
10912         whether referred types match even in strictest modes.
10913
10914 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
10915
10916         * cp-tree.h: Revert previous change.
10917         (finish_struct_methods): Remove declaration.
10918         * class.c: Revert previous change.
10919         (maybe_warn_about_overly_private_class): New function.
10920         (finish_struct_methods): Declare here, and make static.  Remove
10921         unnecessary parameters.  Tidy slightly.  Use
10922         maybe_warn_about_overly_private_class.
10923         (finish_struct_1): Adjust.  Remove check for private constructors,
10924         now done elsewhere.
10925         (finish_struct): Adjust.
10926
10927 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
10928
10929         * except.c (expand_start_catch_block): No need to check for new
10930         exception model.
10931         (process_start_catch_block_old): Deleted.
10932         (process_start_catch_block): Add call to start_decl_1().
10933         (expand_end_catch_block): Add call to end_catch_handler().
10934         * exception.cc (__cplus_type_matcher): Only check the exception
10935         language if there is an exception table.
10936
10937 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
10938
10939         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
10940         as used to prevent conflicts with virtual function tables.
10941
10942 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
10943
10944         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
10945         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
10946         * class.c (maybe_class_too_private_p): New function.
10947         (finish_struct_methods): Use it.
10948         (finish_struct_1): Likewise.
10949         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
10950         appropriate.
10951
10952         * pt.c (check_specialization_scope): Fix spelling error.
10953         (check_explicit_specialization): Remove code to handle explicit
10954         specializations in class scope; they are now correctly diagnosed
10955         as errors.
10956
10957 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
10958
10959         * decl.c (pushdecl): Don't copy types if the
10960         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
10961         type.
10962
10963 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10964
10965         * class.c (get_enclosing_class): New function.
10966         (is_base_of_enclosing_class): Likewise.
10967         * cp-tree.h (get_enclosing_class): Declare.
10968         (is_base_of_enclosing_class): Likewise.
10969         * pt.c (coerce_template_parms): Use them.
10970
10971 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
10972
10973         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
10974         null to decide whether to use it.
10975
10976         * error.c (dump_type_real): Handle NAMESPACE_DECL.
10977         * parse.y (base_class.1): Avoid crash on error.
10978
10979 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10980
10981         * decl.c (make_typename_type): If context is a namespace, the code
10982         is in error.
10983
10984 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
10985
10986         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
10987
10988 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
10989
10990         * cp-tree.h (anonymous_namespace_name): Declare.
10991         * decl.c: Define it.
10992         (push_namespace): Use anonymous_namespace_name, rather than local
10993         static anon_name.
10994         * error.c (dump_decl): If a namespace is named
10995         anonymous_namespace_name, call it {anonymous}.
10996
10997         * decl.c (grokparms): Distinguish between references and pointers
10998         in error message.
10999
11000 1998-09-08  Richard Henderson  <rth@cygnus.com>
11001             Mark Mitchell  <mark@markmitchell.com>
11002
11003         * pt.c (process_partial_specialization): Consistently allocate
11004         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
11005         tpd.parms, where appropriate.
11006
11007 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
11008
11009         * Makefile.in (INCLUDES): Update after recent toplevel gcc
11010         reorganizations.
11011
11012 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
11013
11014         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
11015         * class.c (finish_struct): Remove hackery to deal with explicit
11016         specializations in class scope.
11017         * decl.c (grokfndecl): Improve error-recovery.
11018         * decl2.c (grokfield): Likewise.
11019         * pt.c (check_specialization_scope): New function.
11020         (begin_specialization): Call it.
11021         (process_partial_specialization): New function, split out from
11022         push_template_decl.  Check partial specializations more
11023         stringently.
11024         (push_template_decl): Call it.
11025         (check_explicit_specialization): Don't attempt to handle explicit
11026         specializations in class scope.
11027         (template_parm_data): Document.  Add current_arg and
11028         arg_uses_template_parms.
11029         (mark_template_parm): Set it.
11030         (tsubst_arg_types): Remove unused variable.
11031         * semantics.c (begin_class_definition): Tweak.
11032
11033 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
11034
11035         * inc/typeinfo (type_info::type_info(const char*)): Make
11036         `explicit'.
11037
11038         * cp-tree.h (hash_tree_cons_simple): New macro.
11039         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
11040         (coerce_template_parms): Use make_temp_vec, instead of
11041         make_tree_vec.  Document this behavior.
11042         (lookup_template_class): Likewise.
11043         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
11044         Remove dead code (and add assertion to check its deadness).  Fix
11045         bug w.r.t. exception specifications.
11046
11047 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
11048
11049         * decl2.c (import_export_vtable): Always make artificials comdat.
11050         (import_export_decl): Likewise.
11051         * pt.c (mark_decl_instantiated): Likewise.
11052
11053 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
11054
11055         * cp-tree.h (finish_globally_qualified_member_call_expr):
11056         Rename to ...
11057         (finish_qualified_call_expr).
11058         * semantics.c: Likewise.
11059         * parse.y (primary): Use it.
11060         * method.c (hack_identifier): Remove redundant code.
11061
11062         * init.c (resolve_offset_ref): Call convert_from_reference to
11063         handle members of reference type.  Improve error recovery.
11064
11065 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
11066
11067         * cp-tree.h: Declare warn_nontemplate_friend.
11068         * decl2.c (lang_decode_option): Set.
11069         * lang-options.h: Add -Wnon-template-friend.
11070         * friend.c (do_friend): Use to toggle non-template function warning.
11071
11072 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
11073
11074         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
11075         corresponding INTEGER_CSTs when processing_template_decl.
11076         * pt.c (tsubst_enum): Tweak accordingly.
11077
11078 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11079
11080         * decl.c (pushdecl_class_level): Add warning here.
11081         (pushdecl): Tweak.
11082
11083 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
11084
11085         * cvt.c (convert_pointer_to_real): Tidy.
11086         * search.c (get_base_distance_recursive): Simplify.
11087         (get_base_distance): Likewise.
11088
11089         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
11090         parms.
11091
11092 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
11093
11094         * lex.c (check_newline):  Call HANDLE_PRAGMA before
11095         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
11096         if unknown pragmas are encountered.
11097         (handle_sysv_pragma): Interpret return code from
11098         handle_pragma_token ().  Return success/failure indication rather
11099         than next unprocessed character.
11100         (pragma_getc): New function: retrieves characters from the
11101         input stream.  Defined when HANDLE_PRAGMA is defined.
11102         (pragma_ungetc): New function: replaces characters back into the
11103         input stream.  Defined when HANDLE_PRAGMA is defined.
11104
11105 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
11106
11107         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
11108         * class.c (build_vtable_entry_ref): Likewise.
11109
11110 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
11111
11112         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
11113         * decl2.c (import_export_decl): Likewise.
11114         * pt.c (instantiate_decl): Use it.
11115
11116 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
11117
11118         * decl.c (lookup_name_real): Also do implicit typename thing for
11119         artificial TYPE_DECLs.
11120         * search.c (lookup_field): Likewise.
11121         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
11122         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
11123         (enter_scope_of): Extract type from implicit typename.
11124         (begin_class_definition): Likewise.
11125         * lex.c (identifier_type): Handle implicit typename when checking
11126         for SELFNAME.
11127
11128         * cp-tree.h: Declare flag_strict_prototype.
11129         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
11130         -fstrict-prototype.
11131         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
11132         specified, set it to the value of pedantic.
11133
11134 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
11135
11136         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
11137
11138 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
11139
11140         * decl.c (finish_enum): Handle member enums of classes declared in
11141         template functions.
11142
11143         * decl2.c (grok_x_components): Strip attributes before calling
11144         groktypename.
11145
11146 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
11147
11148         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
11149         -fenum-int-equivalence and -fno-nonnull-objects.
11150         * class.c (check_for_override): Remove support for -fall-virtual.
11151         (finish_struct_1): Likewise.
11152         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
11153         * typeck.c (build_binary_op_nodefault): Likewise.
11154         * cvt.c (ocp_convert): Likewise.
11155         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
11156         * class.c (build_vbase_path): Likewise.
11157
11158 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
11159
11160         * Makefile.in (INTERFACE): New, set to 1.
11161
11162 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
11163
11164         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
11165         comparing with global_namespace.
11166         (dump_aggr_type): Likewise.
11167
11168         * decl.c (grokfndecl): Issue error on declaration of friend
11169         templates with explicit template arguments.
11170
11171         * pt.c (convert_template_argument): New function, split out
11172         from...
11173         (coerce_template_parms): Here.
11174         (tsubst): Attempt better error-recovery.
11175
11176 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11177
11178         * pt.c (decl_template_parm_p): Add checks for
11179         TEMPLATE_TEMPLATE_PARM.
11180
11181 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
11182
11183         * lex.c (do_identifier): Fix thinko in previous change.
11184
11185 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
11186
11187         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
11188         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
11189
11190 1998-08-28  Richard Henderson  <rth@cygnus.com>
11191
11192         Add support for discarding unused virtual functions.
11193         * lang-options.h: Add -fvtable-gc.
11194         * cp-tree.h: Add flag_vtable_gc.
11195         * decl2.c (output_vtable_inherit): New fn.
11196         (finish_vtable_vardecl): Call it.
11197         * class.c (build_vtable_entry_ref): New fn.
11198         (build_vtbl_ref): Call it.
11199
11200 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
11201
11202         * cp-tree.h (build_enumerator): Take the enumeration type as a
11203         parameter.
11204         * decl.c (finish_enum): Don't set the TREE_TYPE for the
11205         enumeration constant values if we're processing_template_decls.
11206         Don't set the type for the CONST_DECLs either; that's done in
11207         build_enumerator.
11208         (build_enumerator): Take the enumeration type as a
11209         parameter.
11210         * lex.c (do_identifier): Don't resolve enumeration constants while
11211         processing template declarations, even if they happen to be
11212         TEMPLATE_PARM_INDEXs.
11213
11214         * parse.y (current_enum_type): New variable.
11215         (primary): Don't allow statement-expression in local classes just
11216         as we don't in global classes.
11217         (structsp): Use current_enum_type.
11218         (enum_list): Likewise.
11219         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
11220         finish_enum; they no longer occur.
11221
11222         * cp-tree.h (finish_base_specifier): New function.
11223         * parse.y (base_class): Use it.
11224         * semantics.c (finish_base_specifier): Define it.
11225
11226         * parse.y (structsp): Warn on use of typename outside of template
11227         declarations.
11228
11229 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
11230
11231         * lex.c (handle_cp_pragma): Remove #pragma vtable.
11232         * lang-options.h: Remove +e options.
11233         * decl2.c (lang_decode_option): Likewise.
11234         (import_export_vtable): Don't check write_virtuals.
11235         (finish_vtable_vardecl, finish_file): Likewise.
11236         * search.c (dfs_debug_mark): Likewise.
11237         * semantics.c (begin_class_definition): Likewise.
11238         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
11239
11240         * call.c (build_over_call): Check flag_elide_constructors.
11241         * decl2.c: flag_elide_constructors defaults to 1.
11242         * typeck.c (convert_arguments): Remove return_loc parm.
11243         (build_function_call_real): Adjust.
11244
11245         * search.c: Tear out all mi_matrix and memoize code.
11246         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
11247         * lang-options.h: Remove documentation for -fhandle-exceptions,
11248         -fmemoize-lookups and -fsave-memoized.
11249         * cp-tree.h: Lose mi_matrix and memoize support.
11250         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
11251         * class.c: Lose struct class_level.
11252         (pushclass, popclass): Lose memoize support.
11253         * init.c (build_offset_ref): Likewise.
11254
11255         Never change BINFO_INHERITANCE_CHAIN.
11256         * init.c (emit_base_init): Change modification of
11257         BINFO_INHERITANCE_CHAIN to an assert.
11258         * search.c (get_base_distance_recursive): Likewise.
11259         (get_base_distance): Likewise.
11260         (lookup_member): Likewise.
11261         (convert_pointer_to_single_level): Likewise.
11262         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
11263         (lookup_fnfields): Likewise.
11264         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
11265         (unshare_base_binfos): Don't call propagate_binfo_offsets.
11266         (layout_basetypes): Call propagate_binfo_offsets instead of
11267         unshare_base_binfos.
11268         * decl.c (xref_basetypes): Call unshare_base_binfos.
11269         * pt.c (instantiate_class_template): Likewise.
11270         * tree.c (reverse_path): Remove 'copy' parm; always make a
11271         temporary copy.
11272         * class.c (build_vbase_path): Just call it.
11273         * search.c (compute_access): Likewise.  Don't re-reverse.
11274
11275 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
11276
11277         * class.c (build_vbase_path): Use reverse_path.
11278         (finish_base_struct): Move warnings for inaccessible bases to
11279         layout_basetypes.
11280         (modify_one_vtable): Remove check of TREE_USED (binfo).
11281         (fixup_vtable_deltas1): Likewise.
11282         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
11283         (xref_tag): Remove binfos parameter.
11284         (make_binfo): Remove chain parameter.
11285         (reverse_path): Add copy parameter.
11286         * decl.c (init_decl_processing): Change calls to xref_tag.
11287         (xref_tag): Remove binfos parameter.
11288         (xref_basetypes): Change calls to make_binfo.
11289         * decl2.c (grok_x_components): Change calls to xref_tag.
11290         (handle_class_head): Likewise.
11291         * friend.c (do_friend): Likewise.
11292         * lex.c (make_lang_type): Change calls to make_binfo.
11293         * parse.y (structsp): Change calls to xref_tag.
11294         (named_complex_class_head_sans_basetype): Likewise.
11295         (named_class_head): Likewise.
11296         * rtti.c (init_rtti_processing): Likewise.
11297         * search.c (compute_access): Change calls to reverse_path.
11298         (dfs_get_vbase_types): Change calls to make_binfo.
11299         (get_vbase_types): Remove dead code.
11300         * tree.c (unshare_base_binfos): Change calls to make_binfo.
11301         (layout_basetypes): Warn here about inaccessible bases.
11302         (make_binfo): Remove chain parameter.
11303         (reverse_path): Add copy parameter.
11304
11305 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
11306
11307         * class.c: #if 0 complete_type_p.
11308         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
11309         * method.c (process_overload_item): Likewise.
11310         * typeck.c (comp_target_types): Likewise.
11311
11312         Stop sharing binfos for indirect virtual bases.
11313         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
11314         (layout_basetypes): Likewise.
11315         (unshare_base_binfos): Copy vbases, too.
11316         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
11317         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
11318         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
11319         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
11320         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
11321         reference to BINFO_VIA_PUBLIC.
11322         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
11323         (push_class_decls): Use them.
11324         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
11325         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
11326
11327 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
11328
11329         * decl.c (build_enumerator): Set DECL_CONTEXT for the
11330         CONST_DECLs.
11331
11332 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
11333
11334         * cp-tree.h (finish_enum): Change prototype.
11335         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
11336         VALUES parameter.  Don't try to compute mins/maxs if
11337         processing_template_decl.
11338         * parse.y (structsp): Use new calling sequence for finish_enum.
11339         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
11340         (lookup_template_class): Remove unused variables.  Tweak.
11341         Register enums on instantiation list before substituting
11342         enumeration constants.
11343         (tsubst_decl): Remove unused variables.
11344         (regenerate_decl_from_template): Likewise.
11345
11346         * decl.c (duplicate_decls): Don't obliterate the
11347         DECL_TEMPLATE_INFO for a template if we're not replacing it with
11348         anything.
11349
11350         * lex.c (do_identifier): Fix typo in comment.
11351
11352 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11353
11354         * errfn.c: Remove stdarg.h/varargs.h.
11355         * tree.c: Likewise.
11356
11357 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
11358
11359         * pt.c (tsubst_copy): Only do typename overloading on an
11360         IDENTIFIER_NODE that happens to look like a typename if it actually
11361         has a type for us to use.
11362
11363 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
11364
11365         * typeck.c (comp_cv_target_types): Split out...
11366         (comp_target_types): From here.  Don't allow cv-qual changes under
11367         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
11368         (build_ptrmemfunc): Pass 1 to nptrs.
11369         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
11370
11371 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
11372
11373         * search.c (dependent_base_p): Don't compare a binfo to
11374         current_class_type; use the TREE_TYPE of the binfo instead.
11375
11376         * cp-tree.h (CLASS_TYPE_P): Revise definition.
11377
11378 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
11379
11380         * decl.c (duplicate_decls): Don't complain about different
11381         exceptions from an internal decl even if pedantic.
11382
11383         * typeck.c (convert_for_assignment): Converting from pm of vbase
11384         to derived is an error, not a sorry.
11385
11386         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
11387         * class.c (fixed_type_or_null): Rename from
11388         resolves_to_fixed_type_p.  Return the dynamic type of the
11389         expression, if fixed, or null.
11390         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
11391         does not match the static type.
11392         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
11393         resolves_to_fixed_type_p again.
11394
11395 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
11396
11397         * pt.c (tsubst_decl): Move special case code for dealing with
11398         tricky friend templates here from ...
11399         (regenerate_decl_from_template): Here.
11400
11401 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
11402
11403         * decl.c (start_decl): Remove redundant linkage check.
11404
11405 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
11406
11407         * typeck.c (c_expand_return): Handle the case that valtype
11408         is wider than the functions return type.
11409
11410 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
11411
11412         * cp-tree.h (CLASS_TYPE_P): New macro.
11413         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
11414         * pt.c (process_template_parm): Undo previous change.
11415
11416 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
11417
11418         * cp-tree.h: Declare.
11419         * pt.c (decl_template_parm_p): New function.
11420         * decl.c (pushdecl): Check decls for redeclaring template parms.
11421         (xref_tag): Make redeclaration an error, print decl.
11422         * decl2.c (grokfield): Check field_decls for redeclaration as well.
11423
11424 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
11425
11426         * parse.y (primary): Fix up the type of string constants.
11427
11428 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
11429
11430         * typeck.c (convert_for_initialization): Move check for odd uses
11431         of NULL to avoid duplicate warnings.
11432
11433 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
11434
11435         * tree.c (lvalue_type): Fix for arrays.
11436         * typeck.c (string_conv_p): New fn.
11437         (convert_for_assignment): Use it.
11438         (build_unary_op): Use lvalue_type.
11439         * call.c (standard_conversion, convert_like): Use string_conv_p.
11440         (add_function_candidate): Use lvalue_type.
11441         * cvt.c (convert_to_reference): Likewise.
11442         * decl2.c (lang_decode_option): Ignore -traditional.
11443         * decl.c (init_decl_processing): flag_writable_strings inhibits
11444         flag_const_strings.
11445
11446 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
11447
11448         * lang-options.h (lang_options): Add fconst-strings to the list
11449         of valid options.
11450         * decl2.c (lang_f_options, lang_decode_option): Likewise.
11451
11452 1998-08-24  Nathan Sidwell  <nathan@acm.org>
11453
11454         * lex.c (real_yylex): Don't warn about long long constants if
11455         we're allowing long long.
11456
11457 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11458
11459         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
11460         accessing bindings directly.
11461
11462         * search.c (my_tree_cons): Reimplement.
11463
11464         * lang-specs.h: Remove __HONOR_STD.
11465         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
11466
11467 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
11468
11469         * decl.c (grokdeclarator): Complain about in-class initialization
11470         of aggregates and/or references.
11471         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
11472         TEMPLATE_TYPE_PARMs.
11473
11474         * decl2.c (grok_array_decl): Add comment.
11475         (mark_used): Don't instantiate an explicit instantiation.
11476         * friend.c (make_friend_class): Remove bogus comment.  Fix check
11477         for partial specializations.
11478         * pt.c (check_explicit_specialization): Don't
11479         SET_DECL_EXPLICIT_INSTANTIATION here.
11480         (mark_decl_instantiated): Or here.
11481         (do_decl_instantiation): Do it here, instead.  Add checks for
11482         duplicate explicit instantiations, etc.  Tidy.
11483         (do_type_instantiation): Likewise.
11484         (instantiate_decl): Improve comments.  Complain about explicit
11485         instantiations where no definition is available.
11486
11487         * cp-tree.h (ansi_null_node): Remove.
11488         * call.c (build_over_call): Warn about converting NULL to an
11489         arithmetic type.
11490         * cvt.c (build_expr_type_conversion): Likewise.  Use
11491         null_ptr_cst_p instead of expanding it inline.
11492         * decl.c (ansi_null_node): Remove.
11493         (init_decl_processing): Make null_node always have integral type.
11494         * except.c (build_throw): Warn about converting NULL to an
11495         arithmetic type.
11496         * lex.c (init_parse): Remove handling of ansi_null_node.
11497         * pt.c (type_unification_real): Don't convert NULL to void* type.
11498         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
11499         (convert_for_assignment): Warn about converting NULL to an
11500         arithmetic type.
11501         (convert_for_initialization): Likewise.
11502
11503 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
11504
11505         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
11506         * pt.c (coerce_template_parms): Use no_linkage_check.
11507         * decl.c (grokvardecl): Likewise.
11508         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
11509
11510         * method.c (process_overload_item): Remove useless code.
11511
11512 1998-08-20  Per Bothner  <bothner@cygnus.com>
11513
11514         Handle new'ing of Java classes.
11515         * init.c (build_class_classref):  New function.
11516         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
11517         constructor does not return this;  don't need to exception-protect.
11518
11519         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
11520         * decl2.c (acceptable_java_type):  Handle template-derived types.
11521
11522 1998-08-20  Per Bothner  <bothner@cygnus.com>
11523
11524         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
11525
11526 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
11527
11528         * decl.c (duplicate_decls): Always merge the old and new patterns
11529         for templates, regardless of whether or not the new one has
11530         DECL_INITIAL.  Don't throw away specializations.  Merge
11531         DECL_SAVED_TREE.
11532         * pt.c (tsubst_decl): Use the right pattern when calculating the
11533         complete args for a new template instance.
11534         (do_decl_instantiation): Fix typo in comment.
11535         (regenerate_decl_from_template): Deal with tricky friend template
11536         case.
11537         (instantiate_decl): Likewise.
11538
11539 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
11540
11541         * init.c (build_builtin_delete_call): Add missing assemble_external
11542         call.
11543
11544 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
11545
11546         * parse.y (notype_unqualified_id): Also accept ~A<int>.
11547
11548 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
11549
11550         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
11551         arithmetic.
11552         * except.c (build_throw): Warn when NULL is thrown, even with
11553         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
11554         thrown expression.
11555
11556         * cp-tree.h (ansi_null_node): New variable.
11557         * decl.c (ansi_null_node): New variable.
11558         (init_decl_processing): Initialize its type.
11559         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
11560         for null_node in non-ANSI mode.
11561         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
11562         place of null_node to avoid spurious errors.
11563
11564 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
11565
11566         * cp-tree.h (enter_scope_of): New function.
11567         * parse.y (complex_direct_notype_declarator): Use it.
11568         * semantics.c (enter_scope_of): New function.
11569
11570 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
11571
11572         * decl.c (grokparms): No, here.
11573
11574         * decl.c (grokdeclarator): Catch parm with pointer to array of
11575         unknown bound here...
11576         * method.c (process_overload_item): ...not here.
11577
11578         * gxxint.texi: Remove obsolete documentation of overloading code.
11579
11580         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
11581         * class.c (finish_struct_bits): Likewise.
11582
11583         * tree.c (lvalue_type): Fix for arrays.
11584         * typeck.c (build_unary_op): Use lvalue_type.
11585         * call.c (add_function_candidate): Likewise.
11586         * cvt.c (convert_to_reference): Likewise.
11587
11588         * decl2.c (lang_decode_option): Ignore -traditional.
11589
11590         * init.c (build_offset_ref): Don't mess with error_mark_node.
11591         * lex.c (do_scoped_id): Use cp_error.
11592
11593         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
11594
11595 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11596
11597         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
11598
11599 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
11600
11601         * cp-tree.h (set_identifier_local_value): Provide prototype.
11602
11603         * decl2.c (do_namespace_alias): Remove unused variables `binding'
11604         and `old'.
11605
11606 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
11607
11608         * Makefile.in: Rename BBISON to BISON so that it can be properly
11609         inherited from the parent makefile.
11610
11611 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
11612
11613         * lang-options.h: Add -finit-priority.
11614         * decl2.c: Likewise.  Check flag_init_priority instead of
11615         USE_INIT_PRIORITY.
11616
11617         * decl2.c (setup_initp): New fn.
11618         (start_objects, finish_objects, do_ctors): Handle init_priority.
11619         (do_dtors, finish_file): Likewise.
11620
11621 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
11622
11623         * pt.c (tsubst_copy): Hush warning.
11624
11625         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
11626
11627 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
11628
11629         * pt.c (print_template_context): Don't abort when instantiating a
11630         synthesized method.
11631
11632         * decl.c (grokdeclarator): Issue errors on namespace qualified
11633         declarators in parameter lists or in class scope.
11634
11635 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
11636
11637         * pt.c (check_explicit_specialization): Don't abort on bogus
11638         explicit instantiations.
11639
11640 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
11641
11642         * typeck.c (require_complete_type): Use complete_type_or_else.
11643         (complete_type_or_else): Always return NULL_TREE on failure, as
11644         documented.
11645
11646         * pt.c (tsubst_aggr_type): Prototype.
11647         (tsubst_decl): New function, split out from tsubst.  Set
11648         input_filename and lineno as appropriate.
11649         (pop_tinst_level): Restore the file and line number saved in
11650         push_tinst_level.
11651         (instantiate_class_template): Set input_filename and lineno as
11652         appropriate.
11653         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
11654         context for a TYPENAME_TYPE is complete.
11655
11656         * decl2.c (grokbitfield): Issue errors on bitfields declared with
11657         function type.
11658         (do_dtors): As in do_ctors, pretend to be a member of the same
11659         class as a static data member while generating a call to its
11660         destructor.
11661
11662         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
11663         conversions, even in complex virtual base class hierarchies.
11664
11665 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
11666
11667         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
11668         (TYPE_TEMPLATE_INFO): Likewise.
11669         (SET_TYPE_TEMPLATE_INFO): Likewise.
11670         (ENUM_TI_TEMPLATE): Likewise.
11671         (ENUM_TI_ARGS): Likewise.
11672         (lookup_nested_type_by_name): Remove.
11673         * decl.c (maybe_process_template_type_declaration): Handle enums.
11674         (start_enum): Don't check for primary-template enum declarations
11675         here.
11676         (finish_enum): Clean up, document.  Make sure template enum
11677         constants get the correct type.
11678         (build_enumerator): Copy initializers for template enumerations,
11679         too.
11680         (grok_enum_decls): Document.
11681         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
11682         better.  Build LOOKUP_EXPRs for local variables, even if they are
11683         TREE_PERMANENT.
11684         * pt.c (tsubst_enum): Remove field_chain parameter.
11685         (template_class_depth): Include the depth of surrounding function
11686         contexts.
11687         (push_template_decl): Check for primary-template enum declarations
11688         here.  Deal with enumeration templates.
11689         (lookup_template_class): Likewise.
11690         (for_each_template_parm): Likewise.
11691         (instantiate_class_template): Don't call tsubst_enum directly,
11692         call tsubst instead, to instantiate enums.  Deal with all
11693         field_chain issues here, not in tsubst_enum.
11694         (lookup_nested_type_by_name): Remove.
11695         (tsubst_aggr_type): Revise handling of enumeration types.
11696         (tsubst): Likewise.
11697         (tsubst_copy): Likewise.
11698         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
11699
11700 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
11701
11702         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
11703         uses template parameters.
11704         * method.c (build_template_parm_names): Use the full set of
11705         template arguments for tsubst'ing.
11706         (build_overload_identifier): Pass the full set of template
11707         arguments to build_template_parm_names, not just the
11708         innermost_args.
11709         * pt.c (TMPL_ARGS_DEPTH): Define using
11710         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
11711         (NUM_TMPL_ARGS): New macro.
11712         (add_outermost_template_args): Deal with the case where the outer
11713         args will be completely discarded.
11714         (coerce_template_parms): Use the full set of template arguments
11715         for tsubst'ing.  Simplify.  Add some asserts.  Improve
11716         error messages.
11717         (lookup_template_class): Pass the full set of template arguments
11718         to coerce_template_parms.
11719         (tsubst): Add assertion.
11720         (do_type_instantiation): Don't instantiate member template
11721         classes.
11722
11723         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
11724         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
11725
11726 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
11727
11728         * method.c (set_mangled_name_for_decl): Change return type to void.
11729
11730         * decl.c (lookup_name_real): A namespace-level decl takes priority
11731         over implicit typename.  Avoid doing the same lookup twice.
11732
11733         * search.c (dependent_base_p): New fn.
11734         (dfs_pushdecls, dfs_compress_decls): Use it.
11735
11736         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
11737         virtual functions if the type doesn't have any.
11738
11739 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
11740
11741         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
11742         uses template parameters.
11743
11744 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
11745
11746         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
11747         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
11748         * lex.c (do_identifier): Don't use a second argument, or a type,
11749         when building LOOKUP_EXPRs.
11750         (do_identifier): Likewise.
11751         (do_scoped_id): Likewise.
11752         * method.c (hack_identifier): Improve error message.
11753         * pt.c (lookup_template_function): Don't needlessly call
11754         copy_to_permanent or build_min.
11755         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
11756         necessary.
11757         (do_decl_instantiation): Improve error message.
11758         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
11759         (build_min): Copy the type to the permanent obstack, too.
11760
11761 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
11762
11763         * init.c (init_init_processing): Remove BI* handling.
11764         (build_builtin_call): Remove.
11765         (build_builtin_delete_call): New fn.
11766         (build_delete): Use it.
11767
11768 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
11769
11770         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
11771         (maybe_check_template_type): New function.
11772         * decl.c (maybe_process_template_type_declaration): New function,
11773         split out from pushtag  Call maybe_check_template_type.
11774         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
11775         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
11776         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
11777         * pt.c (template_class_depth_real): Generalization of ...
11778         (template_class_depth): Use it.
11779         (register_specialization): Use duplicate_decls for duplicate
11780         declarations of specializations.
11781         (maybe_check_template_type): New function.
11782         (push_template_decl_real): Fix comment.
11783         (convert_nontype_argument): Likewise.
11784         (lookup_template_class): Likewise.  Avoid an infinite loop on
11785         erroneous code.
11786         (tsubst_friend_function): Fix comment.
11787         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
11788         an IDENTIFIER_NODE.
11789         * semantics.c (begin_function_definition): Use
11790         reset_specialization to note that template headers don't apply
11791         directly to declarations after the opening curly for a function.
11792
11793 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
11794
11795         * decl.c (push_overloaded_decl): Use current_namespace instead of
11796         DECL_CONTEXT (decl) to determine where we go.
11797
11798         * decl.c (lookup_name_real): Fix typo.
11799
11800 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
11801
11802         * friend.c (is_friend): Be lenient with member functions to deal
11803         with nested friends.
11804
11805 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
11806
11807         * class.c (finish_struct_1): Convert integer_zero_node to
11808         ssizetype before passing it to set_rtti_entry.
11809         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
11810         of any size to a pointer.
11811
11812 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
11813
11814         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
11815         (build_template_decl_overload): Remove.
11816         (set_mangled_name_for_decl): New function.
11817         (innermost_args): Remove is_spec parameter.
11818         (most_specialized, most_specialized_class): Remove declarations.
11819         (lookup_template_class): Add entering_scope parameter.
11820         (maybe_process_partial_specialization): New function.
11821         (finish_template_decl): Likewise.
11822         (finish_template_type): Likewise.
11823         * class.c (finish_struct): Clean up processing of member template
11824         specializations.
11825         * decl.c (pushtag): Fix formatting.
11826         (lookup_tag): Improve handling of pseudo-global levels.
11827         (make_typename_type): Adjust call to lookup_template_class.
11828         (shadow_tag): Use maybe_process_partial_specialization.
11829         (xref_tag): Improve handling of member friends.
11830         (start_function): Call push_nested_class before
11831         push_template_decl.  Don't call push_template_decl for
11832         specializations.
11833         * decl2.c (grok_x_components): Don't call xref_tag for
11834         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
11835         (grokclassfn): Use set_mangled_name_for_decl.
11836         (arg_assoc_class): Adjust call to innermost_args.
11837         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
11838         * error.c (dump_function_name): Improve printing of template
11839         function names.
11840         * friend.c (is_friend): Don't compare types of decls to determine
11841         friendship, unless flag_guiding_decls.
11842         (make_friend_class): Partial specializations cannot be friends.
11843         (do_friend): Use set_mangled_name_for_decl.  Call
11844         push_template_decl_real instead of push_template_decl.
11845         * method.c (build_decl_overload_real): Remove prototype.  Give it
11846         external linkage.
11847         (build_overload_identififer): Adjust call to innermost_args.
11848         (build_template_decl_overload): Remove.
11849         (set_mangled_name_for_decl): New function.
11850         * parse.y (.finish_template_type): New non-terminal.
11851         (template_def): Use finish_template_decl.  Use template_extdef
11852         instead of extdef.
11853         (template_extdef, template_datadef): New non-terminals, containing
11854         only those rules for things which can be templates.
11855         (datadef): Tidy.
11856         (template_type, self_template_type): Use .finish_template_type.
11857         (named_class_head): Use maybe_process_partial_specialization.
11858         * pt.c (mangle_class_name_for_template): Remove context parameter.
11859         (get_class_bindings): Remove outer_args parameter.
11860         (complete_template_args): Remove.
11861         (add_outermost_template_args): New function.
11862         (register_specialization): Return the specialization.
11863         (unregister_specialization): New function.
11864         (tsubst_template_parms): Likewise.
11865         (most_specialized, most_specialized_class): Prototype here as
11866         static.
11867         (original_template): Rename to most_general_template.
11868         (tsubst_template_parms): New function.
11869         (set_mangled_name_for_template_decl): Likewise.
11870         (TMPL_ARGS_DEPTH): New macro.
11871         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
11872         (TMPL_ARGS_LEVEL): New macro.
11873         (SET_TMPL_ARGS_LEVEL): Likewise.
11874         (TMPL_ARG): Likewise.
11875         (SET_TMPL_ARG): Likewise.
11876         (TMPL_ARGS_DEPTH): Likewise.
11877         (finish_member_template_decl): Use finish_template_decl.
11878         (maybe_process_partial_specialization): New function, split out
11879         from tsubst.
11880         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
11881         (maybe_begin_member_template_processing): Use new macros.
11882         (is_member_template): Likewise.
11883         (is_member_template_class): Likewise.
11884         (add_to_template_args): Likewise.  Deal with multiple levels of
11885         args.
11886         (maybe_process_partial_specialization): New function.
11887         (retrieve_specialization): Add consistency check.
11888         (determine_specialization): Return full argument list.
11889         (check_explicit_specialization): Tweak friend handling.  Use full
11890         argument lists.  Simplify.
11891         (current_template_args): Use new macros.
11892         (push_template_decl_real): Change ill-named mainargs to specargs.
11893         Check that a partial specialization actually specializes at least
11894         one parameter.   Improve friend handling.  Modify for full
11895         template arguments.
11896         (classtype_mangled_name): Don't mangle the names of
11897         specializations.
11898         (lookup_template_class): Add entering_scope parameter.  Use it to
11899         avoid finding a template type when an instantiation is required.
11900         Simplify.  Use full template arguments.
11901         (tsubst_friend_function): Use unregister_specialization.  Use new
11902         macros.  Use full template arguments.
11903         (tsubst_friend_class): Substitute, using tsubst_template_parms,
11904         into the template parameters before passing them to
11905         redeclare_class_template.
11906         (instantiate_class_template): Simplify.  Use full template
11907         arguments.  Adjust calls to get_class_bindings.  Use
11908         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
11909         (innermost_args): Use new macros.
11910         (tsubst_aggr_type): New function, split out from tsubst.
11911         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
11912         conventions for lookup_template_class.  Refine handling of partial
11913         instantiations.   Remove calls to complete_template_args.
11914         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
11915         and set_mangled_name_for_template_decl.
11916         (tsubst_copy): Use tsubst_aggr_type.
11917         (instantiate_template): Use full template arguments.
11918         (more_specialized): Improve formatting.
11919         (more_specialized_class): Adjust calls to get_class_bindings.
11920         (get_bindings_real): Don't call complete_template_args.
11921         (most_specialized): Don't overwrite input; create a new list.
11922         (most_specialized_class): Use most_general_template.
11923         (regenerate_decl_from_template): Use unregister_specialization.
11924         Use full template arguments.
11925         (instantiate_decl): Use full template arguments.
11926         (set_mangled_name_for_template_decl): New function.
11927         * semantics.c (begin_class_definition): Use
11928         maybe_process_partial_specialization.
11929         (finish_member_class_template): New function.
11930         (finish_template_decl): Likewise.
11931         (finish_template_type): Likewise.
11932         (typeck.c): Don't crash after issuing a compiler_error.
11933         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
11934
11935 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
11936
11937         * typeck2.c (build_functional_cast): Handle default-initialization.
11938
11939         * call.c (build_over_call): Pass 1 to popclass.
11940
11941         * parse.y (direct_notype_declarator): Add precedence declaration
11942         to notype_unqualified_id case.
11943         * Makefile.in (EXPECT): Adjust.
11944
11945         * tree.c (ovl_member): Fix for single function in OVL.
11946
11947 1998-07-27  Dave Brolley  <brolley@cygnus.com>
11948
11949         * c-lex.c (yylex): Fix boundary conditions in character literal and
11950         string literal loops.
11951
11952 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
11953
11954         * decl.c (lookup_name_real): OK, do return the from_obj value
11955         unless got_object depends on template parms.
11956
11957         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
11958
11959         * pt.c (coerce_template_parms): Also complain about local enums.
11960
11961         * cp-tree.h: Add prototype for set_identifier_local_value.
11962         * decl.c (set_identifier_local_value_with_scope): Make static,
11963         prototype.
11964         * search.c (covariant_return_p): Likewise.
11965         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
11966
11967         * call.c (build_method_call): Only pull out the type of a destructor
11968         if it's a template type parm.
11969         * decl.c (lookup_name_real): Never return the from_obj value.
11970
11971 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
11972
11973         * except.c (process_start_catch_block_old): Call start_decl_1 for
11974         catch parm.
11975         * decl.c (start_decl_1): Avoid duplicate error.
11976
11977         * init.c (expand_default_init): Only perform the initialization if
11978         it will do something.
11979
11980 1998-07-23  H.J. Lu  (hjl@gnu.org)
11981
11982         * parse.y (base_class): Check for invalid base class.
11983
11984 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
11985
11986         * decl2.c (import_export_template): Fold in...
11987         (import_export_class): ...to here.  Handle dllimport/export.
11988
11989         * class.c (build_vtable): Pass at_eof to import_export_vtable.
11990         (prepare_fresh_vtable): Likewise.
11991         * decl2.c (import_export_class): Split out...
11992         (finish_prevtable_vardecl): From here.
11993         * class.c (finish_struct_1): Call import_export_class if at_eof.
11994
11995         * decl.c (start_function): #if 0 mysterious code I wrote and have
11996         forgotten why.
11997         * rtti.c (get_tinfo_fn): If this is for a class type, set
11998         DECL_CONTEXT.
11999
12000 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
12001
12002         * inc/exception: Change terminate and unexpected to ().
12003
12004         * parse.y (named_class_head_sans_basetype_defn): A
12005         named_class_head_sans_basetype followed by '{' or ':' is a defn.
12006
12007 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
12008
12009         * tree.c (canonical_type_variant): New fn to handle arrays.
12010         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
12011         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
12012         * method.c (process_overload_item): Use build_overload_value for
12013         arrays.
12014
12015 1998-07-20  Dave Brolley  <brolley@cygnus.com>
12016
12017         * lex.c (mbchar.h): #include it.
12018         (GET_ENVIRONMENT): New macro.
12019         (init_parse): Set character set based on LANG environment variable.
12020         (real_yylex): Handle multibyte characters in character literals.
12021         (real_yylex): Handle multibyte characters in string literals.
12022
12023 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
12024
12025         * lex.c (do_identifier): Look for class value even if we don't
12026         have a global value.  Do implicit declaration if parsing is 2.
12027         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
12028         lookup.
12029
12030 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
12031
12032         * decl.c (pushtag): Revert previous change.
12033         * pt.c (lookup_template_class): Don't put out debugging
12034         information for types that use template parameters.
12035
12036         * decl.c (pushtag): Don't put out debugging information for
12037         compiler-generated typedefs.
12038
12039         * error.c (dump_type_real): Don't crash when presented with
12040         intQI_type_node or the like.
12041
12042         * semantics.c (finish_translation_unit): Fix spelling error in
12043         comment.
12044
12045 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
12046
12047         * decl.c (lookup_name_real): Pull out single function here.
12048         (select_decl): Not here.
12049         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
12050
12051         * decl.c (qualify_lookup): Tweak again.
12052
12053         * pt.c (lookup_template_class): Don't mess with the context of the
12054         instantiation.
12055         * decl2.c (current_decl_namespace): Remove special handling for
12056         templates.
12057
12058         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
12059         a member template specialization.
12060
12061         * tree.c (ovl_member): Use decls_match to compare functions.
12062         * decl.c (decls_match): Check the context of a function.
12063
12064         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
12065         in Koenig lookup support rules.
12066         * semantics.c (finish_call_expr): Handle the new cases.
12067
12068         * typeck.c (build_x_function_call): Handle overloaded methods.
12069
12070         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
12071
12072 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
12073
12074         * semantics.c (finish_object_call_expr): Revert previous change.
12075         * call.c (build_new_method_call): Likewise.  Instead, convert
12076         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
12077
12078 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
12079
12080         * decl.c (qualify_lookup): Handle templates.
12081
12082         * decl2.c (do_using_directive): Don't pass ancestor.
12083         * decl.c (push_using_directive): Calculate ancestor.
12084
12085         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
12086         * decl.c (pushdecl): Move type shadowing handling from here...
12087         (duplicate_decls): ...to here.
12088         * decl.c (set_identifier_local_value_with_scope): New fn.
12089         (pushdecl): Use it.
12090         (set_identifier_local_value, lookup_type_current_level): New fns.
12091         * decl2.c (do_local_using_decl): Handle types and binding level
12092         stuff properly.
12093
12094         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
12095         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
12096         (lookup_namespace_name): Likewise.
12097         * typeck.c (build_unary_op): Not here anymore.
12098
12099         * decl2.c (do_class_using_decl): Make sure we get an identifier.
12100         * class.c (handle_using_decl): Ignore TYPE_DECLs.
12101
12102         * decl.c (qualify_lookup): New fn.
12103         (lookup_name_real): Use it.
12104
12105 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12106
12107         * decl2.c (add_using_namespace): When directly using a namespace
12108         that was indirect before, promote it.
12109
12110         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
12111         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
12112         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
12113         * decl.c (select_decl): Replace two flag parameters by one.
12114         (unqualified_namespace_lookup): Likewise, pass flag.
12115         (lookup_flags): New function.
12116         (lookup_name_real): Compute flags, pass them.
12117         (lookup_namespace_name): Call with zero-flag.
12118         * decl2.c (ambiguous_decl): Add flag parameter, complain only
12119         according to flags.
12120         (lookup_using_namespace, qualified_lookup_using_namespace):
12121         Add flag parameter, pass them through.
12122         * lex.c (do_scoped_id): Call with zero-flag.
12123
12124 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
12125
12126         * typeck.c (convert_for_assignment): Use comptypes.
12127
12128 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
12129
12130         * semantics.c (finish_object_call_expr): Move test for the
12131         function called being a TYPE_DECL to ...
12132         * call.c (build_new_method_call): Here.
12133
12134 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
12135
12136         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
12137         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
12138
12139         * lex.c (looking_for_typename): Don't initialize.
12140
12141         * decl2.c (ambiguous_decl): Clarify error message.
12142
12143         * decl.c (push_using_directive): Iterate over namespaces used
12144         indirectly.
12145
12146 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12147
12148         * decl2.c (add_using_namespace): Iterate over namespaces used
12149         indirectly.
12150
12151         * decl.c (lookup_name_real): Accept namespace aliases as locals.
12152         (cat_namespace_levels): Ignore aliases.
12153         (duplicate_decls): Ignore duplicate aliases.
12154         * decl2.c (do_namespace_alias): Process block level namespace
12155         aliases.  Store alias with pushdecl.  Remove odr errors.
12156         * parse.y (namespace_alias): New non-terminal.
12157         (extdef): Use it.
12158
12159 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
12160
12161         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
12162         Handle TEMPLATE_TYPE_PARM.
12163         (arg_assoc): Rewrite.
12164
12165         * pt.c (complete_template_args): Don't look at the context unless
12166         we have to.
12167
12168         * method.c (build_decl_overload_real): Fix namespace handling.
12169
12170         * typeck.c (build_unary_op): Extract a lone function from an
12171         OVERLOAD.
12172
12173         * call.c (build_scoped_method_call): Handle getting a namespace
12174         for basetype in a destructor call.
12175         (check_dtor_name): Handle enums.
12176
12177         * parse.y (using_directive): New nonterminal.
12178         (extdef, simple_stmt): Use it.
12179
12180 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12181
12182         * decl2.c (add_function): Move error message ...
12183         (arg_assoc_namespace): ... from here.
12184
12185 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
12186
12187         * parse.y (namespace_qualifier): Fix multiple level handling.
12188         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
12189         (arg_assoc): Don't skip the first argument of a function.
12190
12191 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
12192
12193         * search.c (my_tree_cons): Clean up.
12194
12195 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
12196
12197         * call.c (joust): Don't warn about "confusing" conversions to the
12198         same type.
12199
12200 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12201
12202         * class.c (push_nested_class): Complain about namespaces.
12203         * decl.c (start_decl): Enter the object's namespace.
12204         (cp_finish_decl): Leave it.
12205         (grokdeclarator): Likewise.
12206         * decl2.c (check_decl_namespace): New function.
12207         (finish_file): Call it.
12208         * parse.y (complex_direct_notype_declarator): Set complexity
12209         of namespace-qualified ids to -1, enter the namespace.
12210
12211         * method.c (build_template_decl_overload): Expect _DECL as first
12212         parameter.  Put context temporarily into current_namespace.
12213         * pt.c (check_explicit_specialization): Change caller.
12214         (tsubst): Likewise.
12215
12216         * init.c (build_offset_ref): Call mark_used and
12217         convert_from_reference for namespace members.
12218
12219 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12220
12221         * search.c (my_tree_cons): The bitfield is at index 2.
12222
12223 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
12224
12225         * lang-options.h: Format changed to work with new --help support
12226         in gcc/toplev.c
12227
12228 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12229
12230         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
12231         Do Koenig lookup in CALL_EXPR.
12232         (arg_assoc): Handle error_mark.
12233         * lex.c (is_global): New function.
12234         (do_identifier): Expect arguments for Koenig lookup.
12235         * parse.y (primary): Add rules for calls of unqualified function calls.
12236         (do_id): Change call of do_identifier.
12237         * pt.c (finish_stmt_expr): Likewise.
12238         * semantics.c (finish_id_expr): Likewise.
12239         (finish_call_expr): Add integer parameter to indicate
12240         argument-dependent lookup.
12241
12242         * decl.c (struct binding_level): New field using_directives.
12243         (push_using_decl): Not sorry anymore.
12244         (push_using_directive): New function.
12245         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
12246         (unqualified_namespace_lookup): New function, code from ...
12247         (lookup_name_real): ... here.
12248         * decl2.c (lookup_using_namespace): Pass using list instead of
12249         initial scope.
12250         (validate_nonmember_using_decl): New function.
12251         (do_nonmember_using_decl): New function.
12252         (do_toplevel_using_decl): Use them.
12253         (do_local_using_decl): New function.
12254         (do_using_directive): Support block-level directives.
12255         * parse.y (simple_stmt): Support using declarations and
12256         directives.
12257         (namespace_qualifier, namespace_using_decl): New non-terminals.
12258
12259         * xref.c (classname): New function.
12260         (GNU_xref_hier): Change class and base parameters to tree.
12261         * decl.c (xref_baseypes): Change caller.
12262         * friend.c (make_friend_class): Likewise.
12263
12264 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
12265
12266         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
12267         comparison.
12268
12269         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
12270         template template parameter, record its use.
12271         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
12272         its template arguments if exists.
12273
12274         * pt.c (coerce_template_template_parms): New function equivalent
12275         to coerce_template_parms when IS_TMPL_PARM is true.
12276         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
12277         all callers changed.
12278
12279         (coerce_template_parms): Access ARGLIST properly when creating a
12280         new vector.  Only accept implicit TYPE_DECL as valid argument for
12281         a template template parameter when it is a base class of
12282         current_class_type.  Don't display error message when COMPLAIN is
12283         false.
12284
12285 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
12286
12287         * repo.c (get_base_filename): Use file_name_nondirectory.
12288         (open_repo_file): Likewise.
12289         * cp-tree.h (file_name_nondirectory): Add prototype.
12290
12291 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
12292
12293         * friend.c (do_friend): Pull the identifier out of declarator.
12294         Use cp_error and friends.
12295         * decl2.c (qualified_lookup_using_namespace): Fix call to
12296         purpose_member.
12297         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
12298         (grokvardecl): Use DECL_CLASS_SCOPE_P.
12299         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
12300         * class.c (warn_hidden): Fix for OVERLOAD.
12301         From grahams@rcp.co.uk:
12302         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
12303         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
12304
12305 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
12306
12307         * g++.1 (-traditional): Remove duplicated documentation.
12308
12309 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
12310
12311         * method.c (flush_repeats): Add nrepeats parameter.
12312         (issue_nrepeats): Likewise.
12313         (is_back_referenceable_type): New function.  Don't back-reference
12314         TEMPLATE_TYPE_PARMs as well as simple types like integers.
12315         (build_mangled_name_for_type): Likewise.
12316         (build_mangled_name_for_type_with_Gcode): Likewise.
12317         (lasttype): Remove.
12318         (nrepeats): Likewise.
12319         (Nrepeats): Likewise.
12320         (start_squangling): Don't clear the variables removed above.
12321         (end_squangling): Likewise.
12322         (flush_repeats): Tidy.  Use nrepeats parameter rather than
12323         Nrepeats global.
12324         (issue_nrepeats): Likewise, but with nrepeats global.  Use
12325         is_backreferenceable_type.
12326         (build_overload_nested_name): Tidy.  Add comment.  Use
12327         build_mangled_name_for_type.
12328         (build_underscore_int): Comment.
12329         (build_overload_scope_ref): Use build_mangled_name_for_type.
12330         (build_overload_int): Likewise.
12331         (build_template_template_parm_names): Tidy.
12332         (build_template_parm_names): Use build_mangled_name_for_type.
12333         (build_overload_identifier): Add comments.
12334         (build_mangled_name_for_type_with_Gcode): Split out from
12335         build_mangled_name.
12336         (build_mangled_name_for_type): Use it.
12337         (build_mangled_name): Rework to use build_mangled_name_for_type
12338         and to not use global nrepeats/Nrepeats.  Tidy.
12339         (process_modifiers): Tidy.
12340         (check_btype): Use is_backreferenceable_type.  Add comment.
12341         Rename `node' to `type'.
12342         (process_overload_item): Set numeric_output_need_bar here.
12343         Use build_mangled_name_for_type.  Tidy.
12344         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
12345         build_mangled_name_for_type.
12346
12347         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
12348         for TYPE_DECLs.
12349
12350 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
12351
12352         * cp-tree.h (warn_long_long): Define.
12353         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
12354         warning "ANSI C++ does not support `long long'".
12355         * decl2.c (warn_long_long): Define.
12356         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
12357
12358 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
12359
12360         * decl.c (xref_tag): Handle attributes between 'class' and name.
12361         * parse.y (aggr): Likewise.
12362         * semantics.c (finish_class_definition): Likewise.
12363         * Makefile.in (EXPECTED): Adjust.
12364
12365         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
12366         * decl2.c: Define them.
12367         (lang_decode_option): Handle them.
12368         * lang-options.h: Add -foptional-diags.
12369         * class.c (finish_struct): Don't complain about multiple meanings of
12370         name if -fno-optional-diags.
12371         * decl.c (pushdecl_class_level): Likewise.
12372         * lex.c (real_yylex): Check warn_multichar.
12373
12374 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
12375
12376         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
12377
12378         * tree.c (make_binfo): Fix length.
12379
12380 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
12381
12382         * decl2.c (lang_decode_option): Remove warn_template_debugging.
12383         * lang-options.h: Likewise.
12384
12385 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12386
12387         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
12388         (process_start_catch_block): Likewise for variables
12389         `false_label_rtx', `call_rtx' and `return_value_rtx'.
12390
12391 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
12392
12393         * tree.c (build_srcloc): Make sure we allocate this node on the
12394         permanent obstack.
12395
12396 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
12397
12398         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
12399         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
12400         (lang_specific_driver): Only add -lm automatically if need_math is
12401         nonzero.
12402
12403 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
12404
12405         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
12406
12407 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12408
12409         * Makefile.in (EXPR_H): New dependency variable.
12410         (decl2.o): Depend on $(EXPR_H).
12411         (typeck.o): Likewise.
12412         (init.o): Likewise.
12413         (expr.o): Likewise.
12414
12415 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
12416
12417         * decl.c (start_enum): Put local enums on permanent_obstack.
12418
12419 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
12420
12421         * cp-tree.h (c_get_alias_set): Declare.
12422         * decl.c (init_decl_processing): Set lang_get_alias_set.
12423
12424 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
12425
12426         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
12427         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
12428         flag for all function decls which are in the exception table.
12429         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
12430         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
12431         code is emitted for any referenced rtti function.
12432
12433 1998-06-25  Dave Brolley  <brolley@cygnus.com>
12434
12435         * lang-specs.h: Use new | syntax to eliminate
12436         string concatenation.
12437
12438 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
12439
12440         * cp-tree.h (CP_DECL_CONTEXT): New macro.
12441         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
12442         * method.c (build_overload_nested_name): Likewise.
12443         * sig.c (build_signature_pointer_or_reference_type): Don't set
12444         DECL_CONTEXT.
12445
12446 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12447
12448         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
12449         * cp-tree.h (FROB_CONTEXT): New macro.
12450         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
12451         * decl.c (namespace_binding): Replace NULL_TREE with
12452         global_namespace.
12453         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
12454         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
12455         Likewise.
12456         * decl.c (pushtag): Use FROB_CONTEXT.
12457         (pushdecl, make_typename_type, define_function, grokdeclarator):
12458         Likewise.
12459         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
12460         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
12461         Likewise.
12462         * decl2.c (decl_namespace): Return global_namespace if no context.
12463         * method.c (build_overload_nested_name): Expect null as context.
12464         * pt.c (mangle_class_name_for_template): Do nothing for null
12465         contexts.
12466         (lookup_template_class): Allow for null id_context.
12467
12468 1998-06-25  Richard Henderson  <rth@cygnus.com>
12469
12470         * method.c (emit_thunk): Set current_function_is_thunk for the
12471         ASM_OUTPUT_MI_THUNK case as well.
12472
12473 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
12474
12475         * exception.cc (__cplus_type_matcher): Get a match_info pointer
12476         instead of an exception table entry as a parameter.
12477
12478 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
12479
12480         * parse.y (function_try_block): Don't call start_catch_handler.
12481         * except.c (call_eh_info): Remove coerced field from declaration.
12482         (build_eh_type_type_ref): New function to create an address of a
12483         rtti function for the new style exception tables.
12484         (expand_start_catch_block): Split function, this contains the
12485         common part.
12486         (process_start_catch_block_old): New function to perform the rest
12487         of expand_start_catch_block under old style exceptions.
12488         (process_start_catch_block_old): New function to perform the rest
12489         of expand_start_catch_block under new style exceptions.
12490         (expand_end_catch_block): Only pop the false label off the stack under
12491         the old style of exceptions.
12492         * semantics.c (finish_try_block): Don't call start_catch_handler.
12493         * exception.cc (struct cp_eh_info): Add original_value field.
12494         (__cplus_type_matcher): Perform type matching on the original exception
12495         value, and if we have a match, set the current value.
12496         (__cp_push_exception): Set the original exception value.
12497
12498 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
12499
12500         * call.c (joust): Fix confusing conversion warning.
12501
12502         * call.c (build_op_delete_call): Add placement parm.  Check
12503         LOOKUP_SPECULATIVELY.
12504         * cp-tree.h, decl2.c, init.c: Adjust.
12505         * decl.c (finish_function): Use it.
12506
12507         * pt.c (tsubst): Diagnose creating void fields or variables.
12508
12509 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12510
12511         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
12512
12513         * cp-tree.h (check_dtor_name): Add prototype.
12514
12515         * init.c (expand_member_init): Remove unused variables
12516         `ptr_type_node', `parm' and `rval'.
12517
12518         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
12519         in call to fprintf.
12520         (lang_print_xnode): Likewise.
12521
12522         * typeck2.c (enum_name_string): Cast argument to sprintf to long
12523         and use %ld specifier.
12524
12525         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
12526         specifier in call to fprintf.
12527         (GNU_xref_member): Cast argument to sprintf to int.
12528
12529 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12530
12531         * typeck2.c (pop_init_level): Warn about implicit zero initialization
12532         of struct members.
12533
12534 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12535
12536         * cp-tree.h: Prototype function `check_java_method'.
12537
12538 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
12539
12540         * class.c (finish_struct): Make conflicting use of id a pedwarn.
12541         * decl.c (pushdecl_class_level): Likewise.
12542
12543 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
12544
12545         * pt.c (convert_nontype_argument): Issue an error when presented
12546         with an integer (real) constant that cannot be simplified to an
12547         INT_CST (REAL_CST).
12548
12549         * cp-tree.h (c_get_alias_set): Remove declaration added in
12550         1998-06-13 change that should never have been checked in.
12551
12552 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
12553
12554         * typeck.c (build_binary_op_nodefault): Change % in format strings
12555         to %%.
12556
12557         * decl.c (grokvardecl): Don't build_static_name for decls that
12558         aren't at namespace scope.
12559
12560         * init.c (perform_member_init): Catch default-initialization of
12561         references.
12562
12563 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
12564
12565         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
12566
12567 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
12568
12569         * method.c (hack_identifier): Complain about getting a namespace
12570         or class template.
12571         * typeck.c (decay_conversion): Remove check for namespaces.
12572         * typeck2.c (incomplete_type_error): Likewise.
12573         * parse.y (template_arg): Add PTYPENAME expansion.
12574
12575 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
12576
12577         * decl.c (grokvardecl): Don't build external assembler names for
12578         TYPENAMEs in other namespaces as there is no declarator.
12579         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
12580         info from DECL_CONTEXT if it is NULL.
12581
12582 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
12583
12584         * call.c (check_dtor_name): Split out.
12585         (build_scoped_method_call): Use it.
12586         (build_method_call): Use it.
12587         * init.c (build_offset_ref): Use it.
12588
12589         * typeck.c (build_static_cast): Fix handling of pointers to members.
12590
12591         * decl.c (finish_function): Just return nothing from a constructor.
12592         * typeck.c (c_expand_return): Complain about returning a void
12593         expression from a destructor.
12594
12595 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
12596
12597         * class.c (alter_access): Accept a BINFO explaining how to get
12598         from the entity whose accessed is being altered to the type doing
12599         the altering.
12600         (handle_using_decl): New function containing code split out from ...
12601         (finish_struct_1): Here.
12602
12603         * cp-tree.h (complete_type_or_else): Declare.
12604         * init.c (build_new_1, build_delete): Use it.
12605         * typeck.c (require_complete_type): Use complete_type, rather than
12606         expanding it inline.
12607         (complete_type_or_else): New function.
12608         (build_component_ref): Use it.
12609         (pointer_int_sum): Make sure the type pointed to is complete.
12610         (pointer_diff): Likewise.
12611
12612         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
12613         types.
12614
12615         * search.c (get_matching_virtual): Note that member templates
12616         cannot override virtual functions.
12617
12618 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
12619
12620         * pt.c (check_explicit_specialization): If DECLARATOR turned into
12621         an error_mark_node from lookup_template_function, return the same.
12622         (determine_specialization): Also make sure TEMPLATE_ID isn't an
12623         error_mark_node, before we try to read its operands.
12624         * decl.c (grokdeclarator): If we got an error_mark_node from
12625         check_explicit_specialization, just return it right back.
12626
12627 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
12628
12629         * class.c (instantiate_type): Don't treat template-ids that don't
12630         specify any template arguments as equivalent to ordinary
12631         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
12632         pointer-to-members for member templates.  Tidy slightly.
12633         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
12634         * init.c (build_offset_ref): Handle template-ids like ordinary
12635         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
12636         offset part of the OFFSET_REF.
12637         * typeck.c (build_unary_op): Change check for unknown types to
12638         look for OFFSET_REFs, not SCOPE_REFs.
12639
12640 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
12641
12642         * pt.c (is_member_template_class): New function.
12643         (push_template_decl_real): Use it.
12644
12645 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
12646
12647         * friend.c (do_friend): Add support for nested classes using
12648         member functions of the enclosing class as friends.
12649
12650 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
12651
12652         * call.c (convert_default_arg): Make global, not static.
12653         (convert_arg_for_ellipsis): Split out from ...
12654         (build_over_call): Here.
12655         * cp-tree.h (convert_default_arg); Declare.
12656         (convert_arg_to_ellipsis): Likewise.
12657         (do_member_init): Remove.
12658         * init.c (do_member_init): Remove; this code is dead.
12659         (expand_member_init): Remove much of this code; it is dead.
12660         * typeck.c (convert_arguments): Use convert_default_arg and
12661         convert_arg_for_ellipsis, rather than duplicating here.
12662
12663         * call.c (convert_like): Don't fail silently if
12664         build_user_type_conversion fails.  Always return error_mark_node
12665         for failure.
12666
12667 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
12668
12669         * search.c (covariant_return_p): Complain about ambiguous base.
12670
12671         * typeck.c (build_component_ref): Diagnose ref to nested type.
12672
12673 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
12674
12675         * decl.c (grokparms): Check that INIT isn't an error_mark_node
12676         before giving error about invalid type for default arg.
12677
12678 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
12679
12680         * call.c (build_method_call): Fix thinko.
12681
12682 1998-06-10  Dave Brolley  <brolley@cygnus.com>
12683
12684         * decl2.c (lang_decode_option): New argc/argv interface.
12685         * cp-tree.h (lang_decode_option): New argc/argv interface.
12686         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
12687         specified for cpplib-enabled compilers.
12688         * lex.c (lang_init): Don't check_newline for cpplib.
12689         (init_parse): Don't initialize cpplib here.
12690
12691 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
12692
12693         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
12694         piece before checking DECL_MUTABLE_P.
12695
12696 1998-06-10  John Carr  <jfc@mit.edu>
12697
12698         * tree.c (debug_binfo): Make printf format match arguments.
12699
12700         * error.c (OB_PUTI): Make printf format match arguments.
12701
12702 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
12703
12704         * init.c (perform_member_init): Handle default-initialization.
12705
12706         * except.c (build_throw): Handle throwing NULL.
12707
12708         * typeck.c (build_x_function_call): Use resolve_offset_ref.
12709
12710         * search.c (compute_access): Only strip an anonymous union
12711         for a FIELD_DECL.
12712
12713         * call.c (add_builtin_candidates): Tweak.
12714
12715         * cvt.c (build_expr_type_conversion): Restore code for conversion
12716         from class types.
12717         * decl2.c (delete_sanity): Use it.  Clean up.
12718
12719         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
12720
12721 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
12722
12723         * typeck.c (c_expand_return): Don't warn about void expressions on
12724         return statements in functions returning void.
12725
12726 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
12727
12728         * pt.c (fn_type_unification): Revise documentation.  Tidy.
12729         (type_unification): Likewise.
12730
12731 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
12732
12733         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
12734         expand_end_catch.
12735         * parse.y (function_try_block): Rename expand_start_catch, and delete
12736         expand_end_catch.
12737         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
12738         expand_end_catch.
12739
12740 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
12741
12742         * search.c (lookup_member): New fn.
12743         * class.c (finish_struct_1): Use it.
12744         * decl.c (lookup_name_real): Use it.
12745
12746 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12747
12748         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
12749
12750         * cp-tree.h: Add prototype for `maybe_print_template_context' and
12751         `maybe_make_one_only'.
12752
12753         * decl.c (auto_function): Remove unused variable `decl'.
12754
12755         * decl2.c: Include dwarf2out.h and dwarfout.h.
12756
12757         * lex.c: Remove redundant declarations of `set_float_handler' and
12758         `asm_out_file'.
12759
12760 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
12761
12762         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
12763         time flag.  Call __cp_eh_info instead of __cp_exception_info.
12764         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
12765         (__cp_exception_info): Return offset into cp_eh_info structure to
12766         match what use to be the start of this structure.
12767         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
12768         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
12769         compile time flag.
12770         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
12771         __cp_eh_info instead of __cp_exception_info.
12772
12773 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
12774
12775         * decl.c (cp_finish_decl): Disable inlining of extern inlines
12776         with static variables.
12777
12778 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
12779
12780         * init.c (build_offset_ref): Correct previous change to use build,
12781         not build_min.
12782
12783 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
12784
12785         * class.c (instantiate_type): Handle pointer-to-members where the
12786         member is a template.
12787         * init.c (build_offset_ref): Likewise.
12788         * typeck.c (build_unary_op): Likewise.
12789
12790 1998-06-07  Richard Henderson  <rth@cygnus.com>
12791
12792         * lex.c (lang_init_options): New function.
12793         (lang_init): Remove flag_exceptions == 2 hack.
12794
12795 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
12796
12797         * search.c (envelope_add_decl): Tweak for implicit typename.
12798
12799         * call.c (joust): Also warn about confusing conversion op/constructor
12800         overload resolution.
12801
12802         * spew.c (yylex): Also return the TYPE_DECL if got_object.
12803         Don't clear got_object after '~'.
12804         * call.c (build_scoped_method_call): Tweak destructor handling.
12805         (build_method_call): Likewise.
12806         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
12807         TYPE_MAIN_VARIANT for destructors.
12808         * semantics.c (finish_object_call_expr): Complain about calling a
12809         TYPE_DECL.
12810
12811 1998-06-05  Per Bothner  <bothner@cygnus.com>
12812
12813         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
12814         Define - update needed by gcc.c change.
12815
12816 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
12817
12818         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
12819
12820 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12821
12822         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
12823         * decl.c (lookup_name_real): Add namespaces_only parameter.
12824         If set, return only NAMESPACE_DECLs.
12825         (select_decl): Likewise.
12826         (identifier_type_value): Give additional parameter.
12827         (lookup_name_nonclass): Likewise.
12828         (lookup_name): Likewise.
12829         (find_binding): Skip namespace aliases.
12830         (binding_for_name): Likewise.
12831         (push_namespace): Check for namespace aliases.
12832         (lookup_name_namespace_only): New function.
12833         (begin_only_namespace_names, end_only_namespace_names): New functions.
12834         * decl2.c (set_decl_namespace): Skip namespace aliases.
12835         (do_using_directive): Likewise.
12836         (do_namespace_alias): Produce namespace aliases, fix alias
12837         redeclaration.
12838         * error.c (dump_decl): Support SCOPE_REF.
12839         * parse.y (extdef): Wrap lookup with namespace_only for namespace
12840         aliases and using declarations.
12841
12842 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
12843
12844         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
12845
12846         * error.c (dump_expr): Clean up NEW_EXPR case.
12847
12848 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12849
12850         Suggested by Brendan Kehoe
12851         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
12852         treat it as using ::decl.
12853
12854         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
12855
12856         * tree.c (mapcar): Support NEW_EXPR.
12857
12858         * error.c (dump_expr): Support NEW_EXPR.
12859
12860 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
12861
12862         * method.c (make_thunk): Use overload machinery to make name.
12863         * search.c (covariant_return_p): New fn.
12864         (get_matching_virtual): Use it.
12865
12866         * init.c (build_new_1): Fix check for void.
12867
12868 1998-06-01  Per Bothner  <bothner@cygnus.com>
12869
12870         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
12871         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
12872         java_int_type_node, java_long_type_node, java_float_type_node,
12873         java_double_type_node, java_char_type_node, java_boolean_type_node):
12874         New "primitive" types, with predefined names __java_byte etc.
12875         (record_builtin_java_type):  New function.
12876         (init_decl_processing):  Make Java types with record_builtin_java_type.
12877         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
12878         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
12879         (grokfndecl):  Call check_java_method for Java classes.
12880         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
12881         (process_overload_item):  Match types against specific
12882         java_XX_type_node types, rather than using is_java_type.
12883         * class.c (finish_struct_1):  Don't add default copy constructor
12884         or operator= if TYPE_FOR_JAVA.
12885         (pop_lang_conext):  Restore strict_prototyp proper if Java.
12886         * decl2.c (acceptable_java_type, check_java_method):  New functions.
12887         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
12888         (tsubst):  Move common statement after if statement.
12889         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
12890
12891 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
12892
12893         * pt.c (for_each_template_parm): Use first_rtl_op.
12894
12895         * tree.c (build_cplus_array_type_1): Also check index_type for
12896         template parms.
12897
12898 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
12899
12900         * pt.c (tsubst): Always copy BINFO_BASETYPES.
12901
12902 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
12903
12904         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
12905         TYPE_SIZE_UNIT too.
12906
12907 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
12908
12909         * decl.c (grokdeclarator): Don't complain about in-class
12910         initialization of static consts if we don't really know the type
12911         of the variable.
12912
12913 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
12914
12915         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
12916         * method.c (build_destructor_name): New fn.
12917         * decl2.c (maybe_retrofit_in_chrg): Split out...
12918         (grokclassfn): From here.  Reorganize.
12919         * decl.c (grok_ctor_properties): Make sure ctors for types with
12920         vbases have the in_chrg parm.
12921         * pt.c (instantiate_class_template): Update
12922         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
12923         grok_*_properties.
12924         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
12925
12926 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
12927
12928         * pt.c (instantiate_decl): Make test for whether or not static
12929         variables should be instantiated early match its comment.
12930
12931 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
12932
12933         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
12934         a member.
12935         (start_function): Call check_default_args.
12936         * decl2.c (grokfield): Don't call check_default_args.
12937         (check_default_args): Use cp_error_at.
12938         * lex.c (do_pending_defargs): Call check_default_args.
12939
12940 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
12941
12942         * call.c (build_method_call): Make sure get_type_value returns
12943         something before we try to use its TYPE_MAIN_VARIANT.
12944         (build_scoped_method_call): Likewise.
12945
12946 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
12947
12948         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
12949         initialize an array.
12950
12951         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
12952         DECL_VIRTUAL_P.
12953
12954         * friend.c (do_friend): Clarify template warning.
12955
12956 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
12957
12958         * decl.c (shadow_label): Don't treat decls as identifiers.
12959         (maybe_push_to_top_level): Clear shadowed_labels.
12960
12961         * pt.c (instantiate_decl): Reset lineno and filename after calling
12962         regenerate_decl_from_template.
12963
12964         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
12965         error_mark_node.
12966
12967 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
12968
12969         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
12970
12971 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12972
12973         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
12974         (convert_nontype_argument): Handle cases when nontype template
12975         parameters become classes after substitution.
12976
12977 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
12978
12979         * friend.c (is_friend): Use comptypes, rather than == to compare
12980         types.  Modify for new representation of template friends.
12981         (make_friend_class): Likewise.
12982         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
12983         (instantiate_class_template): Deal with template friends.
12984
12985         * decl.c (store_parm_decls): Remove redundant call to
12986         expand_main_function.
12987
12988 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
12989
12990         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
12991         DECL_USE_TEMPLATE.
12992
12993 1998-05-26  Per Bothner  <bothner@cygnus.com>
12994
12995         * language_as_string:  Handle lang_java.
12996
12997 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
12998
12999         * decl.c (pushdecl): Don't copy the type_decl.
13000
13001 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13002
13003         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
13004         current_class_type.
13005         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
13006
13007         * parse.y (complex_direct_notype_declarator): Use $1 to access
13008         scope of notype_qualified_id.
13009
13010 1998-05-26  Dave Brolley  <brolley@cygnus.com>
13011
13012         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
13013         (init_parse): Initialize cpplib interface.
13014
13015         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
13016         empty continuation.
13017
13018 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
13019
13020         * decl.c (pushtag): Avoid crashing on erroneous input.
13021
13022 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13023
13024         * decl.c (push_namespace): Only produce one unique name for
13025         anonymous namespaces.
13026         (get_unique_name): Remove.
13027
13028 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
13029
13030         * call.c (tourney): Don't do any extra comparisons.
13031
13032         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
13033
13034         * cp-tree.h (processing_template_parmlist): Declare.
13035         * decl.c (pushtag): Don't call push_template_decl when we
13036         shouldn't.
13037         * pt.c (processing_template_parmlist): New variable.
13038         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
13039         (complete_template_args): Use it.
13040         (add_to_template_args): Likewise.
13041         (innermost_args): Likewise.
13042         (tsubst): Likewise.
13043         (begin_template_parm_list): Use processing_template_parmlist.
13044         (end_template_parm_list): Likewise.
13045
13046         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
13047         * decl.c (grokdeclarator): Use it.
13048         * decl2.c (grok_x_components): Likewise.
13049         * init.c (initializing_context): Likewise.
13050         * method.c (do_build_copy_constructor): Likewise.
13051         (do_build_assign_ref): Likewise.
13052         * search.c (compute_access): Likewise.
13053         * typeck.c (build_component_ref): Likewise.
13054
13055         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
13056         unnamed type a typedef name "for linkage purposes".
13057
13058         * pt.c (lookup_template_class): Don't look at
13059         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
13060
13061         * method.c (build_overload_int): Handle error cases gracefully.
13062
13063         * pt.c (instantiate_decl): Handle static member variables
13064         correctly.
13065
13066         * pt.c (tsubst): Use the tsubst'd type when producing new
13067         TEMPLATE_PARM_INDEX nodes.
13068
13069 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
13070
13071         * tree.c (cp_tree_equal): Handle pointers to member functions.
13072
13073         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
13074         sure the type of the REF_BIND is a reference type.
13075         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
13076         target_type for clarity.
13077
13078         * parse.y (xcond): Move call to condition_conversion ...
13079         * semantics.c (finish_for_cond): Here.
13080         * parse.c: Regenerated.
13081
13082 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
13083
13084         * decl.c (push_namespace): Namespaces have type void.
13085         * typeck2.c (incomplete_type_error): Complain about namespace
13086         used as expression.
13087         * typeck.c (decay_conversion): Likewise.
13088
13089 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13090
13091         * error.c (dump_expr): Support namespaces.
13092
13093 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
13094
13095         * cp-tree.def: Add SRCLOC.
13096         * cp-tree.h: Add struct tree_srcloc and accessor macros.
13097         * tree.c (build_srcloc, build_srcloc_here): New fns.
13098         * pt.c (add_pending_template): Use build_srcloc_here.
13099         (push_tinst_level): Update last_template_error_tick before erroring.
13100         (instantiate_decl): Restore lineno and input_filename before
13101         calling add_pending_template.
13102         * decl2.c (finish_file): Set up lineno and input_filename for
13103         pending templates.
13104
13105 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
13106
13107         * decl.c (lang_print_error_function): New fn.
13108         (init_decl_processing): Set print_error_function to use it.
13109         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
13110
13111         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
13112         ICS_BAD_FLAG.
13113
13114         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
13115         copy-initialization.
13116
13117         * class.c (build_vtable_entry): Use int_fits_type_p.
13118         (build_vtable): Pass a signed offset to build_vtable_entry.
13119         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
13120         set_rtti_entry): Likewise.
13121
13122 1998-05-22  Per Bothner  <bothner@cygnus.com>
13123
13124         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
13125         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
13126
13127 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
13128
13129         * pt.c (print_template_context): Use fprintf instead of cp_error.
13130
13131         * pt.c (determine_specialization): Just return an error_mark_node.
13132         Also print the decl we want in error messages.  If we complain,
13133         return error_mark_node.
13134         (tsubst_friend_function): Set lineno and input_filename so
13135         error messages will be useful.
13136         (instantiate_template): Just return an error_mark_node.
13137         (check_explicit_specialization): Don't mess with a returned
13138         error_mark_node.
13139
13140         * pt.c (print_template_context): Add new argument.
13141         (maybe_print_template_context): New fn.
13142         (push_tinst_level): Increment tinst_level_tick.
13143         (pop_tinst_level): Likewise.
13144         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
13145         xrealloc instead of xmalloc.
13146
13147         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
13148
13149 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
13150
13151         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
13152         if the template we looked up is the same as the one we already
13153         have.
13154
13155 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
13156
13157         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
13158         (cpp_reader,parse_in): Add for cpplib.
13159         (check_newline): Call handle_sysv_pragma with new interface.
13160         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
13161
13162         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
13163         (sub_getch): Call GETC for cpplib.
13164
13165         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
13166         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
13167
13168         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
13169
13170 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
13171
13172         * decl2.c (maybe_make_one_only): New fn.
13173         (import_export_vtable): Use it.
13174         (import_export_decl): Likewise.
13175         * pt.c (mark_decl_instantiated): Likewise.
13176
13177 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
13178
13179         * decl2.c (find_representative_member): Rename to ...
13180         (build_anon_union_vars): New function.
13181         (finish_anon_union): Fix stupidity of previous change.
13182
13183 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
13184
13185         * decl.c (grokfndecl): Handle definition of specialization in
13186         friend declaration.
13187
13188         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
13189
13190 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
13191
13192         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
13193         to look for type declarations.
13194         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
13195         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
13196         (finish_member_class_template): Declare.
13197         * decl.c (pushtag): Put member class templates on the
13198         CLASSTYPE_TAGS list, just as for ordinary member classes.
13199         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
13200         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
13201         IDENTIFIER_NAMESPACE_VALUEs.
13202         * parse.y (component_decl): Move code to ...
13203         * semantics.c (finish_member_class_template): New function.
13204         Don't put member class templates on the list of components for a
13205         class.
13206         * parse.c: Regenerated.
13207         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
13208         In fact, don't use DECL_CONTEXT at all here.
13209
13210 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13211
13212         * decl.c (record_unknown_type): New function.
13213         (init_decl_processing): Call it for the unknown and global type
13214         nodes.
13215
13216 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
13217
13218         * decl2.c (find_representative_member): New function.
13219         (finish_anon_union): Use it.
13220
13221         * cp-tree.h (MAIN_NAME_P): New macro.
13222         (DECL_MAIN_P): Likwise.
13223         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
13224         (grokfndecl): Use the new macros.
13225         (grokdeclarator): Likewise.
13226         (start_function): Likewise.
13227         (store_parm_decls): Likewise.
13228         (finsh_function): Likewise.
13229         * friend.c (do_friend): Likewise.
13230         * typeck.c (build_function_call_real): Likewise.
13231         (build_unary_op): Likewise.
13232
13233 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
13234
13235         * decl2.c (start_objects, finish_objects, do_dtors,
13236         do_ctors): Split out from...
13237         (finish_file): ...here.
13238
13239 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
13240
13241         * tree.c (is_overloaded_fn): Don't abort on placeholders from
13242         push_class_decls.
13243
13244 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
13245
13246         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
13247
13248         * error.c (dump_expr): Handle an ARROW_EXPR.
13249
13250 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
13251
13252         * decl.c (saveable_obstack): Declare.
13253         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
13254         declare, if necessary.
13255
13256 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
13257
13258         * call.c (compare_qual): Remove.
13259         (is_subseq): Tweak.
13260         (is_properly_derived_from): New function.
13261         (maybe_handle_ref_bind): Likewise.
13262         (maybe_handle_implicit_object): Likewise.
13263         (compare_ics): Modify substantially to bring into conformance with
13264         the standard.
13265         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
13266         (comp_cv_qualification): Declare.
13267         (comp_cv_qual_signature): Likewise.
13268         * typeck.c (comp_cv_qualification): Likewise.
13269         (comp_cv_qual_signature): Likewise.
13270
13271 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13272
13273         * Makefile.in (parse.o): Depend on toplev.h.
13274
13275         * class.c (typecode_p): Remove prototype and definition.
13276
13277         * cp-tree.h (currently_open_class, is_empty_class, member_p):
13278         Add prototype.
13279
13280         * decl.c (push_overloaded_decl_top_level): Remove prototype and
13281         definition.
13282
13283         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
13284         in call to `cp_thing'.
13285         (cp_warning): Likewise for function pointer `warning'.
13286
13287         * except.c (do_function_call): Remove prototype and definition.
13288         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
13289
13290         * method.c (is_java_type): Add prototype and make it static.
13291
13292         * parse.y: Include toplev.h.
13293
13294         * pt.c (type_unification): Remove unused variable `arg'.
13295         (instantiate_decl): Likewise for `save_ti'.
13296
13297         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
13298
13299 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
13300
13301         * init.c (build_member_call): Handle template_ids.
13302         * parse.y (primary): Add global_scope template_id.
13303
13304 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
13305
13306         * decl2.c (get_sentry): Use end_temporary_allocation.
13307         Don't declare permanent_obstack.
13308
13309 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
13310
13311         * parse.y (.finish_new_placement): New non-terminal.
13312         (unary_expr, new_type_id): Use it.
13313         * parse.c: Regenerated.
13314
13315 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
13316
13317         * pt.c (redeclare_class_template): Say where the original definition
13318         of the template-parameter's default argument appeared.
13319
13320 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
13321
13322         * call.c (build_over_call): Tweak empty class handling.
13323
13324         * decl.c (make_typename_type): Use currently_open_class.
13325
13326         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
13327
13328 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
13329
13330         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
13331         for a type unless it is one.
13332
13333         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
13334
13335 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
13336
13337         * Makefile.in (program_transform_name, objdir): Define.
13338
13339         * Makefile.in (BISON): Use bison from the build tree if it exists.
13340         (FLEX): Likewise.
13341
13342 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
13343
13344         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
13345
13346         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
13347
13348 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
13349
13350         * call.c (build_scoped_method_call): Likewise.
13351
13352 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
13353
13354         * init.c (build_new_1): Call suspend_momentary around the creation
13355         of values that must be saved for exception handling.
13356         * parse.y (.build_new_placement): New non-terminal.
13357         (unary_expr, new_placement): Use it.
13358         * parse.c: Regenerated.
13359
13360 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
13361
13362         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
13363         old and new types.
13364
13365         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
13366         canonical type.
13367
13368         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
13369
13370 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
13371
13372         * decl.c (start_decl): Revert problem change.
13373
13374         * Makefile.in (CONFLICTS): Fix.
13375
13376 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13377
13378         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
13379
13380 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
13381
13382         * class.c (finish_struct_1): Use BINFO_SIZE.
13383
13384         * decl.c (start_decl): Use 'tem'.
13385
13386 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
13387
13388         * exception.cc: Include eh-common.h.
13389         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
13390         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
13391         (__cp_push_exception): Initialize eh_info struct as well.
13392         * except.c: Remove local structs and include eh-common.h.
13393         (init_exception_processing): Set language and version codes.
13394         (call_eh_info): Add presence of eh_info to runtime description of
13395         struct cp_eh_info.
13396         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
13397         * semantics.c (finish_try_block): Call start_catch_block() and
13398         end_catch_block().
13399         * parse.y (function_try_block): Call start_catch_block() and
13400         end_catch_block().
13401
13402 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
13403
13404         * typeck.c (original_type): New function.
13405         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
13406         to see if they're actually the same.
13407         * cp-tree.h (original_type): Declare.
13408
13409 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13410
13411         * Makefile.in (lex.o): Depend on output.h.
13412
13413         * call.c (add_function_candidate): Remove unused variable `cand'.
13414         (add_conv_candidate): Likewise.
13415         (build_builtin_candidate): Likewise.
13416
13417         * cp-tree.h: Add prototype for `types_overlap_p'.
13418
13419         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
13420
13421         * decl2.c (merge_functions): Remove unused variables `tmp' and
13422         `tempn'.
13423
13424         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
13425         (code_as_string): Likewise.
13426         (language_as_string): Likewise.
13427         (parm_as_string): Likewise.
13428         (op_as_string): Likewise.
13429         (assop_as_string): Likewise.
13430         (cv_as_string): Likewise.
13431
13432         * lex.c: Include output.h.
13433
13434         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
13435
13436         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
13437         ATTRIBUTE_UNUSED.
13438
13439         * tinfo.cc (__class_type_info::dcast): Change the type of variable
13440         `i' from int to size_t.
13441
13442         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
13443         ATTRIBUTE_UNUSED.
13444
13445 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
13446
13447         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
13448         DECL_NAMESPACE_SCOPE_P.
13449         (lang_decl_name): Likewise.
13450         * pt.c (tsubst_friend_function, tsubst): Likewise.
13451         * decl.c (pushdecl, redeclaration_error_message, start_decl,
13452         cp_finish_decl, start_function): Likewise.
13453         * class.c (finish_struct_1): Likewise.
13454         * call.c (build_over_call): Likewise.
13455         (compare_ics): Use DERIVED_FROM_P.
13456
13457 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
13458
13459         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
13460         * method.c (build_mangled_name): Use it.
13461         (build_decl_overload_real): Likewise.
13462
13463         * error.c (dump_simple_decl): New function, broken out from ...
13464         (dump_decl): Use it.
13465
13466 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
13467
13468         * ptree.c (lang_print_xnode): Add missing `break'.
13469
13470         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
13471
13472         * call.c (add_template_candidate): Adjust for changes to
13473         fn_type_unification.
13474         (add_template_candidate_real): Likewise.
13475         (add_template_conv_candidate): Likewise.
13476         (build_user_type_conversion_1): Likewise.
13477         (build_new_function_call): Likewise.
13478         (build_object_call): Likewise.
13479         (build_new_op): Likewise.
13480         (build_new_method_call): Likewise.
13481         * class.c (instantiate_type): Likewise.
13482         * cp-tree.h (unification_kind_t): New type.
13483         (fn_type_unification): Adjust prototype.
13484         (type_unificaiton): Likewise.
13485         * pt.c (UNIFY_ALLOW_NONE): New macro.
13486         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
13487         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
13488         (UNIFY_ALLOW_DERIVED): Likewise.
13489         (unify): Change prototype.
13490         (maybe_adjust_types_for_deduction): New function.
13491         (check_cv_quals_for_unify): Likewise.
13492         (determine_specialization): Adjust.
13493         (fn_type_unification): Likewise.
13494         (type_unification): Likewise.
13495         (type_unification_real): Likewise.  Use
13496         maybe_adjust_types_for_deduction.  Fix mishandling of
13497         back-unification of template functions passed as arguments.  Pass
13498         appropriate combination of UNIFY_ALLOW_* to unify.
13499         (unify): Remove unused NTPARMS parameter.  Use
13500         check_cv_quals_for_unify.  Remove bogus code that allowed
13501         too-generous unification in order to adhere more closely to standard.
13502         (get_bindings_real): Adjust.
13503         (get_class_bindings): Likewise.
13504
13505         * method.c (build_overload_identifier): Only use the innermost
13506         template arguments when mangling.
13507         * pt.c (tsubst_template_argument_vector): New function.
13508         (complete_template_args): Deal with the situation where the
13509         extra_args contain more than one level of arguments.
13510         (lookup_template_class): Deal with member template classes, which
13511         may have more than one level of arguments.
13512         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
13513         Improve handling of member template classes.  Use
13514         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
13515         tsubst_template_argument_vector where appropriate.
13516         (regenerate_decl_from_template): Break out from ...
13517         (instantiate_decl): Here.
13518
13519         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
13520         * parse.h: Regenerated.
13521         * parse.c: Really regenerated.
13522
13523         * cp-tree.h (finish_unary_op_expr): New function.
13524         (finish_id_expr): Likewise.
13525         (begin_new_placement): Likewise.
13526         (finish_new_placement): Likewise.
13527         (finish_declarator): Likewise.
13528         (finish_translation_unit): Likewise.
13529         (finish_parmlist): Likewise.
13530         (begin_class_definition): Likewise.
13531         (finish_class_definition): Likewise.
13532         (finish_default_args): Likewise.
13533         (finish_inline_definitions): Likewise.
13534         * parse.y (GCC_ASM_KEYWORD): Remove.
13535         (TYPENAME_ELLIPSIS): Likewise.
13536         * parse.c: Regenerated.
13537         Use new functions in semantics.c in the actions for many rules.
13538         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
13539         * hash.h: Regenerated.
13540         * semantics.c (finish_expr_stmt): Allow NULL expr.
13541         (finish_unary_op_expr): New function, containing
13542         code previously in parse.y.
13543         (finish_id_expr): Likewise.
13544         (begin_new_placement): Likewise.
13545         (finish_new_placement): Likewise.
13546         (finish_declarator): Likewise.
13547         (finish_translation_unit): Likewise.
13548         (finish_parmlist): Likewise.
13549         (begin_class_definition): Likewise.
13550         (finish_class_definition): Likewise.
13551         (finish_default_args): Likewise.
13552         (finish_inline_definitions): Likewise.
13553
13554 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
13555
13556         * typeck.c (build_c_cast): Don't decay arrays and functions to
13557         pointer type when converting to a class type.
13558
13559 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
13560
13561         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
13562         (DECL_CLASS_SCOPE_P): Likewise.
13563
13564 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
13565
13566         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
13567         * decl2.c (constructor_name_full): Likewise.
13568
13569 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
13570
13571         * tree.c (mapcar): Add OVERLOAD support.
13572
13573         * init.c (resolve_offset_ref): We must use basetype_path before we
13574         destroy it with a call to convert_pointer_to.
13575
13576 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
13577
13578         * class.c (currently_open_class): New fn.
13579         * decl.c (lookup_name_real): Use it.
13580         * search.c (lookup_field): Likewise.
13581
13582 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13583
13584         * cp-tree.def (OVERLOAD): New node.
13585         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
13586         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
13587         (NAMESPACE_BINDING): Remove.
13588         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
13589         namespace_binding.
13590         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
13591         Define.
13592         (tree_overload): New struct.
13593         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
13594         (REAL_IDENTIFIER_TYPE_VALUE): Define.
13595         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
13596         (lang_decl_flags): Remove in_namespace.
13597         (lang_decl): Remove chain.
13598         (DECL_CHAIN, DECL_NAMESPACE): Remove.
13599         (flag_honor_std): Declare extern.
13600         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
13601         namespace_binding, set_namespace_binding,
13602         lookup_function_nonclass, cat_namespace_levels,
13603         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
13604         scratch_ovl_cons, ovl_member, build_overload): Declare.
13605         (decl_list_length, get_namespace_id, current_namespace_id,
13606         overloaded_globals_p): Remove.
13607         (lookup_using_namespace, qualified_lookup_using_namespace): Change
13608         return type.
13609         (push_scratch_obstack): New macro.
13610         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
13611         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
13612         convs, fns.
13613         (build_new_function_call): Iterate using OVL_CHAIN.
13614         Print DECL_NAME in when reporting ambiguities.
13615         (build_object_call): Iterate using OVL_NEXT for fns, convs.
13616         (build_new_op): Call lookup_function_nonclass.
13617         Iterate using OVL_NEXT.
13618         (build_op_delete_call): Change detection of members.
13619         Do not wrap TREE_LIST around fields and single global functions.
13620         (build_over_call): Don't push a class level if the context is a
13621         namespace.
13622         (build_new_method_call): Iterate using OVL_NEXT.
13623         * class.c (add_method): Chain overloaded members using
13624         build_overload.  Remove copying of method.
13625         (grow_method): When iterating through the obstack, expect OVERLOAD
13626         nodes.  Chain overload members.
13627         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
13628         nodes in call to get_baselinks.
13629         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
13630         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
13631         fdecls that are OVERLOAD nodes.
13632         (validate_lhs): New function.
13633         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
13634         code.  Use DECL_NAME in error messages.  Split code between global
13635         and member function processing.
13636         * decl.c (global_type_node): New static variable.
13637         (in_std): New global.
13638         (struct binding_level): New field usings.
13639         (resume_binding_level): Assert that we are not in a class.
13640         (toplevel_bindings_p): Just check for namespace_p or
13641         pseudo_global.
13642         (resume_level): Remove.
13643         (find_binding): New function.
13644         (binding_for_name): Call it.
13645         (namespace_binding, set_namespace_binding): New functions.
13646         (push_namespace): Associate binding level with new namespace,
13647         resume_binding_level for existing namespace.  Remove old code.
13648         Fake std by counting.
13649         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
13650         (maybe_push_to_top_level): Save current namespace.
13651         (pop_from_top_level): Restore saved namespace.
13652         (pop_namespace): Call suspend_binding_level.  Remove old code.
13653         (cat_namespace_levels): New function.
13654         (set_identifier_type_value_with_scope): For namespace bindings,
13655         set BINDING_TYPE, and use global_type_node.
13656         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
13657         (identifier_type_value): New function.
13658         (pushtag): If no context, use current_namespace.
13659         (duplicate_decls): Don't process DECL_CHAIN.
13660         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
13661         already set.  Never reset it to NULL_TREE.  Lookup global variables
13662         in their namespace.  Push overloaded templates if they are on
13663         namespace level.
13664         (pushdecl_namespace_level): New function.
13665         (pushdecl_top_level): Implement using pushdecl_namespace_level.
13666         (pushdecl_using_decl): New function.
13667         (overloaded_globals_p): Remove.
13668         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
13669         them.  Use namespace_binding and set_namespace_value.
13670         (redeclaration_error_message): Complain if the declarations come
13671         from different namespaces.
13672         (lookup_tag): On namespace level, look in the BINDING_TYPE.
13673         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
13674         old code.
13675         (select_decl): New function.
13676         (lookup_name_real): Call it for qualified and unqualified lookup.
13677         Pass tree_bindings from the stack.
13678         If prefer_type is 1, also accept namespaces.
13679         (lookup_function_nonclass): New function.
13680         (init_decl_processing): Set the binding level of the global
13681         namespace to global_binding_level.
13682         Build a proper type list for __builtin_apply.
13683         Initialize std_node to "fake std" if flag_honor_std is set.
13684         Initialize global_type_node.
13685         Allocated bad_alloc in namespace std if flag_honor_std.
13686         (define_function): Set the DECL_CONTEXT to the current_namespace.
13687         (start_decl): A namespace is not considered as a context here.  If
13688         the DECL_CONTEXT is a namespace, push the decl.
13689         (cp_finish_decl): Check for namespaces used as initializers.
13690         (grokfndecl): Add namespace parameter.  Remove processing of
13691         DECL_CHAIN.
13692         (grokvardecl): Add namespace parameter.
13693         (grokdeclarator): Process SCOPEs that are namespaces.  For
13694         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
13695         (start_function): Check for contexts that are namespaces.
13696         Set context for declarations that have not been pushed.
13697         (store_parm_decls): Check for ::main only.
13698         (finish_function): Likewise.
13699         (start_method): Check for contexts that are namespaces.
13700         (start_method): Remove DECL_CHAIN processing.
13701         * decl2.c (flag_honor_std): Declare.
13702         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
13703         (decl_namespace_list): New static global.
13704         (grok_x_components): Ignore namespaces as type contexts.
13705         (check_classfn): Expect OVERLOAD nodes.
13706         (grokfield): Remove DECL_CHAIN processing.
13707         (finish_file): Call cat_namespace_levels.
13708         (merge_functions): New function.
13709         (ambiguous_decl): Rewrite.
13710         (lookup_using_namespace): Produce tree_bindings.
13711         (qualified_lookup_using_namespace): Likewise.
13712         (set_decl_namespace, decl_namespace, current_decl_namespace,
13713         push_decl_namespace, pop_decl_namespace): New functions.
13714         (arg_lookup): New struct.
13715         (add_function, arg_assoc_namespace, arg_assoc_class,
13716         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
13717         New functions.
13718         (get_namespace_id, current_namespace_id): Remove.
13719         (do_toplevel_using_decl): Rewrite.
13720         (do_class_using_decl): Complain about namespace qualifiers.
13721         (do_using_directive): Sorry if not on namespace level.  Complain
13722         about unknown namespaces.
13723         * error.c (dump_aggr_type): Check for namespace contexts.
13724         * except.c (init_exception_processing): Push terminate into std.
13725         * friend.c (is_friend): A namespace is not a context, here.
13726         * init.c (expand_member_init): Remove DECL_CHAIN processing.
13727         (build_offset_ref): Process OVERLOAD nodes.
13728         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
13729         * lex.c (identifier_type): Loop using OVL_CHAIN.
13730         (see_typename): Set looking_for_typename to 2.
13731         (real_yylex): Likewise.
13732         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
13733         (do_scoped_id): Expect OVERLOAD nodes.
13734         Change calling convention for qualified_lookup_using_namespace.
13735         (build_lang_decl): Don't set in_namespace anymore.
13736         * method.c (typevec_size): New global.
13737         (build_overload_nested_name): Return if global_namespace.
13738         Otherwise, always expect a declaration context.
13739         (build_qualified_name): Likewise.
13740         Make sure we don't write beyond typevec_size.
13741         (build_decl_overload_real): Likewise.
13742         Allocate one extra slot for the namespace.
13743         (hack_identifier): Mark code dead.
13744         Process OVERLOAD and NAMESPACE_DECL nodes.
13745         * parse.y (program): Pop namespaces until in global namespace.
13746         (extdef): In a using-declaration, don't discard the identifier if
13747         there is no declaration.
13748         (left_curly): Ignore type contexts which are namespaces.
13749         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
13750         used as scope.
13751         * pt.c (template_class_depth): Expect types to be namespaces.
13752         (determine_specialization): Simplify by expecting OVERLOAD nodes.
13753         (push_template_decl): Push into namespace level.
13754         Reset ctx if it is a namespace.
13755         Set DECL_CONTEXT to current_namespace if not set already.
13756         Ignore real contexts that are namespaces.
13757         (mangle_class_name_for_template): Skip global_namespace.
13758         Mangle other namespaces as declarations.
13759         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
13760         (lookup_template_class): Push into namespace of context.
13761         If the context is a namespace, set it to global_namespace.
13762         Use id_context for mangling.
13763         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
13764         (tsubst_friend_function): Ignore namespace contexts.
13765         Push into namespace level.
13766         (tsubst): Handle NAMESPACE_DECL nodes.
13767         Remove DECL_CHAIN processing.
13768         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
13769         * ptree.c (print_lang_identifier): Print bindings.
13770         (lang_print_xnode): Print OVERLOAD nodes.
13771         * rtti.c (init_rtti_processing): Push type_info into std.
13772         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
13773         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
13774         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
13775         lookup_fnfields_here): Likewise.
13776         Process all nodes, instead of going through TREE_CHAIN.
13777         * sig.c (build_signature_pointer_or_reference_type): Set context
13778         to global_namespace.
13779         (build_signature_table_constructor): Expect OVERLOAD nodes.
13780         * spew.c (yylex): Save old setting of looking_for_typename.
13781         * tree.c (decl_list_length): Remove.
13782         (binding_init): New function.
13783         (count_functions): Rewrite.
13784         (is_overloaded_fn): Expect OVERLOAD nodes.
13785         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
13786         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
13787         ovl_member): New functions.
13788         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
13789         (type_unknown_p): Likewise.
13790         (require_instantiated_type): Likewise.
13791         (build_component_ref): Declare code dead.
13792         (build_x_function_call): Create and expect OVERLOAD nodes.
13793         (build_function_call_real): Check for ::main only.
13794         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
13795         (convert_for_assignment): Check for TREE_LIST before accessing
13796         TREE_VALUE.
13797         * decl.c (duplicate_decls): Check for namespace bindings instead
13798         of global bindings.
13799         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
13800         lookup_name_current_level, start_decl, xref_tag,
13801         finish_enum): Likewise.
13802         * init.c (build_offset_ref): Likewise.
13803         * search.c (lookup_field): Likewise.
13804         (lookup_fnfields): Likewise.
13805         (dfs_debug_mark): Likewise.
13806         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
13807         (poplevel_class, pop_from_top_level): Likewise.
13808         * decl2.c (finish_method): Likewise.
13809         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
13810         * decl.c (record_builtin_type): Likewise.
13811         (init_decl_processing, grokfndecl): Likewise.
13812         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
13813         (make_lang_type): Likewise.
13814         * parse.y (make_thunk): Likewise.
13815         * pt.c (tsubst): Likewise.
13816         * tree.c (debug_binfo): Likewise.
13817         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
13818         tinfo2.cc, inc/new.h: Add std qualifications.
13819         * inc/new: Wrap with namespace std if __HONOR_STD.
13820         * inc/typeinfo: Likewise.
13821
13822 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
13823
13824         * call.c (build_user_type_conversion_1): Handle second_conv
13825         properly for templates.
13826
13827 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
13828
13829         * method.c (build_decl_overload_real): Set TREE_USED flag to
13830         zero for build_type_variants nodes as well.
13831
13832 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
13833
13834         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
13835
13836 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
13837
13838         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
13839         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
13840         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
13841         xref.o): Add toplev.h dependencies.
13842
13843 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
13844
13845         * errfn.c (cp_error, cp_warning): Remove declarations for
13846         error and warning respectively.
13847
13848 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13849
13850         * error.c: Convert to using ctype macros defined in system.h.
13851         * method.c: Likewise.
13852         * xref.c: Likewise.
13853         * lex.c: Likewise.  Also remove redundant system header stuff.
13854
13855 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
13856
13857         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
13858         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
13859         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
13860         xref.c: Add include of toplev.h.
13861
13862 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
13863
13864         * tree.c (perm_manip): Also regenerate the RTL of an extern.
13865         (copy_to_permanent): Use end_temporary_allocation.
13866
13867 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
13868
13869         * init.c (expand_vec_init): The initialization of each array
13870         element is a full-expression.
13871
13872 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
13873
13874         * method.c (build_mangled_name): Add a call to build_type_variant
13875         to get the right type.
13876
13877 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
13878
13879         * Makefile.in: Add .SUFFIXES.
13880
13881         * cp-tree.def: Remove NAMESPACE_DECL.
13882
13883 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
13884
13885         * call.c (build_over_call): Do evaluate arg even if it has empty
13886         class type.
13887         * decl.c (start_function): Don't push a member function.
13888
13889 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
13890
13891         * Makefile.in (g++FAQ.info): Put -o option before input file.
13892
13893 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
13894
13895         * gxxint.texi: Add info for squangling codes K and B.
13896
13897 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
13898
13899         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
13900         the expression in templates.
13901         (finish_stmt_expr): Likewise.
13902
13903 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
13904
13905         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
13906
13907 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
13908
13909         * decl.c (maybe_push_to_top_level): Always clear
13910         current_template_parms and processing_template_decl.
13911         (pushtag): Remove check of current_class_type and some comments,
13912         since maybe_push_to_top_level no longer creates confusion.
13913
13914 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
13915
13916         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
13917         (DECL_CLASS_TEMPLATE_P): Likewise.
13918         (DECL_PRIMARY_TEMPLATE): Likewise.
13919         (PRIMARY_TEMPLATE_P): Use it.
13920         (push_template_decl_real): New function.
13921         (redeclare_class_template): Take new template parameters as
13922         input.
13923         (is_specialization_of): New function.
13924         (comp_template_args): Declare.
13925         * decl.c (pushtag): Handle friend template classes.
13926         (xref_tag): Likewise.  Use new calling convention for
13927         redeclare_class_template.
13928         * decl2.c (grok_x_components): Handle friend templates.
13929         * friend.c (is_friend): Use is_specialization_of where
13930         appropriate.  Deal with friend class templates.
13931         (make_friend_class): Let a class template be friends with itself.
13932         * pt.c (comp_template_args): Remove declaration.
13933         (tsubst_friend_class): New function.
13934         (push_template_decl_real): New function.
13935         (push_template_decl): Use it.
13936         (redeclare_class_template): Adjust for new calling convention.
13937         (comp_template_args): Give it external linkage.
13938         (instantiate_class_type): Use tsubst_friend_class to deal
13939         with friend templates.
13940         * typeck.c (comptypes): Use comp_template_args, rather than
13941         expanding it inline.
13942         * parse.y (component_decl): Handle a nested template type
13943         like other component type declarations.
13944
13945         * pt.c (check_explicit_specialization): Handle overloaded
13946         constructors correctly.
13947
13948         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
13949         (lookup_template_class): Use it.
13950
13951 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
13952
13953         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
13954         * cp-tree.h: Add WRAPPER support.
13955         * call.c (add_candidate): Split out from add_*_candidate fns.
13956         (build_over_call): Take the candidate instead of function and args.
13957         Enforce access control here.  Emit overload warnings here.
13958         (add_warning): New fn.
13959         (joust): Add WARN parm.  If not set, call add_warning instead of
13960         printing a warning.  Re-enable some warnings.
13961         (tourney): Pass it.
13962         (convert_like): Adjust.
13963         (build_new_op): Adjust.
13964         (build_new_function_call): Adjust.
13965         (build_user_type_conversion_1): Adjust.
13966         (USER_CONV_FN): Adjust.
13967         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
13968         build_int_wrapper): New fns.
13969
13970 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
13971
13972         * pt.c (unify): Fix typo in previous change.
13973
13974 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
13975
13976         * error.c (dump_type_real): Declare canonical_name.
13977
13978         * typeck.c (comp_target_types): Fix PMFs.
13979
13980 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
13981
13982         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
13983         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
13984         TEMPLATE_DECL.
13985
13986         * pt.c (tsubst): Decrease the template-level of
13987         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
13988         TEMPLATE_PARM_INDEX.
13989         (template_decl_level): New function.
13990         (unify): Make sure to record unifications for template
13991         parameters, even when the parameters exactly match the arguments.
13992         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
13993         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
13994         aren't from the level we're currently working on.
13995
13996 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
13997
13998         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
13999
14000         * decl2.c (check_member_template): Set DECL_IGNORED for member
14001         class templates, too.
14002
14003         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
14004
14005 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14006
14007         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
14008
14009 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
14010
14011         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
14012         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
14013         (init_decl_processing): Handle TI types.
14014         * typeck.c (unsigned_type, signed_type): Handle TI types.
14015
14016 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
14017
14018         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
14019         New local added_libraries.  Increment count when add library to
14020         arglist.
14021
14022 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
14023
14024         * cp-tree.h (type_as_string_real): New function.
14025         * pt.c (mangle_class_name_for_template): Use it.
14026         * error.c (dump_aggr_type): Change prototype.
14027         (dump_type_prefix): Likewise.
14028         (dump_type_suffix): Likewise.
14029         (dump_type_real): Convert from dump_type.  If desired, the
14030         "canonica" name of a typedef, i.e., the name of the underlying
14031         type, can be printed.
14032         (dump_type): Call dump_type_real.
14033
14034 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
14035
14036         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
14037
14038         * typeck.c (comp_target_types): Tweak pedantic case.
14039         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
14040         Return -1 or 1 instead of 1 or 2.
14041         (compparms): Remove STRICT handling.
14042         (convert_for_assignment): Fix handling of pmfs.
14043
14044 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
14045
14046         * typeck.c (comp_target_types): Handle references like pointers.
14047         (comp_target_parms): Note that return code from comp_target_types
14048         can be negative to indicate failure.
14049
14050 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14051
14052         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
14053         which requires a working target compiler to build.
14054
14055 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
14056
14057         * tree.c (avoid_overlap): Add prototype.
14058
14059         * spew.c (num_tokens): Add prototype.
14060         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
14061
14062         * search.c (dfs_check_overlap): Add prototype.
14063         (dfs_no_overlap_yet): Likewise.
14064
14065         * pt.c (original_template): Add prototype.
14066         (inline_needs_template_parms): Likewise.
14067         (push_inline_template_parms_recursive): Likewise.
14068         (retrieve_specialization, register_specialization): Likewise.
14069         (print_candidates, reduce_template_parm_level): Likewise.
14070         (build_template_decl, mark_template_parm): Likewise.
14071         (tsubst_friend_function, get_bindings_real): Likewise.
14072
14073         * method.c (start_squangling): Add prototype.
14074         (end_squangling, check_ktype, issue_ktype): Likewise.
14075         (build_overloaded_scope_ref, check_btype): Likewise.
14076         (build_mangled_template_parm_index): Likewise.
14077
14078         * lex.c (init_cpp_parse): Add prototype.
14079         (handle_cp_pragma, handle_sysv_pragma): Likewise.
14080         (reduce_cmp, token_cmp): Likewise.
14081
14082         * except.c (call_eh_info): Add prototype.
14083         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
14084         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
14085
14086         * decl2.c (is_namespace_ancestor): Add prototype.
14087         (namespace_ancestor, add_using_namespace): Likewise.
14088         (ambiguous_decl): Likewise.
14089
14090         * decl.c (indent): Add prototype.
14091
14092         * call.c (add_template_candidate_real): Add prototype.
14093
14094 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
14095
14096         * decl2.c (build_expr_from_tree): Just return a PMF.
14097
14098 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
14099
14100         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
14101         when doing initializations.
14102
14103         * pt.c (unify): Use comptypes to compare type args.
14104
14105 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
14106
14107         * decl.c (duplicate_decls): Fix check for when it's safe to free
14108         the new decl.
14109
14110         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
14111         to type_as_string.
14112
14113 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
14114
14115         * pt.c (build_template_parm_index): Add prototype.
14116
14117         * search.c (my_tree_cons): Don't clear words outside the
14118         newly allocated node.
14119
14120 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
14121
14122         * lex.c (init_parse): Now returns char* containing the filename.
14123
14124 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
14125                           Jeff Law   <law@cygnus.com>
14126
14127         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
14128         than a pointer.
14129
14130 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14131
14132         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
14133
14134 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
14135
14136         * decl.c (duplicate_decls): Don't warn for redundant decls if
14137         friend: let add_friend take care of it.
14138
14139 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
14140
14141         * sig.c (build_signature_pointer_constructor): Don't set
14142         TREE_HAS_CONSTRUCTOR for a signature pointer.
14143         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
14144         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
14145         here, too.
14146         * typeck.c (build_unary_op): Only allow taking the address of a
14147         real constructor.
14148         * typeck2.c (digest_init): Simplify.
14149         (store_init_value): Don't pedwarn about using { } for pmfs.
14150
14151 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
14152
14153         * cp-tree.h (start_decl):  Update prototype.
14154         * decl.c (start_decl):  Like the C version, new parameters
14155         for the attributes.  Call cplus_decl_attributes here,
14156         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
14157         (grokdeclarator):  Pass NULL for new start_decl arguments.
14158         * pt.c (tsubst_expr):  Likewise.
14159         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
14160         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
14161         * lex.c (build_lang_decl): Add lang_name_java.
14162         * class.c (push_lang_context): Add lang_name_java.
14163         * method.c (build_mangled_name): Check for is_java_type.
14164
14165 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
14166
14167         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
14168         * call.c (build_scoped_method_call): Check for TREE_CODE for
14169         VOID_TYPE instead of type ==  void_type_node.
14170         (build_method_call): Likewise.
14171         * decl.c (lookup_name_real): Likewise.
14172         (grokdeclarator): Likewise.
14173         (start_decl): Likewise.
14174         (grokparms): Likewise.
14175         (start_function): Likewise.
14176         (finish_function): Likewise.
14177         (start_method): Likewise.
14178
14179 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
14180
14181         * lex.c (finput): New variable.
14182         (init_cpp_parse):  Renamed from init_parse.
14183         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
14184         (finish_parse): New function.
14185         * cp-tree.h (init_lex, init_parse): Remove declarations.
14186
14187 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
14188
14189         * call.c (build_call): Still evaluate the actual argument.
14190         * class.c (is_empty_class): Update for -fnew-abi.
14191
14192         * decl2.c: -fnew-abi implies -fsquangle.
14193
14194         * method.c (do_build_assign_ref): Don't do anything to copy
14195         an empty class.
14196         (do_build_copy_constructor): Likewise.
14197         * call.c (build_over_call): Likewise.
14198
14199 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
14200
14201         * tree.c (avoid_overlap): Return a value.
14202
14203 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
14204
14205         * method.c (check_btype): Add missing argument to xrealloc.
14206         (check_ktype): Likewise.
14207
14208 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
14209
14210         Implement empty base optimization.
14211         * class.c (finish_struct_1): Add vbase fields earlier.  Set
14212         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
14213         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
14214         (types_overlap_p): New fn.
14215         * tree.c (avoid_overlap): New fn.
14216         (build_base_fields): Use it to avoid overlapping empty bases.
14217         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
14218
14219         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
14220
14221         Re-implement allocation of base class subobjects.
14222         * tree.c (unshare_base_binfos): New fn.
14223         (layout_basetypes): Use it.  Now handles offsets of both virtual and
14224         non-virtual bases, after layout_type.
14225         (layout_vbasetypes): Remove.
14226         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
14227         (build_vbase_pointer_fields): Split out from old layout_basetypes.
14228         * class.c (finish_base_struct): Lose offset handling code.
14229         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
14230         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
14231         * cp-tree.h: Adjust.
14232
14233 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
14234
14235         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
14236         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
14237         * class.c (duplicate_tag_error): Likewise.
14238         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
14239         * tree.c (layout_vbasetypes): Update from layout_record, remove
14240         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
14241         (layout_basetypes): Likewise.
14242
14243 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
14244
14245         * class.c, Make sure system.h is included just after config.h.
14246         Delete lingering stdio and errno references too.
14247         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
14248
14249 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
14250
14251         * friend.c (is_friend): Fix access control for local classes.
14252
14253         * class.c (is_empty_class): New fn.
14254         * call.c (build_call): Don't pass empty class objects to a function.
14255
14256 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
14257
14258         * call.c (build_over_call): Do name resolution for default
14259         arguments of function templates in the scope of the templates.
14260
14261 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
14262
14263         * call.c: Include system.h.  Remove includes, declarations and
14264         defines provided by system.h.
14265         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
14266         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
14267         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
14268         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
14269         * typeck2.c, xref.c: Likewise.
14270         * Makefile.in: Dependencies updated as appropriate.
14271         * Make-lang.in: Likewise.
14272
14273 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
14274
14275         * pt.c (fn_type_unification): Allow incomplete unification without
14276         an immediate error message.
14277
14278 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
14279
14280         * tree.c (member_p): New fn.
14281         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
14282         initializing class members.
14283
14284         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
14285         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
14286
14287         * call.c (build_method_call): Handle non-scoped destructors, too.
14288         * pt.c (tsubst_copy): Likewise.
14289
14290         * pt.c (print_template_context): Split out...
14291         (push_tinst_level): ...from here.
14292
14293         * friend.c (is_friend): Don't pass a type to decl_function_context.
14294
14295         * typeck.c (convert_for_initialization): Always hand off
14296         conversions to class type.
14297
14298 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
14299
14300         * friend.c (is_friend): Local classes have the same access as the
14301         enclosing function.
14302
14303 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
14304
14305         * typeck.c (expand_target_expr): Delete dead function.
14306
14307         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
14308
14309         * repo.c (save_string): Delete dead function.
14310
14311         * method.c (thunk_printable_name): Delete dead function.
14312
14313         * lex.c (yynextch): Delete dead function.
14314
14315         * expr.c (tree_extract_aggr_init): #if 0 out.
14316
14317         * except.c (do_unwind): Delete dead function.
14318         (easy_expand_asm): Likewise.
14319
14320         * cvt.c (build_conversion_type_1): Delete dead function.
14321
14322         * cp-tree.h (push_expression_obstack): Declare.
14323
14324         * call.c (source_type): #if 0 out.
14325
14326         * class.c (alter_access): Remove unused label.  Add braces
14327         around empty else clause.
14328
14329         * lex.c (yyprint): Fix argument to printf.
14330
14331 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
14332
14333         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
14334
14335         * pt.c (instantiate_class_template): Make sure template
14336         arguments are permanent.
14337         * init.c (resolve_offset_ref): Don't go looking around in
14338         template types.
14339
14340         * semantics.c: Add routines to handle expressions, and some
14341         declaration processing.
14342         * parse.y: Use them.
14343         (current_class_depth): Move declaration to cp-tree.h.
14344         * parse.c: Regenerated.
14345         * cp-tree.h: Use them.
14346         (current_class_depth): Declare.
14347         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
14348
14349 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
14350
14351         * error.c (dump_decl): Be a bit more explicit with template
14352         type arguments, when verbose.
14353
14354 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
14355
14356         * inc/exception: Reorder closing braces.
14357
14358 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
14359
14360         * pt.c (redeclare_class_template): New function.
14361         * cp_tree.h (redeclare_class_template): Declare it.
14362         * decl.c (xref_tag): Use it.
14363
14364 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
14365
14366         * call.c (build_over_call): Check IS_AGGR_TYPE, not
14367         TYPE_LANG_SPECIFIC.
14368         * typeck.c (convert_arguments): Likewise.
14369
14370         * decl.c (grokdeclarator): Remove const and volatile from type after
14371         setting constp and volatilep.
14372
14373         * class.c (finish_struct_1): Don't warn about bool bitfield larger
14374         than one bit.
14375
14376 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
14377
14378         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
14379
14380 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
14381
14382         * call.c (build_object_call): Complain about ambiguous operator(),
14383         rather that crashing.
14384         (build_new_op): Likewise.
14385         (build_op_delete_call): Likewise.
14386
14387 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
14388
14389         * cvt.c (perform_qualification_conversions): Use comp_target_types
14390         instead of comp_ptr_ttypes.
14391
14392 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
14393
14394         * cp-tree.h (enforce_access): Declare.
14395         * call.c (enforce_access): Make it extern, not static.
14396         * class.c (alter_access): Use enforce_access; modify code for ISO
14397         compliance, rather than ARM rules.
14398
14399 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14400
14401         * cp-tree.h: Fix typo.
14402
14403 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
14404
14405         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
14406         if (aggregate_value_p (type)).
14407
14408         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
14409
14410 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
14411
14412         * tree.c (mapcar): When dealing with a DECL, use it's constant
14413         value, if any.
14414         * pt.c (lookup_template_class): Don't mangle the names of template
14415         classes whose arguments are unknown.
14416
14417         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
14418
14419 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
14420
14421         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
14422
14423 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
14424
14425         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
14426         boolean_type_node to 1.
14427
14428 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
14429
14430         * error.c (dump_expr): Remove unused variable `l'.
14431
14432         * pt.c (for_each_template_parm): New function, created by
14433         converting uses_template_parms.
14434         (tree_fn_t): New typedef.
14435         (uses_template_parms): Use it.
14436         (mark_template_parm): New function.
14437         (push_template_decl): Check that the argument list of a partial
14438         specialization uses all the template parameters.
14439
14440         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
14441         with it; we might want it for debugging.
14442         * cp-tree.h (type_unification): Change interface.
14443         * class.c (finish_struct_1): Skip nested template types, just like
14444         ordinary nested types.
14445         (instantiate_type): Use new interface to type_unification.
14446         * lex.c (init_lex): Add __sz as opname for sizeof.
14447         * method.c (build_overload_scope_ref): New function.
14448         (build_overload_int): Handle complex expressions.  Set
14449         numeric_output_need_bar if necessary.
14450         (build_overload_value): Handle non-PARM_DECL nodes; this
14451         routine is now used by build_overload_int.  Remove some
14452         assignments to numeric_output_need_bar.  Use
14453         build_overload_scope_ref.
14454         (build_qualified_name): Note that some template mangled names end
14455         with digits, and set numeric_output_need_bar appropriately.  Use
14456         build_underscore_int.
14457         * pt.c (unify): Change interface.
14458         (type_unification_real): Likewise.
14459         (determine_specialization): Use new interfaces.
14460         (tsubst): Deal gracefully with situations in which the argument
14461         vector is not fully filled.
14462         (fn_type_unification): Use new interfaces.
14463         (type_unification): Likewise.  Remove NOP_EXPR hack.
14464         (type_unification_real): Likewise.
14465         (unify): Likewise.  Deal with unification of complex expressions.
14466
14467 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
14468
14469         * pt.c (complete_template_args): Initialize skip properly.
14470
14471         * decl.c (make_typename_type): Revert.
14472         (make_implicit_typename): Remove.
14473         (lookup_name_real): Don't call it.  Call lookup_field if we see a
14474         TYPE_DECL from a template base.
14475         * search.c (lookup_field): Do implicit typename stuff.
14476
14477 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
14478                           Geoff Noer    <noer@cygnus.com>
14479
14480         * Makefile.in: Various fixes for building cygwin32 native toolchains.
14481         * Make-lang.in: Likewise.
14482
14483 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14484
14485         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
14486
14487 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
14488
14489         * decl.c (make_implicit_typename): Rewrite removed code.
14490         (make_typename_type): Call it if the type we look up comes from
14491         a base that uses template parms.
14492
14493         * pt.c (complete_template_args): Rewrite.
14494         (tsubst, FUNCTION_DECL): Use it.
14495
14496 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
14497
14498         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
14499         c_expand_asm_operands () if output_operands, input_operands or
14500         clobbers is not NULL_TREE.
14501
14502 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14503
14504         * pt.c (complete_template_args): New function.
14505         (get_bindings): Deal with specializations of function templates
14506         with return type containing parameters from outer class
14507         templates.
14508         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
14509         substitute arguments and compose a new type.
14510
14511 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
14512
14513         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
14514         FUNCTION_DECLs.
14515
14516 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
14517
14518         * decl.c (make_implicit_typename): Lose useless code.
14519
14520         * call.c (standard_conversion): Handle A* -> const A* properly.
14521
14522         * pt.c (get_bindings_real): Rename from get_bindings.  Add
14523         check_rettype parm.
14524         (get_bindings): Pass 1.
14525         (get_bindings_overload): Pass 0.
14526
14527 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
14528
14529         * pt.c (check_explicit_specialization): When reverting a static
14530         member function, also remove the `this' parameter from
14531         last_function_parms.
14532
14533 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
14534
14535         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
14536         a function context.
14537
14538         * decl.c (store_bindings): Use free_binding_vecs.
14539         (pop_from_top_level): Likewise.
14540
14541 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
14542
14543         * decl.c (make_implicit_typename): Only change the type of a
14544         TYPENAME_TYPE.
14545
14546 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
14547
14548         * semantics.c: New file, containing routines to perform the
14549         semantic phase of parsing.
14550         * parse.y: Use it.
14551         * pt.c (tsubst_expr): Likewise.
14552         * cp-tree.h: Declare the various functions in semantics.c.
14553         Provide macros to access _STMT tree nodes.
14554         * cp-tree.def: Add ASM_STMT tree node.
14555         * Makefile.in, Make-lang.in: Add dependencies on and for
14556         semantics.c.
14557
14558 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
14559
14560         * pt.c (push_template_decl): Only check primary templates.
14561
14562         * pt.c (check_explicit_specialization): Complain about default args
14563         in explicit specialization.
14564
14565         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
14566         constructor_declarator.
14567
14568 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
14569
14570         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
14571         has no overloaded operator ->.
14572
14573         * call.c (build_field_call): Don't crash when presented with a
14574         field that is actually a nested type.
14575
14576         * decl.c (pushtag): Deal with friend class injection in local
14577         classes.
14578
14579         * call.c (build_object_call): Don't crash if OBJ is a
14580         pointer-to-member-function.
14581
14582 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
14583
14584         * pt.c (push_template_decl): Complain about template with C linkage,
14585         anonymous template class.
14586
14587 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
14588
14589         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
14590         * search.c: Likewise.
14591
14592         * lex.c (do_pending_defargs): Only call
14593         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
14594
14595         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
14596
14597 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
14598
14599         * parse.y: Deal with CONSTRUCTORS in new_initializers.
14600
14601 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
14602
14603         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
14604         closely mimics the behavior in parse.y.
14605         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
14606         into a compound statement.
14607
14608 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
14609
14610         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
14611         * pt.c (inline_needs_template_parms): New fn.
14612         (original_template): New fn.
14613         (push_inline_template_parms_recursive): New fn.
14614         (maybe_begin_member_template_processing): Use them.
14615         (maybe_end_member_template_processing): Likewise.
14616         (is_member_or_friend_template): Rename to is_member_template.
14617         Member functions of local classes are never member templates.
14618
14619 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14620
14621         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
14622         added in the class scope to catch redefinition error.
14623
14624         * pt.c (reduce_template_parm_level): Also copy
14625         the DECL_TEMPLATE_PARMS field.
14626
14627 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
14628
14629         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
14630         reduced-level template type parameter.
14631
14632 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14633
14634         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
14635         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
14636         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
14637         * decl.c (duplicate_decls): Propagate it.
14638         * typeck2.c (abstract_virtuals_error): Use two loops to emit
14639         abstract virtual functions and virtual functions which need a
14640         final overrider separately.
14641
14642 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14643
14644         * lang-specs.h: Properly put brackets around array elements in
14645         initializer.
14646
14647         * typeck.c (build_binary_op_nodefault): Correctly place parens around
14648         && and || in expression.
14649
14650 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14651
14652         * call.c (default_parm_conversions): Remove prototype definition.
14653         (build_method_call): Remove unused variable result.
14654
14655         * cvt.c (ocp_convert): Remove unused variable conversion.
14656
14657         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
14658
14659         * except.c (do_unwind): #if 0 definition of unused variables fcall
14660         and next_pc.
14661
14662         * expr.c (extract_scalar_init): #if 0 prototype and function
14663         definition.
14664
14665         * init.c (expand_aggr_init_1): Remove unused variable init_type.
14666         (build_new_1): Remove unused variable t.
14667
14668         * pt.c (instantiate_class_template): Remove unused variable newtag;
14669         cast called function return value to void.
14670         (do_decl_instantiation): Remove unused variables name and fn.
14671
14672         * tree.c (get_type_decl): Add default return to shut up compiler from
14673         complaining control reaches end of non-void function.
14674
14675         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
14676
14677 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14678
14679         * call.c (default_parm_conversions): Remove prototype definition.
14680         (build_method_call): Remove unused variable result.
14681         (build_over_call): Add default case in enumeration switch.
14682
14683 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14684
14685         * decl2.c (lang_decode_option): Change j's type to size_t.
14686
14687         * tree.c (layout_vbasetypes): record_align and desired_align are of
14688         type unsigned int; const_size and nonvirtual_const_size likewise.
14689
14690 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
14691
14692         * parse.y (new_initializer): Make sure all initializers are
14693         lists.
14694
14695 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
14696
14697         * decl2.c (import_export_decl): Mark tinfo functions for
14698         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
14699
14700 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
14701
14702         * method.c: Fix typo.
14703
14704 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14705
14706         * method.c: Include "system.h" to get stdlib.h, stdio.h,
14707         ctype.h, string.h, etc.
14708         (issue_nrepeats): Add default case in enumeration switch.
14709         (check_btype): Likewise.
14710         (process_overload_item): Likewise.
14711
14712         * Makefile.in (method.o): Depend on system.h.
14713
14714 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14715
14716         * lex.c (do_scoped_id): Fix parenthesizing.
14717
14718 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
14719
14720         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
14721         FLAG_RTTI is unset, initialize type info machinery and continue
14722         with FLAG_RTTI enabled.
14723         (get_typeid): Likewise.
14724
14725 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
14726
14727         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
14728         from B.
14729
14730 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
14731
14732         * pt.c (finish_member_template_decl): Deal more gracefully with
14733         invalid declarations.
14734
14735 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
14736
14737         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
14738         cp-tree.h: Clean up more old overloading code, old RTTI code, and
14739         some formatting quirks.
14740
14741         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
14742         method.c, pt.c, ptree.c, typeck.c: Remove support for
14743         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
14744         * class.h: Remove.
14745         * Makefile.in: Adjust.
14746
14747         * pt.c (unify): Don't allow reduced cv-quals when strict.
14748
14749         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
14750         *type_unification* and unify.
14751
14752 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
14753
14754         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
14755         (nested_name_specifier): And add it before this use.
14756         (typename_sub0): And this use.  Also add use without the keyword.
14757         (typename_sub1): Likewise.
14758         * pt.c (instantiate_class_template): Don't actually instantiate
14759         anything if our type uses template parms.
14760
14761 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
14762
14763         * decl.c (start_function): Don't call temporary_allocation for a
14764         nested function.
14765
14766 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
14767
14768         * pt.c (instantiate_class_template): Don't mess with friends if
14769         our type uses template parms.
14770
14771 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
14772
14773         * parse.y (nested_name_specifier): Use explicit_template_type.
14774         (typename_sub): Allow a template_type, an explicit_template_type,
14775         or an implicit template type at the end.
14776         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
14777         * decl.c (make_typename_type): Handle template-id where the name
14778         is a TEMPLATE_DECL.
14779         * call.c (build_scoped_method_call): Handle member template
14780         destructor call.
14781         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
14782         destructor is represented by the type.
14783
14784         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
14785         * parse.y (nested_name_specifier): Add 'template' case.
14786         (explicit_template_type): New rule.
14787         (typename_sub): Use it.
14788         * decl.c (make_typename_type): Handle getting a template-id for NAME.
14789         * pt.c (tsubst): Likewise.
14790
14791 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
14792
14793         * pt.c (add_to_template_args): Fix thinko.
14794         (instantiate_class_template): Call it later.
14795
14796         * pt.c (get_class_bindings): Add outer_args parm.
14797         (most_specialized_class): Likewise.
14798         (instantiate_class_template): Pass it.
14799         (more_specialized_class): Likewise.
14800         (lookup_template_class): Get context from template if none
14801         was specified.
14802         (finish_member_template_decl): Don't do anything with a
14803         partial specialization.
14804         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
14805         AGGREGATE_TYPE_P.
14806         * class.c (finish_struct): Member class templates have already been
14807         checked for name clashes.
14808         * decl.c (pushdecl_with_scope): Handle pushing at class level.
14809
14810 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
14811
14812         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
14813         (tsubst, *_PARM): Support multiple levels of template classes.
14814         (instantiate_class_template): Look up the pattern from the
14815         original template.
14816         (lookup_template_class): Handle getting a template for d1.
14817         (push_template_decl): Correct setting of 'primary'.
14818         (reduce_template_parm_level): Add 'levels' parm.
14819         (finish_member_template_decl): Support member class templates.
14820         (template_class_depth): Handle multiple levels.
14821         * parse.y (component_decl_1, fn.def2): Remove member template case.
14822         (component_decl): Add member template cases.
14823         * decl2.c (check_member_template): We now handle member template
14824         classes.
14825         * decl.c (pushtag): Handle member templates.
14826         * method.c (do_inline_function_hair): Don't touch
14827         IDENTIFIER_GLOBAL_VALUE.
14828         * init.c (build_offset_ref): If name isn't an identifier, just
14829         return it.
14830         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
14831
14832         * typeck.c (get_delta_difference): Do adjust for conversions to
14833         and from virtual base.
14834
14835 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
14836
14837         * typeck.c (get_delta_difference): Give hard error for conversion
14838         from virtual base.
14839
14840         * cp-tree.h: Tweak formatting.
14841
14842 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
14843
14844         * decl.c (push_namespace): Handle redeclaration error.
14845
14846         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
14847         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
14848         (NAMESPACE_BINDING): New macro.
14849         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
14850         * *.c: Use them.
14851
14852         * pt.c (push_template_decl): Use innermost_args.
14853
14854         * decl.c (get_unique_name): Tweak from earlier in the name.
14855
14856 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14857
14858         * cp-tree.def: Add CPLUS_BINDING node.
14859         * cp-tree.h (tree_binding): New struct.
14860         (BINDING_SCOPE, BINDING_VALUE): New macros.
14861         (current_namespace, global_namespace): Declare extern.
14862         (struct lang_decl_flags): New field in_namespace.
14863         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
14864         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
14865         (TREE_INDIRECT_USING): New macro.
14866         * decl2.c (current_namespace, global_namespace): Declare.  The
14867         value is a NAMESPACE_DECL now, not a TREE_LIST.
14868         (is_namespace_ancestor, namespace_ancestor): New static functions.
14869         (add_using_namespace, ambiguous_decl): Likewise.
14870         (lookup_using_namespace): New support function for lookup_name.
14871         (qualified_lookup_using_namespace): New support function for
14872         do_scoped_id and lookup_namespace_name.
14873         (get_namespace_id): Mark as obsolete.
14874         (current_namespace_id): Likewise.
14875         (do_namespace_alias): Implement.
14876         (do_using_directive): Implement as call to add_using_namespace.
14877         * decl.c (binding_for_name): New function.
14878         (push_namespace, pop_namespace): Implement.
14879         (push_decl): Don't install a FUNCTION_DECL in the global branch.
14880         (lookup_namespace_name): Implement using qualified lookup.
14881         (lookup_name_real): For global scoping, lookup in
14882         global_namespace.  For namespace scoping, lookup in given
14883         namespace.  For unscoped lookup, iterate over namespace,
14884         considering using directives.
14885         (init_decl_processing): Initialize global_namespace.
14886         (grokvardecl): Build assembler name as static name for globals.
14887         (grokdeclarator): Remove old namespace mangling.
14888         (xref_tag): When installing a global binding for the
14889         tag, make sure we have an identifier.
14890         * method.c (build_overload_nested_name): Mangle namespaces.
14891         (build_qualified_name): Likewise.
14892         (build_decl_overload_real): Likewise.
14893         * lex.c (build_lang_decl): Set namespace for new declaration to
14894         current_namespace.
14895         (do_scoped_id): Find global names in global or current
14896         namespace, or using qualified namespace lookup, depending on
14897         context.
14898         * init.c (build_member_call): When scope is namespace, use
14899         build_x_function_call instead.
14900         (build_offset_ref): When scope is namespace, collapse processing
14901         to lookup_namespace_name instead.
14902         * error.c (dump_decl): Support NAMESPACE_DECL.
14903         * decl.c (pushdecl): Bind globals to current namespace.
14904         (push_overloaded_decl): Likewise.
14905         (lookup_tag): Likewise.
14906         (lookup_name_current_level): Likewise.
14907         (xref_tag): Likewise.
14908         (start_function): Likewise.
14909         * lex.c (do_identifier): Likewise.
14910         (identifier_typedecl_value): Likewise.
14911         (real_yylex): Likewise.
14912         * method.c (do_inline_function_hair): Likewise.
14913         * parse.y (unscoped): Likewise.
14914         * pt.c (check_explicit_specialization): Likewise.
14915         (lookup_template_class): Likewise.
14916         * rtti.c (call_void_fn): Likewise.
14917         * sig.c (build_sigtable): Likewise.
14918         * ptree.c (lang_print_xnode): New function.
14919
14920 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
14921
14922         * pt.c (instantiate_class_template): Don't instantiate if pedantic
14923         and the args use template parms.
14924
14925         * pt.c (push_tinst_level): If the instantiation uses template parms,
14926         fail silently.
14927         * decl.c (xref_basetypes): Do call complete_type for basetypes
14928         that involve template parameters.
14929
14930 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
14931
14932         * typeck2.c (process_init_constructor): Fix labeled init check.
14933
14934 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
14935
14936         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
14937         argument to tsubst and friends.
14938
14939         * pt.c (tsubst, FUNCTION_DECL): Tidy.
14940
14941         * typeck.c (build_x_function_call): Handle static member function
14942         templates like non-templates.  Handle friend templates like normal
14943         function templates.
14944         * pt.c (tsubst, *_PARM): Don't use orig_level.
14945         (get_bindings): Don't call add_to_template_args.
14946         (instantiate_template): Likewise.
14947         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
14948         * ptree.c (print_lang_type): Print index/level for template parms.
14949
14950 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
14951
14952         * Make-lang.in (cc1plus): Note that cc1plus depends on
14953         cp/cp-tree.h and cp/cp-tree.def.
14954
14955         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
14956         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
14957         position in a template parameter list.
14958         * cp-tree.h (template_parm_index): New structure, used as the tree
14959         structure for a TEMPLATE_PARM_INDEX.
14960         (TEMPLATE_PARM_IDX): New macro.
14961         (TEMPLATE_PARM_LEVEL): Likewise.
14962         (TEMPLATE_PARM_DESCENDANTS): Likewise.
14963         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
14964         (TEMPLATE_PARM_DECL): Likewise.
14965         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14966         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
14967         (TEMPLATE_TYPE_DECL): Likewise.
14968         (TEMPLATE_CONST_IDX): Remove.
14969         (TEMPLATE_CONST_LEVEL): Likewise.
14970         (TEMPLATE_CONST_SET_INFO): Likewise.
14971         (TEMPLATE_TYPE_SET_INFO): Likewise.
14972         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
14973         node.
14974         (TEMPLATE_TYPE_LEVEL): Likewise.
14975         * decl.c (decls_match): Call comp_template_parms, rather than
14976         expanding it inline.
14977         (duplicate_decls): If two template declarations are being merged,
14978         then their TEMPLATE_INFOs should be merged as well.
14979         (grokfndecl): Save template-id information when declaring a friend
14980         with explicit template arguments.  Pass arguments to
14981         check_explicit_specialization via correct convention; at some
14982         point check_explicit_specialization changed, but these call-sites
14983         did not.
14984         (grokdeclarator): Tidy up slightly.
14985         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
14986         two template functions with the same DECL_ASSEMBLER_NAME the same,
14987         since the names are not yet mangled.
14988         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
14989         TEMPLATE_CONST_PARM.
14990         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
14991         decl for a non-type parameter, rather than printing `<tparm ...>'.
14992         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
14993         (do_friend): Deal with template friends.
14994         * lex.c (do_pending_inlines): Call
14995         maybe_begin_member_template_processing, rather than
14996         conditionally calling begin_member_template_processing.
14997         (process_next_inline): Likewise.  Call
14998         maybe_end_member_template_processing, rather than
14999         conditionally calling end_member_template_processing.
15000         (do_pending_defargs): Likewise.
15001         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
15002         TEMPLATE_CONST_PARM.
15003         * method.c (build_mangled_template_parm_index): New function.
15004         (build_overload_value): Use it.
15005         (build_overload_name): Likewise.
15006         * pt.c (finish_member_template_decl): Allow friend declarations.
15007         (template_class_depth): New function.
15008         (is_member_template): Rename, and modify, to become...
15009         (is_member_or_friend_template): New function.
15010         (end_member_template_processing): Rename, and modify, to become...
15011         (maybe_end_member_template_processing).
15012         (build_template_parm_index): New function.
15013         (reduce_template_parm_level): New function.
15014         (process_template_parm): Modify to use build_template_parm_index.
15015         (push_template_decl): Deal with friend templates.
15016         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
15017         TEMPLATE_CONST_PARM.
15018         (tsubst_friend_function): New function.
15019         (instantiate_class_template): Generate the DECL_FRIENDLIST
15020         for a new instantiation by using tsubst_friend_function rather
15021         than just tsubst.
15022         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
15023         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
15024         appropriate new macros.  Use reduce_template_parm_level to
15025         generate lower-level template parameters.  Handle tsubst'ing into
15026         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
15027         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
15028         templates.  Similarly for the template parameters for a new
15029         template.
15030         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
15031         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
15032         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
15033         (get_bindings): Call add_to_template_args if necessary.
15034         (instantiate_decl): Handle instantiations of friend templates.
15035         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
15036         TEMPLATE_TYPE_PARM as a list of fields; it's not!
15037         * spew.c (yylex): Do a little manual constant propagation to
15038         clarify the code.
15039
15040 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
15041
15042         * error.c: Include sys/types.h.
15043
15044 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
15045
15046         * method.c (build_mangled_name): Start CPP directives in column zero.
15047
15048 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
15049
15050         * typeck2.c (process_init_constructor): Sorry about non-trivial
15051         labeled initializers.
15052         * parse.y (initlist): Re-enable labeled initializers.
15053
15054 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15055
15056         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
15057         all callers changed.  Rely on the new parameter instead of arg
15058         being a TREE_LIST when determine whether we are working inside
15059         template template parameter.  Clean up is_type test.
15060
15061 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
15062
15063         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
15064         * typeck2.c (initializer_constant_valid_p): Allow conversions
15065         between pointers and references.
15066
15067 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
15068
15069         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
15070         if pedantic || warn_pointer_arith.
15071
15072 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15073
15074         * pt.c (unify): Handle TEMPLATE_DECL.
15075
15076 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
15077
15078         * cp-tree.h (strip_attrs): Remove decl.
15079
15080 1998-02-18  Doug Evans  <devans@cygnus.com>
15081
15082         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
15083         Update olddecl's attributes too.
15084         (strip_attrs): Remove function.
15085         * typeck.c (common_type): Call merge_machine_type_attributes.
15086
15087 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
15088
15089         * parse.y (initdcl0_innards): New grammar symbol.
15090         (nomods_initdecls, nomods_initdcl0): Change type from itype to
15091         none, since the resulting value is never used.
15092         (parse_decl): New function.
15093         (datadef): Remove redundant actions.
15094         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
15095         * parse.c: Regenerated.
15096
15097 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
15098
15099         * parse.y (simple_stmt): Use getdecls() to check for decl.
15100
15101 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
15102
15103         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
15104         macros.
15105         (c++.install-common): Install c++filt properly as native or as cross
15106         variant.
15107         (c++.uninstall): Add c++filt.
15108
15109 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
15110
15111         * call.c (standard_conversion): Fix multi-level ptr conversions.
15112
15113 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
15114
15115         * init.c (build_new): Propagate error_mark_node up.
15116
15117 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
15118
15119         * parse.y (simple_stmt): If the condition isn't a declaration,
15120         start the controlled block after the test.
15121
15122 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
15123
15124         * call.c (build_over_call): Convert builtin abs, labs and fabs to
15125         tree-codes.
15126         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
15127         builtins.
15128
15129 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
15130
15131         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
15132
15133 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
15134
15135         * cp-tree.h: Add access_protected_virtual_node.
15136         * class.c (init_class_processing): Initialize it.
15137         * decl.c (xref_basetypes): Use it.
15138         * parse.y (base_class_access_list): Likewise.
15139
15140         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
15141         (c++.install-common): Install c++filt.
15142
15143 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15144
15145         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
15146
15147 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
15148
15149         * call.c (reference_binding): Use comptypes when comparing
15150         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
15151
15152 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
15153
15154         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
15155         (really_overloaded_fn): Move check here from is_overloaded_fn.
15156         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
15157
15158 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
15159
15160         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
15161         conversions.
15162
15163 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
15164
15165         * cp-tree.h (push_template_decl): Return the decl passed in, or an
15166         equivalent duplicate.
15167         * decl.c (pushtag): Use the return value from push_template_decl.
15168         (duplicate_decls): When duplicating a template declaration, merge
15169         the DECL_TEMPLATE_RESULTs as well.
15170         (make_implicit_typename): Don't try to dive into typename types to
15171         find a context for making a new implicit typename.
15172         (start_decl): Use the return value from push_template_decl.
15173         (grokdeclarator): Complain about declarations list `const operator
15174         int'.  Since we don't correctly handle in-class initializations of
15175         non-static data members, complain about this (now illegal)
15176         practice.  Issue an error for initializations of non-const statics
15177         since that is illegal as well, and since we don't handle that case
15178         correctly either.
15179         (start_function): Use the return value from push_template_decl.
15180         (start_method): Likewise.
15181         * decl2.c (grokfield): Likewise.  Since the change to
15182         grokdeclarator ensures that all initialized fields are in fact
15183         static, remove a redundant test for TREE_PUBLIC.
15184         * parse.y (initlist): Disable labeled initializers since they do
15185         not work as per the documentation, and since they do not use the
15186         same syntax as the C front end.
15187         * pt.c (push_template_decl): Return the decl passed in, or an
15188         equivalent duplicate.
15189         (lookup_template_class): When searching in a nested context,
15190         use the right arguments.
15191         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
15192         * typeck.c (build_component_ref): Assign the correct type to the
15193         result of build_vfn_ref.
15194
15195 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
15196
15197         * pt.c (convert_nontype_argument): Fix typo.
15198         (check_explicit_specialization): Allow old-style specialization
15199         of class template members.
15200
15201 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
15202                           Manfred Hollstein  <manfred@s-direktnet.de>
15203
15204         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
15205         when deciding to override DECL_ASSEMBLER_NAME.
15206
15207 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
15208
15209         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
15210         * cp-tree.h (flag_do_squangling): Add declaration.
15211         * lang-options.h: Add -fsquangle and -fno-squangle.
15212         * method.c: Add macros and static variables for squangling.
15213         (build_overload_name): Rename to build_mangled_name, add logic for B
15214         compression, and split into process_modifiers and
15215         process_overload_item.
15216         (process_modifiers): New function, to handle constant, reference,
15217         and pointer types.
15218         (process_overload_item): New function, handles issue of type codes.
15219         (build_overload_name): New function, start squangling and call
15220         build_mangled_name.
15221         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
15222         (start_squangling): New function to initialize squangling structs.
15223         (end_squangling): New function to destroy squangling structs.
15224         (nrepeats): Rename variable to Nrepeats.
15225         (issue_nrepeats): New function for issuing 'n' type repeats.
15226         (check_ktype): New function to check for type K name compression.
15227         (build_overload_nested_name): Add a check for K name compression.
15228         (build_qualified_name): Add a check for K name compression and don't
15229         use DECL_ASSEMBLER_NAME when squangling is on.
15230         (check_btype): New function, checks for B type compression.
15231         (build_static_name, build_decl_overload_real): Initiate squangling.
15232         (build_typename_overload, build_overload_with_type): Initiate
15233         squangling
15234
15235 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
15236
15237         * method.c (make_thunk): Avoid name buffer overflow.
15238
15239 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
15240
15241         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
15242         don't define them yet.
15243
15244         * parse.y (nomods_initdcl0): Add constructor_declarator case.
15245
15246 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15247
15248         * config-lang.in (diff_excludes): Use basename only.
15249
15250 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
15251
15252         * tinfo2.cc: Add tinfo for signed char.
15253
15254 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
15255
15256         * search.c (compute_access): Handle protected constructors in derived
15257         classes as accessible.
15258
15259 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
15260
15261         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
15262         Call convert_from_reference sooner.
15263
15264 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
15265
15266         * cvt.c (ocp_convert): Obtain the constant values from constant
15267         decls even if the destination type is the same as the type of the
15268         decl.
15269
15270         * decl2.c (finish_file): Make sure that static inlines with
15271         definitions are not marked DECL_EXTERNAL before returning.
15272
15273 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
15274
15275         * decl.c: Lose arg_looking_for_template.
15276         (lookup_name_real): Likewise.
15277         * parse.y: Lose processing_template_arg, template_arg1.
15278         (primary): Likewise.
15279         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
15280
15281 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15282
15283         * error.c (dump_decl): Fix type of default arguments for template
15284         template parameters and nontype template parameters.
15285         * parse.y (template_parm): Handle invalid default template
15286         template arguments here.
15287
15288         * parse.y (template_parm): Use template_arg instead of PTYPENAME
15289         for default template template argument.
15290         * pt.c (coerce_template_parms): Merge default template argument
15291         codes.  Can treat RECORD_TYPE as template name if it is implicitly
15292         created.  Fix argument index in error message.
15293         * typeck.c (comptypes): Merge template argument comparison codes in
15294         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
15295
15296 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
15297
15298         * lex.c (file_name_nondirectory): Also check for '/'.
15299
15300 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
15301
15302         * parse.y (primary): Deal with statement-expressions in
15303         templates.
15304         * pt.c (tsubst_copy): Handle BIND_EXPR.
15305         * tree.c (mapcar): Likewise.
15306
15307         * call.c (add_template_candidate_real): Pass extra parameter to
15308         fn_type_unification.
15309         * cp-tree.h (fn_type_unification): Add parameter.
15310         * pt.c (fn_type_unification): Add additional parameter to deal with
15311         static member functions.
15312         (get_bindings): Deal with static member functions.
15313
15314         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
15315         (revert_static_member_fn): Declare.
15316         * decl.c (revert_static_member_fn): Remove declaration.  Change
15317         linkage from internal to external.
15318         (cp_finish_decl): Deal with virtual functions in classes local to
15319         template functions.
15320         * decl2.c (finish_file): Don't forget to emit increment/decrement
15321         expressions in initializers for file-scope variables.
15322         * parse.y (typename_sub2): If the typename doesn't names a
15323         template, rather than a type, issue an error message.
15324         * pt.c (check_explicit_specialization): Handle specializations of
15325         static member functions.
15326         (coerce_template_parms): Handle offset references to lists of
15327         member functions.
15328         * search.c (note_debug_info_needed): Don't crash when handed a
15329         type which is being defined.
15330         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
15331         that can happen with some illegal code.
15332
15333 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15334
15335         * call.c (user_harshness): Initialize `code' to 0.
15336         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
15337         (null_ptr_cst_p): Add parentheses around && within ||.
15338         (standard_conversion): Likewise.
15339         (z_candidate): Likewise.
15340         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
15341         (build_object_call): Likewise for `mem_args'.
15342         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
15343         default case in enumeration switch.
15344
15345         * class.c (build_vtable_entry): Add explicit braces to avoid
15346         ambiguous `else'.
15347         (build_class_init_list): Likewise.
15348         (finish_struct_1): Initialize `width' to 0.
15349         (instantiate_type): Initialize `name' to NULL_TREE.  Add
15350         explicit braces to avoid ambiguous `else'.
15351
15352         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
15353         `else'.
15354
15355         * decl.c (grok_reference_init): Eliminate unused parameter, all
15356         callers changed.
15357         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
15358         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
15359         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
15360         (grokdeclarator): Add parentheses around && within ||.  Add
15361         explicit braces to avoid ambiguous `else'.
15362         (grokparms): Initialize `type' to NULL_TREE.
15363         (xref_tag): Remove unused label `just_return'.
15364         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
15365         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
15366         (hack_incomplete_structures): Add parentheses around assignment
15367         used as truth value.
15368
15369         * decl2.c (coerce_delete_type): Hide definition of `e3'.
15370
15371         * error.c: Include <stdlib.h>.
15372         (dump_expr): Change the type of `i' to size_t.  Remove unused
15373         label `error'.
15374
15375         * except.c (init_exception_processing): Remove unused variable `d'.
15376         (expand_throw): Likewise for `label'.
15377
15378         * friend.c (add_friends): Add explicit braces to avoid ambiguous
15379         `else'.
15380
15381         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
15382         (sort_base_init): Likewise for `binfo'.
15383         (expand_member_init): Likewise for `rval'.
15384         (build_member_call): Add parentheses around assignment used as
15385         truth value.
15386         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
15387         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
15388         `old_immediate_size_expand' to 0.
15389         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
15390         (build_vec_delete_1): Remove unused variable `block'.
15391         (expand_vec_init): Initialize `itype' to NULL_TREE.
15392
15393         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
15394         declaration of `index' and `rindex' with autoconf macros.
15395         (reinit_parse_for_expr): Remove unused variables
15396         `look_for_semicolon' and `look_for_lbrac'.
15397         (cons_up_default_function): Initialize `args' to NULL_TREE.
15398         (readescape): Initialize `firstdig' to 0.
15399         (real_yylex): Add parentheses around assignment used as truth value.
15400
15401         * method.c: Include <strings.h> if we don't have <string.h>.
15402         Protect declaration of `index' with autoconf macro.
15403
15404         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
15405         Initialize `type' to NULL_TREE.
15406         (structsp): Remove unused variable `id'.
15407
15408         * pt.c (coerce_template_parms): Add explicit braces to avoid
15409         ambiguous `else'.
15410         (lookup_template_class): Initialize `template' to NULL_TREE.
15411         (instantiate_class_template): Remove unused variable `name' and `e'.
15412         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
15413         (do_poplevel): Initialize `saved_warn_unused' to 0.
15414         (type_unification): Remove unused varable `parm'.
15415         (unify): Likewise for `j'.
15416
15417         * repo.c (init_repo): Add parentheses around assignment used as
15418         truth value.
15419         (finish_repo): Remove unused varable `p'.
15420
15421         * search.c (get_binfo): Initialize `type' to NULL_TREE.
15422         (get_base_distance): Likewise.
15423         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
15424         and `new_v' to NULL_TREE.
15425         (lookup_fnfields): Likewise for `rval_binfo_h'.
15426         (breadth_first_search): Add parentheses around assignment used as
15427         truth value.
15428         (get_template_base): Initialize `type' to NULL_TREE.
15429
15430         * sig.c (append_signature_fields): Initialize `last_mfptr' to
15431         NULL_TREE.
15432         (build_signature_table_constructor): Likewise for
15433         `last_rhs_field', `pfn' and `vt_off'.
15434         (build_sigtable): Likewise for `init'.
15435
15436         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
15437         (propagate_binfo_offsets): Likewise for `delta'.
15438         (hash_tree_cons): Initialize hashcode to 0.
15439         (can_free): Likewise for `size'.
15440         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
15441
15442         * typeck.c (convert_sequence): Hide prototype.
15443         (common_type): Add explicit braces to avoid ambiguous `else'.
15444         (comp_target_types): Likewise.
15445         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
15446         (build_function_call_real): Add explicit braces to avoid ambiguous
15447         `else'.
15448         (convert_arguments): Initialize `called_thing' to 0.
15449         (convert_for_initialization): Initialize `savew' and `savee' to 0.
15450
15451         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
15452         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
15453         (build_x_arrow): Likewise for `last_rval'.
15454
15455         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
15456
15457 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
15458
15459         * decl.c (init_decl_processing): Use set_sizetype.
15460         * decl2.c (sizetype): Don't declare.
15461         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
15462         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
15463         (build_component_addr, unary_complex_lvalue): Likewise.
15464         * rtti.c (expand_class_desc): Likewise.
15465         * class.c (get_vfield_offset): Likewise.
15466
15467 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
15468
15469         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
15470         early to avoid bogus error.  Handle overloaded function
15471         names provided as template arguments correctly.
15472         (coerce_template_parms): Don't mishandle overloaded functions when
15473         dealing with template template parameters.
15474         (lookup_template_class): Issue an error message, rather than
15475         crashing, when the TYPE_DECL provided is not a template type.
15476
15477 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
15478
15479         * class.c (instantiate_type): Don't just return a known type if
15480         it's wrong.
15481
15482 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
15483
15484         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
15485         since that code could never be reached.
15486
15487         * error.c (dump_decl): Avoid aborting in the midst of printing an
15488         error message about an illegal template declaration.
15489
15490         * parse.y (structsp): Print an error message, rather than crashing,
15491         when a class-head does not name a class.
15492
15493         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
15494         template arguments as a g++ extension.
15495
15496         * cp-tree.def (ALIGNOF_EXPR): New tree code.
15497         * decl2.c (grok_alignof): If processing_template_decl, just store
15498         the expression.
15499         * typeck.c (c_alignof): Likewise.
15500         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
15501         * error.c (dump_expr): Likewise.
15502         * pt.c (tsubst_copy): Likewise.
15503         * tree.c (cp_tree_equal): Likewise.
15504         * pt.c (uses_template_parms): Correctly determine whether or not a
15505         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
15506         folding can be done.
15507
15508         * cp-tree.h (grok_enum_decls): Remove type parameter.
15509         * decl.c (grok_enum_decls): Likewise.
15510         * decl2.c (grok_x_components): Call grok_enum_decls
15511         unconditionally, since it will do nothing if there is no
15512         current_local_enum.  Use the new calling sequence.
15513         * pt.c (tsubst_enum): Use the new calling sequence for
15514         grok_enum_decls.
15515
15516         * decl.c (start_function): Make member functions of local classes
15517         in extern inline functions have comdat linkage here...
15518         (grokdeclarator): Rather than here.
15519
15520 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
15521
15522         * pt.c (convert_nontype_argument): Use decl_constant_value.
15523
15524 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
15525
15526         * call.c (add_template_candidate_real): New function.
15527         (add_template_candidate): Use it.
15528         (add_template_conv_candidate): Likewise.
15529         (joust): Pass extra argument to more_specialized.
15530         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
15531         (is_local_class): Remove.
15532         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
15533         * cp-tree.h (is_local_class): Remove.
15534         (perform_array_to_pointer_conversion): Likewise.
15535         (finish_member_template_decl): Add.
15536         (check_explicit_specialization): Return a tree, not an int.
15537         (more_specialized): Take additional argument.
15538         (get_bindings): Likewise.
15539         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
15540         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
15541         (perform_array_to_pointer_conversion): Remove.
15542         * decl.c (saved_scope): Add processing_specialization,
15543         processing_explicit_instantiation fields.
15544         (maybe_push_to_top_level): Save them.
15545         (pop_from_top_level): Restore them.
15546         (grokfndecl): Use new return value from
15547         check_explicit_specialization.
15548         (start_decl): Don't check flag_guiding_decls before pushing
15549         decls.
15550         (cp_finish_decl): Remove previous (bogus) change.
15551         (grok_declarator): Use decl_function_context rather than
15552         is_local_class.
15553         * decl2.c (finish_file): Pass extra argument to get_bindings.
15554         (build_expr_from_tree): Let build_x_component_ref check
15555         validity of arguments rather than doing it here.
15556         * lex.c (cons_up_default_function): Remove code fooling with
15557         processing_specialization, processing_explicit_instantiation
15558         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
15559         * method.c (build_overload_identifier): Mangle local classes in
15560         template functions correctly.
15561         * parse.y (finish_member_template_decl): Move to pt.c.
15562         * pt.c (finish_member_template_decl): Moved here from parse.y.
15563         (print_candidates): New function.
15564         (determine_specialization): Change interface.  Properly look for
15565         most specialized versions of template candidates.
15566         (check_explicit_specialization): Fully process explicit
15567         instantiations.
15568         (push_template_decl): Avoid looking at CLASSTYPE fields in
15569         FUNCTION_DECLS.
15570         (determine_overloaded_function): Remove.
15571         (convert_nontype_argument): Change name from
15572         convert_nontype_parameter.  Use determine_overloaded_function
15573         instead of instantiate_type.
15574         (mangle_class_name_for_template): Handle type contexts as well as
15575         function contexts.
15576         (classtype_mangled_name): Likewise.
15577         (lookup_template_class): Likewise.
15578         (tsubst): Likewise.
15579         (more_specialized): Take explict template arguments as a
15580         parameter.
15581         (most_specialized): Likewise.
15582         (get_bindings): Likewise.  Check that return types match before
15583         proclaiming a function a match.
15584         (do_decl_instantiation): Remove code searching for function to
15585         instantiate; that is now done in check_explicit_specialization.
15586         (add_maybe_template): Pass extra argument to get_bindings.
15587         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
15588         implementation.
15589         * typeck.c (build_component_ref): Check for invalid arguments.
15590
15591 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
15592
15593         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
15594         return_target and call_target are equivalent.
15595
15596         * pt.c (type_unification_real): Just accept function parms that
15597         don't use any template parms.
15598
15599 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
15600
15601         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
15602         unset DECL_NOT_REALLY_EXTERN.
15603
15604         * parse.y (typename_sub*): Fix std::.
15605
15606 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
15607
15608         * error.c (dump_decl): Fix type default template args.
15609         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
15610
15611 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
15612
15613         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
15614         (file_name_nondirectory): Use.
15615
15616 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
15617
15618         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
15619         that are not really present.  Substitute default arguments in
15620         template template arguments.  Correctly convert TEMPLATE_DECL to
15621         TEMPLATE_TEMPLATE_PARM.
15622         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
15623         are no longer treated specially here.
15624         * parse.y (template_template_parm): Fix copy error.
15625         * decl.c (grokdeclarator): Warn about missing `typename' for nested
15626         type created from template template parameters.
15627         * parse.y (bad_parm): Likewise
15628
15629         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
15630         (push_nested_class): Likewise.
15631         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
15632         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
15633         (copy_template_template_parm): Declare.
15634         * decl.c (arg_looking_for_template): New variable.
15635         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
15636         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
15637         node if arg_looking_for_template is nonzero.
15638         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
15639         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
15640         (grokdeclarator): Handle TEMPLATE_DECL.
15641         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
15642         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
15643         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
15644         (dump_decl): Handle unnamed template type parameters.
15645         Handle template template parameters.
15646         (dump_function_name): Handle template template parameters.
15647         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
15648         Handle TEMPLATE_TEMPLATE_PARM.
15649         * method.c (build_template_template_parm_names): New function.
15650         (build_template_parm_names): Handle TEMPLATE_DECL.
15651         (build_overload_nested_name, build_overload_name):
15652         Handle TEMPLATE_TEMPLATE_PARM.
15653         * parse.y (maybe_identifier): New nonterminal.
15654         (template_type_parm): Use it.
15655         (template_template_parm, template_arg1): New nonterminal.
15656         (template_parm): Add template_template_parm rules.
15657         (template_arg): Set processing_template_arg.
15658         (template_arg1): Rules moved from template_arg.
15659         (primary, nonnested_type): Set arg_looking_for_template if we are
15660         processing template arguments.
15661         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
15662         (process_template_parm): Handle template template parameters.
15663         (coerce_template_parms, comp_template_args): Likewise.
15664         (mangle_class_name_for_template, lookup_template_class): Likewise.
15665         (uses_template_parms): Handle TEMPLATE_DECL and
15666         TEMPLATE_TEMPLATE_PARM.
15667         (current_template_args): Handle TEMPLATE_DECL.
15668         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
15669         * search.c (dfs_walk, dfs_record_inheritance):
15670         Handle TEMPLATE_TEMPLATE_PARM.
15671         * tree.c (copy_template_template_parm): New function.
15672         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
15673         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
15674
15675 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
15676
15677         * decl.c (start_decl): Don't allow duplicate definitions of static
15678         data members.
15679
15680         * call.c (build_user_type_conversion_1): Handle user-defined
15681         template conversion operators correctly.
15682
15683         * decl2.c (build_expr_from_tree): Issue an error message if the
15684         object in a COMPONENT_REF is a TEMPLATE_DECL.
15685
15686         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
15687
15688         * class.c (is_local_class): New function.
15689         * cp-tree.h (is_local_class): Declare it.
15690         (last_tree): Likewise.
15691         (begin_tree): Likewise.
15692         (end_tree): Likewise.
15693         (lookup_template_class): Change prototype.
15694         * decl.c (cp_finish_decl): Check for NULL where necessary.
15695         Consider FUNCTION_DECLS to declare objects with top-level binding,
15696         when calling make_decl_rtl.
15697         (grokdeclarator): Give members of local classes internal linkage.
15698         (start_function): Remove declaration of last_tree.
15699         (finish_function): Set flag_keep_inline_functions around call to
15700         rest_of_compilation if we are processing a member function in a
15701         local class.
15702         (start_method): Call push_template_decl for member functions of
15703         local classes in template functions.
15704         * decl2.c (import_export_decl): Don't give external linkage to
15705         instantiations of templates with internal linkage.
15706         * parse.y (last_tree): Remove declaration.
15707         (template_type): Pass extra parameter to lookup_template_class.
15708         (self_template_type): Likewise.
15709         (structsp): Move call to reset_specialization into left_curly.
15710         (left_curly): Call reset_specialization, and begin_tree.
15711         * pt.c (saved_trees): New variable.
15712         (mangle_class_name_for_template): Change prototype.  Use
15713         additional function context to name local classes in templates
15714         correctly.
15715         (classtype_mangled_name): Pass the context.
15716         (push_template_decl): Handle local classes and templates, and
15717         member functions for such classes.
15718         (convert_nontype_parameter): Fix handling of pointer-to-member
15719         constants.
15720         (lookup_template_class): Handle local classes in templates.
15721         (tsubst): Likewise.  Don't assume that template instantiations
15722         have external linkage; pay attention to the template declaration.
15723         (mark_decl_instantiated): Likewise.
15724         (begin_tree): New function.
15725         (end_tree): Likewise.
15726
15727         * decl.c (xref_basetypes): Don't call complete_type for basetypes
15728         that involve template parameters; that can lead to infinite
15729         recursion unnecessarily.
15730
15731         * pt.c (register_specialization): Do not register specializations
15732         that aren't ready to be registered yet.
15733         (check_explicit_specialization): Handle explicit specialization of
15734         constructors and destructors.
15735         (build_template_decl): New function.
15736         (push_template_delc): Handle out-of-class specializations of
15737         member templates.
15738
15739         * pt.c (check_explicit_specialization): Set up the template
15740         information before registering the specialization.
15741         (coerce_template_parms): Fix thinko.
15742         (tsubst): Handle specializations of member templates correctly.
15743
15744         * class.c (finish_struct_methods): Remove calls to
15745         check_explicit_specialization from here.
15746         (finish_struct): And insert them here.
15747         * cp-tree.h (perform_qualification_conversions): New function.
15748         (perform_array_to_pointer_conversion): Likewise.
15749         (begin_explicit_instantiation): Likewise.
15750         (end_explicit_instantiation): Likewise.
15751         (determine_specialization): Renamed from
15752         determine_explicit_specialization.
15753         (comp_template_parms): New function.
15754         (processing_explicit_instantiation): New variable.
15755         * cvt.c (perform_qualification_conversions): New function.
15756         (perform_array_to_pointer_conversion): Likewise.
15757         * decl.c (duplicate_decls): Don't consider template functions
15758         alike unless they have the same parameters.  Refine handling of
15759         instantiation/specialization mismatches.
15760         (start_decl): Don't call pushdecl for template specializations,
15761         since they don't affect overloading.
15762         (start_function): Likewise.
15763         (grokfndecl): Call check_explicit_specialization a little later.
15764         Don't call duplicate_decls for memberm template specializations.
15765         (grokdeclarator): Don't update template_count for classes that are
15766         themselves specializations.  Remove use of `2' as parameter to
15767         grokfndecl since that value isn't used.
15768         * lex.c (cons_up_default_function): Save and restore
15769         processing_explicit_instantiation around calls to grokfield.
15770         * parse.y (finish_member_template_decl): New function.
15771         (component_decl_1): Use it.
15772         (fn.def2): Likewise.
15773         (template_arg_list_opt): New nonterminal.
15774         (template_type): Use it.
15775         (self_template_type): Likewise.
15776         (template_id): Likewise.
15777         (object_template_id): Likewise.
15778         (notype_template_declarator): Likwise.
15779         (begin_explicit_instantiation): Likewise.
15780         (end_explicit_instantiation): Likewise.
15781         (explicit_instantiation): Use them.
15782         * pt.c (coerce_template_parms): Add parameters.
15783         (processing_explicit_instantiation): New variable.
15784         (convert_nontype_parameter): New function.
15785         (determine_overloaded_function): Likewise.
15786         (begin_explicit_instantiation): Likewise.
15787         (end_explicit_instantiation): Likewise.
15788         (retrieve_specialization): Likewise.
15789         (register_specialization): Likewise.
15790         (processing_explicit_specialization): Removed.
15791         (determine_specialization): Handle specializations of member
15792         functions of template class instantiations.
15793         (check_explicit_specialization): Refine to conform to standard.
15794         (comp_template_parms): New function.
15795         (coerce_template_parms): Call convert_nontype_parameter.
15796         (tsubst): Refine handling of member templates.  Use
15797         register_specialization.
15798         (instantiate_template): Use retrieve_specialization.
15799         (do_decl_instantiation): Likewise.
15800         (instantiate_decl): Likewise.
15801         (type_unification): Improve handling of explict template
15802         arguments.
15803         * tree.c (mapcar): Return error_mark_node, rather than aborting,
15804         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
15805         * typeck.c (build_unary_op): Call determine_specialization, rather
15806         than determine_explicit_specialization.
15807
15808 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
15809
15810         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
15811
15812 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15813
15814         * error.c (dump_decl): For enum tags, output the tag, not its value.
15815
15816 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
15817
15818         * decl.c (init_decl_processing): Only call init_rtti_processing
15819         FLAG_RTTI is set.
15820
15821 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
15822
15823         * init.c (build_new_1): Split out from build_new.
15824         (build_new): Just return a NEW_EXPR.
15825         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
15826
15827         * decl2.c (get_temp_regvar): Tweak.
15828
15829         * cp-tree.h (TREE_CALLS_NEW): Comment out.
15830         * class.c (resolves_to_fixed_type_p): Remove use.
15831         * method.c (build_opfncall): Likewise.
15832         * call.c (build_new_op): Likewise.
15833
15834 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
15835
15836         * exception.cc (__eh_alloc, __eh_free): New fns.
15837         (__cp_push_exception, __cp_pop_exception): Use them.
15838         (__uncatch_exception): Call terminate here if no exception.
15839         * except.c (build_terminate_handler): New fn.
15840         (expand_start_catch_block): Use it.
15841         (expand_exception_blocks): Likewise.
15842         (alloc_eh_object): New fn.
15843         (expand_throw): Use it.  Protect exception init with terminate.
15844         * typeck.c (build_modify_expr): Remove code that ignores trivial
15845         methods.
15846
15847 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15848
15849         * call.c (add_builtin_candidate): Add default case in enumeration
15850         switch.
15851         (build_new_op): Likewise.
15852         (convert_like): Likewise.
15853         * cvt.c (build_expr_type_conversion): Likewise.
15854         * tree.c (real_lvalue_p): Likewise.
15855         (lvalue_p): Likewise.
15856         (cp_tree_equal): Likewise.
15857         * typeck.c (comptypes): Likewise.
15858         (build_component_ref): Likewise.
15859         (build_function_call_real): Likewise.
15860         (build_binary_op_nodefault): Likewise.
15861         (build_unary_op): Likewise.
15862         (build_modify_expr): Likewise.
15863         * typeck2.c (initializer_constant_valid_p): Likewise.
15864
15865 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
15866
15867         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
15868
15869 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
15870
15871         * pt.c (coerce_template_parms): Make sure to digest_init if
15872         possible.
15873
15874         * decl.c (duplicate_decls): Make the newdecl virtual if the
15875         olddecl was, just as is done with other attributes of olddecl.
15876
15877 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
15878
15879         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
15880         address of an OFFSET_REF.
15881
15882         * cp-tree.def: Add AGGR_INIT_EXPR.
15883         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
15884         AGGR_INIT_EXPR where appropriate.
15885         * expr.c (cplus_expand_expr): Likewise.  Simplify.
15886
15887         * decl2.c (finish_file): Remove call to register_exception_table.
15888
15889 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15890
15891         * pt.c (instantiate_class_template): Don't do injection when
15892         processing_template_decl is true, as pollutes current_binding_level
15893         for base classes.
15894
15895 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
15896
15897         * pt.c (maybe_fold_nontype_arg): Add prototype.
15898
15899 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15900
15901         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
15902         * error.c (dump_expr): Likewise.
15903
15904 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
15905
15906         * typeck.c (build_function_call_real): Remove "inline called before
15907         definition" pedwarn.
15908
15909         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
15910
15911 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15912
15913         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
15914
15915         * pt.c (type_unification_real): Change __null to type void* with
15916         a warning.
15917
15918 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
15919
15920         * call.c (implicit_conversion): Don't call
15921         build_user_type_conversion_1 with a NULL expr, since it will
15922         crash.
15923
15924         * pt.c (unify): Don't try to unify array bounds if either array is
15925         unbounded.
15926
15927 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15928
15929         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
15930         Replace extern decls with casts.
15931
15932         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
15933         Update last_parm_cleanup_insn.
15934         (store_after_parms): Remove.
15935         * cp-tree.h: Adjust.
15936
15937 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
15938
15939         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
15940         (finish_file): Check DECL_COMDAT instead of weak|one_only.
15941         (import_export_vtable): Use make_decl_one_only instead of
15942         comdat_linkage for win32 tweak.
15943         (import_export_decl): Likewise.
15944         * pt.c (mark_decl_instantiated): Likewise.
15945
15946         * decl2.c (finish_file): Lose handling of templates in pending_statics.
15947
15948 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
15949
15950         * decl2.c (finish_file): Lose call to expand_builtin_throw.
15951         * except.c (expand_builtin_throw): Remove.
15952         * cp-tree.h: Remove ptr_ptr_type_node.
15953         * decl.c: Likewise.
15954
15955 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
15956
15957         * decl.c (ptr_ptr_type_node): Define.
15958         (init_decl_processing): Initialize it.
15959         * cp-tree.h: Declare it.
15960         * exception.cc (__cp_exception_info): Use __get_eh_info.
15961         (__cp_push_exception): Likewise.
15962         (__cp_pop_exception): Likewise.
15963
15964         From Scott Snyder <snyder@d0sgif.fnal.gov>:
15965         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
15966         saved_pc.
15967         (init_exception_processing): Removed saved_pc initialization.
15968
15969 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
15970
15971         * pt.c (instantiate_decl): Defer all templates but inline functions.
15972
15973 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
15974
15975         * init.c (expand_vec_init): Don't fold a list of parameters.
15976
15977         * decl.c (copy_args_p): Handle copy elision for types with virtual
15978         bases.
15979         * call.c (build_over_call): Likewise.
15980
15981 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
15982
15983         * pt.c (lookup_template_function): Copy the template arguments,
15984         not just the list containing them, to the permanent obstack.
15985
15986 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
15987
15988         * except.c (expand_start_catch_block): suspend_momentary for the
15989         terminate handler.
15990
15991         * error.c (dump_decl): Handle LOOKUP_EXPR.
15992
15993 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
15994
15995         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
15996         permanent obstack if we are processing a template decl.
15997         * typeck.c (build_static_cast): Likewise.
15998         (build_const_cast): Likewise.
15999         (build_reinterpret_cast): Likewise.
16000
16001         * pt.c (coerce_template_parms): Coerce some expressions, even
16002         when processing_template_decl.
16003
16004 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16005
16006         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
16007         handling of pointer difference expressions.
16008
16009         * typeck.c (comp_target_types): Comparison of function/method types
16010         is independent of nptrs.
16011
16012 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
16013
16014         * pt.c (tsubst): Avoid creating pointer to reference and
16015         reference to reference types.
16016
16017 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
16018
16019         * parse.y (do_id): New nonterminal.
16020         (template_id): Use it.
16021
16022 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
16023
16024         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
16025         * spew.c (yylex): Don't do_identifier here.
16026         * decl2.c (build_expr_from_tree): Revert last change.
16027
16028         * decl2.c (build_expr_from_tree): Expand the name for a method call.
16029         * parse.y (object_template_id): Don't try to take the DECL_NAME.
16030
16031 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
16032
16033         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
16034         alloc_expr.
16035         * call.c (build_op_delete_call): Adjust.
16036
16037         * except.c (expand_end_catch_block): Lose rethrow region.
16038         (expand_start_catch_block): Likewise.
16039         (expand_end_catch_block): Don't expand_leftover_cleanups.
16040
16041 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16042
16043         * pt.c (tsubst): Remove tree_cons call (places redundant info into
16044         DECL_TEMPLATE_INSTANTIATION).
16045
16046 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
16047
16048         * tree.c (is_overloaded_fn): Handle getting a fn template.
16049         (really_overloaded_fn): Likewise.
16050         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
16051         * pt.c (check_explicit_specialization): Tweak.
16052         (determine_explicit_specialization): Tweak.
16053
16054         * tree.c, cp-tree.h (get_target_expr): New fn.
16055
16056 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
16057
16058         * pt.c (check_explicit_specialization): Fix misspelling in
16059         diagnostic: `preceeded'.
16060         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
16061         `conversiona'.
16062
16063 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
16064
16065         * pt.c (determine_explicit_specialization): Avoid an internal
16066         error for bad specializations.
16067
16068         * method.c (build_overload_value): Handle SCOPE_REF.
16069
16070 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
16071
16072         * class.c (prepare_fresh_vtable): Enable even more complex MI
16073         vtable names.
16074
16075 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
16076
16077         * exception.cc (__check_eh_spec): Optimize a bit.
16078
16079         * exception.cc (__cp_pop_exception): Lose handler arg.
16080         * except.c (do_pop_exception): Likewise.
16081         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
16082         (expand_end_catch_block): Likewise.
16083
16084 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
16085
16086         * pt.c (check_explicit_specialization): Complain about using a
16087         template-id for a non-specialization.
16088
16089 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
16090
16091         * repo.c: Prototype rindex only if needed.
16092         * xref.c: Likewise.
16093
16094 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16095
16096         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
16097
16098 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
16099
16100         * typeck.c (build_const_cast): Handle references here instead of
16101         handing off to convert_to_reference.
16102
16103         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
16104         TerminateFunctionCall.
16105         (init_exception_processing): Likewise.  Terminate et al are now
16106         the fns, not ADDR_EXPRs.
16107         (various): Lose redundant assemble_external calls.
16108         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
16109
16110         * cp-tree.h (struct lang_decl_flags): Add comdat.
16111         (DECL_COMDAT): New macro.
16112         * decl.c (duplicate_decls): Propagate it.
16113         (cp_finish_decl): Handle it.
16114         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
16115
16116         * class.c: Remove static pending_hard_virtuals.
16117         (add_virtual_function): Take pointers to pending_virtuals
16118         and pending_hard_virtuals.
16119         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
16120
16121 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
16122
16123         * decl2.c (import_export_vtable): If we support one_only but not
16124         weak symbols, mark instantiated template vtables one_only.
16125         (import_export_decl): Likewise for tinfo functions.
16126         (finish_vtable_vardecl): Also write out vtables from explicitly
16127         instantiated template classes.
16128         * pt.c (mark_class_instantiated): Revert last change.
16129
16130         * except.c (expand_throw): Call mark_used on the destructor.
16131
16132 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
16133
16134         * lex.c (lang_init): Enable flag_exceptions by default if no
16135         command line switch was specified.
16136
16137 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
16138
16139         * pt.c (unify): Handle `void' template parameters in
16140         specializations.
16141
16142 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
16143
16144         * rtti.c (build_dynamic_cast): Handle template case here.
16145         (build_dynamic_cast_1): Not here.
16146
16147         * typeck2.c (digest_init): Make copies where appropriate.
16148
16149         * decl2.c (delete_sanity): resolve_offset_ref.
16150
16151         * except.c: Call terminate without caching so many bits.
16152
16153         * except.c (expand_start_catch_block): Fix catching a reference
16154         to pointer.
16155
16156 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
16157
16158         * init.c (build_new): Copy size to the saveable obstack.
16159
16160         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
16161         TRY_CATCH_EXPR for now.
16162
16163 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
16164
16165         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
16166         has DECL_LANG_SPECIFIC.
16167
16168         * exception.cc (struct cp_eh_info): Add handlers field.
16169         (__cp_push_exception): Initialize it.
16170         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
16171         (__throw_bad_exception): Remove.
16172         * except.c (call_eh_info): Add handlers field.
16173         (get_eh_handlers): New fn.
16174         (push_eh_cleanup): Increment handlers.
16175
16176 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
16177
16178         * except.c (expand_start_eh_spec): Use the try/catch code.
16179         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
16180         doing everything inline.
16181         (init_exception_processing): throw_type_match now takes
16182         const void pointers.
16183         * exception.cc (__check_eh_spec): New fn.
16184         * inc/exception: Neither terminate nor unexpected return.
16185         * decl.c: Make const_ptr_type_node public.
16186         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
16187
16188         * except.c (expand_start_catch_block): We only need the rethrow
16189         region for non-sjlj exceptions.
16190         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
16191
16192 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
16193
16194         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
16195         (various.o): Likewise.
16196         * inc/new: Add placement deletes.  Add throw specs for default new.
16197         * new.cc (set_new_handler): Move here from libgcc2.
16198         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
16199         (new): Move from libgcc2.  Throw bad_alloc.
16200         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
16201         * decl.c (init_decl_processing): Update exception specs on new and
16202         delete.
16203
16204         * method.c (build_decl_overload_real): Don't mess with global
16205         placement delete.
16206
16207         * init.c (build_new): Check for null throw spec, not nothrow_t.
16208
16209         * decl.c (duplicate_decls): Don't complain about different exceptions
16210         from an internal declaration.
16211
16212         * call.c (build_op_delete_call): Fix check for member fns again.
16213
16214         * decl2.c (import_export_decl): Interface hackery affects
16215         virtual synthesized methods.
16216
16217 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
16218
16219         * decl.c (start_decl): Don't just complain about a mismatched
16220         scope, fix it.
16221
16222         * decl.c (make_implicit_typename): Handle case where t is not
16223         actually from context.
16224         * tree.c (get_type_decl): Lose identifier case.
16225         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
16226         * parse.y (nonnested_type): Just use lookup_name.
16227         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
16228
16229 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
16230
16231         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
16232         T was built in C language context (for example, by
16233         output_func_start_profiler).
16234
16235 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
16236
16237         * decl.c (make_implicit_typename): New fn.
16238         (lookup_name_real): Use it.  Use current_class_type as the context.
16239
16240 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
16241
16242         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
16243
16244 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
16245
16246         * friend.c (do_friend): Warn about non-template friends in templates.
16247
16248         * call.c (build_op_delete_call): Fix handling of inherited delete.
16249
16250         * search.c (dfs_record_inheritance): Ignore template type parms.
16251
16252 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
16253
16254         * call.c (build_new_op): Fix copy error.
16255         (build_op_new_call): New fn.
16256         (build_op_delete_call): New fn.
16257         * cp-tree.h: Declare them.
16258         * init.c (build_new): Use them.  Support placement delete.
16259         (build_x_delete): Use build_op_delete_call.
16260         (build_delete): Likewise.
16261         * decl2.c (delete_sanity): Likewise.
16262         (coerce_delete_type): Don't complain about placement delete.
16263
16264 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16265
16266         * call.c (build_new_function_call): Remove unused 'obj' parm.
16267         * cp-tree.h, typeck.c: Adjust.
16268
16269         * init.c (build_new): Make the cleanup last longer.
16270         (expand_vec_init): Call do_pending_stack_adjust.
16271
16272 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
16273
16274         * pt.c (do_type_instantiation): Fix typo.
16275         (mark_class_instantiated): If we support one_only but not weak
16276         symbols, don't mark this as known.
16277
16278         * init.c (build_new): Handle vec delete in EH cleanup.
16279
16280 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16281
16282         * call.c (build_method_call): Call complete_type before checking
16283         for destructor.
16284
16285 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
16286
16287         * decl.c (add_block_current_level): Delete.
16288         * init.c (build_vec_delete_1): Delete build_block and
16289         add_block_current_level calls.
16290
16291 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
16292
16293         * init.c (build_new): Handle freeing allocated memory when the
16294         constructor throws.
16295
16296         * call.c (build_new_method_call): Fix flags arg.
16297
16298         * pt.c (do_type_instantiation): Don't try to instantiate
16299         member templates.
16300         (mark_decl_instantiated): If we support one_only but not
16301         weak symbols, mark this one_only.
16302         * decl2.c (import_export_vtable): Don't defer handling of vtables
16303         if MULTIPLE_SYMBOL_SPACES.
16304
16305 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
16306
16307         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
16308
16309 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
16310
16311         * except.c (do_pop_exception): Return a value.
16312
16313 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
16314
16315         * call.c (build_new_method_call): Handle getting a
16316         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
16317         if we got template parms.
16318         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
16319         not just the args.
16320         * decl2.c (build_expr_from_tree): Tweak last change.
16321         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
16322         (maybe_fold_nontype_arg): Split out from tsubst_copy.
16323         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
16324
16325 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
16326
16327         * pt.c (tsubst_copy): Handle explicit template arguments in
16328         function calls.
16329         * typeck.c (build_x_function_call): Likewise.
16330         * decl2.c (build_expr_from_tree): Lookup function name if it
16331         hasn't been done.
16332
16333         * pt.c (tsubst): Instantiate template functions properly when
16334         template parameter does not appear in function arguments and return
16335         type.
16336         (comp_template_args): Handle member templates required by tsubst.
16337
16338 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
16339
16340         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
16341         previous change.
16342
16343 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16344
16345         * pt.c (coerce_template_parms): Tweak error message.
16346
16347         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
16348         return type defaults to `int', even if there are storage-class
16349         specifiers.
16350
16351 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
16352
16353         Complete nested exception support.
16354         * except.c (do_pop_exception): Split out...
16355         (push_eh_cleanup): From here.  Handle the EH region by hand.
16356         (expand_start_catch_block): Add a new level for the catch parm.
16357         Move the rethrow region outside the two cleanup regions.
16358         Protect the initializer for the catch parm with terminate.
16359         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
16360         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
16361         popping off the middle of the stack.
16362         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
16363         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
16364         (build_cplus_new): Only wrap CALL_EXPRs.
16365         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
16366         the constructor call.
16367
16368 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16369
16370         * Make-lang.in (c++.distdir): Make inc subdirectory.
16371
16372 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
16373
16374         * decl2.c (finish_file): Put back some code.
16375
16376 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
16377
16378         * decl2.c (finish_file): Remove redundant code.
16379         * method.c (emit_thunk): Don't let the backend defer generic thunks.
16380
16381 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
16382
16383         * except.c (call_eh_info): Split out...
16384         (push_eh_info): From here.
16385         (expand_builtin_throw): Use it.
16386         (expand_start_catch_block): Move region start back.
16387
16388 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
16389
16390         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
16391         (real_yylex): Record wide strings using target endianness, not host.
16392
16393 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
16394
16395         * repo.c (rindex): Add decl unconditionally.
16396         (get_base_filename, open_repo_file): Don't cast rindex.
16397         * xref.c (rindex): Add decl unconditionally.
16398         (index): Remove unused decl.
16399         (open_xref_file): Don't cast rindex.
16400
16401 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
16402
16403         * class.c (build_vbase_path): Propagate the result type properly.
16404
16405 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
16406
16407         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
16408         remaining use of saved_throw_type with a call to get_eh_type.
16409
16410 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
16411
16412         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
16413         (file_name_nondirectory): New function, doing the same as the macro.
16414         (set_typedecl_interface_info): Use it instead of the macro.
16415         (check_newline): Likewise.
16416         (handle_cp_pragma): Likewise.
16417
16418         * repo.c (get_base_filename): Cast result of rindex to char*.
16419         (open_repo_file): Likewise.
16420         * xref.c (open_xref_file): Likewise.
16421         * error.c (dump_char): Make its arg int, not char.
16422
16423         * except.c (push_eh_info): Pass the number of fields - 1 down, not
16424         the exact number of fields.
16425
16426 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
16427
16428         Support for nested exceptions.
16429         * tinfo2.cc (__is_pointer): New fn.
16430         * exception.cc (struct cp_eh_info): Define.
16431         (__cp_exception_info, __uncatch_exception): New fns.
16432         (__cp_push_exception, __cp_pop_exception): New fns.
16433         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
16434         Lose empty_fndecl.
16435         (init_exception_processing): Likewise.  __eh_pc is now external.
16436         (push_eh_info): New fn.
16437         (get_eh_{info,value,type,caught}): New fns.
16438         (push_eh_cleanup): Just call __cp_pop_exception.
16439         (expand_start_catch_block): Use push_eh_info.  Start the eh region
16440         sooner.
16441         (expand_end_eh_spec): Use push_eh_info.
16442         (expand_throw): Call __cp_push_exception to set up the exception info.
16443         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
16444         when we rethrow.
16445         (expand_builtin_throw): Don't refer to empty_fndecl.
16446
16447 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
16448
16449         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
16450
16451 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
16452
16453         * method.c (build_template_parm_names, build_decl_overload_real):
16454         Add static to definitions.
16455         * pt.c (add_to_template_args, note_template_header,
16456         processing_explicit_specialization, type_unification_real): Likewise.
16457         ({determine,check}_explicit_specialization): Use a single string for
16458         error messages.
16459
16460 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
16461
16462         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
16463         (expand_end_catch_block): Likewise.
16464         (expand_end_eh_spec): Likewise.
16465
16466 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
16467
16468         * decl.c (duplicate_decls): Handle template specializations
16469         correctly.
16470         * error.c (dump_function_name): Fix printing of specializations of
16471         member functions that are not member templates.
16472         * cp-tree.h (processing_specialization): Make global.
16473         * pt.c (processing_specialization): Likewise.
16474         * lex.c (cons_up_default_function): Save and restore
16475         processing_specialization to avoid confusion.
16476
16477 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
16478
16479         * decl.c (init_decl_processing): Give null_node unknown* type.
16480         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
16481         (common_type): Likewise.
16482         * error.c (args_as_string): Recognize null_node.
16483
16484 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16485
16486         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
16487         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
16488
16489         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
16490
16491         * Make-lang.in (g++): Include prefix.o.
16492
16493 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
16494
16495         * pt.c (determine_explicit_specialization): Initialize "dummy"
16496         to keep Purify quiet.
16497
16498 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
16499
16500         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
16501         (build_overload_int): Not here.
16502
16503 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
16504
16505         * class.c (build_type_pathname): Remove.
16506         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
16507
16508 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
16509
16510         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
16511         &&label GNU extension.
16512
16513 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
16514
16515         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
16516         so as to avoid incorrect manglings.
16517         * method.c (build_decl_overload_real): Don't mangle return types
16518         for constructors.
16519
16520 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
16521
16522         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
16523         scratch_tree_cons): Define as macros for now.
16524         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
16525         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
16526         typeck2.c: Use them and the expression_obstack variants.
16527
16528 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16529
16530         * decl.c (store_return_init): Allow classes with explicit ctors to
16531         be used with the named return values extension.
16532
16533 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
16534
16535         * pt.c (instantiate_decl): Fix previous change.
16536
16537 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
16538
16539         * pt.c (tsubst): Fix thinko.
16540         (instantiate_decl): Really use the original template.
16541
16542         * call.c (build_new_method_call): Use simple constructor_name for
16543         error messages.
16544
16545 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
16546
16547         * method.c (build_underscore_int): Don't use ANSI specific
16548         features.
16549
16550 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
16551
16552         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
16553         for our key method; it might have been inlined by -O3.
16554
16555 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
16556
16557         * decl.c (make_typename_type): Do not try to call lookup_field for
16558         non-aggregate types.
16559
16560 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
16561
16562         * typeck.c (build_reinterpret_cast): Tweak.
16563
16564 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
16565
16566         * typeck.c (build_reinterpret_cast): Converting a void pointer
16567         to function pointer with a reinterpret_cast produces a warning
16568         if -pedantic is issued.
16569
16570 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16571
16572         * typeck.c (c_expand_return): Don't warn about returning a
16573         reference-type variable as a reference.
16574
16575 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
16576
16577         * method.c (build_static_name): Fix typo.
16578
16579 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
16580
16581         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
16582         OLDDECL before we try to do DECL_USE_TEMPLATE.
16583
16584 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16585
16586         * decl.c (duplicate_decls): Don't warn about template instances.
16587
16588         * typeck.c (mark_addressable): Lose ancient code that unsets
16589         DECL_EXTERNAL.
16590
16591         * pt.c (do_decl_instantiation): Lose support for instantiating
16592         non-templates.
16593
16594         * call.c (build_new_function_call): Fix handling of null explicit
16595         template args.
16596         (build_new_method_call): Likewise.
16597
16598 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
16599
16600         * method.c (build_underscore_int): Fix typo.
16601
16602 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
16603
16604         * tree.c (print_lang_statistics): #if 0 call to
16605         print_inline_obstack_statistics until its definition is checked in.
16606
16607 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
16608
16609         * decl2.c (finish_file): Move dump_tree_statistics to end.
16610
16611         * pt.c (instantiate_decl): Look for the original template.
16612         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
16613         of member templates.
16614
16615 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
16616
16617         * Makefile.in (g++FAQ.*): New rules.
16618         (CONFLICTS): Update.
16619         * g++FAQ.texi: Moved from libg++.
16620
16621         * parse.y (PFUNCNAME): Only specify the type once.
16622
16623 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
16624
16625         * lex.c (real_yylex): Clean up the code to fully behave the way
16626         the c-lex.c parser does for complex and real numbers.
16627
16628 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16629
16630         * method.c (build_decl_overload_real): Reformat.
16631
16632 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
16633
16634         * method.c (synthesize_method): If at_eof, determine our linkage.
16635
16636 1997-09-29  Paul Eggert  <eggert@twinsun.com>
16637
16638         * lex.c (real_yylex): Treat `$' just like `_', except issue a
16639         diagnostic if !dollars_in_ident or if pedantic.
16640
16641         * lang-specs.h (@c++): -ansi no longer implies -$.
16642
16643         * decl2.c (lang_decode_option):
16644         -traditional and -ansi now do not mess with
16645         dollars_in_ident.
16646
16647 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
16648
16649         * Makefile.in (parse.o, decl.o): Also depend on
16650         $(srcdir)/../except.h $(srcdir)/../output.h.
16651         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
16652         $(srcdir)/../except.h $(srcdir)/../output.h.
16653         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
16654         ../insn-codes.h.
16655
16656         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
16657
16658         * expr.c (cplus_expand_expr): Make it static.
16659
16660         * decl2.c, init.c, typeck.c: Include "expr.h".
16661         (expand_expr): Use proper values when calling the function.
16662
16663 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
16664
16665         * lang-options.h: New -Wold-style-cast flag.
16666         * cp-tree.h (warn_old_style_cast): New variable.
16667         * decl2.c (warn_old_style_cast): Likewise.
16668         (lang_decode_option): Support -Wold-style-cast.
16669         (reparse_absdcl_as_casts): Produce old-style-cast warning.
16670
16671 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16672
16673         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
16674         TREE_USED, reset value based on already_used.
16675
16676         * init.c (expand_member_init): Revert change.
16677
16678 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
16679
16680         * cp-tree.h, decl.c, decl2.c, pt.c:
16681         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
16682
16683         * decl2.c (lang_decode_option): Add missing ;.
16684
16685 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
16686
16687         * friend.c (do_friend): Disable injection for all template-derived
16688         decls.
16689         * decl2.c (lang_decode_option): Handle -fguiding-decls.
16690         * parse.y (notype_template_declarator): New nonterminal.
16691         (direct_notype_declarator): Use it.
16692         (complex_direct_notype_declarator): Likewise.
16693         (object_template_id): Accept any kind of identifier after TEMPLATE.
16694         (notype_qualified_id): Don't add template declarators here.
16695
16696 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
16697
16698         * call.c (add_template_candidate): Add explicit_targs parameter.
16699         (build_scoped_method_call): Use it.
16700         (build_overload_call_real): Likewise.
16701         (build_user_type_conversion_1): Likewise.
16702         (build_new_function_call): Likewise.
16703         (build_object_call): Likewise.
16704         (build_new_op): Likewise.
16705         (build_new_method_call): Likewise.
16706         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
16707         (build_new_method_call): Likewise.
16708
16709         * class.c (finish_struct_methods): Add specialization pass to
16710         determine which methods were specializing which other methods.
16711         (instantiate_type): Handle TEMPLATE_ID_EXPR.
16712
16713         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
16714
16715         * cp-tree.h (name_mangling_version): New variable.
16716         (flag_guiding_decls): Likewise.
16717         (build_template_decl_overload): New function.
16718         (begin_specialization): Likewise.
16719         (reset_specialization): Likewise.
16720         (end_specialization): Likewise.
16721         (determine_explicit_specialization): Likewise.
16722         (check_explicit_specialization): Likewise.
16723         (lookup_template_function): Likewise.
16724         (fn_type_unification): Add explicit_targs parameter.
16725         (type_unification): Likewise.
16726
16727         * decl.c (duplicate_decls): Add smarts for explicit
16728         specializations.
16729         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
16730         specializations.
16731         (grokfndecl): Call check_explicit_specialization.
16732
16733         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
16734         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
16735         (check_classfn): Handle specializations.
16736
16737         * error.c (dump_function_name): Print specialization arguments.
16738
16739         * friend.c (do_friend): Don't call pushdecl for template
16740         instantiations.
16741
16742         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
16743
16744         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
16745         and -fno-guiding-decls.
16746
16747         * lex.c (identifier_type): Return PFUNCNAME for template function
16748         names.
16749
16750         * method.c (build_decl_overload_real): New function.
16751         (build_template_parm_names): New function.
16752         (build_overload_identifier): Use it.
16753         (build_underscore_int): New function.
16754         (build_overload_int): Use it.  Add levels for template
16755         parameters.
16756         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
16757         (build_overload_nested_names): Handle template type parameters.
16758         (build_template_decl_overload): New function.
16759
16760         * parse.y (YYSTYPE): New ntype member.
16761         (nested_name_specifier): Use it.
16762         (nested_name_specifier_1): Likewise.
16763         (PFUNCNAME): New token.
16764         (template_id, object_template_id): New non-terminals.
16765         (template_parm_list): Note specializations.
16766         (template_def): Likewise.
16767         (structsp): Likewise.
16768         (fn.def2): Handle member template specializations.
16769         (component_decl_1): Likewise.
16770         (direct_notype_declarator): Handle template-ids.
16771         (component_decl_1): Likewise.
16772         (direct_notype_declarator): Handle template-ids.
16773         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
16774
16775         * pt.c (processing_specializations): New variable.
16776         (template_header_count): Likewise.
16777         (type_unification_real): New function.
16778         (processing_explicit_specialization): Likewise.
16779         (note_template_header): Likewise.
16780         (is_member_template): Handle specializations.
16781         (end_template_decl): Call reset_specialization.
16782         (push_template_decl): Handle member template specializations.
16783         (tsubst): Likewise.
16784         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
16785         (instantiate_template): Handle specializations.
16786         (instantiate_decl): Likewise.
16787         (fn_type_unification): Handle explicit_targs.
16788         (type_unification): Likewise.  Allow incomplete unification
16789         without an error message, if allow_incomplete.
16790         (get_bindings): Use new calling sequence for fn_type_unification.
16791
16792         * spew.c (yylex): Handle PFUNCNAME.
16793
16794         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
16795         (really_overloaded_fn): Likewise.
16796         (get_first_fn): Handle function templates.
16797
16798         * typeck.c (build_x_function_call): Use really_overloaded_fn.
16799         Handle TEMPLATE_ID_EXPR.
16800         (build_x_unary_op): Likewise.
16801         (build_unary_op): Likewise.
16802         (mark_addressable): Templates whose address is taken are marked
16803         as used.
16804
16805 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16806
16807         * decl.c (init_decl_processing): Declare __builtin_constant_p as
16808         accepting any kind of type, not only int.
16809
16810 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
16811
16812         * search.c (get_matching_virtual): Notice virtual bases when sorrying
16813         about covariant returns.
16814
16815         * parse.y (member_init): Also imply typename here.  Remove ancient
16816         extension for initializing base members.
16817
16818 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
16819
16820         Handle multi-level typenames and implicit typename in base list.
16821         * parse.y (typename_sub{,[0-2]}): New rules.
16822         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
16823         (nonnested_type): New rule.
16824         (complete_type_name): Use it.
16825         (base_class.1): Use typename_sub and nonnested_type.
16826         (nested_name_specifier): Don't elide std:: here.
16827         * decl.c (make_typename_type): Handle getting a type for NAME.
16828         (lookup_name_real): Turn std:: into :: here.
16829
16830         Rvalue conversions were removed in London.
16831         * call.c (is_subseq): Don't consider lvalue transformations.
16832         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
16833         (joust): Re-enable ?: kludge.
16834
16835 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
16836
16837         * decl.c (start_function): Up warning of no return type to be a
16838         pedwarn.
16839
16840 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16841
16842         * init.c (expand_member_init): Don't set TREE_USED.
16843         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
16844         set,don't clear TREE_USED wholesale.
16845
16846 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
16847
16848         * call.c (build_over_call): Do require_complete_type before
16849         build_cplus_new.
16850
16851 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
16852
16853         * search.c (lookup_field): Call complete_type in all cases.
16854
16855         * decl.c (finish_function): Just warn about flowing off the end.
16856
16857 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16858
16859         * decl.c (grokparms): Don't bash a permanent list node if we're
16860         in a function.
16861
16862 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
16863
16864         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
16865
16866 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
16867
16868         * call.c (build_new_op): Give better error for syntactically
16869         correct, but semantically invalid, use of undeclared template.
16870
16871         * call.c (compare_qual): Handle pmfs.
16872
16873         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
16874         after the exception spec.
16875
16876 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
16877
16878         * call.c (null_ptr_cst_p): Integer type, not integral type.
16879
16880         * call.c (joust): Disable warnings until they can be moved to the
16881         right place.
16882
16883 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
16884
16885         * Makefile.in, config-lang.in:  Convert to autoconf.
16886
16887 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
16888
16889         * decl.c (lookup_name_real): Add implicit 'typename' to types from
16890         base classes.
16891
16892         * pt.c (most_specialized_class): Fix typo.
16893         (tsubst): Move constant folding to TREE_VEC case.
16894
16895 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
16896
16897         * pt.c (do_poplevel): Don't warn about unused local variables
16898         while processing_template_decl since we don't always know whether
16899         or not they will need constructing/destructing.
16900
16901         * pt.c (uses_template_parms): Check the values of an enumeration
16902         type to make sure they don't depend on template parms.
16903
16904         * decl.c (make_typename_type): Don't lookup the field if the
16905         context uses template parms, even if we're not
16906         processing_template_decl at the moment.
16907
16908         * pt.c (coerce_template_parms): Avoid looking at the
16909         TYPE_LANG_DECL portion of a typename type, since there won't be
16910         one.
16911         (tsubst): Do constant folding as necessary to make sure that
16912         arguments passed to lookup_template_class really are constants.
16913
16914 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
16915
16916         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
16917         * decl2.c (finish_file): Only register exception tables if we
16918         need to.
16919
16920         * decl.c (init_decl_processing): Add __builtin_[fs]p.
16921
16922 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
16923
16924         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
16925
16926 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
16927
16928         * error.c (dump_decl): Avoid crashing when presented with a
16929         uninitialized constant, as can occur with a template parameter.
16930         (dump_expr): Make sure that there are enough levels of
16931         current_template_parms before we start diving through them.
16932
16933 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
16934
16935         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
16936         c-typeck.c.
16937
16938 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16939
16940         * except.c (expand_throw): Call build_delete for all
16941         exception types, not just objects with destructors.
16942
16943 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
16944
16945         * decl.c (current_local_enum): Remove static.
16946         * pt.c (tsubst_enum): Save and restore value of current_local_enum
16947         in case template is expanded in enum decl.
16948         (instantiate_class_template): Use new tsubst_enum signature.
16949         (tsubst_expr): Likewise.
16950
16951 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
16952
16953         * pt.c (begin_member_template_processing): Take a function as
16954         argument, not a set of template arguments.  Use the template
16955         parameters, rather than the arguments.  Handle non-type parameters
16956         correctly.  Push a binding level for the parameters so that multiple
16957         member templates using the same parameter names can be declared.
16958         (end_member_template_processing): Pop the binding level.
16959         (push_template_decl): Mark member templates as static when
16960         appropriate.
16961
16962         * lex.c (do_pending_inlines): Pass the function, not its template
16963         arguments, to begin_member_template_processing.
16964         (process_next_inline): Likewise.
16965         (do_pending_defargs): Likewise.
16966
16967         * error.c (dump_expr): Obtain the correct declaration for a
16968         TEMPLATE_CONST_PARM.
16969
16970         * call.c (add_template_conv_candidate): New function.
16971         (build_object_call): Handle member templates, as done in the other
16972         build_ functions.
16973
16974 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
16975
16976         * decl.c (replace_defag): Undo previous change.
16977         * lex.c (do_pending_defargs): Deal with member templates.
16978
16979         * pt.c (is_member_template): Avoid crashing when passed a
16980         non-function argument.
16981
16982 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
16983
16984         * class.c (grow_method): Remove check for redeclaration.
16985
16986 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
16987
16988         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
16989         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
16990         (PRIMARY_TEMPLATE_P): Use it.
16991         * call.c (build_overload_call_real): Use it.
16992         * class.c (instantiate_type): Likewise.
16993         * decl.c (decls_match): Likewise.
16994         * method.c (build_overload_identifier): Likewise.
16995         * pt.c (push_template_decl): Likewise.
16996         (classtype_mangled_name): Likewise.
16997         (lookup_template_class): Likewise.
16998
16999         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
17000         DECL_NTPARMS to conform to usage elsewhere.
17001         * call.c (add_template_candidate): Likewise.
17002         * class.c (instantiate_type): Likewise.
17003         * pt.c (instantiate_template): Likewise.
17004         (get_bindings): Likewise.
17005
17006         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
17007         is_member_template.
17008
17009         * pt.c (unify): Undo changes to allow multiple levels of template
17010         parameters.
17011         (type_unification): Likewise.
17012         (fn_type_unification): Likewise.
17013         (get_class_bindings): Likewise.
17014         * cp-tree.h (Likewise).
17015
17016         * decl.c (replace_defarg): Check that the type of the default
17017         parameter does not invlove a template type before complaining
17018         about the initialization.
17019
17020         * error.c (dump_expr): Deal with template constant parameters in
17021         member templates correctly.
17022
17023         * pt.c (is_member_template): Deal with class specializations
17024         correctly.
17025         (tsubst): Handle "partial instantiation" of member templates
17026         correctly.
17027
17028 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
17029
17030         * pt.c (type_unification): Change calling sequence to allow for
17031         multiple levels of template parameters.
17032         (tsubst_expr): Likewise.
17033         (tsubst): Likewise.
17034         (tsubst_copy): Likewise.
17035         (instantiate_template): Likewise.
17036         (unify): Likewise.
17037         * call.c (build_overload_call_real): Use it.
17038         (add_builtin_candidate): Use it.
17039         (build_new_method_call): Use it.
17040         * class.c (instantiate_type): Use it.
17041         * decl.c (grokdeclarator): Use it.
17042         * decl2.c (finish_file): Use it.
17043         * method.c (build_overload_identifier): Use it.
17044
17045         * call.c (add_template_candidate):  Add additional parameter for
17046         the function return type.  Call fn_type_unification istead of
17047         type_unification.
17048         (build_user_type_conversion_1): Handle member templates.
17049         (build_new_function_call): Likewise.
17050         (build_new_op): Likewise.
17051         (build_new_method_call): Likewise.
17052
17053         * class.c (grow_method): Don't give an error message indicating
17054         that two member templates with the same name are ambiguous.
17055         (finish_struct): Treat member template functions just like member
17056         functions.
17057
17058         * cp-tree.h (check_member_template): Add declaration.
17059         (begin_member_template_processing): Likewise.
17060         (end_member_template_processing): Likewise.
17061         (fn_type_unification): Likewise.
17062         (is_member_template): Likewise.
17063         (tsubst): Change prototype.
17064         (tsubst_expr): Likewise.
17065         (tsubst_copy): Likewise.
17066         (instantiate_template): Likewise.
17067         (get_bindings): Likewise.
17068
17069         * decl.c (decls_match): Handle multiple levels of template
17070         parameters.
17071         (pushdecl): Handle template type params just like other type
17072         declarations.
17073         (push_class_level_binding): Return immediately if the
17074         class_binding_level is NULL.
17075         (grokfndecl): If check_classfn() returns a member_template, use
17076         the result of the template, not the template itself.
17077
17078         * decl2.c (check_member_template): New function.  Check to see
17079         that the entity declared to be a member template can be one.
17080         (check_classfn): Allow redeclaration of member template functions
17081         with different types; the new functions can be specializations or
17082         explicit instantiations.
17083
17084         * error.c (dump_decl): Handle multiple levels of template
17085         parameters.
17086         (dump_function_decl): Update to handle function templates.
17087
17088         * lex.c (do_pending_inlines): Set up template parameter context
17089         for member templates.
17090         (process_next_inline): Likewise.
17091
17092         * method.c (build_overload_identifier): Adjust for multiple levels
17093         of template parameters.
17094
17095         * parse.y (fn.def2): Add member templates.
17096         (component_decl_1): Likewise.
17097
17098         * pt.c (begin_member_template_processing): New function.
17099         (end_member_template_processing): Likewise.
17100         (is_member_template): Likewise.
17101         (fn_type_unification): Likewise.
17102         (current_template_parms): Return a vector of all the template
17103         parms, not just the innermost level of parms.
17104         (push_template_decl): Deal with the possibility of member
17105         templates.
17106         (lookup_template_class): Likewise.
17107         (uses_template_parms): Likewise.
17108         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
17109         TEMPLATE_CONST_PARM to deal with multiple levels of template
17110         arguments.   Add processing of TEMPLATE_DECL to produce new
17111         TEMPLATE_DECLs from old ones.
17112         (do_decl_instantiation): Handle member templates.
17113
17114         * search.c (lookup_fnfields_1): Handle member template conversion
17115         operators.
17116
17117         * tree.c (cp_tree_equal): Check the levels, as well as the
17118         indices, of TEMPLATE_CONST_PARMs.
17119
17120         * typeck.c (comptypes): Check the levels, as well as the indices,
17121         fo TEMPLATE_TYPE_PARMs.
17122         (build_x_function_call): Treat member templates like member
17123         functions.
17124
17125 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
17126
17127         * typeck.c (c_expand_return): Always convert_for_initialization
17128         before checking for returning a pointer to local.
17129
17130         * pt.c (type_unification): If strict and the function parm doesn't
17131         use template parms, just compare types.
17132
17133 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
17134
17135         * method.c (build_overloaded_value): Replace direct call
17136         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
17137
17138 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
17139
17140         * typeck.c (convert_arguments): Don't arbitrarily choose the first
17141         of a set of overloaded functions.
17142
17143 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
17144
17145         * lex.c (real_yylex): Don't elide __FUNCTION__.
17146
17147         * method.c (build_overload_value): Add in_template parm.
17148         (build_overload_int): Likewise.
17149         (build_overload_identifier): Pass it.
17150
17151         * decl.c (duplicate_decls): Don't bash a previous template
17152         definition with a redeclaration.
17153
17154         * pt.c (unify): float doesn't match double.
17155
17156         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
17157         TYPE_DECL.  Handle getting non-template types.
17158         * parse.y (explicit_instantiation): Use typespec instead of
17159         aggr template_type.
17160
17161 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
17162
17163         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
17164
17165 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
17166
17167         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
17168         (compare_ics): Likewise.
17169
17170 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
17171
17172         * call.c (joust): Warn about choosing one conversion op over
17173         another because of 'this' argument when the other return type is
17174         better.
17175         (source_type): New fn.
17176
17177         * call.c (build_new_op): Strip leading REF_BIND from first operand
17178         to builtin operator.
17179
17180         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
17181         use its RTL.
17182
17183 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
17184
17185         * call.c (null_ptr_cst_p): Remove support for (void*)0.
17186
17187 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
17188
17189         * typeck.c (expand_target_expr): Make definition match declaration.
17190
17191         * class.c (get_basefndecls): Make definition match declaration.
17192
17193 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
17194
17195         * input.c (sub_getch): Eventually give up and release the input file.
17196
17197         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
17198         right place.
17199
17200         * call.c (joust): Tweak message.
17201
17202 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
17203
17204         * error.c (type_as_string): Put const/volatile on template type
17205         parameters where appropriate.
17206
17207 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
17208
17209         * call.c (strictly_better): Make arguments unsigned ints.
17210
17211 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
17212
17213         * lex.c (real_yylex): Refer to __complex instead of complex.
17214
17215 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
17216
17217         * lex.c (real_yylex): Don't use getc directly.
17218
17219 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
17220
17221         * call.c (is_subseq): Don't try to be clever.
17222
17223 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
17224
17225         * parse.y, pt.c: Include "except.h".
17226         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
17227         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
17228         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
17229         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
17230         prototyping.
17231
17232 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
17233
17234         * decl2.c (mark_vtable_entries): Instead of replacing pure
17235         virtuals with a reference to __pure_virtual, copy the decl and
17236         change the RTL.
17237
17238 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
17239
17240         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
17241
17242         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
17243
17244         * pt.c (instantiate_class_template): Call repo_template_used
17245         before finish_prevtable_vardecl.
17246
17247         * call.c (is_subseq): New fn.
17248         (compare_ics): Use it.
17249
17250         * repo.c (finish_repo): Don't crash on no args.
17251
17252         * parse.y (named_complex_class_head_sans_basetype): Handle
17253         explicit global scope.
17254         * decl2.c (handle_class_head): New fn.
17255
17256         * pt.c (unify): Add CONST_DECL case.
17257
17258 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17259
17260         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
17261
17262         * cp-tree.h (report_type_mismatch): Add prototype.
17263         * call.c (build_overload_call_real): Remove erroneous fourth
17264         argument to report_type_mismatch.
17265         (build_user_type_conversion_1): Remove erroneous second arg to
17266         tourney.
17267         (build_new_function_call): Likewise.
17268         (build_object_call): Likewise.
17269         (build_new_op): Likewise.
17270         (build_new_method_call): Likewise.
17271
17272 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
17273
17274         * error.c (dump_decl): Don't bother processing a function with no
17275         DECL_LANG_SPECIFIC.
17276
17277         * method.c (emit_thunk): Call init_function_start in the macro case.
17278
17279 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
17280
17281         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
17282         defined and used to set flag_vtable_thunks.
17283
17284 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
17285
17286         * parse.y: Don't clear the inlines from their obstack until they've
17287         all been processed.
17288
17289         * decl.c (duplicate_decls): Don't complain about exception
17290         specification mismatch if flag_exceptions is off.
17291
17292 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
17293
17294         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
17295
17296 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
17297
17298         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
17299         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
17300         Include <stdio.h> before include files that formerly used STDIO_PROTO.
17301
17302         * decl.c, g++spec.c, lex.c, method.c, repo.c:
17303         Include "config.h" first, as per autoconf manual.
17304
17305 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
17306
17307         * decl.c (duplicate_decls): Tweak wording.
17308         * lex.c (do_pending_defargs): Don't die if we see a default arg
17309         that isn't a DEFAULT_ARG.
17310         * error.c (dump_expr): Handle DEFAULT_ARG.
17311
17312         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
17313         * lang-options.h: Add -fhandle-exceptions.
17314
17315         * class.c (build_vtable): Vtables are artificial.
17316         (prepare_fresh_vtable): Likewise.
17317
17318 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
17319
17320         * cvt.c (ocp_convert): After converting to the target type, set
17321         LOOKUP_NO_CONVERSION.
17322
17323         * call.c (joust): Warn about potentially confusing promotion rules
17324         with -Wsign-promo.
17325         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
17326
17327 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
17328
17329         * exception.cc: Declare __terminate_func with noreturn attribute.
17330
17331 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
17332
17333         * parse.y: Break out eat_saved_input, handle errors.
17334         (function_try_block): Use compstmt instead of compstmt_or_error.
17335
17336 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
17337
17338         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
17339
17340 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
17341
17342         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
17343         existence of cc1plus check whether $(LANGUAGES) contains C++.
17344
17345 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
17346
17347         * method.c (do_build_copy_constructor): When copying an anonymous
17348         union member loop around to handle nested anonymous unions.  Use
17349         the offset of the member relative to the outer structure, not the
17350         union.
17351
17352 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
17353
17354         * call.c (resolve_args): New fn.
17355         (build_new_function_call): Use it.
17356         (build_object_call): Likewise.
17357         (build_new_method_call): Likewise.
17358
17359 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
17360
17361         * call.c (build_over_call): tsubst all default parms from templates.
17362
17363 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
17364
17365         * decl.c (struct cp_function): Add static_labelno.
17366         (push_cp_function_context): Save it.
17367         (pop_cp_function_context): Restore it.
17368
17369 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
17370
17371         * typeck.c (build_component_ref_1): Convert from reference.
17372
17373 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17374
17375         * parse.y (current_declspecs, prefix_attributes): Initialize to
17376         NULL_TREE.
17377
17378         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
17379         before we try to force it to be a TREE_LIST.
17380         (decl): Make sure $1.t is non-nil.
17381
17382 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
17383
17384         * pt.c (uses_template_parms): Handle template first-parse codes.
17385
17386         * decl.c (cp_finish_decl): Only warn about user-defined statics.
17387
17388 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
17389
17390         * pt.c (unify): Handle BOOLEAN_TYPE.
17391
17392         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
17393         * pt.c (tsubst): Don't set it.
17394         * call.c (build_over_call): Use uses_template_parms.
17395
17396 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
17397
17398         * method.c (build_overload_nested_name): Use static_labelno
17399         instead of var_labelno.
17400         (build_qualified_name): New fn.
17401         (build_overload_name): Split out from here.
17402         (build_static_name): Use build_qualified_name.
17403         * decl.c (cp_finish_decl): Statics in extern inline functions
17404         have comdat linkage.
17405         (start_function): Initialize static_labelno.
17406
17407 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
17408
17409         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
17410         before "all member functions in class [] are private".
17411
17412 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
17413
17414         * lex.c (do_scoped_id): convert_from_reference.
17415         * init.c (build_offset_ref): Likewise.
17416
17417 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
17418
17419         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
17420
17421 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
17422
17423         * typeck.c (get_member_function_from_ptrfunc): Promote index
17424         before saving it.
17425
17426 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
17427
17428         * tree.c (layout_basetypes): Move non-virtual destructor warning.
17429         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
17430
17431 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
17432
17433         * decl.c (grokdeclarator): Call add_defarg_fn for the function
17434         type, too.
17435         * lex.c (add_defarg_fn): Adjust.
17436         (do_pending_defargs): Adjust.  Don't skip the first parm.
17437
17438 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
17439
17440         * decl.c (build_enumerator): Global enumerators are also readonly.
17441
17442         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
17443         (build_dynamic_cast): Call it and convert_from_reference.
17444
17445         * lex.c (add_defarg_fn): New fn.
17446         (snarf_defarg): Don't add to defarg_types.
17447         (do_pending_defargs): Lose defarg_types.  All fns we process now
17448         have defargs.
17449         * decl.c (grokfndecl): Call add_defarg_fn.
17450
17451         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
17452         * cp-tree.def: Add DEFAULT_ARG.
17453         * spew.c (yylex): Call snarf_defarg as appropriate.
17454         * parse.y: New tokens DEFARG and DEFARG_MARKER.
17455         (defarg_again, pending_defargs, defarg, defarg1): New rules.
17456         (structsp): Use pending_defargs.
17457         (parms, full_parm): Use defarg.
17458         * lex.c (init_lex): Initialize inline_text_firstobj.
17459         (do_pending_inlines): Never pass the obstack to feed_input.
17460         (process_next_inline): Call end_input instead of restore_pending_input.
17461         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
17462         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
17463         * input.c (end_input): New fn.
17464         (sub_getch): At the end of some fed input, just keep returning EOF
17465         until someone calls end_input.
17466         Remove 'obstack' field from struct input_source.
17467         * decl.c (grokparms): Handle DEFAULT_ARG.
17468         (replace_defarg): New fn.
17469         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
17470
17471 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
17472
17473         * call.c (implicit_conversion): If nothing else works, try binding
17474         an rvalue to a reference.
17475
17476 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
17477
17478         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
17479         ifndef for Cygwin32 to include SIGSEGV.
17480
17481 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
17482
17483         * class.c (finish_struct_1): Only complain about pointers without
17484         copy stuff if there are any constructors.
17485
17486         * rtti.c (build_dynamic_cast): Call complete_type on the types.
17487
17488         * decl.c (grokfndecl): If the function we chose doesn't actually
17489         match, die.
17490
17491         * decl2.c (grokclassfn): Don't specify 'const int' for the
17492         artificial destructor parm.
17493
17494         * pt.c (type_unification): If we are called recursively, nothing
17495         decays.
17496
17497 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
17498
17499         * decl.c (init_decl_processing): Stop trying to catch signals
17500         other than SIGABRT since the Cygwin32 library doesn't support
17501         them correctly yet.  This fixes a situation in which g++ causes
17502         a hang on SIGSEGVs and other such signals in our Win32-hosted
17503         tools.
17504
17505 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
17506
17507         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
17508
17509 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
17510
17511         * typeck2.c (store_init_value): Always return the value if our
17512         type needs constructing.
17513
17514         * method.c (hack_identifier): Convert class statics from
17515         reference, too.
17516
17517 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
17518
17519         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
17520
17521 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
17522
17523         * typeck.c (c_expand_return): Make sure we clean up temporaries at
17524         the end of return x;
17525
17526 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17527
17528         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
17529
17530 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
17531
17532         * except.c (expand_builtin_throw): Add support
17533         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
17534
17535 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
17536
17537         * repo.c (extract_string): Null-terminate.
17538
17539         * cp-tree.h (TI_SPEC_INFO): New macro.
17540         (CLASSTYPE_TI_SPEC_INFO): New macro.
17541         * pt.c (push_template_decl): Correctly determine # of template parms
17542         for partial specs.
17543
17544         * call.c (compare_ics): Really fix 'this' conversions.
17545
17546         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
17547         non-template fn.
17548
17549         * pt.c (push_template_decl): Complain about mismatch in # of
17550         template parms between a class template and a member template.
17551
17552 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
17553
17554         * method.c (synthesize_method): You can't call
17555         function_cannot_inline_p after finish_function.
17556         * decl.c (finish_function): Turn on flag_inline_functions and turn
17557         off DECL_INLINE before handing a synthesized method to the
17558         backend.
17559
17560 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17561
17562         * method.c (synthesize_method): Remove July 30 change to never set
17563         DECL_INLINE if at_eof.
17564
17565 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
17566
17567         * xref.c (GNU_xref_member): Ensure that the node has a
17568         decl_lang_specific part before checking DECL_FRIEND_P.
17569
17570 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
17571
17572         * pt.c (instantiate_class_template): Diagnose non-class types used
17573         as bases.
17574
17575 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
17576
17577         * typeck.c (build_conditional_expr): Use convert_for_initialization
17578         instead of convert_and_check.
17579
17580 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17581
17582         * parse.y (typespec): Don't pedwarn for typeof.
17583
17584 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
17585
17586         * repo.c (finish_repo): Only check changes if we would write a
17587         repo file.
17588
17589         * call.c (compare_ics): Fix handling of 'this' conversions.
17590
17591         * pt.c (do_decl_instantiation): Support static data too.  Rename
17592         from do_function_instantiation.
17593         * cp-tree.h: Adjust.
17594         * parse.y: Adjust.
17595
17596         * repo.c (extract_string): New fn.
17597         (get_base_filename): Use it.
17598         (init_repo): Compare old args with current args.
17599
17600 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
17601
17602         * Makefile.in, Make-lang.in: Protect C-ls with a comment
17603         character, idea from Paul Eggert <eggert@twinsun.com>.
17604
17605 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
17606
17607         * typeck.c (c_expand_return): Be more persistent in looking for
17608         returned temps.
17609
17610         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
17611         pointer to reference.
17612
17613         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
17614
17615 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
17616
17617         * init.c (build_member_call, build_offset_ref):
17618         Use do_scoped_id instead of do_identifier.
17619
17620         * cvt.c (convert): Remove bogosity.
17621
17622 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17623
17624         * cvt.c (build_up_reference): Do checks of ARGTYPE and
17625         TARGET_TYPE before trying to use get_binfo.
17626
17627 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
17628
17629         * cvt.c (build_up_reference): Call get_binfo to get access control.
17630
17631         * decl2.c (import_export_decl): If we don't support weaks, leave
17632         statics undefined.
17633
17634 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
17635
17636         * except.c (expand_builtin_throw): Add support for machines that
17637         cannot access globals after throw's epilogue when
17638         -fno-sjlj-exceptions is used.
17639
17640 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
17641
17642         * parse.y: 'std::' becomes '::'.
17643         * lex.c (real_yylex): Remove 'namespace' warning.
17644         * init.c (build_member_call): Ignore 'std::'.
17645         (build_offset_ref): Likewise.
17646         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
17647         (do_toplevel_using_decl): Ignore 'using std::whatever'.
17648         * decl.c (push_namespace): Just sorry.
17649         (pop_namespace): Nop.
17650         (init_decl_processing): Declare std namespace.
17651
17652 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
17653
17654         * search.c (push_class_decls): A name which ambiguously refers to
17655         several instantiations of the same template just refers to the
17656         template.
17657
17658 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
17659
17660         * decl.c (build_enumerator): Fix problem with unsigned long
17661         enumerated values being smashed to ints, causing overflow
17662         when computing next enumerated value (for enum values around
17663         MAX_VAL).
17664
17665 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
17666
17667         * typeck.c (build_component_ref): Only call mark_used on a decl.
17668
17669 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17670
17671         * typeck.c (build_c_cast): Make the check for a ptr to function
17672         more specific before possible default_conversion call.
17673
17674 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
17675
17676         * except.c (expand_exception_blocks): Simplify and fix and make
17677         sure we don't end a region in a sequence, as expand_end_bindings
17678         doesn't like it.
17679
17680 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
17681
17682         * except.c (init_exception_processing): Mark terminate as not
17683         returning so that the optimizer can optimize better.
17684
17685 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
17686
17687         * cvt.c (convert): Don't do any extra work, if we can avoid it
17688         easily.
17689
17690 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
17691
17692         * *.[chy]: Change cp_convert to ocp_convert, change convert to
17693         cp_convert.  convert is now reserved for the backend, and doesn't
17694         have the semantics a frontend person should ever want.
17695
17696 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
17697
17698         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
17699         Lose -traditional support.
17700
17701 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17702
17703         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
17704
17705         * parse.y (self_reference): Do it for templates, too.
17706         * class.c (pushclass): Don't overload_template_name; the alias
17707         generated by build_self_reference serves the same purpose.
17708
17709         * tree.c (list_hash): Make static, take more args.
17710         (list_hash_lookup): Likewise.
17711         (list_hash_add): Make static.
17712         (list_hash_canon): Lose.
17713         (hash_tree_cons): Only build a new node if one isn't already in the
17714         hashtable.
17715         (hash_tree_chain): Use hash_tree_cons.
17716         * cp-tree.h: Adjust.
17717         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
17718         of calling lookup_name.
17719
17720 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
17721
17722         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
17723         doesn't refer to the CONST_DECLs.
17724
17725 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
17726
17727         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
17728         is bigger.
17729         (expand_class_desc): Convert the last argument to a sizetype.
17730
17731 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17732
17733         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
17734         __real__): Add reswords.
17735         * hash.h: Regenerate.
17736         * lex.h (rid): Add RID_COMPLEX.
17737         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
17738         * lex.c (init_lex): Add building of RID_COMPLEX.
17739         (real_yylex): General cleanup in line with what c-lex.c also has,
17740         sans the cruft for traditional; add handling of SPEC_IMAG, complex
17741         types, and imaginary numeric constants.
17742         * parse.y (REALPART, IMAGPART): Add tokens.
17743         (unary_expr): Add REALPART and IMAGPART rules.
17744         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
17745         * decl.c (complex_{integer,float,double,long}_type_node): Define
17746         types.
17747         (init_decl_processing): Set up the types.
17748         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
17749         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
17750         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
17751         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
17752         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
17753         COMPLEX_TYPE case.
17754         * method.c (build_overload_name): Add handling of the different
17755         COMPLEX_TYPEs, prefixing them with `J'.
17756         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
17757         as a template parm.
17758         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
17759         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
17760         (mapcar): Handle COMPLEX_CST.
17761         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
17762         (common_type): Add code for complex types.
17763         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
17764         (convert_for_assignment): Likewise.
17765         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
17766
17767 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
17768
17769         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
17770         tsubst_expr, as it might try to do overload resolution.
17771
17772 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
17773
17774         * pt.c (instantiate_class_template): Oops.
17775
17776 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
17777
17778         * cp-tree.def: Add TAG_DEFN.
17779         * pt.c (tsubst_enum): New fn.
17780         (instantiate_class_template): Use it.
17781         (tsubst_expr): Support TAG_DEFN.
17782         (tsubst): Support local enums.
17783         (tsubst_copy): Likewise.
17784         * decl.c (finish_enum): Likewise.
17785         (start_enum): If this is a local enum, switch to permanent_obstack.
17786
17787 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
17788
17789         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
17790         (finish_function): Put the base init code for constructors just
17791         after the parm cleanup insns.
17792         (struct cp_function): Add last_parm_cleanup_insn.
17793         (push_cp_function_context): Likewise.
17794         (pop_cp_function_context): Likewise.
17795
17796 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
17797
17798         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
17799
17800 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17801
17802         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
17803         for THUNK_FNDECL before we switch to temporary allocation.
17804
17805 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
17806
17807         * call.c (build_new_op): Handle null arg2 for ?:.
17808
17809 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
17810
17811         * except.c (expand_exception_blocks): Ensure that we flow through
17812         the end of the exception region for the exception specification.
17813         Move exception region for the exception specification in, so that
17814         it doesn't protect the parm cleanup.  Remove some obsolete code.
17815         * decl.c (store_parm_decls): Likewise.
17816         (finish_function): Likewise.
17817
17818 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
17819
17820         * init.c (build_new): Fix nothrow handling.
17821
17822 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17823
17824         * init.c (emit_base_init): Don't warn about the initialization
17825         list for an artificial member.
17826
17827 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17828
17829         * expr.c (do_case): Handle !START case for the error msg.
17830
17831 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
17832
17833         * decl2.c, lang-options.h: New option -Weffc++.
17834         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
17835         to -Weffc++.
17836
17837         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
17838         to MULTIPLE_SYMBOL_SPACES.
17839
17840 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
17841
17842         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
17843
17844         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
17845
17846         * typeck.c (c_expand_return): Don't complain about returning void
17847         to void in an artificial function.
17848         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
17849         don't set DECL_RESULT, set DECL_ARTIFICIAL.
17850         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
17851
17852 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
17853
17854         * init.c (init_decl_processing): Add support for setjmp/longjmp based
17855         exception handling.
17856         * except.c (init_exception_processing): Likewise.
17857         (expand_end_catch_block): Likewise.
17858         (expand_exception_blocks): Likewise.
17859         (expand_throw): Likewise.
17860         * exception.cc (__default_terminate): Likewise.
17861
17862         * init.c (perform_member_init): Use new method of expr level
17863         cleanups, instead of cleanups_this_call and friends.
17864         (emit_base_init): Likewise.
17865         (expand_aggr_vbase_init_1): Likewise.
17866         (expand_vec_init): Likewise.
17867         * decl.c (cp_finish_decl): Likewise.
17868         (expand_static_init): Likewise.
17869         (store_parm_decls): Likewise.
17870         (cplus_expand_expr_stmt): Likewise.
17871         * decl2.c (finish_file): Likewise.
17872
17873         * Make-lang.in (exception.o): Ok to compile with -O now.
17874
17875         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
17876         we know it will be done later by the backend.
17877
17878         * decl2.c (lang_f_options): Remove support for short temps.
17879         * lang-options.h: Likewise.
17880
17881 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
17882
17883         * tree.c (varargs_function_p): New fn.
17884         * method.c (emit_thunk): Replace broken generic code with code to
17885         generate a heavyweight thunk function.
17886
17887 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
17888
17889         * pt.c (process_template_parm): pedwarn about floating-point parms.
17890
17891         * decl.c (grokdeclarator): inline no longer implies static.
17892
17893         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
17894
17895 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
17896
17897         * class.c (check_for_override): The signature of an overriding
17898         function is not changed.
17899
17900         * call.c (build_over_call): Move setting of conv into the loop.
17901         Note: this change, along with the related changes of the 18th thru
17902         the 20th of April, fix an infinite loop problem in conversions.
17903
17904 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
17905
17906         * call.c (build_user_type_conversion_1): Really ignore rvalue
17907         conversions when looking for a REFERENCE_TYPE.
17908
17909         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
17910         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
17911         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
17912         (build_unary_op): Likewise.
17913         * call.c (build_over_call): See through a CONVERT_EXPR around the
17914         ADDR_EXPR for on a temporary.
17915         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
17916         the ADDR_EXPR for a local variable.
17917
17918 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
17919
17920         * call.c (build_user_type_conversion_1): If we're trying to
17921         convert to a REFERENCE_TYPE, only consider lvalue conversions.
17922         (build_new_function_call): Print candidates.
17923         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
17924         (reference_binding): Binding a temporary of a reference-related type
17925         is BAD.
17926
17927 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17928
17929         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
17930         * tinfo2.cc (type_info::before): Likewise.
17931
17932 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
17933
17934         * call.c (implicit_conversion): Oops.
17935
17936 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
17937
17938         * call.c (implicit_conversion): Try to find a reference conversion
17939         before binding a const reference to a temporary.
17940
17941 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
17942
17943         * exception.cc (__default_unexpected): Call terminate by default,
17944         so that if the user overrides terminate, the correct function will
17945         be called.
17946
17947 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
17948
17949         * parse.y (left_curly): Avoid trying to use any fields of
17950         error_mark_node, as there aren't any.
17951
17952 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
17953
17954         * lex.c (do_identifier): Avoid breaking on overloaded methods
17955         as default arguments.
17956
17957 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
17958
17959         * call.c (add_template_candidate): Initialize the variable "dummy".
17960
17961 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
17962
17963         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
17964         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
17965
17966 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17967
17968         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
17969         (debug_binfo): Delete decl, not needed.
17970
17971         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
17972         promotes_to_aggr_type): Delete fns.
17973         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
17974         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
17975         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
17976
17977         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
17978
17979         * friend.c (is_friend_type): Delete fn.
17980         * cp-tree.h (is_friend_type): Delete decl.
17981
17982         * decl.c (original_result_rtx, double_ftype_double,
17983         double_ftype_double_double, int_ftype_int, long_ftype_long,
17984         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
17985         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
17986
17987         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
17988         fwd decls.
17989         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
17990
17991         * decl.c (pushdecl_nonclass_level): #if 0, unused.
17992         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
17993
17994         * lex.c (reinit_lang_specific): #if 0, unused.
17995         * cp-tree.h (reinit_lang_specific): #if 0 decl.
17996
17997         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
17998         * cp-tree.h (revert_static_member_fn): Delete decl.
17999
18000         * class.c (root_lang_context_p): Delete fn.
18001         * cp-tree.h (root_lang_context_p): Delete decl.
18002
18003         * decl.c (set_current_level_tags_transparency): #if 0, unused.
18004         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
18005
18006         * lex.c (set_vardecl_interface_info): Make static.
18007         * cp-tree.h (set_vardecl_interface_info): Delete decl.
18008
18009         * call.c (find_scoped_type): Make static.
18010         * cp-tree.h (find_scoped_type): Delete decl.
18011
18012         * search.c (convert_pointer_to_vbase): Make static.
18013         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
18014
18015         * decl.c (const_ptr_type_node): Likewise.
18016         * cp-tree.h (const_ptr_type_node): Delete decl.
18017
18018         * typeck.c (common_base_type): Make static.
18019         * cp-tree.h (common_base_types): Delete erroneous decl.
18020
18021         * pt.c (classtype_mangled_name): Make static.
18022         * cp-tree.h (classtype_mangled_name): Delete decl.
18023
18024         * lex.c (check_newline): Make static.
18025         * cp-tree.h (check_newline): Delete decl.
18026
18027         * typeck.c (build_x_array_ref): Delete fn, same idea as
18028         grok_array_decl.
18029         * cp-tree.h (build_x_array_ref): Delete decl.
18030
18031         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
18032         copy_lang_decl.
18033         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
18034
18035         * class.c (build_vtable_entry): Make static.
18036         * cp-tree.h (build_vtable_entry): Delete decl.
18037
18038         * class.c (build_vbase_pointer): Make static.
18039         * cp-tree.h (build_vbase_pointer): Delete decl.
18040
18041         * sig.c (build_sptr_ref): Add forward decl and make static.
18042         * cp-tree.h (build_sptr_ref): Delete decl.
18043
18044         * call.c (build_new_method_call): Add forward decl and make static.
18045         * cp-tree.h (build_new_method_call): Delete decl.
18046
18047         * call.c (build_object_call): Make static.
18048         * class.c (check_for_override, complete_type_p, mark_overriders):
18049         Likewise.
18050         * decl.c (cp_function_chain): Likewise.
18051         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
18052         Likewise.
18053         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
18054         Likewise.
18055         * tree.c (build_cplus_array_type_1): Likewise.
18056         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
18057         (comp_target_parms): Likewise.
18058
18059         * init.c (build_builtin_call): Make static.
18060         * cp-tree.h (build_builtin_call): Delete decl.
18061
18062         * typeck.c (binary_op_error): Delete decl.
18063         * cp-tree.h (binary_op_error): Likewise.
18064
18065 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18066
18067         * call.c (build_method_call): Compare against error_mark_node
18068         directly, rather than the ERROR_MARK tree code.
18069         * cvt.c (cp_convert): Likewise.
18070         * decl.c (print_binding_level): Likewise.
18071         (duplicate_decls): Likewise.
18072         (grokdeclarator): Likewise.
18073         (grokdeclarator): Likewise.
18074         * init.c (expand_aggr_init_1): Likewise.
18075         (decl_constant_value): Likewise.
18076         * method.c (build_opfncall): Likewise.
18077         (hack_identifier): Likewise.
18078         * typeck.c (build_modify_expr): Likewise.
18079
18080         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
18081
18082 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18083
18084         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
18085
18086         * pt.c (coerce_template_parms): Add new error message.
18087
18088         * method.c (build_overload_value): Implement name mangling for
18089         floating-point template arguments.
18090
18091         * method.c (build_overload_int, icat, dicat): Fix mangling of template
18092         arguments whose absolute value doesn't fit in a signed word.
18093
18094 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18095
18096         * friend.c: New file; put all of the friend stuff in here.
18097         * init.c: Instead of here.
18098         * Makefile.in (CXX_OBJS): Add friend.o.
18099         (friend.o): Add dependencies.
18100         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
18101
18102 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
18103
18104         * call.c (build_scoped_method_call): Complain if the scope isn't a
18105         base.
18106
18107 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
18108
18109         * parse.y (left_curly): Don't crash on erroneous type.
18110
18111         * init.c (build_delete): Fix type of ref.
18112
18113 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
18114
18115         * search.c (get_vbase_1): Renamed from get_vbase.
18116         (get_vbase): Wrapper, now non-static.
18117         (convert_pointer_to_vbase): Now static.
18118
18119         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
18120         * init.c (build_delete): Pass one.
18121         (build_partial_cleanup_for): Use build_scoped_method_call.
18122         * decl.c (finish_function): Pass a binfo.
18123
18124 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
18125
18126         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
18127
18128         * typeck.c (build_c_cast): Lose other reference to flag.
18129
18130         * call.c (build_field_call): Don't look for [cd]tor_identifier.
18131         * decl2.c (delete_sanity): Remove meaningless use of
18132         LOOKUP_HAS_IN_CHARGE.
18133         * decl.c (finish_function): Use build_scoped_method_call instead
18134         of build_delete for running vbase dtors.
18135         * init.c (build_delete): Call overload resolution code instead of
18136         duplicating it badly.
18137
18138 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
18139
18140         * call.c (build_over_call): Call mark_used before trying to elide
18141         the call.
18142
18143         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
18144
18145 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18146
18147         * typeck.c (build_modify_expr): Always pedwarn for a cast to
18148         non-reference used as an lvalue.
18149
18150 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
18151
18152         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
18153
18154 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
18155
18156         * parse.y (handler): Fix template typo.
18157
18158 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
18159
18160         * error.c (lang_decl_name): New fn.
18161         * tree.c (lang_printable_name): Use it.
18162
18163 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
18164
18165         * g++spec.c: Include config.h so that we can catch bzero #defines
18166         from the config file.
18167
18168 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
18169
18170         * new1.cc: Include a declaration for malloc, to avoid warning, and
18171         avoid lossing on systems that require one (ones that define malloc
18172         in xm.h).
18173
18174 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
18175
18176         * decl2.c (max_tinst_depth): New variable.
18177         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
18178         option.
18179         * pt.c (max_tinst_depth): Variable moved.
18180         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
18181         as legal.
18182
18183 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
18184
18185         * decl.c (xref_basetypes): Allow a base class that depends on
18186         template parms to be incomplete.
18187
18188         * decl2.c (build_expr_from_tree): Support typeid(type).
18189         * rtti.c (get_typeid): Support templates.
18190         (expand_si_desc, expand_class_desc): Fix string length.
18191         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
18192
18193 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
18194
18195         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
18196
18197         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
18198
18199 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
18200
18201         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
18202         smashes together template and non-template decls of the same
18203         signature.
18204
18205 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
18206
18207         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
18208
18209 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18210
18211         * decl.c (duplicate_decls): Next route, pedwarn about different
18212         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
18213
18214 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18215
18216         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
18217         (struct lang_type): Delete has_default_implementation member.
18218         Increase dummy to 21.
18219         * decl.c (start_method): Delete usage.
18220
18221         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
18222         store_after_parms, start_decl_1, auto_function): Add decls.
18223         (get_arglist_len_in_bytes, declare_implicit_exception,
18224         have_exceptions_p, make_type_decl, typedecl_for_tag,
18225         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
18226         build_component_type_expr, cplus_exception_name,
18227         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
18228         * call.c (build_this): Make static.
18229         (is_complete): Likewise.
18230         (implicit_conversion): Likewise.
18231         (reference_binding): Likewise.
18232         (standard_conversion): Likewise.
18233         (strip_top_quals): Likewise.
18234         (non_reference): Likewise.
18235         (build_conv): Likewise.
18236         (user_harshness): Likewise.
18237         (rank_for_ideal): Likewise.
18238         * decl.c (start_decl_1): Delete forward decl.
18239         (push_decl_level): Make static.
18240         (resume_binding_level): Make static.
18241         (namespace_bindings_p): Make static.
18242         (declare_namespace_level): Make static.
18243         (lookup_name_real): Make static.
18244         (duplicate_decls): Make static.  Take register off NEWDECL and
18245         OLDDECL parm decls.
18246         * decl2.c (get_sentry): Make static.
18247         (temp_name_p): Delete fn.
18248         * except.c (auto_function): Delete decl.
18249         * lex.c (handle_{cp,sysv}_pragma): Make static.
18250         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
18251         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
18252         * pt.c (tsubst_expr_values): Make static.
18253         * rtti.c (combine_strings): Delete decl.
18254
18255 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
18256
18257         * pt.c (push_template_decl): Handle getting a typedef.
18258
18259         * call.c (build_new_function_call): Complain about void arg.
18260
18261 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18262
18263         * decl.c (duplicate_decls): Give pedwarn of different exceptions
18264         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
18265
18266 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
18267
18268         * except.c (expand_throw): Don't expand the cleanup tree here,
18269         since we are not going to write the rtl out.  Fixes problem with
18270         -g -O on SPARC.
18271
18272 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
18273
18274         * Make-lang.in: Add $(exeext) as necessary.
18275
18276 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
18277
18278         * parse.y (handler_seq): Must have at least one catch clause.
18279
18280 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
18281
18282         * call.c (add_builtin_candidate): Restore ?: hack.
18283
18284         * decl.c (grok_op_properties): More warnings.
18285
18286 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18287
18288         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
18289         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
18290
18291         * decl.c (duplicate_decls): Scale back to a warning, and only do
18292         'em if -pedantic.
18293
18294 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
18295
18296         * decl.c (duplicate_decls): pedwarn mismatched exception
18297         specifications.
18298
18299 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
18300
18301         * call.c (build_new_method_call): Don't display the invisible
18302         argument for controlling virtual bases.
18303
18304 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
18305
18306         * new: Add nothrow new and delete, bad_alloc and throw specifications
18307         for delete.
18308         * decl.c (init_decl_processing): Add throw specification for delete.
18309         * new.cc (nothrow): Define.
18310         * lex.c (real_yylex): Removing warning that throw and friends are
18311         keywords.
18312         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
18313         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
18314         * Make-lang.in: Add new{1,2}.{cc,o}.
18315
18316 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
18317
18318         * lex.c (cons_up_default_function): Fix return type of synth op=.
18319
18320         * init.c (emit_base_init): Add warnings for uninitialized members
18321         and bases.
18322
18323         * decl.c (xref_basetypes): Add warning for non-polymorphic type
18324         with destructor used as base type.
18325
18326         * decl.c (grok_op_properties): Add warning for op= returning void.
18327         * typeck.c (c_expand_return): Add warning for op= returning anything
18328         other than *this.
18329
18330         * class.c (finish_struct_1): Add warning for class with pointers
18331         but not copy ctor or copy op=.
18332
18333         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
18334         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
18335         (instantiate_template): If -fexternal-templates, add this
18336         instantiation to pending_templates.
18337
18338         * decl2.c (copy_assignment_arg_p): Disable old hack to support
18339         Booch components.
18340
18341 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
18342
18343         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
18344
18345 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
18346
18347         * call.c (standard_conversion): Handle getting references.  Tack
18348         on RVALUE_CONV here.  Do it for non-class types, too.
18349         (reference_binding): Pass references to standard_conversion.
18350         (implicit_conversion): Likewise.
18351         (add_builtin_candidate): Disable one ?: kludge.
18352         (convert_like): Handle RVALUE_CONVs for non-class types.
18353         (joust): Disable the other ?: kludge.
18354
18355 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18356
18357         * decl.c (init_decl_processing): Add code to build up common
18358         function types beforehand, to avoid creation then removal of
18359         things already in the hash table.
18360
18361 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
18362
18363         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
18364         the arguments.
18365
18366         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
18367         current_template_parms.
18368
18369 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
18370
18371         * search.c (lookup_field): Don't return a function, check want_type.
18372
18373 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18374
18375         * init.c (build_new): Make sure PLACEMENT has a type.
18376
18377 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
18378
18379         * init.c (build_new): Support new (nothrow).
18380
18381 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
18382
18383         * pt.c (instantiate_decl): Also do push_to_top_level before setting
18384         up DECL_INITIAL.
18385
18386         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
18387         * pt.c (tsubst): Defer instantiation of default args.
18388         * call.c (build_over_call): Until here.
18389
18390 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18391
18392         * search.c (lookup_field): Make sure we have an
18393         IDENTIFIER_CLASS_VALUE before we try to return it.
18394
18395 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
18396
18397         * call.c (build_method_call): Delete unused var PARM.
18398         (build_overload_call_real): Likewise.
18399         (build_object_call): Delete unused var P.
18400         (build_new_op): Likewise.
18401         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
18402         var definitions, which are never used.
18403         (shadow_tag): Delete unused var FN.
18404         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
18405         * init.c (build_new): Delete unused var ALLOC_TEMP.
18406         * method.c (hack_identifier): Delete unused var CONTEXT.
18407         (do_build_copy_constructor): Delete unused var NAME.
18408         (synthesize_method): Delete unused var BASE.
18409         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
18410         * rtti.c (build_headof): Delete unused var VPTR.
18411         (get_typeid): Delete unused var T.
18412         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
18413         and ORIG_OP2.
18414         (build_ptrmemfunc): Delete unused vars U and NINDEX.
18415         * typeck2.c (build_functional_cast): Delete unused var BINFO.
18416
18417 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
18418
18419         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
18420         things in a type being defined.
18421         * decl.c (finish_enum): Reverse the values so that they are in
18422         the correct order.
18423
18424         * pt.c (instantiate_class_template): Don't initialize
18425         BINFO_BASETYPES until the vector is filled out.
18426         (unify): Don't abort on conflicting bindings, just fail.
18427         (instantiate_decl): Do push_tinst_level before any tsubsting.
18428
18429         * method.c (build_overload_value): Handle getting a
18430         TEMPLATE_CONST_PARM for a pointer.
18431
18432 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
18433
18434         * init.c (expand_member_init): Don't give 'not a base' error for
18435         templates.
18436
18437         * pt.c (instantiate_decl): Call import_export_decl later.
18438
18439         * pt.c (instantiate_class_template): Return a value.
18440
18441         * parse.y (extension): New rule for __extension__.
18442         (extdef, unary_expr, decl, component_decl): Use it.
18443
18444 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
18445
18446         * class.c (base_binfo): Remove unused base_has_virtual member.
18447         (finish_base_struct): Likewise.
18448         (finish_struct_1): Likewise.
18449
18450 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
18451
18452         * search.c (expand_upcast_fixups): Fix bogus code generation
18453         problem where the generated code uses the wrong index into the
18454         runtime built vtable on the stack.  Old code could clobber random
18455         stack values.
18456
18457 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
18458
18459         * init.c (perform_member_init): Make sure the partial EH cleanups
18460         live on the function_obstack.
18461
18462 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
18463
18464         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
18465         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
18466
18467 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
18468
18469         * decl.c (grokvardecl): Avoid ANSI style initialization.
18470
18471 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
18472
18473         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
18474
18475 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
18476
18477         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
18478
18479 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18480
18481         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
18482         arguments we compare against.  Start the count of I at 1, not 0,
18483         since argv[0] is still the command.
18484
18485 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
18486
18487         * lang-specs.h: Accept .cp as an C++ extension.
18488
18489 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18490
18491         * cp-tree.h (ptr_reasonably_similar): Add decl.
18492
18493 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18494
18495         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
18496         pointer.  New local SPECBITS with the parm's value.
18497         (grokdeclarator): Pass &specbits down.
18498
18499         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
18500         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
18501
18502         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
18503         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
18504
18505         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
18506         not an error_mark_node.
18507
18508 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
18509
18510         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
18511         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
18512
18513 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
18514
18515         * decl.c (grokdeclarator): When giving an anonymous struct a name,
18516         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
18517         not affected).
18518
18519         * typeck2.c (build_m_component_ref): If component is a pointer
18520         to data member, resolve the OFFSET_REF now.
18521
18522         * call.c (convert_like): Don't go into infinite recursion.
18523
18524         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
18525
18526         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
18527         * tree.c (layout_basetypes): And on the vbase ptr.
18528
18529 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
18530
18531         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
18532         CHAR_TYPE_SIZE so bool is always the same size as another type.
18533
18534         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
18535
18536 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
18537
18538         * decl2.c (grok_x_components): Remove synthesized methods from
18539         TYPE_METHODS of an anonymous union, complain about member
18540         functions.
18541         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
18542         anonymous unions.
18543         (finish_function): Just clear the DECL_RTL of our arguments.
18544
18545 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18546
18547         * decl2.c (finish_file): Emit DWARF debugging info for static data
18548         members.
18549
18550         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
18551
18552 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
18553
18554         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
18555         IDENTIFIER_NODE.
18556
18557 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
18558
18559         * Make-lang.in (g++-cross$(exeext)): Fix typo.
18560
18561 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18562
18563         Make the g++ driver now be a standalone program, rather than one
18564         that tries to run the gcc driver after munging up the options.
18565         * Make-lang.in (g++.c, g++spec.o): New rules.
18566         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
18567         added.
18568         (g++$(exeext)): New rule, based on xgcc rule.
18569         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
18570         * g++spec.c: New file.
18571         * g++.c: Removed file.
18572
18573 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
18574
18575         * cvt.c (build_up_reference): Arrange for any temporary values
18576         that have been keep in registers until now to be put into memory.
18577
18578 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18579
18580         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
18581         that make -j3 bootstrap works better.
18582
18583 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
18584
18585         * decl.c (pushtag): Do pushdecl for anon tags.
18586
18587 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
18588
18589         * typeck.c (c_expand_return): Fix logic.
18590         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
18591
18592 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
18593
18594         * g++.c (main): Make sure arglist has a final NULL entry.  Add
18595         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
18596         stdin/stdout of the invoked program are redirected to
18597         nowheresville.
18598
18599 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18600
18601         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
18602
18603 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
18604
18605         * init.c (resolve_offset_ref): Handle obj.vfn better.
18606         * typeck.c (build_component_ref): Set TREE_TYPE on result from
18607         build_vfn_ref.
18608
18609 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
18610
18611         * typeck.c (convert_for_assignment): Also handle anachronistic
18612         implicit conversions from (::*)() to cv void*.
18613         * cvt.c (cp_convert_to_pointer): Likewise.
18614
18615 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
18616
18617         * lex.c (handle_cp_pragma): Fix bogus warning.
18618
18619 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
18620
18621         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
18622         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
18623
18624 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18625
18626         * class.c (finish_struct_1): Support DWARF2_DEBUG.
18627         * search.c (dfs_debug_mark): Likewise.
18628         * decl2.c (finish_vtable_vardecl): Likewise.
18629         * decl.c (pushtag, finish_enum): Likewise.
18630         * lex.c (check_newline): Use debug_* instead of calling *out
18631         functions directly.
18632
18633 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18634
18635         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
18636         on some picky hosts.
18637
18638 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
18639
18640         * class.c (finish_struct_1): A class has a non-trivial copy
18641         constructor if it has virtual functions.
18642
18643         * cvt.c (cp_convert): Always call a constructor.
18644
18645         * call.c (reference_binding): Still tack on a REF_BIND
18646         for bad conversions.
18647         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
18648
18649         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
18650         (c_expand_return): Likewise.
18651         * typeck2.c (digest_init): Likewise for { }.
18652         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
18653         * cvt.c (cp_convert): Handle failure better.
18654
18655 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18656
18657         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
18658         of GCC be path-relative.
18659
18660 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
18661
18662         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
18663         it does need choose-temp.o and pexecute.o.
18664
18665 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18666
18667         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
18668         that we still use it.
18669         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
18670
18671 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
18672
18673         * init.c (expand_default_init): Avoid calling constructors to
18674         initialize reference temps.
18675
18676         * cvt.c (convert_to_reference): Fix.
18677
18678 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
18679
18680         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
18681         (convert_to_reference): Likewise.
18682         * typeck.c (convert_for_initialization): Likewise.
18683         * init.c (expand_default_init): Likewise.
18684         (expand_aggr_init_1): Likewise.
18685         * cp-tree.h (CONV_NONCONVERTING): Lose.
18686         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
18687         * *.c: Adjust.
18688         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
18689
18690 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
18691
18692         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
18693
18694 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18695
18696         * init.c (expand_aggr_init_1): Don't crash on non-constructor
18697         TARGET_EXPR.
18698
18699 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18700
18701         * g++.c: Include gansidecl.h.
18702         (VPROTO, PVPROTO, VA_START): Delete.
18703         (choose_temp_base_try, choose_temp_base, perror_exec,
18704         run_dos) [__MSDOS__]: Delete fns.
18705         (pfatal_with_name): Delete fn.
18706         (temp_filename): Declare like in gcc.c.
18707         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
18708         (error_count, signal_count): Define.
18709         (error): Delete both definitions.
18710         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
18711         (pfatal_pexecute): Add fn from gcc.c.
18712         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
18713         code to use the pexecute stuff also used by gcc.c.
18714         (MIN_FATAL_STATUS): Define.
18715         * Make-lang.in (g++): Add dependency on and linking with
18716         choose-temp.o and pexecute.o.
18717
18718         * cp-tree.h: Include gansidecl.h.
18719         (STDIO_PROTO): Delete #undef/#define.
18720         * cvt.c (NULL): Delete #undef/#define.
18721         * expr.c (NULL): Likewise.
18722         * init.c (NULL): Likewise.
18723         * rtti.c (NULL): Likewise.
18724         * xref.c (NULL): Likewise.
18725
18726         * cp-tree.h (build_user_type_conversion): Add prototype.
18727         * call.c (build_user_type_conversion): Delete prototype.  Correct
18728         decl of FLAGS arg to be an int.
18729         * cvt.c (build_user_type_conversion): Likewise.
18730
18731 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
18732
18733         * cp-tree.def: Add TRY_BLOCK and HANDLER.
18734         * except.c (expand_start_catch_block): Support templates.
18735         * parse.y (try_block, handler_seq): Likewise.
18736         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
18737
18738 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
18739
18740         * pt.c (current_template_args): New fn.
18741         (push_template_decl): Use it.
18742         * decl.c (grokdeclarator): Use it.
18743
18744         * decl2.c (build_expr_from_tree): Dereference ref vars.
18745
18746         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
18747         the decl-specifier-seq.
18748
18749         * decl.c (grok_op_properties): Don't force the type of a conversion
18750         op to be complete.  Don't warn about converting to the same type
18751         for template instantiations.
18752
18753         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
18754         methods.
18755
18756 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
18757
18758         * typeck.c (get_delta_difference): Remove previous bogusness.
18759         Don't give errors if force is set.
18760
18761 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18762
18763         * decl2.c (finish_file): Don't emit debug info.
18764         * decl.c (pushdecl): Lose obsolete code.
18765         (grokdeclarator): Still do the long long thing after complaining.
18766         * search.c (note_debug_info_needed): Don't do anything if we're in a
18767         template.
18768         * method.c (synthesize_method): For non-local classes,
18769         push_to_top_level first.
18770
18771 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
18772
18773         * typeck.c (get_delta_difference): Add no_error parameter.
18774         (build_ptrmemfunc): Call get_delta_difference with no_error set;
18775         we don't want error messages when converting unrelated
18776         pointer-to-member functions.
18777
18778 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
18779
18780         * error.c (dump_expr): Improve the wording on error messages that
18781         involve pointer to member functions.
18782
18783 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
18784
18785         * cvt.c (cp_convert_to_pointer): Move code for conversions from
18786         (::*)() to void* or (*)() up a bit, so that we can convert from
18787         METHOD_TYPEs as well.
18788
18789 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18790
18791         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
18792         There are no 'member' types.
18793         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
18794         (build_x_typeid): Handle errors.
18795
18796 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
18797
18798         * typeck.c (convert_for_assignment): Handle anachronistic implicit
18799         conversions from (::*)() to void* or (*)().
18800         * cvt.c (cp_convert_to_pointer): Likewise.
18801         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
18802         conversions from here.
18803         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
18804         * lang-options.h: Likewise.
18805         * decl2.c (warn_pmf2ptr): Define.
18806         * cp-tree.h: Declare it.
18807         * typeck2.c (digest_init): Allow pmfs down into
18808         convert_for_initialization.
18809
18810 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
18811
18812         * typeck.c (c_expand_return): Fix for returning overloaded fn.
18813
18814 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18815
18816         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
18817         * decl.c (grok_reference_init): Pass DIRECT_BIND.
18818         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
18819         DIRECT_BIND.
18820         * call.c (convert_like): Don't pass INDIRECT_BIND.
18821         * typeck.c (convert_arguments): Likewise.
18822         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
18823
18824 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
18825
18826         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
18827         similar code in build_up_ref.
18828         * cvt.c (build_up_reference): Drastically simplify.
18829
18830 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
18831
18832         * typeck.c (signed_or_unsigned_type): If the given type already
18833         as the correct signedness, then just return it.
18834
18835         * typeck.c ({un,}signed_type): If can't do anything, call
18836         signed_or_unsigned_type.
18837
18838 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
18839
18840         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
18841         current_class_type is NULL.
18842
18843 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
18844
18845         * class.c (finish_struct_1): Avoid empty structs by adding a field
18846         so layout_type gets the mode right.
18847
18848         * typeck.c (c_expand_return): Drastically simplify.
18849
18850 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
18851
18852         * typeck.c (decay_conversion): Handle overloaded methods.
18853
18854 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
18855
18856         * call.c (build_over_call): A TARGET_EXPR has side-effects.
18857
18858 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
18859
18860         * cvt.c (convert_to_pointer_force): Add code to support pointer to
18861         member function to pointer to function conversions.
18862         * init.c (resolve_offset_ref): Add code to allow faked up objects,
18863         ignoring them if they are not used, and giving an error, if they
18864         are needed.
18865         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
18866         code, and so that we can give an error, if we needed an object,
18867         and one was not provided.
18868         (build_c_cast): Don't call default_conversion when we want to
18869         convert to pointer to function from a METHOD_TYPE.
18870
18871 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
18872
18873         * Make-lang.in (cplib2.ready): Fix logic.
18874
18875         * decl.c (shadow_tag): Only complain about non-artificial function
18876         members.
18877
18878         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
18879
18880 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
18881
18882         * expr.c (cplus_expand_expr): Pre-tweak call_target like
18883         expand_inline_function would.
18884
18885         * pt.c (mark_decl_instantiated): If extern_p, call
18886         mark_inline_for_output.
18887
18888 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
18889
18890         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
18891         pmd conversions.
18892
18893         * typeck.c (get_delta_difference): Fix wording, as we can be used
18894         for pointer to data members.
18895
18896 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
18897
18898         * pt.c (tsubst): If the function decl isn't a member of this
18899         template, return a copy of the decl (including copying the
18900         lang-specific part) so we don't hose ourselves later.
18901
18902 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
18903
18904         * class.c (finish_struct): Remove DWARF-specific tag handling.
18905         * decl.c (pushtag): Likewise.
18906         (finish_function): Always clear DECL_ARGUMENTS on function decls with
18907         no saved RTX.
18908         * decl2.c (finish_file): Emit DWARF debugging info for static data
18909         members.
18910
18911 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
18912
18913         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
18914         isn't the same as the new one before we whack it.
18915
18916 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
18917
18918         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
18919         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
18920         warn_traditional and warn_strict_prototypes; remove ancient
18921         'overload' code; remove references to flag_traditional.
18922
18923 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
18924
18925         * input.c (sub_getch): Handle 8-bit characters in string literals.
18926
18927 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
18928
18929         * tree.c (mapcar): Handle CONSTRUCTORs.
18930         (copy_to_permanent): Handle expression_obstack properly.
18931
18932         * Make-lang.in (cplib2.txt): Also depend on the headers.
18933
18934         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
18935         INT_TYPE_SIZE.
18936         (expand_class_desc): Use USItype for offset field.
18937         * tinfo.h (struct __class_type_info): Likewise.
18938
18939         * method.c (build_overload_int): TYPE_PRECISION should be applied
18940         to types.
18941
18942 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
18943
18944         * call.c (build_new_op): A COND_EXPR involving void must be a
18945         builtin.
18946
18947 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
18948
18949         * typeck.c (build_x_component_ref): New fn.
18950         (build_object_ref): Use it.
18951         * parse.y (primary): Use it.
18952         * decl2.c (build_expr_from_tree): Use it.
18953         * cp-tree.h: Declare it.
18954
18955         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
18956         * error.c (dump_type_suffix): Handle variable arrays.
18957
18958 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18959
18960         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
18961
18962 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
18963
18964         * decl.c (lookup_name_real): Don't try to look up anything in a
18965         TYPENAME_TYPE.
18966
18967         * tinfo2.cc (__throw_type_match_rtti): Oops.
18968
18969 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18970
18971         * Make-lang.in (exception.o): Use -fno-PIC for now.
18972
18973 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
18974
18975         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
18976         calling them.
18977         (get_tinfo_fn_dynamic): Extracted from build_typeid.
18978         * tinfo2.cc (__dynamic_cast): Adjust.
18979
18980         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
18981         (build_x_typeid): Likewise.
18982
18983         * parse.y: Call build_x_typeid instead of build_typeid.
18984         * cp-tree.def: Add TYPEID_EXPR.
18985         * pt.c (tsubst_copy): Handle typeid.
18986         * decl2.c (build_expr_from_tree): Likewise.
18987         * rtti.c (build_x_typeid): Throw bad_typeid from here.
18988         (build_typeid): Not here.
18989         * cp-tree.h: Declare build_x_typeid.
18990
18991 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
18992
18993         * call.c (convert_like): Pull out constant values.
18994
18995         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
18996
18997 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
18998
18999         * decl.c (init_decl_processing): Create short int types before
19000         creating size_t in case a machine description needs to use
19001         unsigned short for size_t.
19002
19003 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
19004
19005         * Make-lang.in (exception.o): Turn off pic.
19006
19007         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
19008         type, multi-level ptr conversions.
19009
19010         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
19011         (throw_bad_cast): Use it.
19012         (throw_bad_typeid): New fn.
19013         (build_typeid): Throw bad_typeid as needed.
19014         Use build_call.
19015         (synthesize_tinfo_fn): Handle functions and arrays before checking
19016         for cv-quals.
19017
19018         * Remove .h from standard C++ headers, add new.h, move into inc
19019         subdirectory.
19020
19021         * exception*: Remove pointer from object, constructors.  Add
19022         default exception::what that uses type_info::name.  Add
19023         __throw_bad_typeid.
19024
19025         * init.c (build_new): Don't add a cookie to new (void *) T[2].
19026
19027 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
19028
19029         * Make-lang.in: Building C++ code depends on cc1plus.
19030
19031 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19032
19033         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
19034         a HOST_WIDE_INT, not a tree.
19035
19036 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
19037
19038         * exception.cc: Don't include <stdlib.h>.
19039
19040         * Make-lang.in (c++.clean): Remove cplib2.*.
19041
19042 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
19043
19044         * parse.y (component_decl_1, component_costructor_declarator case):
19045         Pass attributes/prefix_attributes in tree list.
19046
19047 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
19048
19049         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
19050
19051 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
19052
19053         * lex.c (do_identifier): Don't do deferred lookup in a template
19054         header.
19055
19056         * typeck2.c (store_init_value): Oops.
19057
19058         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
19059         New files for C++ lang-support library.
19060         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
19061         (CXX_LIB2FUNCS): Define.
19062         And rules for building the C++ lang-support code.
19063         * config-lang.in (headers): Define.
19064         (lib2funcs): Define.
19065
19066 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
19067
19068         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
19069         digest_init.
19070         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
19071         * typeck2.c (store_init_value): Check for initializing pmf with { }
19072         here.
19073         (process_init_constructor): Not here.
19074
19075 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
19076
19077         * pt.c (begin_template_parm_list): Increment
19078         processing_template_decl here.
19079         (end_template_parm_list): Not here.
19080         (process_template_parm): No need to add 1 to it now.
19081         * *.c: Use processing_template_decl instead of current_template_parms
19082         to check for being in a template.
19083
19084         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
19085         (tsubst_copy): Handle CONSTRUCTOR.
19086         (instantiate_decl): Set up context properly for variables.
19087         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
19088         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
19089
19090 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19091
19092         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
19093
19094 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
19095
19096         * method.c (make_thunk): Call comdat_linkage before setting the
19097         TREE_CODE.
19098
19099         * decl2.c (comdat_linkage): Use make_decl_one_only.
19100         (import_export_decl): Likewise.
19101         * decl.c (init_decl_processing): Check supports_one_only instead of
19102         SUPPORTS_WEAK.
19103
19104 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
19105
19106         * decl2.c (grokfield): Tighten checking for access decls.
19107
19108         * decl.c (make_typename_type): Resolve references to
19109         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
19110         (lookup_name_real): Types that depend on a template parameter get
19111         an implicit 'typename' unless they're in the current scope.
19112         (start_decl_1): We don't care about incomplete types that depend
19113         on a template parm.
19114         (grokdeclarator): Resolve 'typename's in the type specifier that
19115         refer to members of the current scope.
19116
19117         * call.c (build_over_call): Remove 'inline called before
19118         definition' diagnostic.
19119         (build_method_call): Likewise.
19120         * decl.c (duplicate_decls): Downgrade 'used before declared
19121         inline' to a warning, only with -Winline.
19122
19123 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
19124
19125         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
19126
19127 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
19128
19129         * call.c (build_method_call): When calling a signature
19130         default implementation, as in other cases, let instance_ptr simply
19131         be instance.
19132
19133 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
19134
19135         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
19136
19137 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
19138
19139         * except.c (expand_start_catch_block): Add a pushlevel so that -g
19140         works on hppa and SPARC.
19141
19142 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19143
19144         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
19145
19146 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
19147
19148         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
19149         before testing whether it's a signature.
19150
19151 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
19152
19153         * call.c (build_new_method_call): Don't complain about signature
19154         pointers and references not being an aggr type.
19155         (build_this): If a signature pointer or reference was passed in,
19156         just return it.
19157         (build_new_method_call): If instance is a signature pointer, set
19158         basetype to the signature type of instance.
19159         * sig.c (build_signature_method_call): Deleted basetype and
19160         instance parameters, they can be found as the DECL_CONTEXT of
19161         function and as the first argument passed in.
19162         * cp-tree.h: Changed declaration of build_signature_method_call.
19163         * call.c (build_method_call): Deleted first two arguments in call
19164         of build_signature_method_call.
19165         (build_over_call): Added call to build_signature_method_call.
19166
19167 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
19168
19169         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
19170         target_expr.
19171
19172 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19173
19174         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
19175
19176 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
19177
19178         * except.c (expand_start_try_stmts): Move to except.c in the backend.
19179         (expand_end_try_stmts): Remove.
19180
19181         * init.c (perform_member_init): Use add_partial_entry () instead
19182         of directly manipulating lists.
19183         (emit_base_init): Likewise.
19184
19185 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
19186
19187         * except.c (expand_exception_blocks): Always make sure USE and
19188         CLOBBER insns that came at the end still do, the backend relies
19189         upon this.
19190
19191 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
19192
19193         * call.c (build_over_call): We can only use a TARGET_EXPR of the
19194         right type.
19195
19196 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
19197
19198         * cvt.c (convert_to_reference): Revert last change, don't complain
19199         about temp without target decl.
19200
19201 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
19202
19203         * decl.c (grokdeclarator): Don't core dump when void() is given.
19204
19205 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
19206
19207         * decl.c (copy_args_p): Don't crash.
19208
19209 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
19210
19211         * pt.c (tsubst): And support template args inside the exception
19212         specification.
19213
19214         * pt.c (tsubst): Add support for exception specifications in
19215         template functions.
19216
19217 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
19218
19219         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
19220         fields now.
19221         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
19222         (start_function): Likewise.
19223         (start_method): Likewise.
19224         (grokfield): Likewise.
19225         (make_call_declarator): Add throw spec parameter.
19226         (set_quals_and_spec): Add routine.
19227         * lex.c (set_quals_and_spec): Likewise.
19228         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
19229         * decl.c (shadow_tag): Eliminate the throw spec parameter to
19230         grokdeclarator.
19231         (groktypename): Likewise.
19232         (start_decl): Eliminate the throw spec parameter.  Eliminate the
19233         throw spec parameter to grokdeclarator.  Eliminate the throw spec
19234         field in DECL_STMT.
19235         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
19236         (grokfndecl): Remove useless set of raises.
19237         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
19238         the throw spec parameter to start_decl.  Pull the throw spec out
19239         of the call declarator.
19240         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
19241         (start_function): Eliminate the throw spec parameter.  Eliminate
19242         the throw spec parameter to grokdeclarator.
19243         (start_method): Likewise.
19244         * decl2.c (grokfield): Likewise.
19245         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
19246         (grokoptypename): Likewise.
19247         (finish_file): Eliminate the throw spec parameter to
19248         start_function.  Add throw spec to make_call_declarator.
19249         * except.c (init_exception_processing): Add throw spec to
19250         make_call_declarator.  Eliminate the throw spec parameter to
19251         start_decl.
19252         (expand_start_catch_block): Eliminate the throw spec parameter to
19253         grokdeclarator.
19254         (expand_builtin_throw): Add throw spec to make_call_declarator.
19255         Eliminate the throw spec parameter to start_function.
19256         (start_anon_func): Likewise.
19257         * lex.c (make_call_declarator): Add throw spec parameter.
19258         (set_quals_and_spec): New routine.
19259         (cons_up_default_function): Add throw spec to make_call_declarator.
19260         Eliminate the throw spec parameter to grokfield.
19261         * method.c (synthesize_method): Eliminate the throw spec parameter
19262         to start_function.
19263         * pt.c (process_template_parm): Eliminate the throw spec parameter
19264         to grokdeclarator.
19265         (tsubst): Add throw spec to make_call_declarator.
19266         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
19267         (do_function_instantiation): Eliminate the throw spec parameter to
19268         grokdeclarator.  Eliminate the throw spec parameter to
19269         start_function.
19270         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
19271         to start_function.
19272         * parse.y (datadef): Remove non-winning optimization.
19273         (decl): Likewise.
19274         (fndef): Remove ambiguous error productions uncovered by grammar
19275         fixing.
19276         (constructor_declarator): Add exception_specification_opt here.
19277         (component_constructor_declarator): Likewise.
19278         (direct_after_type_declarator): Likewise.
19279         (complex_direct_notype_declarator): Likewise.
19280         (direct_abstract_declarator): Likewise.
19281         (fn.def1): Remove exception_specification_opt.
19282         (fn.def2): Likewise.
19283         (condition): Likewise.
19284         (initdcl0): Likewise.
19285         (initdcl): Likewise.
19286         (notype_initdcl0): Likewise.
19287         (nomods_initdcl0): Likewise.
19288         (component_decl_1): Likewise.
19289         (component_declarator): Likewise.
19290         (after_type_component_declarator0): Likewise.
19291         (after_type_component_declarator): Likewise.
19292         (notype_component_declarator): Likewise.
19293
19294 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19295
19296         * call.c (build_over_call): Also use an INIT_EXPR when
19297         initializing anything from an rvalue.
19298
19299         * call.c (build_over_call): Call stabilize_reference when building
19300         an INIT_EXPR instead of calling the copy ctor.
19301
19302         * call.c (joust): Extend the previous change to all comparisons.
19303
19304         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
19305         NO_LINKAGE_HEURISTICS.
19306
19307         * decl2.c (finish_file): Emit any statics that weren't already.
19308
19309         * typeck.c (build_static_cast): Implement.
19310         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
19311         * decl.c (grokparms): Use can_convert_arg instead of
19312         implicit_conversion directly.
19313         (copy_args_p): New fn.
19314         * cvt.c (convert_to_reference): Don't complain about temp with
19315         static_cast.
19316         (build_up_reference): Handle TARGET_EXPRs.
19317         * call.c (build_over_call): Elide unnecessary temps.
19318         (can_convert*): Use new overloading code.
19319
19320 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
19321
19322         * call.c: Move TYPE_PTR*_MACROS ...
19323         * cp-tree.h: To here.
19324         * typeck.c (build_reinterpret_cast): Implement.
19325
19326         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
19327         ptr_complete_ob.
19328         (joust): If we're comparing a function to a builtin and the worst
19329         conversion for the builtin is worse than the worst conversion for the
19330         function, take the function.
19331
19332         * typeck.c (build_const_cast): Implement.
19333         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
19334         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
19335
19336 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
19337
19338         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
19339         too early.  Make sure we explode if exprtype turns out to be a
19340         NULL_TREE when it shouldn't be.
19341
19342 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
19343
19344         * cp-tree.h: New routine make_call_declarator.
19345         * lex.c (make_call_declarator): Define it.
19346         * except.c (init_exception_processing): Use it.
19347         (expand_builtin_throw): Likewise.
19348         (start_anon_func): Likewise.
19349         * decl2.c (finish_file): Likewise.
19350         * lex.c (cons_up_default_function): Likewise.
19351         * parse.y: Likewise.
19352         * pt.c (tsubst): Likewise.
19353
19354 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
19355
19356         * decl2.c (groktypefield): Remove unused code.
19357
19358 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
19359
19360         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
19361         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
19362         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
19363         nonempty_cv_qualifiers.
19364         * hash.h: Rebuild.
19365
19366         * lex.c (make_pointer_declarator): Change type_quals into
19367         cv_qualifiers.
19368         (make_reference_declarator): Likewise.
19369
19370 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
19371
19372         * decl.c (start_function): Only check interface_* for templates
19373         with flag_alt_external_templates.
19374
19375         * call.c (build_new_op): Check for comparison of different enum types.
19376         (build_over_call): Fix arg # output.
19377
19378         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
19379
19380 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
19381
19382         * call.c (build_new_op): Check for erroneous args.
19383
19384         * call.c (build_new_method_call): Add missing args to cp_error.
19385
19386         * tree.c (error_type): Don't print reference-to-array.
19387
19388         * typeck.c (convert_for_assignment): Don't say contravariance for
19389         removing const.
19390
19391 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
19392
19393         * call.c (build_over_call): Diagnose bad convs for `this'.
19394
19395         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
19396         on _ctor_arg.
19397
19398         * call.c (convert_like): Handle bad convs.
19399         (build_over_call): Handle bad convs better.
19400
19401         * decl2.c: -fansi-overloading is now the default.
19402
19403         * call.c (build_new_method_call): Check for erroneous args.
19404
19405         * pt.c (instantiate_class_template): Propagate
19406         TYPE_USES_MULTIPLE_INHERITANCE.
19407
19408 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
19409
19410         * call.c (enforce_access): Add static to routine.
19411
19412 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
19413
19414         * call.c (build_user_type_conversion_1): Fix bad handling.
19415         (compare_ics): Likewise.
19416
19417 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
19418
19419         * call.c (standard_conversion): Oops.
19420
19421 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
19422
19423         * g++.c: Update test for win32 (&& ! cygwin32).
19424
19425 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
19426
19427         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
19428         (ptr_reasonably_similar): New fn.
19429         * call.c (BAD_RANK): New rank.
19430         (ICS_BAD_FLAG): New macro.
19431         (standard_conversion): Handle almost-right pointer conversions.
19432         (reference_binding): Handle bad rvalue bindings.
19433         (add_*_candidate): Stuff.
19434         (build_over_call): Pass bad conversions to convert_for_initialization.
19435         (compare_ics): Handle bad convs.
19436         (joust): Likewise.
19437
19438 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
19439
19440         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
19441         integer_type_node when computing pointer offsets.
19442
19443 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
19444
19445         * tree.c (lvalue_type): New fn.
19446         (error_type): New fn.
19447         * call.c (op_error): Use error_type.
19448         (add_conv_candidate): Use lvalue_type.
19449         (add_builtin_candidates): Likewise.
19450         * error.c (args_as_string): Use error_type.
19451
19452 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
19453
19454         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
19455         (tsubst): Not here.
19456
19457         * decl.c (init_decl_processing): With -ansi, __null's type is the
19458         signed integral type with the same number of bits as a pointer.
19459         Introduce a new variable null_node for it.
19460         * cp-tree.h: Adjust.
19461         * call.c (null_ptr_cst_p): Adjust.
19462
19463 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
19464
19465         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
19466         optimize.
19467
19468 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
19469
19470         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
19471         fns of classes without virtual functions.
19472
19473         * call.c (add_function_candidate): Handle `this' specially.
19474         (compare_ics): Likewise.
19475
19476 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
19477
19478         * typeck.c (build_conditional_expr): Fix handling of __null.
19479
19480         * decl2.c (comdat_linkage): New fn.
19481         (import_export_vtable): Use it.
19482         (import_export_decl): Use it.
19483         * method.c (make_thunk): Use it.
19484
19485 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
19486
19487         * pt.c (end_template_decl): If we don't actually have parms, return.
19488         * parse.y (template_header): Accept 'template <>'.
19489
19490         * errfn.c: Allow 5 args.
19491
19492 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
19493
19494         * tree.c (make_temp_vec): New fn.
19495         * pt.c (push_template_decl): Handle partial specs.
19496         (instantiate_class_template): Likewise.
19497         (more_specialized): Use get_bindings.
19498         (more_specialized_class): New fn.
19499         (get_class_bindings): New fn.
19500         (most_specialized_class): New fn.
19501         (do_function_instantiation): List candidates for ambiguous case.
19502         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
19503         (shadow_tag): Call push_template_decl for partial specializations.
19504         * parse.y: Likewise.
19505         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
19506         DECL_TEMPLATE_MEMBERS.
19507         * call.c (print_z_candidates): Reduce duplication.
19508
19509 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
19510
19511         * decl2.c (lang_decode_option): Allow -fansi-overloading.
19512
19513 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
19514
19515         * pt.c (get_bindings): New fn.
19516         (most_specialized): Likewise.
19517         (do_function_instantiation): Use them.
19518         (add_maybe_template): New fn.
19519         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
19520         * call.c (build_new_op): Handle guiding decls.
19521         (build_new_function_call): Likewise.
19522         * decl2.c (finish_file): Likewise.
19523
19524         * decl2.c (mark_used): Do synthesis here.
19525         * call.c (build_method_call): Not here.
19526         (build_over_call): Or here.
19527         * typeck.c (build_function_call_real): Or here.
19528         * tree.c (bot_manip): Call mark_used on functions used in default
19529         args.
19530
19531 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
19532
19533         * decl2.c (import_export_vtable): Delete code that disabled vtable
19534         heuristic on systems with ASM_OUTPUT_EXTERNAL.
19535
19536 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
19537
19538         * typeck.c (build_x_function_call): Handle static call context
19539         better.
19540
19541         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
19542         the function, not its outer block.
19543
19544         * call.c (build_field_call): Pass fields on to build_opfncall
19545         regardless of TYPE_OVERLOADS_CALL_EXPR.
19546         (build_method_call): Pass on to build_new_method_call sooner.
19547
19548         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
19549         gives us.
19550         * class.c (instantiate_type): Don't put a POINTER_TYPE to
19551         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
19552         modifying it.
19553
19554 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
19555
19556         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
19557         (add_builtin_candidate): Don't take enums for ++.
19558         (build_new_method_call): Handle non-aggregates and field calls.
19559         Move new overloading code from...
19560         * cvt.c: Here.
19561
19562         * decl.c (grokparms): Don't check default args in templates.
19563
19564 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
19565
19566         * cvt.c (build_new_op): Fix args to build_unary_op.
19567         (add_builtin_candidates): Don't call type_promotes_to on float.
19568
19569         * decl.c (grokparms): Check the type of the default arg.
19570
19571         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
19572         returning NULL_TREE.
19573
19574         * typeck.c (build_x_binary_op): Avoid doing extra work.
19575         (build_x_unary_op): Likewise.
19576         (build_x_conditional_expr): Likewise.
19577         * cvt.c (build_over_call): Return.
19578         (add_builtin_candidate): Fix MEMBER_REF.
19579         (build_new_op): Likewise.
19580
19581 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
19582
19583         * method.c (build_overload_name): Put bug fix into code but leave
19584         disabled for now so we can be bug compatible with older releases
19585         that do repeats incorrectly.  In the future, we can enable it.
19586
19587 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
19588
19589         * cvt.c (convert_like): Don't call build_cplus_new twice.
19590
19591         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
19592         Control new overloading code with -fansi-overloading.
19593
19594 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
19595
19596         * cvt.c (build_over_call): Call build_cplus_new.
19597         * call.c (build_method_call): Likewise.
19598         * typeck.c (build_function_call_real): Likewise.
19599         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
19600         the COND_EXPR in a TARGET_EXPR so they use the same slot.
19601
19602         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
19603         recursive calls.
19604         * typeck.c (complete_type): Propagate
19605         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
19606
19607 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
19608
19609         * cvt.c (joust): More ?: kludging.  Sigh.
19610         (build_over_call): Don't try to synthesize global fns.
19611
19612         * search.c (lookup_conversions): Use binfo marking.
19613
19614 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
19615
19616         * search.c (build_mi_matrix): Use the correct value of cid
19617         when determining the new mi_size.
19618
19619 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
19620
19621         * cvt.c (add_builtin_candidates): Do consider type conversion ops
19622         for the first parms of += et al.
19623         (strip_top_quals): New fn.
19624         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
19625         (implicit_conversion): Likewise.
19626         (add_builtin_candidates): Be careful about arrays.
19627         (build_new_method_call): Handle vtable optimization.
19628
19629 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
19630
19631         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
19632         * cvt.c (reference_binding): Use it.
19633         (implicit_conversion): Use it.
19634         (add_builtin_candidate, COND_EXPR): Use it.
19635
19636         * cvt.c (build_new_function_call): Check for error args.
19637
19638         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
19639
19640         * gxx.gperf: Add __null.
19641         * hash.h: Regenerate.
19642         * lex.h: Add RID_NULL.
19643         * lex.c (init_lex): Create null_pointer_node here, stick it in
19644         RID_NULL.
19645         * decl.c (init_decl_processing): Still set its type here.
19646         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
19647         (convert_to_pointer_force): Likewise.
19648         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
19649         if (! pedantic).
19650         * call.c (convert_harshness): Use null_ptr_cst_p.
19651         * typeck.c (convert_for_assignment): Likewise.  Don't produce
19652         null_pointer_node.
19653
19654         * error.c (args_as_string): Handle lists of actual args, too.
19655         * cvt.c (null_ptr_cst): Support (void*)0 for now.
19656         (build_user_type_conversion_1): Improve diagnostics.
19657         (build_new_function_call): Likewise.
19658         (build_object_call): Likewise.
19659         (build_new_method_call): Likewise.  Move call before def diagnostic...
19660         (build_over_call): Here.
19661
19662         * cvt.c (build_new_method_call): Don't complain about no match if
19663         LOOKUP_SPECULATIVELY.
19664         (build_over_call): Fix 'this' for virtual fn.
19665         (build_new_method_call): Add diagnostic.
19666
19667 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
19668
19669         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
19670         constructors to be passed in.
19671         (build_over_call): Likewise.
19672         (build_user_type_conversion_1): Pass them in.
19673         (convert_like): Likewise.
19674         (build_object_call): Handle overloaded conversions.
19675         (build_over_call): Pass the right args to build_vfn_ref.
19676         (standard_conversion): Fix pmf convs.
19677         (joust): Handle comparing statics and non-statics.
19678         (build_new_method_call): New fn.
19679         * call.c (build_method_call): Call it if NEW_OVER.
19680
19681 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
19682
19683         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
19684         %D instead.
19685
19686 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
19687
19688         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
19689         instead of just maybe_build_cleanup so that we deallocate the
19690         thrown object.
19691
19692 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19693
19694         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
19695         * cp-tree.h (finish_prevtable_vardecl): Add decl.
19696
19697 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
19698
19699         * pt.c (instantiate_class_template): Call complete_type.  Also, if
19700         we're at the end of the file and we just instantiated a template
19701         class with a vtable, call finish_prevtable_vardecl.
19702
19703         * error.c (dump_decl): Don't explode (or explode more gracefully
19704         as appropriate) if the object being dumped has a null type.
19705         (dump_expr): Likewise.
19706
19707         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
19708         by counting the number of nodes that we'll need before allocating
19709         the array.
19710         (lookup_fnfields): Fix comment.
19711         (breadth_first_search): Fix comment.
19712
19713 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
19714
19715         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
19716         TYPE_ALIGN.
19717         * class.c (finish_struct): Call cplus_decl_attributes here.
19718         (finish_struct_1): Not here.
19719         * cp-tree.h: Adjust.
19720
19721         * pt.c (type_unification): New parameter STRICT.
19722         (unify): If STRICT, don't allow cv addition or base deduction.
19723         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
19724
19725 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
19726
19727         * search.c (get_template_base{_recursive}): New fns.
19728         * pt.c (more_specialized): New fn.
19729         (do_function_instantiation): Use it.
19730         (unify): Handle base deduction.
19731         * cvt.c (joust): Use more_specialized.
19732         Don't arbitrarily choose between non-builtin candidates.
19733         (build_over_call): Call require_complete_type.
19734
19735         * decl.c (start_function): Statics are static even in a #pragma
19736         interface file.
19737
19738         * decl2.c (import_export_vtable): Disable vtable heuristic on
19739         systems with ASM_OUTPUT_EXTERNAL.
19740
19741         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
19742         (standard_conversion): No std conv to enum type.
19743
19744         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
19745         for ptm's.
19746
19747         * cvt.c (reference_binding): Bind directly to a base subobject of
19748         a class rvalue.
19749
19750         * cvt.c (build_new_op): Enforce access control.
19751
19752 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
19753
19754         * typeck2.c (process_init_constructor): When scanning the
19755         union for a named field, skip things that aren't FIELD_DECLs.
19756
19757         * method.c (synthesize_method): Don't scan fndecl's rtl if
19758         we're at the end of the file; just assume the function can't
19759         be inlined.
19760
19761 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19762
19763         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
19764         it failed.
19765
19766         * cvt.c (build_user_type_conversion_1): Handle overloaded
19767         conversion ops.
19768
19769         * cvt.c (add_builtin_candidates): Don't consider type conversion
19770         operators for the first parameter of operator=.
19771
19772 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
19773
19774         * typeck.c (complete_type): Only call layout_type if we're not
19775         expanding a template.
19776
19777 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
19778
19779         * cvt.c (compare_ics): Oops.
19780
19781         * cvt.c (op_error): Oops.
19782
19783         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
19784         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
19785         (build_conv): Use them.
19786         (implicit_conversion): Use them.
19787         (convert_like): Handle them.
19788         (build_new_op): Handle builtin COND_EXPR again.
19789         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
19790         in lists of types for COND_EXPR.
19791         (add_builtin_candidate): Add enum candidates for COND_EXPR.
19792
19793 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
19794
19795         * typeck.c (build_modify_expr): Always attempt to build a call to
19796         the assignment operator, even if we're using a default one.
19797         (convert_for_initialization): Call complete_type.
19798
19799 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
19800
19801         * cvt.c (reference_binding): A REF_BIND gets the reference type.
19802         (implicit_conversion): Likewise.
19803         (convert_like): Likewise.
19804         (compare_ics): Likewise.
19805         (compare_qual): Likewise.
19806         (print_z_candidates): Handle no candidates.
19807         (build_new_op): Don't handle builtin COND_EXPR for now.
19808
19809 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
19810
19811         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
19812
19813 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
19814
19815         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
19816
19817         * cvt.c (build_builtin_candidate): Oops.
19818         (build_new_op): Oops.
19819
19820         * method.c (build_opfncall): Pass COND_EXPR on.
19821         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
19822         (add_builtin_candidate{,s}): Likewise.
19823         (add_builtin_candidates): Likewise.
19824         (print_z_candidates, op_error, build_new_op): Likewise.
19825         (type_decays_to): New fn.
19826         * lex.c (init_lex): Just say ?: for COND_EXPR.
19827
19828 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
19829
19830         * typeck.c (complete_type): Call layout_type rather than building
19831         a new array type.
19832
19833         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
19834         only use ptrdiff_t.
19835
19836 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
19837
19838         * cvt.c: Always compile the new overloading code (but don't use it).
19839         (implicit_conversion): Add a BASE_CONV when converting to
19840         the same class type.
19841         (convert_like): Handle BASE_CONV.
19842
19843 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19844
19845         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
19846         (add_builtin_candidate): Likewise.
19847
19848         NEW_OVER changes:
19849         * typeck.c (build_x_function_call): Try an operator function
19850         whenever we call an object of class type.
19851         * method.c (build_opfncall): Pass CALL_EXPRs through.
19852         * cvt.c (implicit_conversion): Do const-ref case first.
19853         (add_conv_candidate, build_object_call, op_error): New fns.
19854         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
19855         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
19856         builtin candidates.
19857         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
19858         Fall back on preincrement handling.  Use op_error.
19859         Handle warn_synth.
19860         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
19861         an error_mark_node.
19862         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
19863         properly.
19864
19865 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
19866
19867         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
19868
19869 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
19870
19871         * typeck.c (build_component_ref_1): Use build_component_ref
19872         instead of open coding it here.
19873
19874 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
19875
19876         * g++.c (main): Don't link with -lg++.
19877
19878         NEW_OVER changes:
19879         * cvt.c (convert_to_reference): Don't use convert_from_reference on
19880         result of build_type_conversion.
19881         (cp_convert): Only call build_method_call for ctors if
19882         build_type_conversion failed.
19883         (ptr_complete_ob): New function.
19884         (TYPE_PTR{,OB,MEM}_P): New macros.
19885         ({add,build}_builtin_candidate{,s}): New functions.
19886         (print_z_candidates): Handle builtins.
19887         (build_user_type_conversion_1): Don't use conversion fns for
19888         converting to a base type.
19889         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
19890         (build_user_type_conversion): Use convert_from_reference.
19891         (build_new_op): New function.
19892         (build_over_call): Fix handling of methods.
19893         (compare_ics): Handle AMBIG_CONV properly.
19894         * typeck2.c: Increment abort count.
19895         * method.c (build_opfncall): Forward most requests to build_new_op.
19896         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
19897
19898 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19899
19900         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
19901         invalid second argument to dump_expr_list.
19902
19903 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
19904
19905         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
19906
19907 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
19908
19909         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
19910         ASSEMBLE_EXTERNAL.
19911
19912 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
19913
19914         * typeck2.c (process_init_constructor): New pedwarn for using { }
19915         to initialize a pointer to member function.
19916         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
19917         we can avoid the new error.
19918
19919 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
19920
19921         * typeck.c (build_ptrmemfunc1): New function to hide details of
19922         pointer to member functions better.
19923
19924 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
19925
19926         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
19927         methods into the actual method, as we know the implied object is
19928         not used.
19929
19930 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19931
19932         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
19933         inside a system header.
19934
19935 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
19936
19937         * call.c (build_method_call): Call complete_type on the
19938         instance type.
19939
19940 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
19941
19942         * typeck.c (build_component_ref): Always build up an OFFSET_REF
19943         for obj_ptr->func so that we can know which object to use in a
19944         method call.
19945
19946 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
19947
19948         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
19949         around things.  Also improve maintainability.
19950
19951 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
19952
19953         * decl.c (grokdeclarator): Check for overflow when evaluating an
19954         array dimension.
19955
19956 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
19957
19958         * cvt.c (cp_convert): Don't check for ambiguity with constructor
19959         if NEW_OVER.
19960
19961         * typeck.c (build_x_function_call): Pass function overload
19962         questions to new overloading code if NEW_OVER.
19963         * init.c (expand_aggr_init_1): Only check for type conversion ops
19964         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
19965         Don't check for ambiguity with constructor if NEW_OVER.
19966         * cvt.c (convert_to_reference): Dereference the result of a type
19967         conversion operator.
19968         (build_conv): Propagate ICS_USER_FLAG.
19969         (implicit_conversion): Call instantiate_type.
19970         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
19971         (add_function_candidate): Fix cv-quals on argtype.
19972         (print_z_candidates): New function.
19973         (build_new_function_call): Call it.
19974         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
19975         consider non-converting constructors.
19976         Call print_z_candidates.
19977         Return an AMBIG_CONV for an ambiguous conversion.
19978         (build_user_type_conversion): Handle AMBIG_CONV.
19979         (convert_like): Fix test for building TARGET_EXPR.
19980         Call instantiate_type.
19981         Handle AMBIG_CONV and LVALUE_CONV.
19982         (build_over_call): Handle 0 args and ellipsis.
19983         * cp-tree.def: Add AMBIG_CONV.
19984
19985 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
19986
19987         * decl.c (lookup_name_real): If we find mem in obj when parsing
19988         `obj->mem', make sure we return the right value.
19989
19990 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
19991
19992         * search.c (get_base_distance): Call complete_type.
19993
19994 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
19995
19996         * decl.c (store_bindings): Make static.
19997
19998 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
19999
20000         * init.c (expand_aggr_init_1): Don't check type conversions if
20001         NEW_OVER.
20002
20003         * cvt.c (z_candidate): Put back template field.
20004         (add_function_candidate): Set it.
20005         (add_template_candidate): Likewise.
20006         (joust): Use it.
20007         (compare_qual): Handle references and pointers to members.
20008         (compare_ics): Handle reference bindings.
20009
20010         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
20011
20012 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
20013
20014         * call.c (compute_conversion_costs): Call complete_type.
20015
20016         * tree.c (vec_binfo_member): Use comptypes instead of comparing
20017         pointers, so we can handle template parameters.
20018
20019 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
20020
20021         * cvt.c (cp_convert_to_pointer): We have to call complete_type
20022         here; let's make it explicit instead of a side effect of an
20023         error check.
20024
20025 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
20026
20027         * cvt.c (z_candidate): Remove template field.
20028         (reference_binding): Handle binding to temporary.
20029         (implicit_conversion): Likewise.
20030         (add_function_candidate): Handle artificial constructor parms.
20031         Handle functions with too few parms.
20032         (add_template_candidate): New function.
20033         (build_user_type_conversion_1): Handle constructors.
20034         (convert_like): Likewise.
20035         (build_over_call): Likewise.
20036         (build_new_function_call): Support templates.
20037         (compare_ics): Fix reference, inheritance handling.
20038
20039 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
20040
20041         * decl.c: Add signed_size_zero_node.
20042         (init_decl_processing): Build it.
20043         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
20044         when we're trying to make a negative delta.
20045
20046 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20047
20048         Stop doing this damn index==strchr variable name confusion.
20049         * class.c (add_virtual_function): Change local var INDEX to be
20050         named IDX.
20051         (add_method): Likewise.
20052         * lex.c (print_parse_statistics): Likewise.
20053         * search.c (make_memoized_table_entry): Likewise.
20054         (lookup_fnfields_here): Likewise.
20055         (lookup_field): Likewise.
20056         (lookup_fnfields): Likewise.
20057         (get_baselinks): Likewise.
20058         * sig.c (build_signature_table_constructor): Likewise.
20059         (build_signature_method_call): Likewise.
20060         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
20061         (get_member_function_from_ptrfunc): Likewise.
20062         (build_ptrmemfunc): Change local var INDEX to be IDX.
20063         (c_expand_start_case): Likewise.
20064
20065 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
20066
20067         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
20068         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
20069         (convert_to_reference): Use build_type_conversion to convert to
20070         the reference type directly.
20071         (standard_conversion): Fix void* case, non-conversions.
20072         (reference_binding): Fix expr == 0 case, non-conversions.
20073         (convert_like): Support REF_BIND.
20074         (compare_qual): Split out from compare_ics.
20075         (compare_ics): Use it, handle icses with only a qual_conv.
20076
20077         * init.c (expand_vec_init): Don't crash if decl is NULL.
20078
20079 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
20080
20081         * mpw-config.in: New file, configury for Mac MPW.
20082         * mpw-make.sed: New file, makefile editing for MPW.
20083
20084 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20085
20086         * pt.c (instantiate_class_template): Call repo_template_used.
20087
20088         * search.c (lookup_conversions): Only lookup conversions in
20089         complete types.
20090
20091 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20092
20093         * cp-tree.def: Renamed from tree.def, to avoid confusion with
20094         gcc's tree.def.
20095         * cp-tree.h, lex.c: Include cp-tree.def.
20096         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
20097
20098 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
20099
20100         * init.c (build_vec_delete_1): Call complete_type.
20101
20102 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
20103
20104         * except.c (start_anon_func): Make sure anonymous functions are
20105         never external.
20106
20107 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
20108
20109         * decl.c (finish_function): If function_depth > 1, set nested.
20110
20111         * decl2.c (grokbitfield): Revert Bob's change.
20112         * class.c (finish_struct_1): Fix handling of named bitfield widths.
20113
20114 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
20115
20116         * pt.c (add_pending_template): Handle types.
20117         (lookup_template_class): With -fexternal-templates, just add the class
20118         to pending_templates instead of instantiating it now.
20119         * decl2.c (finish_file): Handle types in pending_templates.
20120
20121 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
20122
20123         * decl2.c (grokbitfield): Handle constant decls appropriately.
20124         Give an appropriate error message now instead of spewing core
20125         later.
20126
20127 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
20128
20129         * decl2.c: Don't turn on thunks by default for now.
20130
20131 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
20132
20133         * typeck.c (complete_type): Handle error_mark_node.
20134         (common_type, OFFSET_TYPE): Handle template_type_parms.
20135
20136 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
20137
20138         * pt.c (instantiate_decl): If at_eof, call import_export_decl
20139         regardless of DECL_INLINE.
20140
20141         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
20142
20143         * class.c (finish_struct_bits): Copy TYPE_SIZE.
20144
20145         * rtti.c (build_dynamic_cast): Support templates.
20146         * tree.def: Support DYNAMIC_CAST_EXPR.
20147         * pt.c (tsubst_copy): Likewise.
20148         * decl2.c (build_expr_from_tree): Likewise.
20149
20150 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
20151
20152         * typeck.c (build_static_cast): Support templates.
20153         (build_const_cast): Likewise.
20154         * tree.def: Support CONST/STATIC_CAST_EXPR.
20155         * pt.c (tsubst_copy): Likewise.
20156         * decl2.c (build_expr_from_tree): Likewise.
20157
20158 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
20159
20160         * decl2.c (finish_vtable_vardecl): Don't trust
20161         TREE_SYMBOL_REFERENCED for vtables of local classes.
20162
20163 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
20164
20165         * pt.c (tsubst_copy): Handle operator T.
20166
20167 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20168
20169         * init.c (build_delete): Move creation of PARMS inside test of
20170         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
20171
20172 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
20173
20174         * typeck.c (build_conditional_expr): Don't assume that
20175         the arguments to ?: are always pointers or records.
20176
20177 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
20178
20179         * decl2.c (import_export_decl): Still emit static/weak/comdat
20180         copies of inline template functions with -fno-implicit-templates.
20181
20182 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
20183
20184         * init.c (build_delete): Determine the complete basetype
20185         path to the destructor we're calling.
20186
20187 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
20188
20189         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
20190         initialize the enum, because we really and truly don't know where
20191         it came from.
20192         (start_enum): Don't copy integer_zero_node because
20193         build_enumerator will do it.
20194
20195 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20196
20197         * decl.c (finish_function): Do access control on base destructors.
20198
20199         * pt.c (tsubst, case FUNCTION_DECL): Set up
20200         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
20201         hose us.
20202
20203 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
20204
20205         * cvt.c (build_up_reference): If we have already extended the
20206         lifetime of the temporary, don't try it again.
20207         * typeck.c (c_expand_return): Don't try and convert the return
20208         value twice when we want a reference, once is enough.
20209
20210 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
20211
20212         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
20213         LOOKUP_ONLYCONVERTING at all for now.
20214
20215         * search.c (add_conversions): Put the conversion function in
20216         TREE_VALUE, the basetype in TREE_PURPOSE.
20217         * cvt.c (build_type_conversion): Adjust.
20218         * cvt.c (build_expr_type_conversion): Adjust.
20219         * call.c (user_harshness): Adjust.
20220
20221 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
20222
20223         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
20224         backend's benefit.
20225
20226 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
20227
20228         * except.c (expand_start_catch_block): Add a dummy region, if we
20229         get an error, so that we can avoid core dumping later.
20230
20231 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
20232
20233         * cp-tree.h (OFFSET_REF): Remove.
20234         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
20235         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
20236         * init.c (expand_aggr_init_1): Likewise.
20237         (build_new): Likewise.
20238         * typeck.c (expand_target_expr): Likewise.
20239
20240 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
20241
20242         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
20243         TARGET_EXPR.
20244
20245 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
20246
20247         * cvt.c (build_up_reference): Redo how and when temporaries are
20248         created.
20249         * decl.c (grok_reference_init): Don't try and be smart about
20250         running cleanups.
20251
20252 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
20253
20254         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
20255         (TARGET_EXPR...), now that it has 4 arguments.
20256         * tree.c (build_cplus_new): Likewise.
20257
20258 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20259
20260         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
20261
20262         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
20263         * decl.c (struct saved_scope): Remove named_labels,
20264         {base,member}_init_list.
20265         (maybe_push_to_top_level): Don't set them.  Call
20266         push_cp_function_context if appropriate.
20267         (pop_from_top_level): Likewise.
20268
20269         * method.c (do_build_assign_ref): Remove obsolete check of
20270         TYPE_HAS_ASSIGN_REF (basetype).
20271
20272         * decl.c (grokfndecl): Diagnose user definition of
20273         implicitly-declared methods.
20274
20275 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
20276
20277         * method.c (do_build_copy_constructor): Add code to give
20278         meaningful error messages instead of crashing.
20279         (do_build_assign_ref): Don't synthesize assignment operators for
20280         classes containing reference or const members.
20281
20282         * class.c (struct base_info): Remove cant_synth_copy_ctor
20283         and cant_synth_asn_ref.
20284         (finish_base_struct): Remove the code that tries to conditionalize
20285         synthesis of copy constructors & assignment operators based on
20286         access permissions.  Instead, let it fail when it tries to
20287         synthesize the copy constructor.  This will give meaningful error
20288         messages instead of silently generating code to perform a bitcopy.
20289
20290 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
20291
20292         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
20293         determining types for constant values.
20294
20295         * decl.c (struct named_label_list): Use instead of stuffing
20296         random items into a TREE_LIST node.
20297         (named_label_uses): Use the new struct.
20298         (poplevel): Likewise.
20299         (lookup_label): Likewise.
20300         (define_label): Add an error message to tell the user the line
20301         where the goto is located in addition to the destination of the
20302         goto.
20303         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
20304         named_label_uses.
20305         (finish_function): Likewise.
20306
20307         (start_decl): Complain about defining a static data member
20308         in a different type from which it was declared.
20309
20310 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
20311
20312         * cvt.c (build_expr_type_conversion): Adjust.
20313
20314 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
20315
20316         * call.c (build_method_call): Always convert 'this' to the
20317         appropriate type.
20318
20319         * search.c (add_conversions): Put the conversion function in
20320         TREE_VALUE, the type in TREE_PURPOSE.
20321         * cvt.c (build_type_conversion): Adjust.
20322         * call.c (user_harshness): Adjust.
20323
20324         * method.c (emit_thunk): Call temporary_allocation and
20325         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
20326
20327         * tree.c (build_cplus_array_type): Handle tweaking of
20328         TYPE_MAIN_VARIANT here.
20329         * typeck.c (common_type): Not here.
20330
20331         * typeck.c (complete_type): Only try to complete an array type if
20332         it has a domain.
20333
20334 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
20335
20336         * decl.c (grokvardecl): Call complete_type.
20337         (grokdeclarator): Call complete_type for PARM_DECLs.
20338
20339 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
20340
20341         * pt.c (instantiate_class_template): Re-set
20342         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
20343
20344 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
20345
20346         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
20347         smart enough to do it right.
20348         * tree.c (cp_expand_decl_cleanup): Likewise.
20349         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
20350         cp_expand_decl_cleanup.
20351         (store_parm_decls): Likewise.
20352         (hack_incomplete_structures): Likewise.
20353         * except.c (push_eh_cleanup): Likewise.
20354
20355 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
20356
20357         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
20358         frontend to the backend where it belongs.
20359         * tree.c (unsave_expr): Likewise.
20360         (unsave_expr_now): Likewise.
20361         * tree.def (UNSAVE_EXPR): Likewise.
20362         * cp-tree.h (unsave_expr): Likewise.
20363         (unsave_expr_now): Likewise.
20364
20365 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
20366
20367         * init.c (emit_base_init): Make sure the partial EH cleanups live
20368         on the function_obstack.
20369
20370 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
20371
20372         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
20373         when checking for pointer types.
20374
20375 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
20376
20377         * pt.c (instantiate_class_template): Remove obsolete check for
20378         access declarations.
20379
20380 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
20381
20382         * call.c (build_overload_call): Simplify calls to
20383         build_overload_call by removing last parameter.
20384         (build_method_call): Likewise.
20385         * cp-tree.h: Likewise.
20386         * method.c (build_opfncall): Likewise.
20387         * typeck.c (build_x_function_call): Likewise.
20388
20389 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
20390
20391         * call.c (default_parm_conversions): Factor out common code.
20392         (build_method_call): Use it.
20393         (build_overload_call_real): Use it.
20394
20395 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
20396
20397         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
20398         but pedwarn as the code is bogus.
20399         * typeck.c (decay_conversion): Likewise.
20400         (build_function_call_real): Use build_addr_func instead of
20401         default_conversion.  Don't allow pointer-to-method functions down
20402         here.
20403         (build_unary_op): Use real pointer-to-member functions instead of
20404         fake ones.
20405         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
20406         (convert_for_assignment): Removed some obsolete code.
20407         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
20408         build_x_function_call instead of current_class_ptr.  Only call
20409         digest_init once on an initializer, we do this just checking
20410         TREE_TYPE.
20411         (build_expr_from_tree): Pass current_class_ref to
20412         build_x_function_call instead of current_class_ptr.
20413         * init.c (build_member_call): Likewise.
20414         * pase.y: Likewise.
20415         * error.c (dump_expr): Handle OFFSET_REFs better.
20416         * pt.c (unify): Handle pointer-to-member functions better.
20417         * decl.c (finish_function): Clear out current_class_ref just like
20418         we do for current_class_ptr.
20419
20420         * typeck.c (get_delta_difference): Handle virtual bases better.
20421
20422 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
20423
20424         * sig.c (build_signature_table_constructor): Use the delta for
20425         the original basetype for this virtual function with thunks.
20426         (build_signature_method_call): We still need to adjust 'this'
20427         with thunks.
20428
20429 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
20430
20431         * call.c (build_addr_func): New routine.  Used to get the `real'
20432         address of a function or a method.  Needed to avoid getting a
20433         pointer-to-member function.
20434         (build_call): New routine to build CALL_EXPRs.
20435         (build_method_call): Use it.
20436         * cvt.c (convert_to_aggr): Likewise.
20437         * typeck.c (build_function_call_real): Likewise.
20438         * sig.c (build_signature_table_constructor): Use build_addr_func.
20439         * cp-tree.h (build_call, build_addr_func): Declare them.
20440
20441 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
20442
20443         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
20444         * parse.y: Remove uses of LOOKUP_AGGR.
20445
20446 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
20447
20448         * *.[chy]: Rename current_class_decl to current_class_ptr, and
20449         C_C_D to current_class_ref.
20450
20451 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
20452
20453         * call.c (convert_harshness): Tighten up pointer conversions.
20454
20455 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
20456
20457         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
20458         (finish_file): Likewise.
20459
20460 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
20461
20462         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
20463
20464         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
20465         code.
20466
20467 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20468
20469         * decl2.c: Turn on thunks by default where supported.
20470
20471 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
20472
20473         * cp-tree.h (build_overload_call_maybe): Removed.
20474         * call.c (build_overload_call_real): Invert meaning of last arg to
20475         be require_complete.
20476         (build_overload_call): Likewise.
20477         * typeck.c (build_x_function_call): Use build_overload_call_real
20478         instead of build_overload_call_maybe.
20479
20480 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
20481
20482         * decl2.c (finish_file): Don't try to emit functions that haven't
20483         been compiled.
20484
20485 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
20486
20487         * decl2.c (finish_vtable_vardecl): Oops.
20488
20489         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
20490         Also store the bindings from previous_class_values.
20491         (pop_from_top_level): Restore them.
20492
20493 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
20494
20495         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
20496         symbol has been referenced.
20497         (finish_file): Re-join synthesis/vtable loop with inline emission
20498         loop, disable inlining when an inline is output.
20499
20500 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
20501
20502         * except.c (init_exception_processing): Setup saved_in_catch.
20503         (push_eh_cleanup): Reset __eh_in_catch.
20504         (expand_start_catch_block): Set __eh_in_catch.
20505
20506 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
20507
20508         * except.c (push_eh_cleanup): Add tracking for whether or not we
20509         have an active exception object.
20510         (expand_builtin_throw): Use it to make sure a rethrow without an
20511         exception object is caught.
20512
20513 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
20514
20515         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
20516         cache.
20517
20518 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
20519
20520         * decl2.c (finish_file): Also use sentries for vars with
20521         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
20522         created).
20523
20524         * lex.c (handle_cp_pragma): Disable #pragma
20525         interface/implementation if SUPPORTS_ONE_ONLY > 1.
20526
20527 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
20528
20529         * method.c (emit_thunk): Wrap default case in
20530         temporary/permanent_allocation.
20531
20532         * method.c (make_thunk): Use DECL_ONE_ONLY.
20533         (emit_thunk): Call assemble_end_function.
20534
20535 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
20536
20537         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
20538         (import_export_decl): Likewise.
20539         (finish_prevtable_vardecl): Disable vtable hack if
20540         SUPPORTS_ONE_ONLY > 1.
20541
20542 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
20543
20544         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
20545         PREDECREMENT_EXPRs take two arguments, not one.
20546
20547 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
20548
20549         * class.c (build_vtable_entry): Don't build thunks for abstract
20550         virtuals.
20551
20552         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
20553         frontend.
20554
20555 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
20556
20557         * class.c (set_rtti_entry): Use size_zero_node.
20558         (build_vtable): Likewise.
20559
20560 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
20561
20562         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
20563         (prepare_fresh_vtable): Likewise.
20564
20565 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
20566
20567         * method.c (emit_thunk): Call mark_used on the target function.
20568
20569         * call.c (build_method_call): Don't warn about pending templates.
20570
20571 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
20572
20573         * decl2.c (finish_file): Fix list walking logic.
20574
20575         * typeck2.c (check_for_new_type): Only warn if -pedantic.
20576
20577 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
20578
20579         * class.c (finish_struct_1): Remove old code for
20580         dont_allow_type_definitions.
20581         * cp-tree.h: Likewise.
20582         * spew.c: Make sure cp-tree.h is included before parse.h, so the
20583         definition of flagged_type_tree is found before it is used.
20584         * lex.c: Likewise.
20585         * parse.y: Added the ftype member to the type union, and changed a
20586         number of rules to use it instead of ttype.  Added calls to
20587         check_for_new_type() as appropriate.
20588         * typeck2.c (check_for_new_type): New function for checking
20589         if a newly defined type appears in the specified tree.
20590         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
20591         for check_for_new_type().
20592
20593 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
20594
20595         * decl2.c (finish_file): Only use a sentry if the decl is public.
20596
20597         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
20598         don't pass LOOKUP_ONLYCONVERTING.
20599
20600 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
20601
20602         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
20603         properly keeps track of const and volatile type modifiers.
20604
20605 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
20606
20607         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
20608         * pt.c (comp_template_args): Use it.
20609
20610         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
20611         assemble_external for artificial function decls.
20612
20613         * decl.c (cp_finish_decl): Oops.
20614
20615 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
20616
20617         * decl2.c (import_export_decl): Put static data member templates
20618         into common storage, or make them weak, depending on whether they
20619         are dynamically or statically initialized.
20620         (get_sentry): New function.
20621         (finish_file): Do import_export_decl for static data members before
20622         building the init/fini functions.  Don't init/fini a variable that's
20623         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
20624         push/pop_temp_slots.
20625         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
20626         expand_static_init thang.
20627         * method.c (get_id_2): New function.
20628
20629 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
20630
20631         * parse.y (empty_parms): Make sure we use C++-style prototypes
20632         when we're declaring member functions.
20633
20634 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
20635
20636         * Makefile.in (CONFLICTS): 16 s/r conflicts.
20637         * parse.y (self_template_type): New nonterminal.
20638
20639 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
20640
20641         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
20642         name.
20643         * parse.y (base_class.1): Allow 'typename foo::bar'.
20644
20645         * lex.c (check_newline): Remove #pragma code that plays with the
20646         input stream, since we now deal with tokens.  Clear nextchar when
20647         we're done.
20648         (handle_cp_pragma): Use real_yylex.
20649         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
20650         in one place.
20651
20652         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
20653
20654         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
20655
20656 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20657
20658         * parse.y: New token SELFNAME for potential constructor.
20659         * spew.c (yylex): Handle it.
20660         * lex.c (identifier_type): Produce it.
20661
20662         * parse.y (complete_type_name): In :: case, don't push class binding.
20663         (complex_type_name): Likewise.
20664
20665 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
20666
20667         * typeck.c (build_reinterpret_cast): Handle pointer to member
20668         functions.
20669
20670 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20671
20672         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
20673         pragmas.
20674         (check_newline): Put the vtable/unit/implementation/interface pragma
20675         code into handle_cp_pragma, replacing it with a call.
20676         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
20677         args.  Get the next token after handling the pragma token.
20678
20679 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
20680
20681         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
20682         (convert_to_pointer_force): Likewise.
20683
20684         * init.c (build_new): Fix array new without -fcheck-new.
20685
20686 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
20687
20688         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
20689         tree.c: Lose TYPE_NESTED_NAME.
20690
20691         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
20692         as identifiers.
20693
20694         * tree.def: Add VEC_INIT_EXPR.
20695         * expr.c (cplus_expand_expr): Handle it.
20696         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
20697         the extra file-scope symbol nastiness.
20698
20699 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
20700
20701         * method.c (make_thunk): Thunks are static.
20702         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
20703
20704         * decl2.c (mark_vtable_entries): Emit thunks as needed.
20705         (finish_file): Don't emit them here.
20706
20707 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
20708
20709         * rtti.c (build_dynamic_cast): Handle null pointers.
20710         (ifnonnull): New function.
20711
20712 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
20713
20714         * call.c (build_method_call): Remember the original basetype we
20715         were called with.  Give an error message instead of trying
20716         (incorrectly) to call a non-static member function through a
20717         non-inherited class.
20718
20719         * search.c (expand_upcast_fixups): Mark the new fixup as
20720         DECL_ARTIFICIAL.
20721
20722 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20723
20724         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
20725
20726         * class.c (set_rtti_entry): Fix for thunks.
20727
20728         * decl2.c (import_export_decl): Still emit typeinfo fns for
20729         cv-variants of builtin types.
20730
20731         * rtti.c (expand_class_desc): Set up base_info_type_node here.
20732         (init_rtti_processing): Instead of here.
20733
20734 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
20735
20736         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
20737         (build_typeid): Only complain about taking dynamic typeid without
20738         -frtti.
20739
20740         * decl2.c: flag_rtti defaults to 1.
20741
20742         * rtti.c (get_tinfo_var): The general class case is now smaller.
20743         (init_rtti_processing): Pack the latter three fields of base_info
20744         into 32 bits.
20745
20746 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
20747
20748         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
20749
20750 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
20751
20752         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
20753         (push_memoized_context): Split out code to undefer pop_type_level to
20754         (clear_memoized_cache): here.
20755         (pop_memoized_context): We can only handle one layer of deferral of
20756         pop_type_level so clear the cache, if there was a previous level.
20757
20758 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20759
20760         * rtti.c (init_rtti_processing): Build up base_info_type_node.
20761         (expand_class_desc): Use one pointer to an array of base_info
20762         structs, passed using a CONSTRUCTOR.
20763
20764 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
20765
20766         * class.c (build_vbase_path): Remove block extern for
20767         flag_assume_nonnull_objects here.
20768         (build_vfn_ref): Split out functionality into build_vtbl_ref.
20769         (build_vtbl_ref): New routine.
20770         (build_vtable): Set up rtti info here.
20771         (add_virtual_function): Note in CLASSTYPE_RTTI the best
20772         place where we can get the rtti pointers from to avoid having to
20773         search around for a place.
20774         (finish_base_struct): Likewise.
20775         (finish_struct_1): Likewise.  Never create totally new vtables
20776         with totally new vtable pointers for rtti.  Disable code to layout
20777         vtable pointers better until we want to break binary
20778         compatibility.
20779         * rtti.c (build_headof_sub): New routine to convert down to a
20780         sub-object that has an rtti pointer in the vtable.
20781         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
20782         maintainable.
20783         (build_dynamic_cast): Make sure we have saved it, if we need to.
20784         * search.c (dfs_init_vbase_pointers): Disable code that deals with
20785         a more efficient vtable layout, enable later.
20786         * call.c (flag_assume_nonnull_objects): Moved declaration to
20787         * cp-tree.h: here.  Declare build_vtbl_ref.
20788         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
20789         function calls that want a tree.
20790
20791 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
20792
20793         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
20794         other X subobjects in the most derived type.  Ack.
20795
20796         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
20797         get_typeid will do it for us.
20798         (get_typeid_1): Break out call-building for expand_*_desc to use.
20799         (get_typeid): Call it.
20800         (expand_*_desc): Likewise.
20801         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
20802         and void *.
20803         (init_decl_processing): Lose builtin_type_tdescs lossage.
20804         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
20805
20806 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
20807
20808         * pt.c (tsubst): When calling set_nested_typename, use
20809         TYPE_NESTED_NAME (current_class_type) instead of
20810         current_class_name.
20811
20812         * decl.c (pushdecl): Likewise.
20813         (pushdecl_class_level): Likewise.
20814         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
20815         set_nested_typename.
20816
20817 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
20818
20819         * rtti.c (synthesize_tinfo_fn): Handle arrays.
20820
20821         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
20822
20823 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
20824
20825         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
20826         (init_rtti_processing): Lose bad_cast_type.
20827         (build_dynamic_cast): Use throw_bad_cast.
20828
20829         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
20830
20831         * decl2.c (finish_file): Don't synthesize artificial functions
20832         that are external and not inline.
20833
20834         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
20835
20836         * decl2.c (finish_file): Handle having new inlines added to
20837         saved_inlines by synthesis.
20838
20839         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
20840
20841 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20842
20843         RTTI rewrite to initialize nodes as needed, not require that
20844         users #include <typeinfo>, complete functionality and reduce wasted
20845         space.
20846         * rtti.c (init_rtti_processing): New fn.
20847         (build_typeid): The vtable entry is now a function.
20848         (get_tinfo_var): New fn.
20849         (get_tinfo_fn): Likewise.
20850         (get_typeid): Use it.
20851         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
20852         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
20853         points __rtti_*.
20854         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
20855         (synthesize_tinfo_fn): New fn.
20856         * method.c (build_t_desc_overload): Lose.
20857         (build_overload_with_type): More generic.
20858         * decl.c (init_decl_processing): Call init_rtti_processing.
20859         * class.c (set_rtti_entry): Use get_tinfo_fn.
20860         * decl2.c (mark_vtable_entries): Mark the rtti function.
20861         (finish_prevtable_vardecl): Don't build_t_desc.
20862         (import_export_decl): Handle tinfo functions.
20863         (finish_file): Likewise.
20864         * typeck.c (inline_conversion): New fn.
20865         (build_function_call_real): Use it.
20866         * cp-tree.h: Add decls.
20867
20868         * method.c (hack_identifier): Also convert component_refs from
20869         references.
20870
20871         * lex.c (cons_up_default_function): Use the type, not the name, in
20872         declspecs.
20873
20874         * decl2.c (import_export_vtable): Fix weak vtables.
20875
20876 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
20877
20878         * search.c (get_base_distance_recursive): Fix access checks for
20879         protected bases.
20880
20881 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20882
20883         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
20884         cp-tree.h.
20885         (convert_harshness): Add prototypes wrapped by PROTO.
20886         * decl2.c (grok_function_init): Likewise.
20887         (do_toplevel_using_decl): Change to void return type.
20888         * class.c (build_vtable_entry): Remove decl of make_thunk.
20889         (merge_overrides): Fix order of arg definitions.
20890         (finish_vtbls): Likewise.
20891         (fixup_vtable_deltas): Likewise.
20892         (modify_all_direct_vtables): Likewise.
20893         (modify_all_indirect_vtables): Likewise.
20894         * search.c (get_base_distance_recursive): Likewise.
20895         (get_abstract_virtuals_1): Likewise.
20896         (fixup_virtual_upcast_offsets): Likewise.
20897         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
20898         * init.c (perform_member_init): Fix order of arg definitions.
20899         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
20900         * cp-tree.h (make_thunk): Add decl.
20901         (overload_template_name, push_template_decl): Add decls.
20902         (do_toplevel_using_decl): Change to void return type.
20903         (vec_binfo_member): Add decl.
20904
20905 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20906
20907         * typeck.c (mark_addressable, convert_for_assignment,
20908         convert_for_initialization, pointer_int_sum, pointer_diff,
20909         unary_complex_lvalue): Add prototypes wrapped by PROTO.
20910         (convert_sequence): #if 0 fn decl, since definition also is.
20911
20912 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
20913
20914         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
20915         cast to pointer types for type searching.
20916
20917 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20918
20919         * typeck.c (get_delta_difference): Use cp_error, not error, in the
20920         case where BINFO == 0.
20921
20922 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
20923
20924         * call.c (build_method_call): Fix wording of error messages so
20925         constructors come out right.
20926
20927 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
20928
20929         * decl.c (push_overloaded_decl): Don't warn about hidden
20930         constructors when both the type and the function are declared
20931         in a system header file.
20932
20933 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
20934
20935         * class.c (finish_struct_1): Propagate the TYPE_PACKED
20936         flag for the type to the type's fields.
20937
20938 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20939
20940         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
20941
20942 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
20943
20944         * class.c (base_info, finish_base_struct): Replace
20945         needs_virtual_dtor with base_has_virtual.
20946
20947         (finish_struct_1): Remove the old code that tried to make default
20948         destructors virtual.  Use base_has_virtual when checking if we need
20949         to add a vtable entry for the rtti code.
20950
20951 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
20952
20953         * pt.c (push_template_decl): Complain about template decl with
20954         inappropriate declaration.
20955
20956 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
20957
20958         * typeck.c (build_x_unary_op): Remove bogus check for taking
20959         the address of a member function.
20960
20961 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
20962
20963         * parse.y (constructor_declarator): Only push the class if
20964         we are not already in the class.
20965
20966 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
20967
20968         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
20969         Add additional argument to INIT_CUMULATIVE_ARGS.
20970
20971 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
20972
20973         * decl.c (shadow_tag): Fix error about anon union with methods.
20974
20975         * parse.y (self_reference): Only generate a self-reference if this
20976         is a non-template class.
20977         (opt.component_decl_list): Only use it if it was generated.
20978
20979         * parse.y (component_decl_1): Use constructor_declarator.
20980         (fn.def2): Likewise.
20981         (notype_component_declarator0): Likewise.
20982
20983 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
20984
20985         * typeck.c (build_x_unary_op): Add checks for taking the address
20986         of a TARGET_EXPR or of a member function, and give appropriate
20987         warnings.
20988
20989 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
20990
20991         * pt.c (process_template_parm): Allow template type parms to be
20992         used as types for template const parms.
20993
20994 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
20995
20996         * init.c (expand_vec_init): Ensure the eh cleanups are on the
20997         function_obstack.
20998
20999 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
21000
21001         * decl.c (lookup_name_real): Be even more picky about the
21002         ambiguous lookup warning.
21003         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
21004         * parse.y (constructor_declarator): Rather than here.
21005
21006         * parse.y (constructor_declarator): New nonterminal.
21007         (fn.def1): Use it.
21008         (explicit_instantiation): Likewise.
21009
21010 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21011
21012         Add implicit declaration of class name at class scope.
21013         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
21014         * parse.y (self_reference): New nonterminal.
21015         (opt.component_decl_list): Use it.
21016         (fn.def1): Add nested_name_specifier type_name cases.
21017         * class.c (build_self_reference): New function.
21018         (finish_struct): Handle access_default later, move self-reference
21019         decl to the end.
21020         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
21021         * cp-tree.h: Adjust.
21022
21023         * pt.c (do_function_instantiation): Separate handling of member
21024         functions and non-member functions properly.
21025
21026 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
21027
21028         * pt.c (process_template_parm): Improve error for 'volatile class K'.
21029
21030         * class.c (finish_struct_1): Check the right slot for destructors.
21031
21032         * decl.c (start_enum): Complain about enum templates.
21033
21034 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
21035
21036         * init.c (resolve_offset_ref): Offset pointers to member data by one.
21037         * typeck.c (unary_complex_lvalue): Likewise.
21038
21039 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
21040
21041         * typeck.c (c_expand_return): Check for a returned local
21042         array name, similar to the check for an ADDR_EXPR.
21043
21044 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
21045
21046         * decl.c (cp_finish_decl): Don't build cleanups for static
21047         variables here.
21048
21049 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
21050
21051         * typeck.c (build_modify_expr): Fix error messages to be more
21052         accurate.
21053         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
21054         assignment operators.
21055         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
21056         assignment operators.
21057
21058 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
21059
21060         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
21061         give an error if initialized.  pedwarn about nested type with the
21062         same name as its enclosing class.
21063
21064         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
21065
21066         * typeck.c (require_complete_type): Be sure to instantiate the
21067         MAIN_VARIANT of the type.
21068
21069         * decl2.c (finish_file): Instantiate pending templates before
21070         processing static constructors and destructors.
21071
21072         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
21073         unless at_eof.
21074
21075 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
21076
21077         * decl2.c (delete_sanity): If error_mark_node is passed
21078         in as an expression, quit while we're ahead.
21079
21080         * decl.c (grokdeclarator): Give an error message if `friend'
21081         is combined with any storage class specifiers.
21082
21083 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
21084
21085         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
21086         definition of nonexistent nested type.
21087
21088         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
21089         not to say 'typedef'.
21090
21091 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21092
21093         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
21094         * search.c (dfs_walk, dfs_init_vbase_pointers,
21095         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
21096         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
21097
21098 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
21099
21100         * except.c (build_throw): Support minimal parse.
21101         * pt.c (tsubst_copy): Support THROW_EXPR.
21102         * decl2.c (build_expr_from_tree): Likewise.
21103
21104         * pt.c (mangle_class_name_for_template): Always allocate
21105         scratch_firstobj.
21106
21107 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
21108
21109         * cvt.c (cp_convert_to_pointer): Give an appropriate error
21110         when trying to cast from an incomplete type.
21111
21112 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21113
21114         * pt.c (instantiate_class_template): Don't bother setting up
21115         CLASSTYPE_TAGS explicitly, as the nested types will add
21116         themselves.
21117
21118 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
21119
21120         * decl.c (shadow_tag): Remove old error check for usage of
21121         an enum without a previous declaration.
21122         (xref_tag): Add error message about usage of enums without a
21123         previous declaration.
21124
21125 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
21126
21127         * lex.c (do_identifier): Only do name consistency check if we're
21128         parsing.
21129
21130         * pt.c (push_template_decl): Don't crash if we get a member defn
21131         that doesn't match.
21132
21133         * decl.c (xref_tag_from_type): New function to do an xref without
21134         always having to figure out code_type_node.
21135         * cp-tree.h: Declare it.
21136         * pt.c (instantiate_class_template): Use it for friend classes.
21137         (lookup_template_class): Use it.
21138
21139         * typeck2.c (build_functional_cast): Pull out a single parm before
21140         passing it to build_c_cast.
21141
21142 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
21143
21144         * expr.c (do_case): Give an error message if a pointer is
21145         given as a case value.
21146
21147 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
21148
21149         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
21150         an overload list.
21151
21152         * lex.c (cons_up_default_function): Really, now, interface hackery
21153         does not apply to synthesized methods.
21154
21155 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
21156
21157         * call.c (build_method_call): Ctors and dtors now have special names
21158         with respect to lookups.
21159         * class.c (add_method): Likewise.
21160         (grow_method): Likewise.
21161         (finish_struct_methods): Likewise.
21162         (warn_hidden): Likewise.
21163         (finish_struct_1): Likewise.
21164         * cvt.c (convert_to_reference): Likewise.
21165         (convert_to_aggr): Likewise.
21166         (cp_convert): Likewise.
21167         * decl2.c (check_classfn): Likewise.
21168         * init.c (expand_member_init): Likewise.
21169         (expand_default_init): Likewise.
21170         (expand_aggr_init_1): Likewise.
21171         (build_offset_ref): Likewise.
21172         (build_new): Likewise.
21173         (build_delete): Likewise.
21174         * lex.c (do_inline_function_hair): Likewise.
21175         * search.c (lookup_field_1): Likewise.
21176         (lookup_fnfields_here): Likewise.
21177         (lookup_field): Likewise.
21178         (lookup_fnfields): Likewise.
21179         (get_virtual_destructor): Likewise.
21180         (dfs_debug_mark): Likewise.
21181         (dfs_pushdecls): Likewise.
21182         (dfs_compress_decls): Likewise.
21183         * tree.c (layout_basetypes): Likewise.
21184         * typeck.c (build_component_ref): Likewise.
21185         (build_x_function_call): Likewise.
21186         (build_modify_expr): Likewise.
21187         (convert_for_initialization): Likewise.
21188         (build_functional_cast): Likewise.
21189         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
21190         (CTOR_NAME): New.
21191         (DTOR_NAME): New.
21192         * decl.c (ctor_identifier): New.
21193         (dtor_identifier): New.
21194         (init_decl_processing): Set them.
21195
21196 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
21197
21198         * typeck.c (build_component_ref): Don't get confused by fields whose
21199         context has no type name, like pointer to member functions.
21200
21201 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
21202
21203         * decl.c (grokdeclarator): Handle typedef without declarator.
21204
21205         * pt.c (tsubst): Handle SCOPE_REF in declarator.
21206
21207         * parse.y (bad_parm): Catch another case of missing `typename'.
21208
21209         * lex.c (yyprint): Handle TYPE_DECLs.
21210
21211         * decl.c (start_function): Don't try to be clever.
21212
21213         * lex.c: Lose compiler_error_with_decl.
21214         * typeck2.c: Lose error_with_aggr_type.
21215         (incomplete_type_error): Use cp_* instead of old functions.
21216         (readonly_error): Likewise.
21217         * typeck.c (convert_arguments): Likewise.
21218         * search.c (lookup_nested_field): Likewise.
21219         * method.c (make_thunk): Likewise.
21220         * decl.c (grokparms): Likewise.
21221         * cp-tree.h: Update.
21222
21223         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
21224         and value.
21225
21226 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
21227
21228         * method.c (build_opfncall): When deleting a pointer to an
21229         array, build a new pointer to the tree past any ARRAY_TYPE
21230         nodes.
21231
21232 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21233
21234         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
21235
21236 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
21237
21238         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
21239         and ! DECL_INLINE.
21240
21241         * decl.c (finish_function): Don't set nested based on
21242         hack_decl_function_context.
21243         * parse.y (function_try_block): Check for nested function.
21244         (pending_inlines): Likewise.
21245
21246         * decl2.c (build_expr_from_tree): If a unary op already has a
21247         type, just return it.
21248
21249         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
21250
21251         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
21252         (finish_file): Check the return value of walk_vtables.
21253         (finish_prevtable_vardecl): Return int.
21254         (finish_vtable_vardecl): Likewise.
21255         (prune_vtable_vardecl): Likewise.
21256         * lex.c (set_vardecl_interface_info): Likewise.
21257         * cp-tree.h: Adjust return types.
21258
21259         * class.c (delete_duplicate_fields_1): Don't complain about
21260         duplicate nested types if they're the same type.
21261         (finish_struct): Remove check for duplicate.
21262         * decl2.c (grokfield): Don't check for typedef of anonymous type.
21263
21264 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
21265
21266         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
21267
21268         * decl.c (grokdeclarator): Lose special handling of class-level
21269         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
21270         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
21271
21272         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
21273
21274         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
21275
21276         * search.c (compute_access): Fix handling of anonymous union
21277         members.
21278         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
21279         from anonymous unions to their members.
21280
21281         * typeck.c (build_x_function_call): For static member functions,
21282         hand off to build_member_call.
21283
21284 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
21285
21286         * typeck.c (build_component_ref): Handle OFFSET_REFs.
21287
21288         * init.c (expand_vec_init): Fix init == 0 case.
21289
21290 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
21291
21292         * init.c (build_new): pedwarn about init and array new.
21293         (expand_vec_init): Handle lists, use convert_for_initialization.
21294
21295         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
21296         when converting to an aggregate type.
21297         * cvt.c (cp_convert): Pass it through.
21298
21299         * typeck.c (build_conditional_expr): Handle user-defined
21300         conversions to slightly different types.
21301
21302         * decl.c (grokdeclarator): Force an array type in a parm to be
21303         permanent.
21304
21305         * decl2.c (do_using_directive): Sorry.
21306         (do_namespace_alias): Likewise.
21307         * lex.c (real_yylex): Warn about using the `namespace' keyword.
21308
21309 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
21310
21311         * parse.y (datadef): Move call to note_list_got_semicolon up.
21312
21313 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
21314
21315         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
21316
21317 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
21318
21319         * decl.c (cp_finish_decl): The exception regions have to be
21320         nested, not overlapping.  We start the exception region for a
21321         decl, after it has been fully built, and all temporaries for it
21322         have been cleaned up.
21323
21324 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
21325
21326         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
21327
21328 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
21329
21330         * tree.def: Add RETURN_INIT.
21331         * pt.c (instantiate_decl): Handle RETURN_INIT.
21332         * decl.c (store_return_init): Handle minimal_parse_mode.
21333
21334         * tree.c (cp_build_type_variant): Just return an error_mark_node.
21335         * decl.c (make_typename_type): Don't try to get the file and line
21336         of an identifier.
21337         * typeck.c (comptypes): Handle TYPENAME_TYPE.
21338
21339 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
21340
21341         * decl.c (poplevel): Make sure we clear out and restore old local
21342         non-VAR_DECL values by default when they go out of scope.
21343
21344 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
21345
21346         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
21347         referring to addresses of variables and functions.
21348
21349         * error.c (dump_expr): Support SIZEOF_EXPR.
21350
21351         * init.c (do_friend): Use the return value of check_classfn.
21352
21353         * typeck.c (convert_arguments): Call complete_type.
21354
21355         * method.c (hack_identifier): After giving an error, set value to
21356         error_mark_node.
21357
21358 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
21359
21360         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
21361         lossage for local classes.
21362         * cp-tree.h: Declare it.
21363         * decl.c (lookup_name_real): Evil, painful hack for local classes.
21364         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
21365         Use hack_decl_function_context.
21366         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
21367         (start_function): Use hack_decl_function_context.
21368         (finish_function): Likewise.
21369         * method.c (synthesize_method): Likewise.
21370         * lex.c (process_next_inline): Likewise.
21371         (do_pending_inlines): Likewise.
21372         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
21373         done with it.
21374
21375 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
21376
21377         * sig.c (build_signature_pointer_or_reference_type): Align
21378         signature pointers/references on 8-byte boundaries so they can be
21379         grabbed 2 words at a time on a Sparc.
21380
21381 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
21382
21383         * method.c (hack_identifier): Requiring a static chain is now a
21384         hard error.
21385         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
21386         functions.
21387
21388 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21389
21390         * init.c (build_offset_ref): Call complete_type.
21391
21392         * decl.c (pop_from_top_level): Always pop previous_class_type.
21393
21394         * parse.y: Handle multiple decls in a for-init-statement.
21395         * pt.c (tsubst_expr): Likewise.
21396
21397         * pt.c (tsubst): Use tsubst_expr for the second operand of an
21398         ARRAY_REF.
21399
21400         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
21401         (poplevel_class): Set it here.
21402         (pop_from_top_level): Pop it here if we're returning to class scope.
21403         * class.c (pushclass): Don't set it here.
21404
21405         * decl.c (maybe_push_to_top_level): Save current_template_parms,
21406         and clear it if !pseudo.
21407         (pop_from_top_level): Restore it.
21408
21409         * decl2.c (finish_file): Push the dummy each time we walk the list
21410         of vtables.
21411
21412         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
21413         something for CAST_EXPR.
21414
21415 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
21416
21417         * cvt.c (cp_convert): Warn about implicit conversion of the
21418         address of a function to bool, as it is always true.
21419
21420 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
21421
21422         * typeck.c (c_expand_return): Fix warning for local externs returned.
21423
21424 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
21425
21426         * tree.c (mapcar): Propagate const and volatile properly.
21427
21428         * typeck.c (complete_type): Be sure to instantiate the
21429         MAIN_VARIANT of the type.
21430
21431         * method.c (synthesize_method): Class interface hackery does not
21432         apply to synthesized methods.
21433
21434 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
21435
21436         * pt.c (comp_template_args): Use comptypes rather than just
21437         checking for TEMPLATE_TYPE_PARM equivalence.
21438
21439         * typeck.c (build_x_function_call): Call complete_type before
21440         checking TYPE_OVERLOADS_CALL_EXPR.
21441
21442 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
21443
21444         * g++.c (main): Check also for new define ALT_LIBM.
21445
21446 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21447
21448         * pt.c (instantiate_class_template): If we don't have a pattern
21449         yet, that's OK.
21450         (coerce_template_parms): If we see a local class, bail.
21451
21452         * decl.c (grok_reference_init): Make sure there's a type before
21453         checking its code.
21454
21455         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
21456         (push_template_decl): Likewise.
21457
21458         * parse.y (named_class_head): Set
21459         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
21460
21461         * decl.c (xref_tag): Diagnose redeclaration of template
21462         type-parameter name.
21463
21464         * error.c (dump_type): Handle anonymous template type parms.
21465
21466         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
21467         TYPE_STUB_DECL.
21468         (coerce_template_parms): Likewise.
21469
21470 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
21471
21472         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
21473         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
21474
21475 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
21476
21477         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
21478         before trying to get its STUB_DECL.
21479         (coerce_template_parms): Likewise.
21480
21481         * parse.y (template_type_parm): If they didn't use 'class',
21482         pretend they did after giving an error.
21483
21484         * pt.c (coerce_template_parms): Diagnose use of local class.
21485
21486         * decl.c (grok_reference_init): Use instantiate_type.
21487
21488         * error.c (dump_expr): Handle TEMPLATE_DECLs.
21489
21490         * parse.y (named_class_head): Diagnose mismatching types and tags.
21491
21492         * decl.c (pushdecl): Type decls and class templates clash with
21493         artificial type decls, not hide them.
21494
21495         * decl.c (redeclaration_error_message): Diagnose redefinition of
21496         templates properly.
21497         (duplicate_decls): Diagnose disallowed overloads for template
21498         functions, too.
21499
21500         * decl.c (start_decl): Call complete_type before checking for a
21501         destructor.
21502
21503         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
21504
21505         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
21506
21507 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
21508
21509         * decl.c (grok_op_properties): Don't check for operator++(int) in
21510         a template.
21511
21512         * tree.c (perm_manip): Return a copy of variable and function
21513         decls with external linkage.
21514
21515         * tree.def: Change some of the min tree codes to type "1".
21516         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
21517         * method.c (build_overload_int): Emit something arbitrary for
21518         anything but an INTEGER_CST if we're in a template.
21519
21520         * decl.c (cp_finish_decl): Call complete_type before deciding
21521         whether or not to lay out the decl.
21522
21523         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
21524
21525 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
21526
21527         * typeck2.c (build_x_arrow): Call complete_type.
21528
21529         * pt.c (add_pending_template): Broken out.
21530         (lookup_template_class): If -fexternal-templates, call it for all
21531         the methods of implemented types.
21532         (instantiate_class_template): Instead of instantiating them here.
21533         (instantiate_decl): Handle -fexternal-templates earlier.
21534
21535 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21536
21537         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
21538         memoized lookup stuff inside GATHER_STATISTICS.
21539
21540 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
21541
21542         * decl.c (start_decl): Complain about array of incomplete type
21543         here.
21544         (grokdeclarator): Not here.
21545
21546         * parse.y (template_parm): Expand full_parm inline so we can set
21547         the rule's precedence.
21548
21549         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
21550         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
21551         * decl2.c (grokbitfield): Don't check for integer constant here.
21552         * class.c (finish_struct_1): Check here.
21553
21554         * decl.c (define_label): Make the min decl go on permanent_obstack.
21555
21556         * pt.c (unify): Don't handle CONST_DECLs.
21557         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
21558         (tsubst_copy): Likewise.
21559
21560         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
21561         CONST_DECL for a template parm.
21562
21563 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
21564
21565         * decl.c (grokdeclarator): Complain about array of incomplete type
21566         here.
21567         (start_decl_1): Not here.
21568
21569         * pt.c (tsubst): Handle pointer-to-function declarators.
21570
21571         * method.c (hack_identifier): If pedantic, diagnose local class
21572         methods that require a static chain.
21573
21574         * decl.c (grok_op_properties): No longer static.
21575         * cp-tree.h: Declare it.
21576         * pt.c (tsubst): Call it for operators.
21577         Use tsubst_copy for TREE_VECs.
21578
21579         * parse.y (template_arg): The expr has precedence like '>'.
21580
21581 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
21582
21583         * pt.c (coerce_template_parms): Don't coerce an expression using
21584         template parms.
21585         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
21586         (tsubst): Don't use build_index_2_type if the max_value uses template
21587         parms.
21588         * method.c (build_overload_int): Emit something arbitrary for an
21589         expression using template parms.
21590
21591         * parse.y (template_close_bracket): New non-terminal to catch use
21592         of '>>' instead of '> >' in template class names.
21593         (template_type): Use it.
21594         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
21595
21596         * tree.def: Add CAST_EXPR.
21597         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
21598         CONVERT_EXPR for minimal_parse_mode.
21599         * typeck.c (build_c_cast): Likewise.
21600         * pt.c (tsubst_copy): Likewise.
21601         * decl2.c (build_expr_from_tree): Likewise.
21602         * error.c (dump_expr): Likewise.
21603
21604 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21605
21606         * except.c (SetTerminate, SetUnexpected): Put back global vars.
21607         (init_exception_processing): Put back decl/init of
21608         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
21609         fns from libstdc++.
21610
21611         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
21612         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
21613         Delete unused fns.
21614         * cp-tree.h (declare_uninstantiated_type_level,
21615         uninstantiated_type_level_p): Delete prototypes.
21616
21617 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
21618
21619         * pt.c (tsubst_expr): Add default return.
21620
21621 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21622
21623         * error.c (fndecl_as_string): Delete unused arg CNAME.
21624         * sig.c (build_signature_table_constructor,
21625         build_signature_method_call): Fix calls.
21626
21627         * class.c (the_null_vtable_entry): Delete var definition.
21628         (init_class_processing): Delete tree the_null_vtable_entry init.
21629         * decl.c (no_print_{functions, builtins}): Declare as static.
21630         (__tp_desc_type_node): #if 0 var definition.
21631         (init_type_desc): #if 0 init of __tp_desc_type_node.
21632         (vb_off_identifier): Move var decl into init_decl_processing.
21633         (current_function_assigns_this): Declare as static.
21634         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
21635         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
21636         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
21637         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
21638         * init.c (BI_header_type, BI_header_size): Declare as static.
21639         * pt.c (template_classes): Delete unused var.
21640         (add_pending_template): Delete decl for non-existent fn.
21641         (lookup_template_class): Delete vars CODE and TAG_CODE.
21642         (instantiate_template): Delete unused var TARGS.
21643         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
21644         Delete decls.
21645         (__tp_desc_type_node): #if 0 var decl.
21646         (fndecl_as_string): Fix prototype.
21647
21648 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
21649
21650         * tree.def: Add GOTO_STMT.
21651         * pt.c (tsubst_expr): Support goto and labels.
21652         * decl.c (define_label): Support minimal parsing.
21653         * parse.y (simple_stmt): Likewise.
21654
21655 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21656
21657         * xref.c (GNU_xref_member): Only define/set var I if
21658         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
21659         used.
21660         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
21661         (GNU_xref_end): Fix call.
21662         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
21663         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
21664
21665         * tree.c (build_exception_variant): Delete unused vars I, A, T,
21666         T2, and CNAME.
21667         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
21668         (mapcar): Delete unused var CODE.
21669         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
21670         (break_out_cleanups): Fix call.
21671         (bot_manip): Likewise.
21672         * call.c (build_method_call): Likewise.
21673         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
21674         Likewise.
21675         * typeck.c (unary_complex_lvalue, build_modify_expr,
21676         convert_for_initialization): Likewise.
21677         * typeck2.c (build_functional_cast): Likewise.
21678         * cp-tree.h (build_cplus_new): Fix prototype.
21679
21680         * repo.c (open_repo_file): Delete unused var Q.
21681         (repo_compile_flags, repo_template_declared,
21682         repo_template_defined, repo_class_defined, repo_inline_used,
21683         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
21684         (repo_get_id, repo_vtable_used): Declare as static.
21685         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
21686         prototypes.
21687
21688 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
21689
21690         * parse.y (pending_inlines): Add function_try_block case.
21691
21692         * pt.c (unify): Fix for template const parms.
21693
21694 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21695
21696         * lex.c (extract_interface_info): Delete forward decl.
21697         (default_copy_constructor_body, default_assign_ref_body): Delete
21698         decls for non-existent functions.
21699         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
21700         (init_lex): Delete setting them.
21701         (cons_up_default_function): Delete unused vars FUNC_BUF,
21702         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
21703         #if 0'd synth code.
21704         (toplevel, expression_obstack): Delete unused extern decls.
21705         (tree_node_kind): Delete unused enum.
21706         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
21707         GATHER_STATISTICS.
21708         (tree_node_kind_names): Delete unused extern decl.
21709         (synth_obstack): Delete unused var.
21710         (init_lex): Don't set it.
21711         (init_parse): Add decl before use.
21712         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
21713         (current_unit_{name, language}): Delete unused vars.
21714         (check_newline): Don't bother setting them, just accept the #pragma.
21715         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
21716         (current_unit_{name, language}): Delete decls.
21717
21718         * search.c: Wrap all of the memoized functions, macros, and
21719         variables inside #ifdef GATHER_STATISTICS.
21720         (lookup_field, lookup_fnfields): Likewise.
21721         (init_search_processing): Likewise.
21722         (reinit_search_statistics): Wrap whole function.
21723         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
21724
21725         * decl.c (finish_function): Only call pop_memoized_context if
21726         GATHER_STATISTICS is defined.
21727         (start_function): Likewise for push_memoized_context.
21728         * class.c (pushclass, popclass): Likewise.
21729
21730         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
21731         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
21732
21733         * cvt.c (cp_convert): Delete unused local var FORM.
21734         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
21735         prototypes.
21736
21737 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
21738
21739         * pt.c (do_poplevel): Oops; really return what we get from
21740         poplevel this time.
21741
21742 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21743
21744         * cp-tree.h (is_aggr_type): Add prototype.
21745
21746         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
21747         * method.c ({push,pop}_cp_function_context): Delete decls.
21748         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
21749         (SetUnexpected, SetTerminate): Delete unused vars.
21750         (init_exception_processing): Don't set SetUnexpected or
21751         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
21752         (output_exception_table_entry): Delete unused array LABEL.
21753         (expand_internal_throw): Delete unused var PARAMS.
21754         (expand_start_catch_block): Delete unused var CLEANUP.
21755         (emit_exception_table): Delete unused var EH_NODE_DECL.
21756         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
21757         GOTO_UNWIND_AND_THROW.  Don't set them.
21758         (end_eh_unwinder): Add top decl.
21759         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
21760         (exception_section, push_rtl_perm, do_function_call,
21761         lang_interim_eh, push_eh_cleanup, eh_outer_context,
21762         expand_end_eh_spec, end_eh_unwinder): Declare as static.
21763         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
21764         throw_used): Likewise.
21765         * cp-tree.h (expand_end_eh_spec): Delete prototype.
21766
21767         * search.c (dfs_mark, dfs_mark_vtable_path,
21768         dfs_unmark_vtable_path, dfs_mark_new_vtable,
21769         dfs_unmark_new_vtable, dfs_clear_search_slot,
21770         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
21771         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
21772         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
21773         functions.
21774         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
21775         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
21776         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
21777         Only define #ifdef GATHER_STATISTICS.
21778         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
21779         is defined.
21780         (vbase_decl): Delete var definition.
21781         (init_search): Delete old decl.
21782         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
21783         never actually used.
21784         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
21785         (get_base_distance_recursive): Delete unused fourth arg
21786         BASETYPE_PATH.  Fix call .
21787         (get_base_distance): Fix call.
21788         (push_class_decls): Delete unused var ID.
21789         (make_memoized_table_entry): Declare as static.
21790         (breadth_first_search): Declare as static.
21791         (tree_has_any_destructor_p): Declare as static.
21792         (pop_class_decls): Delete unused arg pop_class_decls.
21793         * class.c (popclass): Fix call to pop_class_decls.
21794         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
21795         tree_has_any_destructor_p): Delete prototypes.
21796
21797         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
21798         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
21799         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
21800         (build_user_desc): Delete unused var T.
21801         (build_class_desc): Delete unused vars T and OFF.
21802         (build_t_desc): Delete unused var NAME_STRING.
21803         (build_headof): Make static.
21804         (get_bad_cast_node): Likewise.
21805         (get_def_to_follow): Likewise.
21806         * cp-tree.h (init_type_desc): Add prototype.
21807         (build_headof): Remove prototype.
21808
21809 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
21810
21811         * pt.c (tsubst): Only look for matching decls at file scope for
21812         non-member functions.
21813
21814         * call.c (build_scoped_method_call): Handle scoped destructor
21815         calls in templates.
21816
21817         * decl.c (*_top_level): Also save previous_class_values.
21818
21819         * pt.c (tsubst_expr): Support do {} while loops.
21820         * parse.y (simple_stmt): Likewise.
21821         * tree.def: Likewise.
21822
21823         * method.c (build_overload_identifier): For a class nested in a
21824         template class, don't mangle in the template parms from our
21825         context.
21826
21827         * lex.c, cp-tree.h: Remove support for template instantiations in
21828         the pending_inlines code.
21829         * pt.c: Remove dead functions and unused arguments.
21830         (uses_template_parms): TYPENAME_TYPEs always use template parms.
21831         * parse.y: Stop passing anything to end_template_decl.
21832         * tree.c (print_lang_statistics): Only print tinst info #ifdef
21833         GATHER_STATISTICS.
21834
21835 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21836
21837         * init.c (expand_recursive_init{,_1}): Delete decls.
21838         (sort_member_init): Delete unused var INIT.
21839         (emit_base_init): Delete unused var X.
21840         (build_offset_ref): Delete unused var CNAME.
21841         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
21842         (emit_base_init): Delete unused local var BASE.  Delete extern
21843         decl of IN_CHARGE_IDENTIFIER.
21844         (build_delete): Delete unused local var VIRTUAL_SIZE.
21845
21846         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
21847         (build_delete): Fix call.
21848         * decl2.c (delete_sanity): Likewise.
21849         * cp-tree.h (build_vec_delete): Update prototype.
21850
21851         * typeck.c (common_base_type): Delete unused var TMP.
21852         (build_binary_op): Delete local var ARGS_SAVE.
21853         (build_array_ref): Delete unused var ITYPE.
21854         (c_expand_return): Delete unused var USE_TEMP.
21855
21856         * typeck.c (compexcepttypes): Delete unused arg STRICT.
21857         (comptypes): Fix calls.
21858         * decl.c (duplicate_decls): Likewise.
21859         * cp-tree.h (compexcepttypes): Delete extra arg.
21860
21861         * decl2.c (check_classfn): Delete unused second arg CNAME.
21862         * decl.c (start_decl, grokfndecl): Fix calls.
21863         * init.c (do_friend): Likewise.
21864         * cp-tree.h (check_classfn): Update prototype.
21865
21866         * cp-tree.h (signature_error, import_export_vtable,
21867         append_signature_fields, id_in_current_class, mark_used,
21868         copy_assignment_arg_p): Add decls.
21869         * decl2.c (mark_used): Delete decl.
21870
21871         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
21872
21873         * class.c (get_vtable_entry): Disable unused function.
21874         (doing_hard_virtuals): Delete unused static global var.
21875         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
21876         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
21877         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
21878         (modify_one_vtable): Delete unused var OLD_RTTI.
21879         (finish_struct_anon): Delete unused vars OFFSET and X.
21880         (finish_struct_bits): Delete unused var METHOD_VEC.
21881         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
21882         for-scope local variable METHODS.
21883
21884         * call.c (user_harshness): Delete unused/unneeded arg PARM.
21885         (ideal_candidate): Delete unused args BASETYPE and PARMS.
21886         (build_method_call): Delete unused args passed into ideal_candidate.
21887         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
21888         * cp-tree.h (synthesize_method): Add decl.
21889
21890         * decl.c (note_level_for_for): Give void return type.
21891         (pushdecl_nonclass_level): Likewise.
21892         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
21893         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
21894         (suspend_binding_level): Delete unused var LEVEL.
21895         (duplicate_decls): Delete unused var CTYPE.
21896         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
21897         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
21898         PTR_ENDLINK.
21899         (grokdeclarator): Delete unused var C.
21900         (grokdeclarator): Delete unused var SIZE_VARIES.
21901         (grokparms): Delete unused var SAW_VOID.
21902         (start_function): Delete unused var OLDDECL.
21903         (cplus_expand_expr_stmt): Delete unused var
21904         REMOVE_IMPLICIT_IMMEDIATELY.
21905
21906         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
21907
21908         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
21909
21910 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
21911
21912         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
21913         (build_min_nt): Likewise.
21914         * pt.c (do_pushlevel): Emit line note.
21915         (do_poplevel): Return what we get from poplevel.
21916         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
21917         * parse.y: Use do_pushlevel and do_poplevel.
21918         * cp-tree.h: Declare do_poplevel.
21919
21920         * cp-tree.h: Declare at_eof.
21921         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
21922         * decl2.c (import_export_decl): Renamed from import_export_inline.
21923         (finish_file): Call it to do interface handling for statics.
21924         * pt.c (tsubst_copy): Call mark_used on variables and functions
21925         used here.
21926
21927         * decl2.c (finish_file): Don't emit statics we can't generate.
21928         * pt.c (instantiate_decl): Don't set interface on instantiations
21929         we can't generate.
21930
21931         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
21932         * tree.c (print_lang_statistics): Print max template depth.
21933         * pt.c (push_tinst_level): Dump entire instantiation context.
21934         (instantiate_class_template): Use it and pop_tinst_level.
21935         (instantiate_decl): Likewise.
21936
21937         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
21938         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
21939
21940 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
21941
21942         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
21943         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
21944         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
21945         the new template implementation.
21946
21947 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21948
21949         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
21950
21951 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
21952
21953         * decl.c (cp_finish_decl): Delay emitting the debug information for
21954         a typedef that has been installed as the canonical typedef, if the
21955         type has not yet been defined.
21956
21957 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
21958
21959         * decl2.c (grokfield): Still call pop_nested_class for access decls.
21960
21961 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21962
21963         * decl.c (lookup_label): Call label_rtx.
21964
21965         * decl.c (make_binding_level): New function.
21966         (pushlevel, pushlevel_class): Call it instead of explicit
21967         duplicate calls to xmalloc.
21968
21969         * decl.c (init_decl_processing): Delete useless build_pointer_type
21970         call.
21971
21972         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
21973         (sizet_ftype_string): Delete variable.
21974         (init_decl_processing): Add built-in functions fabsf, fabsl,
21975         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
21976         variable strlen_ftype, used for strlen.
21977
21978 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
21979
21980         * decl.c (push_to_top_level): Start from current_binding_level
21981         again for now; the stl hacks depend on g++ being broken in this
21982         way, and it'll be fixed in the template rewrite.
21983
21984         * tree.def: Add USING_DECL.
21985         * decl2.c (do_class_using_decl): Implement.
21986         (grokfield): Pass access decls off to do_class_using_decl instead of
21987         grokdeclarator.
21988         * error.c (dump_decl): Handle USING_DECLs.
21989         * decl.c (grokdeclarator): Remove code for handling access decls.
21990         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
21991         as access decls for now.
21992         (finish_struct): Don't check USING_DECLs for other uses of the name.
21993
21994         * search.c (get_matching_virtual): Use cp_error_at.
21995
21996 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21997
21998         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
21999         match c-typeck.c.
22000         (self_promoting_args_p): Move the check that TYPE is non-nil
22001         before trying to look at its main variant.
22002         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
22003
22004         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
22005         Delete macros.
22006         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
22007         (do_friend): Delete call to xref_friend.
22008         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
22009
22010         * typeck.c (convert_sequence): #if 0 unused function.
22011
22012         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
22013         be in decl_in_memory_p.
22014         (decl_in_memory_p): Delete decl.
22015         * expr.c (decl_in_memory_p): Delete fn.
22016         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
22017
22018         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
22019
22020 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
22021
22022         * class.c (finish_struct_1): Check for a pure-specifier on a
22023         non-virtual function here.
22024
22025         * decl2.c (grok_function_init): Don't check whether the function
22026         is virtual here.
22027         (grokfield): Don't call check_for_override here.
22028
22029         * decl.c (push_to_top_level): Start from inner_binding_level,
22030         check class_shadowed in class levels.
22031
22032 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
22033
22034         * decl.c (resume_level): Ignore things that don't have names, instead
22035         of core dumping.
22036
22037 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22038
22039         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
22040
22041 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
22042
22043         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
22044         synthesized dtor.
22045
22046         * parse.y (complete_type_name): Bind global_scope earlier.
22047         (complex_type_name): Likewise.
22048         (qualified_type_name): Remove.
22049
22050 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
22051
22052         * decl.c (grokfndecl): Move code that looks for virtuals in base
22053         classes...
22054         * class.c (check_for_override): ... to a new function.
22055         (finish_struct_1): Call it.
22056
22057         * cp-tree.h: Declare warn_sign_compare.
22058
22059         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
22060         rather than extra_warnings to decide whether to warn about
22061         comparison of signed and unsigned.
22062
22063         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
22064         implies -Wsign-compare.  -Wall doesn't imply -W.
22065
22066 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
22067
22068         * typeck.c (build_component_ref): Fix to handle anon unions in base
22069         classes as well.
22070
22071 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22072
22073         * class.c (resolves_to_fixed_type_p): Delete code dealing with
22074         a WITH_CLEANUP_EXPR, since we don't generate them any more.
22075         * cvt.c (build_up_reference): Likewise.
22076         * decl.c (grok_reference_init): Likewise.
22077         (cp_finish_decl): Likewise.
22078         * error.c (dump_expr): Likewise.
22079         * tree.c (real_lvalue_p): Likewise.
22080         (lvalue_p): Likewise.
22081         (build_cplus_new): Likewise.
22082         (unsave_expr_now): Likewise.
22083         * typeck.c (unary_complex_lvalue, build_modify_expr,
22084         c_expand_return): Likewise.
22085
22086 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22087
22088         Make the C++ front-end pay attention to attributes for structures.
22089         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
22090         finish_struct_1.
22091         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
22092         Take out old round_up_size use and setting the DECL_ALIGN possibly
22093         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
22094         can override what the attribute set.
22095         * cp-tree.h (finish_struct): Update prototype.
22096         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
22097         attributes to finish_struct.
22098         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
22099         value down into finish_struct.
22100         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
22101
22102 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
22103
22104         * decl.c (poplevel):  Re-word dead for local handling.
22105         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
22106         (cp_finish_decl):  If is_for_scope, check for duplicates so
22107         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
22108
22109         * lex.c (do_identifier):  Use global binding in preference of
22110         dead for local variable.
22111
22112 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
22113
22114         * init.c (initializing_context): Handle anon union changes, the
22115         context where fields of anon unions can be initialized now has to be
22116         found by walking up the TYPE_CONTEXT chain.
22117
22118 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
22119
22120         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
22121         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
22122         (obscure_complex_init): If bss is supported, always set
22123         DECL_INITIAL to error_mark_node.
22124
22125 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22126
22127         * init.c (is_friend): Make sure there's a context before we see if
22128         it's an aggr type.
22129
22130 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
22131
22132         * init.c (is_friend): Classes are not friendly with nested classes.
22133
22134 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
22135
22136         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
22137         and record its result.
22138
22139 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
22140
22141         * class.c (finish_struct_anon): Switch around code to not move anon
22142         union elements around, nor mess up their contexts, nor offsets,
22143         instead we now build up the right number of COMPONENT_REFs for all
22144         the anon unions that may be present at build_component_ref time.
22145         * typeck.c (lookup_anon_field): New routine to handle field lookup
22146         on fields without names.  We find them, based upon their unique type
22147         instead.
22148         * typeck.c (build_component_ref): Allow FIELD_DECL components.
22149         Handle finding components in anonymous unions, and ensure that a
22150         COMPONENT_REF is built for each level as necessary.
22151
22152 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
22153
22154         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
22155         code that ensures that copy ctors are used if appropriate.
22156
22157 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22158
22159         * init.c (build_vec_delete): Only give an error if base isn't an
22160         error_mark_node.
22161
22162 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
22163
22164         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
22165         (yylex): If we see `new', keep slurping.
22166
22167 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
22168
22169         * class.c (finish_struct_1): Move code for handling anon unions...
22170         (finish_struct_anon): to here.  Fixup so that we do the offset
22171         calculations right, and so that the fields are physically moved to
22172         the containers's chain.
22173
22174 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22175
22176         * decl.c (grokdeclarator): Avoid trying to get an operand off an
22177         identifier node.
22178
22179 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
22180
22181         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
22182         POINTER_SIZE to agree with expr.c.
22183
22184 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
22185
22186         * search.c (lookup_field): Don't report ambiguities if protect is 0,
22187         instead return NULL_TREE.
22188
22189 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
22190
22191         * class.c (finish_struct_1): Call warn_hidden if we want warnings
22192         about overloaded virtual functions.
22193         (warn_hidden): New routine to warn of virtual functions that are
22194         hidden by other virtual functions, that are not overridden.
22195         (get_basefndecls): New routine, used by warn_hidden.
22196         (mark_overriders): New routine, used by warn_hidden.
22197         * search.c (get_matching_virtual): Remove old warning that just
22198         isn't very useful.
22199
22200 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22201
22202         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
22203
22204         * typeck.c (null_ptr_cst_p): Delete unused fn.
22205         (build_function_call_maybe): Delete unused fn.
22206
22207         * expr.c (extract_init): #if 0 the code after unconditional return 0
22208         for now.
22209
22210         Delete old cadillac code.
22211         * edsel.c: Remove file.
22212         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
22213         * Makefile.in (CXX_OBJS): Delete edsel.o.
22214         (edsel.o): Delete rule.
22215         * cp-tree.h (flag_cadillac): Delete var decl.
22216         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
22217         * decl2.c (flag_cadillac): Delete var definition.
22218         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
22219         (grokfield): Delete code depending on flag_cadillac.
22220         (finish_anon_union): Likewise.
22221         * class.c (finish_struct_1): Likewise.
22222         (pushclass): Likewise.
22223         (popclass): Likewise.
22224         (push_lang_context): Likewise.
22225         (pop_lang_context): Likewise.
22226         * decl.c (init_decl_processing): Likewise.
22227         (start_decl): Likewise.
22228         (cp_finish_decl): Likewise.
22229         (xref_tag): Likewise.
22230         (finish_enum): Likewise.
22231         (start_function): Likewise.
22232         (finish_function): Likewise.
22233         (finish_stmt): Likewise.
22234         * lex.c (lang_init): Likewise.
22235         (check_newline): Likewise.
22236
22237         * lex.c (do_pending_inlines): Delete synthesized method kludge.
22238
22239         Delete defunct, ancient garbage collection implementation.
22240         * rtti.c: New file with the RTTI stuff from gc.c.
22241         * gc.c: Removed file (moved the remaining stuff into rtti.c).
22242         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
22243         (rtti.o): New rule, replacing gc.o.
22244         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
22245         * cp-tree.h: Delete gc-related fn decls.
22246         (DECL_GC_OFFSET): Delete macro.
22247         (flag_gc): Delete extern decl.
22248         * decl.c (current_function_obstack_index): Delete var decl.
22249         (current_function_obstack_usage): Delete var decl.
22250         (start_function): Delete clearing of current_function_obstack_index
22251         and current_function_obstack_usage.
22252         (init_decl_processing): Delete code relying on -fgc.
22253         Delete call to init_gc_processing.
22254         (cp_finish_decl): Delete calls to build_static_gc_entry and
22255         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
22256         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
22257         and to expand_expr of a __gc_main call.
22258         (maybe_gc_cleanup): Delete var decl.
22259         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
22260         * decl2.c (flag_gc): Delete var decl.
22261         (lang_f_options): Delete offering of -fgc.
22262         (lang_decode_option): Delete -fgc and -fno-gc handling.
22263         (get_temp_regvar): Delete gc code.
22264         * init.c (build_new): Delete gc code.
22265         * lex.c (init_lex): Delete checking of flag_gc.
22266
22267         * typeck.c (convert_arguments): Delete gc code.
22268         (build_component_addr): Delete -fgc warning.
22269         (build_modify_expr): Delete gc code.
22270
22271         * decl2.c (build_push_scope): Delete fn.
22272         * cp-tree.h (build_push_scope): Delete decl.
22273
22274         * search.c (clear_search_slots): Delete fn.
22275         * cp-tree.h (clear_search_slots): Delete decl.
22276
22277         * search.c (tree_needs_constructor_p): Delete fn.
22278         * cp-tree.h (tree_needs_constructor_p): Delete decl.
22279
22280         * tree.c (id_cmp): Delete fn.
22281
22282         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
22283         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
22284
22285         * tree.c (decl_value_member): Delete fn.
22286         * cp-tree.h (decl_value_member): Delete decl.
22287
22288         * tree.c (list_hash_lookup_or_cons): Delete fn.
22289         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
22290
22291         * method.c (cplus_exception_name): Delete fn.
22292         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
22293
22294         * spew.c (shift_tokens): Delete fn.
22295
22296 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
22297
22298         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
22299         to cp_finish_decl.
22300         * parse.y: Likewise.
22301
22302 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22303
22304         * tree.c (build_cplus_staticfn_type): Delete function definition;
22305         never used.
22306         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
22307
22308         * tree.c (virtual_member): Delete function definition; never used.
22309         * cp-tree.h (virtual_member): Delete decl.
22310
22311 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
22312
22313         * typeck.c (build_component_ref): Handle getting vbase pointers
22314         out of complex multiple inheritance better.
22315
22316 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
22317
22318         * typeck.c (build_object_ref): Make sure we use the real type, not
22319         any reference type.
22320
22321 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
22322
22323         * tree.c (build_exception_variant): Don't create new types if we
22324         don't have to, also build new types on the right obstack.
22325
22326 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
22327
22328         * decl.c (store_bindings): Split out from push_to_top_level.
22329         (push_to_top_level): Call it for b->type_shadowed on class binding
22330         levels.
22331
22332 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
22333
22334         * search.c (expand_upcast_fixups): Fix so that offsets stored in
22335         vbase_offsets are always right.  Fixes a problem where virtual base
22336         upcasting and downcasting could be wrong during conversions on this
22337         during virtual function dispatch at ctor/dtor time when dynamic
22338         vtable fixups for deltas are needed.  This only sounds easier than
22339         it is.  :-)
22340         (fixup_virtual_upcast_offsets): Change to reflect new calling
22341         convention for expand_upcast_fixups.
22342
22343 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22344
22345         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
22346         check that it's usable as the bitfield width.
22347
22348 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22349
22350         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
22351         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
22352         only ever used for functions in it.
22353
22354 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
22355
22356         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
22357         (nested_type): Likewise.
22358         (nested_name_specifier): Use lastiddecl.
22359
22360         * decl.c (grokdeclarator): Adjust accordingly.
22361         * init.c (expand_member_init): Likewise.
22362         * parse.y (base_class): Likewise.
22363         * typeck2.c (build_functional_cast): Likewise.
22364
22365         * typeck2.c (build_functional_cast): Fill in name after we've
22366         checked for non-aggr type.
22367
22368 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
22369
22370         * decl2.c (warn_pointer_arith): Default to on.
22371
22372 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
22373
22374         * lex.c (is_rid): New function.
22375         * decl.c (grokdeclarator): Diagnose reserved words used as
22376         declarator-ids.
22377
22378 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
22379
22380         * tree.c (get_decl_list): Don't lose cv-quals.
22381
22382         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
22383         typespecs used as declarator-ids.
22384
22385 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
22386
22387         * decl.c (poplevel): When poping a level, don't give a warning for
22388         any subblocks that already exist.
22389
22390 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
22391
22392         * typeck.c (build_object_ref): Finish what I started.
22393
22394         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
22395
22396         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
22397
22398         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
22399         scope.
22400
22401 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
22402
22403         * decl.c (xref_tag): Handle passing a type in directly.
22404
22405         * parse.y (qualified_type_name): Pull out the type.
22406         (nested_type): Likewise.
22407         Take types directly instead of as identifiers.
22408         * call.c (build_scoped_method_call): Take types directly instead of
22409         as identifiers.
22410         * decl.c (xref_basetypes): Likewise.
22411         * init.c (expand_member_init): Likewise.
22412         (build_member_call): Likewise.
22413         (build_offset_ref): Likewise.
22414         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
22415         * method.c (do_build_assign_ref): Likewise.
22416         * decl.c (grokdeclarator): Handle a type appearing as the
22417         declarator-id for constructors.
22418         * method.c (do_build_copy_constructor): current_base_init_list now
22419         uses the types directly, not their names.
22420         * init.c (sort_base_init): Likewise.
22421         (expand_member_init): Likewise.
22422         * init.c (is_aggr_type): New function, like is_aggr_typedef.
22423
22424 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
22425
22426         * tree.c (layout_basetypes): Call build_lang_field_decl instead
22427         of build_lang_decl if first arg is a FIELD_DECL.
22428
22429 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22430
22431         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
22432         non-empty.
22433         * except.c (expand_start_catch_block): Set TREE_USED to avoid
22434         warnings about the catch handler.
22435
22436 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
22437
22438         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
22439         expand_target_expr.
22440
22441 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
22442
22443         Fix access control to use trees rather than integers.
22444         * class.c (access_{default, public, protected, private,
22445         default_virtual, public_virtual, private_virtual}_node): Add
22446         definitions.
22447         (init_class_processing): Do creation of those nodes.
22448         * cp-tree.h (access_type): Delete enum decl.
22449         (access_{default, public, protected, private, default_virtual,
22450         public_virtual, private_virtual}_node): Add decls.
22451         (compute_access): Change return type.
22452         * search.c (compute_access): Have tree return type, instead of enum.
22453         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
22454         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
22455         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
22456         * parse.y (VISSPEC): Make ttype rather than itype.
22457         (base_class_access_list): Likewise.
22458         * *.[cy]: Change all refs of `access_public' to `access_public_node',
22459         etc.
22460         * call.c (build_method_call): Make ACCESS be a tree.
22461         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
22462         * cvt.c (convert_to_aggr): Likewise.
22463         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
22464         Likewise.
22465         * method.c (hack_identifier): Likewise.
22466         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
22467
22468 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
22469
22470         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
22471         frontend, and make it more consistent with respect to
22472         warn_pointer_arith.
22473
22474 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
22475
22476         * decl.c (pushdecl): Check for duplicate parameter names.
22477
22478 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
22479
22480         * decl.c (expand_static_init): Call assemble_external for atexit.
22481
22482 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
22483
22484         * except.c (do_unwind): Remove some generated dead code.
22485         (eh_outer_context): New routine, factor out some common code from
22486         expand_builtin_throw and end_eh_unwinder.  Add code to do return
22487         address masking for the PA.
22488         (expand_builtin_throw): Use eh_outer_context instead of open coding
22489         it here.
22490         (end_eh_unwinder): Likewise.
22491
22492 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
22493
22494         * except.c (expand_throw): Call assemble_external for __empty, if we
22495         use it.
22496
22497 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
22498
22499         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
22500         NORMAL_RETURN_ADDR_OFFSET.
22501         (end_eh_unwinder): Likewise.
22502
22503 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
22504
22505         * gc.c (build_dynamic_cast): Make sure we don't cast away const
22506         when dealing with references, and make sure we handle dynamic
22507         casting to a cv qualified reference.
22508
22509 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
22510
22511         * except.c (struct eh_context): New structure top hold eh context
22512         information.
22513         (push_eh_context): New routine.
22514         (pop_eh_context): Likewise.
22515         * decl.c (push_cp_function_context): Use them.
22516         (pop_cp_function_context): Likewise.
22517
22518 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
22519
22520         * decl2.c (finish_file): Also prune uninteresting functions in the
22521         inline emission loop.
22522
22523 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
22524
22525         * sig.c (build_signature_table_constructor): Mark functions
22526         in the signature as referenced.
22527
22528 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
22529
22530         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
22531         the inline emission stuff.
22532
22533 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
22534
22535         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
22536         weak symbols.
22537         * lang-options.h: Add -f{no-,}weak.
22538         * decl.c (init_decl_processing): If the target does not support weak
22539         symbols, don't use them.
22540         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
22541
22542 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
22543
22544         * init.c (expand_member_init): warning for base init after members.
22545
22546 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
22547
22548         * cvt.c (build_expr_type_conversion): Don't convert to a reference
22549         type.
22550
22551 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
22552
22553         * method.c (report_type_mismatch): Improve wording for volatile
22554         mismatches.
22555
22556 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
22557
22558         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
22559         expand_assignment, as the later doesn't handle things that have
22560         copy constructors well.  The compiler would do bitwise copying,
22561         instead of ctor calling in some cases.
22562
22563 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
22564
22565         * g++.c (my_strerror): Return "cannot access" if errno is 0.
22566         (pfatal_with_name, perror_exec): Don't assume that
22567         the returned value from my_strerror contains no '%'s.
22568         (concat): Remove.
22569         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
22570
22571 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
22572
22573         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
22574         TYPE_METHODS/TREE_CHAIN mean what they used to.
22575         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
22576         instead of TYPE_METHODS.
22577         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
22578         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
22579         * cp-tree.h (CLASSTYPE_METHODS): Lose.
22580         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
22581         TYPE_METHODS.
22582         (struct lang_decl): Lose next_method field.
22583         (DECL_NEXT_METHOD): Lose.
22584         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
22585         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
22586         anymore.
22587         (finish_struct_methods): Don't mess with the TREE_CHAINs in
22588         fn_fields.
22589
22590         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
22591         vector.
22592
22593         * call.c (build_method_call): Synthesize here even when not inlining.
22594         * typeck.c (build_function_call_real): Likewise.
22595
22596 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
22597
22598         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
22599         == DBX_DEBUG, call dbxout_start_new_source_file and
22600         dbxout_resume_previous_source_file when appropriate.
22601
22602 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
22603
22604         * except.c (start_anon_func): Push to the top level.
22605         (end_anon_func): Pop from the top level.
22606
22607 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
22608
22609         * cp-tree.h (build_cleanup): New routine to build cleanups.
22610         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
22611         call at ctor time and use atexit to run it later.
22612         * decl2.c (build_cleanup): New routine, taken from finish_file.
22613         (finish_file): Use build_cleanup instead, and don't put function
22614         local statics in global dtor list.
22615
22616 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
22617
22618         * except.c (expand_throw): Ensure that we have cleanups, if we try
22619         and expand cleanups.
22620
22621 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
22622
22623         * except.c (expand_throw): Add logic to manage dynamic cleanups for
22624         the EH object.
22625         (expand_end_catch_block): Use the magic of expand_goto, instead of
22626         emit_jump so that we get the cleanup for any catch clause parameter
22627         and the cleanup for the exception object.  Update to reflect label
22628         changes.
22629         (push_eh_cleanup): New routine to register a cleanup for an
22630         exception object.
22631         (empty_fndecl): Used to default cleanup actions to
22632         nothing.
22633         (init_exception_processing): Setup empty_fndecl.  Setup
22634         saved_cleanup.
22635         (expand_start_catch_block): Update to reflect label changes.  Call
22636         push_eh_object to register the cleanup for the EH object.
22637         (start_anon_func): New routine to start building lambda expressions
22638         from trees.
22639         (end_anon_func): New routine to end them.
22640         (struct labelNode): Change so that we can use tree labels, or rtx
22641         labels.
22642         (saved_cleanup): Object to check for dynamic cleanups for the
22643         exception handling object.
22644         (push_label_entry): Change so that we can use tree labels, or rtx
22645         labels.
22646         (pop_label_entry): Likewise.
22647         (top_label_entry): Likewise.
22648         (expand_start_all_catch): Use tree label instead of rtx label, so
22649         that we can get the magic of expand_goto.
22650         (expand_end_all_catch): Update to reflect label changes.
22651
22652         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
22653         use UNSAVE_EXPRs.
22654         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
22655         building_cleanup logic, as we now use UNSAVE_EXPRs.
22656         * cp-tree.h (unsave_expr): Declare it.
22657         * decl.c (building_cleanup): Remove.
22658         (maybe_build_cleanup): Remove building_cleanup logic, and use
22659         UNSAVE_EXPR instead.
22660
22661 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
22662
22663         * gc.c (build_t_desc): Update error message to say <typeinfo>.
22664
22665 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22666
22667         * decl.c (pushdecl): Only warn about shadowing a local variable if
22668         warn_shadow is true.
22669
22670 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
22671
22672         * typeck.c (build_binary_op_nodefault): Added warning about
22673         comparisons between different enum types with -Wall, unless
22674         -fenum-int-equiv set.
22675
22676 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
22677
22678         * class.c (finish_struct_1): Skip down to the inner type in
22679         multidimensional arrays.  Ensures ctors will be made for types that
22680         need constructing.
22681
22682 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
22683
22684         * decl.c (last_dtor_insn): New to track the last compiler generated
22685         insn in a dtor.
22686         (store_parm_decls): Set it.
22687         (finish_function): Use it to see if the dtor is empty.  Avoid doing
22688         vtable setup all the time, if we can.
22689         (struct cp_function): Add last_dtor_insn.
22690         (push_cp_function_context): Save it.
22691         (pop_cp_function_context): Restore it.
22692
22693 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
22694
22695         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
22696         warnings.
22697
22698 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
22699
22700         * typeck.c (expand_target_expr): Make sure targets get put into the
22701         current temp_slot_level, so that the free_temp_slots call will reuse
22702         them.
22703
22704 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
22705
22706         * class.c (finish_struct_1): Delay delta fixups for virtual bases
22707         until after we have done the hard virtuals, to avoid a bogus `every
22708         virtual function must have a unique final overrider' for virtual
22709         functions that are only overridden by hard virtuals.
22710
22711 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
22712
22713         * pt.c (do_function_instantiation): Don't try to find a file-scope
22714         template for a member function.
22715
22716 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
22717
22718         * g++.c (main): Add handling of -nodefaultlibs.
22719
22720 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
22721
22722         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
22723         distinguish between direct bindings of reference variables, and
22724         indirect bindings of reference variables.
22725         * cvt.c (build_up_reference): Use it.
22726         * typeck.c (convert_arguments): Use it to indicate this is an
22727         indirect binding.
22728         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
22729         as they are unused.
22730         (expand_static_init): Likewise.
22731         (cplus_expand_expr_stmt): Likewise.
22732         * decl2.c (finish_file): Likewise.
22733         * init.c (perform_member_init): Likewise.
22734         (emit_base_init): Likewise.
22735         (expand_aggr_vbase_init_1): Likewise.
22736
22737 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22738
22739         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
22740         get a DECL_LANG_SPECIFIC node.
22741         * cp-tree.h (lang_decl_flags): Add new member `level'.
22742         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
22743         decl_flags level member.
22744
22745 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22746
22747         * call.c (build_method_call): Make sure instance has a
22748         TYPE_LANG_SPECIFIC node before we dive into it.
22749
22750 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
22751
22752         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
22753
22754 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
22755
22756         * decl.c (duplicate_decls): When smashing decls, smash staticness in
22757         the usual way.
22758
22759 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
22760
22761         * decl.c (poplevel): Handle the merging of subblocks of cleanups
22762         when finishing blocks that have already been created (usually due to
22763         the fixup goto code).  Fixes bad debugging information.
22764
22765 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
22766
22767         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
22768         that's not a list of overloaded functions.
22769
22770 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22771
22772         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
22773         before trying to use DECL_ABSTRACT_VIRTUAL_P.
22774
22775 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
22776
22777         * decl2.c (mark_used): New function for hooking into setting of
22778         TREE_USED on decls.
22779         * call.c (build_method_call): Use it.
22780         * class.c (instantiate_type): Likewise.
22781         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
22782         for all like-named functions.
22783         * method.c (hack_identifier): Likewise.
22784         (emit_thunk): Don't call assemble_external.
22785         (make_thunk): Create thunk as a FUNCTION_DECL so that it
22786         gets the right mode and ENCODE_SECTION_INFO works.
22787
22788         * parse.y: Use mark_used.  Pass operator names to do_identifier.
22789         * lex.c (do_identifier): Handle operator names.
22790
22791         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
22792
22793 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22794
22795         * errfn.c: Include stdio.h.
22796         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
22797
22798 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
22799
22800         * typeck2.c (digest_init): Always convert initializers to the
22801         right type.
22802
22803 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
22804
22805         * init.c (member_init_ok_or_else): Don't allow member initializers
22806         for indirect members, as it is invalid.
22807
22808 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22809
22810         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
22811
22812 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
22813
22814         * parse.y (for.init.statement): Catch compound statements inside for
22815         initializations, if we're being pedantic.
22816
22817 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
22818
22819         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
22820         looking for.
22821
22822 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
22823
22824         * error.c (dump_expr): Don't core dump when a boolean expression is
22825         used as a default argument.
22826
22827 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
22828
22829         * class.c (finish_struct_bits): Check aggregate_value_p instead of
22830         RETURN_IN_MEMORY.
22831
22832 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
22833
22834         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
22835         BLKmode type that would otherwise be returned in registers.
22836
22837 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22838
22839         * g++.c (WITHLIBC): New macro.
22840         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
22841         saw_libc and pass it at the end if it was set.
22842
22843 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22844
22845         * parse.y (fn.def1): Call split_specs_attrs in
22846         declmods notype_declarator case.